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 | |
sudo apt-get install git python3-pip python-is-python3 make build-essential libssl-dev zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev curl libffi-dev | |
pip install virtualenvwrapper | |
git clone https://github.com/pyenv/pyenv.git ~/.pyenv | |
git clone https://github.com/pyenv/pyenv-virtualenv.git ~/.pyenv/plugins/pyenv-virtualenv | |
git clone https://github.com/pyenv/pyenv-virtualenvwrapper.git ~/.pyenv/plugins/pyenv-virtualenvwrapper | |
cat << EOF >> ~/.bashrc |
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
#!/usr/bin/env python3 | |
import paramiko | |
import os | |
import warnings | |
warnings.filterwarnings('ignore') | |
keyfile = os.path.expanduser('~')+'/.ssh/id_rsa.pub' | |
cred = {"username": "mattia", | |
"hostname": "scc.uni-konstanz.de", |
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
# ~/.bashrc: executed by bash(1) for non-login shells. | |
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc) | |
# for examples | |
# If not running interactively, don't do anything | |
case $- in | |
*i*) ;; | |
*) return;; | |
esac |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 | |
BOOKMARKS=$HOME/Library/Safari/Bookmarks.plist | |
plutil -convert xml1 $BOOKMARKS | |
sed >/tmp/plist2html.xsl <<EOF | |
<xsl:stylesheet version='1.0' | |
xmlns:xsl='http://www.w3.org/1999/XSL/Transform' | |
xmlns='http://www.w3.org/1999/xhtml'> |
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
\documentclass[10pt]{article} | |
\usepackage[usenames]{color} %used for font color | |
\usepackage{amssymb} %maths | |
\usepackage{amsmath} %maths | |
%\usepackage[utf8]{inputenc} %useful to type directly diacritic characters | |
\usepackage{mathspec} | |
\usepackage{fontspec} | |
\usepackage{xunicode} | |
\usepackage{xltxtra} | |
\setmainfont{Arial} |
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
#!/usr/bin/env python | |
""" | |
Plot the Fock distribution for a thermal state at given frequency | |
and temperature. | |
Author: mattia | |
Last modified: Thu Jan 21, 2021 05:20PM | |
Version: 1.0 | |
3 arguments from command line: |
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 numpy as np | |
import matplotlib.pyplot as plt | |
# Generate fake data | |
x = np.linspace(-5, 5, 151); | |
y = np.linspace(-3, 3, 251); | |
X, Y = np.meshgrid(x, y) | |
Z1 = np.sin(X*Y)**2 - np.cos(X*Y)**2 - X - Y |
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
% 2D PLOT EXAMPLE | |
% Make grid and data | |
x = linspace(-5, 5, 151); | |
y = linspace(-3, 3, 251); | |
[X, Y] = meshgrid(x, y); | |
Z = sin(X.*Y).^2 - cos(X.*Y).^2 - X - Y; | |
% Save the data in a readable format to use later |
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
" VIM configuration file | |
" author: mattia | |
" Last modified: Thu Jan 21, 2021 04:30PM | |
"{{{ Basic | |
syntax on | |
set showmatch | |
set number | |
set nocompatible | |
set bs=2 |