- 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
// 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
// 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
# download dos shapefiles do IBGE | |
curl -s 'ftp://geoftp.ibge.gov.br/organizacao_do_territorio/malhas_territoriais/malhas_municipais/municipio_2016/Brasil/BR/BR.zip' -o BR.zip | |
# abrir o pacote | |
unzip -j BR.zip | |
# instala o postgresql e o postgis | |
brew install postgis | |
# inicia o postgresql |
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
# Enter your code here. Read input from STDIN. Print output to STDOUT | |
require 'prime' | |
def ppn(n) | |
Prime.each(Float::INFINITY).lazy.select do |p| | |
p if p.to_s == p.to_s.reverse | |
end.first(n.to_i) | |
end |
FWIW: I didn't produce the content present here. I've just copy-pasted it from somewhere over the Internet, but I cannot remember exactly the original source. I was also not able to find the author's name, so I cannot give him/her the proper credit.
- By Edmond Lau
- Highly Recommended 👍
- http://www.theeffectiveengineer.com/
NewerOlder