Skip to content

Instantly share code, notes, and snippets.

View sumitpatel93's full-sized avatar

QuantumWidget sumitpatel93

  • Noida
  • 08:16 (UTC -12:00)
View GitHub Profile
@sumitpatel93
sumitpatel93 / erc20.sol
Last active May 18, 2018 08:27
ERC20 Token
//on rinkeby test network
//contract address--0x9A48831A220c793ed4CcF0dCbD5390fB56EF9B91
//symbol:gtx
pragma solidity ^0.4.16;
contract owned {
address public owner;
function owned() public {
pragma solidity ^0.4.18;
contract UploadDetails {
struct Product {
uint amount;
string Name;
uint date;
string userName;
}
@sumitpatel93
sumitpatel93 / Escrow-Smart-Contract
Last active February 7, 2019 21:24 — forked from bitgord/Escrow-Smart-Contract
Example of an escrow smart contract
pragma solidity ^0.4.21;
contract Escrow {
address buyer;
address seller;
uint amount;
function Escrow() public{
// setBuyer
buyer = msg.sender;
}
pragma solidity ^0.5.0;
// ----------------------------------------------------------------------------
//
// Symbol : BOA
// Name : BOA token
// Total supply: 1,000,000.000000000000000000
// Decimals : 18
// ----------------------------------------------------------------------------
pragma solidity = 0.4.25;
contract IdentityRegistration {
struct UserDetails
{
uint256 userId;
bytes32 Name;
bytes32 city;
bytes32 college;
bytes32 university;
https://medium.com/@malliksarvepalli/hyperledger-fabric-1-4-on-multiple-hosts-using-docker-swarm-and-compose-ec668db0bad5
https://usuarioperu.com/2019/11/18/hyperledger-fabric-docker-swarm-multiples-hosts/
HOST 1 --->ubuntu@ip-172.31.36.188
HOST 2 ---> ip-172.31.35.202
HOST 3 ---> ip-172.31.23.92
sendEmail = async (orgId: string): Promise<void> => {
const transporter = nodemailer.createTransport({
host: 'smtp.office365.com',
port: 587,
secure: false,
auth: {
user: '***',
pass: '***',
},
});
const { MongoClient } = require('mongodb');
const { fetchDuneData } = require('./duneAPI');
const queryConfig = require('./queryConfig.json');
const uri = 'mongodb+srv://<username>:<password>@cluster0.11spvpz.mongodb.net/?retryWrites=true&w=majority';
const client = new MongoClient(uri);
async function connectToDB() {
try {
await client.connect();
const axios = require('axios');
async function fetchDuneData(queryId, apiKey) {
const apiUrl = `https://api.dune.com/api/v1/query/${queryId}/results`;
const response = await axios.get(apiUrl,{ headers: { 'X-Dune-API-Key': apiKey } });
return response.data.result.rows;
}
module.exports = {
fetchDuneData
import argparse
import time
import json
import csv
from selenium import webdriver
from selenium.webdriver.chrome.options import Options
from bs4 import BeautifulSoup as bs