Skip to content

Instantly share code, notes, and snippets.

@koshov
koshov / Shell Python VirtualEnv
Created October 12, 2012 13:45
Creating Python virtual environment
virtualenv {name_of_env}
@koshov
koshov / Shell Python VirtualEnv Activate
Created October 12, 2012 13:46
Activate Python VirtualEnv
. {virtual_env}/bin/activate
@koshov
koshov / RegExp
Created December 10, 2012 21:49
RegExp cheat-sheet
=================
RegExp cheat-sheet
=================
^ beginning of line
$ end of line
. any character
* zero or more
@koshov
koshov / vision_machines
Last active December 12, 2015 09:09
AT Level 3 Vision machines
==== L3 Open area ====
knapdale
cumbrae
inishail
rothesay
kilmore
kilbride
corran
morvern
auckland
@koshov
koshov / COMN.md
Last active March 23, 2019 17:17
COMN - University of Edinburgh revision notes

MSS - Maximum Segment Size
RTT - Round-Trip Time
ICMP - Internet Control Message Protocol

Key concepts:

[ ] Protocol

Layering

Application

@koshov
koshov / DBS.md
Created April 23, 2013 10:10
DBS - University of Edinburgh revision notes

SPJU - Select, Project, Join, Union queries
ID - Inclusion dependency
FD - Functional dependency
MVD - Multivalued Dependency

Overview

Typical DBMS functionality

  • Define a particular database in terms of its data types, structures and constraints
  • Construct or Load the initial database contents on a secondary storage device
  • Manipulating the database
@koshov
koshov / client.py
Last active December 19, 2015 21:48
# Echo client program
import socket
import sys
# Set up connection
HOST = 'WR8DV9C2' # your host name here
PORT = 50007
RUN = True
conn = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
@koshov
koshov / server.py
Last active December 19, 2015 21:48
# Echo server program
import socket
import sys
HOST = socket.gethostname()
PORT = 50007
RUN = True
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.bind((HOST, PORT))
@koshov
koshov / 0_reuse_code.js
Created November 6, 2013 22:19
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
==> Using Homebrew-provided fortran compiler.
This may be changed by setting the FC environment variable.
==> Cloning https://github.com/JuliaLang/julia.git
git --git-dir /Library/Caches/Homebrew/julia--git/.git status -s
Updating /Library/Caches/Homebrew/julia--git
git config remote.origin.url https://github.com/JuliaLang/julia.git
git config remote.origin.fetch +refs/tags/v0.2.0:refs/tags/v0.2.0
git --git-dir /Library/Caches/Homebrew/julia--git/.git rev-parse -q --verify v0.2.0
git checkout -f v0.2.0
git reset --hard v0.2.0