how to integrate python code with latex to generate automated reports? /u/ChipRelative8452 Python Education

how to integrate python code with latex to generate automated reports? /u/ChipRelative8452 Python Education

I want to regularly generate reports from a database.

I often perform data analysis with Python and then import figures, tables, and other data into a LaTeX document using Overleaf. I want to add more automation to this process.

I work with both Python and R. Does anyone have any advice?

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

​r/learnpython I want to regularly generate reports from a database. I often perform data analysis with Python and then import figures, tables, and other data into a LaTeX document using Overleaf. I want to add more automation to this process. I work with both Python and R. Does anyone have any advice? submitted by /u/ChipRelative8452 [link] [comments] 

I want to regularly generate reports from a database.

I often perform data analysis with Python and then import figures, tables, and other data into a LaTeX document using Overleaf. I want to add more automation to this process.

I work with both Python and R. Does anyone have any advice?

submitted by /u/ChipRelative8452
[link] [comments]  I want to regularly generate reports from a database. I often perform data analysis with Python and then import figures, tables, and other data into a LaTeX document using Overleaf. I want to add more automation to this process. I work with both Python and R. Does anyone have any advice? submitted by /u/ChipRelative8452 [link] [comments]

Read more

How to convert a Selenium script into a desktop app? /u/ThePsychedelicSeal Python Education

How to convert a Selenium script into a desktop app? /u/ThePsychedelicSeal Python Education

I am working on an automation tool that will fill out contact forms across many web pages. Each website is a different “WEBSITE_CONFIG” that has the CSS/Name selectors for the fields. Currently, the information to be entered is variables in the Selenium script.

I want to convert this to a desktop app where you can enter the variables on some interface. Since the target websites will change for each person, I also need some way to enter the list of websites. This is currently populated on an Excel sheet so if the app could read a column of the Excel sheet, that would streamline things.

The intended workflow of this app would be:

  1. The user enters variables (name, phone, email, etc.) in the app
  2. Attach an Excel sheet with all the target websites
  3. Click Run
  4. The website opens
  5. The program searches for a URL match in the WEBSITE_CONFIGS and enters the information
  6. A new tab opens and the process continues

**Steps 4-6 are already implemented in the Selenium script.

Sorry for the broad question, but happy to clarify anything! Thank you in advance for any direction!

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

​r/learnpython I am working on an automation tool that will fill out contact forms across many web pages. Each website is a different “WEBSITE_CONFIG” that has the CSS/Name selectors for the fields. Currently, the information to be entered is variables in the Selenium script. I want to convert this to a desktop app where you can enter the variables on some interface. Since the target websites will change for each person, I also need some way to enter the list of websites. This is currently populated on an Excel sheet so if the app could read a column of the Excel sheet, that would streamline things. The intended workflow of this app would be: The user enters variables (name, phone, email, etc.) in the app Attach an Excel sheet with all the target websites Click Run The website opens The program searches for a URL match in the WEBSITE_CONFIGS and enters the information A new tab opens and the process continues **Steps 4-6 are already implemented in the Selenium script. Sorry for the broad question, but happy to clarify anything! Thank you in advance for any direction! submitted by /u/ThePsychedelicSeal [link] [comments] 

I am working on an automation tool that will fill out contact forms across many web pages. Each website is a different “WEBSITE_CONFIG” that has the CSS/Name selectors for the fields. Currently, the information to be entered is variables in the Selenium script.

I want to convert this to a desktop app where you can enter the variables on some interface. Since the target websites will change for each person, I also need some way to enter the list of websites. This is currently populated on an Excel sheet so if the app could read a column of the Excel sheet, that would streamline things.

The intended workflow of this app would be:

  1. The user enters variables (name, phone, email, etc.) in the app
  2. Attach an Excel sheet with all the target websites
  3. Click Run
  4. The website opens
  5. The program searches for a URL match in the WEBSITE_CONFIGS and enters the information
  6. A new tab opens and the process continues

**Steps 4-6 are already implemented in the Selenium script.

