Skip to content

Instantly share code, notes, and snippets.

View gs0510's full-sized avatar
🍉

Gargi Sharma gs0510

🍉
View GitHub Profile
@gs0510
gs0510 / day1.py
Created December 1, 2023 15:59
AoC 2023
import re
digitMap = {'one': '1', 'two':'2', 'three': '3', 'four': '4', 'five': '5', 'six': '6', 'seven': '7', 'eight': '8', 'nine': '9', '1': '1', '2':'2', '3': '3', '4': '4', '5': '5', '6': '6', '7': '7', '8': '8', '9': '9'}
def getNum1(s):
print(s)
digits = re.findall(r'\d', s)
return int(digits[0]+digits[-1])
def getNum2(s):
This file has been truncated, but you can view the full file.
Message
2023-10-03T23:21:11.381Z [INFO] client.alloc_runner.task_runner.task_hook.logmon: plugin process exited: alloc_id=1898720d-a30b-a1ef-5e1a-c40b498f2864 task=box-agent path=/usr/bin/nomad pid=11333
2023-10-03T23:21:11.370Z [INFO] client.driver_mgr.raw_exec.executor: plugin process exited: alloc_id=1898720d-a30b-a1ef-5e1a-c40b498f2864 driver=raw_exec task_name=box-agent path=/usr/bin/nomad pid=11344
2023-10-03T23:21:10.378Z [INFO] client.alloc_runner.task_runner.task_hook.logmon: plugin process exited: alloc_id=c9be6301-8a48-f6a4-7f96-4a5ef1c4cc93 task=box-agent path=/usr/bin/nomad pid=11239
2023-10-03T23:21:10.365Z [INFO] client.driver_mgr.raw_exec.executor: plugin process exited: alloc_id=c9be6301-8a48-f6a4-7f96-4a5ef1c4cc93 driver=raw_exec task_name=box-agent path=/usr/bin/nomad pid=11252
2023-10-03T23:21:09.535Z [INFO] client.alloc_runner.task_runner.task_hook.logmon: plugin process exited: alloc_id=78cf6dd8-665d-6a41-f6e8-5338d5e45a15 task=box-agent path=/usr/bin/nomad pid=11222
2023-10-03T23:21:09.
7228d8d 50 max-plan-attempts box-run/hvc_ae54bc630afb446197f194e764ed default <none> blocked N/A - In Progress
2b2a52de 50 max-plan-attempts box-run/hvc_853f1909e73646d294cf759837ec default <none> blocked N/A - In Progress
a713d92a 50 max-plan-attempts box-run/hvc_58c94efefa394d53ab9d47cc579e default <none> blocked N/A - In Progress
8738eb9c 50 max-plan-attempts box-run/hvc_759d3a7985804d93a654bf846abd default <none> blocked N/A - In Progress
b7b0811f 50 max-plan-attempts box-run/hvc_49dd94269abe4483bd2b8732bafc default <none> blocked N/A - In Progress
bc5c74ad 50 max-plan-attempts box-run/hvc_c135cc186aeb4185a3c42cde9876 default <none> blocked N/A - In Progress
a807d3e3 50 max-plan-attempts box-run/hvc_87b768ddc94b420f9511a0f1d9c0 default <none> blocked N/A - In Progress
5c162cd9 50 max-plan-attempts box-run/hvc_37461bc1fc3548d1a24fdf38012c default <none> blocked N/A
@gs0510
gs0510 / day3.py
Created December 3, 2022 18:18
day3 aoc
def common(str1, str2,str3: None):
if not str3:
return sum([ (ord(val)-ord('a')+1) if val.islower() else (ord(val)-ord('A')+27) for val in list(set(str1)&set(str2))])
else:
return sum([ (ord(val)-ord('a')+1) if val.islower() else (ord(val)-ord('A')+27) for val in list(set(str1)&set(str2)&set(str3))])
def run1():
data = open('input.txt', 'r').read().split('\n')
return sum([common(line[0:(len(line)//2)], line[(len(line)//2):], None) for line in data])
@gs0510
gs0510 / gist:56d2fadefe5e7a57418a5d86eb11a9a5
Created February 3, 2022 18:07
ocaml compiler benchmarks
{
"data": {
"benchmarks": [
{
"commit": "22b6e30f48ef763708e7403a23b8328d1e3e37b6",
"metrics": {
"ocamlopt.large_objects.ml": 2.032,
"ocamlopt-linscan.large_objects.ml": 0.308
},
"test_name": "generate"
@gs0510
gs0510 / one.ml
Created September 30, 2021 13:10
OCaml compiler benchmarks example files
module type A = sig
module type A = sig
module type A = sig
module type A = sig
module type A = sig
module type A = sig
module type A = sig
module type A = sig
module type A = sig
module type A = sig
SHELL=/bin/bash
NVM=. ~/.nvm/nvm.sh
ifeq ($(VERCEL), 1)
# The yarn version is picked from .engines in package.json
YARN=yarn
# Put .esy in node_modules for caching in Vercel
ESY=export ESY__PREFIX=$$PWD/node_modules/.esy && npx esy
BSB=npx bsb
{
"results":[
{
"name":" 1 - Trace Replay - main metrics",
"metrics":{
"CPU time elapsed (s)":[
0.0003029999999997202
],
"TZ-transactions per sec":[
0
@gs0510
gs0510 / gist:d56b0fc213c6f14d75868516b960d874
Last active May 10, 2021 14:57
strace dune in docker
openat(AT_FDCWD, "/tmp/dune.5274e6.bench/_build/default/dune-bench/patdiff.v0.14.0/duniverse/sexplib/unix/lib/.sexplib_unix.objs", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = 3
fstat(3, {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
getdents64(3, /* 6 entries */, 32768) = 224
getdents64(3, /* 0 entries */, 32768) = 0
close(3) = 0
unlink("/tmp/dune.5274e6.bench/_build/default/dune-bench/patdiff.v0.14.0/duniverse/sexplib/unix/lib/.sexplib_unix.objs/sexplib_unix__Sexplib_unix_conv.impl.all-deps") = 0
unlink("/tmp/dune.5274e6.bench/_build/default/dune-bench/patdiff.v0.14.0/duniverse/sexplib/unix/lib/.sexplib_unix.objs/sexplib_unix_conv.ml.d") = 0
openat(AT_FDCWD, "/tmp/dune.5274e6.bench/_build/default/dune-bench/patdiff.v0.14.0/duniverse/sexplib/unix/lib/.sexplib_unix.objs/native", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = 3
fstat(3, {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
getdents64(3, /* 6 entries */, 32768) = 240
@gs0510
gs0510 / cron.sh
Created March 8, 2021 14:58
Shell script run by cron job
#! /bin/sh
docker build . -t tezos_test --build-arg tezos_branch=vbot@store_layer
docker run --mount type=bind,source=/data/gargi/results,target=/data tezos_test ./offline_bootstrap.sh