Showing posts with label quiz. Show all posts
Showing posts with label quiz. Show all posts

Tuesday, August 20, 2024

Math solution to 2^x = 9

A solution to the math problem: 2^x = 9

Take the log of both sides. You get:

  • x * log 2 = log 9

Divide by log 2 to solve for x. You get:

  • x = 3.17

Substitute for x to prove your solution:

  • 2 ^ 3.17 = 9

Q.E.D. 

Monday, August 19, 2024

Thursday, July 18, 2024

Rust pop-quiz answer: querying Terra swagger endpoint




This is a simple swagger-call at base, ... which I embellished (converting obvious numbers from strings), then embellished again (converting denom to token ... by hand).  

ℕ𝕆𝕋𝔼! The @terra_money swagger result for all_balances leaves out a 𝓼𝓲𝓰𝓷𝓲𝓯𝓲𝓬π“ͺ𝓷𝓽 number and types of tokens in my wallet, ...



... perhaps this lack is due to the many new and revised tokens introduced after the swagger endpoint was established (and abandoned?)

Monday, July 8, 2024

Rust pop-quiz: querying Terra swagger

#Rust pop-quiz:

@terra_money has a swagger endpoint where you can query bunches of things.



Write a Rust program to query your wallet's balances. Notice anything weird?

Does @TeamKujira have a swagger endpoint to make such queries?


Monday, June 24, 2024

Rust pop-quiz answer: matrix/spreadsheet-transpose

#Rust pop-quiz answer: matrix/(spreadsheet)-transpose

You know what 'transpose' means, mathematically?

It means the rows become the columns, or, as I implement it in matrix_utils.rs: the cols become the rows.


Example: where I show ETH/BTC ratios over time.



Thursday, June 13, 2024

Token performance, post-Pilot launch: cryptocurrency pop-quiz answer

#cryptocurrency pop-quiz answer for token-valuation behavior after a Kujira Pilot launch:



  1. $WINK* was the 10-bag gainer, here. The other three { $AQLA, $BFIT, $NAMI } where 10x LOSERS by token-price since launch.
* did anybody see the total number of $WINK tokens? 69M. 

So: are they $WINK-ers or $WANK-ers? Eh? EH? 😎
  1. ROIs and APRs are shown as above.
  2. Projected valuation across token launches on @TeamKujira Pilot

Based upon the previous lauches, a token's launch has this behavior following a launch on Pilot:

ROI: -79.75%; -508.90% APR

Every token, except $WINK, follows this trend. Will $KART?

Kujira Pilot launch of KART by premium: pop-quiz answer

#Cryptocurrency pop-quiz answer:





  • 45M $KART sold at launch
  • ~ 492,570.00 $USK raised

Congratulations and «bon chance!» to all who participated.

Wednesday, June 12, 2024

Cryptocurrency pop-quiz: $KART sale

#cryptocurrency pop-quiz: $KART.

$KART is on sale on @TeamKujira PILOT for an opening price of 18.75¢ at 0% premium.



  • There are 45M $KART for sale
  • There are 148.02k $USK bids, average price: 0.99¢.

  1. compute $KART-price at each premium %
  2. compute remaining $KART, if any.
  3. At each premium % there's a certain amount of $USK bid, meaning that there's a certain amount of $KART to-be-sold.
Currently, at 0% premium, there's 435 $USK bid, meaning, 2320 $KART will be sold there.

Compute amount of $KART sold at each premium %age, comme Γ§a:



SO! Now you know the PRICE of $KART at each %age, and you know HOW MUCH $KART is sold at each %age.

Which means you know how much $KART remains.

  1. Compute the %age at which $KART sells out, if any.
  2. Compute THE LIKELIHOOD a 100 $USK bid by you will be filled at each %age.

Sunday, June 9, 2024

Pivot pop-quiz: dictionary of coin gecko token IDs

#Rust pop-quiz 03

You see, when you complete the previous quizfos that the first two lines of pivots.csv are metadata:


  • line 1: @coingecko token API ids
  • line 2: token-symbols

Pair line 1 to line 2. Then query a token API id to get its corresponding symbol.


Here we see the @coingecko token API id fantom is for $FTM
  • (answer)

Pivot pop-quiz: libraryitize reading REST endpoint

#Rust pop-quiz 02

Now that you can read from a REST endpoint, shunt that functionality into its own module, read_rest.rs that has the following function:

read_pivots() -> ErrStr<Vec<String>>

We'll be using this as a library function in follow-on quizzes. 

The library name? swerve

Pivot pop-quiz: read REST endpoint

