Skip to content

Instantly share code, notes, and snippets.

@itruls
itruls / vimrc
Created January 8, 2020 07:09
Useful vim config, save as .vimrc in $HOME.
syntax on
@itruls
itruls / aliases.sh
Last active January 18, 2019 13:31
Common aliases (include in .bash_profile on OS X)
# Include in .bash_profile or similar
if [[ $platform == 'linux' ]]; then
alias ll='ls -alh --color=auto'
alias ls='ls --color=auto'
elif [[ $platform == 'darwin' ]]; then
alias ll='ls -alGh'
alias ls='ls -Gh'
fi
# ANSI color codes
@itruls
itruls / set-defaults.sh
Last active February 15, 2024 11:33
Configuring Mac OS X from command line
# Some found in https://github.com/nicksp/dotfiles/blob/master/osx/set-defaults.sh
###########################
### Finder improvements ###
###########################
echo "Improving Finder:"
# TODO: Should these commands be added to .profile or similar, or do they only need run once.
echo "Show ~/Library folder ..."
chflags nohidden ~/Library
@itruls
itruls / Brewfile
Last active February 23, 2021 11:17
Install brew programs with 'brew bundle install'
# Mac App Store Command Line Interface
brew 'mas'
brew 'maven'
# AWS command line interface
brew 'awscli'
cask 'google-chrome'
cask 'google-drive'
cask 'github-desktop'
cask 'microsoft-teams'
@itruls
itruls / install_software.sh
Last active September 16, 2018 11:55
Setup new Mac with Homebrew and Anaconda
#!/bin/bash
TEMP="/tmp"
ANACONDA_REPO="https://repo.continuum.io/archive"
# TODO: Update with latest installer. Updated 2018-05-30.
ANACONDA_BIN="Anaconda3-5.2.0-MacOSX-x86_64.sh"
APPLEID="email@email.com"
#TODO: First check if Command Line Tools are already installed:
@itruls
itruls / exercise1_solution.py
Created August 24, 2017 07:27
Workshop Exercise 1 solution: Load data set from url
### EXERCISE: Load data set from url
# Load the Iris data set (directly) from it's [original source](https://archive.ics.uci.edu/ml/machine-learning-databases/iris/iris.data)
# using [pandas.read_csv](https://pandas.pydata.org/pandas-docs/stable/generated/pandas.read_csv.html).
#
# Verify that the data is correct by comparing output from [pandas.DataFrame.describe](https://pandas.pydata.org/pandas-docs/stable/generated/pandas.DataFrame.describe.html)
# on dataset you loaded with dataset loaded directly from scikit learn.
# SOLUTION
url = 'https://archive.ics.uci.edu/ml/machine-learning-databases/iris/iris.data'
column_names = ['sepal length', 'sepal width', 'petal length', 'petal width', 'class']