Skip to content

Instantly share code, notes, and snippets.

View memowe's full-sized avatar
🦉

Mirko Westermeier memowe

🦉
View GitHub Profile
$ perl merge.pl classification_new_strong_corrected classification_dominik_2012-12-10 > classification_new_strong_corrected_dominik
reading... at merge.pl line 9.
warning: 77910042837254144 is a duplicate! at merge.pl line 19, <> line 306.
whoops: new classification! at merge.pl line 20, <> line 306.
warning: 78472953137725440 is a duplicate! at merge.pl line 19, <> line 307.
warning: 86916182031990784 is a duplicate! at merge.pl line 19, <> line 309.
warning: 91985792922025984 is a duplicate! at merge.pl line 19, <> line 310.
warning: 116472199447052288 is a duplicate! at merge.pl line 19, <> line 311.
whoops: new classification! at merge.pl line 20, <> line 311.
warning: 122945927798325248 is a duplicate! at merge.pl line 19, <> line 312.
#!/usr/bin/env perl
use strict;
use warnings;
use feature 'say';
use Devel::Peek;
my $sep = '';
my $number = "110110110110111";
$ perl -E 'sub a { my ($b, @c) = @_; $c[0]++ } my @d = (42); a(17, @d); say @d'
42
$ perl -E 'sub a { my ($b, $c) = @_; $c->[0]++ } my @d = (42); a(17, \@d); say @d'
43
2115 (2115..2210) factor: 2,62 |
2116 (2115..2210) factor: 2,62 |
2118 (2115..2210) factor: 2,62 |
2119 (2115..2210) factor: 0,45 |
2121 (2115..2210) factor: 1,19 |
2122 (2115..2210) factor: 0,91 |
2123 (2115..2210) factor: 0,12 |
2125 (2115..2210) factor: 0,92 |
2126 (2115..2210) factor: 1,28 |
2128 (2115..2210) factor: 0,20 |
@memowe
memowe / wrong_test_server.t
Created August 30, 2012 02:16
Wrong test server (Mojolicious 3.36 on Perl 5.12.1)
package Foo;
use Mojo::Base 'Mojolicious';
use Mojolicious::Commands;
sub startup { shift->routes->route('/')->to({text => 'YO'}) }
$ENV{MOJO_APP} = 'Foo';
use Test::More tests => 3;
use Test::Mojo;
my $t = Test::Mojo->new;
$VAR1 = [
{
'ra' => '17.013516',
'specObjID' => '119004968689598464',
'dec' => '15.226029'
},
{
'ra' => '17.014036',
'specObjID' => '119004968475688960',
'dec' => '15.425605'
not srand xor s qq qx xor s x x length uc
ord and print uc chr ord for qw q join qx
xor eval xor lc eval qq x abs cos ord and
print chr ord for qw q use substr tied qx
xor print qq q q xor int eval lc qq m cos
and print chr ord for qw y abs ne or tied
hex exp ref y m xor scalar srand print qq
q q xor sin abs eval q x log srand ord or
printf uc chr ord foreach qw q package qx
xor sqrt eval lc qq y sqrt cos and printf
/* Created on 02.06.2012 */
package clastro.classification;
import java.util.ArrayList;
import java.util.List;
import libsvm.*;
public class SVMTest {
@Test
public void testSearchCommand() {
// prepare too loose request
String output = csh.executeLine("search -ra >42 foosearch");
assertEquals("Constraints:\nsp.ra > 42.0\nObjects: 837082", output);
// specialize request
output = csh.executeLine("se -dec >66 foosearch");
assertEquals("Constraints:\nsp.ra > 42.0\nsp.dec > 66.0\nObjects: 4373", output);
@memowe
memowe / gist:2629929
Created May 7, 2012 19:47
ClastroShell
Welcome to Clastro!
Type 'help' if you need help using me:
clastro> help
Syntax: clastro> subcommand [options] [arguments]
Available subcommands:
alias
help
load
show