Python & Flask web hosting /u/crmguy0004 Python Education

Python & Flask web hosting /u/crmguy0004 Python Education

Hello there – Can anyone recommend which web hosting to go with for python with flask website? I am looking for cheap and reliable web hosting to try out , if things work out I plan to pay more as we go!

Thank you

submitted by /u/crmguy0004
[link] [comments]

​r/learnpython Hello there – Can anyone recommend which web hosting to go with for python with flask website? I am looking for cheap and reliable web hosting to try out , if things work out I plan to pay more as we go! Thank you submitted by /u/crmguy0004 [link] [comments] 

Hello there – Can anyone recommend which web hosting to go with for python with flask website? I am looking for cheap and reliable web hosting to try out , if things work out I plan to pay more as we go!

Thank you

submitted by /u/crmguy0004
[link] [comments]  Hello there – Can anyone recommend which web hosting to go with for python with flask website? I am looking for cheap and reliable web hosting to try out , if things work out I plan to pay more as we go! Thank you submitted by /u/crmguy0004 [link] [comments]

Read more

Heavily interconnected Db that isn’t a graph? /u/NoApparentReason256 Python Education

Heavily interconnected Db that isn’t a graph? /u/NoApparentReason256 Python Education

follow up on this: https://www.reddit.com/r/learnpython/comments/1fu5moc/comment/lpzdmxf/?context=3

So I’m trying to create a database for diseases, which naturally relates diseases with similar symptoms. I want the system to be able to tie things together naturally – I’m running into issues where I can use a join table to give each disease its symptoms, pathophysiology, and treatments (because each is many-to-many), but when I want to more specifically discuss each symptom is a properly granular way, it gets messy fast due to various ‘qualifiers’ – Time, intensity, adjectives

Ex. Coughs can be brief, frequent, episodic – bloody, productive, dry, etc.

In the thread above, I got the tip to create composite keys, but the issue is I’d like to store additional information which can be used by my code in this. i.e. if ‘bloody’ -> give the patient anemia, or make the patient complain about coughing up ‘pink frothy’ stuff. It seems like composite keys will take away the ability to give each descriptor its full information set that the subsequent code would take advantage of.

Another dimension is location. Some diseases only hit big vessels, others small. Some diseases cause marks on the legs, while others on the palms of the hands. I don’t think its feasible to create a hundred column table with nulls covering most of it.

Finally, there is a probability dimension. For example, Asthma might have a 30% chance of a cough, vs Pneumonia might have 60% chance.

On this thread – https://www.reddit.com/r/Database/comments/1fwguue/the_best_approach_for_a_heavily_interconnected_db/, I got some tips but it doesn’t sound like the responders understood the thing I was concerned about. Most people pushed for a single table, but that doesn’t seem feasible to me for the following reason:

“different diseases have different numbers of each trait (some have 1 symptom, some have 5, same for treatments and tests). Once I break off a symptom table, it seems like the granularity of the symptom descriptions available leads to a combinatorial explosion, where each symptom can have a number of different modifiers, same for underlying pathophysiology. And each row will have a small sublet of columns which are relevant for them, leading to a strange and sparse table.

Is there a smarter way to have these core entities isolated and concatenated only when necessary in processing? I’m afraid of ending up with big strings with spacers and needing to use a regex or something alto parse it intelligently before feeding it into the code. Like pneumonia having “Cough_productive_chance70_intermittent_monthsCourse”. This seems like it could get unwieldy quite fast. I save some machine learning pipelines this way and it is painful.”

I’d really appreciate any tips. if the singular way to get around this is a graph db, then I’ll tackle it, but I guess I was hoping for alternatives. Somethings I’ve bumped into but can’t really assess for whether they are appropriate:

For reference, my end goal is a webapp + mobile app which has an offline mode. Not sure how this informs things but want to put it out there.

Graph related:

https://tinkerpop.apache.org/docs/current/reference/#gremlin-python

https://github.com/dpapathanasiou/simple-graph

https://github.com/arturo-lang/grafito?tab=readme-ov-file

Are these good for my ends? Thanks a lot for the help!

submitted by /u/NoApparentReason256
[link] [comments]

