$ sudo npm install cylon cylon-ble -g
$ npm install sphero noble
$ cylon-ble-scan
| package main | |
| // #cgo pkg-config: python3 | |
| // #include <Python.h> | |
| // int PyArg_ParseTuple_LL(PyObject *, long long *, long long *); | |
| import "C" | |
| import ( | |
| "fmt" | |
| ) |
| from newmath import sum | |
| print (sum(5,4)) |
| #include <Python.h> | |
| static PyObject *sum(PyObject *self, PyObject *args) { | |
| const long a, b; | |
| if (!PyArg_ParseTuple(args, "LL", &a, &b)) | |
| return NULL; | |
| return PyLong_FromLong(a + b); | |
| } | |
| static PyMethodDef MathMethods[] = { |
| var app = angular.module('demo', ['textToSpeech']); | |
| app.controller('demoCtrl', function($scope, $timeout, textToSpeech) { | |
| textToSpeech.onVoiceReady(function(){ | |
| textToSpeech.speak( | |
| 'You worked 9 hours!!', | |
| 'UK English Male', | |
| {pitch: 2} | |
| ).then(function() { | |
| alert('Finish!'); | |
| }, function(err) { |
| import sys | |
| def show_progress(actual, total): | |
| percentage = actual / float(total) | |
| done = int(50 * percentage) | |
| sys.stdout.write("\r[%s%s] %d %%" % ('=' * done, ' ' * (50-done), percentage * 100)) | |
| sys.stdout.flush() |
| chmod +x ~/Library/Application\ Support/Steam/SteamApps/common/HacknSlash/Hack.app/Contents/MacOS/Hack |
| export GAEPATH=/your/path/for/google_appengine | |
| export PATH=$PATH:$GAEPATH | |
| export PATH=$WORKSPACE/venv/bin:/usr/local/bin:$PATH | |
| export PYENV_HOME=$WORKSPACE/.pyenv/ | |
| export PYTHONPATH=$PYTHONPATH:$GAEPATH | |
| if [ -d $PYENV_HOME ]; then | |
| rm -rf $PYENV_HOME | |
| fi |
| im.resize({ | |
| srcPath: src , | |
| dstPath: dst, | |
| width: 200, | |
| height: "200^", | |
| customArgs: [ | |
| "-gravity", "center", | |
| "-extent", "200x200" | |
| ] | |
| }, function(err, stdout, stderr) { |
| #!/bin/sh | |
| ./waf build | |
| python -m SimpleHTTPServer 8000 |