Skip to content

Instantly share code, notes, and snippets.

View TheHumanistX's full-sized avatar

TheHumanist ('Hu') TheHumanistX

View GitHub Profile
# Write your solution here
def add_student(students: dict, student_name: str):
students[student_name] = []
def grade_average(courses: list):
sum = 0
for course in courses:
sum += course[1]
grades_average = sum / len(courses)
import React, { createContext, useContext, useEffect, useState } from 'react';
import { ethers } from 'ethers';
import abi from '../abi/abi.json';
const EthersContext = createContext();
export const EthersProvider = ({ children, setIsLoading }) => {
const [provider, setProvider] = useState(null);
const [signer, setSigner] = useState(null);
import React from 'react';
import { Box } from '@mui/material';
const CardContainer = ({ children }) => {
return (
<Box
width="31vw"
height="100%"
@TheHumanistX
TheHumanistX / .deps...remix-tests...remix_accounts.sol
Created November 30, 2022 15:38
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.8.13+commit.abaa5c0e.js&optimize=false&runs=200&gist=
// SPDX-License-Identifier: GPL-3.0
pragma solidity >=0.4.22 <0.9.0;
library TestsAccounts {
function getAccount(uint index) pure public returns (address) {
address[15] memory accounts;
accounts[0] = 0x5B38Da6a701c568545dCfcB03FcB875f56beddC4;
accounts[1] = 0xAb8483F64d9C6d1EcF9b849Ae677dD3315835cb2;
@TheHumanistX
TheHumanistX / ldjson_to_pandas_dataframe.py
Last active March 14, 2022 18:10
Move data from JSON-LD files into Pandas dataframes
################################################################
# The hope is that this script can help you work with JSON-LD #
# files (*.ldjson) so that you can move them into Pandas #
# DataFrames. #
# Email: [email protected] #
# Discord: tirwander#1570 #
# Twitter: @tirwander #
# Crypto: brianfh.eth #
################################################################
@TheHumanistX
TheHumanistX / ldjson_to_csv.py
Created March 10, 2022 04:24 — forked from slhck/ndjson_to_csv.py
Convert LD-JSON files to CSV
#!/usr/bin/env python3
#
# ldjson_to_csv.py
#
# Author: Werner Robitza
#
# Convert .ldjson files to CSV.
# This assumes the same keys being used in every line of the input file.
# It works on a line-by-line basis, so it should be fast and memory-efficient.