​r/learnpython follow up on this: https://www.reddit.com/r/learnpython/comments/1fu5moc/comment/lpzdmxf/?context=3 So I’m trying to create a database for diseases, which naturally relates diseases with similar symptoms. I want the system to be able to tie things together naturally – I’m running into issues where I can use a join table to give each disease its symptoms, pathophysiology, and treatments (because each is many-to-many), but when I want to more specifically discuss each symptom is a properly granular way, it gets messy fast due to various ‘qualifiers’ – Time, intensity, adjectives Ex. Coughs can be brief, frequent, episodic – bloody, productive, dry, etc. In the thread above, I got the tip to create composite keys, but the issue is I’d like to store additional information which can be used by my code in this. i.e. if ‘bloody’ -> give the patient anemia, or make the patient complain about coughing up ‘pink frothy’ stuff. It seems like composite keys will take away the ability to give each descriptor its full information set that the subsequent code would take advantage of. Another dimension is location. Some diseases only hit big vessels, others small. Some diseases cause marks on the legs, while others on the palms of the hands. I don’t think its feasible to create a hundred column table with nulls covering most of it. Finally, there is a probability dimension. For example, Asthma might have a 30% chance of a cough, vs Pneumonia might have 60% chance. On this thread – https://www.reddit.com/r/Database/comments/1fwguue/the_best_approach_for_a_heavily_interconnected_db/, I got some tips but it doesn’t sound like the responders understood the thing I was concerned about. Most people pushed for a single table, but that doesn’t seem feasible to me for the following reason: “different diseases have different numbers of each trait (some have 1 symptom, some have 5, same for treatments and tests). Once I break off a symptom table, it seems like the granularity of the symptom descriptions available leads to a combinatorial explosion, where each symptom can have a number of different modifiers, same for underlying pathophysiology. And each row will have a small sublet of columns which are relevant for them, leading to a strange and sparse table. Is there a smarter way to have these core entities isolated and concatenated only when necessary in processing? I’m afraid of ending up with big strings with spacers and needing to use a regex or something alto parse it intelligently before feeding it into the code. Like pneumonia having “Cough_productive_chance70_intermittent_monthsCourse”. This seems like it could get unwieldy quite fast. I save some machine learning pipelines this way and it is painful.” I’d really appreciate any tips. if the singular way to get around this is a graph db, then I’ll tackle it, but I guess I was hoping for alternatives. Somethings I’ve bumped into but can’t really assess for whether they are appropriate: For reference, my end goal is a webapp + mobile app which has an offline mode. Not sure how this informs things but want to put it out there. Graph related: https://tinkerpop.apache.org/docs/current/reference/#gremlin-python https://github.com/dpapathanasiou/simple-graph https://github.com/arturo-lang/grafito?tab=readme-ov-file Are these good for my ends? Thanks a lot for the help! submitted by /u/NoApparentReason256 [link] [comments] 

follow up on this: https://www.reddit.com/r/learnpython/comments/1fu5moc/comment/lpzdmxf/?context=3

So I’m trying to create a database for diseases, which naturally relates diseases with similar symptoms. I want the system to be able to tie things together naturally – I’m running into issues where I can use a join table to give each disease its symptoms, pathophysiology, and treatments (because each is many-to-many), but when I want to more specifically discuss each symptom is a properly granular way, it gets messy fast due to various ‘qualifiers’ – Time, intensity, adjectives

Ex. Coughs can be brief, frequent, episodic – bloody, productive, dry, etc.

In the thread above, I got the tip to create composite keys, but the issue is I’d like to store additional information which can be used by my code in this. i.e. if ‘bloody’ -> give the patient anemia, or make the patient complain about coughing up ‘pink frothy’ stuff. It seems like composite keys will take away the ability to give each descriptor its full information set that the subsequent code would take advantage of.

Another dimension is location. Some diseases only hit big vessels, others small. Some diseases cause marks on the legs, while others on the palms of the hands. I don’t think its feasible to create a hundred column table with nulls covering most of it.

Finally, there is a probability dimension. For example, Asthma might have a 30% chance of a cough, vs Pneumonia might have 60% chance.

On this thread – https://www.reddit.com/r/Database/comments/1fwguue/the_best_approach_for_a_heavily_interconnected_db/, I got some tips but it doesn’t sound like the responders understood the thing I was concerned about. Most people pushed for a single table, but that doesn’t seem feasible to me for the following reason:

