This file contains hidden or 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 tensorflow as tf | |
import os | |
print("TensorFlow version:", tf.__version__) | |
mnist = tf.keras.datasets.mnist | |
CWD = '' if os.getcwd() == '/' else os.getcwd() | |
(x_train, y_train), (x_test, y_test) = mnist.load_data('/inputs/mnist.npz') | |
x_train, x_test = x_train / 255.0, x_test / 255.0 |
This file contains hidden or 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
movie_name | director | category | imdb_rating | watched | |
---|---|---|---|---|---|
Kill Bill Vol. 1 | 0 | 0 | 8.2 | 0 | |
Pulp Fiction | 0 | 0 | 8.3 | 0 | |
Django Unchained | 0 | 0 | 8.4 | 1 | |
Inglourious Basterds | 0 | 0 | 8.3 | 0 | |
Avatar | 1 | 1 | 7.8 | 0 | |
Titanic | 1 | 2 | 7.9 | 1 | |
Alien | 1 | 1 | 8.4 | 0 | |
A Beautiful Mind | 2 | 2 | 8.2 | 0 | |
Apollo 13 | 2 | 2 | 7.7 | 1 |
This file contains hidden or 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
movie_name | director | category | imdb_rating | watched | |
---|---|---|---|---|---|
Kill Bill Vol. 1 | Quentin Tarantino | Action | 8.2 | Yes | |
Pulp Fiction | Quentin Tarantino | Action | 8.3 | Yes | |
Django Unchained | Quentin Tarantino | Action | 8.4 | No | |
Inglourious Basterds | Quentin Tarantino | Action | 8.3 | Yes | |
Avatar | James Cameron | Scifi | 7.8 | Yes | |
Titanic | James Cameron | Drama | 7.9 | No | |
Alien | James Cameron | Scifi | 8.4 | Yes | |
A Beautiful Mind | Ron Howard | Drama | 8.2 | Yes | |
Apollo 13 | Ron Howard | Drama | 7.7 | No |
This file contains hidden or 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 pandas as pd | |
import requests | |
base_url = "https://api.web3.storage" | |
headers = {"Authorization": "Bearer <YOUR_API_TOKEN>"} | |
response = requests.post(base_url + '/upload', headers=headers, data=open('./iris.csv', 'rb')) | |
pprint(response.json()) | |
cid = response.json()["cid"] |
This file contains hidden or 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 { NFTStorage, File } from 'nft.storage' | |
describe('storeDirectory', () => { | |
const { AUTH_TOKEN, SERVICE_ENDPOINT } = process.env | |
const token = AUTH_TOKEN || '' | |
const endpoint = new URL(SERVICE_ENDPOINT || '') | |
let client = new NFTStorage({token, endpoint}) | |
let times = [] | |
it('testing elapsed time for storeDirectory', async () => { |
This file contains hidden or 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
// contracts/EventTickets.sol | |
// SPDX-License-Identifier: MIT | |
pragma solidity ^0.8.6; | |
import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol"; | |
contract EventTicket is ERC1155 { | |
// Declare all the type IDs | |
uint256 public constant GENERAL = 0; | |
uint256 public constant VIP = 1; | |
uint256 public constant RSVP = 2; |
This file contains hidden or 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
ERC1155._mintBatch(receiverAddress, [5, 6, 7, 8, /* … */, 105], [1, 1, 1, 1, /* … */ 1], ""); |
This file contains hidden or 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 yew::prelude::*; | |
#[derive(Properties, PartialEq)] | |
struct TodoProps { | |
state: UseStateHandle<u64>, | |
} | |
#[function_component(Counter)] | |
fn counter(props: &TodoProps) -> Html { |
This file contains hidden or 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 all goodies from Yew. | |
use yew::prelude::*; | |
/// Our app's state. It is now just a unit struct with no property | |
/// because our state will be encapsulated within the Counter component. | |
struct App; | |
/// A Counter functional component ala React. | |
#[function_component(Counter)] | |
fn counter() -> Html { |
This file contains hidden or 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
person_age | person_income | person_home_ownership | person_emp_length | loan_intent | loan_grade | loan_amnt | loan_int_rate | loan_status | loan_percent_income | cb_person_default_on_file | cb_person_cred_hist_length | |
---|---|---|---|---|---|---|---|---|---|---|---|---|
22 | 59000 | RENT | 123.0 | PERSONAL | D | 35000 | 16.02 | 1 | 0.59 | Y | 3 | |
21 | 9600 | OWN | 5.0 | EDUCATION | B | 1000 | 11.14 | 0 | 0.1 | N | 2 | |
25 | 9600 | MORTGAGE | 1.0 | MEDICAL | C | 5500 | 12.87 | 1 | 0.57 | N | 3 | |
23 | 65500 | RENT | 4.0 | MEDICAL | C | 35000 | 15.23 | 1 | 0.53 | N | 2 | |
24 | 54400 | RENT | 8.0 | MEDICAL | C | 35000 | 14.27 | 1 | 0.55 | Y | 4 | |
21 | 9900 | OWN | 2.0 | VENTURE | A | 2500 | 7.14 | 1 | 0.25 | N | 2 | |
26 | 77100 | RENT | 8.0 | EDUCATION | B | 35000 | 12.42 | 1 | 0.45 | N | 3 | |
24 | 78956 | RENT | 5.0 | MEDICAL | B | 35000 | 11.11 | 1 | 0.44 | N | 4 | |
24 | 83000 | RENT | 8.0 | PERSONAL | A | 35000 | 8.9 | 1 | 0.42 | N | 2 |
NewerOlder