Skip to content

Instantly share code, notes, and snippets.

View svaksha's full-sized avatar
💭
zzZen()

svaksha ॥ स्वक्ष ॥ svaksha

💭
zzZen()
View GitHub Profile
@alsam
alsam / FArray.jl
Last active April 13, 2016 16:47
Julia implementation Fortran-like array with arbitrary starting indices, negative or zero. Incurs a reasonable overhead vs. Base.Array, expected performance degradation should be strictly less than 2x.
# Fortran-like array with arbitrary starting indices
#
# usage:
#
# julia> include("FArray.jl")
# size (generic function with 51 methods)
#
# julia> y = FArray(Float64, -1:1, -7:7, -128:512, -5:5, -1:1, -3:3, -2:2, -1:1);
#
# julia> y[-1,-7,-128,-5,-1,-3,-2,-1] = 14
@JeffBezanson
JeffBezanson / symbol-input.el
Created January 17, 2014 20:26
emacs symbol input mode
(quail-define-package
"symbol-input" "unicode" "unicode-sym" t
"Easier input for unicode technical symbols"
nil t nil nil nil nil nil nil nil nil t)
(quail-define-rules
("\\alpha" ?α)
("\\beta" ?β)
("\\gamma" ?γ)
("\\delta" ?δ)
( advice from @johnmyleswhite; ministorm starts with https://twitter.com/johnmyleswhite/status/766657182582513666 )
I keep planning on writing a post about contributing to OSS effectively, but I'm starting to doubt I ever will. So here's some tweets.
(1) Credibility is everything. People are busy, so they heavily use personal trust to inform their decisions. You must become credible.
(2) Credibility starts with technical competence, rather than shared aesthetics. Do *not* start contributing by engaging in design debates.
(3) Instead, work on simple projects where success or failure will be clear. Write unit tests. Write docs. Improve a function's performance.
(4) That kind of work will allow you to demonstrate skill, which will make you credible. After, people will want to hear your design goals.
(5) Don't engage in debates that are long-standing without being familiar with the entire past history of the debate.
(6) Especially don't focus on the shallow part of a debate where you can participate without kno
@staticfloat
staticfloat / debugging.md
Last active February 24, 2017 03:11
Julia Debugging Procedures

Julia Debugging Procedures

So you managed to break Julia. Congratulations! Collected here are some general procedures you can undergo for common symptoms encountered when something goes awry. Including the information from these debugging steps can greatly help the maintainers when tracking down a segfault or trying to figure out why your script is running slower than expected.

If you've been directed to this page, find the symptom that best matches what you're experiencing and follow the instructions to generate the debugging information requested. Table of symptoms:

@tshort
tshort / csv.md
Created December 19, 2012 02:37
Explorations in reading CSV files in Julia

Matthew Dowle is working on a fast CSV reader for data.table. Here is test data case generated in R along with some timings:

require(data.table)

n=1e6
DT = data.table( a=sample(1:1000,n,replace=TRUE),
                 b=sample(1:1000,n,replace=TRUE),
                 c=rnorm(n),
                 d=sample(c("foo","bar","baz","qux","quux"),n,replace=TRUE),
@svaksha
svaksha / doi2bibtex.sh
Created August 22, 2017 07:49 — forked from konrad/doi2bibtex.sh
Returns a BibTeX entry for one or more given DOIs.
#!/usr/bin/env bash
# Returns a BibTeX (www.bibtex.org) entry for one or more given DOIs
# (https://www.doi.org/).
#
# Call it like this:
#
# $ doi2bibtex.sh 10.1093/bioinformatics/btu533
#
# Can also be used for several DOIs at once:
@konrad
konrad / doi2bibtex.sh
Last active August 23, 2017 08:52
Returns a BibTeX entry for one or more given DOIs.
#!/usr/bin/env bash
# Returns a BibTeX (www.bibtex.org) entry for one or more given DOIs
# (https://www.doi.org/).
#
# Call it like this:
#
# $ doi2bibtex.sh 10.1093/bioinformatics/btu533
#
# Can also be used for several DOIs at once:
@lahwran
lahwran / programmingresources.md
Last active November 19, 2018 19:46
Programming learning resources

This list was originally authored by a friend who has been learning programming for some time (tuningmind)

Programming learning resources

Note: Many books may be available from a nearby public library. Check there as well!

These two are about the best I've seen for starting from scratch:

Dear British Airways,

I am concerned that you have not handled my personal information properly.

Recently, I tried to check-in online on your website, but the interstitial page did not redirect me, and thus I was unable to check-in. I discovered that this was because my adblocker was enabled. After disabling my adblocker, I discovered that your check-in page was leaking my booking reference and surname to countless third parties for advertising purposes, including Twitter, LinkedIn and Google Doubleclick. I've attached for some network logs from Chrome's web developer console for some example evidence.

I do not recall explicitly consenting for my information to be shared in this way, nor do I see any way to opt-out or withdraw my consent. This all appears to be a violation of article 7 of GDPR for conditions of consent, which states "where processing is based on consent, the controller shall be able to demonstrate that the data subject has consented to processing of his or her personal data" and "the data

@jiahao
jiahao / juliacontribmontage.jl
Last active October 14, 2020 05:55
Creates a photo montage of Julia contributors using ImageMagick
#Working version
using JSON
auth_token= #fill in to access Github API
function getcontribs(owner, repo, auth_token)
#Download information about contributors
page, authors=0, {}
while true #Download every page
page += 1
url="https://api.github.com/repos/$owner/$repo/contributors?page=$(page)&access_token=$(auth_token)"