#tools-and-devops

1 messages · Page 23 of 1

surreal ridge
#

and a .exe

#

how do you expect people to contribute

#

or review

#

anything

wet barn
#

yes and what about isn't this is how to upload ur exe files??

wet barn
surreal ridge
#

you need to usually expose your source code in an open source project

#

especially if you want people to participate, collaborate, review

#

here the image that you are giving back is that it's just a scam/hack attempt

wet barn
#

Its gonna cool if u send me a video how to explain that or doing that am kinda new intro GitHub

dire quartz
#

You don't typically check in the executable binaries

wet barn
#

I still dont get it

dire quartz
#

There is a feature for sharing binaries on Github as well, but you don't generally check them in

wet barn
#

For that

dire quartz
#

The issue Clem is referring to is that downloading and running an executable on your computer if you don't know exactly what it does or where it came from can be very dangerous

#

So people typically will not be willing to just run the exe file you yourself built

#

But if you provide the source code for your tool, they may be willing to build and run it themselves

surreal ridge
wet barn
surreal ridge
#

Don't hesitate to ask questions on the way if needed

dire quartz
wet barn
#

no? For how to turn off that issue

surreal ridge
#

it's not something you can turn off @wet barn

dire quartz
#

The issue is just that you didn't put the code for your tool in your github repository

surreal ridge
#

Before building that .exe, you had some source code right?

wet barn
surreal ridge
wet barn
#

Also just in case i used Auto py to exe to convert it

dire quartz
surreal ridge
#

and you're right to think so 😄

dire quartz
#

But if you upload your code, people can do that.

dire quartz
wet barn
#

like how to do it

surreal ridge
#

The git basics will tell you how to do that

dire quartz
wet barn
#

also one more thing is that gonna only shows my source code to anyone or anyone can edit it and use it?

#

My tool isn't open source project tho

dire quartz
dire quartz
wet barn
#

:<

dire quartz
#

Because of above mentioned safety concerns.

wet barn
#

Fine i will work on that soon as possible

#

But is that enough gonna make prove that is my tool is safe?

dire quartz
#

Yes

wet barn
#

Ok anyway is there like a comments or reviews??

dire quartz
#

Because if your tool is doing something malicious, it will be visible in the code.

wet barn
#

Ya i get it

dire quartz
#

There is an issue tracking system built into Github that people can use to report bugs for example.

wet barn
#

It makes sense why the antivirus sometimes tells me there is smh wrong on my app

dire quartz
#

Antivirus will typically report any exe downloaded from the internet with a signature it doesn't recognize.

#

Because there's no way to verify that it's not harmful.

wet barn
#

i didn't really know how to verify it in frist place

#

Ok so is that for GitHub or my exe tool Converter that i used it?

#

Like for example i used Auto py to exe

#

To convert the source code intro exe file

dire quartz
#

I'm not sure what you're asking.

wet barn
#

@dire quartz its enough to add the source code of the tool to let the users know this is safe?

dire quartz
#

Since people aren't forced to run an executable you built (which could contain anything)

#

And since they can inspect your code for malicious elements

wet barn
#

hm...

dire quartz
#

Asking someone to run an executable is like asking them to sign a contract without letting them read what the contract is about

wet barn
#

So what i can do?

#

:|

dire quartz
#

You put your source code in your github repository

wet barn
#

Didn't u say this isn't enough?

dire quartz
#

I said it will increase your trustworthiness significantly

wet barn
#

@dire quartz after i uploaded source code is there anything else to do?

dire quartz
wet barn
#

wise

#

@dire quartz done!

#

Now Anyone can use it for now!

dusty forum
#

Ever need to view multiple log files at once, in a unified time order? I just released version 0.11 of logmerger, an in-the-terminal GUI with mouse and vertical and horizontal scrolling support to view multiple log files merged into a single vertical timeline. Previous versions handle text, CSV, .gz-compressed, log files, plus PCAP packet capture files (example files are included to demonstrate merging a packet capture with contemporaneous client and server logs).

Since it runs in the terminal (using the incredible textual Python library), logmerger can be run over an SSH session in a terminal window.

This new release includes support for JSONL files, where each log line is a separate JSON object string. Plus some performance speedups and support for Python 3.14. Repo with sample log files: https://github.com/ptmcg/logmerger

GitHub

TUI utility to view multiple log files with merged timeline - ptmcg/logmerger

rapid sparrow
#

Also check history of his msgs. It is already multi days spam

edgy relic
#

!rule 9

rancid schoonerBOT
#

9. Do not offer or ask for paid work of any kind.

edgy relic
#

Can you stop trying to recruit people? It's against server rules

strange iris
steel quail
#

I have a running Docker container, which I know the ID of. it features a python interpreter and it has a volume mounted to my code base folder. I also bind port 8000 to 8000 (though no server inside the docker is using that port)

I would like to use that running container as a python interpreter from pycharm on the host machine. any idea how I could do that? I see I can configure a docker with tcp server information, but ofc if I set localhost:8000 it states server failed to respond (since no server is running in the docker itself)

steel quail
gentle solstice
#

You mean like you have a toolbox container you want to develop inside of?

toxic wolf
#

Quack coder here, what is the latest release of Python, Jupyter notebook, Anaconda, MySQL SQLITE? 🪐

sullen mason
#

3.13.2, 7.33, 2024.10-1, 9.2.0, 3.49.1, respectively

#

