commit 0627961a073631f1f04747627511da4832c44274
parent adbdfd861fc98fda1bbc259d3aae5e4c964a402d
Author: Yuval Langer <yuval.langer@gmail.com>
Date: Sat, 8 Jan 2022 20:12:41 +0200
Merge branch 'yuvallanger.github.io'
Diffstat:
8 files changed, 103 insertions(+), 0 deletions(-)
diff --git a/Pages/Commands.md b/Pages/Commands.md
@@ -0,0 +1,3 @@
+Commands I infrequently need.
+
+Dump streams, vlecs (personal use, of course), videos - mplayer -dumpfile [file] -dumpstream [url]
diff --git a/Pages/Python-versus-c.org b/Pages/Python-versus-c.org
@@ -0,0 +1,3 @@
+** Modulus
+
+[[http://stackoverflow.com/questions/1907565/c-python-different-behaviour-of-the-modulo-operation][C/Python different behaviour of the modulo operation]]
+\ No newline at end of file
diff --git a/Pages/Python.org b/Pages/Python.org
@@ -0,0 +1,11 @@
+* Python
+** Getting a dictionary of the attribute name and attribute value pairs
+
+#+BEGIN_SRC python
+class a:
+ b = 'b'
+ def __init__(self, c):
+ self.c = c
+ def who(self):
+ return(scipy.who(vars(self)))
+#+END_SRC
diff --git a/Pages/Vim.md b/Pages/Vim.md
@@ -0,0 +1,5 @@
+How many lines / Count marked lines
+
+"In visual mode, press g C-g."
+
+http://stackoverflow.com/questions/7262536/vim-count-lines-in-selected-range
diff --git a/Pages/Words.md b/Pages/Words.md
@@ -0,0 +1,5 @@
+# Words on the tip of my tongue #
+
+* Rhetoric
+* Demagogue
+* Corruption
diff --git a/Pages/weave.md b/Pages/weave.md
@@ -0,0 +1,43 @@
+# Accessing an array and its metadata through C/C++ in *scipy.weave.inline()*
+
+* Accessing an array *foo* with *foo.ndim == 3*:
+ - The array itself will be accessable through the *FOO3(i, j, k)* function.
+ - Array assignments will be the same. *FOO3(i, j, k) = bar;*
+ - *foo.shape* will be accessable through the *Nfoo[]* array.
+
+
+## The inline code:
+
+~~~ { .cpp }
+
+long dim1, dim2, dim3;
+
+dim1 = Nfoo[0]; // dimension access.
+dim2 = Nfoo[1];
+dim3 = Nfoo[2];
+
+FOO3(0,0,0) = 1; // array assignment
+return_val = FOO3(0,0,0); // array access.
+
+~~~
+
+## The Python code:
+
+~~~ { .python }
+import scipy
+import scipy.weave
+inline_code = r"""
+put C/C++ code in here
+"""
+foo = scipy.arange(3**3).reshape((3,3,3))
+scipy.weave.inline(inline_code, foo)
+~~~
+
+# Using Python functions in weave.inline
+
+Call *foo.call(py:tuple arg)*.
+
+# Links
+
+* At Weave and Numpy array arguments: [Scipy's Weave page](http://www.scipy.org/Weave)
+* [Calling Python functions from inline C with scipy.weave (stackoverflow)](http://stackoverflow.com/questions/5929600/calling-python-functions-from-inline-c-with-scipy-weave)
diff --git a/README.md b/README.md
@@ -0,0 +1,10 @@
+commonly-forgotten
+==================
+
+I forget, so I write.
+
+* [scipy.weave](Pages/Weave)
+* [command line](Pages/Commands)
+* [Python versus C](Pages/python-versus-c)
+* [Vim](Pages/Vim)
+* [Words](Pages/Words)
diff --git a/_posts/test.md b/_posts/test.md
@@ -0,0 +1,22 @@
+---
+title: "Test Page"
+published: false
+layout: post
+category: test
+tags:
+- yolk
+- exoskeleton
+- test
+---
+
+# Test #
+
+Lorem ipsum...
+
+### Stuff
+
+More stuff
+
+### Yolk
+
+Exoskeleton...