This file contains hidden or 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
# coding: utf-8 | |
# In[1]: | |
# thanks to commandlineluser for this bit of code and the reasoning behind it | |
# https://www.reddit.com/user/commandlineluser | |
import requests | |
from lxml import html |
This file contains hidden or 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 | |
import random | |
enemyPokemon = ["Oddish","Caterpie","Pidgey"] | |
choosenPokemon = random.choice(enemyPokemon) | |
print ("A wild " + choosenPokemon + " appeared!") | |
time.sleep(2) | |
print ("Go Charmander!") | |
time.sleep(2) |
This file contains hidden or 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 numpy as np | |
import matplotlib.pyplot as plt | |
import math | |
n=1 | |
x = np.arange(1,51) #creates all the x's | |
y = np.array([]) #creates an empty array for y's | |
for step in x: #loops through x | |
a = abs(np.sin(n)) #gets the sin and gets rid of negatives |
This file contains hidden or 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 numpy as np | |
from math import * | |
import scipy.stats as stat | |
def stemleafpairs(data, Round=True, stempos= 0, leafwidth=1): | |
""" | |
X - data array | |
stempos - position of last digit of stem, | |
from decimal point. |
This file contains hidden or 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 glob | |
import os.path | |
import time | |
files = glob.glob('/directory/your/want/*') #make sure you change this, I test it with just '*' | |
test = glob.glob('*') | |
for i in test: | |
modified = time.ctime(os.path.getmtime(i)) | |
print('Filename: {0} \nFile Last Modified: {1}' .format(i,modified)) |