Skip to content

Instantly share code, notes, and snippets.

Avatar
👋

Sam Sulaimanov bitmorse

👋
View GitHub Profile
@bitmorse
bitmorse / gist:5362657
Created Apr 11, 2013
plos publication example (json)
View gist:5362657
{
"_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 Mar 20, 2013
lastfm scrobble exporter (from https://gitorious.org/fmthings/lasttolibre/blobs/master/lastexport.py // changed the script to try more often on failure )
View lastexport.py
#!/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
View gist:4952575
$(".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",