straup + python   403

The purpose of mordecai is to accept text and return structured geographic information in return. It does this in several ways:

It uses MITIE to extract placenames from the text. In the default configuration, it uses the out-of-the-box MITIE models, but these can be changed out for custom models when needed.

It uses word2vec's models, with gensim's awesome Python wrapper, to infer the country focus of an article given the word vectors of the article's placenames.

It uses a country-filtered search of the geonames gazetteer in Elasticsearch (with some custom logic) to find the lat/lon for each place mentioned in the text.

It runs as a Flask-RESTful service.
geo  python  nlp  flask  mitie  via:mapzen 
november 2015 by straup
This is a Python port of Google's libphonenumber library It supports Python 2.5-2.7 and Python 3.x (in the same codebase, with no 2to3 conversion needed).
python  phone 
september 2015 by straup
flask app for highlighting non-ascii - note that the source contains someone else's GA tracking code which is a nice touch...
python  unicode 
august 2015 by straup
Visualizing My Location History with Python, Shapely, and Basemap - Beneath Data
「on how to analyze your location history data and produce some cool maps to visualize how you spend your time. Of course, there are 1,000,001 more ways to utilize location history, but hopefully this post gives you the tools to pursue those other ideas. 」
visualization  geo  python  via:karlcow 
november 2014 by straup
cooperhewitt/plumbing-ucd-server · GitHub
hardly enough to make up for the gloom / but if you've ever wanted to look up the name for a unicode character...
cooperhewitt  python  flask  unicode  from twitter
november 2014 by straup
Python Patterns - Server-Sent Events - Tao of Mac
「Which is why I much prefer Server-Sent Events — it works fabulously for sending continuous updates to most browsers, and with the right polyfill it will fall back to polling even on extreme conditions like the server (or network) going away and returning.」
serversentevent  python  event  via:karlcow 
november 2014 by straup
pywb is a python implementation of web archival replay tools, sometimes also known as 'Wayback Machine'.

pywb allows high-quality replay (browsing) of archived web data stored in standardized ARC and WARC.

pywb can be used as a traditional web application or an HTTP or HTTPS proxy server.
python  archive  internetarchive  warc 
october 2014 by straup
Tilings by regular polygons in Python
「I thought it just didn’t work, but it turned out still making 14 out of 26 images and they look quite interesting:」

fortunate and beautiful errors
art  cgi  python  via:karlcow 
june 2014 by straup
Repetitive tasks abstracted, or a Python module for URL metadata ← nytlabs
「You import it, pass it a url, and it gives you back the following (where available):

Page title
Page description
Twitter card data
Facebook open graph data」
python  web  metadata  via:karlcow 
april 2014 by straup
A system for sharing secrets using Shamir's Secret Sharing Scheme.
python  security 
april 2014 by straup
18.5. asyncio – Asynchronous I/O, event loop, coroutines and tasks — Python 3.4.0 documentation
This module provides infrastructure for writing single-threaded concurrent code using coroutines, multiplexing I/O access over sockets and other resources, running network clients and servers, and other related primitives. Here is a more detailed list of the package contents:
async  python  network 
march 2014 by straup
Manhattancraft: The quest to make a full-size city of Minecraft blocks | Ars Technica
While generating a building or a single structure is tough but doable, the challenges of replicating an entire city composed of those building models are gargantuan. The buildings are an expression of a larger system that Mitchell is pulling together that he has termed "SparseWorld." According to a paper Mitchell wrote for the magazine Technophilic, the system combines "orthoimagery, bathyspheric, and elevation data from the USGS EROS service, and 3D buildings from Google’s 3D Warehouse" to create models. In the case of Manhattan, it takes a server cluster with 300 cores and 200GB of RAM a few hours to render Mitchell's current best version of a model of Manhattan.

"I owe some mentorship on how to interact with USGS data to the author of the TopoMC tool," Mitchell told Ars via e-mail. The TopoMC project itself handles models best when scaling them 1:6, but Mitchell rewrote TopoMC to better handle 1:1 scaling for SparseWorld. In Minecraft, one block is considered equal to one cubic meter, so that becomes the limit on how granular the Manhattan model can be.

