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
#https://github.com/chriskiehl/pyrobot | |
from pyrobot import Robot, Keys | |
Y ,A ,S ,D ,F = 410, 125, 135, 235, 335 | |
black = (17,17,17) | |
robot = Robot() | |
print('Ready\n');robot.sleep(3);print('Go\t') | |
for var in range(0,1000): | |
robot.sleep(.05) | |
if robot.get_pixel(A,Y) == black: | |
robot.move_and_click(A,Y,button='left') |
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://admin:[email protected]/wlcfg.wl?wlSsidIdx=0&wlEnbl=1&wlHide=1&wlAPIsolation=0&wlSsid=yourSSid&wlCountry=IR' | |
headers = {'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; WOW64; rv:48.0) Gecko/20100101 Firefox/48.0'} | |
try: requests.get(url, headers=headers) | |
except Exception as e: | |
print("except") |
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://192.168.1.1/rebootinfo.cgi' | |
headers = {'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; WOW64; rv:48.0) Gecko/20100101 Firefox/48.0'} | |
try: requests.get(url, headers=headers) | |
except Exception as e: | |
print("except") |
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
<ControlTemplate TargetType="Button"> | |
<Grid x:Name="RootGrid" | |
Background="{TemplateBinding Background}" | |
CornerRadius="100,100,100,100"> | |
<VisualStateManager.VisualStateGroups> | |
<VisualStateGroup x:Name="CommonStates"> | |
<VisualState x:Name="Normal"> | |
<Storyboard> | |
<PointerUpThemeAnimation Storyboard.TargetName="RootGrid" /> | |
</Storyboard> |
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
# Download this file and put it beside this script file: | |
# https://channel9.msdn.com/Events/Build/2017/rss | |
import re | |
with open('rss.txt', 'r') as myfile: | |
data=myfile.read().replace('\n', '') | |
txt='';ret = re.findall(r"url=\"(\S+?)\.mp4\"",data) | |
for l in ret: | |
if '_mid' in l: | |
txt+=l+'.mp4\n' | |
f=open('link.txt', 'w') |
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
{ | |
"Faces": [ | |
{ | |
"name": "Oh well!", | |
"art" : "¯\\_(ツ)_/¯" | |
}, | |
{ | |
"name": "Disapproving Look", | |
"art": "ಠ_ಠ" | |
}, |
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 install imageio | |
# then in python : | |
# import imageio and | |
# imageio.plugins.ffmpeg.download(). | |
import moviepy.editor as mp | |
clip = mp.VideoFileClip("X.mp4") | |
# .subclip(0,20) | |
clip.audio.write_audiofile("Y.mp3") |
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
[ | |
{ | |
"name": "Purple Love", | |
"colors": ["#cc2b5e", "#753a88"] | |
}, | |
{ | |
"name": "Sexy Blue", | |
"colors": ["#2193b0", "#6dd5ed"] | |
}, | |
{ |
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 Image | |
# f = raw_input('Image:\n') | |
# im = Image.open(f) | |
# rgb_im = im.convert('RGB') | |
# r, g, b = rgb_im.getpixel((x, y)) | |
# def distance(c1, c2): | |
# (r1,g1,b1) = c1 | |
# (r2,g2,b2) = c2 |
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 webbrowser | |
mom="http://dictionary.cambridge.org/dictionary/english/" | |
fs="line.txt" | |
f=open(fs, 'r+') | |
lines = tuple(f) | |
f.close() | |
for l in lines: | |
l=l.replace('\n','').lower() | |
if len(l)>1: | |
webbrowser.open(mom+l) |
OlderNewer