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
setInterval(function(){ | |
document.getElementsByClassName("robin-chat--vote robin-chat--vote-increase robin--vote-class--increase robin--active")[0].click(); | |
}, 600000); |
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
var c = "robin--vote-class--"; | |
setInterval(function(){ | |
if(document.getElementsByClassName("robin--flair-class--no-flair")[1].children[1].innerHTML == "Voting will end soon"){ | |
document.getElementsByName("message")[0].value = "Voting will end soon."; | |
} else { | |
var timeLeft = (document.getElementsByClassName("robin--flair-class--no-flair")[1].children[1].innerHTML.substring(33,35)*60) - (Math.abs(new Date(document.getElementsByClassName("robin--flair-class--no-flair")[1].children[0].getAttribute("datetime")) - new Date())/1000); | |
var minutesLeft = Math.floor(timeLeft/60); | |
var secondsLeft = Math.round(timeLeft - minutesLeft * 60); | |
document.getElementsByName("message")[0].value = (minutesLeft < 0)?("Voting will end soon."):(minutesLeft + " minutes and " + secondsLeft + " seconds 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 csv | |
from csv import * | |
import os.path | |
from math import sqrt | |
systems_file_location = "C:\\Users\\kionay\\Downloads\\systems.csv" | |
print("File exists?: " + str(os.path.isfile(systems_file_location))) | |
glob_row_count = 7556648 |
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
"""Only import required is to be able to initialize our NodeTree with random values""" | |
import random | |
class Node(): # pylint: disable=too-few-public-methods | |
"""Represents an arbitrary node in a binary tree""" | |
def __init__(self, value): | |
if value is None: | |
self.value = 0 |
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 timeit | |
def is_anagram(first_word, second_word): | |
second_word = list(second_word) | |
for char in first_word: | |
if char in second_word: | |
second_word.remove(char) | |
else: | |
return False | |
return not second_word |
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
"""os, for file IO""" | |
import os | |
import re | |
import argparse | |
def files(path): | |
""" Returns a list of filenames from the given directory. | |
https://stackoverflow.com/questions/14176166/list-only-files-in-a-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
# pylint: disable=I1101,E1101 | |
""" | |
os for generic filesystem operations | |
argparse to accept a drive letter | |
time as a basis for creation time | |
pywintypes and win32file for windows file manipulation | |
""" | |
import os | |
import argparse | |
import time |
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 math import * | |
from decimal import Decimal | |
import difflib | |
from difflib import SequenceMatcher | |
def strings_to_vectors(string1,string2): | |
uniqueset = set(string1+string2) | |
string1_vector = [] | |
string2_vector = [] | |
for x in uniqueset: |
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 pythoncom | |
import win32com.client | |
class Contact(): | |
"""Class serves as little more than an enhanced node tree.""" | |
def __init__(self, exchange_user): | |
""" | |
Establish a core COM object to work off of for subsequent properties. | |
Manager and workers are cached, in that they are only gotten once. | |
This reduces external calls if we need to access the name or job title multiple times. |
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 random | |
import time | |
import lox | |
@lox.process(10) | |
def compute_squared_set(squared_set, square_sets_per_thread_proc): | |
import random | |
def compute_square(numbers): | |
"For each row, column, and diagonal check that they all sum to the same number" | |
magic = sum(numbers[:3]) |
OlderNewer