[CentralOH] 2014-08-25 會議 Scribbles 落書/惡文?
jep200404 at columbus.rr.com
jep200404 at columbus.rr.com
Thu Sep 4 00:56:48 CEST 2014
wp:shea butter
Thanks to Pillar and Ben Rogers for their hospitality. It was fun to watch the
astonishment and disbelief of an early newcomer to the Forge, to what pair
programming and test-driven development is, and the amenities for employees.
That astonishment and disbelief was hard to dispel even after Ben confirmed
things.
It was interesting to watch pair programming from 10 meters.
One could see that both screens had the same content.
Thanks to Brian Costlow to providing the food from City Barbecue.
I had not had their stuff before PyOhio, and am thoroughly impressed.
I did not know one could assign to slices.
>>> a = range(5)
>>> a
[0, 1, 2, 3, 4]
>>> a[::2] = 'bar'
>>> a
['b', 1, 'a', 3, 'r']
>>>
more on that later.
Brian Costlow:
CohPy needs help
Young Coders, Museum of Art, learning how kids learn
Click PyTn, how to teach, early 2015 Click Conference here
pyohio web site doacracy
SDN networking
ansible
short talks
$10k video
outreach CMA COSI
Cisco telnet (yes, telnet, really, in 2014!)
Norman Bird presented Django.
Eric Floehr presented on several rather simple things that many of us did not
know. His notebook can be viewed at
http://nbviewer.ipython.org/urls/dl.dropbox.com/s/i19j3gk1yrahna1/arrays-etc.ipynb?dl=0.
For each cell, predict what the output will be before you
look at the output.
a=range(5)
a[1::1]=['some', 'thing'] # insert
a[-1:]=a[-1]
collections
deque (pronounced "deck") O(1) performance
files = glob.glob('/long/path/*.foo')
files.sort()
column = column + 1
can be simplified as column += 1, which is easier on my brain
Canon A510 - protect oneself from hoarders
Datsun B510 - poor man's BMW
Ericsson C510
Dell Latitude D510
Nikon D510
LG E510
Dell Dimension E510
John Deere F510
Huawei Ascend G510
Hubsan H510 Video goggles
Jim Prior gave a minor presentation on using divmod() to convert many minutes
to hours and minutes and to convert centimeters to feet and inches.
His presentation is in the last two non-empty cells of Eric's notebook above.
Shareef Dabdoub gave a presentation on ipython (and notebook) magic commands.
That can be found at
http://nbviewer.ipython.org/urls/dl.dropbox.com/s/vv3uqonkvq5qo3p/ipynotebook-stuff.ipynb?dl=0. Computational biology
%lsmagic
line magic
big magic
%edit foo
Jan Milosh
d3 javascript visualization library
d3-tip
vega is like a config file (does 80% stuff normal everyday stuff)
vincent python to vega (Pulp Fiction homage)
vincent.core.initialize_notebook()
make json without curly braces
keystroke showers:
key-mon
screenkey
playitagainsam: https://github.com/rfk/playitagainsam
http://xkcd.com/1319/
Ugh, what an unmitigated mess:
def dms2deg(d_mmss):
degrees, mmss = divmod(d_mmss, 1.0)
minutes, seconds = divmod(100 * mmss, 1.0)
seconds *= 100.
# print degrees, minutes, seconds
return degrees + minutes/60. + seconds/3600.
def deg2dms(d):
degrees, frac = divmod(d, 1.0)
minutes, seconds = divmod(60 * frac, 1.0)
seconds *= 60.
# print degrees, minutes, seconds
return degrees + minutes/100. + seconds/10000.
def dms2deg(d_mmss):
dmm, seconds = divmod(10000 * d_mmss, 100)
print dmm, seconds
degrees, minutes = divmod(dmm, 100)
print degrees, minutes
return degrees + minutes/60. + seconds/3600.
def dms2deg(d_mmss):
degrees, mmss = divmod(d_mmss, 1.0)
print degrees, mmss
minutes, seconds = divmod(10000 * mmss, 100)
print degrees, minutes, seconds
return degrees + minutes/60. + seconds/3600.
def dms2deg(d_mmss):
degrees = int(d_mmss)
print degrees
mm_ss = 100. * (d_mmss - degrees)
print mm_ss
minutes = int(mm_ss)
print minutes
if minutes >= 60:
degrees += 1
minutes -= 100
if minutes < 0:
minutes = 0
seconds = 0
else:
seconds = 100. * (mm_ss - minutes)
print seconds
if seconds >= 60:
minutes += 1
if minutes >= 60:
degrees += 1
minutes -= 60
seconds -= 100
if seconds < 0:
seconds = 0
return degrees + minutes/60. + seconds/3600.
#-----------------------------------------------------------
def dms2deg(d_mmss):
degrees, mmss = divmod(d_mmss, 1.0)
print degrees, mmss
minutes, seconds = divmod(100 * mmss, 1.0)
print minutes, seconds
seconds *= 100.
print degrees, minutes, seconds
return degrees + minutes/60. + seconds/3600.
def deg2dms(d):
degrees, frac = divmod(d, 1.0)
minutes, seconds = divmod(60 * frac, 1.0)
seconds *= 60.
print degrees, minutes, seconds
return degrees + minutes/100. + seconds/10000.
def dms2deg(d_mmss):
dmm, seconds = divmod(d_mmss * 10000., 100.)
degrees, minutes = divmod(dmm, 100.)
return degrees + minutes/60. + seconds/3600.
def deg2dms(d):
degrees, frac = divmod(d, 1.0)
minutes, seconds = divmod(60 * frac, 1.0)
seconds *= 60.
return degrees + minutes/100. + seconds/10000.
dms2deg(1.3)
dms2deg(1.15)
dms2deg(1.0030)
dms2deg(10.0015)-dms2deg(9.5945)
deg2dms(_)
import angles
I don't see anything in angles that does what I'm to do
above. Having the input and output in floats is part of
the definition of the problem. angles solves different
problems.
More information about the CentralOH
mailing list