Skip to content

Instantly share code, notes, and snippets.

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

svaksha ॥ स्वक्ष ॥ svaksha

💭
zzZen()
View GitHub Profile
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
#Python/pypy
import math
def smallestdivisall(n):
for i in xrange(1, math.factorial(n)+1):
for j in xrange(1, n+1):
if i % j != 0:
break
elif j == n:
return i
# vim: set ft=python :
from __future__ import print_function
import json
import sys
import datetime
from redis import StrictRedis as Redis
@rofinn
rofinn / mapping.jl
Created April 7, 2015 23:19
Julialang DataFrame & Matrix mappings
@doc doc"""
Takes a 2d array where each column is a pattern which maps to a row in
the resulting dataframe. Each pattern index is its own column in
the dataframe.
""" ->
function DataFrame(data::Array{Float64, 2})
m = data'
result = DataFrame()
for i in 1:size(data, 1)
@svaksha
svaksha / mapping.jl
Last active August 29, 2015 14:18 — forked from rofinn/mapping.jl
@doc doc"""
Takes a 2d array where each column is a pattern which maps to a row in
the resulting dataframe. Each pattern index is its own column in
the dataframe.
""" ->
function DataFrame(data::Array{Float64, 2})
m = data'
result = DataFrame()
for i in 1:size(data, 1)
@svaksha
svaksha / hn_seach.js
Last active September 12, 2015 11:52 — forked from kristopolous/hn_seach.js
hn job query search
function query() {
var
total = 0, shown = 0,
// HN is done with very unsemantic classes.
job_list = Array.prototype.slice.call(document.querySelectorAll('.c5a,.cae,.c00,.c9c,.cdd,.c73,.c88')),
query_list = Array.prototype.slice.call(arguments);
// This traverses up the dom stack trying to find a match of a specific class
function up_to(node, klass) {
if (node.className === klass) {
@svaksha
svaksha / meetup.jl
Created October 20, 2015 11:48 — forked from tmlbl/meetup.jl
Script to find Julia developers in your area using the GitHub API
using HTTPClient: HTTPC
using JSON
# Fill in your city name and GitHub API token
const MEETUP_LOCATION = lowercase("Seattle")
const API_TOKEN = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
# Pages of search results to examine. Warning - you WILL hit the rate limit
const NUM_PAGES = 1
typealias Field Union{AbstractString,Void}
@svaksha
svaksha / jvm
Created October 20, 2015 11:48 — forked from tmlbl/jvm
JVM - Julia Version Manager
#!/bin/bash
# I keep Julia binaries in /opt/julia with the same directory structure
# as ~/.julia to store different versions, and use this script to switch
# between them. I also like to maintain a link of the ~/.julia folder to
# ~/julia, for easier package development.
JBIN=""
PDIR=""
@jiahao
jiahao / custom.css
Created December 1, 2013 08:28
Experimental typographically tinkered IJulia stylesheet To use, place in ~/.ipython/profile_julia/static/custom/custom.css and refresh IJulia
/* Experimental typographically tinkered IJulia stylesheet
* Copyright © 2013 Jiahao Chen <jiahao@mit.edu>
* MIT License
*
* To use, place in ~/.ipython/profile_julia/static/custom/custom.css
* and refresh IJulia
*
* Based on suggestions from practicaltypography.com
*/

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: