Few days ago Mike Anderson wrote [a proposal][mike] for a generic matrix API in Clojure which could compete with NumPy. I wanted to write a similar post for months, but was reluctant to start. This problem is very dear to me. Basically, it is a matter if I can use Clojure for most of my work, or it remains a toy language for me. Thanks to Mike for bringing the question up. Though, I have a different vision of how we should approach arrays and matrices in Clojure.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <time.h> | |
#include <stdlib.h> | |
#include <math.h> | |
#define M_PI_2 1.57079632679489661923 /* pi/2 */ | |
#define M_PI_2_INV (1.0/M_PI_2) | |
#define M_2_SQRTPI 1.12837916709551257390 /* 2/sqrt(pi) */ | |
#define ERF_COEF (1.0/M_2_SQRTPI) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"""Counting objects without bias | |
http://blogs.mathworks.com/steve/2012/12/18/counting-objects-without-bias/ | |
""" | |
from scipy.misc import imread, imshow | |
from scipy.ndimage import label | |
from scipy import asarray, ones, vstack, hstack | |
from sys import stdout |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python2 | |
"""Delete tweets older than X days. | |
Usage: | |
rmtweets.py [at_least_days_old (default=365)] | |
""" | |
# Twitter gives access to only the last 3200 tweets, but if you delete | |
# more recent tweets, then after some time (a week? a month?) the |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;;; indent-blocks.el --- | |
;;; move to the begining and end of the current indentation block | |
;; Indent blocks are defined as a sequence of lines with the same or | |
;; bigger indent size than that of the current line. | |
;; | |
;; Indentat blocks are common in YAML, Python, and Haskell and other | |
;; markup and programming languages with significant indentation, and | |
;; in these languages they usually are semantic units. | |
;; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"metadata": { | |
"name": "plot 3D line" | |
}, | |
"nbformat": 3, | |
"nbformat_minor": 0, | |
"worksheets": [ | |
{ | |
"cells": [ | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Direct Links in Google Search | |
// @namespace https://github.com/astanin | |
// @description Remove indirections from Google search results on all TLDs. | |
// @include https://www.google.tld/*output=search* | |
// @include http://www.google.tld/*output=search* | |
// @include https://www.google.tld/search* | |
// @include http://www.google.tld/search* | |
// @include https://www.google.tld/#* | |
// @include http://www.google.tld/#* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Hide Search Bar in Google Reader | |
// @namespace https://github.com/astanin | |
// @include http://www.google.com/reader/view/* | |
// @include https://www.google.com/reader/view/* | |
// @version 1.0 | |
// @grant none | |
// ==/UserScript== | |
function hideById(barid) { | |
document.getElementById(barid).style.display = "none"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
language | github.rank | so.tagcount | so.rank | |
---|---|---|---|---|
elixir | 30 | 73 | 18 | |
vb.net | 60 | 34949 | 69 | |
io | 34 | 3319 | 54 | |
python | 85 | 131042 | 72 | |
augeas | 10 | 3 | 2 | |
pure-data | 37 | 0 | 0 | |
dart | 31 | 219 | 28 | |
nu | 23 | 3 | 2 | |
rust | 56 | 21 | 14 |