Skip to content

Instantly share code, notes, and snippets.

View javathunderman's full-sized avatar
💻
I solve CAPTCHAs, therefore I am.

Arjun Vedantham javathunderman

💻
I solve CAPTCHAs, therefore I am.
View GitHub Profile
@javathunderman
javathunderman / mastodon2shiori.py
Last active December 28, 2024 21:10
Mastodon to Shiori Bookmarks
import json
from bs4 import BeautifulSoup
import requests
page = 1
existing_bookmarks_total = []
template_shiori = {"url": "", "title": "", "excerpt": "", "public": 0, "tags": [{"name": "mastodon"}], "create_archive": False, "create_ebook": False}
mastodon_login = {"Authorization" : "Bearer "} # fill in with the app token from Mastodon's dev interface
shiori_base = ""
mastodon_base = ""
shiori_login = {
@javathunderman
javathunderman / convert.py
Created March 10, 2019 14:55
Script for quickly converting DICOM images to ordered JPG images for machine learning.
# 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("."):
@javathunderman
javathunderman / least_popular.py
Created August 28, 2018 21:46
Gets the least popular YT video(s) of any channel
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
@javathunderman
javathunderman / move.py
Created March 5, 2017 01:57
Moves files around based off of a CSV file
# Import csv
import csv
# Import os
import os
# Main Function
def main():
# Open dataset file
dataset = open('dataset.csv', newline='')