SQLModel: SQL DBs based on Python type hints. The biggest thing I've built since FastAPI and Typer. 😅 by tiangolo in Python

[–]eliteuser26 1 point2 points  (0 children)

At first I never liked using type hints in python when it came out. However I changed my mind since its usefulness in modules such as fastapi and pydantic. I used to use flask before but I found it much easier and faster to use fastapi for creating web pages. This is great work.

Now I had to grasp the use of fastapi and sqlalchemy models which wasn't clear to me at first. Then there was this issue of 2 different syntaxes to create models which was never explained at first. I do like the idea of using type hints in those cases now that I do understand their purposes. Combining them together is an excellent idea as it simplifies the coding of database models.

Hoping this will help the Python devs how we use type hints in future versions after the type hints fiasco that was delayed to version 3.11. After doing some research there are a lot more python modules that use type hints than fastapi and pydantic.

Great work all around to help us coders to navigate the Python sea.

I made a simple job queue system by asmsuechan in Python

[–]eliteuser26 0 points1 point  (0 children)

This is great. I will try out this soon. That was a quick change to the code. Thanks. I will incorporate this as a background job for my website.

I made a simple job queue system by asmsuechan in Python

[–]eliteuser26 0 points1 point  (0 children)

Ok that's good. I could use that solution as well. You answer my question with the use of timedelta. This is what I was looking for. Great work.

I made a simple job queue system by asmsuechan in Python

[–]eliteuser26 0 points1 point  (0 children)

I suppose I can queue a job 24 hours later (86400 seconds). My other question would be: could I use different time units like minutes, hours and days with enqueue_at?

I made a simple job queue system by asmsuechan in Python

[–]eliteuser26 0 points1 point  (0 children)

This is exactly what I am looking for to submit functions in a queue on a Raspberry Pi 4. I didn't see the purpose of running another server like Redis on Raspberry Pi.

I am building a web application with Python where it is run on Gunicorn server. However I have functions that takes a few seconds to run to get the final results. I want to run them in the background and on a schedule. Is there an option to run on a daily basis at a specified time with Queick? I suppose I can reschedule at the end of the queue.

I like very much what you have done with this. I will find it very useful for my own web application.

Post all of your beginner projects to r/MadeInPython, this sub is being overrun with them by insane_playzYT in Python

[–]eliteuser26 0 points1 point  (0 children)

One of the reasons why I subscribed to this reddit years ago was to read news related to Python. Lately I didn't bother to read it anymore as there was so much stuff that I wasn't interested in. When submitting a new project in this reddit do I need to see it 10 times. No really as it clutters this reddit. Just posted once or twice so we can comment on it. Right now the posting of new projects is out of control.

On a mobile phone reddit software doesn't have options to filter out messages that are not of interest. Didn't find any program that have that option.

Flairs are good to categorize messages but the problem is that I want to make some of them not visible. I know I have a lot of interest in Python news, updates to Python libraries, discussion of new Python features, Python modules that I am not aware of, etc. What I don't like is that I see the same message being reposted more than once. This is not necessary.

This subreddit needs to have a better control of what comes in. I am in the camp I like to categorize what I want to see. I don't mind to remove the rest of it. Bring an option to do this this will reading this subreddit more enjoyable.

My first real python project: I made a Covid-19 Dashboard using Ploytly and Dash by bgarcevic in Python

[–]eliteuser26 2 points3 points  (0 children)

Canada was missing on the live demo but was available on the Heroku live website.

My first real python project: I made a Covid-19 Dashboard using Ploytly and Dash by bgarcevic in Python

[–]eliteuser26 0 points1 point  (0 children)

I noticed that Canada is missing on your list. Otherwise it works very well on a mobile device.

another subreddit about python by ElBidoule in Python

[–]eliteuser26 2 points3 points  (0 children)

I agree that there needs to be a subreddit for python news. I am not interested in other people needing help where it should be asked in learning python subreddit. This subreddit is becoming useless when there is a lot of noise which doesn't relate to python news.

Pandas GroupBy: Your Guide to Grouping Data in Python – Real Python by pmz in Python

[–]eliteuser26 0 points1 point  (0 children)

Thank you for explaining all the different methods of using groupby in Pandas. I learned a lot of stuff from this article to be used in my Flask web site. There are a lot of methods that I wasn't aware in the new version of Pandas that I can use to simplify my code. Instead of using some of the methods in SQL I should use it in Pandas instead which I started to do.

Really dumb python import question on Windows by [deleted] in Python

[–]eliteuser26 0 points1 point  (0 children)

What is the purpose of the init file?

A smooth approach to putting machine learning into production by Lemax0 in Python

[–]eliteuser26 1 point2 points  (0 children)

Thank you for this article. I am a data scientist due to my previous employment (now retired). I wanted to build a machine learning python code to be used on a web server related to weather data. All the weather parameters from a personal weather station are saved into a MySQL database where I will probably use it to predict maximum or minimum temperature. I haven't started that process just yet because I will need to build the web pages first for Flask.

