Skip to content

Instantly share code, notes, and snippets.

View anupam-io's full-sized avatar
Coffee

anupam anupam-io

Coffee
  • Range Security
  • Bangalore
  • 22:50 (UTC +05:30)
View GitHub Profile
@anupam-io
anupam-io / main.rs
Created March 24, 2022 20:53
Match statement bug
use cosmwasm_std::{from_binary, to_binary, Binary};
use serde::{Deserialize, Serialize};
#[derive(Serialize, Deserialize)]
enum Cars {
Audi { id: u32, number_plate: u32 },
Bmw { id: u32, number_plate: u32 },
}
#[derive(Serialize, Deserialize)]
@anupam-io
anupam-io / anupam_keyring_pub.asc
Last active February 15, 2022 09:33
My Public Key for Mailvelope
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: Mailvelope v4.4.1
Comment: https://www.mailvelope.com
xsFNBGIJB88BEACV3UJxikpf/B7gBIeDUUuqbQ/T8SAfctf+G3a74cZV9hLV
KkT9pyJtcKEzErE8wvOMzq8nThKVaMgHNpSzBKff0TWyyBHfBARim5Uay6dN
UcIYYp7DwQJPYARtgZQMNVB8i2r1vbNB8s54opIKCIDKntFLg9UxQ3sgcXiK
hliU/2XovqflKEzefEUv6QlJf+rC01iJN+4QoChvj2D1jCdbkaKqY5/9kKFj
cD9StpDEke4I73ay4YKxprJSMkQEORydW1naUVPCos0d000unl1m/81f1kTM
+VlcFVwyackSdLTaRrGprW43TQp//fuH18TD3pt6UTHV3kPRPBelqveYE7ot
@anupam-io
anupam-io / auto.py
Created May 12, 2021 05:51
Automatic compile script
from time import sleep
from os import system
it = 0
while True:
system("clear")
system("cargo run") # Change this to your compile script
it+=1
print(it, "th iteration completed.")
sleep(1)
@anupam-io
anupam-io / Sleep.md
Last active June 19, 2021 11:21
How to get a good night sleep?

How can I sleep 😳 ?

Follow a takeoff routine in the morning 🛫

  • 🌞 Expose yourself to natural light
  • 🪥 Brush your teeth
  • 🚰 Drink appropriate amount of water
  • 🧘‍♂️ Do mindfulness meditation
  • 🙆‍♂️ Do light workout
  • 🔈 Listen to your morning playlist or your morning podcast
@anupam-io
anupam-io / captcha-using-tensorflow-on-chars74k.ipynb
Created April 12, 2021 13:04
Captcha-using-tensorflow-on-chars74K.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@anupam-io
anupam-io / copy-of-tensorflow-on-chars74k.ipynb
Last active April 11, 2021 23:12
Solving-captchas-with-tensorflow-on-chars74K.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@anupam-io
anupam-io / main.js
Created April 11, 2021 06:10
Loading ABI dynamically from contract address
rpcEndpoint = `...`;
addressURL = `...`;
const axios = require("axios");
const Web3 = require("web3");
var web3 = new Web3(new Web3.providers.HttpProvider(rpcEndpoint));
async function main() {
url =
`http://api-kovan.etherscan.io/api?module=contract&action=getabi&address=` +
@anupam-io
anupam-io / main.js
Created April 5, 2021 19:43
Wallets in web3 on ETH
rpcEndpoint = "YOUR-RPC-URL";
password = "PASSWORD";
const Web3 = require("web3");
const provider = new Web3.providers.HttpProvider(rpcEndpoint);
const web3 = new Web3(provider);
const assert = require("assert");
async function main() {
// Creating a wallet
@anupam-io
anupam-io / main.js
Created April 5, 2021 19:25
Encrypting & Decrypting data with web3 on ETH
data = "";
privateKey = "";
rpcEndpoint = "";
password = "";
const Web3 = require("web3");
const provider = new Web3.providers.HttpProvider(rpcEndpoint);
const web3 = new Web3(provider);
async function main() {
@anupam-io
anupam-io / IT.js
Last active April 4, 2021 16:36
Mimicking `mocha`'s it utitlity.
const assert = require("assert");
async function it(name, fun) {
await fun()
.then(() => {
console.log(name, ": passed.");
})
.catch((err) => {
console.log(name, ": failed.");
console.log("Error: ", err);