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
#!/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. |
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
################################################################ | |
# 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 # | |
################################################################ |
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
// 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; |
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 React from 'react'; | |
import { Box } from '@mui/material'; | |
const CardContainer = ({ children }) => { | |
return ( | |
<Box | |
width="31vw" | |
height="100%" |
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 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); |
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
# 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) |