Skip to content

Instantly share code, notes, and snippets.

View duskvirkus's full-sized avatar

Dusk duskvirkus

View GitHub Profile
absl-py
alabaster
albumentations
altair
appdirs
argon2-cffi
arviz
astor
astropy
astunparse

Coding Train Website Redesign

Community Contributions

I think there are some tradeoffs for database vs plain text storage of community contributions. If we go with plain text like it is now people get to learn how to make pull requests on github but with a database it would be simple to make a form that makes it more accessible to the community as a whole.

The database model would require a moderation panel that is password protected adding to the scope of the project.

Rating Level of Difficult for Coding Challenges and other videos

@duskvirkus
duskvirkus / ct-description-backup.sh
Created February 14, 2021 08:55
A basic script to backup descriptions from The Coding Train.
#!/bin/bash
TIME=$(date +'%m-%d-%Y-%H:%M:%S')
DIRNAME=codingtrain-yt-description-backup-$TIME
mkdir $DIRNAME
cd $DIRNAME
youtube-dl --skip-download --write-description https://www.youtube.com/channel/UCvjgXvBlbQiydffZU7m1_aw
@duskvirkus
duskvirkus / guess.go
Created April 22, 2020 15:53
Guessing With Go. A simple guessing game made in golang.
// Guessing With Go
// Violet Graham
// Based on guessing game created by Jack Mott (https://github.com/jackmott).
// In Games with go episode 2 (https://youtu.be/R9LPV44RLv4)
package main
import (
"bufio"
// Shadows of the Knight - Episode 1 Solution
// Violet Graham
// https://www.codingame.com/training/medium/shadows-of-the-knight-episode-1
#include <iostream>
#include <string>
using std::cin;
using std::cout;
using std::string;
// main.cpp
#include "ofMain.h"
#include "ofApp.h"
//========================================================================
int main( ){
ofGLWindowSettings settings;
settings.setGLVersion(4, 5);
settings.setSize(1024, 768);

Suggestion Box API

Permissions

There are 3 levels are accesss to the endpoints.

  • Read: Can request any data that's read only. No key is needed.
  • Personal: Can write, modify, and delete objects assoicated with a user. OAuth key required.
  • Moderator: Full permissions. OAuth key required.
import bpy
import math
import re
from collections import namedtuple
def lookat(location, camera):
xIn = camera.location.x - location.x
yIn = camera.location.y - location.y
zIn = camera.location.z - location.z
int order = 10;
int N = int(pow(2, order));
int total = N * N;
PVector[] path = new PVector[total];
PImage img;
void setup() {
size(1024, 1024);
@duskvirkus
duskvirkus / heart.js
Created February 4, 2020 06:38
p5js heart sketch
function setup() {
createCanvas(1000, 1000);
noStroke();
fill(0);
translate(width / 2, 2 * height / 5);
let numPoints = 100;
beginShape();