“different diseases have different numbers of each trait (some have 1 symptom, some have 5, same for treatments and tests). Once I break off a symptom table, it seems like the granularity of the symptom descriptions available leads to a combinatorial explosion, where each symptom can have a number of different modifiers, same for underlying pathophysiology. And each row will have a small sublet of columns which are relevant for them, leading to a strange and sparse table.

Is there a smarter way to have these core entities isolated and concatenated only when necessary in processing? I’m afraid of ending up with big strings with spacers and needing to use a regex or something alto parse it intelligently before feeding it into the code. Like pneumonia having “Cough_productive_chance70_intermittent_monthsCourse”. This seems like it could get unwieldy quite fast. I save some machine learning pipelines this way and it is painful.”

I’d really appreciate any tips. if the singular way to get around this is a graph db, then I’ll tackle it, but I guess I was hoping for alternatives. Somethings I’ve bumped into but can’t really assess for whether they are appropriate:

For reference, my end goal is a webapp + mobile app which has an offline mode. Not sure how this informs things but want to put it out there.

Graph related:

https://tinkerpop.apache.org/docs/current/reference/#gremlin-python

https://github.com/dpapathanasiou/simple-graph

https://github.com/arturo-lang/grafito?tab=readme-ov-file

Are these good for my ends? Thanks a lot for the help!

submitted by /u/NoApparentReason256
[link] [comments]  follow up on this: https://www.reddit.com/r/learnpython/comments/1fu5moc/comment/lpzdmxf/?context=3 So I’m trying to create a database for diseases, which naturally relates diseases with similar symptoms. I want the system to be able to tie things together naturally – I’m running into issues where I can use a join table to give each disease its symptoms, pathophysiology, and treatments (because each is many-to-many), but when I want to more specifically discuss each symptom is a properly granular way, it gets messy fast due to various ‘qualifiers’ – Time, intensity, adjectives Ex. Coughs can be brief, frequent, episodic – bloody, productive, dry, etc. In the thread above, I got the tip to create composite keys, but the issue is I’d like to store additional information which can be used by my code in this. i.e. if ‘bloody’ -> give the patient anemia, or make the patient complain about coughing up ‘pink frothy’ stuff. It seems like composite keys will take away the ability to give each descriptor its full information set that the subsequent code would take advantage of. Another dimension is location. Some diseases only hit big vessels, others small. Some diseases cause marks on the legs, while others on the palms of the hands. I don’t think its feasible to create a hundred column table with nulls covering most of it. Finally, there is a probability dimension. For example, Asthma might have a 30% chance of a cough, vs Pneumonia might have 60% chance. On this thread – https://www.reddit.com/r/Database/comments/1fwguue/the_best_approach_for_a_heavily_interconnected_db/, I got some tips but it doesn’t sound like the responders understood the thing I was concerned about. Most people pushed for a single table, but that doesn’t seem feasible to me for the following reason: “different diseases have different numbers of each trait (some have 1 symptom, some have 5, same for treatments and tests). Once I break off a symptom table, it seems like the granularity of the symptom descriptions available leads to a combinatorial explosion, where each symptom can have a number of different modifiers, same for underlying pathophysiology. And each row will have a small sublet of columns which are relevant for them, leading to a strange and sparse table. Is there a smarter way to have these core entities isolated and concatenated only when necessary in processing? I’m afraid of ending up with big strings with spacers and needing to use a regex or something alto parse it intelligently before feeding it into the code. Like pneumonia having “Cough_productive_chance70_intermittent_monthsCourse”. This seems like it could get unwieldy quite fast. I save some machine learning pipelines this way and it is painful.” I’d really appreciate any tips. if the singular way to get around this is a graph db, then I’ll tackle it, but I guess I was hoping for alternatives. Somethings I’ve bumped into but can’t really assess for whether they are appropriate: For reference, my end goal is a webapp + mobile app which has an offline mode. Not sure how this informs things but want to put it out there. Graph related: https://tinkerpop.apache.org/docs/current/reference/#gremlin-python https://github.com/dpapathanasiou/simple-graph https://github.com/arturo-lang/grafito?tab=readme-ov-file Are these good for my ends? Thanks a lot for the help! submitted by /u/NoApparentReason256 [link] [comments]

Read more

Seemingly right code with type error /u/TESanfang Python Education

Seemingly right code with type error /u/TESanfang Python Education

I’m getting the type error at the return statement ‘Value after * must be an iterable, not bool’. I have no idea where it comes from, the code seems right, all the * come before an iterator, as can be readily seen by analysing the type declarations.

