Skip to content

Instantly share code, notes, and snippets.

View tate2301's full-sized avatar
💭
Working from home

Atipamara tate2301

💭
Working from home
View GitHub Profile
@tate2301
tate2301 / handleLeadingZero.ts
Created February 21, 2024 23:24
Remove leading zero when dealing with number input
function handleLeadingZero(value: string, maxLength: number = 256) {
if (value.length > 1 && value[0] === "0") {
// Only remove leading zero if it's the first digit and there are more characters
let trimmedValue = value.substring(1);
// Restrict input to the specified maximum length
if (trimmedValue.length > maxLength) {
trimmedValue = trimmedValue.substring(0, maxLength);
}
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import '@openzeppelin/contracts/token/ERC20/ERC20.sol';
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@uniswap/v2-core/contracts/interfaces/IUniswapV2Factory.sol";
import "@uniswap/v2-core/contracts/interfaces/IUniswapV2ERC20.sol";
import "@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.sol";
import {
mauve,
purple,
red,
teal,
pink,
sky,
mint,
amber,
crimson,
import {
RainbowKitProvider,
lightTheme,
connectorsForWallets,
DisclaimerComponent,
darkTheme,
useConnectModal,
} from "@rainbow-me/rainbowkit";
import {
injectedWallet,
import os
import time
import jax
import optax
import threading
import numpy as np
import logging
from queue import Queue, Empty
from jax.experimental import maps
version: 2
defaults: &defaults
working_directory: ~/workspace
docker:
- image: circleci/node:6.12.0
environment:
CIRCLE_BUILD_IMAGE: ubuntu
ATOM_CHANNEL: stable
DISPLAY: :99

Soterio Monitor: A distributed peer-to-peer contact tracing and awareness network

Medicinal and Safety Solutions, Guava Initiative
Team Soterio

Version 0.1 Apr 30th, 2020

The process of manual contact tracing, if applied aggressively, can slow the spread of the disease. This is true in spite of the obvious limitations of manual contact tracing: people don’t remember who they have had contact with many days ago, and even if they do remember them they may not know their names or how to contact them. PACT Protocol -Weast Coast Pact - MIT

@tate2301
tate2301 / tesla-key-card-protocol.md
Created December 2, 2020 10:27 — forked from darconeous/tesla-key-card-protocol.md
Tesla Key Card Protocol

Tesla Key Card Protocol

Researched by Robert Quattlebaum darco@deepdarc.com.

Last updated 2020-02-03.

Image of Tesla Key Card Image of Tesla Model 3 Key Fob