This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import codecs | |
class Permutador: | |
def __init__(self): | |
self.lista = [] | |
self.index = 0 | |
self.anagramas = [] | |
def permutar(self,lista_an,longitud=None,anag_an=[]): #same itertools.permutation, but it's recursive | |
if longitud == None: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Source http://hasenj.wordpress.com/2009/04/14/making-a-fancy-window-in-wxpython/ | |
import wx | |
def GetRoundBitmap( w, h, r ): | |
maskColor = wx.Color(0,0,0) | |
shownColor = wx.Color(5,5,5) | |
b = wx.EmptyBitmap(w,h) | |
dc = wx.MemoryDC(b) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function preLoad(){ | |
nameimages = new Array('nimage0','nimage1','nimage2','nimage3','nimagen'); | |
images = {}; | |
loadAllImages(); | |
function loadAllImages(){ | |
for (name in nameimages){ | |
images[nameimages[name]] = new Image(); | |
images[nameimages[name]].onload = function() { | |
resourceLoaded(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE HTML> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<style type="text/css"> | |
div#slide { | |
width: 960px; | |
height: 400px; | |
animation: slide 30s; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Add this to your theme's functions.php file, and replace wp_link_pages in the whole theme by it. | |
//Use | |
//post intro | |
//<!--nextpage--><!--pagetitle: Title one --> | |
//more post | |
//<!--nextpage--><!--pagetitle: Title two --> | |
//..... | |
//That way we get pagination links ... First Title one Title two | |
//http://wordpress.stackexchange.com/questions/11578/custom-page-links-for-paginated-posts-wp-link-pages-nextpage-quicktag |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#-*- coding: utf-8 -*- | |
import timeit | |
class Datatests(): | |
def __init__(self): | |
self.fns = {'ifelif': {'maximos': [],'minimos': [], 'media': []}, | |
'ifelifcalling': {'maximos': [],'minimos': [], 'media': []}, | |
'simulswitch': {'maximos': [],'minimos': [], 'media': []}} | |
def test(self,function_name,module_name,parameter,test_repetitions,function_calls): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#plot.ly Example | |
# | |
#This example plot | |
#https://plot.ly/~GermanJimenez/0/ | |
import plotly | |
import os | |
def collatzDropTime(n): | |
c = 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def nessitas_one(iterable): #fixed | |
"""Return the object in the given iterable that evaluates to True. | |
If the given iterable has more than one object that evaluates to True, | |
or if there is no object that fulfills such condition, return None. | |
>>> nessitas_one((True, False, False)) | |
True | |
>>> nessitas_one((True, False, True)) | |
False |
We can make this file beautiful and searchable if this error is corrected: Unclosed quoted field in line 2.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name,website,categories,group,category,phone,full_address,address_street,address_city,address_postcode,address_state,address_country,lat,long,open_hours,time_zone,rating,photos_array,street_view,business_status,about,logo,reservation,booking,menu,ordering | |
Almaden Neighborhood Church,http://www.almadenchurch.org/,alliance_church,religion,alliance_church,+1 408-268-5200,"19550 McKean Rd, San Jose, CA 95120",19550 McKean Rd,San Jose,95120,California,United States of America,37.199132,-121.8331413,"{""Monday"": ""9AM-12PM"", ""Tuesday"": ""9AM-9PM"", ""Wednesday"": ""9AM-9PM"", ""Thursday"": ""9AM-12PM"", ""Friday"": ""9AM-12PM"", ""Saturday"": ""9AM-12PM"", ""Sunday"": ""9AM-2PM""}",America/Los_Angeles,4.5,https://lh5.googleusercontent.com/p/AF1QipNY7X1zx5hv2isw0nDmUCaS_lbiVicyMHwMCga0=w800-h500-k-no,https://lh5.googleusercontent.com/p/AF1QipNY7X1zx5hv2isw0nDmUCaS_lbiVicyMHwMCga0=w1600-h1000-k-no,OPERATIONAL,"{""Accessibility"": {""Wheelchair accessible entrance"": true, ""Wheelchair accessible parking lot"": tr |