Fermit

u/Fermit


r/cs50•

Hi all,

I'm putting together tests for my final project code, which pulls data on cryptocurrencies/exchanges from various CoinGecko API endpoints. I have a test built for one of my classes that uses unittest.patch, but now I want to build a few for my functions and I'm not sure exactly which libraries/methods would be useful because I haven't put together a test for code that has several inputs that trigger at different points in the workflow. I'm going to put together a test of my asset_mkts function first.

The general description of the asset_mkts flow is as follows:

  1. Asks the user for an input regarding the data they want to see.
    1. User can provide specific coin IDs in a c
01

r/learnpython•

Hi all, I'm putting together code that pulls data from a few of CoinGecko's API endpoints, gives the user a few options as to what they want to do with it, and delivers the aggregated/reformatted/whatever else data to the user as a CSV. The part I'm working on at the moment involves CoinGecko's Coin Tickers By ID endpoint (https://docs.coingecko.com/v3.0.1/reference/coins-id-tickers) which lets a user pull data on the market pairs that involve a given asset across all of the exchanges that CoinGecko monitors.

FYI:

  1. This API endpoint is paginated to 100 items (pairs) per response.
  2. I save each response page into a list called data using the extend method.

I'd like one of the

19

r/cs50•

This is going to be a bit of a wall of text so I apologize and profusely thank anyone who's able to get through it and provide their thoughts :)

I'm setting up a class that defines the parameters for importing from one of CoinGecko's API endpoints. My two main concerns are Pagination and optional Class Function Parameters. My question about Parameters is relatively simple but it's wrapped up in the pagination/general API usage components, so if anyone has any recommendations about the overall right way to build this, useful functions, or thoughts about pitfalls I'd love to hear those as well.

FYI - I have two classes so far, one is Auth (used for authentication and GET requests

12

r/cs50•

Hi all,

I'm working on the test_bank problem set and my test_bank.py file's tests are all passing but when I run CS50's checks it fails the second one. I'm not sure what's wrong here, please advise.

Check fail error message:

correct bank.py passes all test_bank checks
expected exit code 0, not 1

My bank.py code:

def main():
inpt = input("Greeting: ")
name = f"${value(inpt)}"
print(name)

def value(greeting):
greetlow = greeting.lower()
if greetlow[:5] == "hello":
return 100
elif greetlow[:1] == "h":
return 20
else:
return 0

if __name__ == "__main__":
main()

My test_bank.py code:

12

r/cs50•

Hi all, my implementation passes every check except this one and I'm a tad confused. The homework has the following note:

Note: The order in which you generate x and y matters. Your program should generate random numbers in x, y pairs to simulate generating one math question at a time (e.g., x0 with y0, x1 with y1, and so on).

2 causes I'm thinking are either my usage of randint or I'm compiling my list of (x, y) combos in the wrong place in the code so their check is looking for a less mature version of the (x, y) list.

randint potential cause - I coded such that my list of x, y combos is put together using randrange rather than randint. I'm thinking this might

26

r/Dreamdale•

A family member of mine plays this game and they suddenly started having trouble opening the app. It tries to boot up and then exits back to their phone's home screen a few seconds later. Has anyone else run in to this problem and fixed it?

20

r/gigabyte•

Hi all, I'm new to building/setting up computers so apologies if I'm missing any information here. My motherboard is a B650 Aorus Elite AX.

I finished putting together my PC and was trying to get past the BIOS startup screen but for whatever reason I couldn't. After poking around looking for a solution I read that some people had solved this problem by enabling CSM in Advanced Settings. I tried this and now my monitor is no longer picking up an HDMI connection. I tested the HDMI with another machine and both it and the monitor are functional. Any ideas on how I might fix this?

12

r/buildmeapc•

^Title.

  • I'd like the monitor to be on the larger side but I know that the larger you get the less suited it is to high FPS. Not sure where the happy medium is here but 32-37 inches is roughly what I'm looking for
  • Question for the pros - I don't know the general cost tiers for increases in quality of a PC. Is $3000 a good price point for the performance I'd get? If I spent $2000 would I see fairly negligible differences? If I spent $4000 would I see a significant improvement?
442


r/CFA•

But Jesus tapdancing Christ, note taking (I do it by hand so I remember it better, I can just type things on autopilot so it does absolutely nothing for me) is hugely increasing how much time it takes for me to cover material. I'm assuming other people have run into this problem, anybody have any helpful tips? I don't really see any way around it because of just how in-depth your knowledge needs to be in L3 for free response Q's, have any of you genuises come up with some way to streamline note taking at all? I've never been good at it in the first place so even more basic suggestions might help me out, who knows.

For the record, I took fairly in-depth notes for L2 as well, it just feels w

56

r/thepunisher•

This just occurred to me after watching Frank get shot a bunch of times in S2. Frank's vest. Frank's not some nancy boy walking around with some supermaterial, he's a real man and he wears a regular bulletproof vest. It's either a hard (ceramic/metal/composites) or a soft (Kevlar) vest. As many things do, both hard and soft get damaged when they're shot or stabbed. When they do, their structural integrity is way, way lower than it was beforehand. So, he's used this vest through multiple firefights and been shot in it a shit ton of times. All of those bullet holes that look like really cool parts of the skull design? They're actually real bulletholes. Four of them, center mass. It doesn't loo

154

r/CFA•

Fellow masochists, help me out with derivatives. I try to figure out an intuitive way to understand concepts so it's easier for me to remember on test day because fuck rote memorization. I'm struggling with BSM interpretation #2:

Calls can be thought of as leveraged stock investments where N(d1) units of stock is purchased using e^(-rT)XN(d2) of borrowed funds. A protfolio that replicates a put option consists of a long position in N(-d2) bonds and a short position in N(-d1) stocks.

Can somebody spell this one out for me? It's just not clicking for some reason.

18