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 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) | |
""" |
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
//Codigo corrigido | |
#include <Servo.h> | |
Servo myservo; | |
int distance = 100; | |
long distancia; | |
long tiempo; | |
void setup() { | |
pinMode(7, OUTPUT); |
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
/* | |
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 |
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 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) |
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 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()) |
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 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") |
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 comprar(): | |
print("Comprando") | |
def perfil(): | |
print("Vendo perfil") | |
def sair(): | |
print("saindo") | |
while True: | |
print("Comprar - 1\nVer meu perfil - 2\n Sair - 3") |
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 int42(int): | |
def __init__(self, n): | |
int.__init__(n) | |
def __add__(a, b): | |
return 42 | |
def __str__(n): | |
return '42' |
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 json | |
data = {} | |
data['people'] = [] | |
data['people'].append({ | |
'name': 'Scott', | |
'website': 'stackabuse.com', | |
'from': 'Nebraska' | |
}) | |
data['people'].append({ |
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 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('') |
OlderNewer