#Rust pop-quiz: build a trade-recommender based upon pivots (more deets on pivots here)

quiz 01: read this REST endpoint.

That's it. You can print out the response if you'd like.

Anybody want to counterchallenge me with #Elixir?
  • (answer)

Fun fact!


Did you know that you – YES, YOU! – can make your git repository data a (GET) REST endpoint?

IT'S TRUE! HERE'S HOW IS ONE EASY STEP!

Your CSV, TSV, or, really, any data on github has a 'raw'-counterpart that can be queried, just like any GET REST endpoint.

Caveat 

These raw-representations are NOT updated instantly on a git push but there is a timed-delay of 5 minutes (300 seconds), so: if you do a git push and don't see the updates in the raw data, DON'T PANIC! This is not a bug, but a feature, from github. 

Thursday, May 30, 2024

Rust pop-quiz: transpose spreadsheet

#Rust / #Elixir pop-quiz

The spreadsheet 'transpose'-function takes a set of rows and transposes them to a set of columns (or vice versa).

Take the SPREADSHEETZORXEN generated by ./cmc:

and output, instead, the single row of token-prices.

Tuesday, May 28, 2024

Rust pop-quiz: read Kujira Oracle REST endpoint

git as price-history database.

Thoughts?

#Rust (or ... #Elixir???) pop quiz:

From the @TeamKujira Oracle REST endpoint, and given today's date, $LE_DATE, '



convert the JSON response into the TSV, e.g.:

2024-05-28 5.16999452 1.613136506 1.204187945 8.710272459 
  • (answer)

Friday, May 24, 2024

Bonus cryptocurrency pop-quiz: configure location of lsd-configuration file

Bonus to adding $stTIA to the lsd-configuration pop-quiz: Configure reading the configuration file from branches other than main.

What do I mean by this?

./lsd doesn't have configuration to locate the lsd-configuration-file, so testing can only occur in main (??!)


Pass the branch-name to ./lsd

Cryptocurrency pop-quiz: add stTIA to lsd configuration

#cryptocurrency pop-quiz, as recommended by @thomas_wos:

  1. modify ./lsd configuration so that it now also reports $stTIA exchange rate along with the other LSD token exchange rates from @stride_zone.



The plot thickens!

@thomas_wos points out that $stTIA-data are not part of the response JSON from the @stride_zone REST endpoint. I requested @stride_zone add the $stTIA LSD information to their API response data.




Rust Cryptocurrency pop-quiz: Ghost x-token exchange-rates

#Rust #cryptocurrency pop-quiz: write an x-token exchange rate report tool for @TeamKujira Ghost: it extracts all x-token names and their exchange rates.



Explanation: an x-token represents tokens leant to Ghost, so if you leant 100 $KUJI to Ghost, you'd get 99.7 $xKUJI in return
  • (answer)

Monday, May 20, 2024

Entailing Metadata as Data: Cryptocurrency pop-quiz answer

#cryptocurrency part I answer



Representing coins across the Blockaverse as a Voronoi-chart had more snags than I was prepared for:  the javascript equates "$0" to null, leading to some undesirable results. Thus, my cypher query (coins.cyph) entails a null-check-guard. 



This, of course, comes after I upload the token-kinds-data into my @neo4j Blockaverse portfolio ontology with a load-script (token-kinds.cyph)




This is all explained in ./ont

Part II answer


The part I answer entails the part II answer, as you now see that coins.cyph no longer uses a CASE-statement. 

Realizing the metadata as data simplifies the graph.

Q.E.D. 

Sunday, May 19, 2024

Cryptocurrency pop-quiz: realizing metadata as data in a graph

Looking at the answer to the previous #cryptocurrency pop-quiz ("What's my $ETH position?") leaves something to be desired, particularly, a CASE-statement in graph query always, always, always means you're creating a metagraph of the graph.



Creating a meta-graph is all well and good for a quick-n-dirty solution, and that's fine for some.

Not for me.

#cryptocurrency pop-quiz


Create a (meta-)mapping of token-types to tokens, e.g.: 'blue chip' to $BTC, 'stable' to $USDC, etc.

Then, upload that meta-data as a graph.

Part II, pop-quiz:


When you've realized these metadata as data, rewrite the query to entail this embedded knowledge.

Show your work and results.

Cryptocurrency pop-quiz answer: "What's my $ETH position?" as a Voronoi chart

For the #cryptocurrency pop-quiz on "What's my $ETH position?" I went with option 3, creating a cypher query against my @neo4j Blockaverse portfolio ontology.

This approach allows me to map out my positions and their relative strengths in, say, a Voronoi chart.