[SOLVED]: the problem had to do with the base cases ([False for _ in range(totalLength)]) is a list, not an iterator of lists.

def getConfigs(runs:list[int], totalLength :int)->Iterable[list[bool]]: ”’Given a list of runs and a length it returns an iterator of all available configurations of True and False within the length, such that every run of True is separated by at least a white piece.”’ if runs == []:return ([False for _ in range(totalLength)]) #Trivial case when there are no runs if sum(runs)+len(runs)-1>totalLength: return () #Case in which it’s impossible to find a proper configuration return ([*(False for _ in range(runStartingPoint)) , *(True for _ in range(runs[0])) , False , *nextConfig] for runStartingPoint in range(totalLength-runs[0]+1) for nextConfig in getConfigs(runs[1:],totalLength-runStartingPoint-runs[0]-1))

submitted by /u/TESanfang
[link] [comments]

​r/learnpython I’m getting the type error at the return statement ‘Value after * must be an iterable, not bool’. I have no idea where it comes from, the code seems right, all the * come before an iterator, as can be readily seen by analysing the type declarations. [SOLVED]: the problem had to do with the base cases ([False for _ in range(totalLength)]) is a list, not an iterator of lists. def getConfigs(runs:list[int], totalLength :int)->Iterable[list[bool]]: ”’Given a list of runs and a length it returns an iterator of all available configurations of True and False within the length, such that every run of True is separated by at least a white piece.”’ if runs == []:return ([False for _ in range(totalLength)]) #Trivial case when there are no runs if sum(runs)+len(runs)-1>totalLength: return () #Case in which it’s impossible to find a proper configuration return ([*(False for _ in range(runStartingPoint)) , *(True for _ in range(runs[0])) , False , *nextConfig] for runStartingPoint in range(totalLength-runs[0]+1) for nextConfig in getConfigs(runs[1:],totalLength-runStartingPoint-runs[0]-1)) submitted by /u/TESanfang [link] [comments] 

I’m getting the type error at the return statement ‘Value after * must be an iterable, not bool’. I have no idea where it comes from, the code seems right, all the * come before an iterator, as can be readily seen by analysing the type declarations.

[SOLVED]: the problem had to do with the base cases ([False for _ in range(totalLength)]) is a list, not an iterator of lists.

def getConfigs(runs:list[int], totalLength :int)->Iterable[list[bool]]: ”’Given a list of runs and a length it returns an iterator of all available configurations of True and False within the length, such that every run of True is separated by at least a white piece.”’ if runs == []:return ([False for _ in range(totalLength)]) #Trivial case when there are no runs if sum(runs)+len(runs)-1>totalLength: return () #Case in which it’s impossible to find a proper configuration return ([*(False for _ in range(runStartingPoint)) , *(True for _ in range(runs[0])) , False , *nextConfig] for runStartingPoint in range(totalLength-runs[0]+1) for nextConfig in getConfigs(runs[1:],totalLength-runStartingPoint-runs[0]-1))

submitted by /u/TESanfang
[link] [comments]  I’m getting the type error at the return statement ‘Value after * must be an iterable, not bool’. I have no idea where it comes from, the code seems right, all the * come before an iterator, as can be readily seen by analysing the type declarations. [SOLVED]: the problem had to do with the base cases ([False for _ in range(totalLength)]) is a list, not an iterator of lists. def getConfigs(runs:list[int], totalLength :int)->Iterable[list[bool]]: ”’Given a list of runs and a length it returns an iterator of all available configurations of True and False within the length, such that every run of True is separated by at least a white piece.”’ if runs == []:return ([False for _ in range(totalLength)]) #Trivial case when there are no runs if sum(runs)+len(runs)-1>totalLength: return () #Case in which it’s impossible to find a proper configuration return ([*(False for _ in range(runStartingPoint)) , *(True for _ in range(runs[0])) , False , *nextConfig] for runStartingPoint in range(totalLength-runs[0]+1) for nextConfig in getConfigs(runs[1:],totalLength-runStartingPoint-runs[0]-1)) submitted by /u/TESanfang [link] [comments]

Read more

Learning Python from zero /u/Sharp-Dog4743 Python Education

Learning Python from zero /u/Sharp-Dog4743 Python Education

