I hereby claim:
- I am tapicella on github.
- I am tapicell (https://keybase.io/tapicell) on keybase.
- I have a public key whose fingerprint is 0196 9E4D 82DE FBAF EBA4 84D3 0B83 5ECF 5ED5 27D0
To claim this, I am signing this object:
// ==UserScript== | |
// Sources: http://stackoverflow.com/questions/2246901/how-can-i-use-jquery-in-greasemonkey-scripts-in-google-chrome | |
// @name Mount Fader | |
// @namespace habitRPGMountFader | |
// @include https://habitrpg.com/* | |
// @author Tom Apicella (jquery by Erik Vergobbi Vold & Tyler G. Hicks-Wright) | |
// @description This userscript fades out your mount when you mouse over your hero | |
// ==/UserScript== | |
// a function that loads jQuery and calls a callback function when jQuery has finished loading |
I hereby claim:
To claim this, I am signing this object:
""" This script bulk downloads emoji from a slack channel """ | |
import os, time, urllib | |
from pyvirtualdisplay import Display | |
from selenium import webdriver | |
from selenium.webdriver.common.keys import Keys | |
display = Display(visible=0, size=(800, 600)) | |
display.start() | |
driver = webdriver.Chrome("DRIVER LOCATION") |
""" This script bulk uploads emoji to a slack channel """ | |
import os, time | |
from pyvirtualdisplay import Display | |
from selenium import webdriver | |
from selenium.webdriver.common.keys import Keys | |
rootdir = 'EMOJI SOURCE' | |
display = Display(visible=0, size=(800, 600)) | |
display.start() |
from PIL import Image, ImageDraw | |
import os, math | |
#SETTINGS | |
WIDTH_RATIO = 3 #Ratio of image min width to watermark width | |
MIN_WIDTH = 200 #Minimum width of watermark. In my watermark, it is 1/3 of the normal width | |
MIN_HEIGHT = 40 #Minimum height of watermark. In my watermark ,it is 1/3 of the normal height | |
WATERMARK_LOCATION = "watermark.png" | |
#Most helpful source: http://stackoverflow.com/questions/13662184/python-pil-lighten-transparent-image-and-paste-to-another-one |
''' | |
Given a sorted list of distinct integers, write a function that returns whether there are two integers in the list that add up to 0. For example, you would return true if both -14435 and 14435 are in the list, because -14435 + 14435 = 0. Also return true if 0 appears in the list. | |
[1, 2, 3] -> false | |
[-5, -3, -1, 2, 4, 6] -> false | |
https://repl.it/HmSh/10 | |
''' | |
test1 = [] #False |
''' | |
rosettacode.org/wiki/Sum_to_100 | |
brute force solution | |
https://repl.it/Hmhz/20 | |
''' | |
# http://stackoverflow.com/questions/34559663/convert-decimal-to-ternarybase3-in-python | |
def decimalToTernary (n): | |
if n == 0: | |
return '0' |
''' | |
rosettacode.org/wiki/Rep-string | |
Given a series of ones and zeroes in a string, define a repeated string or rep-string as a string which is created by repeating a substring of the first N characters of the string truncated on the right to the length of the input string, and in which the substring appears repeated at least twice in the original. | |
For example, the string 10011001100 is a rep-string as the leftmost four characters of 1001 are repeated three times and truncated on the right to give the original string. | |
Note that the requirement for having the repeat occur two or more times means that the repeating unit is never longer than half the length of the input string. | |
10011 10011 |
''' | |
An International Securities Identification Number (ISIN) is a unique international identifier for a financial security such as a stock or bond. | |
Replace letters with digits, by converting each character from base 36 to base 10, e.g. AU0000XVGZA3 →1030000033311635103. | |
Perform the Luhn test on this base-10 number. | |
US0378331005:TRUE | |
US0373831005:FALSE | |
U50378331005:FALSE | |
AU0000XVGZA3:TRUE |
''' | |
Following up on yesterday... Given a sorted list of distinct integers, write a function that returns whether there *any subset combinations* in the list that add up to 0. For example, you would return true if `[-8, 3, 5, 11]` are in the list, because -8 + 3 + 5 = 0. Also return true if 0 appears in the list. | |
''' | |
from itertools import combinations | |
def findSubset(mylist): | |
if len(mylist)==0: return False | |
elif len(mylist)==1: return(mylist[0]==0) | |
else: |