Skip to content

Instantly share code, notes, and snippets.

View agostbiro's full-sized avatar

Agost Biro agostbiro

View GitHub Profile
@agostbiro
agostbiro / send-transaction.js
Created October 18, 2023 14:53
Hardhat Network `eth_sendTransaction` performance test
/* Performance test for Hardhat Network with the `eth_sendTransaction` method. Reports the elapsed time for 1000 calls.
To run:
1. Check out the Hardhat repo: `git clone https://github.com/NomicFoundation/hardhat/`
2. `cd hardhat`
3. `yarn`
4. `cd packages/hardhat-core`
5. `yarn build`
6. `node send-transaction.js`
@agostbiro
agostbiro / notes.md
Created June 30, 2023 11:53
`near-sdk-rs` maintainer call 2023-06-30

Present: @frol, @uint, @agostbiro

@frol gives background on Near tooling development:

  • Collections recap:
    • Rust STD lib collections: usable but high gas since entire collection must be loaded and serialized each time it’s used.
    • near-sdk-rs collections: solve gas problem, but not std compatible interface bc of ownership differences, no way to get mut reference.
    • near-sdk-rs store: works like rust collections, drop flushes, must do manual flush if checking storage size before drop.
  • We should import near cli functionality to cargo near
  • We should unify as much as possible between the tooling crates
@agostbiro
agostbiro / profile.txt
Created December 9, 2018 10:03
RawEventFileLoader profile
Sun Dec 9 10:37:23 2018 read_long.profile
113373201 function calls (110609736 primitive calls) in 104.099 seconds
Ordered by: cumulative time
[1]ncalls [2]tottime percall [3]cumtime percall [4]filename:[5]lineno(function)
1229/1 0.097 0.000 106.547 106.547 {built-in method builtins.exec}
1 0.967 0.967 106.547 106.547 read.py:1([6]<module>)
2740834 6.420 0.000 102.624 0.000 site-packages/tensorboard/backend/event_processing/event_file_loader.py:42([7]Load)
@agostbiro
agostbiro / raw_event_file_loader_profiling.py
Created December 9, 2018 09:48
RawEventFileLoader profiling
import argparse
from tensorboard.backend.event_processing.event_file_loader import RawEventFileLoader
parser = argparse.ArgumentParser()
parser.add_argument('event_file')
args = parser.parse_args()
@agostbiro
agostbiro / Dockerfile.devel-cpu-mkl
Last active February 15, 2018 15:25
Dockerfile to reproduce MKL bug in TF 1.6
FROM tensorflow/tensorflow:latest-devel
# Based on https://github.com/tensorflow/tensorflow/blob/master/tensorflow/tools/docker/Dockerfile.devel-cpu-mkl
# Original by Clayne Robison<[email protected]>
# These arguments are parameterized. Use --build-args to override.
ARG TF_BRANCH=r1.6
ARG WHL_DIR=/whl
@agostbiro
agostbiro / fxaa.glsl
Created August 10, 2016 11:45
FXAA 3.11 WebGL port
// FXAA 3.11 implementation by NVIDIA (github.com/NVIDIAGameWorks/GraphicsSamples)
// Ported to WebGL by Agost Biro (github.com/abiro)
//----------------------------------------------------------------------------------
// File: es3-kepler\FXAA\assets\shaders/FXAA_DefaultES.frag
// SDK Version: v3.00
// Email: [email protected]
// Site: http://developer.nvidia.com/
//
// Copyright (c) 2014-2015, NVIDIA CORPORATION. All rights reserved.
@agostbiro
agostbiro / compose-proto-chain.js
Last active August 29, 2015 14:24
Composing a prototype chain in JavaScript
// A demonstration of composing a prototype chain from a list of objects by
// appending to the prototype chain of the first object, the rest of the
// objects.
'use strict';
var assign = Object.assign || require('object.assign');
@agostbiro
agostbiro / prototypal-inheritance-new.js
Last active August 29, 2015 14:17
Simple JavaScript prototypal inheritance with the 'new' keyword
function A()
{
this.a = 'a';
}
A.prototype.foo = function foo()
{
console.log('foo');
};