This file contains hidden or 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 pickle | |
import re | |
import pandas as pd | |
df = pickle.load( open( "df_info.pickle", "rb" ) ) | |
findID = re.compile(r"Identifiant: #(.+?(?=;))") | |
findTitre = re.compile(r"Titre: (.+?(?=;))") | |
findCat = re.compile(r"Cat.?gorie: (.+?(?=;))") | |
findTemps = re.compile(r"Temps par t.?che: (.+?(?=;))") |
This file contains hidden or 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
# Memory + CPU | |
cat /proc/meminfo | |
cat /proc/cpuinfo | |
# Add new user | |
sudo useradd -m -s /bin/bash XXXX | |
sudo passwd XXXX # set password | |
sudo chage -d 0 XXXX # force password change | |
# Install Miniconda |
This file contains hidden or 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
git config --global alias.hist 'log --oneline --graph --decorate --all' |
This file contains hidden or 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
# https://stackoverflow.com/questions/729489/duplicate-copy-records-in-the-same-mysql-table | |
CREATE TEMPORARY TABLE tmp SELECT * FROM calls WHERE id = 16; | |
UPDATE tmp SET slug='' WHERE id = 16; | |
UPDATE tmp SET id=35 WHERE id = 16; | |
INSERT INTO calls SELECT * FROM tmp WHERE id = 35; | |
--- | |
CREATE TEMPORARY TABLE tmp SELECT * FROM call_participants WHERE id = 13; |
This file contains hidden or 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 | |
# This script creates a new project (or site) under /var/sites and creates | |
# new virtual host for that site. With the options a site can also | |
# install the latest version of Laravel directly. | |
# This script was originally based on the following script by @Nek from | |
# Coderwall: https://coderwall.com/p/cqoplg | |
# Display the usage information of the command. | |
create-project-usage() { |