Skip to content

Instantly share code, notes, and snippets.

View rodgomesc's full-sized avatar
🎯
Focusing

Rodrigo Gomes rodgomesc

🎯
Focusing
View GitHub Profile
@rodgomesc
rodgomesc / WebBrowser.py
Last active August 29, 2015 14:03
Navegador Web em Python com 11 linhas de código
from PySide.QtGui import QApplication
from PySide.QtCore import QUrl
from PySide.QtWebKit import QWebView
import sys
__autor__= 'Rodrigo Gomes'
app = QApplication(sys.argv)
b = QWebView()
b.load(QUrl('https://youtu.be/QXG-Rsmrt4A?list=PLe1Buo9ERpeVkq-3aqxBSeriyV-didkwW'))
@rodgomesc
rodgomesc / FaceDetect.py
Last active August 29, 2015 14:03
Face detect in 9 lines if code
from SimpleCV import * #importa FrameWork
import time # importa time
frame = Image("1.jpg").scale(0.8) # abre imagem e subtrai 20% do seu total
face = frame.findHaarFeatures("face.xml") #instancia de face.xml
if face: # se encontrar um rosto
face.draw((0, 255, 0), 3) #desenha cor (R,G,B) LarguraLinha 3
frame.show() #mostra o resultado
time.sleep(10) #segura por 10seg resltado n tela
@rodgomesc
rodgomesc / CoinDetector.py
Created July 16, 2014 18:23
Detector de Moedas
from SimpleCV import *
# A quarter mede 24.26mm
quarterSize = 24.26
# Isto ira manter o ratio entre o tamanho da imagem ao tamanho real do quartzo
sizeRatio = 0
objectSize = 0
img = Image('coins.jpg', sample=True)

MacOS

Download from here:

http://d.pr/f/QE3d

MD5: 59bab8f71f8c096cd3f72cd73851515d

Rename it to: Sublime Text

Make it executable with: chmod u+x Sublime\ Text

This file has been truncated, but you can view the full file.
{
"metadata": {
"celltoolbar": "Slideshow",
"name": "",
"signature": "sha256:307e13dffd6cde5cf71460ac18e8b061059b29dec34130af5549ddd079b2431e"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
@rodgomesc
rodgomesc / BarcodeDetect.py
Created November 28, 2014 18:17
barcodeDetect
import time
import csv
from SimpleCV import Color, ColorCurve, Camera, Image, pg, np, cv
from SimpleCV.Display import Display
cam = Camera(0)
display = Display((800,600))
data = "None"
mydict = dict()
myfile = "barcode-list.csv"
@rodgomesc
rodgomesc / AlienCode.py
Created February 1, 2015 18:12
AlienCode.py to generate wallpaper
_ = (
255,
lambda
V ,B,c
:c and Y(V*V+B,B, c
-1)if(abs(V)<6)else
( 2+c-4*abs(V)**-0.4)/i
) ;v, x=1500,1000;C=range(v*x
);import struct;P=struct.pack;M,\
j ='<QIIHHHH',open('M.bmp','wb').write
@rodgomesc
rodgomesc / cesar_1.py
Created February 12, 2015 17:41
cesar_1.py
python -c "print ''.join([chr(154 - ord(c)) for c in '65\'\$5,65z+z5,13-9z\'5z4+(z79*9 '])"
#@gwidion code
print"".join(u"\x1b[%dm%c%s"%((42+y%2^y>>3&1),((1,3,2,-1,0,2,3,1)+(4,)*8+32*(-9781,)+8*(10,)+(7,9,8,5,6,8,9,7))[y]+9813,(y+1)%8and" "or" \x1b[48m\n")for y in range(64))
@rodgomesc
rodgomesc / simpleCamera
Created July 13, 2015 05:06
Detecta Rosto
from SimpleCV import Image, Camera
cam = Camera()
while True:
img = cam.getImage()
face = img.findHaarFeatures('face.xml')
if face:
face.draw(width=3,color=(255,0,0))
img.show()