Skip to content

Instantly share code, notes, and snippets.

View filipecifali's full-sized avatar

Filipe Cifali Stangler filipecifali

  • Porto Alegre / RS / Brasil
  • 16:25 (UTC -03:00)
View GitHub Profile
@filipecifali
filipecifali / Speech.py
Created April 3, 2012 21:26 — forked from ederwander/Speech.py
Real time VAD implementation using Google Speech Api
#Eng Eder de Souza 01/12/2011
#Speech Recognizer prototype ...
#Real time VAD implementation using Google Speech Api
from tempfile import mkstemp
from subprocess import call
from os import remove, listdir
from matplotlib.mlab import find
import pyaudio
import numpy as np
@filipecifali
filipecifali / selenium-examples.py
Created May 8, 2012 18:45 — forked from hugs/selenium-examples.py
Example code for using the Selenium 2 Python bindings.
# To install the Python client library:
# pip install -U selenium
# Import the Selenium 2 namespace (aka "webdriver")
from selenium import webdriver
# iPhone
driver = webdriver.Remote(browser_name="iphone", command_executor='http://172.24.101.36:3001/hub')
# Android
@filipecifali
filipecifali / gist:5004351
Created February 21, 2013 12:14
.profile
# My stuff :3
export PS1="[\u@\h at \t in -> \W] : "
export HISTTIMEFORMAT="%d/%m/%y %T "
export set PATH=/usr/local/bin:$PATH
export set PATH=/Users/filipecifalistangler/Downloads/scala-2.10.0/bin:$PATH
export set PATH=$PATH:$MYSQL_HOME/bin
export set MYSQL_HOME=/usr/local/mysql
alias judite="echo JUDITE ; sleep 1 ; echo JUDITE ; sleep 1 ; echo JUDITE ; sleep 1 ; echo JUDITE ; sleep 1 ; echo JUDITE ; sleep 1 ; echo JUDITE ; sleep 1 ; echo NAO FODE COMIGO JUDITE"
alias mysql=/usr/local/mysql/bin/mysql
alias mysqladmin=/usr/local/mysql/bin/mysqladmin
@filipecifali
filipecifali / gist:5004637
Created February 21, 2013 13:10
Samples...
$ cat teste.py
#!/usr/bin/env python
import sys
for a in sys.argv:
print a
base_url = 'http://gendou.com/'
username = '********' # derp dy
password = '********' # herp
def login():
cj = cookielib.CookieJar()
opener = urllib2.build_opener(urllib2.HTTPCookieProcessor(cj))
urllib2.install_opener(opener)
login_data = urllib.urlencode({'name':username, 'pass':password})
request = urllib2.Request(base_url+'/forum/login.php', login_data)
class Hotel(object):
def __init__(self, name, ranking, price):
self.name = name
self.ranking = ranking
self.price = price
def show_price(self, date):
if date is Saturday or date is Sunday:
self.price = self.price * 0.2
root@wiki:/home/pythonbrasil2015# apt-get install ruby
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
libffi5 libruby1.9.1 ruby1.9.1
Suggested packages:
ri ruby-dev ruby1.9.1-examples ri1.9.1 graphviz ruby1.9.1-dev ruby-switch
The following NEW packages will be installed:
libffi5 libruby1.9.1 ruby ruby1.9.1
set comments=
set noai
set nu
set tabstop=4
shiftwidth=4
expandtab
syntax on
[10:00:17 root@ohhh redis-3.0.2]# make
cd src && make all
make[1]: Entering directory `/usr/local/install/System-packages/redis-3.0.2/src'
rm -rf redis-server redis-sentinel redis-cli redis-benchmark redis-check-dump redis-check-aof *.o *.gcda *.gcno *.gcov redis.info lcov-html
(cd ../deps && make distclean)
make[2]: Entering directory `/usr/local/install/System-packages/redis-3.0.2/deps'
(cd hiredis && make clean) > /dev/null || true
(cd linenoise && make clean) > /dev/null || true
(cd lua && make clean) > /dev/null || true
(cd jemalloc && [ -f Makefile ] && make distclean) > /dev/null || true
@filipecifali
filipecifali / gist:32cf402cd6b7f209e703
Created June 18, 2015 23:42
Comparing 2 DNS server results
from tcolors import bcolors
from dns.resolver import Resolver
sys_r = Resolver()
dns1 = ['a.sec.dns.br', 'b.sec.dns.br']
dns2 = ['dns1.stabletransit.com', 'dns2.stabletransit.com']
domain = 'python.org.br'
queries = {
# '':'a',
# '':'mx',
# '':'txt',