Skip to content

Instantly share code, notes, and snippets.

Edwin Rodríguez edwrodrig

  • Instituto Milenio de Oceanografía
  • Concepción, Chile
Block or report user

Report or block edwrodrig

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
@edwrodrig
edwrodrig / compiler.php
Created Dec 10, 2018
Compiler and process for my own language
View compiler.php
<?php
$cpu_00 = [
'set' => [
0,
['var', 'value']
],
'set_a' => [
1,
['var']
@edwrodrig
edwrodrig / bray_curtis.php
Created Dec 10, 2018
Some bray curtis example
View bray_curtis.php
<?php
$a = [
'a' => [
'a1' => 2,
'a2' => 0
],
'b' => [
'b1' => 2,
'b2' => 5
@edwrodrig
edwrodrig / libro.cpp
Created Aug 18, 2018
Tarea de programación de la U
View libro.cpp
class libro{
private:
article *diario;
autor *mister;
public:
libro(); //constructor libro
~libro(); //destructor libro
void reset(); //Resetear libro
void add_articulo(char *); //agregar articulo
void add_autor(char *); //agregar autor
View Linux library
#/bin/sh
LD_LIBRARY_PATH=/usr/local/bosque
export LD_LIBRARY_PATH
exec /usr/local/bosque/app.binary \$@
EOL
@edwrodrig
edwrodrig / ec_line.php
Created Jul 5, 2018
Extract EC from line
View ec_line.php
<?php
function parse_ec($linea) {
if ( preg_match("/\[EC:([\d\. ]*)\]/", $linea, $matches) ) {
$content = $matches[1];
return explode(' ', $content);
} else return [];
}
@edwrodrig
edwrodrig / all_files.php
Last active Jun 29, 2018
Run multiple files
View all_files.php
<?php
$files = glob("*.txt");
foreach ( $files as $file ) {
system("php arbitrary.php $file.out $file dan dan kokoro hikareteku");
}
View matrix_ptr_of_ptr.cpp
#include <cstdio>
#include <stdlib.h>
int main() {
int size = 3;
int** matrix = (int **)malloc(sizeof(int*) * size);
for ( int i = 0 ; i < size ; i ++ ) {
View recursivity.php
<?php
$nodo = [
'm1',
'ec1',
'tax1',
'tax2',
'd1',
'd2',
'ec2'
];
@edwrodrig
edwrodrig / contar.php
Created Jun 15, 2018
Ejercicio de contar llaves
View contar.php
<?php
$m = ['hola', 'chao', 'hola'];
$m = [
['beta', 2],
['beta', 4],
['gamma', 3],
['gamma', 7],
['delta', 11]
@edwrodrig
edwrodrig / seq.php
Created Jun 15, 2018
Ejercicio con secuencia de ADN
View seq.php
<?php
//$seq = 'ACTGTC----GATGTAC----GTACGTGACTG-------TACG-TAC-GTAGCTAGTC';
$seq = 'ACC';
$largo = strlen($seq);
$pos_0 = $seq[0];
$concat = 'AB' . 'C';
You can’t perform that action at this time.