Skip to content

Instantly share code, notes, and snippets.

@jacqueswww
jacqueswww / yolo_classes.json
Created April 28, 2026 14:25 — forked from rcland12/yolo_classes.json
A list of all 80 YOLO classes and its index in JSON format.
{
"class": {
"0": "person",
"1": "bicycle",
"2": "car",
"3": "motorcycle",
"4": "airplane",
"5": "bus",
"6": "train",
"7": "truck",
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>The Howl on the Airwaves: An Interactive Exploration of "Eve of Destruction"</title>
<script src="https://cdn.tailwindcss.com"></script>
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
@jacqueswww
jacqueswww / vyper_ast.py
Last active November 9, 2021 02:55
First VyperNode output
class VyperNode:
def __init__(source_code, pos):
self.source_code = source_code
self.lineno, self.col_offset = pos
class Name(VyperNode):
pass
@jacqueswww
jacqueswww / README.md
Created August 11, 2020 22:21 — forked from arikfr/README.md
Setting up HTTPS with LetsEncrypt for Redash Docker Deployment
  1. Make sure the domain you picked points at the IP of your Redash server.
  2. Switch to the root user (sudo su).
  3. Create a folder named nginx in /opt/redash.
  4. Create in the nginx folder two additional folders: certs and certs-data.
  5. Create the file /opt/redash/nginx/nginx.conf and place the following in it: (replace example.redashapp.com with your domain name)
    upstream redash {
        server redash:5000;
    }
    
@jacqueswww
jacqueswww / priority_stake.v.py
Last active November 27, 2019 15:29
Stake Based Priority Queuing
from vyper.interfaces import ERC20
implements: ERC20
MINIMUM_STAKE: constant(uint256(wei)) = 1 * 10 ** 17
NONREFUNDABLE_DEPOSIT: constant(uint256) = 5 * 10 ** 16
Transfer: event({_from: indexed(address), _to: indexed(address), _value: uint256})
Approval: event({_owner: indexed(address), _spender: indexed(address), _value: uint256})
@jacqueswww
jacqueswww / run_geth.sh
Created October 2, 2019 14:22
Final ewasm testnet run_geth
#!/bin/bash
set -ex
LIB_HERA_PATH="./hera/build/src/libhera.so"
TMP_PATH="./ewasm-node/4201/"
if [[ ! -d $TMP_PATH ]]; then
echo "Running init"
./build/bin/geth --datadir $TMP_PATH init ewasm-testnet-geth-config.json
fi
Final Contract Code:
proc copy_into_ba(to_ba: var auto; offset: int; from_ba: auto) =
for i, x in from_ba:
if offset + i > sizeof(to_ba) - 1:
break
to_ba[offset + i] = x
func to_bytes32(a: uint128): bytes32 =
var tmp: bytes32
#!/bin/bash
LIB_HERA_PATH="./hera/build/src/libhera.so"
TMP_PATH="./ewasm-node/4201/"
if [[ ! -d $TMP_PATH ]]; then
./build/bin/geth --datadir $TMP_PATH init ewasm-testnet-geth-config.json
fi
./build/bin/geth --vm.ewasm="$LIB_HERA_PATH,metering=true,fallback=true" \
{
"config": {
"chainId": 66,
"homesteadBlock": 0,
"eip150Block": 0,
"eip150Hash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"eip155Block": 0,
"eip158Block": 0,
"byzantiumBlock": 0,
"ewasmBlock": 0,
@jacqueswww
jacqueswww / pre_vdb_ipdb.py
Last active September 25, 2019 16:20
Pretty Damn awful, PyEVM Virtual Machine debugger. Using a custom opdcode set in Vyper ;)
def debug_opcode(computation):
print('YOUR ARE HERE!')
import ipdb; ipdb.set_trace()
import evm
from evm.vm.opcode import as_opcode
from vyper.opcodes import opcodes as vyper_opcodes
from evm.vm.forks.byzantium.computation import ByzantiumComputation
opcodes = ByzantiumComputation.opcodes.copy()