This file contains hidden or 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
require 'csv' | |
require 'watir' | |
raise "Need a TSV with grades!" if ARGV.empty? | |
puts "Navigate to your Grade Book to continue ..."; | |
browser = Watir::Browser.new :chrome, :switches => %w[--log-level=3 --test-type] | |
browser.goto 'https://apps.westpoint.edu/ams/main.cfm' | |
browser.wait_until(timeout: 3600) { browser.title[/Grade Book/] } |
This file contains hidden or 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 pandas as pd | |
from urllib.parse import urlparse | |
df = pd.read_csv("onions.txt", names=["domain"]) | |
df[df["domain"].apply(lambda x: urlparse("http://"+x).netloc).duplicated(keep=False) == True] |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or 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
# Prep pictures for display on a VIEWline widescreen digital picture frame | |
# - The file types Google Photo dumped out: heic, mov, jpg, mp4 | |
# - To check that you don't have any others: | |
# > Dir.entries('.').reject{|f| f.start_with? '.'}.map(&:downcase).map{|f| File.extname f}.uniq | |
# - Recommend doing orientation adjustments before exporting | |
require 'mini_magick' | |
require 'securerandom' | |
files = Dir.entries('.').select do |file| |
This file contains hidden or 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
# a few flags will make this run a skosh faster: | |
# jruby -0 -J-Xmn512m -J-Xms2048m -J-Xmx2048m -J-server onion_search.rb | |
# For details on reading WARC records: | |
# https://iipc.github.io/warc-specifications/specifications/warc-format/warc-1.0/#file-and-record-model | |
require 'csv' | |
require 'fileutils' | |
# using java for two reasons: Java has native threads | |
# and Java's gzip reader supports concatenated zips |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or 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
# -*- coding: utf-8 -*- | |
# style_transfer.py <content> <style> | |
# CUDA_VISIBLE_DEVICES=3 python style_transfer.py walk.jpg kandinsky.jpg | |
import sys | |
content_path = sys.argv[1] | |
style_path = sys.argv[2] | |
max_dim = 1024 | |
total_variation_weight=30 |
This file contains hidden or 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
// A script that runs a raspberry pi to receive commands from an echo | |
// and control a garage door opener wired to the GPIO | |
// To set up the Echo, follow this guide: | |
// https://read.acloud.guru/how-to-build-your-own-alexa-voice-activated-iot-smart-lamp-for-less-than-35-9820ccd07516 | |
// To compile this script, use the Makefile in the subscribe_publish_sample of the AWS IoT Device SDK. You'll | |
// need to link in the wiringPi library. | |
// If you are having policy issues, you can create a super-permissive policy that will let your device do anything: |
This file contains hidden or 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
const axios = require('axios') | |
const TuyAPI = require('tuyapi'); | |
var connected = false; | |
var washerWasOn = false; | |
// follow these instructions to get the key and id for your plug: | |
// https://github.com/AMoo-Miki/homebridge-tuya-lan/wiki/Setup-Instructions | |
const washer = new TuyAPI({ | |
id: 'YOUR ID', |