Skip to content

Instantly share code, notes, and snippets.

View guilledk's full-sized avatar
😎

Guillermo Rodriguez guilledk

😎
View GitHub Profile
Compiling your contracts...
===========================
- Fetching solc version list from solc-bin. Attempt #1
✔ Downloading compiler. Attempt #1.
> Compiling ./contracts/A.sol
> Compiling ./contracts/B.sol
> Compiling ./contracts/G.sol
> Compiling ./contracts/Migrations.sol
> Compilation warnings encountered:
2022-01-05T15:04:51: [65 - 02_continuous_reader] block_num: 47, block_size: 186, traces_size: 335, deltas_size: 526
2022-01-05T15:04:51: [71 - 03_deserializer] Delta struct [contract_row] processing error: Cannot read properties of undefined (reading 'toString')
2022-01-05T15:04:51: [71 - 03_deserializer] [
2022-01-05T15:04:51: 'contract_row_v0',
2022-01-05T15:04:51: {
2022-01-05T15:04:51: code: 'eosio',
2022-01-05T15:04:51: scope: 'eosio',
2022-01-05T15:04:51: table: 'global',
2022-01-05T15:04:51: primary_key: '7235159537265672192',
2022-01-05T15:04:51: payer: 'eosio',
@guilledk
guilledk / isometric_transform.py
Created August 14, 2021 22:48
Shows how coordinate transformations work between cartesian & isometric
#!/usr/bin/env python3
import time
import pygame
from pygame.math import Vector2
# ordinary pygame init
@guilledk
guilledk / trio-pygame.py
Created March 2, 2021 00:53
Proof of concept for trio + pygame integration using trio guest mode
from queue import Queue, Empty
import trio
import pygame
from pygame import Rect
async def trio_main():
for x in range(4):
#include <unistd.h>
#ifdef __MACH__
#include <mach/clock.h>
#include <mach/mach.h>
#endif
#include "butiac.h"
#include "list.h"
@guilledk
guilledk / aqueue.py
Last active February 20, 2020 17:51
Actor queue implementation, with history, and pub-sub
import math
import trio
class AsyncQueue:
def __init__(self):
self.history = []
self.inport, self.outport = trio.open_memory_channel(math.inf)
@guilledk
guilledk / cross-gcc-install.sh
Created December 9, 2018 22:01
Attempt at making an automated gcc cross compiler isntaller, needs work...
#!/usr/bin/env sh
# Usage:
# sh cross-gcc-install.sh [arguments]
# Use this script to download, build and install a gcc cross compiler in ubuntu. Requires root permisions.\n
# Arguments:
#
# [-t|--target] - Set target architecture. Default: "i686-elf"
# [-df|--dependency-file] - Set explicit dependency file. Will try to install with apt-get. Default: "gcc-build-requirements"
# [-lf|--log-file] - Set log file. Default: ".gcc-install-log"
@guilledk
guilledk / tarea2-golf.pas
Created November 9, 2018 06:01
Tarea 2 - P1 2018 Code Golf
function PalabraEnPosicion (palabra : TPalabra; cuadro : TCuadro; posicion : TPosicion) : boolean;
var i : integer;
begin
i := 1;
while (i > 0) and (i <= palabra.largo) do
if ((posicion.columna + i - 1) > MaxColumna) or (cuadro[posicion.fila, posicion.columna + i - 1] <> palabra.letras[i]) then i := -1 else inc(i);
PalabraEnPosicion := true and (i > 0)
end;
procedure ResolverSopa (cuadro : TCuadro; palabras : ConjuntoPalabras; var resultado: OcurrenciasPalabras);
var aux, iter : ListaPosiciones;
@guilledk
guilledk / tarea1-golf.pas
Last active November 9, 2018 05:59
Tarea 1 - P1 2017 Code Golf
Program Tarea1{input, output};
Const MAXLARGO = 7;
Var
base, number, digits, currentDigit : LongInt;
currentChar: Char;
Begin
While currentChar <> '$' Do
Begin
number := 0;
Read(currentChar);
@guilledk
guilledk / butiac-benchmark01.c
Created July 14, 2016 13:51
Prueba de rendimiento de API PyBot
list *times = lnew();
unsigned char raw[6];
struct timespec before;
struct timespec after;
for(int i = 0; i < 1000; i++){
clock_gettime(CLOCK_MONOTONIC, &before);
dev_write_to(bdevh->head->value, opcode, 1, handler);
dev_read(bdevh->head->value, raw, 6);
//printf("Distance[%d]: {%d}\n", handler, 65536 - (raw[4] + raw[5] * 256));