Skip to content

Instantly share code, notes, and snippets.

@shhong
shhong / nsb_entropy.py
Last active Mar 7, 2021
NSB entropy in python
View nsb_entropy.py
#!/usr/bin/env python
"""
nsb_entropy.py
June, 2011 written by Sungho Hong, Computational Neuroscience Unit, Okinawa Institute of
Science and Technology
May, 2019 updated to Python 3 by Charlie Strauss, Los Alamos National Lab
This script is a python version of Mathematica functions by Christian Mendl
View arow.py
# a short implementation of arow in theano
def arow(params, loss, lbda1, lbda2):
sigma = [theano.shared(value=np.ones(p.value.shape)) for p in params]
gl = [T.grad(cost=loss, wrt=p) for p in params]
ups = {}
for i in xrange(len(params)):
ups[params[i]] = params[i] - lbda1*gl[i]/sigma[i]
ups[sigma[i]] = sigma[i] + lbda2*gl[i]*gl[i]
return ups
@sritchie
sritchie / plugins.sbt
Created Apr 20, 2013
The getting started with ensime post!
View plugins.sbt
// Add this file to ~/.sbt/plugins/plugins.sbt.
//
// Once this is ready, make sure you have sbt 0.12 ("brew install sbt" should do it),
// then try running
//
// sbt "ensime generate"
//
// in bijection's root directory. ("git clone git@github.com:twitter/bijection.git")
resolvers += "Scala-Tools Maven2 Snapshots Repository" at "http://scala-tools.org/repo-snapshots"
@owainlewis
owainlewis / hipchat.el
Created May 8, 2013
HipChat Jabber Emacs
View hipchat.el
;; HipChat
(setq ssl-program-name "gnutls-cli"
ssl-program-arguments '("--insecure" "-p" service host)
ssl-certificate-verification-policy 1)
;; Connect using jabber.el
;; M-x jabber-connect <RET>
;; Config
View Importing Notebooks.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View gist:8522372
(require 'mine-jabber)
;; Username & nickname fields from https://banno.hipchat.com/account/xmpp
(setq hipchat-username "")
(setq hipchat-nickname "")
(setq hipchat-password "")
(setq hipchat-autojoin-rooms
'("aggregation" "assets" "banno_talk" "banno_cms" "data_services" "emacs" "grip" "kernel" "southen" "troll_talk" "webdev" "design_talk"))
@stared
stared / software_for_scientists.md
Last active Jun 16, 2021
Software for scientists: community-edited list of general-purpose software for scientists.
View software_for_scientists.md

Software for scientists

Some things takes much less time and stress once you know the right tool. Below, there is a community edited list of software for scientists.

Text editors

in General purpose text/code editors. It may be better to have a good editor for everything, than different ones for different languages, scripts, notes.

@staltz
staltz / introrx.md
Last active Jun 18, 2021
The introduction to Reactive Programming you've been missing
View introrx.md
@amar-analytx
amar-analytx / spark-ec2.py
Last active Aug 29, 2015
Spark EC2 with VPC
View spark-ec2.py
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
@LeCoupa
LeCoupa / bash-cheatsheet.sh
Last active Jun 15, 2021
Bash CheatSheet for UNIX Systems --> UPDATED VERSION --> https://github.com/LeCoupa/awesome-cheatsheets
View bash-cheatsheet.sh
#!/bin/bash
#####################################################
# Name: Bash CheatSheet for Mac OSX
#
# A little overlook of the Bash basics
#
# Usage:
#
# Author: J. Le Coupanec
# Date: 2014/11/04