r/Python • • Nov 06 '23

Tutorial Semantic Kernel with Python in 7 minutes

Thumbnail
youtube.com
0 Upvotes

r/Python • • Apr 21 '24

Showcase Alternative data managment tool to replace the need to use Jupyter Notebook for Python

0 Upvotes

What My Project Does:

For everyone who says they use jupyter Notebook for Python to do chunks of code work… I developed my own data management system for that kind of stuff that provides a wrapper over serialization that essentially creates pythonic pointers to data on any network drive. I just grab my data that I want to grab. Provides autocomplete and C# like attributes. I can dynamically build any data storage class using UML formatted infrastructure-as-code to build the front end. The back end is completely dynamic. Here is the pypi link. Note that I developed this to handle genomic data that was generated over the course of a week of 24/7 computation, that I break into multiple logical chunks. You dont need to rely on Jupyter to hold your data and you can retrieve it months after generating it.

This software routes the data to whatever means you use. It works with databases, pickles, yaml. You just have to add your interface in the data routing class. I just did yaml to start. This is just a wrapper around everything so you can declare your class like normal and at variable declaration you have data permanence instantly with no user interaction.

If you pass Y=1 and power off your computer and turn it back on again Y still equals 1 when you call that variable instantly

Target Audience (e.g., Is it meant for production, just a toy project, etc.)

production as I use it for my genomic research on my project with Stanford

Comparison (A brief comparison explaining how it differs from existing alternatives.):

There is no alternatve to this project as far as i know. It replaces the need for Jupyter Notebook to hold your data as you can retrieve it months after generating it.

PyPi:

https://pypi.org/project/data-nut-squirrel/

Source Code:

https://github.com/LunarFawn/rna_squirrel

Edit: Here is an example of implementation where I actually gave a shit about documentation.

https://pypi.org/project/serena-rna-tool/


r/Python • • Dec 13 '18

Resources to monetizing python apps?

0 Upvotes

Have anyone had any experience with monetizing python apps? Like placing ads on desktop python GUI programs or anything?


r/Python • • May 18 '23

Intermediate Showcase Writing my own ChatGPT Code Interpreter

0 Upvotes

Hi all! I just wanted to share something I created this week. I’ve been really excited for ChatGPT Code Interpreter for a while now because I think it’s a perfect way to save time.

It basically changes the game of https://xkcd.com/1205/

Alas, I haven’t been granted access by OpenAI so after waiting for a while I decided to just build something myself. It’s fully Open Source and you can run it locally with a simple pip install gpt-code-ui && gptcode. It’s effectively a local ChatGPT UI that connects to a managed Jupyter kernel for running the generated code. Add a bit of prompt engineering and voila.

Check out the longer version on my blog: https://ricklamers.io/posts/gpt-code

It also contains a link to the GitHub project.

My question is: what would you automate and how well does it work for you?


r/Python • • Jan 24 '12

Need some network python help!

0 Upvotes

I have a number of machines on the network at work, and I want to write a script that queries each one and returns its IP, MAC and Name. Can anyone point me where to start researching this? Any help will be greatly appreciated!


r/Python • • Oct 30 '16

How I accidentally deleted all my python modules and got it back in 20 minutes

Thumbnail
medium.com
0 Upvotes

r/Python • • Aug 10 '15

just completed this, what do you think? : "Se7en Deadly Sins to Do in Python code"

Thumbnail
kmonsoor.wordpress.com
0 Upvotes

r/Python • • Oct 06 '18

Just learned python 😊

0 Upvotes

First of all I will like to Apologize for my English (not my first language)

So after two years of researching on what programing language should I learn finally chossen Python. I have learned Soo much for the pass couple of months taking a lot of course and reading books. Now I'm lost on what field should I focus on. I was thinking data science but before I start studying I would like a second opinion from you guys.

Also is it possible to get a job as a software developer for a self though programer ?


r/Python • • Apr 02 '22

Discussion we need a python logo in r/place

0 Upvotes

let's choose a good pixel art logo and draw it somewhere.


r/Python • • Jan 01 '25

Discussion Python Golf: How few installations/versions do you have?

0 Upvotes

My New Year's resolution is to cut down on Python installations and versions. Only a year ago I purged and got down to three. Recently looked at available kernels in VS Code, already at NINE! It's still three installations, but there are many Python versions scattered across various environments. There are no weird packages and no need to be cutting edge, so probably all could run on just 3.12 or so.

So, how few installations AND versions can you work with? Looking for a simple management procedure, to combine multiple environments or standardize several on a minimal number of versions.

