These are links associated with recent searches I’ve done. They’re not difficult enough to warrant to their own posts but still super useful.
Vision Research - Slow Motion Video of Popcorn PoppingI did a search for high speed photography popcorn and this should have been the first result. I got curious for some reason why popcorn seeds turn into popcorn and not just explode. It turns out the heat turns the inside part into a foam-like material.
Python - How to extract EXIF data with PILfrom PIL import Image
from PIL.ExifTags import TAGS
def get_exif(fn):
ret = {}
i = Image.open(fn)
info = i._getexif()
for tag, value in info.items():
decoded = TAGS.get(tag, tag)
ret[decoded] = value
return ret
Finding Unused Fields in GoldMineThis query will show you all user defined fields that are not used in any tab, or the top half of the screen:
select field_name from contudef where field_name like ‘U%’ and field_Name not in
(select fldname from fields5 where fldname like ‘U%’)
Tags: Binary, Exif, Generator, Goldmine, Html, Image, Lifehacks, Photography, Pil, Popcorn, Python, Service, Simplexmlrpcserver, Sleep, Sql, Uri, Utilitymill, Win32, Xmlrpc
Posted by Greg Pinero (Primary Searcher) as Uncategorized at 3:30 AM MST
2 Comments »
These are links associated with recent searches I’ve done. They’re not difficult enough to warrant to their own posts but still super useful.
geopy - Geocoding Toolbox for Pythongeopy makes it easy for developers to locate the coordinates of addresses, cities, countries, and landmarks across the globe using third-party geocoders and other sources of data, such as wikis.
Here is a Decorator I finally Understand(formatting may not carry over from Del.icio.us)
>>> def addspam(fn): … def new(*args): … print "spam, spam, spam" … return fn(*args) … return new … >>> @addspam … def useful(a, b): … print a**2 b**2 … >>> useful(3,4) spam, spam, spam 2
Tags: Decorators, Geolocation, Gis, Googlemaps, Linux, Mssql, Processes, Pyro, Python, Sql, Sqlserver, Stdout, Subprocess, Webservices, Windows, Work, Xmlrpc, Zombie
Posted by Greg Pinero (Primary Searcher) as Uncategorized at 3:30 AM MST
Comments Off
It turns out that following the example from Python’s SimpleXMLRPCServer documentation of serving from localhost only works for well, localhost:
from SimpleXMLRPCServer import SimpleXMLRPCServer
# Create server
server = SimpleXMLRPCServer(("localhost", 8000))
#snip ...(register functions here, see example)
server.register_instance(MyFuncs())
# Run the server's main loop
server.serve_forever()
To make your server available to other computers on your network you should do something like this:
import socket
from SimpleXMLRPCServer import SimpleXMLRPCServer
# Create server
server = SimpleXMLRPCServer((socket.gethostbyname(socket.gethostname()), 8000))
#snip ...(register functions here, see example)
server.register_instance(MyFuncs())
server.serve_forever()
Open question, will this work for serving to the internet at large, or do I need to do something differently? I’m actually not sure why localhost doesn’t work across the LAN. Does anyone know?
I found this answer by a google code search for SimpleXMLRPCServer.
Posted by Greg Pinero (Primary Searcher) as Python, Web Services at 11:46 AM MST
3 Comments »
These are links associated with recent searches I’ve done. They’re not difficult enough to warrant to their own posts but still super useful.
templatemaker - Google CodeThis thing learns patterns from text you give and is then able to extract data. It looks really neat, I just wish I could think of a use for it.
PDF EditorFree software to edit PDFs. Let me know how it works.
Tags: Apache, Browser, Bug, Cache, Compatibility, Converter, Crossplatform, Css, Data, Debug, Dom, Extension, Extensions, Extraction, Firefox, Freesoftware, Generator, Greasemonkey, Html, Http, Ie, Javascript, Linux, Mozilla, Parsing, Pdf, Python, Screen_Scraping, Screenshot, Template, Text, Ubuntu, Web.Py, Win32, Work, Xul
Posted by Greg Pinero (Primary Searcher) as Uncategorized at 3:30 AM MST
Comments Off
Enthusiast Answer My Searches reader, Jody writes in with this Firefox tip:
For some absurd reason (I believe PDF downloader - now incompatible with Firefox 2.0.0.6) all of my Firefox extensions stopped working. Upon opening the add-ons screen, every extension said “This add-on will be installed when Firefox is restarted.”
The simple solution is to close Firefox, and delete the following file. Everything should be fine after that. C:\Documents and Settings\[windows user]\Application Data\Mozilla\Firefox\Profiles\[PROFILE NAME]\extensions.cache
Thanks for the tip, Jody!
Posted by Greg Pinero (Primary Searcher) as win32, Firefox at 4:42 PM MST
Comments Off