Sorry for the broad question, but happy to clarify anything! Thank you in advance for any direction!

submitted by /u/ThePsychedelicSeal
[link] [comments]  I am working on an automation tool that will fill out contact forms across many web pages. Each website is a different “WEBSITE_CONFIG” that has the CSS/Name selectors for the fields. Currently, the information to be entered is variables in the Selenium script. I want to convert this to a desktop app where you can enter the variables on some interface. Since the target websites will change for each person, I also need some way to enter the list of websites. This is currently populated on an Excel sheet so if the app could read a column of the Excel sheet, that would streamline things. The intended workflow of this app would be: The user enters variables (name, phone, email, etc.) in the app Attach an Excel sheet with all the target websites Click Run The website opens The program searches for a URL match in the WEBSITE_CONFIGS and enters the information A new tab opens and the process continues **Steps 4-6 are already implemented in the Selenium script. Sorry for the broad question, but happy to clarify anything! Thank you in advance for any direction! submitted by /u/ThePsychedelicSeal [link] [comments]

Read more

NumPy Axis Confusion /u/godshammer_86 Python Education

NumPy Axis Confusion /u/godshammer_86 Python Education

Not terribly new to Python or programming in general, but I’m looking at some initial NumPy exercises for Introduction to Statistical Learning with Applications in Python and I’m rather confused about the axis parameter to some methods.

Here’s the relevant supporting code from the ISLP Lab Notebook:

“`python3 rng = np.random.default_rng(3) X = rng.standard_normal((10, 3))

# array([[ 0.22578661, -0.35263079, -0.28128742], # [-0.66804635, -1.05515055, -0.39080098], # [ 0.48194539, -0.23855361, 0.9577587 ], # [-0.19980213, 0.02425957, 1.54582085], # [ 0.54510552, -0.50522874, -0.18283897], # [ 0.54052513, 1.93508803, -0.26962033], # [-0.24355868, 1.0023136 , -0.88645994], # [-0.29172023, 0.88253897, 0.58035002], # [ 0.0915167 , 0.67010435, -2.82816231], # [ 1.02130682, -0.95964476, -1.66861984]]) X.mean(axis=0) # array([ 0.15030588, 0.14030961, -0.34238602]) 

“`

The accompanying MD text here says:

The np.mean(), np.var(), and np.std() functions can also be applied to the rows and columns of a matrix. To see this, we construct a matrix of random variables, and consider computing its row sums.

Since arrays are row-major ordered, the first axis, i.e. axis=0, refers to its rows. We pass this argument into the mean() method for the object X.

I know axis=0 is rows and axis=1 is columns (for this example, at least). Since the example is passing axis 0 (rows) to the mean method, I would expect an output array of length 10 that calculates the mean of 3 elements in each row.

But the example appears to be calculating the mean of 10 elements in each of 3 columns, given the output array of length 3.

Further, when I calculate the column mean using X.mean(axis=1), I get the result I expected for axis=0, so the outputs are being switched.

The NumPy documentation didn’t provide any additional clarity.

Hoping someone can provide an explanation for what’s going on here. Is there possibly a setting (perhaps embedded in the notebook, that I can’t see) that allows axes to be switched, where rows are axis=1 and columns are axis=0?

Thanks in advance for any help!

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

