Skip to content

Instantly share code, notes, and snippets.

@WilCF
WilCF / kexp.py
Created August 21, 2023 19:31 — forked from dramamine/kexp.py
KEXP show scraper
import requests
import os
from datetime import datetime, timedelta
destination_path = "shows"
# ids from https://api.kexp.org/v2/shows/
programs = [
3, # expansions
5, # midnight in a perfect world
@WilCF
WilCF / download_as_video.py
Last active March 8, 2023 16:06 — forked from yogeshsinghgit/download_as_video.py
Download YouTube Videos in Mp4 Format using Python Pytube module
# gets highest resolution and prompts user for yt link, otherwise identical to yogeshsinghgit's https://gist.github.com/yogeshsinghgit/14241e51d3d4d67571ef999647fb7c67
from pytube import YouTube
def download_video(yt):
# get highest resolution mp4 stream
stream = yt.streams.get_highest_resolution()
# print resolution and codec format of highest resolution mp4 stream
print(f"Video Resolution : {stream.resolution} VCodec : {stream.codecs[0]}")
[
{
id: 972993,
options:
{
pause_gold_minimum_judgments: "20",
track_clones: true,
low_needed_tasks_reservation_takeover: null,
include_tainted: null,
flag_on_rate_limit: true,
@WilCF
WilCF / disable.txt
Created January 31, 2017 19:28
Disable all golds in a job
curl -H "Content-Type: application/json" -X PUT 'https://api.crowdflower.com/v1/jobs/JOB_ID/gold.json?key=YOUR_API_KEY' -d '{"reset": true}'
@WilCF
WilCF / cml.xml
Created January 31, 2017 19:14
Link Widget (Convert Comma - Delimited URLs into distinct buttons)
<div class="url-list-wrapper-js">
<div class="hidden target_parent_urls-output-js">
{{urls}}
</div>
<div class="link-list-js">
</div>
</div>
739883331
739883332
739883334
739883335
739883338
739883339
739883340
739883341
739883342
739883343
require(['jquery-noconflict'], function(jQuery) {
//Ensure MooTools is where it must be
Window.implement('$', function(el, nc){
return document.id(el, nc, this.document);
});
var $ = window.jQuery;
// a function to randomize cml elements on page
// one caveat: if there are other (non-cml) elements on the page, they will
// always float to the top. keeping non-cml elements between cml elements
/* Well magic */
.well-white {
background-color: white;
}
.well-white p {
margin-bottom: 0px;
}
.center {
<tr>
<th>Postal Code (Zip):</th>
<td>
<span class="street_address_color">
{% if postcode.size == 5 %}
{{postcode}}
{% else %}
{{postcode | prepend:'0'}}
{% endif %}
@WilCF
WilCF / gist:4676af633d4a2510abd0
Created January 21, 2016 01:02
CML Horizontal
/*Horizontal radio button questions for cml:radio in a cml:radios with class "horizontal" */
.radios.horizontal .cml_row {
float: left;
width: 20%;
}
In this case, you only need to set the cml:radios to class="horizontal"