-
Initialize a new git repository at
/etc/
cd /etc/ sudo git init
-
Setup
.gitignore
cat << EOF | sudo tee .gitignore
# | |
# Distributed File Dowoloader | |
# =========================== | |
# | |
# List of urls is read from a file, distributed to workers, gathered and written to a directory. | |
# | |
# INSTALLATION & USAGE | |
# -------------------- | |
# sudo apt-get install python-pip python-dev build-essential git screen | |
# sudo pip install pyzmq requests |
package net.heinrich-hartmann.gists.ZmqAppender; | |
import org.apache.log4j.AppenderSkeleton; | |
import org.apache.log4j.Layout; | |
import org.apache.log4j.SimpleLayout; | |
import org.apache.log4j.spi.LoggingEvent; | |
import org.jeromq.ZMQ; | |
/** | |
* ZmqAppender for Log4j. |
/* | |
Customized version of Kevin Burke's markdown.css released under Apache License here | |
https://bitbucket.org/kevinburke/markdowncss/overview | |
*/ | |
body{ | |
margin: 0 auto; |
DROP VIEW IF EXISTS ft_trips; | |
DROP VIEW IF EXISTS ft_stats; | |
-- Create view with basic gps statistics: | |
-- a) trip_id | |
-- b) Sample Count | |
-- c) Maximal Distance to Helsinki Train Station | |
CREATE VIEW ft_stats(trip_id, count, dist) AS | |
SELECT trip_id, count(lonlat), Max(st_distance(lonlat, St_geometryfromtext('POINT(24.6006695 60.1893798)',4326))) | |
FROM sensor_gps |
from matplotlib import pyplot as plt | |
import numpy as np | |
X = np.genfromtxt("DataSets/RequestRates.csv", delimiter=",")[:,1] | |
bins = [500, 700, 800, 900, 1000, 1500, 1800, 2000, 2200] | |
bin_count = len(bins) - 1 | |
sample_counts = [0] * bin_count | |
for x in X: | |
for i in range(bin_count): | |
if (bins[i] <= x) and (x < bins[i + 1]): | |
sample_counts[i] += 1 |
;; Similar to: http://stackoverflow.com/questions/43765/pin-emacs-buffers-to-windows-for-cscope/65992#65992 | |
(defun pin-buffer () | |
"Pin buffer to current window." | |
(interactive) | |
(message | |
(if (let (window (get-buffer-window (current-buffer))) | |
(set-window-dedicated-p window (not (window-dedicated-p window)))) | |
"pinned buffer" "un-pinned buffer") | |
)) |
- A system is a set of connected components
The definition of connected and components is missing. I think we can go with definitions like:
Example: A LAMP system, consists of components:
# Copyright (c) 2015 Heinrich Hartmann | |
# MIT License http://choosealicense.com/licenses/mit/ | |
import gdata.spreadsheet.service | |
class GoogleDriveConnection(object): | |
def __init__(self, email, password): | |
self.client = gdata.spreadsheet.service.SpreadsheetsService() | |
self.client.ClientLogin(email, password) | |
#include <stdio.h> | |
#include <string.h> | |
#include <lua.h> | |
#include <lauxlib.h> | |
#include <lualib.h> | |
// Helper function to print the stack contents | |
// Values other than numbers and strings are printed as "(null)" | |
void print_stack(lua_State *L, char* title){ | |
int nargs = lua_gettop(L); |