Skip to content

Instantly share code, notes, and snippets.

View berceanu's full-sized avatar
:octocat:
long long ago; /* in a galaxy far far away */

Andrei Berceanu berceanu

:octocat:
long long ago; /* in a galaxy far far away */
View GitHub Profile
@audreyfeldroy
audreyfeldroy / pypi-release-checklist.md
Last active February 23, 2023 15:03
My PyPI Release Checklist
  • Update HISTORY.md
  • Commit the changes:
git add HISTORY.md
git commit -m "Changelog for upcoming release 0.1.1."
  • Update version number (can also be minor or major)
bumpversion patch
@ax3l
ax3l / CUDA_Compilers.md
Last active June 19, 2024 00:51
CUDA Compilers
@stormpython
stormpython / how_to_set_up_ssh_keys.md
Last active August 10, 2023 03:33
Setting up ssh keys for remote server access

How to Set up SSH Keys

Create the RSA Key Pair

ssh-keygen -t rsa

Store the Keys and Passphrase

Once you have entered the Gen Key command, you will get a few more questions:

@nfaggian
nfaggian / pool.py
Last active July 30, 2021 17:12
Multiprocessing example
from __future__ import print_function
import multiprocessing
import ctypes
import numpy as np
def shared_array(shape):
"""
Form a shared memory numpy array.
@Avaq
Avaq / pull-private.sh
Created November 4, 2014 12:25
Exporting and importing GPG keys over SSH
ssh user@remote gpg --export-secret-key KeyId | gpg --allow-secret-key-import --import
@lauraBaakman
lauraBaakman / delimiters.tex
Created July 10, 2016 12:45
Fix the abs and norm delimiters in LaTeX.
\usepackage{mathtools}
\DeclarePairedDelimiter\abs{\lvert}{\rvert}%
\DeclarePairedDelimiter\norm{\lVert}{\rVert}
\makeatletter
\let\oldabs\abs
\def\abs{\@ifstar{\oldabs}{\oldabs*}}
\let\oldnorm\norm
\def\norm{\@ifstar{\oldnorm}{\oldnorm*}}
\makeatother
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@skuschel
skuschel / addcolorbar.py
Last active August 6, 2019 13:39
Matplotlib addcolorbar
def addcolorbar(ax, im, pos='right', size='5%', pad=0.05, orientation='vertical',
stub=False, max_ticks=None, label=None):
'''
add a colorbar to a matplotlib image.
ax -- the axis object the image is drawn in
im -- the image (return value of ax.imshow(...))
When changed, please update:
https://gist.github.com/skuschel/85f0645bd6e37509164510290435a85a
@kent119
kent119 / nginx_reverse_for_notebook
Last active July 18, 2020 00:14
Config Nginx as a reverse proxy for Jupyter notebook on VPS
# /etc/nginx/sites-enabled/some.domain
# Change the server name {some.domain}
# Change the {host.of.notebook} and {port} in the following locations
server {
listen 80;
# Change the server name {some.domain}
server_name some.domain;
location / {
# Change the {host.of.notebook} and {port}
proxy_pass http://host.of.notebook:port;
@mjdietzx
mjdietzx / install-tesla-driver-ubuntu.sh
Last active December 23, 2023 11:03
Install TESLA driver for ubuntu 16.04
# http://www.nvidia.com/download/driverResults.aspx/117079/en-us
wget http://us.download.nvidia.com/tesla/375.51/nvidia-driver-local-repo-ubuntu1604_375.51-1_amd64.deb
sudo dpkg -i nvidia-driver-local-repo-ubuntu1604_375.51-1_amd64.deb
sudo apt-get update
sudo apt-get -y install cuda-drivers
echo "Reboot required."