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
"""============================== | |
Branded IPython Notebook Launcher | |
================================= | |
Executing this module will create an overlay over ipython notebooks own static | |
files and templates and overrides static files and templates and copies over all | |
example notebooks into a temporary folder and launches the ipython notebook server. | |
You can use this to offer an interactive tutorial for your library/framework/... |
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
# put this file into any folder under which ipynb files shall be collected. | |
import pytest | |
import os,sys | |
wrapped_stdin = sys.stdin | |
sys.stdin = sys.__stdin__ | |
from IPython.zmq.blockingkernelmanager import BlockingKernelManager | |
sys.stdin = wrapped_stdin | |
from IPython.nbformat.current import reads |
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 Perl6-Github-Linkify | |
// @namespace http://tampermonkey.net/ | |
// @version 0.3.4 | |
// @description Turns paths to perl6 source (core setting, grammar, actions) and moarvm code to clickable links on github issue/PR pages as well as gists | |
// @author Timo 'timotimo' Paulssen | |
// @match https://github.com/*/*/issues/* | |
// @match https://github.com/*/*/pull/* | |
// @match https://gist.github.com/* | |
// @match https://pastebin.com/* |
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
0x7ffff6f518b0 has 4 edges over 3 states; 0 small (0.00) | |
0x7ffff6f52388 has 237 edges over 95 states; 118 small (49.79) | |
0x7ffff6f523e0 has 230 edges over 97 states; 108 small (46.96) | |
0x7ffff6f526c8 has 10 edges over 6 states; 5 small (50.00) | |
0x7ffff6f529d0 has 5 edges over 3 states; 1 small (20.00) | |
Stage start : 0.000 | |
0x7ffff6f5abc8 has 87 edges over 56 states; 43 small (49.43) | |
0x7ffff6f5b460 has 52 edges over 30 states; 20 small (38.46) | |
0x7ffff6f5b4b8 has 44 edges over 28 states; 18 small (40.91) | |
0x7ffff6f97168 has 5 edges over 3 states; 0 small (0.00) |
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
making patch | |
will create seq | |
seq has which Seq|66864704 | |
0 | |
first user: | |
0.5 | |
1 | |
1.5 | |
second user: | |
iterator already taken for this seq: |
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
grep -B1 "^ Frame_" /fileserver-data/new_stuff/work/core.c.setting.dump.txt | grep -A1 -- '^--' | grep -v '^--' | cut -b 1-6 | sort | uniq -c | sort -rn | |
1953 00007 | |
1351 00004 | |
389 00008 | |
344 00034 | |
330 00043 | |
289 00017 | |
262 00020 | |
250 00040 | |
235 00012 |
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
module ADT; | |
#package EXPORT::DEFAULT { }; | |
grammar hs_adt { | |
has @.typevars; | |
rule TOP { | |
$<name>=<.ident> <params> '=' <definers> | |
} | |
rule params { |
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
my $l = Lock.new; my %h; for 1..10 { my $p = start { sleep rand; $l.protect: { say "-- ", $p.WHERE; say %h.elems; %h{$p.WHERE}:delete; say %h.elems } }; say "+", $p.WHERE; %h{$p.WHERE} = $p; }; await %h.values; note %h.elems |
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
-- for testing, completely reset highest_child_id columns | |
update calls set highest_child_id = NULL; | |
-- find rows where no other row has the row's id as its parent_id | |
-- those shall seed the progress with initial "highest child id" | |
-- values | |
with no_children as (select id from | |
(select c.id as id, count(children.id) as childcount | |
from calls c | |
left join calls children on c.id == children.parent_id |
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
unit class HashyObject; | |
has %!storage; | |
submethod TWEAK(*%data) { %!storage = %data } | |
submethod FALLBACK($name, |c) is rw { %!storage{$name} }; | |
method perl { | |
self.^name ~ ".new(" ~ %!storage.pairs.map(*.perl).join(", ") ~ ")" |
NewerOlder