Skip to content

Instantly share code, notes, and snippets.

View estevaofon's full-sized avatar
🐍
Python powered

Estevao Fonseca estevaofon

🐍
Python powered
View GitHub Profile
import sys, marshal, functools, subprocess
child_script = """
import marshal, sys, types;
fn, args, kwargs = marshal.load(sys.stdin)
marshal.dump(
types.FunctionType(fn, globals())(*args, **kwargs),
sys.stdout)
"""
//Codigo corrigido
#include <Servo.h>
Servo myservo;
int distance = 100;
long distancia;
long tiempo;
void setup() {
pinMode(7, OUTPUT);
@estevaofon
estevaofon / comoNaoDeixarNoVaucoNoWhatsapp.js
Created October 20, 2017 20:52 — forked from callmeloureiro/comoNaoDeixarNoVaucoNoWhatsapp.js
Como não deixar no vácuo no whatsapp
/*
Hoje não deixaremos mais ninguém no vácuo no whatsapp
Para utilizar:
- Abra o web.whatsapp.com;
- Abra o console e cole o código que está no gist;
- Aguarde e verá uma mensagem sendo enviada a cada momento que alguém te enviar alguma mensagem.
Confira também como ser chato no whatsapp: https://gist.github.com/mathloureiro/4c74d60f051ed59650cc76d1da0d32da
import requests
from bs4 import BeautifulSoup
import os
import datetime
directory = "db"
if not os.path.exists(directory):
os.makedirs(directory)
dir_location = os.path.abspath(directory)
from urllib.request import urlopen
from urllib.parse import urlparse
from bs4 import BeautifulSoup
import re
import datetime
import random
pages = set()
random.seed(datetime.datetime.now())
import this
from time import sleep
import sys
import os
os.system('cls' if os.name == 'nt' else 'clear')
text = "".join([this.d.get(c, c) for c in this.s])
phrases = text.split("\n")
def comprar():
print("Comprando")
def perfil():
print("Vendo perfil")
def sair():
print("saindo")
while True:
print("Comprar - 1\nVer meu perfil - 2\n Sair - 3")
@estevaofon
estevaofon / int42.py
Created March 22, 2018 00:57 — forked from fmasanori/int42.py
int42
class int42(int):
def __init__(self, n):
int.__init__(n)
def __add__(a, b):
return 42
def __str__(n):
return '42'
import json
data = {}
data['people'] = []
data['people'].append({
'name': 'Scott',
'website': 'stackabuse.com',
'from': 'Nebraska'
})
data['people'].append({
import json
with open('data.txt') as json_file:
data = json.load(json_file)
for p in data['people']:
print('Name: ' + p['name'])
print('Website: ' + p['website'])
print('From: ' + p['from'])
print('')