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.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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 { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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 { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests # step 1 - pull data from Web | |
import threading | |
from bs4 import BeautifulSoup # step 2 - parse | |
print(final.title) | |
print(final.question_1) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
yosadad | |
https://docs.google.com/presentation/d/1dinjf2mZ1SkRnzJo6fL-ZfGyGDBI4JWeoGsnBj7hNNg/edit?usp=sharing |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
""" | |
This script allows you to manually control the simulator | |
using the keyboard arrows. | |
""" | |
import sys | |
import argparse | |
import pyglet |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
NewerOlder