Hello all 🙂 I have a bachelor’s in Education and I just started my master’s degree in Computational Science. The master’s program accepts students with no background in computer science because they have a course in Practical Computing that “teaches you the basics”. Our textbook is Intro to Python for Computer science and Data science (Paul and Harvey Deitel) and we are reading 2 chapters every week!! I feel that we are running rather than walking for being an introductory course. Our professor assigns us a chapter to read and then we do problems in class, however, everyone else in my class has experience coding and they solve the problems easily with the professor while I resign to copy and paste the code without really understanding what’s going on. I feel that reading the chapters is not really helping me because the problems done in class look nothing like the ones that were done in the chapter. I know that without the basics, I can’t move on from one topic to the other just like that, and I’m feeling desperate because I need to pass the class but I don’t want to rely on just copying and pasting codes. I want to learn and understand what we are doing, but I don’t know where to start, or where to go to learn everything I need to know. I know that Python is just a language, but I need help with learning how to solve problems through coding in general as well. I would appreciate any advice! Thank you so much in advance

submitted by /u/Sharp-Dog4743
[link] [comments]

​r/learnpython Hello all 🙂 I have a bachelor’s in Education and I just started my master’s degree in Computational Science. The master’s program accepts students with no background in computer science because they have a course in Practical Computing that “teaches you the basics”. Our textbook is Intro to Python for Computer science and Data science (Paul and Harvey Deitel) and we are reading 2 chapters every week!! I feel that we are running rather than walking for being an introductory course. Our professor assigns us a chapter to read and then we do problems in class, however, everyone else in my class has experience coding and they solve the problems easily with the professor while I resign to copy and paste the code without really understanding what’s going on. I feel that reading the chapters is not really helping me because the problems done in class look nothing like the ones that were done in the chapter. I know that without the basics, I can’t move on from one topic to the other just like that, and I’m feeling desperate because I need to pass the class but I don’t want to rely on just copying and pasting codes. I want to learn and understand what we are doing, but I don’t know where to start, or where to go to learn everything I need to know. I know that Python is just a language, but I need help with learning how to solve problems through coding in general as well. I would appreciate any advice! Thank you so much in advance submitted by /u/Sharp-Dog4743 [link] [comments] 

Hello all 🙂 I have a bachelor’s in Education and I just started my master’s degree in Computational Science. The master’s program accepts students with no background in computer science because they have a course in Practical Computing that “teaches you the basics”. Our textbook is Intro to Python for Computer science and Data science (Paul and Harvey Deitel) and we are reading 2 chapters every week!! I feel that we are running rather than walking for being an introductory course. Our professor assigns us a chapter to read and then we do problems in class, however, everyone else in my class has experience coding and they solve the problems easily with the professor while I resign to copy and paste the code without really understanding what’s going on. I feel that reading the chapters is not really helping me because the problems done in class look nothing like the ones that were done in the chapter. I know that without the basics, I can’t move on from one topic to the other just like that, and I’m feeling desperate because I need to pass the class but I don’t want to rely on just copying and pasting codes. I want to learn and understand what we are doing, but I don’t know where to start, or where to go to learn everything I need to know. I know that Python is just a language, but I need help with learning how to solve problems through coding in general as well. I would appreciate any advice! Thank you so much in advance

submitted by /u/Sharp-Dog4743
[link] [comments]  Hello all 🙂 I have a bachelor’s in Education and I just started my master’s degree in Computational Science. The master’s program accepts students with no background in computer science because they have a course in Practical Computing that “teaches you the basics”. Our textbook is Intro to Python for Computer science and Data science (Paul and Harvey Deitel) and we are reading 2 chapters every week!! I feel that we are running rather than walking for being an introductory course. Our professor assigns us a chapter to read and then we do problems in class, however, everyone else in my class has experience coding and they solve the problems easily with the professor while I resign to copy and paste the code without really understanding what’s going on. I feel that reading the chapters is not really helping me because the problems done in class look nothing like the ones that were done in the chapter. I know that without the basics, I can’t move on from one topic to the other just like that, and I’m feeling desperate because I need to pass the class but I don’t want to rely on just copying and pasting codes. I want to learn and understand what we are doing, but I don’t know where to start, or where to go to learn everything I need to know. I know that Python is just a language, but I need help with learning how to solve problems through coding in general as well. I would appreciate any advice! Thank you so much in advance submitted by /u/Sharp-Dog4743 [link] [comments]

Read more