I hereby claim:
- I am elranu on github.
- I am elranu (https://keybase.io/elranu) on keybase.
- I have a public key ASBtfIH0jSptVZCe2rjL_q7t3zZalnoH1eqfohC2u4P4Fgo
To claim this, I am signing this object:
import crypto from 'crypto'; | |
const ALGORITHM = 'aes-256-cbc'; | |
const ENCODING = 'hex'; | |
const IV_LENGTH = 16; | |
const KEY = process.env.ENCRYPTION_KEY!; | |
export const encrypt = (data: string) => { | |
const iv = crypto.randomBytes(IV_LENGTH); | |
const cipher = crypto.createCipheriv(ALGORITHM, new Buffer(KEY), iv); |
// Code taken from https://gist.github.com/miguelmota/092da99bc8a8416ed7756c472dc253c4 | |
import { | |
GetPublicKeyCommand, | |
KMSClient, | |
SignCommand, | |
} from "@aws-sdk/client-kms"; | |
import { BigNumber, ethers, Signer, UnsignedTransaction } from "ethers"; | |
import * as asn1 from "asn1.js"; | |
import { AlchemyProvider } from "@ethersproject/providers"; |
const { BigNumber, Signer } = require('ethers') | |
const { keccak256, recoverAddress, joinSignature, resolveProperties, serializeTransaction, hashMessage, arrayify, defineReadOnly } = require('ethers/lib/utils') | |
const { KMSClient, GetPublicKeyCommand, SignCommand } = require('@aws-sdk/client-kms') | |
const asn1 = require('asn1.js') | |
const EcdsaPubKey = asn1.define('EcdsaPubKey', function () { | |
this.seq().obj( | |
this.key('algo').seq().obj( | |
this.key('a').objid(), | |
this.key('b').objid() |
import { Injectable } from '@angular/core'; | |
import * as firebase from 'firebase/app'; | |
import { AngularFirestore, AngularFirestoreDocument, AngularFirestoreCollection } from 'angularfire2/firestore'; | |
import { Observable } from 'rxjs/Observable'; | |
import 'rxjs/add/operator/map'; | |
import 'rxjs/add/operator/do'; | |
import 'rxjs/add/operator/take'; | |
import 'rxjs/add/operator/toPromise'; | |
import 'rxjs/add/operator/switchMap'; |
pragma solidity 0.5.4; | |
contract IHasAdmin { | |
function isAdmin(address accountAddress) public view returns (bool); | |
} |
I hereby claim:
To claim this, I am signing this object:
$Token = 'username:token89898989'; | |
$Base64Token = [System.Convert]::ToBase64String([char[]]$Token); | |
$Headers = @{ AUTHORIZATION= "Basic $Base64Token" }; | |
$Body = '{ | |
"title": "Title", | |
"body": "Please merge this PR", | |
"head": "user:headBranch", | |
"base": "baseBranch" |
function git-checkout-b() { | |
git checkout -b $args[0] | |
$cmd = 'git checkout -b ' + $args[0] | |
git submodule foreach $cmd | |
} | |
function git-checkout() { | |
git checkout $args[0] | |
$cmd = 'git checkout ' + $args[0] | |
git submodule foreach $cmd |
using System; | |
using System.Collections; | |
using System.Collections.Generic; | |
using System.Linq; | |
namespace Extensions | |
{ | |
public static class IEnumerableExtensions | |
{ | |
/// <summary> |
import re | |
with open("labels_imagenes.csv", "r") as inp: | |
content = inp.read() | |
out = open('algo.csv', 'a') | |
out_dict = dict() | |
for line in content.split('\n')[1:-1]: | |
file, x, y, w, h, class_id = tuple(*re.findall(r'"(.+?),.+?x""""\:(\d+?)\b.+?y""""\:(\d+?)\b.+width"""":(\d+?)\b.+height"""":(\d+?)\b.+?idf"""":""""(.+?)"', line)) | |
xmax = int(x) + int(w) |