show dbs
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 python | |
# encoding: utf-8 | |
# Copyright (C) 2001-2007 Martin Blais. All Rights Reserved | |
# Copyright (C) 2010 Bear http://code-bear.com/bearlog/ | |
# Copyright (C) 2013 lrq3000 | |
# Excerpt from SnakeFood to recursively list all imports of modules using AST parsing | |
# Additions to print the versions of each module if available |
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
#@yasinkuyu 08/09/2017 | |
def check_internet(): | |
url='http://www.google.com/' | |
timeout=5 | |
try: | |
_ = requests.get(url, timeout=timeout) | |
return True | |
except requests.ConnectionError: | |
print("İnternet bağlantısı yok.") |
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
# DataFrame example | |
df = pd.DataFrame(data={'col1': ["one", 2], 'col2': [3, "four"]}) | |
df = df.to_dict() # You need to pass as dict | |
%md table $df # <---- In Jupyter Notebook cell | |
#------------------------------------------------------------ | |
# Dict structure example |
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 selenium import webdriver | |
from selenium.webdriver.common.proxy import Proxy | |
from selenium.webdriver.common.keys import Keys | |
from selenium.webdriver.common.desired_capabilities import DesiredCapabilities | |
from selenium.webdriver.chrome.options import Options | |
import zipfile,os | |
def proxy_chrome(PROXY_HOST,PROXY_PORT,PROXY_USER,PROXY_PASS): | |
manifest_json = """ | |
{ |
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 time, sys, base64 | |
for i, v in enumerate((getattr, time, sys, "sleep", | |
"decode", "bytes", "stdout", | |
"write", "flush", 1.0, 6, | |
base64, "upper", 1000.0, "'", | |
print, 0), start=3): | |
vars()['_'*i] = v | |
_ = ( | |
b'RGFpc3kgRGFpc3kgZ2l2ZSBtZSB5b3VyIGFuc3dlciBk' | |
b'bwpJJ20gaGFsZiBjcmF6eSBhbGwgZm9y\nIHRoZSBsb3' |