​r/learnpython Not terribly new to Python or programming in general, but I’m looking at some initial NumPy exercises for Introduction to Statistical Learning with Applications in Python and I’m rather confused about the axis parameter to some methods. Here’s the relevant supporting code from the ISLP Lab Notebook: “`python3 rng = np.random.default_rng(3) X = rng.standard_normal((10, 3)) # array([[ 0.22578661, -0.35263079, -0.28128742], # [-0.66804635, -1.05515055, -0.39080098], # [ 0.48194539, -0.23855361, 0.9577587 ], # [-0.19980213, 0.02425957, 1.54582085], # [ 0.54510552, -0.50522874, -0.18283897], # [ 0.54052513, 1.93508803, -0.26962033], # [-0.24355868, 1.0023136 , -0.88645994], # [-0.29172023, 0.88253897, 0.58035002], # [ 0.0915167 , 0.67010435, -2.82816231], # [ 1.02130682, -0.95964476, -1.66861984]]) X.mean(axis=0) # array([ 0.15030588, 0.14030961, -0.34238602]) “` The accompanying MD text here says: The np.mean(), np.var(), and np.std() functions can also be applied to the rows and columns of a matrix. To see this, we construct a matrix of random variables, and consider computing its row sums. Since arrays are row-major ordered, the first axis, i.e. axis=0, refers to its rows. We pass this argument into the mean() method for the object X. I know axis=0 is rows and axis=1 is columns (for this example, at least). Since the example is passing axis 0 (rows) to the mean method, I would expect an output array of length 10 that calculates the mean of 3 elements in each row. But the example appears to be calculating the mean of 10 elements in each of 3 columns, given the output array of length 3. Further, when I calculate the column mean using X.mean(axis=1), I get the result I expected for axis=0, so the outputs are being switched. The NumPy documentation didn’t provide any additional clarity. Hoping someone can provide an explanation for what’s going on here. Is there possibly a setting (perhaps embedded in the notebook, that I can’t see) that allows axes to be switched, where rows are axis=1 and columns are axis=0? Thanks in advance for any help! submitted by /u/godshammer_86 [link] [comments] 

Not terribly new to Python or programming in general, but I’m looking at some initial NumPy exercises for Introduction to Statistical Learning with Applications in Python and I’m rather confused about the axis parameter to some methods.

Here’s the relevant supporting code from the ISLP Lab Notebook:

“`python3 rng = np.random.default_rng(3) X = rng.standard_normal((10, 3))

# array([[ 0.22578661, -0.35263079, -0.28128742], # [-0.66804635, -1.05515055, -0.39080098], # [ 0.48194539, -0.23855361, 0.9577587 ], # [-0.19980213, 0.02425957, 1.54582085], # [ 0.54510552, -0.50522874, -0.18283897], # [ 0.54052513, 1.93508803, -0.26962033], # [-0.24355868, 1.0023136 , -0.88645994], # [-0.29172023, 0.88253897, 0.58035002], # [ 0.0915167 , 0.67010435, -2.82816231], # [ 1.02130682, -0.95964476, -1.66861984]]) X.mean(axis=0) # array([ 0.15030588, 0.14030961, -0.34238602]) 

“`

The accompanying MD text here says:

The np.mean(), np.var(), and np.std() functions can also be applied to the rows and columns of a matrix. To see this, we construct a matrix of random variables, and consider computing its row sums.

Since arrays are row-major ordered, the first axis, i.e. axis=0, refers to its rows. We pass this argument into the mean() method for the object X.

I know axis=0 is rows and axis=1 is columns (for this example, at least). Since the example is passing axis 0 (rows) to the mean method, I would expect an output array of length 10 that calculates the mean of 3 elements in each row.

But the example appears to be calculating the mean of 10 elements in each of 3 columns, given the output array of length 3.

Further, when I calculate the column mean using X.mean(axis=1), I get the result I expected for axis=0, so the outputs are being switched.

The NumPy documentation didn’t provide any additional clarity.

Hoping someone can provide an explanation for what’s going on here. Is there possibly a setting (perhaps embedded in the notebook, that I can’t see) that allows axes to be switched, where rows are axis=1 and columns are axis=0?

Thanks in advance for any help!

