Lecture 1: Introduction to Research — [📝Lecture Notebooks] [
Lecture 2: Introduction to Python — [📝Lecture Notebooks] [
Lecture 3: Introduction to NumPy — [📝Lecture Notebooks] [
Lecture 4: Introduction to pandas — [📝Lecture Notebooks] [
Lecture 5: Plotting Data — [📝Lecture Notebooks] [[
View hackernews-new-comms.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Can be used with https://github.com/xcv58/Custom-JavaScript-for-Websites-2 | |
// This snippet is released under the terms of the CC0 license: https://creativecommons.org/publicdomain/zero/1.0/deed.en | |
const cache_key = 'hn_comments_views' | |
const cache = JSON.parse(localStorage.getItem(cache_key) || '{}') | |
document.querySelectorAll('.athing.comtr').forEach(comm => { | |
if (!cache[comm.id]) { | |
const span = document.createElement('span') | |
span.innerHTML = '🔔' // :bell: emoji |
View tradingViewMultipleWindows.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# First install webview: | |
# pip install pywebview | |
# Then create a config.json file in the same folder with the following options: | |
""" | |
{ | |
"content":[ | |
{ | |
"exchange":"Bitstamp", | |
"ticker":"BTCUSD", |
View list.md
View history.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I was drawn to programming, science, technology and science fiction | |
ever since I was a little kid. I can't say it's because I wanted to | |
make the world a better place. Not really. I was simply drawn to it | |
because I was drawn to it. Writing programs was fun. Figuring out how | |
nature works was fascinating. Science fiction felt like a grand | |
adventure. | |
Then I started a software company and poured every ounce of energy | |
into it. It failed. That hurt, but that part is ok. I made a lot of | |
mistakes and learned from them. This experience made me much, much |
View ANSI.md
ANSI Escape Sequences
Standard escape codes are prefixed with Escape
:
- Ctrl-Key:
^[
- Octal:
\033
- Unicode:
\u001b
- Hexadecimal:
\x1B
- Decimal:
27
View test.md
$ cat t.py
from pprint import pprint
from pytheory import Tone, Fretboard, charts_for_fretboard
tones = (
Tone.from_string("F2"),
Tone.from_string("C3"),
Tone.from_string("G3"),
Tone.from_string("D4"),
View example.com
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
proxy_cache_path /tmp/cacheapi levels=1:2 keys_zone=microcacheapi:100m max_size=1g inactive=1d use_temp_path=off; | |
server { | |
listen 443 ssl http2 default_server; | |
listen [::]:443 ssl http2 default_server; | |
server_name example.com; | |
location /api/ { | |
# Rate Limiting | |
limit_req zone=reqlimit burst=20; # Max burst of request |
View docker-compose.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '2' | |
services: | |
zookeeper: | |
image: "confluentinc/cp-zookeeper:4.1.0" | |
hostname: zookeeper | |
ports: | |
- "2181:2181" | |
environment: | |
ZOOKEEPER_CLIENT_PORT: 2181 |
View Cascade_human_detection.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import cv2 | |
import time | |
person_cascade = cv2.CascadeClassifier( | |
os.path.join('/path/to/haarcascade_fullbody.xml')) | |
cap = cv2.VideoCapture("/path/to/test/video") | |
while True: | |
r, frame = cap.read() | |
if r: | |
start_time = time.time() |
View python_parallel_map_reduce_wordcount.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import concurrent.futures | |
import functools | |
import operator | |
import time | |
from pprint import pprint | |
TEXT = """Lorem ipsum dolor sit amet, consectetuer adipiscing elit. | |
Donec odio. Quisque volutpat mattis eros. Nullam malesuada erat ut turpis. | |
Suspendisse urna nibh, viverra non, semper suscipit, posuere a, pede. | |
Donec nec justo eget felis facilisis fermentum. Aliquam porttitor mauris |
NewerOlder