The entire SparseWorld system is written in Python and uses Google 3D Warehouse data in the Collada format, as well as the PyCollada library, to create voxelized virtual models of available buildings. Initially, the system figured out the rectangular prism that contained the building in question and then filled it in with Minecraft stone. A later version "iterates over the surface of the [building] mesh rather than the volume of the enclosing prism" to reduce complexity.
minecraft  buildingequalsyes  nyc  python  google 
march 2014 by straup — 0.4.0 documentation
「 is a tool for ensuring that data conforms to certain sets of rules, called validations. A validation is essentially a schema for a dictionary, containing a list of rules for each key/value pair in the dictionary you want to validate. 」
python  validation  via:karlcow 
january 2014 by straup
Hobbits and Histograms - A How-To Guide to Building Your First Image Search Engine in Python - PyImageSearch
「Building a simple image search engine using screenshots from the movies. And that’s exactly what I did.」
image  search-engine  photo  python  via:karlcow 
january 2014 by straup
minpubsub 0.1 : Python Package Index
A minimal PubSub based distributed message queue model with multiple backend persistence modes - SQLite, MySQL, MongoDB.
python  pubsub 
january 2014 by straup : Make an Internet Controlled Lamp with a Raspberry Pi and Flask
「Here I will be showing you how to turn on and off a lamp from anywhere in the world. However, you can control any device that works by toggling its power source, such as a fountain, TV, Christmas tree lights, projector, etc.」
python  diy  raspberrypi  via:karlcow 
december 2013 by straup
The colours of tūhonohono « fog on water
I travelled a slightly different route. Instead of matching pixels to a small set of predetermined colours, I used a machine learning technique called k-means clustering to divide similar pixels into groups to find dominant colours. The clever way k-means clustering mashes together nearest-neighbour analysis with Voronoi polygons makes it a great method for finding approximate clusters centres when you’re unconcerned about the partition borders. I also like that the results emphasise distinctness over raw frequency counts. I began writing my own clustering algorithm before stumbling across a Python implementation by Charles Leifer, which I used without modification
color  code  fogonwater  python  threesixfive 
december 2013 by straup
md2ebook 0.1 : Python Package Index
「Build e-books (EPUB or PDF) out of markdown files」
ebook  epub  markdown  python  via:karlcow 
november 2013 by straup
"The procedure for generating a humanhash involves compressing the input to a fixed length (default: 4 bytes), then mapping each of these bytes to a word in a pre-defined wordlist (a default wordlist is supplied with the library). This algorithm is consistent, so the same input, given the same wordlist, will always give the same output. You can also use your own wordlist, and specify a different number of words for output."
python  language 
october 2013 by straup
iRobot Roomba Serial control Interface (SCI) and Create Open Interface (OI). is a fork of PyRobot. PyRobot was originally based on, developed by iRobot Corporation. Many of the docstrings from, particularly those which describe the specification, are also used here. Also, docstrings may contain specification text copied directly from the Roomba SCI Spec Manual and the Create Open Interface specification. Since SCI is a subset of OI, PyRobot first defines the Roomba's functionality in the Roomba class and then extends that with the Create's additional functionality in the Create class. In addition, since OI is built on SCI the SerialCommandInterface class is also used for OI.
python  roomba 
october 2013 by straup
"A python wrapper for the various APIs (IA-S3, Metadata API, etc.)"
python  s3  internetarchive 
september 2013 by straup
"Given Unicode text, make its representation consistent and possibly less broken."
python  unicode 
august 2013 by straup
zope.cooties 40.4 : Python Package Index
"All you have to do is depend on zope.cooties and your project will obtain transitive dependencies on two different Zope packages chosen at random at install time, as well as any of their dependencies. Suddenly your users will be installing ZODB or the ZCA for no apparent reason just to use your code.

Try it today and give the haters more to hate."
zope  python 
july 2013 by straup
Using Commodity Hardware as an Affordable Means to Track On-site Visitor Flow | MW2013: Museums and the Web 2013
The agent is placed in an area of traffic and connected to Ethernet and power. After booting, the “listen” Python script is invoked by a cron task, and a short delay of a few seconds is inserted to ensure all booting processes are stabilized.

