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
<!-- Grab Google CDN's jQuery, with a protocol relative URL; fall back to local if offline --> | |
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script> | |
<script>window.jQuery || document.write('<script src="js/libs/jquery-1.7.1.min.js"><\/script>')</script> |
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
from flask import Flask | |
from plistlib import writePlistToString | |
app = Flask(__name__) | |
@app.route("/") | |
def default_plist(): | |
plist_content = { | |
'Greeting' : "Hello, World", | |
'Price' : 4.20, | |
'FeatureXIsLaunched' : True |
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
#include <stdio.h> | |
#include <stdlib.h> | |
#include <assert.h> | |
typedef unsigned int u32; | |
typedef unsigned long long u64; | |
//------------------------------------------------------------------------- | |
// WorkArea | |
//------------------------------------------------------------------------- |
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
puts "Listo para ser completado!" |
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 () { | |
uri = {}; var response = "?"; | |
uri.serialize = function(_params){ | |
for(var _value in _params){ | |
response += encodeURIComponent(_value); | |
response += "="; | |
response += encodeURIComponent(_params[_value]); | |
response += "&"; |
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
http://docs.python.org/2/library/os.html | |
http://pypi.python.org/pypi/colorama | |
http://fabric.readthedocs.org/en/0.9.0/usage/env.html | |
http://docs.fabfile.org/en/1.5/usage/parallel.html | |
http://docs.python.org/2/library/curses.html | |
http://stackoverflow.com/questions/2122385/dynamic-terminal-printing-with-python | |
http://stackoverflow.com/questions/1956777/how-to-make-fabric-ignore-offline-hosts-in-the-env-hosts-list | |
http://awaseconfigurations.wordpress.com/2011/10/20/fun-with-fabric-first-lab-tests/ |
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
public void guardarFichaOrdenada(Ficha ficha){ | |
/* | |
Se anade y luego ordena. Tiene ñacañá complejidad | |
que insertarlo si esta ordenado | |
*/ | |
guardarFicha(ficha); | |
array = new Ficha[getSize()]; | |
DNode<Ficha> current = getFirstNode(); | |
for(int ii = 0; current != getTrailer(); current = current.getNextNode()){ | |
array[ii] = getAt(ii); |
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
from pqueue import PersistentQueue | |
q1 = PersistentQueue("/tmp/queue_storage_dir") | |
q1.put("1") | |
q1.put("2") | |
q1.put("3") | |
q1.close() | |
q2 = PersistentQueue("/tmp/queue_storage_dir") | |
while not q2.empty(): |
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
require 'digest/sha1' | |
dir = '/Users/javierhonduco/Dropbox/uni/Estructura/lab/CodigoInicialP1' | |
exercise = 'E2-CompToInt' | |
args = 10000001 | |
interval = 0.5 | |
def dirhash dir | |
items = [] | |
hashs = [] |
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
class Node | |
attr_accessor :id, :type, :goto | |
def initialize(type = nil, goto = {}) | |
@type, @goto = type, goto | |
end | |
end | |
def matches?(pattern, text) |
OlderNewer