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
{ | |
"translatorID": "bc03b4fe-436d-4a1f-ba59-de4d2d7a63f7", | |
"label": "CSL JSON", | |
"creator": "Simon Kornblith", | |
"target": "json", | |
"minVersion": "3.0b3", | |
"maxVersion": "", | |
"priority": 100, | |
"inRepository": true, | |
"translatorType": 3, |
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
// PY-APPSCRIPT | |
self.asApp.make(new=k.custom_document_property, at=self.asDoc, with_properties={k.name:docPropertyName, k.value:docPropertyValue}) | |
// SCRIPTING BRIDGE | |
NSAppleEventDescriptor *rd = [NSAppleEventDescriptor recordDescriptor]; | |
[rd setDescriptor:[NSAppleEventDescriptor descriptorWithString:currentPropertyName] forKeyword:'pnam']; | |
[rd setDescriptor:[NSAppleEventDescriptor descriptorWithString:currentPropertyValue] forKeyword:'DPVu']; | |
[doc->sbApp sendEvent:'core' id:'crel' parameters:'kocl', @"mCDP", 'insh', doc->sbDoc, 'prdt', rd]; |
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/python | |
LINE_WIDTH = 2; | |
CIRCLE_RADIUS = 6 | |
IMG_SIZE = 16; | |
NUM_ARCS = 20; | |
import subprocess; | |
p = subprocess.Popen(["gs", "-dSAFER", "-dNOPAUSE", "-r72", "-sDEVICE=pngalpha", | |
"-sOutputFile=arcs.png", "-"], stdin=subprocess.PIPE); |
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
var AsyncComparator = function(list) { | |
this.listsAtCurrentLevel = []; | |
this.listsAtNextLevel = []; | |
this.listMerged = []; | |
for(var i=0; i<list.length; i++) { | |
this.listsAtCurrentLevel[i] = [list[i]]; | |
} | |
}; | |
AsyncComparator.prototype.getA = function() { |
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
<rdf:RDF | |
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" | |
xmlns:res="http://purl.org/vocab/resourcelist/schema#" | |
xmlns:z="http://www.zotero.org/namespaces/export#" | |
xmlns:dcterms="http://purl.org/dc/terms/" | |
xmlns:address="http://schemas.talis.com/2005/address/schema#" | |
xmlns:foaf="http://xmlns.com/foaf/0.1/" | |
xmlns:bibo="http://purl.org/ontology/bibo/" | |
xmlns:link="http://purl.org/rss/1.0/modules/link/"> | |
<z:UserItem rdf:about="http://zotero.org/users/67180/items/4BUASI6R"> |
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
using HDF5, JLD | |
const MATRIX_SIZE = 1000 | |
# Write test file | |
x = rand(MATRIX_SIZE, MATRIX_SIZE) | |
jld = jldopen("test.jld", "w") | |
write(jld, "x", x) | |
close(jld) | |
macro s() |
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
julia> f(x) = for i = 1:length(x); @inbounds x[i] *= 2; end | |
# methods for generic function f | |
f(x) at none:1 | |
julia> disassemble(f, (Matrix{Float64},)) | |
define void @julia_f(i8**) { | |
top: | |
%1 = getelementptr i8** %0, i64 2, !dbg !3364 | |
%2 = load i8** %1, align 8, !dbg !3364 |
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
define void @julia_f(i8**, i64) #2 { | |
top: | |
%2 = icmp slt i64 %1, 1, !dbg !3364 | |
br i1 %2, label %L2, label %if.lr.ph, !dbg !3364 | |
if.lr.ph: ; preds = %top | |
%3 = getelementptr i8** %0, i64 1, !dbg !3369 | |
%4 = load i8** %3, align 8, !dbg !3369 | |
%5 = bitcast i8* %4 to double*, !dbg !3370 | |
br label %if, !dbg !3364 |
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
define void @julia_f(%jl_value_t*, i64) #2 { | |
top: | |
%2 = icmp slt i64 %1, 1, !dbg !3364 | |
br i1 %2, label %L2, label %if.lr.ph, !dbg !3364 | |
if.lr.ph: ; preds = %top | |
%3 = getelementptr inbounds %jl_value_t* %0, i64 1, i32 0, !dbg !3369 | |
%4 = load %jl_value_t** %3, align 8, !dbg !3369 | |
br label %if, !dbg !3364 |
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
Commit 5d05a4876df53257c7fde518ab3598cf9adeb6f9 | |
➜ perf>make | |
fib 0.103 0.105 0.104 0.001 | |
parse_int 0.332 0.344 0.338 0.005 | |
mandel 0.332 0.338 0.334 0.003 | |
quicksort 0.495 0.512 0.503 0.007 | |
pi_sum 48.416 56.452 51.751 3.129 | |
rand_mat_stat 48.037 70.606 59.050 9.001 | |
rand_mat_mul 79.485 129.067 98.886 20.258 | |
printfd 47.455 73.397 54.434 10.801 |
OlderNewer