The Tshark process is initiated and monitored by the Python script. Should the process fail or end, it will be restarted automatically. Tshark logs all the captured probe requests to a text file as they are observed. There are a plethora of options when initializing Tshark, and filtering criteria is specified at run time. The Linux utility “stdbuf” is used to disable buffering of the output. Our prototype used the following options to isolate the probe requests:

stdbuf -oL tshark -i wlan0 -I -f 'broadcast' -R 'wlan.fc.type == 0 && wlan.fc.subtype == 4' -T fields -e frame.time_epoch -e -e radiotap.dbm_antsignal > tshark.log

The “listen” script runs through a loop that ensures Tshark is running, and monitors the Tshark log. As Tshark adds probe requests to the log, they are read in by the script and forwarded to the back-end server as an HTTP POST request. Should the Python script fail for any reason, the cron task that initiated it will reboot the device and the process will begin anew.

On the server side, the Django web application receives the HTTP request, parses the POST data, and saves it to the database for later analysis. To assist in the data analysis, a Python script was developed to process the data received by the server. As stated earlier, a device sends probe requests for each network it knows of; for instance, if a device has seven previously known networks, seven probe requests are transmitted. The processing script parsed through all requests and converted these groupings of requests to a single record.
network  surveillance  python  raspberrypi  museums-and-the-network  week7  bonus 
july 2013 by straup
« earlier      
per page:    204080120160

related tags

