Skip to content

Instantly share code, notes, and snippets.

@catawbasam
catawbasam / gist:9335068
Created March 3, 2014 21:33
Julia String->Float64 conversion times superlinear?
{
"metadata": {
"language": "Julia",
"name": ""
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
@catawbasam
catawbasam / updated_word_count.jl
Created March 5, 2014 10:41
Update to Julia word count test
# Updated Word Count performance test.
#
# See https://groups.google.com/forum/?fromgroups=#!topic/julia-users/hxfR70Ro-lI
using DataStructures
import Base.hash
hash{T<:ByteString}(s::SubString{T}) = ccall(:memhash, Uint64, (Ptr{Void}, Int), pointer(s), sizeof(s))
@catawbasam
catawbasam / DataFrames.jl push!
Created June 10, 2014 11:29
draft of push!(df::DataFrame, iterable)
{
"metadata": {
"language": "Julia",
"name": "",
"signature": "sha256:7fe5fda6897de221effe8497f91c4705de9d01b5396e52caecc256d571986d30"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
@catawbasam
catawbasam / gist:99043bb74519378428fd
Last active August 29, 2015 14:02
Julia SubString: isvalid ind2chr chr2ind
{
"metadata": {
"language": "Julia",
"name": "",
"signature": "sha256:64712e134a63248c7287bc1cf7858ccd7adc08a2821cce960ef95b28f51ce2e2"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
{
"metadata": {
"language": "Julia",
"name": "",
"signature": "sha256:6fe564fd5807e59cc459bd6bedc3dd57d1c56c392f17ce2401e0ba3677d8161a"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
@catawbasam
catawbasam / gist:e1768937952565213561
Created June 18, 2014 19:27
abstract_anonymous_after
{
"metadata": {
"language": "Julia",
"name": "",
"signature": "sha256:e4991cde234b104b1f7077d9c0d16d41f1d359e58c1c2f3900573a7b513d4566"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
@catawbasam
catawbasam / bench_islower
Last active August 29, 2015 14:05
Julia islower(Char) and islower(String) benchmarks: Base, utf8proc, PCRE
{
"metadata": {
"language": "Julia",
"name": "",
"signature": "sha256:679974b4916c36603648466accbc9c2838242618d92c33c0fcb81297a9e11a79"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
@catawbasam
catawbasam / gist:3ab68615b4c78a5a49b1
Created August 20, 2014 23:07
Julia Char predicates draft
{
"metadata": {
"language": "Julia",
"name": "",
"signature": "sha256:e80d1a82f7cdd977679c61b2cbabab28b09bb50363bbf45c783529686408d275"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
@catawbasam
catawbasam / gist:81b7a15f6de004540eaa
Last active August 29, 2015 14:20
Julia24.ipynb
{
"metadata": {
"language": "Julia",
"name": ""
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
@catawbasam
catawbasam / gist:3858529
Created October 9, 2012 12:31
Autohotkey file to use NotePad++ with the Julia console for REPL-oriented development
;RGUI-like AutoHotKey macros for copying code from Notepad++ to Julia console for REPL-oriented development
; control-F5 will select the current line of text in Notepad++
; control-F6 pastes the clipboard contents into the Julia console, presses <Enter>
; then re-activates Notepad++ and moves the cursor down a line.
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
#Warn ; Recommended for catching common errors.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
;