$ bundle gem foo-api-wrapper
$ cd foo-api-wrapper
require 'set' | |
File.write(LONG_ASS_FILE_NAME_WHY_DID_I_NAME_IT_THAT, handles) | |
handles = Set.new(File.readlines(LONG_ASS_FILE_NAME_WHY_DID_I_NAME_IT_THAT).map(&:strip)) | |
if File.exists?("2.tsv") | |
handles += Set.new(File.readlines("2.tsv").map(&:strip)) | |
File.delete("2.tsv") | |
end |
# This was generated by GPT-3, so fact check it before using it | |
class SquareSimulator | |
attr_reader :board_size, :player_squares, :column_weights, :row_weights | |
def initialize(board_size:, player_squares:, column_weights:, row_weights:) | |
@board_size = board_size | |
@player_squares = player_squares | |
@column_weights = column_weights | |
@row_weights = row_weights |
Rust is a systems programming language that is designed to be safe, concurrent, and fast. It is similar to C++ in terms of its low-level capabilities, but with a number of features that make it more memory-safe and easier to use. Here is a simple example of a "Hello, World!" program in Rust:
fn main() {
println!("Hello, World!");
}
This code defines a function called main
, which is the entry point of every Rust program. The println!
macro is used to print a string to the console. The exclamation mark indicates that this is a macro, as opposed to a function.
I want you to act as a modular input-and-output system. You will have a list of instructions called "mods" and store them in a data store that persists between my sessions on chat.openai.com (this current website.)
A message starting with "!mod-add" will add a new mod and "!mod-remove" will remove the mod. Similarly, "!mod-disable" messages will disable a mod and "!mod-enable" messages will enable a previously-disabled mod. "!mod-list" will list all mods and statuses. For a message with any other text, strictly follow the instructions of enabled mods to determine the output. If there are no mods added, only output the text "No mods added."
This is the first input: !mod-list
No mods added.
!mod-add character-count
-- | |
-- save this as ~/.psqlrc | |
-- | |
-- run an alias with : | |
-- | |
-- e.g. :long_running_queries | |
\set QUIET 1 | |
-- formatting |
************************ 1. row ************************ | |
boost_solidex: 2.0928076186523006 | |
oxdao_v2_rewards: 35145351973587244 | |
oxdv2_boost: 1.5419483576059234 | |
solid_rewards: 35145351973587244 | |
symbol: vAMM-WFTM/OXD | |
tvl: 559990.86917331589706084137 | |
************************ 2. row ************************ | |
boost_solidex: 1.6251922186182624 | |
oxdao_v2_rewards: 7491782393110821 |
curl 'https://api.thegraph.com/subgraphs/name/spartacus-finance/solidly' \ | |
-H 'authority: api.thegraph.com' \ | |
-H 'sec-ch-ua: " Not A;Brand";v="99", "Chromium";v="99", "Google Chrome";v="99"' \ | |
-H 'accept: */*' \ | |
-H 'content-type: application/json' \ | |
-H 'sec-ch-ua-mobile: ?0' \ | |
-H 'user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/99.0.4844.51 Safari/537.36' \ | |
-H 'sec-ch-ua-platform: "macOS"' \ | |
-H 'origin: https://solidly.dev' \ | |
-H 'sec-fetch-site: cross-site' \ |
=> [{:symbol=>"vAMM-USDC/OXD", :reward_rates=>["803461050777566", "897985880280809"], :boost_oxdao=>2.5, :boost_solidex=>1.4918954102869841}, | |
{:symbol=>"vAMM-WFTM/TOMB", :reward_rates=>["74694574843542", "83482171883959"], :boost_oxdao=>2.5, :boost_solidex=>1.530933128008952}, | |
{:symbol=>"vAMM-BIFI/miMATIC", :reward_rates=>["5954162014826", "6654651663629"], :boost_oxdao=>2.5, :boost_solidex=>1.4924574268794457}, | |
{:symbol=>"vAMM-WFTM/RDL", :reward_rates=>["484224024803996", "541191557133878"], :boost_oxdao=>2.5, :boost_solidex=>1.521362300792279}, | |
{:symbol=>"sAMM-SOLIDsex/SOLID", :reward_rates=>["4667989419911", "5013706462294"], :boost_oxdao=>2.5, :boost_solidex=>1.4764777520376702}, | |
{:symbol=>"vAMM-BOO/xBOO", :reward_rates=>["3903744445840575", "4363008498292408"], :boost_oxdao=>2.5, :boost_solidex=>1.5671872486016638}, | |
{:symbol=>"vAMM-IB/WFTM", :reward_rates=>["331958051040", "371011939397"], :boost_oxdao=>2.5, :boost_solidex=>1.7462349371592305}, | |
{:symbol=>"vAMM-YFI/WOOFY", :reward_rates=>["27669065 |