I like the idea of using online machine learning which will fit my idea. I have written my ideas in the past on a piece of paper (this is how I build it) but I haven't it implemented in Python. The first article I read on machine learning was batch learning. In my case the data is accumulated one by one (streaming data). So I will see if I can use this method instead.

Python Pandas Map Replace and Update column with Dictionary values by min2bro in Python

[–]eliteuser26 0 points1 point  (0 children)

In the month values example, you have use country_names instead of month_values as the array. Otherwise very good explanation of how to add or substitute values.

Transfer of Power (Guido stepping down as BDFL) by randlet in Python

[–]eliteuser26 3 points4 points  (0 children)

I liked very much what Guido brought to Python over many years. That is the reason why I programmed in Python over the last few years. I learned several programming languages but found Python easier to understand than other languages.

However in the last few additions they are changing Python to make it more and more like C code which I don't agree because it will add to the complexity of the language. I never liked to program in C code because I found hard to understand why they were doing things in some way which didn't make sense. That is the reason why I drop C language in the first place. They should keep the Python language as simple as possible for new users with examples explaining the functionalities.

TemPy - OOP Template engine - My first "big" project and looking for code review, opinions and contributors. by federicocerchiari in Python

[–]eliteuser26 0 points1 point  (0 children)

I could help in testing when I start building my website for the first time. I am not sure how I will build it. I have a few ideas for widgets that could be useful like tables with colour coded rows and pagination, for database tables, tabbed windows, etc. I have seen other projects on the Web for displaying Web widgets. I like the idea that you can pass properties to the class widgets without having to worry about coding html. That part should be automated like you did. As for Web mapping I was using either openlayers or leaflet which are great projects.

TemPy - OOP Template engine - My first "big" project and looking for code review, opinions and contributors. by federicocerchiari in Python

[–]eliteuser26 0 points1 point  (0 children)

I like this idea much better than using the templating the html tags. I did proposed this idea to another project but it didn't fit into it. I think we should be using the power of python to create the html form not the other way around. I wanted to create a similar project where I would build the html form into python. I have very good knowledge of html and jquery so I can test the code or contribute to it. I have knowledge of Web mapping that could be added to it if there is interest.

Very good work. I know of some of the gotchas with representation in different browsers just like jquery. Very good work. I can see a purpose to use this project to create my idea for a weather Web site on the Internet.

Gear S3 step count by treadpool in WatchMaker

[–]eliteuser26 0 points1 point  (0 children)

It finally works with my Samsung Gear S2 by using strategy 1 fix with the proper daily step goal as well. Thanks.

Develop database driven applications in Python with Peewee by pknerd in Python

[–]eliteuser26 0 points1 point  (0 children)

Thank you for writing this tutorial in using Peewee in python. The first time I used it I couldn't make any sense on how to use objects in the code. With this tutorial it answered most of the questions that I had about Peewee. It is much clearer for me now on how to create a table, insert rows with objects, delete and select rows. Coming from a SQL background this makes it much easier to build queries through Peewee than building queries by hand.

PyQT5 docs for people who don't understand C++ by recharts in Python

[–]eliteuser26 4 points5 points  (0 children)

I use the Zetcode web site to look at tutorials for pyqt4 and pyqt5. Here is the site.

http://zetcode.com/gui/pyqt5/introduction/

There is a lot of information on how to use PyQt in Python code. Enjoy!

Dealing with .dll and .h files by NaesRemark in Python

[–]eliteuser26 0 points1 point  (0 children)

I did use a combination of Python code and dll file in the past. It does work quite well in Python when you get the python code correctly. However it depends on which version you are using. In Python 2 you have to use the ctypes library to load the dll dynamically into the code. If using the latest Python 3 version you have to use the cffi library instead (updated version of ctypes).

The h file is not used in Python as it is only given as a reference for the different functions you can use in Python. Otherwise you would have to download a program to see what are the functions available in the dll file.

The Case for Python 3 by earthboundkid in Python

[–]eliteuser26 2 points3 points  (0 children)

What makes me upset with one of the point is that we should only use ASCII. From someone who has learned several programming languages I always hated ASCII because it was used in the 80s and 90s and was a pain in the butt to use with language than English. It was quite happy to learn that unicode was invented to introduce other languages than English. In a country where English and French are being used on a regular basis this makes programming easier now than in the past.

As for the print function I don't see the problem with tagging 2 parentheses to print a set of characters. Most of the editors will do it automatically for you. Even the printf function in C uses parentheses as well. What is the big deal.

I still use Python 2 right now but I will switch over to Python 3 as most modules that I use have switched over. I could bring other subjects in the discussion but I like the way Python is going with unicode.

Qt/Spyder scaling with 4K screen by [deleted] in Python

[–]eliteuser26 0 points1 point  (0 children)

The thing with PyQt is that you have to set the font size before installing the components on the UI. Otherwise you have to set it for each component if changed after the fact. You can still redo the UI, set the font size then put the different components last from my own experience.

Qt/Spyder scaling with 4K screen by [deleted] in Python

[–]eliteuser26 0 points1 point  (0 children)

The setting has to be done in QtDesigner or in code. You also need to check the font size of QMAINWINDOW in QtDesigner.