View random.sh
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 |
View articles.py
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" |
View googlebooks_to_airtable.py
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" |
View bam_index.sh
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 |
View main.py
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 |
View frequency.java
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) { |
View main.java
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"); |
View videoThumbnail.php
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]; |