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
import matplotlib.pyplot as plt | |
import numpy as np | |
import warnings | |
import os | |
from collections import namedtuple | |
from numpy.fft import fft, ifft | |
from scipy.io import wavfile | |
from scipy.ndimage import gaussian_filter | |
warnings.filterwarnings('ignore') |
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
/** | |
* Object Recognition from Webcam | |
* | |
* by Daniel Kyu Hwa Kohlsdorf | |
* mailto: dkohlsdorf@gmail.com | |
*/ | |
'use strict'; | |
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 numpy as np | |
import matplotlib.pyplot as plt | |
import tensorflow as tf | |
import tensorflow.keras.layers as layers | |
import tensorflow.keras.losses as loss | |
import tensorflow_datasets.public_api as tfds | |
from sys import argv | |
from random import Random | |
from os import walk |
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
''' | |
Align videos using Dynamic Time Warping | |
Given a set of video files with associated time stamp files, | |
the program creates a new set of aligned videos. | |
Copyright (c) <year> <copyright holders> | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal | |
in the Software without restriction, including without limitation the rights |
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
extern crate avro_rs; | |
use avro_rs::*; | |
use std::io::prelude::*; | |
use std::net::TcpListener; | |
use std::net::TcpStream; | |
use std::thread; | |
#[derive(Debug, Deserialize, Serialize)] | |
pub struct Test { |
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 lxml import html | |
import requests | |
import urllib.request | |
import re | |
import time | |
import os.path | |
HANDLE = '^/handle/[0-9]+/[0-9]+$' | |
BASE_URL = 'https://tspace.library.utoronto.ca' | |
page = requests.get(BASE_URL + '/handle/1807/24487') |
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 numpy as np | |
import scipy.stats as stats | |
def generate_split(n_char, mu = 0.0, std = 1.0): | |
return stats.norm.ppf(np.arange(1, n_char) / n_char, mu, std) | |
def convert(x, splits, cardinality): | |
n = len(x) | |
chars = np.zeros(n, dtype=np.int) | |
for i in range(0, n): |
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
public class UnionFind { | |
private int id[]; | |
private int count; | |
public UnionFind(int N) { | |
count = N; | |
id = new int[N]; | |
for(int i = 0; i < N; i++) { |