Skip to content

Instantly share code, notes, and snippets.

View riginding's full-sized avatar
🎯
Focusing

Ryan Riginding riginding

🎯
Focusing
View GitHub Profile
Nikola (RaumName)
17:00;19:50;Terminname;marc@sclable.com,hakan@sclable.com
20:00;20:15;Sclable Primetime;marc@sclable.com,hakan@sclable.com
20:16;20:17;Sclable Primetime;marc@sclable.com,hakan@sclable.com
20:18;20:19;Sclable Primetime;marc@sclable.com,hakan@sclable.com
END
BEGIN:VCALENDAR
PRODID:-//Google Inc//Google Calendar 70.9054//EN
VERSION:2.0
CALSCALE:GREGORIAN
METHOD:PUBLISH
X-WR-CALNAME:Sclable HQ-2-2.4-Nikola (4)
X-WR-TIMEZONE:Europe/Vienna
BEGIN:VTIMEZONE
TZID:Europe/Vienna
X-LIC-LOCATION:Europe/Vienna
@riginding
riginding / set_capacity
Created August 24, 2019 11:20
vecs have set capacity
use std::io::{self, Read, Write, BufWriter};
use std::collections::HashMap;
fn main() {
let mut buffer = Vec::<u8>::new();
io::stdin().read_to_end(&mut buffer).ok();
let mut words: HashMap<&[u8], usize> = HashMap::new();
for word in buffer.split(is_whitespace).filter(is_not_empty) {
if let Some(count) = words.get_mut(word) {
@riginding
riginding / wordcount.rs
Created August 21, 2019 20:26
bytearray solution
use std::io::{self, Read, Write, BufWriter};
use std::collections::HashMap;
fn main() {
let mut buffer = Vec::<u8>::new();
io::stdin().read_to_end(&mut buffer).ok();
let mut words: HashMap<&[u8], usize> = HashMap::new();
for word in buffer.split(is_whitespace).filter(is_not_empty) {
if let Some(count) = words.get_mut(word) {
@riginding
riginding / wordcount.rs
Created August 21, 2019 20:19
seperated singletons
use std::io::{self, Read, Write, BufWriter};
use std::collections::HashMap;
fn main() {
let mut buffer = String::new();
io::stdin().read_to_string(&mut buffer).ok();
let mut words: HashMap<&str, usize> = HashMap::new();
for word in buffer.split(is_whitespace).filter(is_not_empty) {
if let Some(count) = words.get_mut(word) {
@riginding
riginding / wordcount.rs
Last active August 21, 2019 20:06
baseline version with comments
use std::io::{self, Read, Write, BufWriter}; // Bring some IO stuff into scope
use std::collections::HashMap; // Bring Hashmap into scope
fn main() { // special entry function
let mut buffer = String::new(); // Initialize a string
io::stdin().read_to_string(&mut buffer).ok(); // fill string with input from stdin
let mut words: HashMap<&str, usize> = HashMap::new(); // initialize HashMap
for word in buffer.split(is_whitespace).filter(is_not_empty) {
if let Some(count) = words.get_mut(word) {
@riginding
riginding / nyanbuster.py
Created October 10, 2018 18:55
bust nyans
import sys
import os
import time
import face_recognition
import argparse
import pickle
import cv2
fail_count = 0
locked = False
set colorcolumn=80
set expandtab
set shiftwidth=2
set softtabstop=2
Class AsciiImage {
public boolean addLine(String line){
boolean check = true;
if (this.length != 0) {
if (this.length != line.length) {
check = false;
} else {
addLineReal(line);