Skip to content

Instantly share code, notes, and snippets.

View chaosmail's full-sized avatar

Christoph Koerner chaosmail

View GitHub Profile
@chaosmail
chaosmail / deploy.prototxt
Last active December 9, 2017 16:44 — forked from tzutalin/deploy.prototxt
Network In Network
name: "nin_imagenet"
input: "data"
input_shape {
dim: 10
dim: 3
dim: 224
dim: 224
}
layers {
bottom: "data"
#!/usr/bin/env bash
set -e
currentVersion=`cat package.json | grep version | sed 's/[",:]//g' | awk '{print $2}'`
npm install
npm run compile
git checkout --orphan "build-$currentVersion"
find . -maxdepth 1 -type d -not -name "build" -not -name "docs" -not -name ".*" -exec rm -rf {} \;
@chaosmail
chaosmail / install-maven-centos.md
Last active March 28, 2017 14:50 — forked from skanjo/install-maven-centos.md
Install Apache Maven on CentOS

For the latest download link check the Apache Maven download page:

https://maven.apache.org/download.cgi

Download Apache Maven

cd~
wget "wget http://www-eu.apache.org/dist/maven/maven-3/3.3.9/binaries/apache-maven-3.3.9-bin.tar.gz"

Create directory and install

@chaosmail
chaosmail / default.ooxml
Last active October 20, 2015 20:36
Ooxml File
<?xml version="1.0" encoding="UTF-8" standalone="yes"?><?mso-application progid="Word.Document"?><pkg:package xmlns:pkg="http://schemas.microsoft.com/office/2006/xmlPackage"><pkg:part pkg:name="/_rels/.rels" pkg:contentType="application/vnd.openxmlformats-package.relationships+xml" pkg:padding="512"><pkg:xmlData><Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships"><Relationship Id="rId1" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument" Target="word/document.xml" /></Relationships></pkg:xmlData></pkg:part><pkg:part pkg:name="/word/_rels/document.xml.rels" pkg:contentType="application/vnd.openxmlformats-package.relationships+xml" pkg:padding="256"><pkg:xmlData><Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships"><Relationship Id="rId3" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/webSettings" Target="webSettings.xml" /><Relationship Id="rId7" Type="http://schemas.openxmlformats.org
@chaosmail
chaosmail / install_python3.sh
Last active March 24, 2024 20:02
Install Python 3.4.3 on Ubuntu
## Common Packages
# ---------------
sudo apt-get -y update
sudo apt-get -y upgrade
sudo apt-get -y install software-properties-common libssl-dev openssl wget
## Install latest Python 3
# -----------------------
PY_VERSION=3.4.3
PY_URL="https://www.python.org/ftp/python/$PY_VERSION/Python-$PY_VERSION.tgz"
@chaosmail
chaosmail / automake_python
Last active September 30, 2015 12:31
Python Makefile
# Project Setup
pkg_name = MoreSpaceEducation
venv_dir = .venv
src_dir = $(pkg_name)
python = python3.4
# Declare the tools
pkgm = pip
venv = virtualenv --no-site-packages --distribute -p /usr/bin/$(python)
test = pytest
@chaosmail
chaosmail / import_database_mysql.sh
Created November 8, 2014 13:11
Import a Database in MySQL with the Comandline
mysql -u root -p -h localhost database_name < backup.sql
@chaosmail
chaosmail / performance.py
Created October 11, 2014 18:00
Check performance of loops and arrays in Python
from __future__ import print_function
import cProfile
import random
num_elems = 1000000
test = [random.randint(1,100) for i in range(num_elems)]
print("Loops\n*******")
print("Range and Len")
@chaosmail
chaosmail / crawler.js
Created July 15, 2014 16:22
Simple PhantomJS Crawler
var system = require('system');
var fs = require('fs');
var args = system.args;
if (args.length === 1) {
console.log("Please write url as argument");
phantom.exit();
}
console.log('Loading', args[1]);
@chaosmail
chaosmail / crawler.py
Created July 15, 2014 14:31
Simple Webcrawler
from bs4 import BeautifulSoup
import urllib.request
url = "http://www.google.com/"
res = urllib.request.urlopen(url)
html = res.read()
soup = BeautifulSoup(html)
print(soup)