Skip to content

Instantly share code, notes, and snippets.

View paco-valdez's full-sized avatar

Francisco Valdez de la Fuente paco-valdez

View GitHub Profile
/**
* http://candrews.net/blog/2010/10/introducing-sprymap/
* Charlie Andrews
*
* Instantiate the widget when you want it to turned into a map,
* probably in the window.onload or $(document).ready() function.
*
* Default parameters are listed as the parameters below
* var map = new spryMap({
* // The ID of the element being transformed into a map
@paco-valdez
paco-valdez / OverlayViewDemo.html
Created November 5, 2013 19:01
Based on the tutorial: "Adding a Custom Overlay". This script makes the overlay size editable with the help of two markers. https://developers.google.com/maps/documentation/javascript/examples/overlay-simple
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="initial-scale=1.0, user-scalable=no">
<meta charset="utf-8">
<title>Adding a Custom Overlay</title>
<style>
html, body {
height: 100%;
import copy
class Table(object):
'''
TODO:
- Group By (a.k.a. aggregate funcs)
- In place row delete.
- unit tests
- Make it a python package
'''
def linkedlist1():
"""
How do you reverse a singly linked list? How do you reverse a doubly linked list? Write a
program to do the same.
"""
class NodeSingle(object):
def __init__(self, n,v):
self.next = n
self.value = v
@paco-valdez
paco-valdez / latlon.html
Last active August 29, 2015 14:13
latlon.html
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="initial-scale=1.0, user-scalable=no">
<meta charset="utf-8">
<title>Geocoding service</title>
<style>
html, body {
height: 100%;
margin: 0px;
-99.21572685241699 19.44223220045214
-99.2114782333374 19.44429606588626
-99.21014785766602 19.44490308013705
-99.2061996459961 19.44793811733449
-99.20547008514404 19.447371581366603
-99.19933319091797 19.444336533573612
-99.1924238204956 19.442636882017393
-99.18959140777588 19.43960174568607
-99.18487071990967 19.438792366413672
-99.18362617492676 19.43753782056711
-99.1799783706665 19.4286545492973
-99.18272495269775 19.435311989563974
-99.18096542358398 19.431224474991648
-99.18175935745239 19.432802834395886
-99.19165134429932 19.428452191216575
-99.19744491577148 19.427035677593377
-99.19761657714844 19.431791067311856
-99.19577121734619 19.431588713138684
-99.19047117233276 19.43794251383486
-99.19070720672607 19.43563574869708
Ejercito:
-99.18525695800781 19.437638993978613
-99.20085668563843 19.43832697150489
-99.20592069625854 19.438569786406344
-99.21379566192627 19.438913773561776
Homero
-99.18276786804199 19.435311989563974
-99.20126438140869 19.436020211829216
#LoopA-B
-99.1714489459991,19.4096874430979
-99.1716903448105,19.4099378897724
-99.1717922687531,19.4103401223563
-99.171060025692,19.41193385471
-99.1703063249588,19.4136287764357
-99.1700220108032,19.4142207271055
-99.1697216033936,19.4146710129239
-99.1694533824921,19.4149290413138
-99.1692763566971,19.4150403475517
def graphs():
"""
find longest path from X node, max depth from X node, deepst node from x node, all paths
"""
graphA = {'1' : ['2','3'],
'2' : ['1','4','5'],
'3' : ['1'],
'4' : ['2','6','7'],
'5' : ['2','8'],