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 eyre::{eyre, WrapErr}; | |
| use regex::Regex; | |
| use reqwest::{Client, Url}; | |
| use serde::Deserialize; | |
| use std::{collections::{HashMap, HashSet}, time::Duration}; | |
| use tokio::time::Instant; | |
| // --------------------------- Public API --------------------------- | |
| #[derive(Clone, Debug)] |
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
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <string.h> | |
| #include <sys/types.h> | |
| #include <sys/socket.h> | |
| #include <netdb.h> | |
| int main(int argc, char** argv) { | |
| if (argc != 3) { /* usage */ |
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 argparse | |
| import pandas as pd | |
| def main(): | |
| parser = argparse.ArgumentParser(description="Print earliest and latest timestamps in a CSV file.") | |
| parser.add_argument("csv_file", help="Path to the input CSV file") | |
| args = parser.parse_args() | |
| df = pd.read_csv(args.csv_file, parse_dates=["timestamp"]) | |
| min_ts = df["timestamp"].min() |
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
| { | |
| "id": "a05a994d-6c9f-4c30-a0d8-2fe6aff5fe0d", | |
| "object": "chat.completion", | |
| "created": 1747980285, | |
| "model": "grok-3", | |
| "choices": [ | |
| { | |
| "index": 0, | |
| "message": { | |
| "role": "assistant", |
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
| title | author | publication_year | cover_url | isbn | |
|---|---|---|---|---|---|
| Pride and Prejudice | Jane Austen | 1813 | https://covers.openlibrary.org/b/id/14348537-L.jpg | Unknown | |
| Alice's Adventures in Wonderland | Lewis Carroll | 1865 | https://covers.openlibrary.org/b/id/10527843-L.jpg | Unknown | |
| Wuthering Heights | Emily Brontë | 1846 | https://covers.openlibrary.org/b/id/12818862-L.jpg | Unknown | |
| A Christmas Carol | Charles Dickens | 1843 | https://covers.openlibrary.org/b/olid/OL8193497W-L.jpg | Unknown | |
| Adventures of Huckleberry Finn | Mark Twain | 1876 | https://covers.openlibrary.org/b/id/8157718-L.jpg | Unknown | |
| The Picture of Dorian Gray | Oscar Wilde, Oscar Wilde, Oscar Wilde | 1890 | https://covers.openlibrary.org/b/olid/OL8193416W-L.jpg | Unknown | |
| Emma | Jane Austen | 1815 | https://covers.openlibrary.org/b/id/9278312-L.jpg | Unknown | |
| Oliver Twist | Charles Dickens | 1822 | https://covers.openlibrary.org/b/olid/OL8193478W-L.jpg | Unknown | |
| Frankenstein or The Modern Prometheus | Mary Shelley | 1818 | https://covers.openlibrary.org/b/id/12356249-L.jpg | 9789944184939 |
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
| Hi Claude! Could you build an app based on my idea? If you need more information from me, ask me 1-2 key questions right away. If you think I should upload any documents that would help you do a better job, let me know. You can use the tools you have access to — like Google Drive, web search, etc. — if they’ll help you better accomplish this task. Do not use analysis tool. Please keep your responses friendly, brief and conversational. | |
| Please execute the task as soon as you can - an artifact would be great if it makes sense. If using an artifact, consider what kind of artifact (interactive, visual, checklist, etc.) might be most helpful for this specific task. Thanks for your help! |
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
| 1. https://datatracker.ietf.org/doc/html/rfc8949 | |
| 2. https://docs.soliditylang.org/en/v0.8.28/metadata.html | |
| 3. https://raw.githubusercontent.com/ipfs/papers/master/ipfs-cap2pfs/ipfs-p2p-file-system.pdf | |
| 4. https://www.ethswarm.org/swarm-whitepaper.pdf | |
| 5. https://www.ethswarm.org/The-Book-of-Swarm.pdf | |
| 6. https://arxiv.org/pdf/2205.14927 | |
| 7. https://old.reddit.com/r/ipfs/comments/15y9orp/nodes_number_of_ipfs_nodes_and_the_most_popular |
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 re | |
| import cbor2 | |
| import argparse | |
| from base58 import b58encode | |
| def extract_ipfs_hash(bytecode: str) -> str: | |
| """ | |
| Extracts the IPFS hash from the CBOR-encoded metadata in Solidity bytecode. | |
| """ | |
| # Look for the CBOR metadata marker (0xa264...) at the end of the bytecode |
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
| #!/bin/bash | |
| curl -X GET "https://api.llama.fi/protocols" | jq 'map(select(.category == "Dexs" and (.chainTvls | keys | length > 0))) | |
| | map(.chains[] as $chain | { chain: $chain, dex: { name: .name, url: .url, tvl: .chainTvls[$chain] } }) | |
| | group_by(.chain) | |
| | map({ (.[0].chain): map(.dex) }) | |
| | add' |
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
| diff --git a/examples/hyperliquid/examples/basis.rs b/examples/hyperliquid/examples/basis.rs | |
| index 95e44d2..39ec0b2 100644 | |
| --- a/examples/hyperliquid/examples/basis.rs | |
| +++ b/examples/hyperliquid/examples/basis.rs | |
| @@ -1,8 +1,13 @@ | |
| -use std::env; | |
| +use std::{env, time::Duration}; | |
| use float_ord::FloatOrd; | |
| +use futures::{stream, StreamExt}; |