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
<?php | |
function outputVideoThumbnail($url){ | |
$parsed_url = parse_url($url); | |
// if youtube is detected | |
if($parsed_url['host']=='www.youtube.com') { | |
$query = $parsed_url['query']; | |
$Arr = explode('v=',$query); | |
$videoIDwithString = $Arr[1]; |
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 org.json.*; | |
import java.io.*; | |
public class main { | |
public static JSONObject obj; | |
public static void main(String args[]){ | |
try { | |
obj = new JSONObject( fileToString("src/main/resources/questions.json") ); | |
JSONArray questionsArray = obj.getJSONArray("question"); |
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 java.io.*; | |
import java.util.*; | |
import java.text.*; | |
import java.math.*; | |
import java.util.regex.*; | |
public class Main { | |
static void staircase(String[] votes) { |
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 pafy | |
import os | |
import glob | |
import re | |
from airtable import Airtable | |
from airtable.auth import AirtableAuth | |
import requests | |
from pathlib import Path | |
from webvtt import WebVTT |
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
#!/bin/bash | |
# Directory of the directory you want to scan | |
DIR="ENTER DIRECTORY HERE" | |
TOTALBAMS=0 | |
OLDINDEX=0 | |
UNINDEXED=0 | |
for file in $DIR*.bam; do # Iterate over all bam files in given 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
import os | |
import re | |
from airtable import Airtable | |
from airtable.auth import AirtableAuth | |
import requests | |
import pprint | |
from pathlib import Path | |
APIKEY = "ENTER THIS" | |
BASEURL = "ENTER THIS" |
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 habanero import Crossref | |
from airtable import Airtable | |
from airtable.auth import AirtableAuth | |
import time | |
import pprint | |
import requests | |
import datetime | |
import html.parser | |
apikey = "API KEY" |
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
#!/bin/bash | |
NUM=$(shuf -i 100-300 -n 1) | |
echo $NUM |
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
# run using python pdf_hasher.py <pdf_file_path.pdf> | |
# add -v argument to print the portions of the file which | |
# are excluded in hash calculation. | |
import hashlib | |
import argparse | |
import sys | |
def hash_file_exclude_id(file_path, verbose=False): | |
"""Hashes a file excluding the /ID entry in the PDF trailer and optionally prints excluded parts.""" |