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 ipython | |
import splinter | |
import subprocess | |
b = splinter.browser.Browser() | |
subprocess.Popen(["pkill", "-f", "ipython"]) |
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 | |
url = "http://guitarshop.com.br/prod,idloja,5372,idproduto,3575917,cordas-amp-guitarra-g5--15w-c--drive" | |
headers = {"User-Agent": "python/urllib"} | |
r = requests.get(url, headers=headers) | |
print(r.status_code) | |
headers = {"User-Agent": "python/splinter"} | |
r = requests.get(url, headers=headers) | |
print(r.status_code) | |
headers = {"User-Agent": "splinter"} | |
r = requests.get(url, headers=headers) |
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 True(object): | |
def __init__(self, iterations=1): | |
self.iterations = iterations | |
self.current_iteration = 0 | |
def __nonzero__(self): | |
if self.current_iteration < self.iterations: | |
self.current_iteration += 1 | |
return 1 |
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
#!/bin/sh | |
# Print the gcc cpu specific options tailored for the current CPU | |
# Author: | |
# http://www.pixelbeat.org/ | |
# Notes: | |
# This script currently supports Linux,FreeBSD,Cygwin | |
# This script is x86 (32 bit) specific | |
# It should work on any gcc >= 2.95 at least |
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
pip freeze -l | cut -d'=' -f 1 | xargs pip install -U |
NewerOlder