Skip to content

Instantly share code, notes, and snippets.

View bitmorse's full-sized avatar
👋

Sam Sulaimanov bitmorse

👋
View GitHub Profile
#include <SoftwareSerial.h>
#include <SdFat.h>
#include <TinyGPS.h>
//SD
const int chipSelect = 4;
// MOSI - pin 11 yellow middle
// MISO - pin 12 yellow right
// CLK - pin 13 blue
// CS - pin 4 green
@bitmorse
bitmorse / gist:5362657
Created April 11, 2013 11:30
plos publication example (json)
{
"_id": ObjectId("51642d36ad89aa81926ae005"),
"abstract": [
"\n We study a credit network and, in particular, an interbank system with an agent-based model. To understand the relationship between business cycles and cascades of bankruptcies, we model a three-sector economy with goods, credit and interbank market. In the interbank market, the participating banks share the risk of bad debits, which may potentially spread a bank’s liquidity problems through the network of banks. Our agent-based model sheds light on the correlation between bankruptcy cascades and the endogenous economic cycle of booms and recessions. It also demonstrates the serious trade-off between, on the one hand, reducing risks of individual banks by sharing them and, on the other hand, creating systemic risks through credit-related interlinkages of banks. As a result of our study, the dynamics underlying the meltdown of financial markets in 2008 becomes much better understandable.\n "
],
"affiliate": [
"Departme
@bitmorse
bitmorse / lastexport.py
Created March 20, 2013 00:51
lastfm scrobble exporter (from https://gitorious.org/fmthings/lasttolibre/blobs/master/lastexport.py // changed the script to try more often on failure )
#!/usr/bin/env python
#-*- coding: utf-8 -*-
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
$(".result a").click(function(){
hrefa = $(this).closest('.result').children('a').context.href;
dsid = $(this).closest('.result').attr('rel');
resc = ''; //set this to the result count
$.ajax({
async: false,
type: "POST",