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

How to learn python without wasting my time /u/Any-Background-9158 Python Education

How to learn python without wasting my time /u/Any-Background-9158 Python Education

I have prior experience with programming and made some fairly complex programming projects in c and java and now I want to learn python for a project, how to learn it as fast as possible without wasting time and relearning basic programming (I want to specify here that I mean the language generally not framework that wil come after)

submitted by /u/Any-Background-9158
[link] [comments]

​r/learnpython I have prior experience with programming and made some fairly complex programming projects in c and java and now I want to learn python for a project, how to learn it as fast as possible without wasting time and relearning basic programming (I want to specify here that I mean the language generally not framework that wil come after) submitted by /u/Any-Background-9158 [link] [comments] 

I have prior experience with programming and made some fairly complex programming projects in c and java and now I want to learn python for a project, how to learn it as fast as possible without wasting time and relearning basic programming (I want to specify here that I mean the language generally not framework that wil come after)

submitted by /u/Any-Background-9158
[link] [comments]  I have prior experience with programming and made some fairly complex programming projects in c and java and now I want to learn python for a project, how to learn it as fast as possible without wasting time and relearning basic programming (I want to specify here that I mean the language generally not framework that wil come after) submitted by /u/Any-Background-9158 [link] [comments]

Read more

Google is starting to roll out Theft Detection Lock, Offline Device Lock, and Remote Lock to Android users in the US /u/MishaalRahman Android

Google is starting to roll out Theft Detection Lock, Offline Device Lock, and Remote Lock to Android users in the US /u/MishaalRahman Android

Edit: These three features actually appear to be rolling out globally, judging by all the replies I’ve received!

I just checked my Xiaomi 14T Pro and noticed that I have Theft Detection Lock and Offline Device Lock but not Remote Lock. Some Pixel users in the US tell me they have Remote Lock but not the other two.

Theft Detection Lock uses a ML model to detect when someone snatches your phone from your hand and tries to run away with it on foot, by bike, or by car. If detected, your phone will automatically lock, blocking unwanted access to your apps and data.

Offline Device Lock automatically locks your screen if a thief tries to keep your phone disconnected from the Internet for an extended period of time.

Remote Lock lets you remotely lock your phone using just your phone number in case you can’t sign into Find My Device using your Google account password.

All three features entered beta in August, starting in Brazil. Google told me the final versions of these features would more widely roll out this year, and it seems the features have begun expanding.

LMK which (if any) of these 3 new features you have!

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

​r/Android Edit: These three features actually appear to be rolling out globally, judging by all the replies I’ve received! I just checked my Xiaomi 14T Pro and noticed that I have Theft Detection Lock and Offline Device Lock but not Remote Lock. Some Pixel users in the US tell me they have Remote Lock but not the other two. Theft Detection Lock uses a ML model to detect when someone snatches your phone from your hand and tries to run away with it on foot, by bike, or by car. If detected, your phone will automatically lock, blocking unwanted access to your apps and data. Offline Device Lock automatically locks your screen if a thief tries to keep your phone disconnected from the Internet for an extended period of time. Remote Lock lets you remotely lock your phone using just your phone number in case you can’t sign into Find My Device using your Google account password. All three features entered beta in August, starting in Brazil. Google told me the final versions of these features would more widely roll out this year, and it seems the features have begun expanding. LMK which (if any) of these 3 new features you have! submitted by /u/MishaalRahman [link] [comments] 

Edit: These three features actually appear to be rolling out globally, judging by all the replies I’ve received!

I just checked my Xiaomi 14T Pro and noticed that I have Theft Detection Lock and Offline Device Lock but not Remote Lock. Some Pixel users in the US tell me they have Remote Lock but not the other two.

Theft Detection Lock uses a ML model to detect when someone snatches your phone from your hand and tries to run away with it on foot, by bike, or by car. If detected, your phone will automatically lock, blocking unwanted access to your apps and data.

Offline Device Lock automatically locks your screen if a thief tries to keep your phone disconnected from the Internet for an extended period of time.

Remote Lock lets you remotely lock your phone using just your phone number in case you can’t sign into Find My Device using your Google account password.

All three features entered beta in August, starting in Brazil. Google told me the final versions of these features would more widely roll out this year, and it seems the features have begun expanding.

LMK which (if any) of these 3 new features you have!