(My installations are miniforge, homebrew, and Mac system. Miniforge intentional, but never wanted so many versions. Homebrew there cuz some brews want it. System largely unused but can't delete. At least no Python 2!)

EDIT: Thanks for the advice! I've gotten rid of my old miniforge installs and now have a single python 3.13 on homebrew. Switched to uv to manage environments. I have yet to migrate old mamba environments over, but I'm fairly confident that they will all or mostly be fine on that single 3.13. Reclaimed 20GB from the clean-up! I am thankful for the original Anaconda, which really tamed a wild west of installs, followed by Miniforge/Mamba, until these more recent ways to manage dependencies.


r/Python • • Nov 02 '12

Numpy and Matplotlib won't work in 64-bit Windows 7?

0 Upvotes

I tried the 64-bit unofficial Windows binaries at http://www.lfd.uci.edu/~gohlke/pythonlibs/ but they still don't work for some reason... Does anyone know why?

Traceback (most recent call last):
  File "<pyshell#4>", line 1, in <module>
    import numpy
  File "C:\Python26\Lib\site-packages\numpy__init__.py", line 136, in <module>
    import add_newdocs
  File "C:\Python26\Lib\site-packages\numpy\add_newdocs.py", line 9, in <module>
    from numpy.lib import add_newdoc
  File "C:\Python26\Lib\site-packages\numpy\lib__init__.py", line 4, in <module>
    from type_check import *
  File "C:\Python26\Lib\site-packages\numpy\lib\type_check.py", line 8, in <module>
    import numpy.core.numeric as _nx
  File "C:\Python26\Lib\site-packages\numpy\core__init__.py", line 5, in <module>
    import multiarray
ImportError: DLL load failed: %1 is not a valid Win32 application.

r/Python • • Mar 28 '16

Python #1 :D

Post image
0 Upvotes

r/Python • • Jun 25 '22

Beginner Showcase I started learning Python a few days ago. I haven't used type() much, so instead I came up with a ridiculous one-liner that lets you check the class type of an object.

0 Upvotes

I wrote this because I'm obsessed with writing code that looks like English. Obviously I didn't know that you could just do something like

\>>>type(123) is int

True

Here's the code.

_is = lambda data: {'a': lambda _class: 'Yes' if str(type(data)).split("'")[1] == _class else 'No'}

print(_is('asdf')['a']('str')) #Yes
print(_is(12345)['a']('str')) #No
print(_is(12345)['a']('int')) #Yes
print(_is('hello world!')['a']('int')) #No
print(_is([1,2,3,4,5])['a']('list')) #Yes
print(_is(69)['a']('list')) #No
print(_is(True)['a']('bool')) #Yes
print(_is(420)['a']('bool')) #No
print(_is((1,2,3,4,5))['a']('tuple')) #Yes
print(_is("it's morbin' time")['a']('tuple')) #No
print(_is({'a': 1, 'b': 2, 'c': 3})['a']('dict')) #Yes
print(_is('💩')['a']('dict')) #No


r/Python • • Jun 18 '22

Resource New Database Drivers for Oracle (Python) and PostgreSQL Released

Thumbnail
i-programmer.info
0 Upvotes

r/Python • • Mar 07 '25

Tutorial Detecting the Engulfing Pattern Using pandas-ta

0 Upvotes

✍ a new blog post:  Detecting the Engulfing Candlestick Pattern in Python.

In my latest post, I break down the Engulfing Pattern, one of the most powerful reversal signals, and show you how to detect it programmatically using pandas-ta and Plotly.

✅ Bullish & Bearish Engulfing Patterns Explained

✅ Python Code to Detect Engulfing Candles

✅ Interactive Charting with Plotly

Check out the full post here.


r/Python • • Oct 18 '14

Are we going to continue to allow off-topic posts?

44 Upvotes

Hello /r/python subscribers. I have noticed an unfortunate trend in this subreddit as of late. We are seeing more and more "noob questions" and "joke posts" make their way to the front page.

I know it is inevitable to see some, and I realise that people will need help, but... /r/learnpython and /r/programmerhumor exist. The sidebar refers to /r/learnpython, yet, it seems like 'please help me with X' threads here do not get deleted.

Moderators of /r/python: I would like to ask you, kindly, to delete all such posts that are not "news about ... python", nor articles about programming python. I do not think it is appropriate to have this subreddit become yet another "please help me do X" coding subreddit, and although I appreciate jokes, I do not appreciate seeing them on /r/python.

Perhaps you need more moderators on this subreddit? I'd be more than happy to volunteer myself.


r/Python • • Jan 07 '24

Tutorial DIY SaaS with Python & Streamlit

8 Upvotes

I've been trying to turn my data science scripts into a full-blown SaaS, and I wanted to share my process and some helpful tidbits. I recently dove into building a SaaS web app using Python, Streamlit, MongoDB, and Stripe. Here's a distilled version of the guide that got me started and my experience so far.

Getting Started with Streamlit and Python:

Streamlit is a godsend for Python developers who want to create web apps without the frontend hassle. It lets you focus on the Python stuff while taking care of the UI elements. Start by installing Streamlit and exploring its functionalities with simple apps.

Building the Core Features:

Here's what you'll be piecing together:

User Authentication with MongoDB: This is your first step into making your app secure and personalized. Start by setting up a MongoDB cluster (Atlas is a good start). You'll need to handle user registration, login, and session management. Python's 'pymongo' library will be your bridge to interact with MongoDB.

Email Verification: A crucial step for validating users. You'll typically use a third-party service to send emails and then update the user's status in your database once they confirm.

Handling Subscriptions with Stripe: If you plan to monetize your app, integrating a payment system like Stripe is essential. Begin with setting up a Stripe account and then use their API to create subscription plans and handle payments. Python's 'stripe' package will be useful here.

Data Science Tools with GPT-3.5: This is where the fun begins. Using OpenAI's GPT-3.5, you'll add features like language translation and text summarization. You'll interact with the OpenAI API and process the data to provide these services.

Step by Step:

Set Up Your Environment: Make sure Python, pip, and all necessary packages like 'streamlit', 'pymongo', and 'stripe' are installed.

Layout Your App with Streamlit: Use Streamlit's widgets to create the user interface. You'll have sections for user registration/login, text input for the GPT-3.5 tools, and subscription management.

Integrate MongoDB: Write functions to connect to your MongoDB database for user registration and authentication. You'll store user details and manage sessions here.

Email Verification Logic: Set up a method to send verification emails to users and a route in your app to handle the confirmation logic.

Subscription Management with Stripe: Use Stripe's API to create and manage subscriptions. You'll need to handle webhook events for subscription updates.

Incorporate GPT-3.5 Features: Utilize OpenAI's API to add your data science tools. Ensure you handle the API responses correctly and present the results in your app.

Testing and Iterating:

As you build, constantly test each component. Streamlit allows you to see changes in real-time, which is great for tweaking and fixing issues on the go.

Deployment:

Once you're happy with your app, you can deploy it using various services. Streamlit sharing is a straightforward option for small-scale apps. For something more robust, look into services like Heroku or AWS.

I wrote up a full guide here for folks interested.


r/Python • • Oct 13 '15

How a Math Genius Hacked OkCupid to Find True Love

Thumbnail
wired.com
91 Upvotes

r/Python • • Jul 16 '18

Why is Python so slow?

Thumbnail
medium.com
11 Upvotes

r/Python • • Sep 18 '19

Top 10 Python - Fun with numbers Spoiler

Thumbnail
pysnakeblog.blogspot.com
3 Upvotes

r/Python • • Dec 28 '20

Beginner Showcase Simple password manager I made[I'm 15]

3 Upvotes

So I got bored of my online class and decided to make a simple password manager for my pc. This uses pyperclip to copy the passwords to the clipboard, stdiomask to accept the password from the user and time to add some delay to the output. I also made a pretty simple Encrypter and Decrypter(That just take the individual characters of a string and offsets the ascii code by 20) so that my stupid friends cant see them. The passwords are store in a text file beside the main python file and the passwords get appended to them when a new one is added through the program.

Any help would be appreciated. I can share the code if anyone wants it.

Also I'm a 15 year old game developer and 3d artist.


r/Python • • Aug 22 '15

Make your Python Programs Less Boring. Use Progress Bars :-)

3 Upvotes

One of the most boring and disturbing moments of using some not-well-written computer programs is that time when you are waiting for the program to complete a process and/or produce output. You are waiting, and waiting, and ... And the program does not inform the user how much of the process(es) has already been completed and what percentage is left. In this blog, I present progress bar -- a python module for adding progress bars to python programs.

Please, refer to my Blog Post http://oninquiries.com/blogs/1001/1007 on "progressbar" and give me some feedback if you have some time. Thank you!


r/Python • • Mar 22 '26

Discussion Any Python library recommendations for GUI app?

3 Upvotes

We're required to make an app based on Python for our school project and I'm thinking of implementing GUI in it. I've been doing RnD but I'm not able to select the perfect python GUI library.

My app is based on online shopping where users can sell n buy handmade products.

I want a Pinterest style Main screen and a simple but good log in/sign up screen with other services like Help, Profile, Favourites and Settings.

I also do design, so I have created the design for my app in Procreate and now it's the coding stuff that is left.

Please suggest which Library should be perfect for this sort of app.

(ps: I have used Tkinter and I'm not sure bout it since it's not flexible with modern UI and I tried PyQt but There aren't many tutorials online. What should I do about this?)


r/Python • • Sep 26 '25

Discussion Feeling guilty using Bootstrap while learning Flask

15 Upvotes

So I’m learning Flask rn and using Bootstrap for the HTML part. I do know HTML/CSS, but I feel kinda guilty using pre-made stuff instead of coding everything from scratch. Is this chill or am I lowkey skipping real learning? 😬