Skip to content

Instantly share code, notes, and snippets.

View thinline72's full-sized avatar

Sava Kalbachou thinline72

View GitHub Profile
@lucidyan
lucidyan / gpu-control.md
Last active March 19, 2023 09:37
Prevent NVIDIA GPUs' throttling on headless server

Prevent NVIDIA GPUs' throttling on headless server

  • Unlock manual fan & overclock settings
    sudo nvidia-xconfig -a --cool-bits=28 --allow-empty-initial-configuration
  • Reboot system
  • Create script /usr/local/bin/gpu-fan-control.sh
#!/bin/bash
@jph00
jph00 / AliasSampling.ipynb
Created January 21, 2018 17:53
Fast weighted sampling using the alias method in numba
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@alexeygrigorev
alexeygrigorev / bi-kmeans.py
Last active November 16, 2017 20:24
Bisecting K-Means
import heapq
import numpy as np
from sklearn.cluster import KMeans, MiniBatchKMeans
def sklearn_bisecting_kmeans_lineage(X, k, verbose=0):
N, _ = X.shape
labels = np.zeros(N, dtype=np.int)
lineage = np.zeros((k, N), dtype=np.int)
@snakers4
snakers4 / DS NN guidelines
Created October 19, 2017 07:39
Complete system installation for Data Science / Neural Networks from scratch / bare metal (assuming you have assembled the PC)
# BASIC SYSTEM SETUP
# First donwload Ubuntu iso file from https://www.ubuntu.com/download/desktop
# Use 16.04 LTS (17 is also ok, but it's better to use LTS versions, also 18 will be very mature in terms of systemd)
# Dowload Linux live USB creator and install the iso to your USB stick https://www.linuxliveusb.com
# Boot your system, go to BIOS on boot (usually Del) or boot menu (usually F12) and choose your USB stick as boot medium
# Install Linux (these steps can be omitted if clean Ubuntu installation is provided as service by admins / cloud provider / etc)
# Minor trick unplug ALL of your hard disks (unless you are an avanced user) except for the disk for your system
@mchirico
mchirico / startRstudio.sh
Created April 9, 2016 13:25
Steps for accessing Rstudio using Kaggle's image
#!/bin/bash
# Set the environment - my env is big2 (Change this!)
eval $(docker-machine env big2)
# Launch browser for your environment (Again, change this to match your environment)
(sleep 3 && open "http://$(docker-machine ip big2):8787")&
# Run the image to pickup your local directory.
# Here I have my files stored in /Users/mchirico/Dropbox/kaggle/death
@bsweger
bsweger / useful_pandas_snippets.md
Last active April 19, 2024 18:04
Useful Pandas Snippets

Useful Pandas Snippets

A personal diary of DataFrame munging over the years.

Data Types and Conversion

Convert Series datatype to numeric (will error if column has non-numeric values)
(h/t @makmanalp)

@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active June 13, 2024 05:29
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname