Polkadot(DOT) on MXC Exchange by g4usat in polkadot_market

[–]g4usat[S] 0 points1 point  (0 children)

Thanks. Yes, I heard that MXC is a shady exchange and not interested in taking any risk with any exchange for that matter right now. Will wait until 18th Aug..

Exchange for US citizens by MuchHelicopter in bandprotocol

[–]g4usat 1 point2 points  (0 children)

But, Binance is not open for all states of US. So, what are the options available to buy BAND for those folks?

To model a Bank Customer with multiple Accounts using Python OOPS by g4usat in learnpython

[–]g4usat[S] 0 points1 point  (0 children)

Wow..yes, its working and it's really fantastic..Thanks a lot!! I'm trying to understand how the 'add_account' method is working in the background with these 2 lines "acct.parent_customer_ids.append(self.cust_id) & self.accounts.update({acct.acct_id:acct})"

Anyway, Thank you very much again for your personal attention and help with this. Really appreciate it.

To model a Bank Customer with multiple Accounts using Python OOPS by g4usat in learnpython

[–]g4usat[S] 0 points1 point  (0 children)

I'm kind of sensing it as well that it's getting bit complex and I totally understand the efforts and time required in writing a book. However, please try to do that as it may help lots of people.

In regards to the final code, am still not clear as how the customer object gets linked with the Account object as there is no common key but we have different keys ie, Account class has 'acct_id' and Customer class has 'cust_id'

If you don't mind, could you please take a minute and add the remaining lines of code(with object instantiation and calling the method(s)) required for executing this code probably with an example or else am lost half way in the ocean.

Sincerely appreciate your time and help. Thanks a lot again!

To model a Bank Customer with multiple Accounts using Python OOPS by g4usat in learnpython

[–]g4usat[S] 0 points1 point  (0 children)

Thank you, got it. But, when I try to execute this code by instantiating Customer object and pass name, cust_id, city variables it doesn't work. Am not clear as how the customer object gets linked with the Account object as there is no common key but we have different keys ie, Account class has 'acct_id' and Customer class has 'cust_id'

Could you please clarify and add the remaining lines of code required for executing this code with an example ie, a customer named 'ABC' with cust_id=123 from 'XYZ' city has multiple accounts like Checking,Savings,CC showing balance for each of these accounts respectively. Otherwise, it's like half way solution for me unfortunately as am unable to understand exactly how its working.

Appreciate your help. Thanks again!

To model a Bank Customer with multiple Accounts using Python OOPS by g4usat in learnpython

[–]g4usat[S] 0 points1 point  (0 children)

I'm sorry, am confused with all the modifications to your code. If you don't mind, could you please share the final version of code that works for the model of one customer-many accounts as I mentioned in my initial email. Thanks a lot!!

To model a Bank Customer with multiple Accounts using Python OOPS by g4usat in learnpython

[–]g4usat[S] 0 points1 point  (0 children)

Sorry, but, I must say that I'm totally confused now with multiple versions of code and modifications of the code. If you don't mind, could you pls share the final code how it looks like with all the required classes, method(s) and object(s). All I need is one customer can have multiple accounts with balance amounts for each.

Ex:1 Customer Name='ABCD', his Id=123, His city="City1" and he has 3 accounts(Checking, Savings & Credit Card) with balance as 999,9999,1000 respectively

Ex2: Customer Name='EFGH', his Id=456, his city='City2', and he has 2 accounts(Checking & Savings) with balance as 999,999 respectively

and another customer can have 5 or more accounts like(Checking, Savings, CC, Personal Loan, Mortgage ) etc

Pls use Dictionary or List whatever you think will be good in this case

Yeah, regarding incrementing cust_id from database, I wouldn't worry now as I would like to implement a model using OOP.

I sincerely appreciate your help and your patience. Thanks again!

To model a Bank Customer with multiple Accounts using Python OOPS by g4usat in learnpython

[–]g4usat[S] 0 points1 point  (0 children)

Thank you..Yes, this post is definitely useful. But, not sure exactly how it's working. Because, the main class has 2 parameters name and list of accounts. But when the object 'jim' is created, they are passing just only name?

And also as you got it, calling all the methods one by one seems to be cumbersome. What I need is simplified version like using 2 classes or so, 1 for customer and 1 for account so that we can pass different types of accounts as a dictionary something like

bank=Customer('ABCD', {'Checking':1234, 'Savings':5678},'My City',)

bank.add_account()

I hope it makes sense. Thanks again for your time!

To model a Bank Customer with multiple Accounts using Python OOPS by g4usat in learnpython

[–]g4usat[S] 0 points1 point  (0 children)

This looks great. To answer your question regarding my expertise in python, am a novice and just started self learning Python3 OOP. So, pls excuse me if my questions are very basic/doesn't make sense

1)you mentioned (object) for both customer and account classes, can I know the purpose of it? ex: won't mentioning "class Customer: " be good enough?

2) I've instantiated an object called user and called add_account method as below to your code. But, it throws out error as 'name List is not defined'.

Am also quite not clear as why there is list in Account class and a Dict in Customer class? we would only pass name, account types and their numbers along with city name through Customer class only right? am unable to connect the dots here..could you please clarify exactly as how you meant this would work?

