Skip to content

Instantly share code, notes, and snippets.

View dannguyen's full-sized avatar
💭
havin a normal one

Dan Nguyen dannguyen

💭
havin a normal one
View GitHub Profile
@dannguyen
dannguyen / temper.rb
Created February 13, 2012 22:16 — forked from ashaw/temper.rb
# server
require 'rubygems'
require 'sinatra'
get '/temp' do
content_type :json
temp = `./temper`
bits = temp.split(' ')
"{ \"time\" : #{bits[0]}, \"fahrenheit\" : #{bits[2].gsub(/F/,'')}, \"celsius\" : #{bits[3].gsub(/C/,'')} }"
@dannguyen
dannguyen / escher.py
Created December 14, 2012 01:20 — forked from lecram/escher.py
Just typo fixing
#! /usr/bin/env python
"""{escher} -- one-file key-value storage.
What?
This is a toy application to manage persistent key-value string data.
The file {escher} is *both* the application and its data.
When you run any of the commands below, the file will be executed and,
after data change, it will rewrite itself with updated data.
You can copy the file with whatever name to create multiple datasets.
@dannguyen
dannguyen / The Technical Interview Cheat Sheet.md
Last active November 23, 2015 19:13 — forked from tsiege/The Technical Interview Cheat Sheet.md
This is my technical interview cheat sheet. Feel free to fork it or do whatever you want with it. PLEASE let me know if there are any errors or if anything crucial is missing. I will add more links soon.

Studying for a Tech Interview Sucks, so Here's a Cheat Sheet to Help

This list is meant to be a both a quick guide and reference for further research into these topics. It's basically a summary of that comp sci course you never took or forgot about, so there's no way it can cover everything in depth. It also will be available as a gist on Github for everyone to edit and add to.

Data Structure Basics

###Array ####Definition:

  • Stores data elements based on an sequential, most commonly 0 based, index.
  • Based on tuples from set theory.
@dannguyen
dannguyen / README.md
Created April 6, 2016 05:17 — forked from nikcub/README.md
Facebook PHP Source Code from August 2007
@dannguyen
dannguyen / 0_reuse_code.js
Created April 7, 2016 00:02
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@dannguyen
dannguyen / quotes.json
Last active January 24, 2018 19:44 — forked from signed0/quotes.json
Forked from here: https://gist.github.com/signed0/d70780518341e1396e11 -- I changed quotes.json to be proper JSON
{
"status": "ok",
"results": [
[
"Life isn’t about getting and having, it’s about giving and being.",
"Kevin Kruse"
],
[
"Whatever the mind of man can conceive and believe, it can achieve.",
"Napoleon Hill"
import matplotlib.pyplot as plt
from PyQt5 import QtCore
import numpy as np
import time
import math
class VisualiseFrequency(QtCore.QThread):
def __init__(self, song, canvas, player):