Skip to content

Instantly share code, notes, and snippets.

View robinvanemden's full-sized avatar
🌳
⏩ ⏩

Robin van Emden robinvanemden

🌳
⏩ ⏩
View GitHub Profile
{
"_sync": {
"rev": "131-d6920011c53afe48364b84e0394073c5",
"sequence": 396,
"recent_sequences": [
387,
388,
389,
390,
391,
# Crashlytics - plaintext stacktrace downloaded by Robin van Emden at Sat, 05 Nov 2016 17:36:33 GMT
# URL: https://fabric.io/pwy/android/apps/org.pvlv.birdy/issues/581e118a0aeb16625b856fe0/sessions/581e0d6900eb000119c2c6bd7c1c2ea8
# Organization: Pwy
# Platform: android
# Application: Birdy
# Version: 1.0 (1)
# Bundle Identifier: org.pvlv.birdy
# Issue #: 2
# Issue ID: 581e118a0aeb16625b856fe0
# Session ID: 581e0d6900eb000119c2c6bd7c1c2ea8
@robinvanemden
robinvanemden / jquery.couch.longpoll.js
Created November 5, 2016 16:38 — forked from schinckel/jquery.couch.longpoll.js
Long-polling handler for CouchDB
/*
# jquery.couch.longpoll.js #
A handler that can be used to listen to changes from a CouchDB database,
using long-polling.
This seemed to be a bit simpler than using continuous polling, which I
was unable to get working with jQuery.
@robinvanemden
robinvanemden / b1.js
Created September 19, 2016 12:44
Default JSON format project B1
{
"_id":"24:4B:03:39:E7:91",
"type":"bird",
"name":"pooky",
"date":"2016-09-19T14:33:38.964Z",
"location":{
"type":"Point",
"coordinates":[
52.49177162129288,
4.451482822254181
@robinvanemden
robinvanemden / basic_spatial_geojson_example_data.json
Last active September 12, 2016 15:46
Querying Couchbase 4.1, Geospatial Views & GeoJSON in PHP
{
"type": "bird",
"name": "pooky",
"date": "09-04-16T16:09:42.918Z02:00",
"location": {
"type": "Point",
"coordinates": [
3.1,
5
]
@robinvanemden
robinvanemden / ufw.sh
Last active July 22, 2016 10:41 — forked from kim3er/script
IP address limited UFW firewall config for Couchbase 4.5
#!/bin/sh
IP_ADDRESS="192.168.0.2"
ufw allow from $IP_ADDRESS to any port 4369
ufw allow from $IP_ADDRESS to any port 8091
ufw allow from $IP_ADDRESS to any port 8092
ufw allow from $IP_ADDRESS to any port 11214
ufw allow from $IP_ADDRESS to any port 11215
ufw allow from $IP_ADDRESS to any port 11209
# -*- coding: utf-8 -*-
import libs.lif as lf
key = "question"
value = self.context['question']
theta = self.get_theta(all_float=False, key=key, value=value)
Lif = lf.Lif(theta, x0=self.context['x0'], A=self.context['A'], T=150, gamma=.06, omega=1.0, lifversion=1)
Lif.update(self.action["t"],self.action["x"], self.reward)
self.set_theta(Lif, key=key, value=value)
# -*- coding: utf-8 -*-
#==============================================================================
# Reset IPython - may delete the following when not making use of Spyder IDE
from IPython import get_ipython
get_ipython().magic('reset -sf')
#==============================================================================
# -*- coding: utf-8 -*-
#==============================================================================
# Reset IPython - may delete the following when not making use of Spyder IDE
from IPython import get_ipython
get_ipython().magic('reset -sf')
# import libraries
import sys,random
import json
import asyncio,aiohttp,pymongo,time
import numpy as np
import matplotlib.pyplot as plt
MONGO_IP = "78.46.212.194"
MONGO_PORT = 27017
SB_BASE_URL = "https://strm.mnds.org:8080"