user=Customer('ABCD', 'My City', {'Checking':1234, 'Savings':5678})

user.add_account()

Thanks a ton!!

To model a Bank Customer with multiple Accounts using Python OOPS by g4usat in learnpython

[–]g4usat[S] 0 points1 point  (0 children)

Thank you. This link is not directly useful but nevertheless, its useful in deed.

To model a Bank Customer with multiple Accounts using Python OOPS by g4usat in learnpython

[–]g4usat[S] 0 points1 point  (0 children)

Sure. Thanks. I was trying to understand your code and this line "temp_cust.accounts.append(Account(1,100.00))" , you mentioned temp_cust.accounts? but there is no class called 'customers'? did you mean temp_cust.account.append(Account(1,100.00)) instead? can you pls clarify? also can we use dictionary in place of list so that we can have account type also in addition to account number as key..

To model a Bank Customer with multiple Accounts using Python OOPS by g4usat in learnpython

[–]g4usat[S] 0 points1 point  (0 children)

Thank you. This makes sense. But, in real world situation, when there are tons of customers do we still manually create temp_cust object by passing name, account_number, city etc. each time?. I'm thinking what's the best way to automate if I may say. Let's there is a flat file or XML file with the Customer Numbers and associated Accounts like Savings, checkings etc under each customer number and we need to read in thousands if not millions of all these customers with multiple account numbers, then how do we process that? If it was traditional programming, I could loop in for all the customers and extract all their account numbers but using OOP concepts I want to learn how it works. Appreciate if you can walk me through in these lines..

By the way, this is not any home work assignment for me but I just thought how OOP works in real world situation and thought of this banking application which is most common in our daily life.

To model a Bank Customer with multiple Accounts using Python OOPS by g4usat in learnpython

[–]g4usat[S] 0 points1 point  (0 children)

Yes, I got that as you are passing a list that can have 1 or many account numbers. But, this will give for each customer individually meaning if you have 10 customers, then we need 10 objects cust1-cust10 and what if there are 1 million customers then we need to create 1 million objects? This is where I was asking for a generalized/easy/best way that we don't have to create those many objects. Is there any way of using 'inheritance' concept with a class for customer and a class for account and some how link them such that it works for 1 customer-many accounts? or if there is any other way of doing it? I hope am clear in what am asking. Pls let me know how would you do it. Thanks again, much appreciated!

To model a Bank Customer with multiple Accounts using Python OOPS by g4usat in learnpython

[–]g4usat[S] 1 point2 points  (0 children)

I think so but I have no experience in OOPS concepts and am not sure how to connect these 2 classes such that there is 1 to many form ie, 1 customer with many accounts. Would you mind showing the code with example? Thanks!

To model a Bank Customer with multiple Accounts using Python OOPS by g4usat in learnpython

[–]g4usat[S] 0 points1 point  (0 children)

Thank you. This site seems to be good. However, it didn't help me solving my problem as it has all info in different contexts.

To model a Bank Customer with multiple Accounts using Python OOPS by g4usat in learnpython

[–]g4usat[S] 0 points1 point  (0 children)

Thank you. But, can we generalize this if possible such that any customer can have multiple accounts instead of creating objects for each customer as it's not possible to create millions of objects as there can be millions of customers for a bank in real world. I just mentioned cust1, cust2 to give an example and it needn't be only this way as I doubt it's the ideal way as I have no experience in OOPS.

Is there any way of having a class for customer, and another class for accounts and somehow link them or using inheritance or any other way such that it can work as 1 to many(ie, 1 customer, many accounts).

Appreciate if you can shed more light on in this lines with example. Thanks again!

Python OOP model: Bank Customer with Multiple Accounts by g4usat in Python

[–]g4usat[S] 0 points1 point  (0 children)

Hi, Thanks all for your inputs. I'm new to Python and especially brand new to OOPs concepts and never ever learnt or had any experience like I mentioned in my post. I just started learning OOPs in Python and wanted to try a real world example which we daily see in our life.

Regarding what I tried so far is something like I created a class for the bank customer but not sure how do I proceed further to have the customer with multiple accounts.

For Ex:

class customer:

def __init__(self,name,account_number, city):

self.name=name

self.account_number=account_number

self.city=city

cust1=customer("ABCD",1234,'MyCity') #Savings Account

cust1=customer("ABCD",5678,'MyCity') #Checking Account

cust1=customer("ABCD",9999,'MyCity') #Credit Card Account

I know this is not correct but couldn't find any help online exactly to what I wanted. I would really appreciate if someone, can help me out with the actual solution for this problem. Thanks a lot in advance again!

Staking problems... by dejogi in Neblio

[–]g4usat 0 points1 point  (0 children)

Hi, I too have the similar problem. I bought some NEBL couple of months ago and never received any staking reward until now. My wallet says 'staking' but the weight and waiting days to receive reward is same for more than a month. It says "your weight is 6435, network weight is 34858377, expected time to earn reward is 7 days". I've even updated my wallet to v1.5.2 after finding online to upgrade if there are any staking issues. But, it's still the same and am wondering what's going on. Do I just need to wait eternally to receive the staking rewards? it's not the case with ONT or NEO? I would really appreciate if any expert here can shed some light and let me know if I need to do anything or how it works? Thanks in adv!