Skip to content

Instantly share code, notes, and snippets.

@swedishmike
swedishmike / gist:902fb27d627313c31a95e31c44e302ac
Created October 17, 2019 13:07
Adding and removing virtual environments to Jupyter notebook
## Create the virtual environment
conda create -n 'environment_name'
## Activate the virtual environment
conda activate 'environment_name'
## Make sure that ipykernel is installed
pip install --user ipykernel
## Add the new virtual environment to Jupyter
@umangahuja1
umangahuja1 / run python file without typing python and extension.md
Last active September 4, 2023 13:31
How to run python files without typing python and extension

How to run python files without typing python and extension (in Linux)

Steps to follow to run your python code without typing python filename.py.

You can simply run by typing filename if you follow these simple steps.

Step 1 : Add shebang line as first line in your python code

@jganzabal
jganzabal / Nvidia Titan XP + MacBook Pro + Akitio Node + Tensorflow + Keras.md
Last active November 2, 2022 11:43
How to setup Nvidia Titan XP for deep learning on a MacBook Pro with Akitio Node + Tensorflow + Keras
@dte
dte / install-CUDA-docker-nvidia-docker.sh
Created July 19, 2017 20:56
Install CUDA, Docker, and Nvidia Docker on a new Paperspace GPU machine
#!/bin/bash
# 1. Install CUDA
echo "Installing CUDA..."
# Only install if CUDA is not already installed.
if ! dpkg-query -W cuda; then
# The 16.04 installer works with 16.10.
curl -O http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/cuda-repo-ubuntu1604_8.0.61-1_amd64.deb
dpkg -i ./cuda-repo-ubuntu1604_8.0.61-1_amd64.deb
apt-get update
apt-get install cuda -y
from __future__ import print_function, division
import datetime as dt
import pandas as pd
import numpy as np
import scipy.optimize as sopt
def gradebook():
columns = ("Assignment", "Due", "Grade", "Weight")
@bishboria
bishboria / springer-free-maths-books.md
Last active October 3, 2024 09:17
Springer made a bunch of books available for free, these were the direct links
@jameskyle
jameskyle / main.R
Last active April 25, 2016 23:13
library(MDPtoolbox)
library(Matrix)
library(ggplot2)
library(grid)
library(gridExtra)
library(doMC)
cores <- detectCores() - (detectCores() / 2) / 2
registerDoMC(cores=cores)
set.seed(1234)
@davidshinn
davidshinn / Maze.py
Last active November 26, 2015 04:51
maze helper for pymdptoolbox
# -*- coding: utf-8 -*-
__author__ = "David Shinn"
__license__ = "MIT"
from collections import defaultdict
import itertools
import os
import pdb
import numpy as np
import pandas as pd
@davidshinn
davidshinn / first_mdp_problem.ipynb
Last active November 23, 2015 03:44
IPython Notebook example of directed graph MDP in pympdtoolbox
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jameskyle
jameskyle / run.sh
Last active October 19, 2015 05:44
#!/bin/bash
CORES=7
OUTPUT=${OUTPUT:-results}
array=(
AssignmentTwo
ContinuousPeaksTest
CountOnesTest
FlipFlopTest