r/madeinpython • u/Zoneforg • Mar 02 '24
Using Python To Generate (Fake) Ads From Images (To send to myself en-masse)
r/madeinpython • u/Zoneforg • Mar 02 '24
r/madeinpython • u/Alyx1337 • Mar 01 '24
r/madeinpython • u/cantdutchthis • Feb 29 '24
r/madeinpython • u/spacetime_engineer • Feb 29 '24
What is STEAMWare/Steamware?
Science-technology-engineering-art-mathematics wares; (STEAMWare) refers to a 3D-printable open source modular part family or hardware assembly language and the software utilities which generate them. Steamware was built to become a fully open source defacto-baseline solution for freely available high integrity-hardware generation for 3D-Print or otherwise. For makers, inventors, professionals, enthusiasts or whatever. Recreation grade and utility grade.
Link to repo : github.com/spacetimeengineer/steamware
What is STEAMWare for? Answer : Creation. Plain and simple. Get dangerous.
This project is built with python. It works by constructing 3D parts through the assembly of openscad code blocks programmatically using a simple string interface. These code blocks reflect actual cubic blocks in 3D space. This is not yet implemented as a library only a script but it works well so far. An example of a call may look like the following :
$ python3 steamware.py --en dougnut --ed /directory/where/files/are/exported --bu 10 --fp 0.134 --mt O --ts XXXBBAAAYY
This call will write openscad code to make a cubic-doughnut like part. Pictures in the repo.
It assembles these cubic-blocks according to a geometric system which is implemented through a track-string algorithm. This algorithm also happens to ensure certain modular properties. The README.md explains more. If you are not familiar with openscad I suggest taking a quick look at openscad.org
These parts are very powerful. Features include :
- Infinite Part Permutations Available
- All parts have physical self-evident-identity.
- Parts express hyper-modularity.
- No physically illegal operations.
- Fully Permissive.
At first glance one may feel compelled to compare STEAMWare to LEGOs because they are colorful, modular and technical but there are a few key differences.
1.) LEGOs are not principally joinery based, they are friction/pressure based. STEAMWare is all of the above and then some additional binding options too. You can imagine STEAMWare operates much like 3D Tetris blocks would but there is much more.
2.) LEGOs are recreation grade. STEAMWare is recreation and utility grade.
3.) LEGOs are proprietary. STEAMWare is maximally (to the best of my knowledge let me know if there is something better) permissive (BSD 3-Clause "New" or "Revised" License). STEAMWare wants you to incorporate STEAMWare into your own proprietary designs. STEAMWare wants pull requests. STEAMWare is organic. STEAMWare is Darwinian.
4.) STEAMWare is not a product it is a geometric protocol implemented with python so that 3D prints are possible. It possesses material independence. Its scaling is limited to manufacturing processes.
5.) Illegal operations are a thing with LEGOs. STEAMWare has no illegal operations because it is all just one big experiment. The STEAMWare revolution will be Darwinian. May the best parts be the most popular but may all parts participate even if they suck.
6.) STEAMWare has available an infinite set of parts for generation.
7.) All STEAMWare parts retain self-evident identity. Lego parts do not. There is no self consistent naming/labeling system.
8.) STEAMWare retains fractal like properties. Legos do not really in the same way.
9.) STEAMWare can mimic LEGOs, LEGOs cannot mimic STEAMWare.
This is a fun project and maybe it could lead to something... This is a start. We need more, such as gears, linkage systems, etc.
Link to repo : github.com/spacetimeengineer/steamware
r/madeinpython • u/developer_1010 • Feb 26 '24
Test-driven development (TDD) is an agile software development process.
The tests are written first before the classes and methods are implemented.
This means that your software has very high test coverage and therefore quality right from the start.
I have created a simple but detailed example of this in my blog article:
https://developers-blog.org/tdd-for-python-with-unittest-a-tutorial/

