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 __future__ import print_function | |
import os | |
import subprocess | |
root = "." | |
try: | |
os.mkdir('compressed') | |
except FileExistsError: | |
pass |
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
""" | |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
Simple Hyperbolic tiling animation using taichi | |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
""" | |
import taichi as ti | |
ti.init(arch=ti.cpu) | |
# ---------------------------------------------- | |
# global settings |
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 sys | |
from requests import get | |
from bs4 import BeautifulSoup | |
# Put in your class details. It scans TRU bookstore to get ISBN | |
# It uses the ISBN to search Libgen to get MD5 | |
# It then downloads from Libgen using the MD5 | |
def make_request(url): | |
headers = { | |
'Host': 'thebookstore.tru.ca', | |
'Connection': 'keep-alive', |
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 pandas as pd | |
import numpy as np | |
import datetime as dt | |
import math | |
import warnings | |
warnings.filterwarnings("ignore") | |
prices = pd.read_csv("adjclose.csv", index_col="Date", parse_dates=True) | |
volumechanges = pd.read_csv("volume.csv", index_col="Date", parse_dates=True).pct_change()*100 |
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
#-*- coding:utf-8 - *- | |
def load_dataset(): | |
"Load the sample dataset." | |
return [[1, 3, 4], [2, 3, 5], [1, 2, 3, 5], [2, 5]] | |
def createC1(dataset): | |
"Create a list of candidate item sets of size one." |
NewerOlder