Skip to content

Instantly share code, notes, and snippets.

View pingiun's full-sized avatar

Jelle Besseling pingiun

View GitHub Profile
@pingiun
pingiun / geturls.py
Created May 9, 2014 21:12
This is a simple python program that allows you to input a list of video names and automatically search all those videos on YouTube and get the YouTube urls
#!/usr/bin/env python
# geturls.py by Jelle Besseling
# This file is licenced under the MIT Licence (MIT)
# The MIT License (MIT)
# Copyright (c) 2014 Jelle Besseling
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
Promise = require('bluebird')
Promise.longStackTraces();
fs = require('fs')
Promise.promisifyAll(fs);
youtube = require('./youtube')
ffmpeg = require('fluent-ffmpeg')
ffmetadata = require('ffmetadata')
Promise.promisifyAll(ffmetadata)
mb = require('musicbrainz')
Promise.promisifyAll(mb)
@pingiun
pingiun / p001.rs
Created August 7, 2015 19:24
Problem 1 of the Euler project
//! Problem 1 of the Euler project
fn main() {
println!("{}", (1..1000).filter(|x| (x % 3 == 0 || x % 5 == 0)).fold(0, |a,b| a+b));
}
@pingiun
pingiun / p002.rs
Created August 7, 2015 20:10
Problem 2 of the Euler project
struct Fibonacci {
cur: i32,
prev: i32,
}
//! Problem 2 of the Euler project
impl Iterator for Fibonacci {
type Item = i32;
@pingiun
pingiun / httperrorserver.py
Last active August 7, 2016 11:37
A simple http server that returns the requested error
#!/bin/env python
from __future__ import print_function
import argparse
import sys
try:
import BaseHTTPServer
#!/usr/bin/env python
import os
import markdown2
with open('head.html') as f:
head = f.read()
with open('foot.html') as f:
foot = f.read()

Keybase proof

I hereby claim:

  • I am pingiun on github.
  • I am pingiun (https://keybase.io/pingiun) on keybase.
  • I have a public key whose fingerprint is A3A3 65AE 16ED A7A0 C29C 88F1 9712 452E 8BE3 372E

To claim this, I am signing this object:

@pingiun
pingiun / openpgp.txt
Created September 9, 2016 08:59
OpenKeychain Linked Identity
This Gist confirms the Linked Identity in my OpenPGP key, and links it to this GitHub account.
Token for proof:
[Verifying my OpenPGP key: openpgp4fpr:a3a365ae16eda7a0c29c88f19712452e8be3372e]
from telegram.ext import Updater, CommandHandler, MessageHandler
from sqlalchemy import Column, BigInteger
from sqlalchemy import create_engine
from sqlalchemy.orm import scoped_session, sessionmaker
from sqlalchemy.ext.declarative import declarative_base
from sqlite3 import IntegrityError
import logging
import random
extern crate tokio;
extern crate dhcp_proto;
use std::io;
use tokio::codec::{Decoder, Encoder};
use bytes::{BytesMut};
use dhcp_proto::{DHCPMessage, nom, parse_dhcp};
use dhcp_proto::builder::DHCPMessageBuilder;