Skip to content

Instantly share code, notes, and snippets.

View kylemcdonald's full-sized avatar

Kyle McDonald kylemcdonald

View GitHub Profile
@kylemcdonald
kylemcdonald / parler-video.md
Last active July 10, 2022 04:22
How to view a video on Parler.

How to view a video on Parler

Let's say you have a video ID, like wfy02V209EwU taken from this map

The link for the video kiBnNejo0JW0 is at https://video.parler.com/ki/Bn/kiBnNejo0JW0. Notice that the link is: https://video.parler.com/ followed by the first two characters of the video ID, then /, then the next two characters, another /, and the video ID.

But if you click on this, you will get an error.

This is because the Parler video servers are still running (as of January 12) but the Domain Name System (DNS) is not running.

@kylemcdonald
kylemcdonald / Collect Parler Metadata.ipynb
Last active September 20, 2023 11:45
Collect video URLs and GPS data for Parler videos.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@kylemcdonald
kylemcdonald / Keras Multitask Learning.ipynb
Created September 4, 2020 19:56
Multitask Learning in Keras with an augmented Fashion MNIST.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@kylemcdonald
kylemcdonald / search-dates.py
Last active September 8, 2020 07:28
Search for dates and times across all files in a folder.
"""
Search for dates and times in a folder.
$ python3 search-dates.py facebook-kcimc/
$ python3 search-dates.py Takeout/
"""
import os
import sys
import re
import shutil
@kylemcdonald
kylemcdonald / index.html
Last active January 25, 2023 21:33
Minimal example of uploading a webcam image to a Flask server.
<html>
<head>
<title>Webcam Upload</title>
<style>
html, body {
height: 100%;
}
* {
font-family: sans-serif;
user-select: none;
@kylemcdonald
kylemcdonald / capture_fast.cpp
Last active May 21, 2020 18:26
Try to capture from arducam on RPI as fast as possible.
#include "arducam_mipicamera.h"
#include <linux/v4l2-controls.h>
#include <stdio.h>
#include <sys/time.h>
void capture_image(CAMERA_INSTANCE camera_instance) {
IMAGE_FORMAT fmt = {IMAGE_ENCODING_RAW_BAYER, 0};
BUFFER *buffer = arducam_capture(camera_instance, &fmt, 6000);
arducam_release_buffer(buffer);
}
@kylemcdonald
kylemcdonald / two-chords.md
Created May 4, 2020 22:53
Two-chord mystery

At 0:37 into this track generated by a machine learning algorithm, there are two high-pitched bell-like very jazzy chords that arpeggiate from the higher to the lower notes.

The rest of the track is Cm, and my best guess for these chords is:

  1. Db Eb F Ab Bb (Db69)
  2. Eb F G Bb (Ebadd9)
@kylemcdonald
kylemcdonald / ripple.ipynb
Last active March 2, 2020 19:04
Ripple tank simulations in PyTorch based on https://github.com/jsbarbosa/rippleTank
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@kylemcdonald
kylemcdonald / youtube-batch-search.py
Created January 18, 2020 02:13
Search YouTube for results using a newline separated list of queries.
import json
import googleapiclient.discovery
query_fn = 'queries.txt'
api_key = '' # insert API key here
# https://developers.google.com/youtube/v3/docs/search/list
params = {
'videoDuration': 'short', # any long medium short
'videoDefinition': 'any', # high standard
'order': 'viewCount', # date rating relevance title viewCount
### Keybase proof
I hereby claim:
* I am kylemcdonald on github.
* I am kylemcdonald (https://keybase.io/kylemcdonald) on keybase.
* I have a public key whose fingerprint is AAD2 D2E7 28AF 5533 86B6 3209 8F40 5F0E D0DE 80FF
To claim this, I am signing this object: