Skip to content

Instantly share code, notes, and snippets.

jonathan MERCIER bioinfornatics

Block or report user

Report or block bioinfornatics

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View CDSIM.5.2.user.js
// ==UserScript==
// @name CDSIM
// @description CENTER DRIVEN's Combat Simulator and Combat Stats Fork
// @author XDAAST.XDaast.daltondaast.KingCrimson | Thanks to Topper42, Eferz98, KRS_L, PythEch, MrHIDEn, Panavia2, Deyhak, CodeEcho, Matthias Fuchs, Enceladus, TheLuminary, Da Xue, Quor, WildKatana, Peluski17, Eistee
// @version 5.2
// @namespace http*://*.alliances.commandandconquer.com/*/index.aspx*
// @include http*://*.alliances.commandandconquer.com/*/index.aspx*
// @icon https://www.openmerchantaccount.com/img/cdCNCTALOGObigger.png
// @updateURL https://userscripts.org/scripts/source/173566.meta.js
// @downloadURL https://userscripts.org/scripts/source/173566.user.js
View computeMatrixDiag
#!/usrbin/env python
def getMaxRowLength( matrix ):
maxLen = 0
for i in matrix:
if len(i) > maxLen:
maxLen = len(i)
return maxLen
def computeDiag( matrix, i , j ):
View bench.pl
#!/usr/bin/env perl
use strict;
use warnings;
use 5.010;
use List::MoreUtils qw(uniq);
#use Data::Dumper::Names;
use Benchmark qw(:all) ;
sub test1 {
my @tab = (["12","25","2","18","9","25","18","30","30","12","30","30","18","12"],["154","12","56","8","22","88","74","12","56","32","88","88","56","12","12","56"]);
View test.pl
#!/usr/bin/env perl
use strict;
use warnings;
use 5.010;
use List::MoreUtils qw(uniq);
use Data::Dumper::Names;
my @tab = (["12","25","2","18","9","25","18","30","30","12","30","30","18","12"],["154","12","56","8","22","88","74","12","56","32","88","88","56","12","12","56"]);
print "=============Before=============\n";
View gist:2024722
$ diff runtime/phobos/std/regex.d ../phobos/std/regex.d
184c184
< $(WEB http://unicode.org/reports/tr18/, UTS 18). Specifically:
---
> $(WEB unicode.org/reports/tr18/, UTS 18). Specifically:
5560a5561,5564
> static if(direction == OneShot.Fwd)
> startPc = startPc;
> else
> startPc = cast(uint)re.ir.length-IRL!(IR.LookbehindEnd);
View gist:1974263
import std.string;
import std.stdio;
import std.range;
import std.lowercase;
mixin template delegates( alias instance, methods... ){
static if( methods.length > 0 ){
static if( hasmembers(instance, methods[0]) ){
alias ReturnType!(methods[0]) type; // function/method type returned for first method
View gist:1974033
import std.traits;
import std.stdio;
import std.string;
import std.range;
import std.ascii; // lowercase
static string getFunctionParameterString(T, S)( T ptt, S pstc ) @safe pure nothrow{
enum result = "";
static if( ptt.length > 0 && pstc.length > 0 && ptt.length == pstc.length){
result = ptt[0].stringof ~" "~ pstc.stringof ~" ";
View gist:1969776
import std.string;
import std.stdio;
import std.range;
mixin template arrayDelegator( alias instance, methods... ){
static if( methods.length > 0 ){
static if( methods[0] == "opIndexAssign" ){
mixin("
void opIndexAssign( " ~ ElementEncodingType!(typeof(instance)).stringof ~ " value, size_t index ){
array[index] = value;
View gist:1946669
/**
* The module csv is a set of function to parse many format using a delimitter as csv file
* Supported format:
* - .mat matrix file
* - .bed UCSC file
* For parse a .csv file use std.csv
*/
module bed;
import std.conv;
View gist:1946288
/**
* The module csv is a set of function to parse many format using a delimitter as csv file
* Supported format:
* - .mat matrix file
* - .bed UCSC file
* For parse a .csv file use std.csv
*/
module bed;
import std.conv;
You can’t perform that action at this time.