Skip to content

Instantly share code, notes, and snippets.

View llSourcell's full-sized avatar

Siraj Raval llSourcell

View GitHub Profile
import puppeteer from 'puppeteer';
import { BingChat } from 'bing-chat'
async function example() {
const api = new BingChat({
cookie: process.env.BING_COOKIE
})
const res = await api.sendMessage('Hello World!')
console.log(res.text)

Getting Started with Smart Contracts on Polygon PoS (4 parts)

1 Polygon PoS Explained

2 Mint an NFT

3 Stake Polygon Token

4 Create ERC-20 Tokens

Polygon PoS Explained

Polygon is a decentralised Ethereum scaling platform that enables developers to build scalable user-friendly dApps with low transaction fees without ever sacrificing on security. Polygon's live blockchain in production is called Polygon Proof-of-Stake or PoS for short. In this guide, we'll learn how to build and deploy our first Solidity smart contracts to Polygon PoS.

function rollUp(
uint256[2] memory a,
uint256[2][2] memory b,
uint256[2] memory c,
uint256[73] memory input
) public {
// TODO: Check if current merkle tree is
// equal to supplied merkle tree
uint256 balanceTreeRoot = input[1];
// uint256 newBalanceTreeRoot = input[1];
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
//this is an NFT contract
contract NFTGAMEPLAY is ERC721, Ownable {
// What is Basic Income?
// Why?
// How? Dividend issuing token every x interval, like a week. Polygon, fast, cheap
// Problem - Proof of Unique Identity
//
pragma solidity ^0.4.21;
contract BasicIncomeToken {
import requests # step 1 - pull data from Web
import threading
from bs4 import BeautifulSoup # step 2 - parse
print(final.title)
print(final.question_1)
yosadad
https://docs.google.com/presentation/d/1dinjf2mZ1SkRnzJo6fL-ZfGyGDBI4JWeoGsnBj7hNNg/edit?usp=sharing
@llSourcell
llSourcell / manual_control.py
Created December 18, 2020 15:41
replace 'manual_control.py' in the following repo with this version: https://github.com/maximecb/gym-miniworld
#!/usr/bin/env python3
"""
This script allows you to manually control the simulator
using the keyboard arrows.
"""
import sys
import argparse
import pyglet
use std::io;
use std::process;
fn main() {
//Step 0 - Collect data
let x: [f64; 8] = [44.0, 46.0, 59.0, 67.0, 74.0, 85.0, 97.0, 43.0];
let y: [f64; 8] = [1200.0, 2400.0, 3200.0, 3000.0, 5000.0, 4000.0, 6000.0, 6050.0];
println!("Total profit per month");
//Step 1 - Compute the average of X