submitted by /u/godshammer_86
[link] [comments]  Not terribly new to Python or programming in general, but I’m looking at some initial NumPy exercises for Introduction to Statistical Learning with Applications in Python and I’m rather confused about the axis parameter to some methods. Here’s the relevant supporting code from the ISLP Lab Notebook: “`python3 rng = np.random.default_rng(3) X = rng.standard_normal((10, 3)) # array([[ 0.22578661, -0.35263079, -0.28128742], # [-0.66804635, -1.05515055, -0.39080098], # [ 0.48194539, -0.23855361, 0.9577587 ], # [-0.19980213, 0.02425957, 1.54582085], # [ 0.54510552, -0.50522874, -0.18283897], # [ 0.54052513, 1.93508803, -0.26962033], # [-0.24355868, 1.0023136 , -0.88645994], # [-0.29172023, 0.88253897, 0.58035002], # [ 0.0915167 , 0.67010435, -2.82816231], # [ 1.02130682, -0.95964476, -1.66861984]]) X.mean(axis=0) # array([ 0.15030588, 0.14030961, -0.34238602]) “` The accompanying MD text here says: The np.mean(), np.var(), and np.std() functions can also be applied to the rows and columns of a matrix. To see this, we construct a matrix of random variables, and consider computing its row sums. Since arrays are row-major ordered, the first axis, i.e. axis=0, refers to its rows. We pass this argument into the mean() method for the object X. I know axis=0 is rows and axis=1 is columns (for this example, at least). Since the example is passing axis 0 (rows) to the mean method, I would expect an output array of length 10 that calculates the mean of 3 elements in each row. But the example appears to be calculating the mean of 10 elements in each of 3 columns, given the output array of length 3. Further, when I calculate the column mean using X.mean(axis=1), I get the result I expected for axis=0, so the outputs are being switched. The NumPy documentation didn’t provide any additional clarity. Hoping someone can provide an explanation for what’s going on here. Is there possibly a setting (perhaps embedded in the notebook, that I can’t see) that allows axes to be switched, where rows are axis=1 and columns are axis=0? Thanks in advance for any help! submitted by /u/godshammer_86 [link] [comments]

Read more

need help with some code /u/ah_ahaa Python Education

need help with some code /u/ah_ahaa Python Education

so today ive learned about range so i wanted to play with it a little but i got some issue not related to range

now i get an error in the code i attached . i realized its because of the int in the first line (ques)

what i dont know is what i need to convert here in order for me to get the STR in the “else”

i tried a bunch of things but none of them works.

if i remove the int from “”ques”” , i cant do the math after it.

thanks!

ques = int(input("please insert a number > ")) chart = range(0,6) chart2 = range(5,11) if ques == 1 or ques < 5: print (list(chart)) elif ques == 5 or ques > 5: print (list(chart2)) chart3 = input("why not numbers?") else: print (chart3) ques = int(input("please insert a number > ")) ValueError: invalid literal for int() with base 10: 'sef' 

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

​r/learnpython so today ive learned about range so i wanted to play with it a little but i got some issue not related to range now i get an error in the code i attached . i realized its because of the int in the first line (ques) what i dont know is what i need to convert here in order for me to get the STR in the “else” i tried a bunch of things but none of them works. if i remove the int from “”ques”” , i cant do the math after it. thanks! ques = int(input(“please insert a number > “)) chart = range(0,6) chart2 = range(5,11) if ques == 1 or ques < 5: print (list(chart)) elif ques == 5 or ques > 5: print (list(chart2)) chart3 = input(“why not numbers?”) else: print (chart3) ques = int(input(“please insert a number > “)) ValueError: invalid literal for int() with base 10: ‘sef’ submitted by /u/ah_ahaa [link] [comments] 

so today ive learned about range so i wanted to play with it a little but i got some issue not related to range

now i get an error in the code i attached . i realized its because of the int in the first line (ques)

what i dont know is what i need to convert here in order for me to get the STR in the “else”

i tried a bunch of things but none of them works.

if i remove the int from “”ques”” , i cant do the math after it.

thanks!

ques = int(input("please insert a number > ")) chart = range(0,6) chart2 = range(5,11) if ques == 1 or ques < 5: print (list(chart)) elif ques == 5 or ques > 5: print (list(chart2)) chart3 = input("why not numbers?") else: print (chart3) ques = int(input("please insert a number > ")) ValueError: invalid literal for int() with base 10: 'sef' 

