Skip to content

Instantly share code, notes, and snippets.

@vitan
vitan / load_csv_dict
Created January 20, 2015 08:01
How to load .csv as dict in Python, skipping initial space and quotechar
#!/usr/bin/env python
"""
Given file example.csv, with the following contents:
key1: 'I am value1'
key2: 'I am value2'
"""
import csv
#!/usr/bin/env python
# Added by Chaobin Tang <cbtchn@gmail.com>
'''
This module shows two very simple implicities
of Python
'''
import doctest
@geoffb
geoffb / simple_websocket_client.html
Created October 7, 2010 23:37
Super simple websockets client/server using Python. Compatible with the draft 76 challenge/response.
<!DOCTYPE html>
<html lang="en">
<head>
<title>WebSocket Client</title>
<style>
#output {
border: solid 1px #000;
}
</style>
</head>