submitted by /u/MishaalRahman
[link] [comments]  Edit: These three features actually appear to be rolling out globally, judging by all the replies I’ve received! I just checked my Xiaomi 14T Pro and noticed that I have Theft Detection Lock and Offline Device Lock but not Remote Lock. Some Pixel users in the US tell me they have Remote Lock but not the other two. Theft Detection Lock uses a ML model to detect when someone snatches your phone from your hand and tries to run away with it on foot, by bike, or by car. If detected, your phone will automatically lock, blocking unwanted access to your apps and data. Offline Device Lock automatically locks your screen if a thief tries to keep your phone disconnected from the Internet for an extended period of time. Remote Lock lets you remotely lock your phone using just your phone number in case you can’t sign into Find My Device using your Google account password. All three features entered beta in August, starting in Brazil. Google told me the final versions of these features would more widely roll out this year, and it seems the features have begun expanding. LMK which (if any) of these 3 new features you have! submitted by /u/MishaalRahman [link] [comments]

Read more

How does “Import *” work exactly? Why does Vscode sometimes complains and sometimes not. /u/wnluk Python Education

How does “Import *” work exactly? Why does Vscode sometimes complains and sometimes not. /u/wnluk Python Education

I’m relatively new to python. I mean, I used it sometimes over the years whenever I needed anything small, but I never bothered to really learn it, never taken it seriously.
Now I wanted to learn networking, it sounds interesting, so I wanted to learn scapy.
I figured I’ll ask ChatGPT for a jumping-off point, and then I go from there. So I import:
from scapy.all import ICMP,IP,sr1
But then I think I can instead just write:
from scapy.all import *
And Vscode starts complaining.
What’s curious, it complains about ICMP() and IP(), but not sr1().
I get something like “IP is not defined”
What is happening? Shouldn’t “import *” import everything?
GPT tells me that “import *” is against the best practice, and I get that, but just because I shouldn’t doesn’t mean I’m not allowed to. Does it?

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

​r/learnpython I’m relatively new to python. I mean, I used it sometimes over the years whenever I needed anything small, but I never bothered to really learn it, never taken it seriously. Now I wanted to learn networking, it sounds interesting, so I wanted to learn scapy. I figured I’ll ask ChatGPT for a jumping-off point, and then I go from there. So I import: from scapy.all import ICMP,IP,sr1 But then I think I can instead just write: from scapy.all import * And Vscode starts complaining. What’s curious, it complains about ICMP() and IP(), but not sr1(). I get something like “IP is not defined” What is happening? Shouldn’t “import *” import everything? GPT tells me that “import *” is against the best practice, and I get that, but just because I shouldn’t doesn’t mean I’m not allowed to. Does it? submitted by /u/wnluk [link] [comments] 

I’m relatively new to python. I mean, I used it sometimes over the years whenever I needed anything small, but I never bothered to really learn it, never taken it seriously.
Now I wanted to learn networking, it sounds interesting, so I wanted to learn scapy.
I figured I’ll ask ChatGPT for a jumping-off point, and then I go from there. So I import:
from scapy.all import ICMP,IP,sr1
But then I think I can instead just write:
from scapy.all import *
And Vscode starts complaining.
What’s curious, it complains about ICMP() and IP(), but not sr1().
I get something like “IP is not defined”
What is happening? Shouldn’t “import *” import everything?
GPT tells me that “import *” is against the best practice, and I get that, but just because I shouldn’t doesn’t mean I’m not allowed to. Does it?

submitted by /u/wnluk
[link] [comments]  I’m relatively new to python. I mean, I used it sometimes over the years whenever I needed anything small, but I never bothered to really learn it, never taken it seriously. Now I wanted to learn networking, it sounds interesting, so I wanted to learn scapy. I figured I’ll ask ChatGPT for a jumping-off point, and then I go from there. So I import: from scapy.all import ICMP,IP,sr1 But then I think I can instead just write: from scapy.all import * And Vscode starts complaining. What’s curious, it complains about ICMP() and IP(), but not sr1(). I get something like “IP is not defined” What is happening? Shouldn’t “import *” import everything? GPT tells me that “import *” is against the best practice, and I get that, but just because I shouldn’t doesn’t mean I’m not allowed to. Does it? submitted by /u/wnluk [link] [comments]

Read more