- The AI Hierarchy of Needs
- The Rise of Data Engineer
- The Downfall of the Data Engineer
- A Beginner’s Guide to Data Engineering
- Part III
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
#!/bin/sh | |
# assumptions: | |
# * virtualenv is avaliable and working | |
# * virtualenvs go to ~/.pvm | |
export PIP_REQUIRE_VIRTUALENV=true | |
export PIP_RESPECT_VIRTUALENV=true | |
export VIRTUALENV_DISTRIBUTE=true | |
cd ~; mkdir -p ~/.pvm/core | |
virtualenv --python=/usr/bin/python --clear --no-site-packages --distribute ~/.pvm/core |
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
// Original code: | |
// https://github.com/rodolfoghi/learn-rust/tree/master/raspberrypi-projects/password_generator | |
// | |
use rand::Rng; | |
use std::io; | |
fn main() { | |
let chars = "abcdefghijklmnopqrstuvxz1234567890!@#$%&*()-+=?;:.><.\\|{}[]"; | |
println!("Password Generator"); |
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
(defn square [x] (* x x)) | |
(println (take 25 (map square (range)))) |
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 unicodedata | |
def asciify(string, encoding='latin-1'): | |
"""Given an string with bytes coming from a DB or other ill-developed data | |
extraction, cleanup and return an ASCII string free of accentuations. | |
>>> asciify('Ba\xc3\xba') | |
'Bau' | |
>>> asciify('Bau') | |
'Bau' |
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
#!/bin/bash | |
# Font: http://scott.sherrillmix.com/blog/programmer/syntax-highlighting-in-terminal/ | |
if [ ! -t 0 ]; then | |
file=/dev/stdin | |
elif [ -f $1 ]; then | |
file=$1 | |
else | |
echo "Usage: $0 code.c" | |
echo "or e.g. head code.c|$0" | |
exit 1 |
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
// Pro Football Reference | Current NFL Injuries | |
// https://www.pro-football-reference.com/players/injuries.htm | |
var elements = document.getElementById("div_injuries"); | |
var injuries = elements.querySelectorAll("td[data-stat='injury_class']"); | |
var seasonEnding = Array.prototype.slice.call(classes).filter(el => el.textContent == "I-R"); | |
console.log(injuries.length); | |
console.log(seasonEnding.length); |
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
#!/bin/sh | |
# | |
# usage: | |
# $ sh get_the_logs.sh [rds-instance-name] | |
# | |
function __describe_logs { | |
aws rds describe-db-log-files --db-instance-identifier $1 | |
} |
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
-- MarI/O by SethBling | |
-- Feel free to use this code, but please do not redistribute it. | |
-- Intended for use with the BizHawk emulator and Super Mario World or Super Mario Bros. ROM. | |
-- For SMW, make sure you have a save state named "DP1.state" at the beginning of a level, | |
-- and put a copy in both the Lua folder and the root directory of BizHawk. | |
if gameinfo.getromname() == "Super Mario World (USA)" then | |
Filename = "DP1.state" | |
ButtonNames = { | |
"A", |
NewerOlder