3d  3g  aa:id=5things  aa:id=brick  aa:id=delmaps  aa:id=desktopninja  aa:id=devizeburger  aa:id=disco  aa:id=dwim  aa:id=filtr03  aa:id=growler10  aa:id=growler11  aa:id=hack  aa:id=hills  aa:id=historybox  aa:id=imagewidget10b4  aa:id=likeadog  aa:id=locatr  aa:id=mtdb  aa:id=nextsteps  aa:id=nfg_mm  aa:id=ole  aa:id=piratewalks  aa:id=pocketmmap  aa:id=poison  aa:id=py-wsclustr-php  aa:id=pydroid  aa:id=pytwitter  aa:id=pyupcoming  aa:id=re-hello  aa:id=restobook  aa:id=s60widgt  aa:id=s60_stikkitapp  aa:id=smallpings  aa:id=unfiled  aa:id=upcalendar  aa:id=watching  aa:id=widgets  aa:id=ws-modestmaps  aa:id=zomg  aa:id=ztlocatr  aa:idx=areacode  aa:idx=aware  aa:idx=baconmelon  aa:idx=bake  aa:idx=castles  aa:idx=cheap  aa:idx=fancy  aa:idx=fox  aa:idx=hammock  aa:idx=hirst  aa:idx=interpretation  aa:idx=invisible  aa:idx=itemz  aa:idx=meat  aa:idx=milkshake  aa:idx=patches  aa:idx=patience  aa:idx=playa  aa:idx=protective  aa:idx=pynchonite  aa:idx=smoking  aa:idx=summerwidgets  aa:idx=terroir  aa:idx=thick  aa:idx=time  aa:idx=trees  aa:idx=warstories  aa:idx=zebra  aa:ima=link  aa:ima=post  aa:post=5things  aa:post=10days  aa:post=agency  aa:post=barcode  aa:post=brick  aa:post=delmaps  aa:post=delmaps_02  aa:post=delmaps_pm  aa:post=delmaps_yelp  aa:post=devizeburger  aa:post=disco  aa:post=doom  aa:post=dragons  aa:post=dwim  aa:post=ffbp  aa:post=filtr03  aa:post=growler10  aa:post=growler11  aa:post=historybox  aa:post=intimacies  aa:post=likeadog  aa:post=mmpdf  aa:post=mw2010  aa:post=pocketmmap  aa:post=pocketnet  aa:post=poison  aa:post=pua  aa:post=pydroid  aa:post=pytwitter  aa:post=reduced  aa:post=restobook  aa:post=rijkscolor  aa:post=rocks  aa:post=s60widgt  aa:post=s60_stikkitapp  aa:post=spacemountain  aa:post=unfiled  aa:post=wall  aa:post=wanderdrone  aa:post=watching  aa:post=woelr  aa:post=ws-decode  aa:post=ws-raster  aa:post=zomg  aa:year=2005  aa:year=2006  aa:year=2007  aa:year=2008  aa:year=2009  aa:year=2010  aa:year=2011  aa:year=2012  aa:year=2013  aa:year=2014  aaronland  aarontalk  airplanes  algorithm  amazon  ami  andoird  android  annotations  apache  api  appengine  architecture  archive  arduino  art  asc  ase  async  auth  aws  backup  bagit  barcelona  bittorrent  bonus  boto  buildingequalsyes  bwr  bzip2  cablegate  cache  cairo  calendar  camera  canada  canvas  capacityplanning  casualprivacy  cats  census  cgi  chromecast  ci  circus  cli  cloudcastles  clustering  clustr  code  color  colour  commons  community  computervision  cooperhewitt  coreimage  crypto  csv  daemon  data  database  databases  datapr0n  datetime  dav  delicious  design  designengaged  devel  diy  django  dns  docco  documentation  doge  dogearedbooks  dots  dotspotting  dropbox  eatdrinkfeelgood  ebook  ebooks  ec2  edfg  edfg-dev  edtf  ekm  elasticsearch  email  emr  epsg  epub  esri  etsy  event  exif  eyebeam  eyefi  faa  filtr  finance  fiona  firesheep  flask  flickr  fogonwater  food  football  freebase  fuzzywuzzy  ganglia  gdal  gearman  geo  geocoding  geojson  geonames  geoscript  gevent  gis  git  github  gnome  google  government  gqis  graphics  graphs  growl  growler  gtk  guardian  gunicorn  hack  hadoop  hardware  heroku  historyboxes  howto  html  html5  httony  http  httpd  httpony  iam  ical  ima  image  instagram  internetarchive  interweb  investigate  ios  ipad  java  javascript  jquery  json  jwt  karlcow  kindle  kml  language  libcloud  lidar  loc  lucene  machinetags  maemo  magicwords  mapnik  mapreduce  maps  mapsfromscratch  markdown  markup  math  mathishard  mathshapes  matplotlib  mbtiles  media  memcache  messaging  metadata  metrics  migurski  mindthegaps  minecraft  mirrorproject  mitie  mobile  modem  modestmaps  mongo  monitoring  montreal  moo  mozilla  mpd  multiprocessing  museums-and-the-network  music  mysql  nagios  nbt  nearby  network  newrelic  nlp  nltk  nokia  notifications  numpy  nyc  oauth  ocr  odbc  ogr  ohyeahthat  openbookmark  opencv  openstreetmaps  oreilly  osm  osx  packaging  paper  papernet  paris  passport  pdf  penrose  perl  phash  phone  photo  photography  php  pil  pipelines  pipes  piratemaps  piratewalks  pizza  places  pocketmmap  pocketmod  pocketnet  polymaps  processing  programming  protovis  proximatespaces  psycopg  pubsub  python  queue  radio  randomfoo  raspberrypi  rdf  rds  readability  readme  realtime  recipe  redis  reference  refine  regex  resto  restobook  restobook-dev  reversegeocoding  roboteyes  roomba  rsync  rtree  s2  s3  schuyler  search  search-engine  security  semweb  sendfile  series60  serversentevent  ses  sgilles  shapefile  shapefiles  shapely  simplecv  skeletron  smtp  socialnetwork  society  socket  sockethandler  socketio  solr  spacelog  spacetime  splines  spotify  spreadsheets  sqlite  ssh  sso  statsd  stikkit  sudo  surveillance  sync  syndication  sysadmin  tagging  tesseract  textextraction  threesixfive  tilestache  tiling  timezone  tld  topojson  touch  transcription  travel  tsv  twilio  twisted  twistycurves  twitter  ubuntu  unicode  unix  upcoming  uri  us  validation  venn  via:gnat  via:joshua  via:karlcow  via:mapzen  via:mattb  via:migurski  via:mojodna  via:tomc  video  visualization  warc  watchdog  waybackmachine  weather  web  webapp  weblog  websocket  websockets  week7  whosonfirst  wifi  wikileaks  willison  worldcat  wsgi  www  wx  xbee  xkcd  xls  xpath  xslt  xtech2007  yahoo  zeroconf  zonetag  zope 

Copy this bookmark: