Skip to content

Instantly share code, notes, and snippets.

@jkeroes
jkeroes / Perl testing
Last active November 19, 2019 01:51
Perl testing.md
# Testing
## SYNOPSIS
use Ndn::Test::Bundle -target => 'Ndn::Foo'; # Sets $CLASS to 'Ndn::Foo'
database dreamhost {
table foo {
row { col1 => 1, col2 => 2 };
row { col1 => 3, col2 => 4 };

Keybase proof

I hereby claim:

  • I am jkeroes on github.
  • I am jkeroes (https://keybase.io/jkeroes) on keybase.
  • I have a public key whose fingerprint is A26B E894 F5A1 62DA 637F 0649 68C7 7D82 E512 C25F

To claim this, I am signing this object:

root@home:~# docker run -it b.gcr.io/tensorflow/tensorflow
root@cc66321b9eeb:~#
root@cc66321b9eeb:~# export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/usr/local/cuda/lib64"
root@cc66321b9eeb:~# export CUDA_HOME=/usr/local/cuda
root@cc66321b9eeb:~#
root@cc66321b9eeb:~# python /usr/local/lib/python2.7/dist-packages/tensorflow/models/image/mnist/convolutional.py
Succesfully downloaded train-images-idx3-ubyte.gz 9912422 bytes.
Succesfully downloaded train-labels-idx1-ubyte.gz 28881 bytes.
Succesfully downloaded t10k-images-idx3-ubyte.gz 1648877 bytes.
Succesfully downloaded t10k-labels-idx1-ubyte.gz 4542 bytes.
#!/usr/bin/env perl
use 5.010;
use strict;
use warnings;
use Benchmark qw(:hireswallclock cmpthese);
use List::MoreUtils qw(all any);
my @data_sizes = (10_000);
my $key_count = 10;
#!/usr/bin/env perl
use 5.010;
use strict;
use warnings;
use Benchmark qw(:hireswallclock cmpthese);
use List::MoreUtils qw(all any);
my @data_sizes = (100_000);
my $key_count = 10;
@jkeroes
jkeroes / bench.pl
Last active February 3, 2016 23:16
#!/usr/bin/env perl
use 5.010;
use strict;
use warnings;
use Benchmark qw(:hireswallclock cmpthese);
use List::MoreUtils qw(uniq);
my @data_sizes = (15_000, 150_000);
# my @data_sizes = (5_000, 20_000);
@jkeroes
jkeroes / bench.pl
Last active February 3, 2016 23:13
benchmarking uniq
#!/usr/bin/env perl
use 5.010;
use strict;
use warnings;
use Benchmark qw(:hireswallclock cmpthese);
use List::MoreUtils qw(uniq);
my @data_sizes = (15_000, 150_000);
# my @data_sizes = (5_000, 20_000);
@jkeroes
jkeroes / gist:bab0bab4e1f0f2ae39cd
Created August 5, 2014 18:04
~/.tmuxinator/ndn.yml
# via http://www.railsonmaui.com/blog/2014/03/11/rocking-with-tmux-tmuxinator-and-iterm2-for-rails-development/
#
# First brew install tmux, gem install tmuxinator, and download item2
# Copy this file here: ~/.tmuxinator/my_project.yml
# Modify the paths (replace ~/my_project with your directory)
# Invoke with
# mux project
# Then hit 'Ctrl-a d' to detach
# Then run 'tmux -CC attach'
# Make sure that option for iterm2 is General --> tmux --> When attaching, open unrecognized windows in Tabs
@jkeroes
jkeroes / gist:a9ae6be73fc6106d9a1e
Created June 6, 2014 18:20
Perl and memory leak handling
## Memory leaks
Tracking memory leaks:
Devel::Arena - sv_stats() returns arena structures used for SV allocation
* Devel::Cycle - find_cycle($ref) returns all cycles found in $ref and the perl variables they point to
Devel::Gladiator - walk Perl variable arena
Devel::Leak - deprecated by Devel::LeakTrace::Fast
Devel::LeakTrace - deprecated by Devel::LeakTrace::Fast
* Devel::LeakTrace::Fast - prints leaked SV's and line numbers at END.
Data::Structure::Util - has_circular_ref($ref) returns ref to link in $ref that is circular or false.
<?xml version="1.0" encoding="UTF-8"?>
<!--Auto-generated by the type catalog local manager.-->
<DataModel namespace="http://im.ca.com/normalizer" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="IMDBCertificationFacet.xsd">
<FacetType name="IntegraFirewallSessions" descriptorClass="com.ca.im.core.datamodel.certs.NormalizedFacetDescriptorImpl">
<Documentation>Defines the session-related metrics on a PAN firewall.</Documentation>
<FacetOf namespace="http://im.ca.com/core" name="Item" />
<AttributeGroup name="AttributeGroup" external="true" list="true">
<Attribute name="ActiveSessions" type="int">
<Documentation>The Active Sessions count.</Documentation>
<Polled>true</Polled>