Skip to content

Instantly share code, notes, and snippets.

View AryanJ-NYC's full-sized avatar

Aryan J AryanJ-NYC

View GitHub Profile
[
{
"asset": "BABERUTHPEPE",
"arweave": "dzQFZGbYSWKw2OaDItQf3HRjiwwOJGVh76Z1eN4KWCU"
},
{
"asset": "BACHELORPEPE",
"arweave": "wCqtidB6yDEbHJVtRQO7HG63YOGCxrL7MrVNP3JI2IU"
},
{
@AryanJ-NYC
AryanJ-NYC / Promiseall.ts
Created October 7, 2022 13:40
Helping boltz.fun
const imgDeletionPromises = imagesToDelete.map((i) => deleteImage(i)); // no awaiting!
const [updatedProject] = await([
prisma.project
.update({
where: {
id,
},
data: {
title,
@AryanJ-NYC
AryanJ-NYC / .env.example
Created June 5, 2020 23:59
Shopify Oauth
API_KEY=yourAppsApiKey
API_SECRET_KEY=yourAppsSecretKey
REDIRECT_URI=https://a6a6711f5250.ngrok.io/auth/callback # must match whitelisted redirect
SHOP_NAME=your-shopify-shop-name
bitcoind:
restart: unless-stopped
container_name: btcpayserver_bitcoind
image: btcpayserver/bitcoin:0.19.0.1
environment:
BITCOIN_NETWORK: ${NBITCOIN_NETWORK:-regtest}
BITCOIN_WALLETDIR: "/walletdata"
BITCOIN_EXTRA_ARGS: |
rpcport=43782
rpcbind=0.0.0.0:43782
@AryanJ-NYC
AryanJ-NYC / now.json
Created March 11, 2019 18:34
Now.json
{
"version": 2,
"builds": [
{
"src": "backend/src/index.js",
"use": "@now/node-server"
},
{
"src": "backend/src/**/*.graphql",
"use": "@now/static"
@AryanJ-NYC
AryanJ-NYC / README.md
Created January 16, 2018 19:44
Helper files for Atomic ML Hackathon

Getting Started with Machine Learning

Setting up a Dev Environment

  1. Download Miniconda
  2. bash path/to/Miniconda3-latest-MacOSX-x86_64.sh
  3. Test installation1: conda list.
  4. Create a new Python environment: conda create --name {env_name} python={version_number}
    • e.g. conda create --name frank python=3.6
  5. Activate environment: source activate {env_name}
  • e.g. source activate frank
@AryanJ-NYC
AryanJ-NYC / hotels.json
Last active November 11, 2017 23:09
JSON file used for Trivago Hackathon
// items array contians hotels
// price is in deals.bestPrice.displayPrice
// discount can be calculated by: (deals.maxPrice.displayPrice - deals.bestPrice.displayPrice) / deals.maxPrice.displayPrice
// name is in name
// id is in id
// rating is in rating.category
// number of reviews is in rating.basedOn
const config = require('./config.js'),
mysql = require('mysql'),
mySqlConnection = mysql.createConnection({
host: '149.4.68.217',
user: config.DB_READ_USER,
database: 'bpl_performance_lab',
password: config.DB_PW
});
exports.connect = function (callback) {
function selector(weights) {
let maxRandom = [];
let curr = 0;
for (let i = 0; i < weights.length; ++i) {
let currentWeight = weights[i];
curr += currentWeight;
maxRandom.push(curr);
}
let randomNum = Math.random();
@AryanJ-NYC
AryanJ-NYC / elevator_algorithm.js
Last active August 24, 2016 14:56
My algorithm to Elevator Saga: http://play.elevatorsaga.com/
{
init: function(elevators, floors) {
function isFloorQueued (floorNum, elevator) {
if (elevator) {
let destinationQ = elevator.destinationQueue;
for (let destIndex = 0; destIndex < destinationQ.length; ++destIndex) {
if (destinationQ[destIndex] == floorNum){
return true;
}
}