submitted by /u/ah_ahaa
[link] [comments]  so today ive learned about range so i wanted to play with it a little but i got some issue not related to range now i get an error in the code i attached . i realized its because of the int in the first line (ques) what i dont know is what i need to convert here in order for me to get the STR in the “else” i tried a bunch of things but none of them works. if i remove the int from “”ques”” , i cant do the math after it. thanks! ques = int(input(“please insert a number > “)) chart = range(0,6) chart2 = range(5,11) if ques == 1 or ques < 5: print (list(chart)) elif ques == 5 or ques > 5: print (list(chart2)) chart3 = input(“why not numbers?”) else: print (chart3) ques = int(input(“please insert a number > “)) ValueError: invalid literal for int() with base 10: ‘sef’ submitted by /u/ah_ahaa [link] [comments]

Read more
On December ’24 Pixel Drop, at 1:01, the pixel tablet has lockscreen widget, let’s hope it come on all android devices soon… /u/maxence1994 Android

On December ’24 Pixel Drop, at 1:01, the pixel tablet has lockscreen widget, let’s hope it come on all android devices soon… /u/maxence1994 Android

On December ’24 Pixel Drop, at 1:01, the pixel tablet has lockscreen widget, let’s hope it come on all android devices soon… /u/maxence1994 Android

On December '24 Pixel Drop, at 1:01, the pixel tablet has lockscreen widget, let's hope it come on all android devices soon... submitted by /u/maxence1994
[link] [comments]

​r/Android submitted by /u/maxence1994 [link] [comments] 

On December '24 Pixel Drop, at 1:01, the pixel tablet has lockscreen widget, let's hope it come on all android devices soon... submitted by /u/maxence1994
[link] [comments]

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

Read more

I just copied from a video that was using Python 3.0 but it won’t work /u/xFrankino Python Education

I just copied from a video that was using Python 3.0 but it won’t work /u/xFrankino Python Education

>>> x = 6

>>> if x<6 :

… print (‘Small’)

File “<stdin>”, line 2

print (‘Small’)

^

IndentationError: expected an indented block after ‘if’ statement on line 1

>>>

Where is the problem?

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

​r/learnpython >>> x = 6 >>> if x<6 : … print (‘Small’) File “<stdin>”, line 2 print (‘Small’) ^ IndentationError: expected an indented block after ‘if’ statement on line 1 >>> Where is the problem? submitted by /u/xFrankino [link] [comments] 

>>> x = 6

>>> if x<6 :

… print (‘Small’)

File “<stdin>”, line 2

print (‘Small’)

^

IndentationError: expected an indented block after ‘if’ statement on line 1

>>>

Where is the problem?

submitted by /u/xFrankino
[link] [comments]  >>> x = 6 >>> if x<6 : … print (‘Small’) File “<stdin>”, line 2 print (‘Small’) ^ IndentationError: expected an indented block after ‘if’ statement on line 1 >>> Where is the problem? submitted by /u/xFrankino [link] [comments]

Read more

Question for plotting chart /u/bigthreedragons Python Education

Question for plotting chart /u/bigthreedragons Python Education

Hi all,

I am new to Python. When I watching a video on YT and try to plotting chart on jupyter as the video instructed. When the video plotting chart on jupyter, it input below command “

close.plot(figsize=(15,8),fontsize=12)

The jupyter return below value and able to plot the chart:

<AxesSubplot: xlabel=’Date’>

However, I follow the same way but cannot plot the same chart jupyter and jupyter return below value:

<Axes: xlabel=’Date’>”

Do anyone figure what happened? Thanks a lot

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

​r/learnpython Hi all, I am new to Python. When I watching a video on YT and try to plotting chart on jupyter as the video instructed. When the video plotting chart on jupyter, it input below command ” “close.plot(figsize=(15,8),fontsize=12)” The jupyter return below value and able to plot the chart: “<AxesSubplot: xlabel=’Date’> However, I follow the same way but cannot plot the same chart jupyter and jupyter return below value: “<Axes: xlabel=’Date’>” Do anyone figure what happened? Thanks a lot submitted by /u/bigthreedragons [link] [comments] 

Hi all,

I am new to Python. When I watching a video on YT and try to plotting chart on jupyter as the video instructed. When the video plotting chart on jupyter, it input below command “