(most people don't run the latest MySQL)

toxic wolf
#

Water The latest stable releases? The latest Python release with pandas is 3.9 no??

sullen mason
#

Those are the latest stable releases

#

Pandas supports 3.9 and higher

toxic wolf
steel quail
#

basically having the env inside the container (but I'm okay to have it globally if it's easier)

gentle solstice
#

I know vscode can do this

rapid sparrow
#

In fact my colleagues ask me to write tutorial for visual debugger usage in vscode for
Python.. I should do it

steel quail
#

I should look into vscode I guess

#

no way to do it with pycharm? I have pycharm pro

#

I stress that the container will be started completely independently of the IDE

rapid sparrow
# steel quail no way to do it with pycharm? I have pycharm pro

no idea. I know that pycharm has containers features, but i never went to it since... i did not like how heavy it is

I stress that the container will be started completely independently of the IDE
i can aslo stress that vscode can do that, connecting to independently started container and providing full features, intellisense, library navigations, visual debugger from inside such container

steel quail
#

neat

rapid sparrow
#

in vscode it works like...

steel quail
#

I guess it's time for me to switch IDE

rapid sparrow
# steel quail I guess it's time for me to switch IDE

in vscode u install dev containers (but don't use dev containers themselves from official tutorial,they are crap)
u get the menu of Docker at the left then accessable and can just pick runnable container and "Attach vscode" to it

#

even automatable as a script this action if desired

#

U get opened after that second window of vscode, from within container

#

u install Python / Pytest explorer extension (automatable somehow but i was lazy to automate yet), and do "Ctrl+Shift+P -> Reload window" if necessary if smth glitched

#

everything works from that correctly assuming your docker global python is the correct default anyway (if no, then in bottom-right pick another python)

#

from there vscode should works as regular, u can use Visual debugger to run app, u can use visual debugger for pytest/unittest tests

#

Or actually may be u need installing only Docker Extension i think (dev containers may be not needed)

#

i could check it i guess

#

since going to write tutorial, going to check then

#

checked. Dev Containers are obligatory, necessary button is not active otherwise

rapid sparrow
steel quail
#

I will try to do it too (tomorrow likely) and see if I struggle somewhere

#

you threw a lot of key steps so I guess I could be able to figure it out, without requiring you to spend time on a full tutorial 😄 haha

#

(not that it cannt be useful for others, ofc)

#

(or maybe for me, if eventually I cannt do it)

#

thx for the details anyway ! tomorrow I'll check

rapid sparrow
#

very simple tbh article, as just a bunch of config files and which buttons to press

#

my colleague in company showed some horrors like using pdb debugger as main one 🤦‍♂️

#

wishing... for people to use IDEs to their full capacity

#

in our company most environments do not get launched without docker in any easy way, so understandable necessity and potentially a reason why someone used pdb

steel quail
#

here I need docker because some stuffs are compiled C++, and my macos is just too broken to compile it reliably ; so I use docker as the main dev environment ; but since then I was kind of unable to debug the python code base 😄 would help to get a debugger back

steel quail
#

@rapid sparrow thx for the explanations, it seems to work relatively fluently. I now must learn how to use the debugger of vscode I guess, because that one seems quite less intuitive as in pycharm (aka my break points do not stop)

#

aaaaah ok, it is because I have no plugin (or something like that) to run a unit test file and make it pass through unit tests 😄 gonna check that

#

okay, found my way ! it works like a charm code
lol, get it? (py)charm -> (vs)code

....

aaaaaaanyway

steel quail
#

holy crap ; I remember why I didnt want to use vscode

steel quail
#

is there a way to use Pyright as linter, instead of Pylance ? the later keeps yelling at me for using this type as a type annotation in a dataclass:

Foo = NewType('Foo', Literal['auto', 'yes', 'no'])

@dataclass
class Bar:
  foo: Foo # Variable not allowed in type expressionPylance
#

only happens if the new type extends Literal ; for other new types I have no issue

shadow crow
#

I don't know why this restriction exists

steel quail
#

thank you !

#

I guess I will just remove the NewType here

#

what I find wierd is that I dont have this warning if I use a Union, only if I introduce a Literal . but good note for the proper usage of NewType though

calm surge
#

I'm guessing this is an OK channel to ask about PyCharm. I've never really used it before, and now I chose to "Create a Script" when I started it up, and the project contains a script.py file and a .venv folder. I'm much more used to using VSCode, where I have to explicitly create and activate my venv. How does the venv work in PyCharm? Is is already activated seeing as it's automatically created?

marsh acorn
ornate spire
#

hi everyone!
can anyone help me configuring grafana on an application i'm working on?

rapid sparrow
#

ask your questions with more precision regarding what is the problem u have

#

i am dealing often with grafana
and recently writing infrastructure as a code configuration add it to my homelab too

#

so i could be sharing my iac code for autoconfiguration if desired in a single tofu apply command

#

For homelab i do the simple approach of doing things through Terraform to setup Docker Containers at my Hetzner server

sullen mason
#

I recently banged my head against the fact that the Grafana running inside Percona Management and Monitoring has its API turned off, ugh. Couldn't automate its configuration.

wary wadi
rapid sparrow
#

💪 i did it

#

i wrote the article of how to configure vscode debugger for python for all popular web backend projects and using it with docker

#

Now i can share it to my colleague that wished migrating from pycharm too 🤣

#

Somewhat tempting sharing with other colleagues, one of them presented using PDB cli debugger as a main one recently -_- Not sure if i will offend him or not with doing that though, hopefully not.

sullen mason
#

Nicely done

steel quail
#

looks like it is correct

royal urchin
molten brook
#

I released a few weeks ago the second stable version of psp (Python Scaffolding Projects) to start a new Python project in seconds. Visit the repo: https://github.com/MatteoGuadrini/psp and the docs: https://psp.readthedocs.io/en/latest/ to learn more about it.
This is a demo: https://asciinema.org/a/707474

GitHub

psp (Python Scaffolding Projects). Contribute to MatteoGuadrini/psp development by creating an account on GitHub.

Gu

psp is a blazing fast command line utility to scaffold your Python project, written in Rust. - ⚡️ 1-100x faster compared to other scaffolding tools - 🛠️ pyproject.toml support - 🤝 Python 3.13 c...

scenic peak
#

has anyone got a key authenticator and generator?

astral apex
#

For?

scenic peak
#

i have a python script i just want an offline basic product key auth and a seperate script that generates them

gentle solstice
#

for 2fa?

cunning flare
#

I created a tree visualization logger to analyze AI-generated Python code more efficiently.
It enables accurate understanding of how functions work, even in entirely unfamiliar codebases.

https://github.com/EasyDevv/pyhunt

GitHub

Lightweight Python logging tool for visual call tracing, tree-structured colored logs, and easy debugging with a simple decorator. Optimized for both standard and AI-generated codebases. - EasyDevv...

rapid sparrow
#

<@&831776746206265384> 5 times the msg is spammed

#

zero other msgs, pure spam user

lofty finch
#

Sorry, that wasn't my intention — I'm not very familiar with Discord.

lofty finch
rancid schoonerBOT
#

6. Do not post unapproved advertising.

rapid sparrow
#

spam like thiat requires writing to @balmy mulch and receiving approval before doing the spam

#

in general good rule to be not writing it in more than single channel at once
and not writing msgs like that more often than 1 per month.
If it is written in multi channels at the same time => it is viewed super negatively.

lofty finch
#

Alright, sorry for the inconvenience.

placid nacelle
granite lantern
#

hello guys !
I am not really sure if this is the right channel for this topic so you tell me.

there is something i never really could have tell. for example, i currently have a low cost vps, and I would like to have the basic set of knowledge to tell from the ressources of the VPS, how many containers can I put, which projects can be handled, etc...

I need to at least have some concepts be named to me so I know what to look for <3

sullen mason
#

Sure, your main limiting factor is going to be the amount of memory (RAM). The top utility is one of many ways to see which things are using how much memory.

astral apex
#

You have to look at what each thing needs
You can have one tiny container with the extra small version of Python that runs a single file
Or you can have an absolutely gigantic container that comes with 30 GB of GPU dependencies

granite lantern
#

Alright, now let's say I want to host a discord bot, a website, a blog, and few more little projects on my vps. Of course I'd use containers so when i shut down one service the other still run, so i can do updates/fixes without stopping the whole server. But I have no idea if my server could handle all these projects. I know the spects but they're just numbers.

I do not know how much each project takes in terms of ressources, and i don't have any clue how to calculate it. Maybe through performance tests to see how much ressources each project peaks at?

rapid sparrow
#

but then i configured more advanced stuff (i have at this point already serious homelab)

#

with infra code (public code if needed) i configured grafana stack 😏 that with cadvisor metrics (exported via alloy docker prometheus exporter i have full visualization into how my containers run, plus logging, plus other stuff)

sullen mason
rapid sparrow
granite lantern
#

hmmm okay. I was wondering if there are some concepts for ressource calculation, or complexity, because it feels like i'm missing something. I'm not looking for tools but for concepts, just like "DRY Code" or anything else you see?

#

or maybe methods of calculating the ressources required by a function, a program, a project, etc...

rapid sparrow
rapid sparrow
granite lantern
#

ya ya

#

that would be amazing

sullen mason
#

OK, so the most fundamental tool to learn here is called ps

granite lantern
#

being able to tell: oh well this VPS won't be enough to handle these services, but this one seems just fine

rapid sparrow
#

that's called profiling. Memory and CPU profiling to be more precise. The best one is done with Flamegraphs
As u can see precisely each function taking current usage of memory, or total one accumulated
same for CPU usage

sullen mason
#

Here's, for example, a ps command to get the memory usage for a specific running process:
ps -p YOUR_PID -o %mem,vsz,rss

rapid sparrow
#

in python things are a bit more limited https://docs.python.org/3/library/profile.html
It offers as std only CLU profiler, making it exported to flamegraph is some sort of effort i never tried yet (i did only in other languages)
I know u shoudl be able to get same in python with some efffort

sullen mason
#

(Which is percentage of total memory used, virtual memory allocated, and actually-resident memory size, respectively)

rapid sparrow
#

Besides that Per function/code place stuff is possible to view with more wide scope, that will be then Tracing
Tracing is more precisely controlled what u wished to cover with it, and serves usually as "first tool" to signal about problems
profiling is used later when u know for sure problem is present

granite lantern
#

awesome !

#

thanks for these ressources !

rapid sparrow
granite lantern
#

also, do you have some methods to predict the profiling BEFORE testing?

rapid sparrow
rapid sparrow
granite lantern
#

I guess these tools will monitor an already running program. Isn't there a way to approximate how much my program will consume? Like I know that a discord bot will take less ressources that a full ultra HD 250fps video game, but that's jsut by experience. I nver "calculated" it XD

rapid sparrow
#

we learn all in uni this discipline to predict how much stuff will be consuming before it will be running
Basic knowledge of data structures, algorithms complexity

sullen mason
granite lantern
#

alright so just f around and find out i guess

#

that's great

rapid sparrow
granite lantern
#

thank you guys for you support, I see things VERY clearly now i'm actually very satisfied by your answers <3

sullen mason
rapid sparrow
#

may be some lib exists that already does that for you though

#

Flamegraphs Really help debugging memory/cpu problems

#

because make the navigation intuitive

sullen mason
#

Dask has a rad performance report built in if you use that

#

Dask is so good.

granite lantern
#

yeah, I will look at all these tools now that I know what i'm looking for

thorny shell
#

I only see flamegraphs when I use py-spy

granite lantern
#

I just wanted to know if I have to dig into predicting, or torture testing. Now I know that I will dig into tools for profiling and monitoring, and performance testing

#

it's so exciting

sullen mason
#

Specifically if you end up running things as Docker containers, knowing about the docker stats command is useful; will show you the footprint of everything running.

rapid sparrow
#

i knew about that one and lost again, i should really try and put for me examples of usage somewhere

#

too much useful to miss

#

Damn. Thing like that deserves an article to highlight how to use it easily, i love writing about tools that simplify dev life
✍️ article to write to note

granite lantern
#

it'd be cool to have a dashboard of system level ressources (i.e what each program, including the kernel etc... is using0, and another of program level ressources (what each function etc... is using in that program/script)

granite lantern
rapid sparrow
sullen mason
#

Anything based on eBPF has the potential to be super powerful and useful, if done right.

#

This can figure out the dependencies between your systems and draw them for you etc

granite lantern
sullen mason
rapid sparrow
# granite lantern it'd be cool to have a dashboard of system level ressources (i.e what each progr...

https://github.com/ncabatoff/process-exporter
Should be doable with prometheus exporter for /proc
https://grafana.com/docs/alloy/latest/reference/components/prometheus/prometheus.exporter.process/
I would have connected it with Alloy into my Prometheus feeding Grafana GUI, it is multitool to export whatever desired metrics.
Then we google "Grafana Process Exporter Dashboards", to import already existing community dashboards

https://grafana.com/api/dashboards/13882/images/11637/image
https://devconnected.com/monitoring-linux-processes-using-prometheus-and-grafana/
And we get stuff like that, whatever we find

rapid sparrow
#

docker/cadvisor prometheus exporter in same Alloy

sullen mason
#

I really prefer the eBPF approach where possible, vs. directly 'shipping' metrics to a server.. but the advantage of the latter is that you can do anything you want with it, even if the kernel can't easily tell what you're doing.

#

So most people end up with a mix I suspect.

rapid sparrow
#

grafana it is ecosystem of solutions for every monitoring usage case. https://grafana.com/
prometheus and etc related to it

#

sort of nice when same ecosystem can solve... everything and viewing from all the possible angles

sullen mason
#

I've yet to fall in love with Grafana even though I've used it at jobs again and again.. It's just got a LOT of moving parts for my taste. It can certainly do everything though.

#

It got easier once I started configuring it with Terraform but still.

rapid sparrow
#

it was less good before, but i jumped vagon to it with full commitment right on time when it added super User friendly drilldown interfaces 😋
And i love Alloy, it made configurations really simple, Alloy is like "Terraform" full of providers to export everything in uniform way

rapid sparrow
#

at work same but in kuber

sullen mason
#

Cool. I should stand up better monitoring at home probably.

#

I have plenty of sensors, just not a real dashboard.

vestal pier
#

Would anyone happen to know if there is a way to suppress an error for a specific file pattern using mypy? I.e, in my case, ignoring all test files for pytest.

I would like to configure my pyproject.toml to ignore a specific error for any file that matches pytest's pattern of test_*.py, my first thought would be to do something like [[tool.mypy.overrides]] in the pyproject.toml, but this only allows specifying modules, not a file pattern. This should work, but is very verbose since I would need to specify every single module that contains tests (which may or may not have a common naming convention)

sullen mason
#
# pyproject.toml
[tool.mypy]
exclude = '''(?x)(
    ^test_.*\.py$  # files starting with test_
)'''

...is the one that comes to mind first?

#

(single-quoted strings don't require escaping the backslash in TOML)

vestal pier
#

I did see the exclude param, though I am unsure how I could apply it the way I would like. I.e I do want mypy to run for these files, but I would like to only suppress specific mypy errors such as call-arg

sullen mason
#

Oh, I see.. so you don't want to fully exclude them, you just want them to have a more-relaxed set of mypy settings?

#

Is that more-correct to describe your goal?

#

I think you can do this?

[[tool.mypy.overrides]]
module = ["test_*", "tests.*"]
disable_error_code = ["import-untyped"]
vestal pier
vestal pier
#

Trying to do

[[tool.mypy.overrides]]
module = ["test_*.py"]
disable_error_code = ["call-arg"]

results in that code still erroring in all test files, i.e in test_my_pydantic_thing.py

sullen mason
#

The docs seem to suggest that it works, but I'll have to actually try it, I haven't done it quite this way before

#

Hmm. That's irritating. Let me read harder.

#

I'm guessing your tests are not themselves modules with __init__.py in the dirs?

vestal pier
#

some of them appear to be

sullen mason
#

I have a sketch of a script that would keep your pyproject.toml up to date with the list of test files, but that's kinda my best idea at the moment. It doesn't SEEM like pyproject.toml/mypy have a way to configure a wildcard match on files vs. module names, except in the specific case of the 'exclude' feature.

vestal pier
#

This is my current solution, it works, I just was trying to see if there was a nicer way to do this that I was missing

# pyproject.toml
[[tool.mypy.overrides]]
module = ["module1", "module2", ...]
disable_error_code = ["call-arg"]

This just means I need to write out any module that contains tests.

#

a script that would keep your pyproject.toml up to date with the list of test files
That could be neat, but might not be a really nice way of doing things

vestal pier
sullen mason
#

Just for grins I finished it and it seems to work

#

I'll share it in case it's interesting at all

#

generates this in my test project in pyproject.toml

[[tool.mypy.overrides]]
module = [
    "tests.test_example1",
    "tests.test_example2",
]
disallow_untyped_defs = false
check_untyped_defs = true
#

Hypothetically you could wire this in as a pre-commit hook or something

misty dove
#

Foirwarding as this might fit even better here 🤔

rapid sparrow
# misty dove

but i notice some examples build wheels and copy those over instead. Is there a reason for this?
people try to be overly smart and optimize docker image by not having in a second stage C libraries used to compile libs in the first stage

#

since u are very new one to Dockering python, i would recommend to simplify it all and throwing away this stuff

#

just copy dependencies lock

#

install

#

copy the rest of code

#

set python docker env vars to that u would see stdout logs (i forgot which ones)

#

and set your CMD. done

#

Python is interpreted logic fragile in C dependencies. very dangerous to try optimizing this stuff

misty dove
#

I would not say i am new to Dockering python 😅 It is the optional wheels part i am curious about.

rapid sparrow
#

supposed to be helping in not bloating docker image size with C libs used in first stage

#

u could try comparing Image size with this step and without it and see if it actually helps

#

or if it only drop in the ocean that is not really helping

#

docker image ls to check image sizes after their building. most recent one should be your fresh build

misty dove
#

Well, yes, i know that 🙂 But my questions was more - is there any big difference in making wheels in the build image and installing them in the app image, versus just making a venv in the build image and copying it wholesale into the app image?

rapid sparrow
#

🤔 i have no idea. Do check if there is in image sizes 🙂
That all that will matter essentially, as both methods are done only for that

As obvious difference only that venv copying will fail if its absolute path will change, and it contains symlinks to system python, so if smth changed in it, things could fail too

misty dove
#

Same installation path, and same base image (so same system python)

restive spear
#

Has anyone here had to generate a sbom for their project? What exactly is supposed to be included? Should I be listing all dependencies? Dependencies of dependencies? What about libs that are included, like already compiled c/c++?

sullen mason
#

To me, you want an attestation or whatever you choose to call it for every build artifact, and beyond that it feels like a matter of style

steel quail
#

kind of a devops question I assume. I'm trying to setup a jenkins pipeline running with docker agent. by default it passes credentials using cli, which is unsecure (I get warnings from the agent). as recommanded (by the warning), I try to setup docker-credential-pass ; but it actually fails to work

resources on the internet as quite sparse, as it does not include running the pipeline as an agent and letting jenkins figure out the credentials to use from the System pannel (all resources use a withCredentials solution, with I do not want that)

I was wondering first, if someone had experience with that kind of setup. so then I could provide more details about what does not work

rapid sparrow
#

Github actions or Gitlab CI is more prefered as more beginer friendly option

steel quail
#

yeah but we're using jenkins since day 1 here 😄 transition is not an option

restive spear
#

Jenkins is interesting..I've used it to setup adhoc guis for running processes

#

Like a free style job with parameters

honest terrace
#

We run Jenkins pipelines for a good bit of integration but that is mainly because we can't use GitHub actions since we need to have runners in a different landscape than where our git repos are. #corporateissues

astral apex
#

You know self-hosted actions runners are a thing, right?

rapid sparrow
#

Like Jenkins, like Drone CI

astral apex
#

No one needs Jenkins

#

But yes fair enough not everyone uses GitHub

dry vale
honest terrace
#

Yes we use self hosted runners for other things (the whole git landscape is self hosted). But the caveat is where each system is located and what landscape. Jenkins is used because it is located in a different security zone. Git action does linting and other validation then kicks off Jenkins who pulls the repo then grabs a bunch of things from a vault and does stuff. No passing of user credentials either (re initial topic)

steel quail
# dry vale Can't you use repository secrets?

the secret is configured in jenkins System panel
the thing is that when running the pipeline on a docker agent, docker login is performed by jenkins automatically but the password is set with -p, and it triggers a warning

the warning message tells me to setup docker-credential-, and this is essentially where it goes wrong. before after I do that, jenkins is not able to find any gpg key (although pass is configured with one) and just fails to login

rancid raven
#

do different docker services in the same docker-compose and Dockerfile share base layers?

For example:

docker-compose.yml

  zosiam:
    build:
      context: .
      target: zosiam-deploy
    env_file:
      - ./backend/.env

  admin:
    build:
      context: .
      target: admin-deploy
    env_file:
      - ./backend/.env
Dockerfile

# Stage 1: Create Python base
FROM python:3.12-slim AS base
...

FROM base AS admin-deploy
WORKDIR /app/backend
CMD ["uv", "run", "admin/Home.py"]

FROM base AS zosiam-deploy
WORKDIR /app/backend
CMD ["uv", "run", "zosiam_session/main.py", "start"]
rapid sparrow
#

so on second rebuild at least, python:3.12-slim will be shared as local cache for sure

#

as for next steps of Dockerfile... i am not confident their layers will be shared, they will be trying to build themselves independently

rancid raven
#

To reuse the image comign from web

#

entirely

rapid sparrow
#

interesting idea, a moment

rapid sparrow
rancid raven
rapid sparrow
# rancid raven Nice! How do i figure out the image name for my web service?

by default docker-compose uses current folder name as project name, and adds service name as suffix.
So chain was folder i used it in, therefore built web became chain-web
U can specify fixed project name with -p arg
docker-compose -p smth build
docker-compose -p smth up
i think it is even specifyable with env var

rancid raven
#

Thanks, I will try the env route

#

I have a server that I am building different version of my app based on the branch, think of dev/prod/stage and these all use the same compose & dockerfiles for the most part, just different in source code. What is the caching behavior between these different docker composes and how can i cache obvious things like npm installs and apt installs, knowing that they'd be the same?

rapid sparrow
#

We do it all automated at the level of Github Actions Ci configured 😏 on pull requests image is built and tested.
on merge to master, it is built, tested, and deployed to staging.
on click deploy to production, latest built in master is deployed

rancid raven
# rapid sparrow when i need to share same cached docker image between dev/prod/stage, U build it...

Mmm, that makes sense. But I think for us, having a separate managed image will be a maintenance problem, and so I wanted to go with a more cache based approach, I tried:

RUN --mount=type=cache,target=/var/cache/apt \
    --mount=type=cache,target=/var/lib/apt \
    apt-get update && apt-get install -y --no-install-recommends \
    ffmpeg gcc portaudio19-dev python3-dev libc6 poppler-utils &&  \
    rm -rf /var/lib/apt/lists/*

But this still takes as long as running it normally even though it has a buildkit cache mount. Did I do something wrong? I can also see that /var/cache/apt has lock and partial and partial is empty.

rapid sparrow
#

🤷‍♂️ never cached apt

#

we resolve this level of issues by abusing external registry to cache apt installations

#

md5 hash to calculate out of python lock file and Dockerfile lines up to python lock file.
build image with tag of this hash
pull when necessary (in CI) when needing to reuse the cache

rancid raven
#

Okay I see

rancid raven
rapid sparrow
# rancid raven Any guide on how I can do this?
> 1) Calculate md5 hash from dependencies file lock onto libraries. Whatever your language is. Lets call the value as builder_base_hash
> 2) Pull image image {{ builder_base_hash }} if it exists in docker registry, if not then build up to stage --builder. Save result to docker registry under tag  {{ builder_base_hash }}
> (Thus we implemented speed up twice for CI), as we are were able to cache half of longest CI in a way that its CI jobs can run at different runners, as we use remote for persistence
> 3) run full building of an image, til the code capable to run unit tests and push to docker registry under tag  build_${{ github.run_id }}
> 4) at unit test stage: pull the image  build_${{ github.run_id }} and run unit tests and other tests
> 5) if it passed them, than save the image as service_name_{{ github.run_number }} as fit for deployment , also mark it as latest and etc whatever tags u need (edited)
#
jobs:
  build-docker-image:
    name: Build docker image
    runs-on: [self-hosted, linux, x64]
    permissions:
      id-token: write
      contents: read
    outputs:
      image-tag: ${{ env.docker_image_tag }}
      image-url: ${{ steps.url.outputs.url }}
    steps:
      - uses: here action for id
        id: name
      - name: Set image URL
        id: url
        shell: python
        env:
          registry: "1111111111.dkr.ecr.eu-west-1.amazonaws.com/${{ inputs.ecr || steps.name.outputs.name }}"
        run: >
          with open(__import__('os').environ['GITHUB_OUTPUT'], 'a') as out:
            out.write(str.lower("url=${{ env.registry }}:${{env.docker_image_tag}}\n"))
      - name: Check out source repository
        uses: actions/checkout@v4
      - name: Generate dockerfile hash of base image
        id: base-url
        shell: python
        run: |
          hash = __import__('hashlib').sha256()
          try:
            with open('uv.lock', 'rb') as pipfile:
              hash.update(pipfile.read())
          except FileNotFoundError:
            hash = None
          else:
            with open('Dockerfile', 'rb') as dockerfile:
              for line in dockerfile:
                hash.update(line)
                if line.startswith(b'FROM $BASE'):
                  break
              else:
                # No FROM $BASE in Dockerfile
                hash = None
          if hash:
            with open(__import__('os').environ['GITHUB_OUTPUT'], 'a') as out:
              out.write(str.lower(
                "url=1111111111.dkr.ecr.eu-west-1.amazonaws.com/"
                f"${{ steps.name.outputs.name }}:{hash.hexdigest()}\n"
              ))
#
      - name: Login to Docker Hub
        uses: docker/login-action@v3
        with:
          username: ${{ secrets.DOCKERHUB_USERNAME }}
          password: ${{ secrets.DOCKERHUB_TOKEN }}
      - name: Pull or build base image
        if: steps.base-url.outputs.url && success()
        run: >
          docker pull "${{ steps.base-url.outputs.url }}"
          || docker
          build --pull --no-cache
          --target builder
          -t "${{ steps.base-url.outputs.url }}"
          ${{ github.workspace }}
      - name: Build the docker image
       run: >
          docker-compose
          -f ${{ inputs.docker-compose }}
          -p ${{ github.run_id }}
          build
          ${{ inputs.build-args }}
          "${{ inputs.service || steps.name.outputs.name }}"
#

Extrapolate instruction from this (part of Github actions code)

dry vale
steel quail
#

maybe I will open a thread and notify you about it? so it will be easier to find it back

dry vale
#

Btw, do you guys know if there's a way to fetch a commit message in a AWS CodePipeline triggered by GitHub Code Connections? I wanted to implement a little system like GitHub's own CI where if you prefix a commit message with [skip ci] it doesn't trigger the build. I tried the below buildspec file:

version: 0.2

env:
  git-credential-helper: yes

phases:
  install:
    runtime-versions:
      python: 3.12
    commands:
      - COMMIT_MESSAGE=$(git log -1 --pretty=%B)
      - if [[ "$COMMIT_MESSAGE" == *"[skip ci]"* ]]; then echo "Skipping build"; exit 0; fi

But it threw:

fatal: not a git repository (or any parent up to mount point /codebuild)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).

[Container] 2025/04/09 18:15:33.812706 Command did not exit successfully COMMIT_MESSAGE=$(git log -1 --pretty=%B) exit status 128
[Container] 2025/04/09 18:15:33.846916 Phase complete: INSTALL State: FAILED
[Container] 2025/04/09 18:15:33.846931 Phase context status code: COMMAND_EXECUTION_ERROR Message: Error while executing command: COMMIT_MESSAGE=$(git log -1 --pretty=%B). Reason: exit status 128
dry vale
steel quail
#

(gonna let you know as soon as I do it, but now it's nearly weekend so I think it will have to wait for Tuesday 😄 )

sullen mason
dry vale
sullen mason
#

Aha, gotcha.

sturdy abyss
#

Hi

ornate spire
# rapid sparrow For homelab i do the simple approach of doing things through Terraform to setup ...

thank you for your response... (my delay was due to a authentication problem with discord i assume which is now resolved)
i am working on an application that is utilizing prometheus and loki to collect information and to have them presented on grafana as panels.
the application has some api's exposed and is written in fastapi (using https://github.com/trallnag/prometheus-fastapi-instrumentator)
as i'm trying to configure a panel to show how much each request have taken, i'm seeing multiple metrics (some appear to be custom without use) that are for http_request_duration_...
i assume this can be collected using the normal metrics exposed from prometheus, can you help me find the right query for this metric?

limber perch
rapid sparrow
#

i have no idea why would u need Kubernetes operator for that

#

i think it is silly like using pip install hello_world/npm install hello_world to write hello world

#

it is just a matter of writing a single Deployment service after all

short peak
#

perhaps is for demo purpose. Like https://www.npmjs.com/package/hello-world-npm 😄

rapid sparrow
#

depending not justified libs is a problem for you to keep up with opinionated stuff of other people

#

u need to get sufficient benefits from doing that action

#

it is justified when u use helm charts and operators full of multiple kubernetes elements u don't wish to take care about on your own

#

but Celery workers are...mm... personal intimate stuff directly related to your own app configuration, out of single entity and it is silly to depend on third party solution for that (that nobody maintains anyway)

#

Kubernets ecosystem is fucked. Third party solutions like Operators and Helm charts do not have any typing validations, reading their documentation is a headache

#

if it was in better shape with native typing support, i could have understood celery operator usage, but it is not yet

#

movement to do... better in kube ecosystem, is still a movement in young state. Within this real simple stuff better to take care on your own

rapid sparrow
#

hope of lights in kubernetes ecosystem are currently so far

  1. Just using terraform providers to work it (works meh for your own helm, but okay enough for third party helms. Works great for direct usage with kubernetes objects most of the time). My favourite choice.
  2. Using KCL so far i see as the most promising one out of the existing similar choices (There are a lot of analogs spawning)
limber perch
#

Yeah, I see your point about the operator being needlessly complicated overkill for celery jobs. I always hope, when I see an operator, that it's got some useful "convention over configuration" opinionated defaults I can leverage.

heavy knot
#

question

#

about deploying Bert through hugging face: Is a cloud server needed? It takes up 433,312 GB of storage on my pc through flask

heavy knot
#

Would you prefer Ec2 or Sage-maker to deploy a fine-tuned version of Bert and would you use fastapi or flask ?

rapid sparrow
#

highly likely configuring it properly is very much beyond your scope of effort

#

consider exploring Hetzner as a choice instead. it has quite cheap ARM64 instances, and cheap auction of servers
it should maximize server u can get for that

#

Is a cloud server needed?
Cloud is a fancy way to say you rent other people's machine. Using other people's machines or your is a choice to make depending on project requirements
Unless u are able to tap into the power of infra things which solve problems for you in terms of integrations.

rapid sparrow
#

Especially that's true when u need smth to run 100% of the time

#

then it is super expensive when u use Serverless features

#

There are some saving though when u implement thing like Cron jobbed Lambda that runs only once in 24 hours or once in an hour. but rarely all workflow is fitting such case

short peak
#

we use sagemaker and I know AWS bill is over 1M annually among everything else

rapid sparrow
#

For those reasons self hosting in Hetzner/OVH can be many times cheaper

heavy knot
#

Jeez Luis

short peak
#

but it's medium size company that serve digital products

heavy knot
#

It costs that much? I kinda strayed away from cloud servers due to the cost.

#

I woke up pumped about to deploy Bert, but now I am like “this could be expensive. Hmmm”.

short peak
#

can't compare to other similar scenarios but our devops team is small and doesn't seem it can afford to consider something else at the moment. When we moved from on premise to cloud, took us over a year of work and halted several projects for a while, I don't see management considering another migration

heavy knot
#

Ah man. Bert is just so big and I was pumped

rapid sparrow
rapid sparrow
heavy knot
#

I just need to deploy it so it does not take up and destroy my pc

heavy knot
rapid sparrow
#

With renting servers I concentrate onto server infrastructure as a code

heavy knot
#

It is pretty great honestly

rapid sparrow
#

Quickly changing hardware power depending on my needs

heavy knot
#

Is sage maker just a version of a Ec2 instance with notebooks and stuff?

rapid sparrow
rapid sparrow
#

Cloud is life saver in simplifying operational costs to manage infra. Thanks gods for managed DBS too

heavy knot
#

What are the main features all cloud servers have? I am asking the features that are not polished or just added on versions of a service that is already a thing.

rapid sparrow
# heavy knot What are the main features all cloud servers have? I am asking the features that...

Minimal quality providers like Hetzner.
Has hourly, quick in a minute server VM creation and destruction.
Has maintained API and written terraform provider to interact as a code with it.

A bit above minimal but still close to it
also having ability to regulate server disk size separately with volumes.
And having private networks configurable and cloud level firewalls slot security.

Hetzner: Maximum cheap for pet projects and game servers

rapid sparrow
heavy knot
#

I mean like s3, Ec2, Ecs, rds, lambda, and IAM. What is the gcp and azure versions of those and are those the absolute essentials with no features added? Some of these cloud providers have too many features.

rapid sparrow
heavy knot
#

Thank you

rapid sparrow
# heavy knot Can I DM you?

public channel communications only. They are they only ones which are beneficial and optimal for answerer too

heavy knot
#

I just need to load the model which takes up an insane amount of space and then run docker and deploy it. I think I need sage maker

rapid sparrow
# heavy knot Ok, what were you suggesting earlier for deployment that is not a cloud server?

i would recommend asking people at https://discord.gg/devops-sre-infrastructure-419745677585940482 server.
@hubt person is MLOps there and will answer best for example (don't point finger to me that i recommended asking him though)

Normally i would have recommended designing Stateless application running in Docker Swarm at Hetzner as starting point, configured via Terraform Docker provider (or heck even regular Docker-compose file) (Connected via DOCHER_HOST=ssh-way), or running in AWS ECS on ec2 spot instances
I think simple containerizations, works best, as simple enough for beginning, and good enough to serve close 5 years in terms of flexibility.
But my usage case is not ML related, for regular Backends running

but since u have MLOps, and may need videocards for your Bert stuff? there can be another answer better one, that MLOps people will answer better.
Optionally just google where to deploy bert reddit, and search over recommendations in addition

heavy knot
twilit forum
#

Best python lsp? Heard that pyright had better completion than pylsp.

sullen mason
visual oxide
twilit forum
#

Does "basedX" tools have anything in common?

forest cradle
twilit forum
opal verge
#

I have this book before. aren’t read for more

opal verge
gentle solstice
#

I somehow remember reading about being able to define dokku triggers in my deployment repo, like bash scripts in a folder named .dokku or such.

I can't find documentation for that anywhere. Am I misremembering?

wary copper
normal crystal
#

Hello,

I'm working on python projects with collegues and i'd like to introduce robustness, using linter, typechecker, formatter, everything also integrated in a CICD pipeline

I use ruff as Linter and Formatter

i wanna use a typechecker, mypy is awful slow so i switched to pyright, but the vscode Pylance's Pyright does not give the same errors as the CLI which is an issue as i want to have a CICD running pyright too.

How can i have consistent typechecking / linting in my editor and my CICD ?

thorny shell
#

if I were in your situation, I'd spend some time investigating why pylance gives different errors as the CLI

#

I had a similar situation with mypy, and the answer turned out to be: the two different invocations were finding two different sets of config files. I wouldn't be surprised if that's what's happening in your case, too

#

@normal crystal ^^

normal crystal
brazen forge
#

!rule 5

rancid schoonerBOT
#

5. Do not provide or request help on projects that may violate terms of service, or that may be deemed inappropriate, malicious, or illegal.

south shell
#
 def __init__(
        self,
        task: str = "zero-shot-classification",
        model: str = "roberta-large-mnli",
    ) -> None:
        tokenizer = AutoTokenizer.from_pretrained(model)
        device = "cuda:0" if torch.cuda.is_available() else "cpu"
        self.classifier = pipeline(
            task=task,
            model=model,
            device=device,
            framework="pt",
            torch_dtype=torch.float16,
            tokenizer=tokenizer,
        )

how can i deploy my own implementation of this pretrained bert model as a microservice or something because as it requires torch it needs to be in its own environment as it is very heavy

sorry if i use wrong terminology

full code:
https://github.com/saragarcia6123/Sentiverse/blob/main/backend/src/services/classifier.py

sullen mason
#

You say 'microservice' but how exactly do you need to use it? What's the most elegant way to expose it to whatever you want to have call it? That isn't always HTTP etc.

#

One common way is to make a container (Dockerfile-defined for example) to package your thing and then you have many options for running that container however you want.. but it's not always necessary or ideal.

fringe adder
#

hello

cedar crest
#

Hello guys !
I'm trying to setup devcontainer to enable me to use the debugger inside a python docker image, but i keep getting the error "invalid port #" i have indeed setup the ports in devcontainer.json, docker-compose and the Dockerfile associated with the image.

rapid sparrow
# cedar crest Hello guys ! I'm trying to setup devcontainer to enable me to use the debugger i...

https://darklab8.github.io/blog/article_visual_debugger_in_vscode.html
I wrote article about easy correct usage of using python debugger inside docker image

#

my advice goes around, just launch docker-compose, and connect vscode directly to it

#

to hell with devcontainer.json, fragile piece of crap

cedar crest
#

Thanks !

cedar crest
#

I managed to set it up to connect to docker but it's super tedious to use

rapid sparrow
#

docker-compose is made in quality way in Go

#

vscode is suffering from being written in JS

#

u don't expect quality and lack of crashes when stuff is written in JS

cedar crest
#

Ok so it does work like i intended by just opening up the proj in devcontainer

cedar crest
grizzled raptor
#

Does anyone know if there is a maintained package that is compatible with the linux patch utility without relying on system packages? I found 2-3 that seemed to fit the bill but have been abandoned years ago

thorny shell
#

just for my own curiosity: do you want to apply a patch?

grizzled raptor
#

The goal is essentially automating patching in a more portable way than relying on patch being installed

thorny shell
#

I assume you need to run on Windows

grizzled raptor
#

Yes, Windows is one of the target environments

thorny shell
#

I guess if I were in your position, and I couldn't just ship a "patch" binary that ran on windows, I'd consider using a different format -- one that python could apply

grizzled raptor
#

The main issue is that I need to apply patches that already exist. I'm not sure how feasible it is to convert these to another format

thorny shell
#

I gotta ask. Why do you need to apply patches on Windows?

#

In my experience, patch is used only for open-source software

grizzled raptor
#

Patches have been used for some datasets in my field for licensing reasons and I'm trying to ensure reproducibility. The licensing issues are also why this processing has to happen on the user's machine

#

It's admittedly a niche application

#

It's use primarily for open-source software is why I decided to ask on this channel, however

thorny shell
#

I sorta figured you had some niche requirements 🙂

#

how hard would it be to ship the cygwin DLL and the patch executable? (Hopefully "patch" on cygwin is an executable, and not ... shudder ... a Perl script. It's a plain executable on recent Ubuntu, fwiw)

grizzled raptor
#

I suspect it will take more time than I would like to spend - but given the lack of alternatives I'll have to investigate

supple dome
#

can anyone dm me about my project im basic to coding of py can someone help me with my project for a game tool

full swift
#

Hi can i have an interview coming up for devops in aws can anyone help me prepare with interviews?

trim nacelle
#

Hello, which linux based image i should use in my docker to get python 3.12 on it?

thorny shell
#

I'm using python:3.13-slim-bullseye but should probably upgrade to 3.14 one of these days

thorny shell
#

you, of course, will want 3.12

astral apex
thorny shell
#

I probably copied-n-pasted that line from somewhere.

thorny shell
#

btw I'm using Debian instead of Alpine mostly because I am already familiar with Debian's package manager, and need to install a few non-python things

astral apex
thorny shell
#

haw

#

"the blind leading the blind"

#

well, if bullseye is a LTS release, then you don't have to worry about it being obsolete for ... a while

#

although if that's what I really want, then I bet there's an "-lts" tag that I could be using 🤔

sullen mason
#

I guess the reason to pin is that you're in control of when you want to pay the price of upgrading.. the reason NOT to pin is that each incremental change you need to adapt to will be smaller, rather than all at once when you manually change the pin.

thorny shell
#

well said

astral apex
#

What if you don't have anything OS-specific?

shadow anvil
#

Hey everyone, my team is creating a meta package, and we maintain libraries within in. each library is its own repo. soemtimes these libraries reference each other (not very often, its a tree structure in which they are allowed to reference each other).

what is the premier way in python we can do dependency management and checks? and can we do it within out azure pipelines

#

i am willing to answer any questions

sullen mason
shadow anvil
#

i feel like as we add more and more libraries, we are going to end up with a monster

sullen mason
#

It requires learning its whole way of thinking about the problem but I have to admit it's a very solid way to decide to think about problems.

#

An example of how my bazel-est buddy uses it is to generate a 'virtual' library that implements his config-file format of choice in whatever language that part of the build needs. (He mixes a lot of Java and Python for whatever reason)

#

His config-file parser is a bazel build rule he wrote, and it's type-safe etc, pretty fun.

shadow anvil
#

let me check out bazel, even if we dont go ahead with it, maybe i can learn a few things about dependencies and python versioning that may help me

rapid sparrow
#

poetry is regular garbage in comparison

shadow anvil
#

😢 lmao. yes, let me test out uv as well. i think at the end of the day, we have to agree on a hierarchical structure of which lirabries are allowed to import each other, and manage that strictly to avoid any kind of circular dependency. did i mention we have a check in the init that refuses to import a library unless the meta package is also installed? does it check for a particular version of the metapackage? ofcourse not. what are we even doing, does anyone make python packages liek this...

rapid sparrow
shadow anvil
#

like it will throw an error if the meta package is not installed

#

that is not important ||- its more of an office politics thing ig ||- just, trying to learn more about python dependencies etc. if u guys think there is any concept or write up i should check out pls let me know.. thanks

fleet cloak
#

So, docker has a restart-policy to automatically restart containers when they fail

services:
  runner:
    build: .
    restart: always

I want to do just the opposite though. I want there to be 3 containers running at all times, and if a container exits cleanly (0) then a **new **container should be created to replace it

Are there any tools for such behaviour? I haven't found anything - do I just write a custom Python script to monitor it

rapid sparrow
#

u specify u wish to have installed some package to app, may be with constraints, not less than specific version or in fuzzy version to install only patch updates later on its own

#

uv auto generated Lock file, to ensure that when u sync packages to current env, EXACTLY SAME will be installed

#

lock file changes only when u add, update or remove packages. packages can be other affected even if they were not directly updated in current operation

#

When u form Python Library, u can specify to it "requirements" list, that specifies which Packages to install if this lib is installed
Which VERSION CONSTRAINTS are needed to be satisfied for those sub dependencies, minimum or exact or fuzzy versions

#

When u do any operation with pacakges in uv
It resolves all requirements from all libraries and helping you to its best effort to install packages which have all their constraints being satisfied between each other

#

All other python package managers work in same fashion. Adhering to requirements your libraries have, and try to resolve all libs to a working fashion

#

Exception is when u install something in a raw way through pip directly, it has very primitive resolving mechanism, which is ignoring stuff when u add or remove new libs. pip raw lib installations resolving somewhat works only if all libraries are installed at the same time in a single command

#

=====
When u launch something through uv, it can be even auto installing missing dependencies if they are not yet installed yet

#

Installation of dependencies always happens to isolated venv somewhere existing. So your global python packages aren't affected

#

Exception when u add config params/Env params to break this behavior on purpose (for docker image for example) and it does install to system python

willow palm
#

uv is pretty great though

#

if your metapackage is nothing but a pyproject.toml with specific version constraints, this is fine

#

if your subpackages depend on each other, well, you're boned, because then the metapackage doesn't control the versions anymore

#

actually no.. it will lock the entire chain if you only have a lockfile in the metapackage

#

in that case lockfiles in the sub packages are only used for dev, and potentially you don't use them

#

that's the unanswered question, how do you deal with deps when the metapackage is not the thing pulling it all together

#

you need a plan for developing in the subpackage repos and keeping the metapackage lock up to date with the dev environment

#

if nobody can answer how to do that, back to the drawing board

shadow anvil
junior bobcat
#

I need a sanity check.
I see a [lint] in a pyproject.toml. But there's no common tool that actually uses that exact table and no way to tell anything to use that table, is there?

willow palm
willow palm
rapid sparrow
#

example of package like this

#

There is no need for Something special for that

#

just do empty package with requirement constraints like in regular package

#

just more strictly

shadow anvil
jagged cairn
#

Hello, Anyone wants to collaborate in developing cybersec tools or scripts for our portfolio?

loud walrus
#

-# I think this is the right channel
I seem to be doing something wrong with how I handle my branches. Once I merge the PR for a branch in github I delete the branch git branch -d <name>

warning: deleting branch 'logging' that has been merged to
         'refs/remotes/origin/logging', but not yet merged to HEAD
Deleted branch logging (was bd30a33).

I am pretty sure that these branches are then supposed to join back into the main branch when they are merged right? What I am doing right now seems to work but I am worried it will lead to issues if I ever need to do anything more complex

crimson spruce
loud walrus
#

Yes, I squash

crimson spruce
#

In that case your local commits will not be merged at all, because what you're merging are new commits (that contain the same changes).

loud walrus
#

ok, so this is something that I do not need to worry about?

crimson spruce
#

Yeah, you can do that workflow without worrying.

zealous thicket
honest terrace
zealous thicket
rugged wave
rapid sparrow
rugged wave
#

nowhere

#

just wanted to show yall a tool im working on

rugged wave
#

its alive!

#

browser cache btw

rapid sparrow
#

or it is folder named Pirated Games 😄

rugged wave
#

you saw nothing

rugged wave
rugged wave
#

its done!

#

no its not a trojan

#

this is my first proper python application

sturdy compass
#

hey there, does anyone know a tool that can scramble audio files and maybe pad it at random places?

hollow wagon
fallow plinth
#

hello? i need help with dlib..

hollow wagon
# twilit forum What does it do? 😅

JumpTheGun pre-commit wrapper makes pre-commit run faster. The heavy lifting ("deep dark magic") is done by JumpTheGun, a generic tool I wrote to make Python tools start up more quickly.

It's intended to be used in local dev environments to streamline one's workflow. I like using quick, snappy tools 🙂

crimson spruce
twilit forum
crimson spruce
#

It avoids the startup/import cost. Instead of every invocation of black starting a Python interpreter, importing all required packages etc., it just does this once, and keeps running, ready to take requests for a new "run". See here for more details.

hollow wagon
#

JumpTheGun is a generic tool for making tools impemented in Python startup much more quickly.

#

For a tool (e.g. black), JumpTheGun runs it in the background, stops it after it has started up Python and done its imports, and makes it wait. When the tool is then run via JumpTheGun, the existing process is forked and starts running from that point. (It indeed uses TCP-based communication to route stdin/stdout/stderr correctly.)

#

Heh, @crimson spruce's explanation above is shorter and better 🙂

thorny shell
#

does git now ignore .venv by default? It seems to be -- I've deleted all my various .gitconfig files, and have no .gitignore, and yet neither "git status" nor "git ls-files"   show it

#

looks like it ignores any directory whose name begins with .

crimson spruce
#

I've deleted your post, as it violates our rule against ads.

rugged wave
#

I really want to expand this

#

but I have no idea what to add?

#

some osint tools maybe

#

idk

#

I should organize the files

#

the network and storage stuff are just two big scripts respectively

#

maybe make small ones for each tool

astral apex
thorny shell
fallow plinth
#

anyone could help me installing dlib??

twilit forum
twilit forum
twilit forum
hollow wagon
#

For example, black is super-opinionated, the only thing that is configurable in its formatting is the max. line length (plus a couple of other flags, but that's it). Other formatters are much more customizable (I'm not sure about ruff).

twilit forum
hollow wagon
#

Well, for one thing, I know and trust the main developer of black, and I trust it to remain FOSS. Ruff is developed by a for-profit startup that raised a lot of money, and their business model is not clear to me. So I'd very much prefer the Python ecosystem doesn't go all-in on ruff.

#

(Same for uv and ty.)

#

I know the ruff devs (Astral) have promised that these tools will remain FOSS in the future, but I have doubt regarding their intended revenue model ("In the future, we’ll build and sell services on top of our tools"), and promises such as these have been broken before even by those with the best of intentions.

#

(Just to be clear, I'm greatly in favor of what they are doing, and am rooting for them to succeed!)

somber marten
atomic flower
#

I want to be able to generate problems for Calc 1 and 2, along with the steps to solve each problem as needed. This is so I can generate practice problems for myself. Do you know of anything that I might be able to use to help me build it?

molten brook
somber marten
#

I want to bring that experience to python

junior bobcat
#

Docker is devops, right? :P
Trying to set up a multi-stage build for a python app and having trouble settling on the approach. It looks like the common routes are

  • Install into a venv in the build stage and copy that venv in the end stage. which requires updating the PATH This seems the easiest but still feels a bit cluttered.
  • Install to the user in the build stage and copy the user directory in the end stage. Which also may also require updating the PATH. This seems marginally cleaner than the venv approach.
  • Build only the wheels in the build stage then install the wheels in the end stage. This seems to require the most work to set up but if it works, provides the cleanest result. Might avoid having pip in the final image with some mounting shenanigans? but the mounting confounds me
rapid sparrow
rapid sparrow
#

not very worth wile investment. We at work with python as main language never allocated time towards it 😅

#

if u wish small sized docker images, u just should use... some compilable language, very easy to make small sized docker image with go for example

#

Do tell how much u will succeed in decreasing image size if u will have some success

junior bobcat
junior bobcat
#

The muliti-stage build is then a requirement for the Python. And there's no point in having one package installed differently from the rest, thus all the packages get installed in this multi-stage build process

junior bobcat
rapid sparrow
#

okay 😄

rapid sparrow
#

PATH changing is optional but could be nice touch for simpler python final access

junior bobcat
#

Right. I started with the venv approach because it was easier to start up and the entrypoint I just call directly. But for actually building, it would be a real pain in the butt to work without prepending the path

rapid sparrow
rapid sparrow
#

venv approach is actually just a symlink illusion a bit, at which we put out installed libs

#

if u have C dependencies and they store themselves as compiled libs in some... other folders

#

things can break if u will just move venv itself

#

since venv is only symlink illusion, its usage should be pretty lightweight at least 😄

junior bobcat
sand cedar
#

i built an a compiler https://github.com/hejhdiss/pcl as a working system of my concept.anyone who have interest in this area if you like it can you please contribute or give some advice about its features or scripts.this is now only in linux platform.i want feedback about this concept or project.

GitHub

PCL is a minimal proof-of-concept compiler and runner for PCL files, which combine embedded C and Python code into a single source file. It extracts, compiles C code into shared libraries, generate...

celest lark
#

Built a lightweight Python environment manager in C – no pipx, no poetry, just raw speed
I recently built a simple command-line tool called Pytiner, aimed at managing Python virtual environments and packages — with zero overhead and written in pure C.
It’s fast, simple, and has no dependencies except Python 3
https://github.com/ExiroStudio/Pytiner

GitHub

Pytiner is a minimalist, terminal-based Python environment manager built in C - ExiroStudio/Pytiner

rapid sparrow
deep estuary
celest lark
# rapid sparrow what kind of reasons could make it picking over Uv https://github.com/astral-sh/...

Yeah, uv is seriously impressive — blazing fast and built solid. Definitely great for real dev environments.My project is more of a learning tool honestly. It’s written in C, aimed at helping beginners understand how venvs and CLI tools work behind the scenes.Not really trying to compete with something like uv, just keeping it super lightweight and educational. If someone’s building a big project, your tool makes way more sense 😄

ocean mica
#

Can someone tell if someone uses this?

rapid sparrow
#

Python is not about Super Efficiency achievable, it is hard to build images with C dependencies as it is 😅
A bit more used disk for images is not a big price to have more stability/predictability/simplicity

ocean mica
#

so gpt says me there will be issues when isn't able to justify them well

#

what sort of issues can i face?

junior bobcat
# ocean mica what sort of issues can i face?

Since I'm currently writing a multi-stage docker image for work and the work is primarily python, I can tell you my personal issues :P
Before that, what GPT is telling you about how to build is kind of garbage. Set up your project as a real project, install it to a venv. Then you can copy the venv into the final build stage and add it to the PATH (which is most of what bin/activate does). This is the process I've seen done by others and it's pretty clean.
Now the problem I'm encountering is that if your app can't run outside the container, making a development container is a lot harder. If you run from source or an editable install in the container, you can mount your host copy of the project in the same spot and can make changes to the code without having to rebuild the image. I have not yet found a clean way to get the same behavior in a multi-stage build.

willow palm
junior bobcat
willow palm
#

also, it's not extra layers if you do everything in one RUN

#

which is standard practice, e.g. removing apt source lists after apt installing things

#

though this is more analagous installing apt, installing packages, then uninstalling apt all in one RUN

#

if your desired outcome is minimal image, it's both clean and results in desired outcome, you just have the (compressed) wheel file as an extra layer compared to copying venv trees

#

other ideas:

#
  • you can execute a wheel directly if it has __main__ set up properly
  • you can e.g. extract requirements.txt from the wheel to install the deps, or copy it from the build image and do the pip trick
#

having your application tucked in a compressed wheel is even more minimal than copying the sources 😎

junior bobcat
#

It's not that I'm married to the approach I took but I honestly don't see how this is better. Like now you have to do the work to actually find where to get the pip wheel and install it, which also adds wget or curl as a requirement. Of course you can uninstall those too when you're done but like why do all that work when you can just do COPY --from=build /opt/.venv /opt/.venv

#

And of course you can also install pip through the non-python package manager then uninstall it.

#

But still

#

plus running from the wheel inside the container also means having to decompress it every time you launch the container. Which like sure that's a tradeoff and we can spend some effort trying to reduce the size of the image but why spend the extra cost where it's not needed

willow palm
#

all depends on what your goal is, i assume either minimal attack surface or minimal storage, otherwise not much point in multi-stage to begin with

#

fwiw i use multi-stage and don't sweat pip being installed in the runtime image

#

because i'm producing wheels anyway

cosmic birch
#

import pyautogui
import time
import win32gui
import win32process
import psutil
from pynput import mouse

Constants

ROBLOX_EXE = 'RobloxPlayerBeta.exe'
TARGET_COLOR = (255, 255, 255) # White crosshair
COLOR_TOLERANCE = 20 # Allows minor variation

Track mouse state

left_clicking = False

def on_click(x, y, button, pressed):
global left_clicking
if button == mouse.Button.left:
left_clicking = pressed

mouse.Listener(on_click=on_click).start()

def get_active_exe():
hwnd = win32gui.GetForegroundWindow()
_, pid = win32process.GetWindowThreadProcessId(hwnd)
try:
return psutil.Process(pid).name()
except psutil.NoSuchProcess:
return None

def color_matches(color1, color2, tolerance):
return all(abs(a - b) <= tolerance for a, b in zip(color1, color2))

Main loop

print("Starting white-crosshair auto shoot. Hold LEFT MOUSE BUTTON to shoot. Press Ctrl+C to stop.")
try:
while True:
if get_active_exe() == ROBLOX_EXE and left_clicking:
screen_w, screen_h = pyautogui.size()
center_x, center_y = screen_w // 2, screen_h // 2
pixel_color = pyautogui.pixel(center_x, center_y)

        if color_matches(pixel_color, TARGET_COLOR, COLOR_TOLERANCE):
            pyautogui.click()
            time.sleep(0.05)
        else:
            time.sleep(0.01)
    else:
        time.sleep(0.05)

except KeyboardInterrupt:
print("Stopped.")

cosmic birch
#

this is probably not the correct channel for this

tribal kayak
#

#> LoginSecurity configuration.
#> Some information is provided in the form of comments
#> For more info visit https://github.com/lenis0012/LoginSecurity-2/wiki/Configuration
register:
required: true

When enabled, users need to enter a captcha upon registration.

captcha: false

When enabled, requires users to enter their password twice upon registration.

confirm-password: false
login:
max-tries: 5

Only allow registered players to join using exactly the same name as registered.

username-match-exact: true
password:
min-length: 6
password-max-length: 32
join:

When enabled, player gets a blindness effect when not logged in.

blindness: true

Temporarily login location until player has logged in.

Available options: DEFAULT, SPAWN

location: DEFAULT

Safely hides the player's inventory until the player is logged in

This required ProtocolLib to be installed

hide-inventory-safe: false
username:

Remove special characters like @ and # from the username.

Disabling this can be a security risk!

filter-special-chars: true
min-length: 3
max-length: 16

Shortcut that can be used as alternative to login/register command. Does not replace the defaults

command-shortcut:
enabled: false
login: /l
register: /reg
updater:
enabled: true

The type of builds you are checking. RELEASE, BETA, ALPHA

channel: BETA

Session timeout in seconds, set to -1 to disable.

session-timeout: 60

Login timeout in seconds, set to -1 to disable.

login-timeout: 120

Login/register message delay in seconds.

login-message-delay: 10

Language for messages, check wiki for more info.

List: https://github.com/lenis0012/Translations

This setting should be set tot he file name without .json

language: en_us

GitHub

Lightweight and secure user authentication for Bukkit Minecraft servers - lenis0012/LoginSecurity

GitHub

Translations for LoginSecurity. Contribute to lenis0012/Translations development by creating an account on GitHub.

quartz sky
somber marten
astral apex
neon shard
#

so part of the neatness is just the idea of "what if we had a version control system that was not specific to a backend", i.e. you can have a git backend, google has their internal backend for their needs, yet the "vcs frontent" is fundamentally the same

#

but, if the vcs frontend sucked that wouldn't help, thankfully it doesn't

#

people have come to realize that jj is a lot of "show don't tell" to get the niceness of jj across, but I can try to give some highlights

#

The staging area has been simplified away

jj only has commits and there is no such special thing as a staging area that requires its own commands to interact with, everything just goes into a commit and can be handled like any other commit

So a flow that would be

  1. edit file
  2. stage the change
  3. commit the staged change

Becomes basically just

  1. edit file
  2. give a name to the change
#

Powerful rebases

You can basically rebase anything from anywhere to anywhere else with ease. Rebasing does not care at all what you have checked out, it's just doing operations on the graph.

You want to move this whole tree from there to somewhere else? Easy.
You want to rip a few commits out of the graph and insert them somewhere else? Believe it or not, also easy.

And rebases get better because of...

#

First class conflicts

JJ models conflicts in a very nice way. Internally it doesn't store the diff markers, but stores from what sources the diff came from. The leads to the ability to do nice things like letting a rebase always succeed. You are never in a state where "hey you need to resolve these diff markers before you can proceed to do anything else"

So you can do the rebase, and later decide to fix the conflict. Or you could even continue to do further rebases and the conflict might go away

#

Time travel

This is one of those small things that is just so well. JJ keeps track of all operations performed, and you can undo or reset to any point in the past.

Mucked up a rebase that created more conflicts that you expected? jj undo and you're back.

You will also realize the messup quickly because you can immediately see what the damage of the rebase was in terms of conflicts. In git you would be stuck editing diff markers and maybe only later you realize that you put yourself in a mess, how do I back out of this?
(for the more experience git user, it's a bit like the reflog, but actually nice to work with)

#

Misc

But I kinda think some of this is "you just need to try it out". I think a common pattern is "any single part isn't revolutionary, but it adds up to a so much nicer and powerful workflow"

#

Stuff that is kinda considered hard operations in git become easy. And with the operation log you feel much more comfortable to just try stuff out and see what happens, because you can just undo

#

Some testimonials

Let me drag in some recent appreciation posts from the jj discord

I am very good with git, I learned it when it came out and understand it very well. I didn’t use to think it was too complicated.

Now, I see threads with people talking about some advanced usage like “you can add interactively to the index/stash” and I’m like “eh, don’t even need to do this anymore, what gratuitous complexity”.

Earlier today, from a coworker of mine who I got into using jj just a couple weeks ago (lightly paraphrased):
"jj isn't an incremental improvement over git; it's a more comfortable way to handle various day-to-day VCS tasks"

#

I've started using jj as my daily driver and have been shocked at how much of a learning period there hasn't been. I use rebase -i frequently in git and use a ton of aliases, but my workflow has translated super easily to jj. Things I do frequently in git with 5+ commands in git can be done easily and intuitively with 1 command in jj. Even things I wouldn't ever dare try to do in git (e.g. rebases involving merges with conflicts) are trivial in jj. Never going back 🙂

#

Been thinking a lot this week about how much I appreciate that jj is small enough to "fit in my brain".

By which I mean the core [interface] is both concise and consistent enough that I can accomplish most operations — even uncommon on non-trivial ones — without having to constantly scour the docs.

tiny jungle
#

where is this all coming from

neon shard
#

That last one actually reminds me of another point. Orthogonality of commands. There is a pretty clear separation between "I'm moving commits around and changing the tree", "I'm creating a new commit", "I'm moving diffs between commits"

neon shard
tiny jungle
#

no, all of the messages you just posted

neon shard
#

I typed them

#

all but the testimonials

neon shard
astral apex
#

I appreciate the efforts

#

Thank you for your services to democracy citizen

neon shard
#

jj really needs a "sales pitch" style page

quartz sky
neon shard
#

so messing around and trying stuff it suddenly not scary, and you learn a lot quickly just from feeling comfortable playing around

#

fwiw jj undo to undo the last operations (then going jj undo undoes the undo)

#

to restore to an earlier point you can jj op log to see the graph of operations, and then you can jj op restore to a specific one

#

it's all non-destructive

tidal garden
#

It's a tool that can be used for copying files in an advanced way

#

I value your opinion and guidance. Thank you!

gentle solstice
#

Can it copy over ssh?

tidal garden
#

Hi @gentle solstice , my module currently doesn't support copying over SSH.

#

But here are some aspects where fylex might help

tidal garden
#

I am new to this... looking forward to your help. Thanks in advance.

tidal garden
#

Thanks a lot, @short peak

junior bobcat
#

Installing dependencies in a dockerfile like so

RUN --mount=type=cache,target=/root/.cache/pip \
pip install -r requirements.txt

Is it possible for this cache to be clobbered in such a way that the dist-info no longer matches the actual package?
I have a package that lists one version when using pip show and a much older version when checking __version__. But it's only happening in one specific image.

fallow plinth
junior bobcat
junior bobcat
#

Looks like there was another dependency that wanted to inject its own patches for protobuf

#

which is fucking disgusting

rapid sparrow
#

i tend to lock to Overly specific versions included Patch version when i do it at least though

#

few days ago i was debugging super weird bugs with python app. where it was having 3 times more Threads in average on runtime than it should, and thus any app instance was requiring 3.5 CPU reservation in order to run stable and not screwing up itself and other apps with "Can't create new thread" errors

#

Smth was leaking urllib connectionpools as zombie threads in large amount

#

...eventually after a lot of binary search debugging of narrowing down a flakky issue in addition where the heck it comes from, things pointed to company internal library for elasticsearch full of patches -_-

#

thankfully i was allowed deleting the lib from the app code for now due to it being still not used in prod. no lib, no problem

junior bobcat
#

It's not actually a patch, this wheel straight up replaces whatever protobuf is installed with its own. But it only replaces the source files, not the dist-info which is why pip show protobuf was reporting business as usual

rapid sparrow
#

it is its strength in everything being allowed, and its curse.

junior bobcat
short peak
#

@rapid sparrow , did you try ty already?

rapid sparrow
#

Hehe, project in deep alpha version and already 10k stars

crimson crag
#

i am working on a tool called air-cli but i have no clue what it should do i need ideas (nothing to do with weather)

crimson crag
#

?

rapid sparrow
#

i had a pet project idea which i actually named Air Cli

#

but never implemented it

crimson crag
#

lol thats crazy

rapid sparrow
#

The idea was to implement Local executable CI workflow, so it would be independent from Cloud CI executors like Github Actions

#

it should be having well visible workflow of steps executed, possible paralleizations, detailed errors in case it fails

#

as last step we would insert it into Cloud CI runners like Github Actions to run from it if necesary

#

there are two possible options how to implement it

  1. Yaml based, inspire from Github actions, Taskfile, Tekton CI, just make it local executable
  2. Static typed one, using smth like HCL as basis, or using general purpose language to write it
#

Air CI actually it was supposed to be

#

without l in it

#

lightweight locally executable CI workflow, insertable into any other CI runner.
it should have been written in Golang i guess? it would made it easy distributable to any machine/docker image
Plus it would have made easy parallelization and fast its running

rapid sparrow
crimson crag
#

alot of words lemon_scared

rapid sparrow
#

the point of this exercise was to make smth lightweight executable locally, fully being able to serve as CI and preferably also having ability to write reusable actions like Github actions market has

#

i see a problem of CI that lack of local execution makes things a bit problematic

#

probably for a reproducable way to run it we would have been needing to utilize Docker may be. Shell and Docker executors for CI probably would have been offered

#

Taskfile is nice, but it is more Makefile, not really having aim to be CI workflow

#

all other solutions are requiring self hosting infrastructure/agents/cloud stuff, having lack of local execution

#

the tool difference (in comparison to normal CI runners) was suppposed to be easy debugging by having first supported local execution

crimson crag
#

even more too many words 😭

rapid sparrow
# crimson crag even more too many words 😭

try use existing CI tools, Github Actions, Gitlab CI, Taskfile.dev, Dagger IO, Tekton CI
you need to try using already existing in order to understand their limitations and what is missing, to get a vision what u can make beyond their abilities

tribal verge
#

i kinda made the most useless tool ever

eager flame
#

How can I widely publish my tools or libraries? When I upload them to GitHub, no one downloads or visits the projects.

#

I have a Python library called calco that supports a wide range of mathematical operations using pre-built functions written in C. It's highly optimized for performance and delivers extremely fast calculation speeds. There is a ready .whl file available for most systems, and you can download it from the website: https://calcolib.netlify.app/"

rapid sparrow
rapid sparrow
# eager flame How can I widely publish my tools or libraries? When I upload them to GitHub, no...

no one downloads or visits the projects.
popularity depends on

  • your project need
  • how well it was made / easy distribution
  • lucky guess of naming it right
  • well documenting it
  • advertising about it in articles (i usually do only only up to this step 😄 )
  • optionally telling on conferences (could be important step for scientific stuff)
  • writing about in community that actually needed it / solving smth with it real, instead of telling through articles and confierences
eager flame
#

Yes, you can install it directly from PyPI, but the installation requires some additional steps, which is why I created a separate website

rapid sparrow
#

C depended libs i used did not have that much of problems with installations.
pip install psycopg2 to build out of source code, pip install psycopg2-binary to install already built one 😏

rapid sparrow
eager flame
#

Thanks for the suggestion The library actually comes with a ready .whl for most systems and a full installation guide with just two steps that's why I also made a separate website to simplify the process even more. Still, I'm open to improving it further if needed

rapid sparrow
# eager flame Thanks for the suggestion The library actually comes with a ready .whl for most ...

https://pypi.org/project/numpy/#files
Numpy lib publishes wheels for different platforms too (as far as i remember it should be C depended lib too)
https://numpy.org/install/
yet they somehow manage to offer installation as simple as pip install numpy
Plus write all those different options

Tip This page assumes you are comfortable using a terminal and are familiar with package managers. The only prerequisite for installing NumPy is Python itself. If you don’t have Python yet and want the simplest way to get started, we recommend you use the Anaconda Distribution - it includes Python, NumPy, and many other commonly used packages ...

#

i suspect simplified installation is possible

eager flame
#

developed my library completely on my own in less than a month, and yet it's 10 times faster than NumPy. It’s not better in terms of array support, complex operations, or precision, but my library is designed specifically for speed.
You can install it using a single command: pip install calco==1.0.0, and then rename the file to calco.pyd. This renaming step is only needed in rare cases when there are installation issues — most of the time, it’s not even required

#

In addition, NumPy was developed by specialized teams and has been improved multiple times

shadow crow
rapid sparrow
eager flame
# rapid sparrow Now take any projects that use Numpy then with long enough executions, replace i...

"I’ve already done comparisons using scripts that repeat various mathematical operations millions of times and measure the execution time — and the result is that my library is faster.
That’s expected, even if you ask someone from the NumPy team themselves, they’ll tell you it’s normal — because NumPy includes more checks and overhead.
My library, on the other hand, is built purely for speed.
You can download it and try it yourself to see which one is actually faster.

shadow crow
rapid sparrow
#

Anyone can claim that smth is faster than others. People could be needing more convincing for advantages to use another solution

shadow crow
#

The source release on PyPI is pretty suspicious. It doesn't actually contain the source code, it's just a bunch of pre-built binaries

#

you said that the source code is available on github

eager flame
shadow crow
#

I would definitely be suspicious at the

offering speeds over 30% faster than the built-in math module
claim

  • Where are the benchmarks?
  • How are your functions different from the ones in math? Why are they faster?
  • Maybe the right place for the functions is in the math module? Why not contribute the speedups to CPython?
eager flame
#

C:\Users\C-LAB>python "D:\My Projects\LIBS\PYD\Calco\test.py"

🔹 Level 1: Basic Arithmetic

Operation Library Time (s)

Addition math 0.0180
Addition numpy 0.1586
Addition calco 0.0197
Subtraction math 0.0155
Subtraction numpy 0.2185
Subtraction calco 0.0277
Multiplication math 0.0228
Multiplication numpy 0.1952
Multiplication calco 0.0167
Division math 0.0168
Division numpy 0.1576
Division calco 0.0165

🔹 Level 2: Intermediate Functions

Operation Library Time (s)

Square root math 0.0178
Square root numpy 0.1123
Square root calco 0.0158
Logarithm math 0.0192
Logarithm numpy 0.1089
Logarithm calco 0.0178
Sine math 0.0185
Sine numpy 0.1127
Sine calco 0.0203
Exponential math 0.0214
Exponential numpy 0.1075
Exponential calco 0.0196

🔹 Level 3: Complex Expression

Operation Library Time (s)

Complex Expression math 0.1062
Complex Expression numpy 0.6008
Complex Expression calco 0.0994
Complex Expression mpmath 8.3683

shadow crow
#

If the only selling point of your library is the speed, you should definitely include the benchmarks along with the source code, and advertise the benchmarks as much as possible

#

the code for the benchmarks as well (you could be measuring it wrong)

rapid sparrow
eager flame
#

"These are 100,000 repetitions for each operation written in the benchmark.
This is just one comparison result — I’ve done several comparisons, and the results are consistently similar

shadow crow
# eager flame "These are 100,000 repetitions for each operation written in the benchmark. This...

This is what I'm getting for square roots on Python 3.12:

In [1]: import calco

In [2]: import math

In [3]: x = 420.69

In [4]: %timeit x**0.5
48.8 ns ± 0.38 ns per loop (mean ± std. dev. of 7 runs, 10,000,000 loops each)

In [5]: %timeit math.sqrt(x)
33 ns ± 0.0999 ns per loop (mean ± std. dev. of 7 runs, 10,000,000 loops each)

In [6]: %timeit calco.square_root(x)
81.3 ns ± 0.18 ns per loop (mean ± std. dev. of 7 runs, 10,000,000 loops each)

can you show the benchmark code?

#

or maybe check it in to the repo

rancid schoonerBOT
shadow crow
eager flame
#

This could be due to differences in hardware and Python version — I'm using Python 3.13. Also, keep in mind that math has an advantage because it's built-in, while calco is accessed through an API layer

#

Anyway, I fully accept that math can be faster in some cases, and calco can be faster in others. I’ve seen that myself in other benchmarks — sometimes math outperforms it. To add more value though, I included additional ready-to-use helper functions in calco that aren’t available in math.

crimson spruce
#

Sometimes pip puzzles me. I'm trying to install an exact version of a dependency:

$ pip install 'the-package==0.4.2'
Looking in indexes: https://our.private.index/comnpany/development/
ERROR: Cannot install the-package==0.4.2 because these package versions have conflicting dependencies.

The conflict is caused by:
    The user requested the-package==0.4.2
    The user requested (constraint) the-package==0.4.2

To fix this you could try to:
1. loosen the range of package versions you've specified
2. remove package versions to allow pip to attempt to solve the dependency conflict

I fail to see the problem here. Could this be due to caching on the company-internal PyPI mirror?

honest terrace
lime nexus
#

hello

full pawn
frigid jetty
#

Does anyone know if there is a recommended way to install the minimal required dependencies of a project as listed in pyproject.toml ? I want to enhance my CI/CD workflows to prevents breaking with older versions, and also so I can confidently widen the number of supported dependency versions. For context, this is my current workflow https://github.com/Koen1999/suricata-check/blob/master/.github/workflows/python-push.yml

GitHub

suricata-check is a command line utility to provide feedback on Suricata rules. The tool can detect various issues including those covering syntax validity, interpretability, rule specificity, rule...

frigid jetty
velvet mango
#

Does anybody know how to render a circle with stats using rich?

eager flame
twilit forum
eager flame
#

I’ve created a simple programming language called RACe 🧠✨ — it can be compiled into multiple languages like C, Java, and Python via dedicated compilers.

The source code and prebuilt binaries are available on the GitHub project 📦

Try it out or contribute here 👉 https://github.com/gafoo173/RACe 💻

GitHub

A simple and expressive programming language that compiles to C, Java, or Python. RACe is designed for easy learning, clear syntax, and cross-language code generation. - gafoo173/RACe

velvet mango
eager flame
rancid schoonerBOT
velvet mango
rapid sparrow
#

!rule 6 <@&831776746206265384>

rancid schoonerBOT
#

6. Do not post unapproved advertising.

slow citrus
#

Hey @rapid sparrow , I respect that you want to keep the server clean, but I do want to clarify what I posted wasn’t a promo. I wasn’t pushing a brand, selling anything, or asking for engagement. It was free, educational content I’m building on my own based on a real university syllabus and meant to help others who might benefit from it.

I get that you're enforcing rules, but deleting that kind of post without understanding the intent kind of shuts down genuine contribution too. If everything gets labeled as “promo” just because someone puts effort into something, it discourages people from sharing anything valuable at all.

That said, I won’t post it again if it goes against your policy but I just hope there’s room for nuance when something’s meant to educate, not self-promote.

slow citrus
#

Hey again @rapid sparrow I just want to correct something before this gets even more distorted. The message wasn’t deleted by moderators. I deleted it myself out of respect for the server rules, once I realized it might be seen as borderline.

That said, the assumptions in your message are way off base and honestly, a bit insulting.

I wasn’t collecting emails, phone numbers, or running some hidden funnel for ads or data. I shared an invite to a separate learning space I created to organize lessons and discussions for people interested in DevOps not to "trap users" or limit access. I’m offering free content that I’ve been developing while learning the subject myself through university. That’s it.

It’s fine if the server has a rule against any kind of external link I get that. But jumping straight to theories about scams, user data theft, or manipulation is a bit much. Not everything that’s organized in a private space is predatory by default some of us are just trying to build focused communities to learn together without cluttering every general tech channel.

I’m not here to argue, and I won’t post anything again. But if we’re going to talk about “BS detectors,” then let’s also talk about how dangerous it is to accuse someone of dishonesty based on pure speculation and no proof. Specially since you are in the field of IT, you should know about this @rapid sparrow .

I’m not pushing this any further, but I do hope future situations like this get handled with a bit more respect and less assumption. Intentions matter and so does how we choose to interpret them.

crimson spruce
#

@rapid sparrow Can you please leave the moderating to moderators?

heavy knot
#

Hi

wraith dock
#

What git cli tools does everyone use

crimson spruce
#

...git

#

oh, and also tig

thorny shell
#

super-awesome

#

it has just one downside, but that is staggeringly huge: it runs inside Emacs, which is bizarre and arcane and wacky.

short peak
#

I use git and omz plugin. But I should use tig more

thorny shell
deep estuary
#

forge is also fantastic

astral apex
thorny shell
deep estuary
#

you can open, manage, comment on and administrate github (or other supported forges) PRs and issues from emacs

#

write all your PR descriptions etc in Emacs, leave reviews, so on

thorny shell
#

Who knew?!

deep estuary
#

it doesn't always make sense if you don't use a whole lot of GitHub but for the repos here it's a godsend being able to do everything with keyboard shortcuts, I can push a branch and have a PR up 20 seconds later without needing to step into a browser

#

very cool stuff -- I recommend checking it out if you do a lot of git issues & PRs, but magit alone is still a fantastic tool

thorny shell
#

I don't do PRs often but I'll take a look. If Jonas wrote it, it's excellent.

deep estuary
#

anything that keeps me off the new shoddy SPA-style GitHub is much appreciated

#

it can barely render files over 200 lines now without having a bunch of weird visual artefacts, it's incredible how enshittified that UI has been the last 5 years

fresh raft
#

Please tell me how to alert Github commit calendary.

marsh acorn
astral apex
fresh raft
peak hull
#

Hi, as a student, I recently completed a fullstack project.
During the final week, I set up docker-compose configurations to enable communication between the backend and frontend containers.
By the end, our folder structure looked like this:

ops/
+--- docker-compose.yml
+--- docker-compose-e2e.yml
+--- run.sh
+--- run-e2e.sh
docs/
frontend/
backend/
...

One thing that bothers me is having to cd into the ops folder every time I want to run one of the run*.sh scripts.

I'm curious:
How do you usually organize this kind of setup in a professional environment?
Not just for containerization, but more broadly, how do you structure and manage your DevOps workflows?

short peak
peak hull
#

That's what I'd have done too.
However, our teacher explicitly asked us to stick with this folder layout, so I’m wondering if it actually reflects how most professional projects are organized.
With growth in mind, how do you handle this kind of setup in a professional environment?

short peak
# peak hull That's what I'd have done too. However, our teacher explicitly asked us to stick...

professionally, it depends too. If it is an existing project, it doesn't matter how "professional" you want to be, you rather stick to current layout to avoid disturbing the team workflow, unless you are solo, which it will be up to you. If you are starting a project from scratch and there is not guideline like another similar project, you are free to decide if you want to isolate the most you can concern using a specific directory layout as your teacher suggests. I don't think it will affect too much as long as you feel comfortable, at the end, you organize your code to make your and other easier to browse through files and make stuff work, instead of follow a book. I'm not saying books and your teacher are wrong, just that in real life, that's not so important as long as team is comfortable and you do your best to keep it clean.

#

@peak hull , here is an example of a recent project I'm working on

#

sorry for the image. It would take me a bit to edit the text to show what I wanted

peak hull
#

Thx, that's really helpful 🙏
From what I can see, you have put the config files in a devops folder while keeping the scripts at the project root..

I'll browse other projects on Github too.

short peak
peak hull
#

Indeed, it definitely makes it cleaner that way.

rapid sparrow
#

i start merging/rebasing in git console

#

and then just finish visual problem solving in vscode

#

like git rebase master

#

having conflicts, solved in vscode

#

staged

#

git rebase --continue to finish and git commit in console

wraith dock
rapid sparrow
#

i think this part is actually better be done by GUI, i am not that hardcore cli man to do it by cli

#

when i was at windows i liked using SourceTree for that, but it is regretfully unavilable at linux

#

as much as i tried git guis to find alternatives, they were all worse than just straight using vscode for that

#

so, i just in end doing the combo of git cli + vscode, for the lack of better alternatives to manage quality of what i commit

#

u can try git add -i 😄 may be u will find better luck with getting used to it

#

i tend to be git comitting Sometimes up to dozens of files, which can be quite large in amount of content

#

revisioning, splitting in chunk at cli level in interactive way... i think it is just too much for cli, too much of code

#

better just using vscode/ide itself for that, it was made for this

short peak
analog kettle
#

is it possible to do uv run --with with dependency you would have installed with git+?

#

oh. looks like you can just do uv run --with "git+...." ... and it works

scarlet marten
#

So I'm trying to figure out an issue with my flask application I'm trying to debug. It executes a celery task when a request comes in. For some reason passing the data over to the celery task fails because it's a class object? It works fine when stepping through in pdb but it fails in direct pytest execution? is there something obvious I'm missing about the internals of Celery/Pytest?

thorny shell
#

can't tell without seeing the code. I will say it seems unusual to directly execute a celery task; I'd have expected you'd enqueue it, and let celery execute it when it gets to it.

scarlet marten
#

(I don't know why the indentation dies on paste...)
So the flask route is this: ```
@app.route("/hooks", methods=['POST', 'GET'])
def webhooks():
if request.method == 'GET':
return make_response("", 200)

server_config = {
    'ansible': {
        'ansible_dir': "",
        'inventory_file': ""
    },
    'extravars': {},
    'hooks_config_file': ""
}
if app.config['server_config_file'] is not None and os.path.isfile(app.config['server_config_file']):
    server_config = toml.load(app.config['server_config_file'])

handler_config = webhook_receiver.hooks.HookHandlerConfig(server_config)
data = request.get_json()
if "event_name" in data:
    if handler_config.hasHook(data['event_name']):
        data = webhook_receiver.worker.run_hook_handler(data, server_config)
        return make_response(""), 200

return make_response(""), 404

The test for which is:

def test_response_success_object(client):
headers = { 'Content-Type': 'application/json' }
response = client.post("/hooks", json={ "event_name": "success" }, headers=headers)
assert response.status_code == 200

#

The issue is now, that the run_hook_handler executes just fine in pdb, I see the ansible playbook execute fine. But it returns a 404 instead of a 200, as per the return it's supposed to?

scarlet marten
#

The bizarre thing is that it works fine if I run it in the debugger, the tests pass but it does not pass in bare pytest execution,.

clever grail
#

Hey guys, i have a problem with linting, I have a python project nested in another project(not python) when i open the parent project in vscode python linting doesn't work, when i open the project stand alone linting is fine. How can i fix this?

eager flame
#

I’ve built a library called HardView that collects most hardware information, including many details that usually require multiple libraries — and even some that no other library provides. It’s written entirely in C, so it’s extremely fast, and it supports both Windows and Linux.

You can install it directly from pip.
If anyone runs into issues, feel free to let me know or open an issue on GitHub:
https://github.com/gafoo173/HardView

GitHub

HardView: A high-performance, cross-platform Python module (C-implemented) for comprehensive hardware information retrieval in JSON format. - gafoo173/HardView

short peak
#

something like this

    with app.test_request_context("/", json=payload):```
scarlet marten
#

Since it requires some setup, those steps ahead of it are there to start and create the app, I don't think that's relevant to the issue? Since the other parts of the test work. Like I said, executing the test in pdb shows the test passing.

short peak
scarlet marten
#

The 200 response is hit in other tests.

#

It's 2 of three tests that respond with a 404.

desert saffron
honest terrace
#

Not sure if this is the exact right place but I am having a weird issue with pylint in a git workflow. All other modules it handles fine except for PyQt6 and it is throwing these errors for all the components
No name 'QModelIndex' in module 'PyQt6.QtCore' (no-name-in-module)
I have several other modules that work fine and have their respective pip install as part of the yaml but for some reason none of the PyQt6 ones load and throw this error.

warm spindle
#

might be completely off topic, but how are people feeling about uv?

#

trying to get my team to convert from poetry

short peak
thorny shell
#

I love it. I haven't fully switched to it, due to inertia.

honest terrace
#

I use both sorta, but uv is awesome and I want to fully move to that myself

tardy inlet
tepid plank
#

u should make repl mode for this

nimble flame
#

No idea if here is the right place for this, but developed (with ChatGPT help since still learning) a multi-ticker tracker with a lot of different functionalities including buy/sell order fills linked to a Fidelity account. Would love some feedback and any additional ideas. I have a couple more tweaks i want/need. Most of what I envisioned has been added, so I am not sure it is worth the effort to keep going full bore with developing or just transitioning over to seeing how it works in practice. Cheers. https://github.com/mikebmac86/stock-trading-app.git

GitHub

a for-fun project to develop an intraday trading app that works directly with the fidelity trading website - mikebmac86/stock-trading-app

spare pagoda
glossy coyote
#

Hello, my commit history is like this

* c5d2b3b (HEAD -> master) fix: D
* 7bef56c chore: add E
* 71c6af2 chore: add D
| * 03a7f4f (origin/master, origin/HEAD, feat) chore: add G
| * 7c847c8 chore: add F
|/
* aa20ccf chore: add C
* 0933658 chore: add B
* 8b9fb92 chore: add A

But when I do git pull --rebase on master, it throws out this error, and I don't know why it does```
CONFLICT (modify/delete): D deleted in HEAD and modified in c5d2b3b (fix: D). Version c5d2b3b (fix: D) of D left in tree.
error: could not apply c5d2b3b... fix: D

glossy coyote
#

IIRC, I did this to end up like that:

# Make 5 commits and push
git commit -m "chore: add A"
git commit -m "chore: add B"
git commit -m "chore: add C"
git commit -m "chore: add D"
git commit -m "chore: add E"
git push -u origin master

# Remove last two commits
git push -f origin HEAD~2:master

# Add dummy commits
git checkout -b feature origin/master
git commit -m "chore: add F"
git commit -m "chore: add G"
git push origin feature:master

# Add 1 more commit to master
git checkout master
git commit -am "fix: D"

# Try to do rebase
git pull --rebase
nimble flame
glossy coyote
# glossy coyote IIRC, I did this to end up like that: ```python # Make 5 commits and push git c...

Some good gentleman described what went wrong.

What you've done there is rewrite history in a way that messed up your fork point ferrisHmm
git pull --rebase is equivalent to git fetch && git rebase <upstream> --fork-point.
Simple git rebase origin/master would work fine: git finds the correct common ancestor and applies the three commits the local master has had since then.
git rebase origin/master --fork-point uses the remote reflog (.git/logs/refs/remotes/origin/master) to determine the base, which finds chore: add E as the base.
https://git-scm.com/docs/git-merge-base#_discussion_on_fork_point_mode
git has remembered that the add E commit was successfully pushed to the remote branch, and will try to just apply the changes since that point. It is efectively trying to rebase the changes you have made since your master diverged from origin/master, whatever rewriting of the history may have taken place on the remote.
It's behaving the same as if you did git clone containing ABCDE, edited D, then pull-rebased that new master.
Basically, it's a genuine merge conflict, except the remote deleted D by rewinding history, not by committing a new change doing that.

eager flame
#

Hello,

I’ve released version 2.0 of the HardView library, which provides extensive and detailed hardware information for your system. All functions return results in JSON format, ready to be used directly in your Python applications.

Basic Information:

bios_info = json.loads(hardview.get_bios_info())
system_info = json.loads(hardview.get_system_info())
cpu_info = json.loads(hardview.get_cpu_info())
ram_info = json.loads(hardview.get_ram_info())
disk_info = json.loads(hardview.get_disk_info())
network_info = json.loads(hardview.get_network_info())

Advanced Features:

smart_info = json.loads(hardview.get_smart_info()) # SMART feature is currently supported on Windows only
partitions_info = json.loads(hardview.get_partitions_info())

Performance Monitoring:

cpu_usage = json.loads(hardview.get_cpu_usage())
ram_usage = json.loads(hardview.get_ram_usage())
system_perf = json.loads(hardview.get_system_performance())

Live Monitoring:

cpu_monitor = json.loads(hardview.monitor_cpu_usage(5, 1000)) # Monitor for 5 seconds, 1s interval

Each function returns between 5 to 15 detailed system values in JSON format, providing a deep overview of your hardware status.

The library is written entirely in C, has no external Python dependencies, and is lightweight (~88KB) provided as a single file. The source code is organized and available for review on GitHub:

https://github.com/gafoo173/HardView

Installation:
You can install the library directly using:

pip install HardView

Platform Support:

Windows (Full features)

Linux (Supported, except SMART feature which is currently Windows-only)

For detailed documentation and organized information, visit:
https://hardview.netlify.app

Feel free to reach out if you have any questions or suggestions.

GitHub

HardView: A high-performance, cross-platform Python module (C-implemented) for comprehensive hardware information retrieval in JSON format. - gafoo173/HardView

#

The level of hardware information that HardView provides is not available through any single Python library. obtaining such detailed system information requires combining multiple libraries and writing hundreds of lines of code.

In contrast, HardView delivers highly detailed data — including component serial numbers, UUIDs, and other hardware-specific details — with minimal effort. Just a simple function call is enough to retrieve and print the information or integrate it into your scripts for verification, monitoring, or any other use case.

deep estuary
#

nice project!

#

is there a reason you return everything as a string?

#

the more typical flow for a library would be to return python objects and leave it up to the user to decide what format they want to parse/process/return things in

#

in a lot of things JSON isn't used, so as an example I work a lot with XML, so it'd be kinda weird to have to do something like get details -> parse JSON -> encode to XML when i could just do get details -> encode to XML

eager flame
#

Thank you for the feedback! Returning everything as a string was mainly for simplicity and compatibility, especially for quick integrations or when users just want raw output without dealing with complex structures.

But you're right returning native Python objects makes more sense for flexibility. I’ll definitely consider adding an option to return raw Python structures (like dicts) so users can handle the formatting themselves, whether JSON, XML, or something else.
Appreciate the suggestion

deep estuary
#

nice 🙂

#

yeah I see you've done it in C, even if you don't return direct dicts you could even just return a class of your own (that you can still manage/instantiate entirely in C) which could be quite clean

#

like for example uhhh

#

!e ```py
import platform

uname = platform.uname()

print(uname)
print(uname.release)

rancid schoonerBOT
deep estuary
#

being able to interact with data like that is useful

#

in this case it's not actually implemented natively, it's a namedtuple, but still the idea carries

eager flame
#

That’s a great suggestion. I agree that providing structured, accessible data like that would be much more convenient for users. I’ll definitely consider implementing something similar, maybe starting with the next release.

Thanks for the insight — really appreciate it!

neon shard
wraith dock
neon shard
crimson spruce
#

@cold wagon Hello, I've deleted your post as it's violating our rule against ads.

neon bronze
#

psutil not detected even though i have it installed

rocky jetty
#

@wintry plinth I am presently soliciting opinions on snakemake or alternatives for the management of data processing workflows. I've heard nextflow is hot right now...
You've mentioned snakemake a few times. Do you use it?

#

(anyone else too)

wintry plinth
#

I've never used snakemake, I just know it exists :/

rocky jetty
#

Ah, thanks.

wintry plinth
#

I've heard airflow is also a solid choice for pipelines

#

Next flow is also a decent option

rocky jetty
#

👍

rancid schoonerBOT
#

Please react with ✅ to upload your file(s) to our paste bin, which is more accessible for some users.

#

Please react with ✅ to upload your file(s) to our paste bin, which is more accessible for some users.

random monolith
tardy inlet
tepid plank
twilit forum
#

Regarding this:
#python-discussion message

It seems like some python tools (reportedly some lsp) does not accept an absolut import from a file in the same folder.

Would that be a mistake on the tool side? Should import foo work from a file in the same folder as foo.py?

sudden kernel
astral apex
# sudden kernel Wanted to pop this here to gain some traction and feedback! https://github.com/...

Are you really trying to support Python 3.7?
It went EOL in 2023: https://devguide.python.org/versions/
You can clean up your packaging config a lot if you limit your support to the currently supported Python versions (3.9+)

Also you get a bunch of fancy stuff on PyPI if you automate publishing to PyPI when you create releases on GitHub

Speaking of automation, you should setup GitHub to automatically run your tests

caelum_sys.egg-info and the __pycache__ folders should be deleted from the repo
They're generated artifacts

sudden kernel
astral apex
signal cloakBOT
sudden kernel
eager flame
#

Hey everyone, I’ve just released version 3.0.0 of HardView — and it comes with some important changes.

What’s new:
Structural change for output
The library now supports returning results not only as JSON strings, but also as native Python objects.
This makes it easier to work with the data in your Python code.

New _objects functions
Every function that returns JSON now has a counterpart that returns Python objects.
Example:
get_bios_info() → JSON
get_bios_info_objects() native Python dict

GPU information support
Two new functions have been added:

get_gpu_info() — returns GPU info in JSON format

get_gpu_info_objects() — returns GPU info as native Python objects

To direct Download Use pip install HardView

If you encounter any issuse or want to see the source code here is the GitHub link:
https://github.com/gafoo173/HardView

GitHub

A high-performance, cross-platform Python module (C-implemented) for comprehensive hardware information retrieval in JSON format And Python Objects. - gafoo173/HardView

#

Also the documentation and explanation of the functions are available on GitHub

random monolith
eager flame
inner palm
#

Hi guys, newbie here.

How do I expose internal postgres and redis into my Dockerfile here?

docker-compose.yml

services:
  postgres:
    image: postgres:16
    # ports:
    #   - 5432:5432
    environment:
      POSTGRES_USER: postgres
      POSTGRES_PASSWORD: postgres
      POSTGRES_DB: my-postgres-db
    volumes:
      - postgres-data:/var/lib/postgresql/data

  redis:
    image: redis:alpine
  web:
    build: .
    ports:
      - 9000:9000

volumes:
  postgres-data:

Dockerfile


FROM node:22

WORKDIR /build

COPY . .

RUN npm install

EXPOSE 9000
ENV DATABASE_URL=postgres://postgres:postgres@postgres:5432/my-postgres-db
ENV REDIS_URL=redis://redis:6379

RUN npm run build

CMD ["npm", "start"]
gentle solstice
#

That should work fine.

#

Though you should prefer to put your env in the compose.yaml, not the dockerfile

loud walrus
#

Should I exit my venv if I need to run a command line tool? I downloaded a CLI tool called migrate for database migrations. It works in a normal console, but not in my venv. Is there a way to add it to the "venv path" (?) or sohuld I just exit the venv and then activate it again once I am done?

gentle solstice
#

Is it a pip tool?

#

!pip migrate

rancid schoonerBOT
#

A simple language agnostic database migration tool

Released on <t:1455861313:D>.

gentle solstice
#

That's an old package

loud walrus
#

No

hardy dew
#

Hii everyone i am new here
i want some help
can you guys tell

loud walrus
marsh acorn
#

Any globally available commands should also work from your venv. Make sure you restart your terminal after installing.

gentle solstice
#

python venv shouldn't matter. Try restarting your terminal to apply the latest PATH var

loud walrus
#

I restarted the terminal let me restart my IDE as well

hardy dew
#

i am learning python
so my instructor is teaching me how to use one call api so she uses 2.5 but now it updates to 3.0 which is paid but its free but it required debit card so i dont have a debit card
so what should i do?

marsh acorn
#

Using Windows? Try:

where migrate
loud walrus
#

Yeah, apparently the integrated ide terminal needs an IDE restart. It is working now! thanks!

shadow crow
#

Ask the instructor, they must be familiar with the product they're teaching

hardy dew
#

Its online course
Someone downloaded from udemy and gsve it to me

#

Nut i solve the problem

#

I used another alternate of this

vagrant whale
tepid heart
#

hey anybody has any good sources to learn git and github

thorny shell
#

for git specifically: this is what took me from "Damn, I've been struggling for months to understand this" to "ooooh! Now I get it!"

#

github, otoh, is so complex that

  • I figure I don't understand 60% of it
  • I don't care because of that 60%, at least half are features designed to lock me in to it, and hence aren't valuable unless I'm working for a company that's committed to sticking with github
crimson spruce
sly pewter
#

someone give me a site when i can learn and understand python easy

sudden kernel
sudden pasture
#

You just get some sheet of exercices where you download ad upload them there and you can complete the exercices on the same sheet .

tepid heart
steel seal
#

Hello Everyone,

Last year we tried to bring an LLM “agent” into a real enterprise workflow. It looked easy in the demo videos. In production it was… chaos.

• Tiny wording tweaks = totally different behaviour
• Impossible to unit-test; every run was a new adventure
• One mega-prompt meant one engineer could break the whole thing
• SOC-2 reviewers hated the “no traceability” story

We wanted the predictability of a backend service and the flexibility of an LLM. So we built NOMOS: a step-based state-machine engine that wraps any LLM (OpenAI, Claude, local). Each state is explicit, testable, and independently ownable.

NOMOS supports lots of llm providers including OpenAI, MistralAI, Groq, OpenRouter, Anthropic, Ollama and #Cohere. and there is lots of functionality already there and more are coming everyday.

Open-source core (MIT)
• GitHub: https://github.com/dowhiledev/nomos
• Documentation: https://nomos.dowhile.dev

Looking ahead: we’re also prototyping Kosmos, a “Vercel for AI agents” that can deploy NOMOS or other frameworks behind a single control plane. If that sounds useful, Join the waitlist.
https://nomos.dowhile.dev/kosmos

Would love war stories from anyone who’s wrestled with flaky prompt agents. What hurt the most?.
**Contributions through a PR or an Issue or through a simple GitHub star, will motivate us to make NOMOS better day by day. **

GitHub

Ship agents you can audit. Contribute to dowhiledev/nomos development by creating an account on GitHub.

NOMOS

Build Agents you can Audit

NOMOS

The Vercel for AI Agents - Deploy, Scale, and Monitor with Zero Ops

random monolith
thorny shell
steel seal
random monolith
astral apex
#

Can I not keep stopped containers?

#

I put docker run in a cron job and now I’m filling up my server’s hard drive every week and have to SSH in to docker system prune.

#

Am I gonna have to prune in a cron job?
I’d like to just not keep them around in the first place.

exotic elbow
astral apex
#

Oh that rings a bell

astral apex
astral apex
#

Oh, no, docs say I'm good

jagged shoal
#

Hi guys! Need some help with web scraping