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 | |
import csv | |
# Import os | |
import os | |
# Main Function | |
def main(): | |
# Open dataset file | |
dataset = open('dataset.csv', newline='') |
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 hashlib as hasher | |
import datetime as date | |
# Define what a Snakecoin block is | |
class Block: | |
def __init__(self, index, timestamp, data, previous_hash): | |
self.index = index | |
self.timestamp = timestamp | |
self.data = data | |
self.previous_hash = previous_hash |
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 | |
import json | |
uname = input("Username or channel ID\n") | |
APIkey = "" | |
if("U" == uname[0]): | |
channelID = uname | |
else: | |
IDlookup = requests.get("https://www.googleapis.com/youtube/v3/channels?key=" + APIkey + "&forUsername=" + uname + "&part=id&type=video") | |
IDClean = IDlookup.json() | |
channelID = IDClean['items'][0]['id'] |
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
# Script for quickly converting DICOM images to ordered JPG images for machine learning. | |
import os | |
for fileName in os.listdir("."): | |
noe = os.path.splitext(fileName)[0] | |
if(noe == "convert"): | |
continue | |
os.system("convert " + fileName + " " + noe + ".jpg") | |
os.remove(noe+".dcm") | |
for fileName1 in os.listdir("."): |