Skip to content

Instantly share code, notes, and snippets.

View rezapci's full-sized avatar
💭
I may be slow to respond.

Reza Hashemi rezapci

💭
I may be slow to respond.
View GitHub Profile
houses = pd.read_csv('data/melb_data.csv')
# Calculate pairwise-correlation
matrix = houses.corr()
# Create a mask
mask = np.triu(np.ones_like(matrix, dtype=bool))
# Create a custom diverging palette
cmap = sns.diverging_palette(250, 15, s=75, l=40,
@silv3rr
silv3rr / pi-yt.sh
Last active August 15, 2020 10:38
trying to block yt ads using pihole, and failing ;)
#!/bin/sh
BL=blacklist-yt.txt
LOGDIR=/var/log
#REGEX="r\([0-9]\|[0-9][0-9]\)---sn-.*\.googlevideo\.com"
REGEX="r\([0-9]\|[0-9][0-9]\)\.sn-.*\.googlevideo\.com"
DEBUG=1
if [ ! -f $BL ]; then echo "$BL does not exist, exiting..."; exit 1; fi
{ ps -o comm= --pid $$ | grep bash; } > /dev/null 2>&1 && shopt -s expand_aliases
1) verander /etc/shadow en /etc/shadow- zodat pi kan inloggen met know password
2) disable splash screen mv /etc/init.d/asplash.. asplash_bak
start op
apt-get install openssh-server
apt-get install wpasupplicant
aptitude hold wpasupplicant # zorg dat wpasupplicant niet verwijderd wordt
aptitude hold openssh-server
pas network settings aan
@JamieMason
JamieMason / html-languages.txt
Created September 19, 2012 08:50
HTML lang attribute / ISO language code reference / Culture names
CULTURE SPEC.CULTURE ENGLISH NAME
--------------------------------------------------------------
Invariant Language (Invariant Country)
af af-ZA Afrikaans
af-ZA af-ZA Afrikaans (South Africa)
ar ar-SA Arabic
ar-AE ar-AE Arabic (U.A.E.)
ar-BH ar-BH Arabic (Bahrain)
ar-DZ ar-DZ Arabic (Algeria)
ar-EG ar-EG Arabic (Egypt)
@MicahElliott
MicahElliott / rbenv-howto.md
Created April 17, 2012 18:11
Setting up and installing rbenv, ruby-build, rubies, rbenv-gemset, and bundler

Setting up and installing rbenv, ruby-build, rubies, rbenv-gemset, and bundler

This guide enables you to install (ruby-build) and use (rbenv) multiple versions of ruby, isolate project gems (gemsets and/or bundler), and automatically use appropriate combinations of rubies and gems.

TL;DR Demo

# Ensure system is in ship-shape.

aptitude install git zsh libssl-dev zlib1g-dev libreadline-dev libyaml-dev

@isaacs
isaacs / node-and-npm-in-30-seconds.sh
Last active March 8, 2024 02:11
Use one of these techniques to install node and npm without having to sudo. Discussed in more detail at http://joyeur.com/2010/12/10/installing-node-and-npm/ Note: npm >=0.3 is *safer* when using sudo.
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc
. ~/.bashrc
mkdir ~/local
mkdir ~/node-latest-install
cd ~/node-latest-install
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1
./configure --prefix=~/local
make install # ok, fine, this step probably takes more than 30 seconds...
curl https://www.npmjs.org/install.sh | sh