Project moved to https://github.com/ivanistheone/ccss_bookmarklet
About
Demonstrates use of event capture phase (as opposed to bubble phase, used by jQuery's bind) to prevent default trello click events if ALT key is depressed.
<!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> | |
#!/usr/bin/env python | |
from collections import defaultdict, namedtuple | |
import datetime | |
from operator import itemgetter | |
import re | |
import requests | |
import json |
Project moved to https://github.com/ivanistheone/ccss_bookmarklet
Demonstrates use of event capture phase (as opposed to bubble phase, used by jQuery's bind) to prevent default trello click events if ALT key is depressed.
// 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; |
Write a program that runs a server that is accessible on http://localhost:4000/. When your server receives a request on http://localhost:4000/set?somekey=somevalue it should store the passed key and value in memory. When it receives a request on http://localhost:4000/get?key=somekey it should return the value stored at somekey. During your interview, you will pair on saving the data to a file.
#!/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: |
I hereby claim:
To claim this, I am signing this object:
Part of what makes python readable is the absence of type information, the indentation-based block structure for code, and a few Python idioms, also known as "syntax sugar" if you will.
This tutorial assumes the reader is familiar with other programming languages like Java and shows some examples of Python coolness.
Original https://gist.github.com/GGulati/1ebaeaaa7f7408647fef via https://ggulati.wordpress.com/2016/02/24/coding-jarvis-in-python-3-in-2016/ via https://news.ycombinator.com/item?id=11172727
I did some modifications to try to get it to work on Mac OS.