[CentralOH] 2013-05-09 道場 Scribbles 落書/惡文?

jep200404 at columbus.rr.com jep200404 at columbus.rr.com
Fri May 10 14:55:46 CEST 2013


2 is somebody's favorite number because it is the only even prime number
17 is the only random prime
seed for pseudo random sequence good for unit tests

There were five former/student/wannabe financial quant folks and 
three copies of PfDA present. 

    Jim <bowtie> Rogers in Singapore; Mandarin Chinese

WX

    MADIS microclimate http://madis.noaa.gov/

    java ucar unidata for nexrad
    http://www.unidata.ucar.edu/

    beaufort scale

    lat/long
    gradians/meters
    degrees/nautical mile
    HRAP grid @#$@%^&^#$^!!!

simplecv face detection in five lines simplecv.org

pep 7 - C style guide

-- is option to say no more options. 
E.g. mv -- -f foo to rename file named '-f' to foo. 

    cohpy at dojo:~$ mkdir d
    cohpy at dojo:~$ cd d
    cohpy at dojo:~/d$ >-f
    cohpy at dojo:~/d$ ll
    total 0
    -rw-rw-r-- 1 cohpy cohpy 0 May 10 08:18 -f
    cohpy at dojo:~/d$ mv -f foo
    mv: missing destination file operand after `foo'
    Try `mv --help' for more information.
    cohpy at dojo:~/d$ mv -- -f foo
    cohpy at dojo:~/d$ ll
    total 0
    -rw-rw-r-- 1 cohpy cohpy 0 May 10 08:18 foo
    cohpy at dojo:~/d$ 

Adding './' to some funky file names can help sometimes.

full transparency
How do you buy a divider bar in checkout line? 

rtl sdr europe dvb usb tuner
    $10
    1 MHz to 3 GHz
    spectrum analyzer

vincent visualization interactive html css javascript
https://pypi.python.org/pypi/vincent/0.1.4

WebDAV
1G
Is modulus of negative integers as described in 
http://docs.python.org/2/reference/expressions.html#binary-arithmetic-operations
ambiguous, so that implementations can differ? 

C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C 

    cohpy at dojo:~/i/modulo$ cat foo.c
    #include <stdio.h>
    #include <stdlib.h>

    int main(int argc, char *argv[])
    {
        int x = (-1);
        int y = 3;

        printf("%d %d %d\n", x/y, x%y, x == (x/y)*y + (x%y));
        exit(EXIT_SUCCESS);
    }
    cohpy at dojo:~/i/modulo$ ./foo
    0 -1 1
    cohpy at dojo:~/i/modulo$ 

python python python python python python python python python python python 

    cohpy at dojo:~/i/modulo$ cat foo.py
    #!/usr/bin/env python
    x = (-1)
    y = 3
    print "%d %d %d" % (x/y, x%y, x == (x/y)*y + (x%y))
    cohpy at dojo:~/i/modulo$ ./foo.py
    -1 2 1
    cohpy at dojo:~/i/modulo$ 

somebody bought copy of New Testament (K&R 2nd Ed)

path.py module is handy but has no documentation, so read the source luke 
source env/bin/activate
pip install path.py  # not pip install path
from path import path
for f in path('/foo/bar').walkfiles('*.mkv'):
    print f.namebase
    # Explore many other cool convenience methods (and attributes). 

divmod() is cool (but has ambiguity as / and %)

Django on Windows hell
Udacity 

local static variables in C
Mutex

The community room worked out well.



More information about the CentralOH mailing list