/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" brew install htop brew cask install pycharm brew cask install intellij-idea brew cask install google-chrome brew cask install anaconda brew install bash
maximise current window
wmctrl -r :ACTIVE: -e 0,25,50,2100,1500
switch to tmux
bash -c 'if wmctrl -l | grep -q "^[^ ]\+ 0 [^ ]\+ tmux"; then wmctrl -r "tmux" -t 1; else wmctrl -R "tmux"; fi'
This file contains 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
set-option -g default-shell /bin/zsh | |
# Support for 256 colors | |
set-option -g default-terminal "screen-256color" | |
# bind vi key-mapping | |
set-option -g status-keys vi | |
# vi-style controls for copy mode | |
set-window-option -g mode-keys vi | |
# large history | |
set-option -g history-limit 100000 |
This file contains 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
set nocompatible | |
filetype off | |
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
" => Vundle https://github.com/gmarik/Vundle.vim | |
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
" set the runtime path to include Vundle and initialize | |
set rtp+=~/.vim/bundle/Vundle.vim | |
call vundle#begin() |
This file contains 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
from BeautifulSoup import BeautifulSoup | |
import requests | |
import os | |
import re | |
import peewee | |
from peewee import * | |
db = MySQLDatabase('movies',host="localhost",user='root') | |
db.connect() | |
class Movie(peewee.Model): |
This file contains 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 | |
# virtualenv-auto-activate.sh | |
# | |
# Installation: | |
# Add this line to your .bashrc or .bash-profile: | |
# | |
# source /path/to/virtualenv-auto-activate.sh | |
# | |
# Go to your project folder, run "virtualenv .venv", so your project folder | |
# has a .venv folder at the top level, next to your version control directory. |
This file contains 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
java -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005 |
This file contains 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 | |
echo Please type your password: | |
read -s p | |
encrypted=`mvn --encrypt-password $p` | |
echo encrypted password for mvn is: | |
echo $encrypted | |
#escape / | |
encrypted=`echo "$encrypted" | sed s,/,\\\\\\\\\\/,g` |
Thus, when one ant finds a good (i.e., short) path from the colony to a food source, other ants are more likely to follow that path, and positive feedback eventually leads all the ants following a single path. The idea of the ant colony algorithm is to mimic this behavior with "simulated ants" walking around the graph representing the problem to solve.
List of algorithms
NewerOlder