Skip to content

Instantly share code, notes, and snippets.

View ixaxaar's full-sized avatar
🏔️

ixaxaar ixaxaar

🏔️
View GitHub Profile
@swenzel
swenzel / live_plot.py
Last active September 2, 2015 10:10
Live spike raster plot for PyNEST
# DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
# Version 2, December 2004
#
# Copyright (C) 2015 Swen Wenzel <swenzel@uos.de>
#
# Everyone is permitted to copy and distribute verbatim or modified
# copies of this license document, and changing it is allowed as long
# as the name is changed.
#
# DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
@rednaxelafx
rednaxelafx / Notes.md
Created November 17, 2011 02:33
java.lang.InternalError: a fault occurred in a recent unsafe memory access operation in compiled Java code

Error message:

2011-11-17 09:32:51,715 [ajp-0.0.0.0-8009-3] ERROR com.alibaba.citrus.webx.impl.WebxRootControllerImpl - Error occurred while process request /
java.lang.InternalError: a fault occurred in a recent unsafe memory access operation in compiled Java code
        at java.nio.Bits.swap(Bits.java:27) ~[na:1.6.0_17]
        at java.nio.Bits.swap(Bits.java:37) ~[na:1.6.0_17]
        at java.nio.DirectByteBuffer.getInt(DirectByteBuffer.java:614) ~[na:1.6.0_17]
        at java.nio.DirectByteBuffer.getInt(DirectByteBuffer.java:624) ~[na:1.6.0_17]
        at com.taobao.common.nmap.Nmap.next2(Nmap.java:135) ~[common-nbeanutils-1.2.0.jar:na]
@paradigmatic
paradigmatic / FASTA.scala
Created August 23, 2012 14:48
FASTA parser in Scala
import scala.util.parsing.combinator._
object FASTA {
case class Entry( description: String, sequence: String )
def fromFile( fn: String ): List[Entry] = {
val lines = io.Source.fromFile(fn).getLines.mkString("\n")
fromString( lines )
}

Clojure is for Aristotelians

I was reading ["Clojure is for Type B Personalities"][2] and it sparked some thoughts I had about the intersection of western philosophy and programming.

One could say Mathematics is an extension of Epistemology. And all theory about computability are an extension of mathematics. I reckon how one thinks about computability and how one writes computable functions are a reflection of a person's natural epistemological tendencies. This is going to be just as unscientific as ["Clojure is for Type B Personalities"][2], but hopefully another

@eed3si9n
eed3si9n / sbt-plugin-ranking-2017-08-05.md
Last active June 8, 2018 09:15 — forked from xuwei-k/sbt-plugin-ranking-2014-02-25
List of sbt plugins sorted by GitHub stars. This was generated using https://gist.github.com/eed3si9n/ea4ceef0c5e5c07d6e62c87bea029f88, then augmented by hand.
@bitonic
bitonic / AgdaBasics.agda
Created February 7, 2012 09:28
Agda tutorial
module AgdaBasics where
apply : (A : Set)(B : A → Set) → ((x : A) → B x) → (a : A) → B a
apply A B f a = f a
_∘_ : {A : Set}{B : A → Set}{C : (x : A) → B x → Set}
(f : {x : A}(y : B x) → C x y)(g : (x : A) → B x)
(x : A) → C x (g x)
(f ∘ g) x = f (g x)
package com.chetan.poc.hbase
/**
* Created by chetan on 24/1/17.
*/
import org.apache.spark._
import org.apache.hadoop.hbase.{CellUtil, HBaseConfiguration, TableName}
import org.apache.hadoop.hbase.mapreduce.TableInputFormat
import org.apache.hadoop.hbase.util.Bytes
import org.apache.hadoop.hbase.client._
@jkbradley
jkbradley / LDA_SparkDocs
Created March 24, 2015 23:56
LDA Example: Modeling topics in the Spark documentation
/*
This example uses Scala. Please see the MLlib documentation for a Java example.
Try running this code in the Spark shell. It may produce different topics each time (since LDA includes some randomization), but it should give topics similar to those listed above.
This example is paired with a blog post on LDA in Spark: http://databricks.com/blog
Spark: http://spark.apache.org/
*/
import scala.collection.mutable
@weblancaster
weblancaster / gist:6e7f43fc02725ce747e224b0c4290906
Last active May 25, 2020 12:53
Kill all container, remove all images and stop all containers
#stop all containers:
docker kill $(docker ps -q)
#remove all containers
docker rm $(docker ps -a -q)
#remove all docker images
docker rmi $(docker images -q)
@diegopacheco
diegopacheco / apache-thrift-0.9.x-ubuntu.md
Created July 13, 2016 06:26
How to Install thrift 0.9.x on Ubuntu Linux 15.10?
sudo apt-get install libboost-dev libboost-test-dev libboost-program-options-dev libboost-system-dev libboost-filesystem-dev libevent-dev automake libtool flex bison pkg-config g++ libssl-dev 
wget http://www-eu.apache.org/dist/thrift/0.9.3/thrift-0.9.3.tar.gz
./configure 
make
sudo make install
thrift --help