close.plot(figsize=(15,8),fontsize=12)

The jupyter return below value and able to plot the chart:

<AxesSubplot: xlabel=’Date’>

However, I follow the same way but cannot plot the same chart jupyter and jupyter return below value:

<Axes: xlabel=’Date’>”

Do anyone figure what happened? Thanks a lot

submitted by /u/bigthreedragons
[link] [comments]  Hi all, I am new to Python. When I watching a video on YT and try to plotting chart on jupyter as the video instructed. When the video plotting chart on jupyter, it input below command ” “close.plot(figsize=(15,8),fontsize=12)” The jupyter return below value and able to plot the chart: “<AxesSubplot: xlabel=’Date’> However, I follow the same way but cannot plot the same chart jupyter and jupyter return below value: “<Axes: xlabel=’Date’>” Do anyone figure what happened? Thanks a lot submitted by /u/bigthreedragons [link] [comments]

Read more

How do I get better at quickly finding information I need in the documentation? /u/ferero18 Python Education

How do I get better at quickly finding information I need in the documentation? /u/ferero18 Python Education

Going through new documentation is a nightmare (and that’s like the main thing about python, so I gotta learn this properly)

Documentation is supposed to be used as needed, and there is a tone of libraries to use, but they’re so unclear to me…

I’m at the point when I have enough basic knowledge to work with APIs and libraries (and I did work with 10+ at this point, but only for coding exercising, nothing in the real world – which is what I’m doing now)

So how do I get better at finding what I need – and at reading it too, because most of the time the functions in the API/library don’t even have real-world examples, which is the main thing why I prefer using chatGPT for explaining or watching a YT video where someone uses the function I need.

But I don’t want to rely on AI, but to be able to pick it up from the documentation itself, I feel like it’s a core skill to have

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

​r/learnpython Going through new documentation is a nightmare (and that’s like the main thing about python, so I gotta learn this properly) Documentation is supposed to be used as needed, and there is a tone of libraries to use, but they’re so unclear to me… I’m at the point when I have enough basic knowledge to work with APIs and libraries (and I did work with 10+ at this point, but only for coding exercising, nothing in the real world – which is what I’m doing now) So how do I get better at finding what I need – and at reading it too, because most of the time the functions in the API/library don’t even have real-world examples, which is the main thing why I prefer using chatGPT for explaining or watching a YT video where someone uses the function I need. But I don’t want to rely on AI, but to be able to pick it up from the documentation itself, I feel like it’s a core skill to have submitted by /u/ferero18 [link] [comments] 

Going through new documentation is a nightmare (and that’s like the main thing about python, so I gotta learn this properly)

Documentation is supposed to be used as needed, and there is a tone of libraries to use, but they’re so unclear to me…

I’m at the point when I have enough basic knowledge to work with APIs and libraries (and I did work with 10+ at this point, but only for coding exercising, nothing in the real world – which is what I’m doing now)

So how do I get better at finding what I need – and at reading it too, because most of the time the functions in the API/library don’t even have real-world examples, which is the main thing why I prefer using chatGPT for explaining or watching a YT video where someone uses the function I need.

But I don’t want to rely on AI, but to be able to pick it up from the documentation itself, I feel like it’s a core skill to have

submitted by /u/ferero18
[link] [comments]  Going through new documentation is a nightmare (and that’s like the main thing about python, so I gotta learn this properly) Documentation is supposed to be used as needed, and there is a tone of libraries to use, but they’re so unclear to me… I’m at the point when I have enough basic knowledge to work with APIs and libraries (and I did work with 10+ at this point, but only for coding exercising, nothing in the real world – which is what I’m doing now) So how do I get better at finding what I need – and at reading it too, because most of the time the functions in the API/library don’t even have real-world examples, which is the main thing why I prefer using chatGPT for explaining or watching a YT video where someone uses the function I need. But I don’t want to rely on AI, but to be able to pick it up from the documentation itself, I feel like it’s a core skill to have submitted by /u/ferero18 [link] [comments]

Read more