I'm trying to figure out how to use rebar to:
- create erlang project
- add a dependency on an erlang module from github
- start the app via the erl console
- create a release and start the app from the release (via the generated scripts)
| #!/usr/bin/env python | |
| # exercise python #1 | |
| import argparse | |
| def tokenize_wrong(string, separator): | |
| for index, char in enumerate(string): | |
| if char == separator: | |
| return index |
| -- Copyright (C) 2013 Matthieu Tourne | |
| -- @author Matthieu Tourne <[email protected]> | |
| local M = {} | |
| -------------------- | |
| --- Heavy Hitter --- | |
| -------------------- | |
| local obj_mt = { __index = M } |
| diff --git a/ARDroneLib/VLIB/Platform/video_config.h b/ARDroneLib/VLIB/Platform/video_config.h | |
| index 21263fa..ccb8b6f 100644 | |
| --- a/ARDroneLib/VLIB/Platform/video_config.h | |
| +++ b/ARDroneLib/VLIB/Platform/video_config.h | |
| @@ -8,7 +8,7 @@ | |
| //////////////////////////////////////////// | |
| #if TARGET_CPU_ARM == 1 | |
| // IPhone | |
| -#if defined (USE_ANDROID) || defined (TARGET_OS_IPHONE) | |
| +#if defined (USE_ANDROID) || defined (TARGET_OS_IPHONE) || defined (USE_LINUX) |
| function topk_words(content, nbItems) { | |
| var space_saver = new_space_saver(nbItems * 2); | |
| var words = content.toLowerCase().replace(/\W/g, ' ').split(/\s+/); | |
| for (var i = 0; i < words.length; i++) { | |
| insert_space_saver(space_saver, words[i]); | |
| } | |
| return get_top_space_saver(space_saver, nbItems); |
| function is_word_char(c) { | |
| return (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z'); | |
| } | |
| function cut_words(content) { | |
| var in_word = false; | |
| var start_word = 0; | |
| var word; | |
| var result = []; | |
| var i; |
| CPP=g++ | |
| SRC=main.03.cc toto.11.cc | |
| BIN=foo | |
| OBJ=$(SRC:.cc=.o) | |
| LDFLAGS= | |
| CXXFLAGS=-O0 -g | |
| all:$(BIN) |
Example of using zerorpc over zmq curve - for transport encryption and client / server authentication
this is modeled after the pyzmq security ironhouse example, where both endpoints are authed :
https://github.com/zeromq/pyzmq/blob/master/examples/security/ironhouse.py
zmq curve enabled :
| import numpy as np | |
| import matplotlib.pyplot as plt | |
| import matplotlib as mpl | |
| import matplotlib.colors as mc | |
| T1 = 212 | |
| # T1 is always boiling | |
| def get_m_ratio_given_T_T2(t, t2): | |
| if t2 - t == 0: |
| const puppeteer = require('puppeteer'); | |
| const fs = require('fs'); | |
| // after MAX_TRY collisions OR attempts in a row exit | |
| const MAX_TRY = 300; | |
| let attempts = 0; | |
| let collisions = 0; | |
| const image_regex = /(?:.*\.amazonaws\.com\.*)|(?:.*staticflickr\.com.*_o\..*)/; |