Skip to content

Instantly share code, notes, and snippets.

Avatar

Ivan Savov ivanistheone

View GitHub Profile
@ivanistheone
ivanistheone / README.md
Last active Mar 29, 2017 — forked from GGulati/Jarvis.py
Code that goes with blog post https://ggulati.wordpress.com/2016/02/24/coding-jarvis-in-python-3-in-2016/ —with modifications for Mac OS X.
View keybase.md

Keybase proof

I hereby claim:

  • I am ivanistheone on github.
  • I am ivansavov (https://keybase.io/ivansavov) on keybase.
  • I have a public key whose fingerprint is 8CBB AA5B CDA6 A50D 4B2E F9BD 2A72 2D82 C0D3 4F08

To claim this, I am signing this object:

View dbserver.py
#!/usr/bin/env python
"""
Simple DB server (key value store) that works over HTTP on localhost.
- GET /set?<key>=<value> Sets <key> to <value>
- GET /get?key=<key> Gets the value for key <key>
Usage:
dbserver.py [--port=<int>]
Options:
View README.md
View sample_sympy.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ivanistheone
ivanistheone / .cleanup.sh
Last active Nov 10, 2017
A shell script I use to (mostly) automatically cleanup my ~/Desktop
View .cleanup.sh
#!/bin/bash
MYHOME=$HOME
MYDESKTOP=$HOME/Desktop
echo " _ "
echo " | | "
echo " ___ | | ___ __ _ _ __ _ _ _ __ "
echo " / __|| |/ _ \/ _ | '_ \| | | | '_ \ "
echo " | (__ | | __/ (_| | | | | |_| | |_) |"
echo " \___||_|\___|\__,_|_| |_|\__,_| .__/ "
@ivanistheone
ivanistheone / canvas_game.html
Created Mar 10, 2014
A super-simple demo of a block moving on canvas... for educational purposes
View canvas_game.html
<!DOCTYPE html>
<html>
<head>
<title>Canvas demo</title>
<meta name="author" content="Gabriel Poirier" />
<meta name="author" content="Ivan Savov" />
<meta name="description" content="A tutorial on the use of HTML canvas element." />
</head>
@ivanistheone
ivanistheone / heart_beat_diagram.js
Created Jul 22, 2013
I would like to make a ECG-like hear-beat diagram, but the default x-sampling rate shows a gap in the graph. Paste this into http://graphie-to-png.khanacademy.org/ to see the results. Any suggestions are welcome.
View heart_beat_diagram.js
// X and Y ranges of the graph
var X_RANGE = [-2, 10];
var Y_RANGE = [-35, 100];
// Width of the graph in pixels
// Let's use 400 for "normal" graphs and 170 for "small" graphs
var SIZE = 400;
var xScale;
var yScale;
View _trello-alt-click.bookmarklet.md
@ivanistheone
ivanistheone / gist:4249678
Created Dec 10, 2012
Semi-finished version of visitor script
View gist:4249678
#!/usr/bin/env python
from collections import defaultdict, namedtuple
import datetime
from operator import itemgetter
import re
import requests
import json