r/madeinpython • u/UnemployedTechie2021 • Feb 26 '24
r/madeinpython • • Feb 23 '24
Hi, r/madeinpython!
I've been learning about Flask, wanted to build something I could reuse for multiple projects, and I'm sharing it here!
I built an app that allows users to:
There are quite a few things involved:
I enjoyed building this! I learned quite a few things, such as storing passwords securely and validating input data from forms. Is there anything else you would like me to add?
You can check the live demo (you need to create an account but don't need to verify your email): https://wild-bonus-9050.ploomberapp.io/
Source code: https://github.com/ploomber/doc/tree/main/examples/flask/login (please share your feedback!)
r/madeinpython • • Feb 20 '24
Hey all,
I recently discovered that you can create animations with Matplotlib, so I grabbed some population data and plotted population over time. Here's Europe:
I wrapped this into a Voila dashboard, so you can change the continent: https://nameless-wave-5053.ploomberapp.io/
Source code: https://github.com/ploomber/doc/blob/main/examples/voila/animated-viz/app.ipynb
r/madeinpython • u/python4geeks • Feb 17 '24
List comprehension is a super handy technique in Python that allows you to create lists more concisely and elegantly.
Here's a detailed video on list comprehension👇👇👇
Video: https://youtu.be/a3eE5kslhek
r/madeinpython • u/developer_1010 • Feb 16 '24
I have made two introductory blog articles with examples of how to use Beautiful Soup. Enjoy reading them.
https://developers-blog.org/beautiful-soup-a-python-library-for-web-scraping/
https://developers-blog.org/beautiful-soup-types-of-selectors-with-examples/
r/madeinpython • u/ApprehensiveWin5783 • Feb 16 '24
Hey im 16 and im looking to make a bot to help do my homework. I was thinking there's gotta be a way for someone to do all these repetitive tasks for me. I don't know where to start however. Im looking to make something do repetitive tasks for me for my home and school work. Such as when i need to look something up to answer a multiple choice question. BTW ive always gotten all As but lately ive been doing harder classes and wanna free up time PLEASE HELP ME
r/madeinpython • u/bjone6 • Feb 15 '24
r/madeinpython • • Feb 14 '24
hey, r/madeinpython!
I want to share a demo I recently built: Arxiv Chat. It uses OpenAI + Arxiv to allow you to explore Arxiv papers.
Basically, you ask the system for papers on a specific topic, and then the RAG decides whether to use the Arxiv categories or the search API to grab those papers. This creates what we call the "papers context."
Now, when you ask another question, the system figures out whether it needs to do another search or just stick with the existing context. For instance, you might want to ask more about the papers you've already got or maybe even ask for a download link. If it needs to search again, it updates the papers context with the new info. Otherwise, it just keeps the conversation flowing based on what you've already got. I'm thinking of adding a feature to ask questions about a specific paper next!
Live demo: https://summer-wind-5194.ploomberapp.io/
Source code: https://github.com/ploomber/doc/tree/main/examples/solara/arxiv-chat
Deployment instructions: https://docs.cloud.ploomber.io/en/latest/apps/solara.html
r/madeinpython • u/PythonWithJames • Feb 13 '24
Hello all!
I'm releasing another batch of free coupons for my purely beginner focused course, and my intermediate course which looks at functional programming/comprehensions.
Python Programming for the Total Beginner
Functional Programming with Python Comprehensions
Cheers :)
r/madeinpython • u/python4geeks • Feb 13 '24
You must have used the square bracket notation ([]) method to access the items from the collection such as list, tuple, or dictionary.
my_lst = ["Sachin", "Rishu", "Yashwant"]
item = my_lst[0]
print(item)
The first element of the list (my_lst) is accessed using the square bracket notation method (my_list[0]) and printed in the above code.
But do you know how this happened? When my_lst[0] is evaluated, Python calls the list’s __getitem__ method.
my_lst = ["Sachin", "Rishu", "Yashwant"]
item = my_lst.__getitem__(0)
print(item)
This is the same as the above code, but Python handles it behind the scenes, and you will get the same result, which is the first element of my_lst.
You may be wondering what the __getitem__ method is and where it should be used.
Full Article: https://geekpython.in/python-getitem-method
r/madeinpython • u/Far-Zookeepergame835 • Feb 11 '24
Please, what am I doing wrong? I'm trying to update Generation (GERACAO) column based on year of birth (NASCIMENTO) column. To do so, I'm using loop FOR and conditionals, but it happens that it's being assumed the value 'BB' for every row.
r/madeinpython • u/Aareon • Feb 06 '24
r/madeinpython • u/onurbaltaci • Feb 04 '24
Hello, I just shared a Python Data Science Bootcamp on YouTube. Bootcamp is over 7 hours and there are 7 courses and 3 projects. Courses are Python, Pandas, Numpy, Matplotlib, Seaborn, Plotly and Scikit-learn. I am leaving the link below, have a great day!
r/madeinpython • u/python4geeks • Feb 03 '24
r/madeinpython • • Jan 31 '24
Hey r/madeinpython!
I wanted to learn how RAGs work, so I built one from scratch (no LangChain, no LlamaIndex, just OpenAI's API) that summarizes today's news; this is how it works:
I wrapped this into a Panel app, and deployed it to Ploomber Cloud. It was a great learning experience!
App is available here: https://ancient-wind-3019.ploomberapp.io
I'd love to hear what you think!
r/madeinpython • u/OFFICIALINSPIRE77 • Jan 31 '24
What up everybody
My cuzzo came in today, and he's an absolute UNIT, dis big ass swole dude (we call him Wagyu Beef) Cuzzo is an old school hacker growing up from the 80's and shii.
Homie won't stop preachin' 'bout PLAINTEXT. It's like his mantra, PLAINTEXT this, PLAINTEXT that, like he's tryna start a new wave or somethin' but I ain't really understanding what he saying...
And he is OBSESSED with THE SHELL...? What shell???
He made this tool recently and keeps showing it to me, and I wanted to see what y'all thought:
Dropped it on GitHub like it's hot, swear he thinks it's gonna break the internet or somethin'.
https://github.com/dislux-hapfyl/pynksh
Is Cuzzo certified hacker or is this autism? Srs responses only.
r/madeinpython • • Jan 30 '24
I found this app that uses GPT-4 as a sentiment classifier, outputs the negative/positive probabilities, and computes the feature importance for each word (using leave one out). It uses Solara, so it's all made with Python (no HTML, JS, or CSS!).
Disclaimer: I'm not the author; source below. Please be gentle with usage as this uses OpenAI's API!
App: https://lucky-heart-2240.ploomberapp.io/
Source: https://twitter.com/alonsosilva/status/1752027550652518757
Tooling: OpenAI, Ploomber Cloud, Solara.
r/madeinpython • u/KarlT1999 • Jan 30 '24
I made it with Pydroid 3
r/madeinpython • u/LionKimbro • Jan 29 '24
The problem I was trying to solve was this:
I have all of these things I have to do when I write a program:
These are often the least interesting aspects of writing a program. What I want to focus on, whenever I program something, is what the program actually does.
For the last 20 years, the primary answer to this kind of routine work is a framework. The framework takes care of the annoying trivialities that beset one in writing a program, so you can focus on the actual work of writing your program.
My main problem with this approach is that the frameworks we have are tied to genre. The most important frameworks we have in Python are possibly Django (in the genre of web development,) and Twisted (in the genre of TCP servers.) What you learn in Django, you cannot make use of in Twisted. What you learn in Twisted, you cannot make use of in Django. Each framework is glued to its genre, and cooperates poorly outside of it.
I wanted something that works, independent of genre. In my own work, I typically work in tkinter GUI apps, and command line data transformation programs. Neither of these worlds have any sort of solid frameworks behind them, a reality I saw lamented in this Stack Overflow question: "What non web-oriented Python frameworks exist?" 14 years, 5 months later, that question still holds up.
Today, I propose: Chassis.
Here's an example of a chassis program:
# helloworld.py
import sys
import chassis2024
import chassis2024.basicrun
CHASSIS2024_SPEC = {
"INTERFACES": {"RUN": sys.modules[__name__]}
}
# interface: RUN
def run():
print("Hello, world!")
if __name__ == "__main__":
chassis2024.run()(I've written details on how this helloworld.py program works, on github.)
That's very uninteresting, so let's see something more interesting:
import sys
import chassis2024
import chassis2024.basicrun
import chassis2024.argparse
import chassis2024.basicjsonpersistence
from chassis2024.words import *
from chassis2024.argparse.words import *
from chassis2024.basicjsonpersistence.words import *
this_module = sys.modules[__name__]
CHASSIS2024_SPEC = {
INTERFACES: {RUN: this_module,
ARGPARSE_CONFIGURE: this_module}
}
EXECUTION_SPEC = {
BASICJSONPERSISTENCE: {
SAVE_AT_EXIT: True,
CREATE_FOLDER: False,
FILEPATH: "./echo_persistence_data.json"
}
}
# interface: ARGPARSE_CONFIGURE
def argparse_configure(parser):
parser.add_argument("-e", "--echo",
help="input string to echo",
default=None)
parser.add_argument("-r", "--repeat-last",
dest="repeat",
help="repeat the last used echo string",
action="store_true")
chassis2024.basicjsonpersistence.argparse_configure(parser)
# interface: RUN
def run():
argparser = chassis2024.interface(ARGPARSE, required=True)
D = chassis2024.interface(PERSISTENCE_DATA, required=True).data()
if argparser.args.echo is not None:
print(argparser.args.echo)
D["msg"] = argparser.args.echo # saved automatically
elif argparser.args.repeat == True:
print(D.get("msg", "<nothing stored to repeat; use -e to echo something>"))
else:
print("use -e to specify string to echo"
if __name__ == "__main__":
chassis2024.run(EXECUTION_SPEC)I'm not going to go into detail on how this works here, with specificity; I've already done that elsewhere.
Rather, the key thing that I want you to take away from this, is that by merely declaring the key infrastructure, namely:
...everything required to sequence these operations together into a cohesive working program, is taken care of by the chassis.
The way it works is that chassis2024 collects information from each of the major infrastructural pieces, which describe their timing dependencies, and then interleave their functionality so that all of the steps and all of the promises are followed, at times that work together.
For example, the data persistence infrastructure will only load the data file after the command line arguments have been read, because the CLI arguments may have information that repoints where the data persistence infrastructure is supposed to get its data from.
The infrastructure modules declare what timings they require. Let's look at the declarations in chassis2024.basicjsonpersistence.__init__.py:
CHASSIS2024_SPEC = {
EXECUTES_GRAPH_NODES: [CLEAR_BASICJSONPERSISTENCE,
RESET_BASICJSONPERSISTENCE,
READ_BASICJSONPERSISTENCE],
EXECUTION_GRAPH_SEQUENCES: [(CLEAR,
CLEAR_BASICJSONPERSISTENCE, # *
RESET,
RESET_BASICJSONPERSISTENCE, # *
ARGPARSE,
READ_BASICJSONPERSISTENCE, # *
READ_PERSISTENCE,
ACTIVATE)],
INTERFACES: {PERSISTENCE_DATA: sys.modules[__name__]}
}First, a little background: By default, a program has this execution order:
(There is also a system akin to Go's "defer" system, so that teardowns can be scheduled, in LIFO order.)
This piece of infrastructure called "basicjsonpersistence" (that is, "Basic JSON Persistence") inserts new steps into the execution order:
What's it do in these steps?
Because the infrastructure can declare that CLEAR_BASICJSONPERSISTENCE is running between CLEAR and RESET, it can be sure to get a read on the current working directory, before anything else happens that might actually change the current working directory. Of course, this relies on other infrastructure respecting the general assumption that: "You don't change any meaningful process state during the CLEAR phase," but that is true of all systems everywhere forever: working software systems are made by following delineated steps, and keeping promises. But what this way of scheduling operations does, is make it possible to express the timing dependencies. And then the chassis performs a topological sort of all of the dependencies, and guarantees an execution that matches the expressed timing dependencies.
Another way of putting it is that this is like having a "make" system built into a program. It's like Python's doit system, but explicitly focused on the execution of a single ordinary Python process.
My hope and expectation is that with chassis, I, and anybody else who would be willing to try, will be able to spend more time focusing on the actual meat of our programs, and less on rebuilding and reassembling the skeletal infrastructure of our programs.
Chassis 2024:
Related Works (in Python):