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
#!/usr/bin/python3 | |
from PIL import Image | |
# Replace pixels of an input color in the image with a new color | |
fname = input('Enter image name: ') | |
oldc = input('Enter color (R, G, B) to be replaced: ') | |
newc = input('Enter color (R, G, B) for replacement: ') | |
if len(fname) < 1: fname = 'identicon.png' | |
if len(oldc) < 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
#!/usr/bin/python3 | |
from urllib.request import urlopen | |
import ssl | |
import re, os, sys | |
# ignore ssl certificate errors | |
ctx = ssl.create_default_context() | |
ctx.check_hostname = False | |
ctx.verify_mode = ssl.CERT_NONE |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title></title> | |
<!-- Just a dummy html to redirect to my subdirectory --> | |
<meta http-equiv="refresh" content="0; url=[INSERT URL HERE]"> | |
</head> | |
<body> | |
</body> |
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 IPython.display import Audio | |
import numpy as np | |
from numpy.fft import fft, ifft | |
from scipy.fftpack import dct, idct | |
from scipy.signal import stft | |
import soundfile as sf |
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
{ | |
"embeddings": [ | |
{ | |
"tensorName": "Acoustic Word Embeddings", | |
"tensorShape": [ | |
200, 1024 | |
], | |
"tensorPath": "https://gist.githubusercontent.com/RuolinZheng08/ce93900f4876b63f598becfdc696f190/raw/40af822d8db5ebe6ae2aa056cbfd7153b3d19ede/test-embs-vecs.tsv", | |
"metadataPath": "https://gist.githubusercontent.com/RuolinZheng08/ce93900f4876b63f598becfdc696f190/raw/40af822d8db5ebe6ae2aa056cbfd7153b3d19ede/test-embs-meta.tsv" | |
} |
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
<!DOCTYPE html> | |
<html lang="en" > | |
<head> | |
<meta charset="UTF-8"> | |
<title>2019 Grace Hopper Company Look-Up</title> | |
<link rel='stylesheet' href='https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.1.3/css/bootstrap.min.css'> | |
<link rel='stylesheet' href='https://cdn.datatables.net/1.10.19/css/jquery.dataTables.min.css'> | |
</head> | |
<body> |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
init python: | |
class DynamicBlink(renpy.display.layout.DynamicDisplayable): | |
""" | |
A dynamic image that blinks every now and then | |
""" | |
def __init__(self, *args, **kwargs): | |
self.current_image = args[1] | |
self.blink_st = -1.0 # arbitrary number to force normal start |
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
# Iterative | |
def dfs(graph, start): | |
visited, stack = set(), [start] | |
while stack: | |
node = stack.pop() | |
visited.add(node) | |
for neighbor in graph[node]: | |
if not neighbor in visited: | |
stack.append(neighbor) | |
return visited |
OlderNewer