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
hi aha |
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 perm(xs) : | |
if xs == [] : | |
yield [] | |
for x in xs : | |
ys = [y for y in xs if not y==x] | |
for p in perm(ys) : | |
yield ([x] + p) |
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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import curses | |
import curses.textpad | |
import cmd | |
def maketextbox(h,w,y,x,value="",deco=None,textColorpair=0,decoColorpair=0): | |
# thanks to http://stackoverflow.com/a/5326195/8482 for this | |
nw = curses.newwin(h,w,y,x) |
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 feedparser | |
import hashlib | |
import json | |
from bs4 import BeautifulSoup | |
d = feedparser.parse("http://www.quora.com/YOUR-QUORA-NAME/answers/rss") | |
for e in d["entries"] : | |
title = e["title"] | |
summary = e["summary"] |
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 os import listdir | |
from os.path import isfile, join | |
onlyfiles = [ f for f in listdir(".") if isfile(join("",f)) ] | |
import json | |
print """ | |
<html> | |
<style> | |
body { |
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 <Bounce.h> | |
int anaPin = 5; // Analogue in pin | |
int button = 2; // button pin | |
int beepPin = 3; // piezo buzzer | |
// edges of our calibration window | |
float aMax; | |
float aMin; |
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
define :trans do |xs, d| | |
return xs.collect { |x| (x+d) } | |
end | |
ritmo = [0.2,0.4,0.2,0.4] | |
i = [:c3,:eb3,:g3,:c4,:c3,:eb3,:g3,:c4] | |
iv = (trans i, 5) | |
v = (trans i, 7) |
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
# Five Minutes | |
# requires Phil's Sonic Pi Lib ( https://github.com/interstar/Phil-s-Sonic-Pi-Lib ) | |
section = :a | |
live_loop :clock do | |
section=wait_then(1,:b) | |
puts section |
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
license: mit |
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
(ns clojure-web-server.routes.services | |
(:require [ring.util.http-response :refer :all] | |
[compojure.api.sweet :refer :all] | |
[schema.core :as s]) | |
) | |
(defonce ideias (atom {:id 0 :nome "root" :criancas | |
[{:id 1 :nome "hello" :criancas {}}]})) | |
(defn buscar [id ids] |
OlderNewer