#tools-and-devops

1 messages Β· Page 16 of 1

heavy knot
#

does anyone know how to hwid lock a batch file

neon shard
#

@brazen forge

isn't git the only backend rn? πŸ˜›
there are some other ones, e.g. gerrit requires special stuff

#

and of course the google internal one, but idk if you would count that

brazen forge
#

interesting

tame dagger
#

Finding a github approximant would be a big obstacle to changing VCS at work

meager sierra
#

im creating a new venv, new project and when im trying to commit and push the shit related to the new project, i have stuff from other projects overlapping with my new repo and it is becoming a mess

#

this issue is related to git

edgy relic
#

What tooling do you guys use for monorepos? I'm looking for something that's, ideally, not as complicated as Bazel etc.

brazen forge
#

at work, we use custom tooling that uses… Git submodules

edgy relic
brazen forge
#

if you heard bad things, you heard right

slim maple
edgy relic
#

At work I'm working on a multi year project that's scattered across 4-5 repos and that also sucks a bit

slim maple
#

But I feel like it brings it's own aset of challenges

#

And CI would potentially be harder, no?

edgy relic
#

Yeah, CI is the bummer

slim maple
#

I thought you said that CI is harder in separate repos πŸ˜…

edgy relic
#

It's way easier in separate repos imo

slim maple
#

If it's just frontend + backend - I feel like having two separate editor windows is better

slim maple
#

Why do you have 4-5 repos for the backend though?

edgy relic
#

That wasn't a backend. End-to-end, backend, data engineering to ML project.

slim maple
#

But if one of those repos is frontend, another one is backend, what other 2-3 are doing?

edgy relic
#

(At least) one repo is just used for data ingestion/backend and uses Elixir, another is the downstream data engineering and that's a mix of Python/R. There's another that is further downstream data engineering, fully Python, one for data viz (let's call it frontend) and a final for ML.

#

I'll have to figure out how to do CI and version management across this thing if it were a monorepo but realistically, having the entire project in a singular repository would've been better in hindsight

slim maple
edgy relic
#

I'm not the only one working on this 🀷

#

I think there's even more slightly hidden repos

remote sand
#

how do i get docker to cache pip install -r requirements.txt in such a way that it caches everything up to whatever line fails?

willow pagoda
rancid schoonerBOT
#

Dockerfile lines 10 to 11

RUN --mount=type=cache,target=/root/.cache \
    pip wheel --wheel-dir pip-deps -r requirements.txt```
brazen forge
#

that doesn't cache the built wheels, does it?

#

like, if you had multiple packages for which wheels need to be built (e.g., packages on Alpine with C extensions)

willow pagoda
#

pip downloads and caches all dependencies before building any wheels
derp, im wrong about this point: py (.venv) C:\Users\home\Documents\GitHub\dum-dum-irc>pip install --no-binary :all: numpy LinkPython-extern Collecting numpy Downloading numpy-1.26.4.tar.gz (15.8 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 15.8/15.8 MB 2.6 MB/s eta 0:00:00 Installing build dependencies ... / although after it errored in that build process, the subsequent run did use the cached sdist... so each step immediately writes to cache instead of waiting until the end?

remote sand
#

ty for comments, fixed my issue

willow pagoda
limber grail
#

I setup certbot (image: certbot/certbot) in docker-compose. All of my other containers are up and running successfully (PostgreSQL, Nginx, Django), but Certbot.
My issue I cannot select 1 or 2 from the options below when this log pops up in the Terminal. Trying to select one of the existing Certf. And active HTTPS (443).

container-for-certbot | Saving debug log to /var/log/letsencrypt/letsencrypt.log
container-for-certbot | Certificate not yet due for renewal
container-for-certbot |
container-for-certbot | You have an existing certificate that has exactly the same domains or certificate name you requested and isn't close to expiry.
container-for-certbot | (ref: /etc/letsencrypt/renewal/mydomain-name.com.conf)
container-for-certbot |
container-for-certbot | What would you like to do?
container-for-certbot | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
container-for-certbot | 1: Keep the existing certificate for now
container-for-certbot | 2: Renew & replace the certificate (may be subject to CA rate limits)
container-for-certbot | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
container-for-certbot | Select the appropriate number [1-2] then [enter] (press 'c' to cancel): An unexpected error occurred:
container-for-certbot | EOFError
container-for-certbot | Ask for help or search for solutions at https://community.letsencrypt.org. See the logfile /var/log/letsencrypt/letsencrypt.log or re-run Certbot with -v for more details.

remote sand
#

memray flamegraph and memray table say peak RAM usage is 600mb, yet the python app fills memory then SWAP and finally crashes. any tips for better profiling?

rapid sparrow
#

Just ensure tty is turned on for that

remote sand
#

still wonder why I couldn't get this info from memray

limber grail
rapid sparrow
#

i am not sure if it is strictly necessary for docker attach

#

but it can be needed πŸ˜…

limber grail
# rapid sparrow i am not sure if it is strictly necessary for `docker attach`

My setup that works under regular HTTP port 80. But everything breaks when I add certbot into the equation: server {
listen 8080;
server_name mysite-domain.com www.mysite-domain.com;

root /var/www/html;
index index.html index.htm index.nginx-debian.html;

location / {
    proxy_pass http://blog;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header Host $host;
    proxy_redirect off;
}

location ~ /.well-known/acme-challenge {
            allow all;
            root /var/www/html;
    }

}

web-server-nginx-service:
image: nginx:1.25-bookworm
ports:
- 80:8080
volumes:
- ./nginx/nginx-setup.conf:/etc/nginx/conf.d/default.conf:ro
depends_on:
- database-postgresql-service
- backend-django-service

certbot-service:
image: certbot/certbot
container_name: container-for-certbot
volumes:
- certbot-etc:/etc/letsencrypt
- certbot-var:/var/lib/letsencrypt
- web-root:/var/www/html
depends_on:
- web-server-nginx-service

remote sand
#

is it possible i'm getting a memory leak? never had one before in Python and the program is increasing RAM usage until it crashes (not expected behaviour)

drifting hatch
remote sand
rapid sparrow
rapid sparrow
remote sand
#

i am dealing with schrodingers code. when i profile a particular object, memory leak happens during the profiling and nowhere else. when I comment out the profiling function call, leak happens somewhere else in the code.

#

does anyone have suggestions to figure out what the heck is going on

charred heron
#

If I have a GitHub workflow problem, is this the right channel to ask?

willow pagoda
charred heron
willow pagoda
charred heron
#

I tried some workflows generated by ChatGPT, but it all failed…..

willow pagoda
#

sounds like something you can do more simply with a CODEOWNERS file

charred heron
#

Could you help me out?

willow pagoda
#

https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners

Code owners are automatically requested for review when someone opens a pull request that modifies code that they own.
...
To use a CODEOWNERS file, create a new file called CODEOWNERS in the .github/, root, or docs/ directory of the repository, in the branch where you'd like to add the code owners.
...
A CODEOWNERS file uses a pattern that follows most of the same rules used in gitignore files. The pattern is followed by one or more GitHub usernames or team names using the standard @username or @org/team-name format.

rancid schoonerBOT
#

.github/CODEOWNERS line 1

* @thegamecracks```
willow pagoda
#

it says that all files in the repository are owned by me so i'll become a reviewer if a PR touches any of them

charred heron
astral apex
#

Dependabot is failing

#

So I go and look up the latest hashes that DockerHub gives me and bump it myself: impressdesigns/charlie#62

signal cloakBOT
astral apex
#

And... then Dependabot bumps it right back to those same tags that it didn't like again: impressdesigns/charlie#63

signal cloakBOT
astral apex
#

If I try to change the URL to those hashes that Dependabot doesn't like, DockerHub can't seem to find them either

#

I don't understand where Dependabot is getting these hashes from

remote sand
#

how is it possible for gc.get_objects() to leak memory?

twilit forum
heavy knot
#

hey

#

can anyone help me

#

I just joined

viscid marlin
#

With setting up VS code, specifically.

fickle furnace
#

Hey guys, Im a student trying to get openapi-generator-cli working. I beleive I have generated the folders correctly from the .yaml file but I am having issues importing from the generated_client folder. Can someone please assist me ?

rapid sparrow
#

Write always what u made/wrote, what u received and what you expected to receive (with explaining highly preferably for which reason u sought it). Three things for a successful question

fickle furnace
#

ok , I will post more details in my python help request that I created

#

@rapid sparrow If you could check there that would be apprciated

twilit forum
#

I put together an interac tive tool to compare yapf and black. Initially I found 2 examples that yapf formats poorly:

def function_call_with_lists_literals():
    operate_on_lists(([0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09],
                      [0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19],
                      [0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29]))

    do(([0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09],
        [0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19],
        [0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29]))

yapf google style:

def function_call_with_lists_literals():
    operate_on_lists(
        ([0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08,
          0x09], [0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19],
         [0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29]))

    do(([0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08,
         0x09], [0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19],
        [0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29]))

What knobs can I modify to control this? Something like increasing the penalty on splitting the "leaf" lists?

twilit forum
rotund wyvern
#

I'm losing my mind, I'm trying to swap my pip with uv pip but for the life of me, I can't tell where uv installs itself when I use the default install script

#

it feels stupid to do pip install uv -> uv pip install -r requirements.txt

#

i thought it was ~/.cargo/bin

#

but eh

#

/root/.cargo/bin/uv this worked

#

but bleh

gentle solstice
#

I use pipx

rotund wyvern
#

yes but this has it's own install script it's a rust program available on pip for ease of use

undone moat
#

Can you not just alias it? Or is that what you're trying to do?

#

Oh maybe that clobbers weird on the PATH because pip already exists on the path. pithink

#

huh. I mean you can just... remove pip in that case, right?

heavy knot
#

Hey all

tawdry needle
#

sometimes also the install scripts are too aggressive (trying to be helpful) about modifying your shell init scripts

#

i haven't actually used uv yet. does it let you choose which python environment to install into?

#

i'm looking at the --help output and i don't see anything like that

#

for example i have a venv in ~/my-project/venv -- can i tell uv to operate on that venv somehow?

rotund wyvern
#

curl -LsSf https://astral.sh/uv/install.sh | sh

tawdry needle
#

the install script isn't in the git repo πŸ€”

#

let me download it and see what it does

#

i always recommend downloading those install.sh scripts and manually reviewing them before running

#

you never know what silly stuff they might be doing in there

#

i also tend to save them in ~/src, so curl -LSfs 'https://astral.sh/uv/install.sh' -o ~/src/astrall-install_2024-03-14.sh and that way at least i have some record of what i did on my machine

tawdry needle
#

@rotund wyvern it looks like it just uses your usual cargo settings

#

so check $CARGO_HOME, or ~/.cargo if you don't have CARGO_HOME set

rotund wyvern
#

on my system, i use brew

gentle solstice
#

The install link is a redirect to github releases

#
$ curl https://astral.sh/uv/install.sh -s --head | grep location
location: https://github.com/astral-sh/uv/releases/latest/download/uv-installer.sh
rotund wyvern
#

thats the installer, im looking for the actual uv executable lol

#

but i think it's ~/.cargo

gentle solstice
#

yeah, ~/.cargo/bin unless you set $CARGO_HOME

rotund wyvern
#

ohhhhhh

#

that's handy did not realize

brave knoll
#

Just doing some side projects at work, i usually use macos, but for this ill use Windows with WSL2. What is the best way to manage my python envrionment?

#

Couple users will run this code, max.

gentle solstice
#

Same way as macos. Pyenv

brave knoll
#

ty

gentle solstice
#

Python tooling doesn't really change between platforms

#

Just don't use the system python and you'll be fine

rotund wyvern
brave knoll
#

I got it working just fine but wondered if I was doing something odd, I don't keep up much with new tooling

#

so there's a danger I was 10 years out of date or something πŸ˜„

gentle solstice
#

or use the virtualenv version

#

python3-virtualenv

#

If you're using the latest non-lts ubuntu, you can also install pipx

brave knoll
#

legend thanks x

#

saved me some googling

placid nacelle
remote sand
#

I have a couple of Docker images that have 3 separate stages, which I build through 3 Dockerfiles. I choose each stage from two or three possible Dockerfiles. When I modify one of the lower Dockerfiles, I'd need all inheritances to automatically rebuild. Any tool that could help me manage this, how do I just bash?

rapid sparrow
# remote sand I have a couple of Docker images that have 3 separate stages, which I build thro...

Docker has multi staging building
Here is example of complex one
https://github.com/darklab8/infra-game-servers/blob/master/Dockerfile

FROM golang:1.21-bullseye as build

RUN apt update
RUN apt install -y build-essential
RUN apt-get install ca-certificates -y
RUN gcc --version

WORKDIR /code

COPY go.mod go.sum ./
RUN go mod download -x

COPY bot bot

FROM build as minecrafter-build
RUN CGO_ENABLED=0 go build -v -o main bot/minecrafter/main.go

FROM build as avorioner-build
RUN CGO_ENABLED=0 go build -v -o main bot/avorioner/main.go

FROM docker:24.0.7-cli as runner
WORKDIR /code
COPY --from=build /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
CMD ./main run

FROM runner as minecrafter-runner
COPY --from=minecrafter-build /code/main main

FROM runner as avorioner-runner
COPY --from=avorioner-build /code/main main

Each time when i declare FROM another_image as name
it is already another stage

#

depending on supplied target argument during building, it will build specific stage
docker build --tag darkwind8/${repo}:${tag_version} --target ${repo}-runner .

remote sand
#

hm I see, thanks for the input!

tawdry needle
#

multi-stage builds are great, they're under-used imo

remote sand
#

hm yeah, but I wish I could use another Dockerfile without building it first

#

would save me some disk space

remote sand
#

hm, how do I keep a container running after interrupting its entrypoint?

rapid sparrow
remote sand
#

i need to get the output of memray from the container's FS

#

i could set /bin/sh as the entrypoint and run memray manually but i'd like to automate this

rapid sparrow
rapid sparrow
true lake
#

Are there any tools that can convert python code into flowchart

remote sand
#

even if we use -itd

rapid sparrow
remote sand
#

docker build -t imagename -f dockerfile_name .

#

docker run -it -d imagename

#

docker attach container_name then C^

rapid sparrow
# remote sand `docker attach container_name` then `C^`

use docker exec for interacting without disrupting
docker attach is special one attaching to main process. to prevetn disrupting u need using special escape syntax Ctrl-p Ctrl-q for exit or disabling sigkill forwarding (--sig-proxy=false` option

rapid sparrow
remote sand
rapid sparrow
#

docker containers aren't meant to be run after interrupted in their main process by design

#

you can override it, but why would u wish doing that

#

apply restart policy always or smth for after reboot

remote sand
#

need valgrind file output heheh

rapid sparrow
#

just forward volume

#

where it contains to disk

#

it will output regardless of container exit/dstruction

remote sand
#

with -v you mean?

rapid sparrow
#

-v path_at_host:path_in_container

remote sand
#

oh i see, will try that ty!

rapid sparrow
#

docker-compose supports relative paths

true lake
#

is there a tool that converts python into flowchart?

twilit forum
remote sand
#

so

#

finding the dependencies for stuff, when you need to build from source, is an absolute pain

#

solution 1: try to find a gentoo package that has the USE flag you need, and build it in a container

#

if that's not possible, solution 2: make a nix flake that modifies an existing package with the build options you need

#

otherwise, freestyle like we've always been doing

#

is there no better way to do it?

rapid sparrow
remote sand
#

most docker images just contain the entire thing without specific options for build options

rapid sparrow
rapid sparrow
#

I could be aiming for small sized images and using Alpine alternatively. Works well with compiling langs like Golang. The only other OS i use
In other cases i prefer just using Debian in order to be not having headaches (Python better works with Deb)

remote sand
rapid sparrow
remote sand
#

third: build python with --with-debug

remote sand
#

you change the C internals of CPython

#

so that you can record what it is doing

rapid sparrow
#

ergh, you are more expert on this topic then. Never needed this stuff.
All my memory problems are resolved with setting properly Soft/Hard memory limits to running containers

#

Well, once i debugged memory problems in Golang though, it was my personal project and i did not wish it to leak, but otherwise neever needed taking care of it πŸ€”

remote sand
#

what libraries/frameworks would you guys suggest to manage and automate the following workflow?

  1. start an instance on either AWS or GCP
  2. start container with specific context + dockerfile
  3. save run information/logs
  4. close instance on AWS or GCP
rapid sparrow
rapid sparrow
remote sand
#

that's why I need cross cloud solution

rapid sparrow
#

Well, i can say for sure we would be using for step 2 docker-compose to run it

#
version: '3.8'
services:
  postgres:
    image: postgres:15.5
    expose:
      - "5432"
    environment:
      POSTGRES_USER: myusername
      POSTGRES_PASSWORD: password
      POSTGRES_DB: mydbname
    healthcheck:
      test: pg_isready --username=myusername --dbname=mydbname
      interval: 5s
      timeout: 5s
      retries: 10
  task:
    build: .
    environment:
      POSTGRES_HOST: postgres
      MARIADB_HOST: mariadb
      MYSQL_HOST: mysql
      POSTGRES_PORT: "5432"
      MARIADB_PORT: "3306"
      MYSQL_PORT: "3306"
      AWS_CONFIG_FILE: /code/config
    working_dir: /code
    volumes:
      - ".:/code"
    entrypoint: task
    depends_on:
      postgres:
        condition: service_healthy

like this probably

remote sand
#

i think in general the solution might be something like terraform+ansible

remote sand
rapid sparrow
# remote sand hm very nice, for multi-container app

in such usage case running CI is simple like this

name: CI

on:
  pull_request: {}
  workflow_call: {}

concurrency:
  group: ${{ github.ref }}
  cancel-in-progress: true

jobs:
  unit-tests:
    runs-on: [self-hosted, linux, x64]
    name: Tests
    steps:
      - uses: actions/checkout@v2
      - uses: webiny/action-post-run@2.0.1
        with:
          run: docker-compose -f docker-compose.test.yml -p ${{ github.run_id }} down --volumes --rmi local --remove-orphans
      - name: Raise database containers
        run: docker-compose -f docker-compose.test.yml -p ${{ github.run_id }} run task check
      - name: Run mypy
        run: docker-compose -f docker-compose.test.yml -p ${{ github.run_id }} run task mypy
      - name: Run tests
        run: docker-compose -f docker-compose.test.yml -p ${{ github.run_id }} run task pytest

healthchecks ensure database is healthy for task executions

#

u could put same stuff into Ansible

#

it has docker-compose module

remote sand
rapid sparrow
remote sand
#

yeah I really need to get into github actions, it looks like it does a lot of automation

rapid sparrow
# remote sand yeah I really need to get into github actions, it looks like it does a lot of au...

Ansible has similar syntax for delayed job to run always after playbook
Github Actions does it with

      - uses: actions/checkout@v2
      - uses: webiny/action-post-run@2.0.1
        with:
          run: docker-compose -f docker-compose.test.yml -p ${{ github.run_id }} down --volumes --rmi local --remove-orphans

Ansible does the same with... ergh... forgot the name.. Handler? something is triggered in ansible to run after playbook

remote sand
#

hm I see

#

thanks a lot for the suggestions highly appreciated

#

the part i'm currently wondering about is whether anyone has come up with a cross-cloud instance starting or scheduling framework

rapid sparrow
#

it can run slightly different instructions depending on OS type or any other information it Gathered during playbook start from OS

#

So, i certainly agree with doing it with Ansible in such requirements

slate marten
#

hi, can someone help me with selenium webdriver? having some problems

remote sand
#

you guys do a lot of cloud work?

#

it's completely different than anything I worked with before

#

i just don't want to get locked into using a single cloud service

rapid sparrow
# remote sand you guys do a lot of cloud work?

last 2 years spent in AWS with Terraform, running stuff in AWS ECS container scheduling system for immutable deployments. We have nice custom deployment system, and do everything with Github Actions (after migrated from previous CI system hehe)
Recently started migrations towards kubernetes for more cloud agnostic solution, because we need to run stuff in not only AWS

remote sand
#

really interesting stuff

rapid sparrow
# remote sand am slowly working towards kubernetes atm

that i do too. In company we just do Kubernetes with Terraform Kubernetes provider. It is okay.
We plan to go for ArgoCD later and more kube native approach... I do that in homelab and enjoy using ArgoCD in pair with Cue language.
It is really strong language offering code quality not lower than Terraform one. Very good usable with ecosystem of kube solutions.
Its killer feature, tight integration with golang and ability to import types for config writing from Golang structs. So it just imports types for configs if u choose it, from Kubernetes official libs (the Cue gives u freedom to install whatever dependencies u wish and import from anything)

#

I slowly rework my homelab towards this ArgoCD + Cue setup. made sure ArgoCD to work with Cue too.

#

also Cue can easily plublish reusable code between repositories, just by publishing Git tag. because it abuses Golang dependency management system

remote sand
#

woah this ArgoCD stuff looks cool, haven't heard of it before am looking at docs

rapid sparrow
#

So i am going to have a lot of reusable between repositories, autovalidated kuber code

rapid sparrow
# remote sand woah this ArgoCD stuff looks cool, haven't heard of it before am looking at docs

yeah, it is very easy to use and getting started. Helps to organize and autodeploy, auto sync all different kuber code, be it manifests, helm, jsonnet, or any other custom language like Cue.
It has really nice comfort GUI interface which u don'n't need to click at all if u wish, or u can press just one button to resync.

Kube community is divded between ArgoCD and Flux solutions for this
(Flux is interesting to check its docs too, its documentation contains a lot of generic solutions/patterns both usable for Argo and Flux how to solve common problems like getting secrets out of repo https://fluxcd.io/flux/security/secrets-management/ without git commiting them )

remote sand
rapid sparrow
#

i don't like Yaml.

#

looks cursed to me to have zero static typing auto validations

remote sand
#

imo somewhat better than json lol

#

i wish there was more toml use

rapid sparrow
#

at best i can agree reuse ready to use Yaml solutions like in Github actions and its market

#

makes life very simply when your workflow just depends on already made open source solutions from Market of community

#

in this case Yaml is okay. As long as i am not the one maintaing it basically

#

for my own custom stuff i will prefer better way to write stuff

#

Yay to Cue https://cuelang.org/ for config management and yaml generation!

#

and to terraform opentofu (terraform kubernetes provider is okay)

remote sand
#

hm will look up cue, have not heard of it before

rapid sparrow
#

really tight integrated with Golang

#

i enjoy so far very much its usage, because i can write infra/yaml code that can scale

#

and i can reuse different variables, or even having just reuse entire different yaml parts, all in static typed way. This is good

#

I enjoy code quality with Terraform for infra code, because i have static types, all the auto validations and code reusage. Why not to have same with yaml ^_^

rapid sparrow
#

it does not require any server side installed. As long as u have kubectl access, it will work

#

easy status searching over all contexts, namespaces, resources, or entering pods for shell debug, or port forwarding and etc.

remote sand
remote sand
#

very nice tui aesthetics hehe

rapid sparrow
sudden sundial
twilit forum
twilit forum
lethal stump
#

For virtual environments, is using mamba a better idea compared to say pipenv or venv?

#

Ik conda is extremely slow so I've been trying mamba and it seems fine rn, was wondering if it was a good idea

thorny shell
#

I don't use conda and have never heard of mamba. Given that: I'd avoid mamba simply because I've never heard of it. Most new things are bad.

lethal stump
lethal stump
loud bear
lethal stump
#

like one env with python 2.7

#

one with 3.8

#

one with 3.12 etc

loud bear
#

You can do that with venv

lethal stump
#

You can?

loud bear
#

Just invoke venv with the correct python version

#

Yep

lethal stump
#

it'd be venv python=2.7 etc?

thorny shell
#

no

loud bear
#

Like py -3.8 venv .
would create a venv with python 3.8

thorny shell
#

/usr/bin/python3 -m venv .venv-3

#

/usr/bin/python2 -m venv .venv-2

#

&c

mellow briarBOT
#
Command not found

Command "c" is not found

lethal stump
#

and py -2.7 venv would work?

thorny shell
#

I doubt it

loud bear
#

it would probably but why are you even bothering with 2.7

thorny shell
#

but py -2.7 -m venv .venv-2.7 probably would

loud bear
#

it eol'd long ago

lethal stump
#

google foobar

#

in this case

loud bear
#

foobar?

#

as in the audio player?

lethal stump
#

the google interview challenge

loud bear
#

it requires python 2.7?

lethal stump
#

Sadly

#

I much prefer to use 3.10+

loud bear
#

indeed

#

Its sad

lethal stump
#

Never understood the old version requirements for these anyways

loud bear
#

which era is google living in

lethal stump
#

Apparently the 2000s

#

like f-strings and match-case are goated tbh

#

I've also heard about poetry but idk if that's any good

lethal stump
thorny shell
#

🀷

#

habit

#

no particularly good reason

lethal stump
#

fair

thorny shell
#

perhaps it's a reminder to myself to not add that folder to the git repo

lethal stump
#

good point

tawdry needle
#

another option could be something like .local/python if you're in a repo with a bunch of "tools" installed (uncommon but not impossible)

loud bear
#

everything just works magically on linux anyways

lethal stump
#

weird

lethal stump
lethal stump
# thorny shell `/usr/bin/python3 -m venv .venv-3`
❯ py -2.7 -m venv .venv
Unknown option: -2
usage: python [option] ... [-c cmd | -m mod | file | -] [arg] ...
Try `python -h' for more information.

~/test
❯ py -3.8 -m venv
Unknown option: -3
usage: python [option] ... [-c cmd | -m mod | file | -] [arg] ...
Try `python -h' for more information.
#
❯ py --version
Python 3.11.8
#

Maybe that's for Windows

tawdry needle
#

on other systems use the python executable directly

lethal stump
#

it's the invalid flag

tawdry summit
#

Hello I started learning docker recently however I have no idea why application can't find playwright Firefox if it's installed in root but installing it after switching to non root works:

# Stage 1: Build
FROM python:3.11-slim as builder

WORKDIR /app

# Copy requirements.txt
COPY requirements.txt .

# Install dependencies
RUN pip install --no-cache-dir -r requirements.txt

# Copy app
COPY app app

# Stage 2: Production
FROM python:3.11-slim as production

WORKDIR /app

# Copy installed modules from the builder stage
COPY --from=builder /usr/local/lib/python3.11/site-packages /usr/local/lib/python3.11/site-packages

# install playwright dependencies
RUN python -m playwright install-deps && \
    # Clean up
    rm -f /usr/lib/x86_64-linux-gnu/libmfxhw* /usr/lib/x86_64-linux-gnu/mfx/* && \
    # Create non-root user
    useradd --home-dir /app --shell /bin/sh zaws && \
    chown -R zaws:zaws .

# Switch to non-root user
USER zaws

# install firefox inside non-root
RUN python -m playwright install firefox

# Copy application code from the builder stage
COPY --from=builder /app /app

# Run application
CMD ["python", "app/main.py"]
tawdry summit
#

Yesh, figured you need to give the user permission to access

remote sand
#

docker exec ... /bin/sh and figure out why the command fails

gentle solstice
#

fyi python docker has bash

fervent ravine
#

Anybody know any communities about OCR, particularly tesseract-ocr? Discord server would be nice, but any community I'll be thankful πŸ™‚

civic granite
#

i need some help becouse i cant open my tool

twilit forum
twilit forum
remote sand
#

what's something that works like kubernetes but for orchestration of vms instead of containers?

rapid sparrow
remote sand
#

this is great

#

ty

amber turtle
#

im getting a strange error

#

so this is my code

from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.common import NoSuchElementException, ElementNotInteractableException
from selenium.webdriver.support.wait import WebDriverWait
from random import choice
from data import *

option = webdriver.ChromeOptions()
#option.add_argument("-incognito")
#option.add_argument("--headless")

browser = webdriver.Chrome(options=option)

browser.get("FORM URL REDACTED")

textboxes = browser.find_elements(By.CLASS_NAME, "rFrNMe k3kHxc RdH0ib yqQS1 zKHdkd")
submitbutton = browser.find_elements(By.CLASS_NAME, "uArJ5e UQuaGc Y5sE8d VkkpIf QvWxOd M9Bg4d")

# browser.implicitly_wait(2)
# wait = WebDriverWait(browser, timeout=2)
# wait.until(lambda d : textboxes[0].is_displayed())

for student in students:
    textboxes[0].send_keys("NAME")
    textboxes[1].send_keys("EMAIL REDACTED")
    textboxes[2].send_keys(student[1])
    textboxes[3].send_keys(student[0])
    textboxes[4].send_keys(choice(nice_messages))

    submitbutton[0].click()

browser.close()
#

no matter what i try with waits

#

different By

#

it tells me that textboxes[0] is out of range, or simply, it doesnt exist

#

but it clearly does

#

pls ping when responding

remote sand
#

are google cloud instances billed by compute or by up-time, specifically for CPU usage?

#

I know it is by up-time for disk space

rapid sparrow
kindred moss
#

hey i want to setup pytest that it calls ruff and mypy in the src dir but when i have it in my pyproject.toml it doesnt like it

[tool.mypy]
strict = true
mypy_path = "src"

[tool.ruff]
line-length = 120
indent-width = 4

[tool.ruff.lint]
select = ["E","F","I"]

[tool.ruff.format]
quote-style = "double"


[tool.pytest.ini_options]
addopts = """
    --mypy
    --ruff
    """

rapid sparrow
kindred moss
#

i mean yes but i think it is a build in function already for the pytest so no need foe another plugin

gentle solstice
#

you can also use pdm. ```toml
[tool.pdm.scripts]
test.composite = [
"mypy",
"ruff",
"pytest",
]

#

I like to do this with it. ```toml
[tool.pdm.scripts]
dev = "uvicorn app:app --reload"

remote sand
#

when is ansible not enough for workflow orchestration? i.e. when should you move from ansible to something like n8n

tawdry needle
terse ledge
#

Why does it say theres no module name for requests? Also im making a script tool that checks if i have any missing assignments.

import requests
from bs4 import BeautifulSoup


url = ''


response = requests.get(url)

soup = BeautifulSoup(response.text, 'html.parser')


assignments = soup.find_all('div', class_='assignment')


for assignment in assignments:
   
    assignment_name = assignment.find('div', class_='assignment_name').text.strip()
    due_date = assignment.find('div', class_='due_date').text.strip()

    
    if 'missing' in assignment_name.lower():
        print(f"Missing Assignment: {assignment_name} (Due: {due_date})")

visual oxide
remote sand
#

if i have a cluster that has a CI/CD workload usually but I want periodically to add non-CI/CD related workloads, what can I use to orchestrate this? schedule/prioritizing/queue/requeue/etc.

slim maple
#

Like k8s

remote sand
rapid sparrow
#

you could describe better what is your infrastructure setup

#

and what kind of non CI CD related workload u wish to run

proper bobcat
#

uh yo
i'm not sure this is the right channel to ask about this but i'm trying to developp a keylogger for fun

i have this code for now

import pynput,os,time,subprocess
from pynput.keyboard import Key, Listener
  
keys = []

def on_press(key):
    keys.append(key)
      
def on_release(key):
    if key == Key.esc:
        return False
    
def write_file(keys):
    with open('assets\log.txt','w') as log:
        for key in keys:
            log.write(str(key).replace("'", ""))

listener = Listener(on_press=on_press,on_release=on_release)
listener.start()

time.sleep(7)

subprocess.run(['Rundll32.exe','user32.dll,LockWorkStation'])

time.sleep(7)
write_file(keys)

the problem is it doesn,t work inside the password field
any ideas ?

thorny shell
#

My idea: nobody will help you with a key logger

heavy knot
#

Can someone help me with creating the code to access the tool?

old glade
#

What is meaning of DevOPS term.

thorny shell
#

it's pretty vague

#

it means something like "both writing code, and doing all the other crap you need to do to get it to automatically deploy and run once you push to your main branch"

rapid sparrow
# old glade What is meaning of DevOPS term.

It has two meanings

Original one, meaning cultural shift towards better development workflows processes. Nobody uses this one any longer

And usually it means today, infra devs that write infra code to automate deployment procedures. They keep as infra code fully replicated configuration from zero to raise everything, keeping all infra configurations documented as a code and versioned via git as normal development.
Tldr, DevOps is about people caring about maintaince/running of projects, with having for that infra, scaling, monitoring systems, security and etc configured via their Infrastructure as a Code

#

Usually they are responsible for CI CD pipeline
And will provide in one way or another means to debug/migrate and etc issues in already running environments

rapid sparrow
#

and they can be even pure 100% Ops under the hood, which usually means it is actually System Administrator job instead of DevOps actually technically

#

Regular instruments wielded by them: Shell/bash, some programming full language (at least one scripting usually), Docker, CI, infrastructure instruments from Salt, Puppet and Ansible
Towards Terraform, Pulumi, being able to solve issues with AWS, GCP, Azure and also capable to do Kubernetes with its ecosystem of stuff
Well, also every DevOps person is able to wield 1 or more monitoring stacks usually

old glade
#

Yep I Underatand.

hybrid ruin
proper bobcat
lime frost
#

I read that cProfile doesn't support threads. Anything I should keep in mind due to this?
Like instances where I wouldn't expect this to matter but it does?

lime frost
#

For example I don't think it's profiling cython code, and I don't understand why

lime frost
heavy knot
#

ERROR: The Compose file './docker-compose.yml' is invalid because:
services.dev_db.expose is invalid: should be of the format 'PORT[/PROTOCOL]'
services.dev_db.ports contains an invalid type, it should be a number, or an object

someone can help me plz

thorny shell
rapid sparrow
twin ore
#

Let's say I run ruff-lsp. How do I communicate with it?

brazen forge
brazen forge
twin ore
#

pygls.. oh dear

#

I'm trying the lsp specification in the io

rancid schoonerBOT
#

ruff_lsp/server.py line 2028

LSP_SERVER.start_io()```
twin ore
#

mm

#

i was going to setup a ruff check --output-format=json server in another process and communicate with it

brazen forge
#

that's a way too

twin ore
#

but im hoping this'll be easier

brazen forge
#

having the server already running saves on startup and shutdown time

twin ore
#

sigh setting params as "{...}" doesnt not help understanding whats supposed to go in the ellipses

#

I love chatgpt

twilit sapphire
#

hi everyone. my team and i are building a python tool and i'm looking for any devs willing to help us with a short usability test. if you're interested, please answer here or dm me! πŸ™‚

jovial wing
#

People in the python community tend to complain a lot I generally find, about the state of package/environment management in python

#

I'm curious what people feel the main issues are, and how many have tried (or even heard of) micromamba.

#

was thining about writing a blog post trying to get more people aware of micromamba, and then recently I read a blog post that came up on /r/programming that made me want to write the blog post more πŸ˜›

rapid sparrow
jovial wing
#

what does "link correct files in" mean? I don't recall ever doing something like that

rapid sparrow
jovial wing
#

i don't understand, is this something you're talking about doing as a package distributor

#

I've never had to do this while using pip, or micromamba

rapid sparrow
#

Right it is messy

#

I am navigating between just using requirements+ constraints
And
Pipenv and Poetry using for advanced management

#

Ergh they do work

jovial wing
rapid sparrow
#

Both advanced painful because at scale they take large time to do any action, installing extra package, updating single thing or whatever takes at least a minute(or many minutes) for me (for lock rebuilds usually)

rapid sparrow
#

!rule 6 , <@&831776746206265384>

rancid schoonerBOT
#

6. Do not post unapproved advertising.

jovial wing
#

like in base micromamba, for whatever reason, they don't seem to handle regenerating lock files directly.
but it's a trivial thing to do; you just create a dry run environment from your dependencies file and dump the output

rapid sparrow
jovial wing
#

the solver is probably an issue where micromamba would have an edge as their solver is written in C++ and supposed to be very fast

#

sure

#

I'm saying that the "auto" part doesn't seem that important to me. Like, I have a dependencies file, I have a lockfile, if I change the dependencies file, I just rerun a script with a few lines in it that regenerates the lock file.

#

(and then typically commit the result)

#

like does "auto" just mean it's one command instead of 2-3?

rapid sparrow
jovial wing
#

okay, sure

#

anyway, fwiw, micromamba's solver is much much faster AFAIK so maybe you would enjoy that

rapid sparrow
#

Pipenv upgrade feature exists for that

jovial wing
#

The best practice way to "micro upgrade" is ot have a dependencies file where you can, if you choose, lock dependencies that you want to have very tight control over, and otherwise you simply do frequent updates to the lock file

rapid sparrow
jovial wing
#

if the dependencies file doesn't change and you upgrade it relatively frequently the changes will be very tiny in any case

#

interesting. I mean I admit I don't really see much value in that for typical workflow; I could see how it might be convenient in an emergency

rapid sparrow
jovial wing
#

like you're saying if you haven't upgraded for 10 years, and now you want to start?

#

Sure, but in my view the way to do that typically would be to lock versions in your dependency file

#

the ones you care about the most, or partially lock things (i.e. lock the major and minor but not patch, or lock the major only)

#

and then re-solve the environment

rapid sparrow
jovial wing
#

if it's been abandoned then anyway there will be no new releases, so I don't see the issue...

rapid sparrow
#

Suck updates are things usually... Delegated to juniors or smth. Kind of trivial yet annoying thing to do

#

Updating major deps at large code bases is a separate task to chase all bugs

rapid sparrow
jovial wing
#

okay, sorry, just a bit hard to understand :-). I think my appraoch to SDLC is pretty different though.

rapid sparrow
#

At small scale everything I mentioned is not an issue
Fine to regenerate always

jovial wing
#

lol

#

I've been working at a company of hundreds of devs for over 10 years, I have a dependencies file here with over 100 entries just for my team of 10 people, which gets combined with a wider scale dependenciles file

#

my lock file has 600+ packages. I've been involved in maintaining combined C++ and python environments, and plugins, for a good chunk of that time

#

Maybe the opposite true, and your workflows work well at your scale, but wouldn't work well at this one? πŸ˜‰
Or maybe we just have different approaches shaped by different companies, different priorities, etc

#

there's many possibilities

jovial wing
#

it's horrific that I'm building software at a good sized scale and I have a package manager that still works well there?

#

I feel like your reaction should be opposite πŸ™‚

rapid sparrow
jovial wing
#

I mean... lol?

#

first you tried to lecture me because I wasn't on your scale (so you thought), now I have too many dependencies so it's bad as well?
Anyway, good talk, i guess

rapid sparrow
#

I am too lazy to argue with such statement. ^_^

gentle solstice
#

Did you know dokku plugins doesn't support updating when the plugin didn't have a master branch?
dokku/plugn#71
dokku/plugn#141

gentle solstice
#

only took 2 years for me to notice it and fix it.

zenith goblet
#

Hii anyone has worked with flowise ai?

paper moss
undone moat
paper moss
undone moat
#

I'm optimistic, but it's going to be awhile before I pull away from my current tooling. They've done a great job with Ruff so far, so hopefully they hold that momentum.

proper bobcat
#

hello quick question
why isn't the time updating when this program writes the log file ?

from pynput.keyboard import Key, Listener
from datetime import datetime

keys = []


hotkey = {Key.ctrl_l,Key.ctrl_r,Key.shift_r}
current = set()

def on_press(key):
    keys.append(key)
    write_file(keys)
    if key in hotkey:
        current.add(key)
        if all(k in current for k in hotkey):
            listener.stop()
            startfile(r"assets\keys.txt")

def on_release(key):
    try:
        current.remove(key)
    except KeyError:
        pass

def write_file(keys):
    date=datetime.now()
    with open(r'assets\keys.txt','w') as log:
        for key in keys:
            print(date)
            log.write(date.strftime("%d/%m/%Y %H:%M:%S") + ': '+str(key).replace("'", "")+'\n')

with Listener(on_press = on_press,on_release=on_release) as listener:        
    listener.join()

It always uses the time of the first start of the program but the print always updates for some reason

#

(in the write_file function)

#

I've tried everything but i can't figure out a way to make it update

merry ivy
#

I dont know it is the right channel for this question but I try πŸ™‚ If I create a venv for python with the distribution installed (RHEL) python, should it "see" all the other python packages installed with paket manager of the distribution or do I need to do something more?

gentle solstice
paper moss
#

I think Rust Will improve the poor of Python and between the two they are going to make a superlanguage.

paper moss
merry ivy
#

sorry if I want

#

πŸ™‚

gentle solstice
#

python3 -m venv --system-site-packages .venv

#

see python3 -m venv --help

merry ivy
#

hmm done so but it still downloads libs they are already there :/ (urllib3, requests)

merry ivy
#

aa hmmm I see... the module what I want to install does need newer versions of them...

heavy knot
heavy knot
#

To cracking

toxic bough
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.

toxic bough
#

We're not going to help you with... whatever that is

junior fiber
#

i have a quick question about github

#

I’m trying to double check if this is right or not

Check all that apply. GitHub provides...

A location to host Git repositories
Collaboration tools such as threaded discussions (issues) and code reviews
A Web-based graphical interface
Git software on your local machine

I put the first 3 but i’m not sure if that’s right, if not, can someone explain

fleet pelican
#

Hi, been using github desktop with no issues. Recently our co-op student did something in the command-line and the desktop app has been showing this. Still works fine, pushes and pulls but always thinks there are a ridiculous number of commits to push when there aren't. Haven't found a way to fix it

thin finch
#

hello. does anyone know the lib AWS Python Power Tools?

jovial wing
#
  • standalone, statically linked executable as the package manager: check
  • dependency solver written in a high performance native language: check
#

micromamba has the additional massive benefit of also handling native depenencies of python packages, of which there are many.
so if the uv featureset seems interesting to you, rather than wait I'd just try micromamba

paper moss
brazen forge
#

hmmm, you could get the changed files using git status --porcelain

#

no need to wonder
there are docs

#

after the first checkout step, you can get a list of the files added/modified/deleted using that git command

#

then you can pass those to your s3 sync action

dense solstice
#

Hi, I came across a new module called cruft & I was wondering how it's different from cookiecutter. I mean why people are using it ?

tawdry needle
# dense solstice Hi, I came across a new module called `cruft` & I was wondering how it's differe...

cruft is different. It automates the creation of new projects like the others, but then it also helps you to manage the boilerplate through the life of the project. cruft makes sure your code stays in-sync with the template it came from for you.
https://pypi.org/project/cruft/

dense solstice
civic grove
#

does anyone have or know of a simple example for a python web app with autodeployment and autorun to a digitalocean droplet from a github repo?

indigo zenith
remote sand
#

are there approaches to UI testing in a CI/CD pipeline?

#

any work done on automated UI testing?

#

if anyone has any reading recs it would be highly appreciated

twilit forum
turbid wind
#

Sorry if this is the wrong channel for this.

I'm trying to specify a specific .env file to be imported and I'm having a bit of trouble. I've looked at load_dotenv and os.environ and maybe I've just missed it, but they don't seem to be doing what I want.

I have a file that needs to access a credentials .env in the directory up a level, so ../.env. What should I do to handle that?

#

I could just read the file like it were anything else, but that feels kinda wrong.

thorny shell
#

load_dotenv should work -- at least, if you're getting it from the right library. Ask in #1035199133436354600 and post your complete code as text.

crimson rune
#

Can Some one explain to me what is this, Difference between the green line and blue line

deep estuary
#

green is views, that is just people loading your page in their browser, unique visitors is how many different people make up that views figure

#

i.e. you could have 10 views (green line), that could be 6 views from one person and 4 from another, hence you have 2 unique visitors (blue line)

pallid jacinth
#

hi

keen socket
#

We have a deployment process for our application. Here's an example

A developer makes changes (let's call them C1, C2, and C3) and submits a pull request (PR).
Another developer reviews the PR and approves it.
The changes are merged into the main branch
The entire main branch, including C1, C2, and C3, is deployed to a staging environment for testing.
The QA team tests C1 and C2 in staging but finds some issue in C3 or some delays in testing C3.
The problem is, by the time C1 and C2 are tested and ready to go live, customers are pressuring us to deploy them. But we can't deploy just C1 and C2 because C3 is still in testing. This creates delays and sometimes even leads to accidentally deploying non-QA'ed code (C3) which can cause issues.

We're looking for ways to deploy approved changes (C1 & C2) faster without having to wait for everything else in the staging environment (C3). What are some strategies we can use to achieve this?

Are there ways to deploy C1 and C2 independently, even though they're currently bundled with C3 in staging?
What are some pros and cons of different approaches we could take?
By understanding the options available, we can choose the best strategy to improve our deployment process, reduce delays, and avoid accidental deployments.

We are using the release-please github action from google (https://github.com/google-github-actions/release-please-action)

GitHub

automated releases based on conventional commits. Contribute to google-github-actions/release-please-action development by creating an account on GitHub.

twilit forum
#

I've never released anything. What does it mean in your case, building and make an artifact available for public download? I would suspect you just pick a commit to release?

#

But other things to think about:

  • Can you make testing faster?
  • Can you test c1, c2 and C3 in parallel?
  • Could you have an unstable release for customers that are really hurried?
rapid sparrow
#

What is dissadvantage? πŸ€” slightly more complicated infra setup πŸ˜…

#
  1. Also when i need to deploy hotfix, i just make builds with cherry picking necessary for me changes in order to by pass all the other not checked changes
#

this method usually requires... more intimate deployment knowledge bypassing normal procedures. U could make it somehow standartized though

#

What are some pros and cons of different approaches we could take?
i can't offer you a bit variaety of choices to choose from, hehe.

keen socket
#

I am working in the web domain. so release in my case means deploying the web application on a Kubernetes cluster. It's a pretty big project with somewhere around 30 microservices. maintaining an extra enviroment is more pain and more expensive.

  • One of the strategies that i have seen companies use is Feature flags. Having flags for each feature and turning it on and off as needed. Rollback is just turing off a feature flag.

But what i am looking for is a more clean method. so that no unnecessary code is pushed to production environment.

@twilit forum @rapid sparrow

rapid sparrow
#

they reuse same cluster, databases, postgres, redis and etc for it

#

just different raised containers

keen socket
#

@rapid sparrow
You mean multiple pods (app instances) running on the same cluster but different versions ?

rapid sparrow
#

with different sets of env variables and reflecting different Repository branch

#

more than that, we reuse even same databases for them ^_^

keen socket
#

Unless you make sure you don't add backward incompatible DB migrations of course πŸ˜„

twilit forum
#

Question: why you can tag branch for release and not just any vommit commit?

#

@keen socket

#

But also, how long does it take to test C3 in your scenario? And do you need to test C3 separately or can you test on the top of the branch (with all of C1+C2+C3)?

tawdry needle
twilit forum
#

Oh, I guess "QA team in staging environment" means there is manual (time consuming) testing involved here?

tawdry needle
#

We have 2 test envs and 2 QA envs

#

Also make sure that devs can run the app and tests locally, to significantly cut down on competing for env deployment time

#

You're always somewhat bottlenecked by QA needing a live environment to work in though

twilit forum
#

What kind of things are QA doing? Testing that is difficult to automate?

#

Is it more of "final product testing on a real environmental"?

tawdry needle
#

QA testers have product requirements and check that those requirements are met by physically interacting with the application in a realistic environment

twilit forum
#

I see, I'm "blessed" to have basically no customers and only automated tests πŸ˜…

ionic wadi
#

this isn't python, but it is related to git:

#
--- stderr
  CMake Deprecation Warning at CMakeLists.txt:1 (cmake_minimum_required):
    Compatibility with CMake < 3.5 will be removed from a future version of
    CMake.

    Update the VERSION argument <min> value or use a ...<max> suffix to tell
    CMake that the project does not need compatibility with older versions.


  CMake Error at simd/CMakeLists.txt:52 (enable_language):
    No CMAKE_ASM_NASM_COMPILER could be found.

    Tell CMake where to find the compiler by setting either the environment
    variable "ASM_NASM" or the CMake cache entry CMAKE_ASM_NASM_COMPILER to the
    full path to the compiler, or to the compiler name if it is in the PATH.


  thread 'main' panicked at /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/cmake-0.1.50/src/lib.rs:1098:5:

  command did not execute successfully, got: exit status: 1

  build script failed, must exit now
#

this build failed on github actions

#

the build step is probably unnecassary since this is a package, and not a binary/app. should I just exclude the build step and only have tests?

ionic wadi
#

nvm i can add NASM in actions

slim maple
keen socket
feral rapids
#

Is there anyone who has knowledge of theory of machines (knows about the kinematic systems like crank mechanism, yoke mechanism etc.) I'm trying to calculate a spesific system using the dynpy python library, calculate acceleration, displacement and velocity and plot them. Would anybody be able to help on this?

remote sand
rapid sparrow
remote sand
rapid sparrow
#

I would not recommend using it in python without strict mypy

#

If using without it, then just using regular can work as well

#

Also having it as fully fledged code we can write proper unit tests runnable locally!

#

That can be very awesome 😎

junior lake
#

idk if this the right categorie for it but someone understand this: ?

brazen forge
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.

placid venture
#

Is there anybody here that has used Osintgram? and knows whether or not there are any other up to date OSINT tools for instagram that might be available?

astral apex
deep estuary
#

I would follow the SO answer that suggests just mounting it on the host and then mounting it in the container

#

that is what I have done before with exactly this, a CIFS mount

#

i just put it in the fstab of the container host and then mount that into the containers

brazen forge
astral apex
heavy knot
#

RuntimeError: PermissionError: [WinError 5] Access is denied: 'C:\Program Files\WindowsApps\Microsoft.MinecraftUWP_1.20.7301.0_x64__8wekyb3d8bbwe\data\skin_packs'

gets ran as administrator but still doesn't work for some reason

#
import os

@main_requires_admin
def main():
    os.makedirs(r"C:\Program Files\WindowsApps\Microsoft.MinecraftUWP_1.20.7301.0_x64__8wekyb3d8bbwe\data\skin_packs")


if __name__ == "__main__":
    main() ```
astral apex
heavy knot
astral apex
heavy knot
#

This parrots my problem

#

Don't think they got a working solution tho

astral apex
#

C:\Program Files\WindowsApps is owned by SYSTEM, which is above the β€œadministrator” permissions

heavy knot
#

it works for every other directory I've tried in windows apps except that one

astral apex
#

You can only do that for things you already own

#

You don’t own that one

heavy knot
#

wdym by owning it

astral apex
#

Files and folders are owned by a specific user

#

If you’re not the owner, you’re not allowed to change the permissions

#

Oh wait I thought this was Python
What’re you trying to do to Minecraft

heavy knot
#

it lets me delete directories in the microsoft.minecraft folder but it won't let me make any

astral apex
#

It’s designed to not let you touch it at all

#

I’d be suprised if you got anything to work

#

As far as I can tell they don’t even open Program Files at all in that video

#

Nice

heavy knot
#

do yk of any ways to make this program possible

astral apex
#

I do not

west salmon
#

Does anyone have any programs/tools for automated report generation? Ideally using adobe pdf but open to any

deep estuary
#

what sort of report are you looking for?

warm blade
thorny shell
#

in my experience, this server is most active during Western Hemisphere business hours.

plucky vale
#

how to do like this ? i used pyside6 and need like this how to ?

west salmon
dense solstice
#

how to do run hatch shell on a specific environment ? like if I normally do hatch shell it'll spin up default env. how can I spin other envs which are already creadted ?

flat path
analog kettle
#

Docker question: Suppose I have a docker image, and I know the Dockerfile that created it, but it could only have built the image in an environment that I can't replicate locally.

It's this one, and the last few lines are

VOLUME /data /logs
EXPOSE 7474 7473 7687
ENTRYPOINT ["tini", "-g", "--", "/startup/docker-entrypoint.sh"]
CMD ["neo4j"]

I want to build a new image that pre-installs a few more things, but I'm pretty sure they would need to go before the the CMD statement, and possibly the ENTRYPOINT statement as well. Is there a way to work around this if I were to write a new Dockerfile that's "FROM" this one?

#

if you answer, and it works, I will give you mod ||/s||

rapid sparrow
rapid sparrow
# analog kettle Docker question: Suppose I have a docker image, and I know the Dockerfile that c...

but I'm pretty sure they would need to go before the the CMD statement, and possibly the ENTRYPOINT statement as well.
it does not matter at which step CMD and ENTRYPOINT are defined
as long as they are defined with same... Dockerfile stage.
as long as FROM smth instruction followed before, they can be applied from any place after FROM stage
We applied FROM in example above i recommend after that though, but since we use FROM layer that already defined them... then they are already defined ^_^

analog kettle
rapid sparrow
rapid sparrow
#

feel free also to use lazydocker or dive for quick overview of built result

analog kettle
#

@rapid sparrow I think it's working πŸ˜„ I lied about mod though, sorry.
[I've been lying a lot lately.](#announcements message)

rapid sparrow
#

just kidding. i have enough responsibilities πŸ™ˆ

analog kettle
random compass
#

How can I use Sphinx's autodoc and autosummary extensions to generate doc pages for every module in my project without having to list them in index.rst? (There's no #documentation channel, or else I'd post this question there instead. This one looked like the closest.)

tawdry needle
#

or you can use sphinx-autogen to automatically generate physical stub pages

random compass
willow pagoda
#

last time i wrote some docs, i think i preferred manually listing members in a module because i could flatten them into a document instead of having a table of links to click through

#

autosummary has a :toctree: DIRECTORY role too

random compass
#

Hm...one of my modules isn't having docs generated...

remote sand
#

anyone have recommendations for secrets managers? especially ones that have good integration with most CI platforms

#

ideally something that unifies secrets across AWS/GCP/GHA

random compass
#

I'm trying to use sphinx.ext.autosummary to generate API docs based on docstrings for my library so that I don't have to write dozens of trivial .rst files. However, a particular package's modules aren't being imported. There are no errors, and I can import the modules in an interactive Python session just fine; the offenders are just being ignored. What could the cause be?

#

Picture's worth a thousand words.

willow pagoda
#

oh wait, you have the libretro.driver there, so i guess i should be asking if its subpackages are namespace packages

random compass
#

All subpackages have their own __init__.py, with a handful of from .submodule import * statements. One of them has a conditional import depending on whether a certain third-party is available.

willow pagoda
random compass
#

No HTML or ReStructuredText for any subpackages of libretro.driver was generated, either.

willow pagoda
#

how did you install your libretro package?

random compass
#

I didn't; I made it.

willow pagoda
#

well, given your src-layout i assume you installed it for development

random compass
#

I used pip install -vv -e . in a venv

#

All relevant Python packages (including Sphinx) are installed in this same venv

willow pagoda
#

hm, that seems fine

#

does python -m libretro.driver.audio recognize the package correctly?

random compass
#

There's no __main__, but I do get this:

C:\Users\Jesse\Projects\libretro.py\venv\Scripts\python.exe: No module named libretro.driver.audio.__main__; 'libretro.driver.audio' is a package and cannot be directly executed
willow pagoda
#

so no issues importing it...

random compass
#

And importing the entire library as from libretro import * works okay, too. (All public symbols are exposed through the libretro module, including the contents of libretro.driver and its subpackages.)

willow pagoda
#

deleting your doc builds might also help

#

sidenote, whats with all the linters and stuff in your build system requirements? those should go in [project.optional-dependencies] instead, as pip isolates build dependencies into a temporary environment by default

random compass
#

At any rate, thanks for checking.

rain sedge
#

I agree

random compass
#

Slimmed down the repo in a branch as much as I could.

willow pagoda
# random compass I opened a bug report here. https://github.com/sphinx-doc/sphinx/issues/12264

hmm i dont really get whats going on, but it seems to be related to how it traverses/filters your imports?
here's some things i tried:

  • enabling "imported-members": True in autodoc_default_options
    this produced duplicate documentation, libretro.ArrayAudioDriver and libretro.driver.ArrayAudioDriver
  • adding __all__ = ("ArrayAudioDriver",) to libretro/__init__.py
    this documented libretro.ArrayAudioDriver but not the audio package
  • replacing from .driver import * with from .driver import ArrayAudioDriver
    this documented the audio package but not libretro.ArrayAudioDriver
#

imo i would avoid star imports entirely, it makes it non-obvious what members are exposed by your module

random compass
#

I understand avoiding * imports in actual code (that's bitten me before, even with this library), but for __init__?

willow pagoda
#

even the official tutorial advises against it (though not specifically for __init__.py)
https://docs.python.org/3/tutorial/modules.html#importing-from-a-package

Note that in general the practice of importing * from a module or package is frowned upon, since it often causes poorly readable code. However, it is okay to use it to save typing in interactive sessions.
...
Although certain modules are designed to export only names that follow certain patterns when you use import *, it is still considered bad practice in production code.

random compass
#

"One way to do things" my ass. Thanks for the tip, I'll take a closer look.

burnt thunder
#

I have seen star imports in init a lot, but it does make it difficult to figure out which symbol in __all__ is from which module

blazing peak
#

Is there any selenium tester available...i need some help!

gentle solstice
#

sigh...

#

!pip playwright

rancid schoonerBOT
blazing peak
gentle solstice
#

not sure

tawdry needle
#

https://bpa.st/ZDOQ does anyone know how to read the tea leaves here? this package conflict output from pip makes no sense to me.

#

i suspect the problem has nothing to do with either pandas or s3fs, because they're only loosely pinned:

pandas [aws, parquet] ~= 2.0
pandas-stubs

s3fs

and weirdly when i comment out s3fs, i get past the error

#

this problem also only started when i added moto [s3, server] ~= 5.0 so i think maybe pip is confused about the cause of my problem πŸ€”

flat path
tawdry needle
flat path
#

ah

#

you have a larger requirements.txt file

tawdry needle
#

i do

flat path
#

can you share it?

tawdry needle
#

it's 250 lines and it has a bunch of work-specific comments in it that i can't share. i'll try to narrow it down until i can reproduce πŸ€·β€β™‚οΈ

flat path
#

okie!

tawdry needle
#

but i'm mystified as to how removing s3fs without any pins at all can change the resolution

#

there's still a hell of a lot of backtracking with that commented out too. aws_xray_sdk and py_partiql_parser seem to be problematic, whatever the heck those even are. moto is quite a beast of a library.

flat path
#

not sure how that causes the error nonetheless

tawdry needle
tawdry needle
#

aha, i reproduced it @flat path

python3.11 -m venv --clear tmp
tmp/bin/pip install \
  'moto [server, s3] ~= 5.0' \
  'pandas [aws, parquet] ~= 2.0' \
  'snowflake-connector-python [pandas] ~= 3.8, >= 3.8.1' \
  'boto3' \
  'boto3-stubs [s3]' \
  's3fs' \
  'geopandas' \
  'shapely ~= 2.0' \
  'pyarrow'
#
ERROR: Cannot install pandas[aws,parquet]==2.0.0, pandas[aws,parquet]==2.0.1, pandas[aws,parquet]==2.0.2, pandas[aws,parquet]==2.0.3, pandas[aws,parquet]==2.1.0, pandas[aws,parquet]==2.1.1, pandas[aws,parquet]==2.1.2, pandas[aws,parquet]==2.1.3, pandas[aws,parquet]==2.1.4, pandas[aws,parquet]==2.2.0, pandas[aws,parquet]==2.2.1, pandas[aws,parquet]==2.2.2 and s3fs because these package versions have conflicting dependencies.

The conflict is caused by:
    The user requested s3fs
    pandas[aws,parquet] 2.2.2 depends on s3fs>=2022.11.0; extra == "aws"
    The user requested s3fs
    pandas[aws,parquet] 2.2.1 depends on s3fs>=2022.11.0; extra == "aws"
    The user requested s3fs
    pandas[aws,parquet] 2.2.0 depends on s3fs>=2022.11.0; extra == "aws"
    The user requested s3fs
    pandas[aws,parquet] 2.1.4 depends on s3fs>=2022.05.0; extra == "aws"
    The user requested s3fs
    pandas[aws,parquet] 2.1.3 depends on s3fs>=2022.05.0; extra == "aws"
    The user requested s3fs
    pandas[aws,parquet] 2.1.2 depends on s3fs>=2022.05.0; extra == "aws"
    The user requested s3fs
    pandas[aws,parquet] 2.1.1 depends on s3fs>=2022.05.0; extra == "aws"
    The user requested s3fs
    pandas[aws,parquet] 2.1.0 depends on s3fs>=2022.05.0; extra == "aws"
    The user requested s3fs
    pandas[aws,parquet] 2.0.3 depends on s3fs>=2021.08.0; extra == "aws"
    The user requested s3fs
    pandas[aws,parquet] 2.0.2 depends on s3fs>=2021.08.0; extra == "aws"
    The user requested s3fs
    pandas[aws,parquet] 2.0.1 depends on s3fs>=2021.08.0; extra == "aws"
    The user requested s3fs
    pandas[aws,parquet] 2.0.0 depends on s3fs>=2021.08.0; extra == "aws"
#

that's a pretty innocuous combination of dependencies...

#

i wonder if something else is pip to resolve s3fs to an ancient unsupported version

#

or if one of these packages doesn't support 3.11 on mac m1 for some reason

#

let me try in an amd64 linux container

#

let's see how this goes...

docker run --platform linux/amd64 --rm python:3.11 \
  /usr/local/bin/pip install \
    'moto [server, s3] ~= 5.0' \
    'pandas [aws, parquet] ~= 2.0' \
    'snowflake-connector-python [pandas] ~= 3.8, >= 3.8.1' \
    'boto3' \
    'boto3-stubs [s3]' \
    's3fs' \
    'geopandas' \
    'shapely ~= 2.0' \
    'pyarrow'
#

nope, same in the linux container

#

something must be going on with those extras

#

i'll try un-pinning the snowflake connector, i don't think that one is necessary anymore

flat path
#

I've reduced it further down, but I haven't made any progress in figuring out the source of the conflict.

#

why does pulling boto metadata files take so long, are the index pages that massive ??

flat path
tawdry needle
#

boto3 or botocore i think does a nightly pypi release... lots of releases to backtrack through

#

i think i hit the particular issue of using an ancient boto3 before. aiobotocore might be the culprit, because they pin botocore very tightly

flat path
#
moto [server, s3] ~= 5.0
pandas [aws, parquet] ~= 2.0
snowflake-connector-python [pandas] ~= 3.8, >= 3.8.1
boto3 == 1.34.69
boto3-stubs [s3]
s3fs
geopandas
shapely ~= 2.0
pyarrow

this resolves successfully >.<

#

I suppose boto3 is involved somehow here

flat path
#

??????

#

I have other things to do so I'll stop here, but man I have left this even more confused.

tawdry needle
#

i wonder if pinning botocore or aiobotocore will fix it

rancid schoonerBOT
#

setup.py line 10

'botocore>=1.34.41,<1.34.70',```
flat path
tawdry needle
#

Let me see if that helps

#

Actually pinning Pip makes a lot of sense

#

Should probably do that anyway

#

Looks like 23.1 is the bad version

remote hare
#

is anyone familiar with building websites on builder.io?

slim reef
#

guys is there any way i can like develoop a mix of lens and gemini?

indigo zenith
tawdry needle
#

taking a poll here: which should I use for my next project? it's a "library", not an "app".

1️⃣ : PDM
2️⃣ : UV

gentle solstice
#

Uv isn't ready.

#

If you used setup tools and pip-tools, sure

tawdry needle
thorn portal
gentle solstice
#

If you want to use uv, use rye

thorn portal
#

yeah that's on my radar to try during my month off as well

gentle solstice
#

btw, both pdm and rye make pyenv obsolete

#

rye moreso than pdm

astral apex
gentle solstice
#

it has pdm py install now

astral apex
gentle solstice
#

!pip pbs-installer

rancid schoonerBOT
gentle solstice
#

rye also uses that ^

#

Unfortunately the pbs-installer package doesn't support mirrors

crimson spruce
#

Then I started to add the dependencies I need to actually serve it on the web and I step on the big fat LEGO brick lying in wait: I just can't install uWSGI. The reason for this is actually quite simple: uWSGI needs to compile C extensions, Rye uses static builds of Python, and static Python builds + compiling C extensions is a known house of pain.
β€” Trying out Rye

#

For the time being I'll stick with pyenv

tawdry needle
thorny shell
#

TIL "step on the Lego brick" 🀣

#

ow ow ow

torn sparrow
#

Greetings all,

Hope everyone is well. Quick question, how can I fix this mypy error?

tests\circuit\test_circuit.py: error: Source file found twice under different module names: "circuit.test_circuit" and "tests.circuit.test_circuit"
#

circuit.test_circuit.py is under the module tests, so I don't really get this error.

tawdry needle
torn sparrow
#

I'll add it.

tawdry needle
#

Are you just referring to the file by its path?

torn sparrow
#
from tests.circuit import Template

Yes?

#

Or no, not just referring, importing sth.

torn sparrow
#

!zen

rancid schoonerBOT
#
The Zen of Python, by Tim Peters

Beautiful is better than ugly.
Explicit is better than implicit.
Simple is better than complex.
Complex is better than complicated.
Flat is better than nested.
Sparse is better than dense.
Readability counts.
Special cases aren't special enough to break the rules.
Although practicality beats purity.
Errors should never pass silently.
Unless explicitly silenced.
In the face of ambiguity, refuse the temptation to guess.
There should be one-- and preferably only one --obvious way to do it.
Although that way may not be obvious at first unless you're Dutch.
Now is better than never.
Although never is often better than right now.
If the implementation is hard to explain, it's a bad idea.
If the implementation is easy to explain, it may be a good idea.
Namespaces are one honking great idea -- let's do more of those!

rapid sparrow
#

use always same absolute root folder for all your code, working and test one

#

allow yourself starting not from root only for relative paths starting with dot

torn sparrow
#

Fixed it like that.

#

No no, I don't like that, Zen states it's best to have the full namespace.

rapid sparrow
torn sparrow
#

It just gives a framework to doing things better.

#

It's more of general advices.

#

But there's also preference, so I respect your view too.

rapid sparrow
willow pagoda
#

the duplicate module was caused by pytest's prepend import mode adding tests/ to sys.path, right?

torn sparrow
thorny shell
#

pretty sure I don't have an __init.py__ in any of my tests directories

willow pagoda
#

hmm i think this explains it
https://docs.pytest.org/en/stable/explanation/pythonpath.html

prepend (default): the directory path containing each module will be inserted into the beginning of sys.path if not already there, and then imported with the importlib.import_module function.

It is highly recommended to arrange your test modules as packages by adding __init__.py files to your directories containing tests. This will make the tests part of a proper Python package, allowing pytest to resolve their full name (for example tests.core.test_core for test_core.py inside the tests.core package).

If the test directory tree is not arranged as packages, then each test file needs to have a unique name compared to the other test files, otherwise pytest will raise an error if it finds two tests with the same name.

#

frickin mobile

willow pagoda
#

but anyway if i understand it correctly, the existence of __init__.py made pytest prepend the parent directory of tests/ so its submodules could be imported through tests

tawdry needle
torn sparrow
#

hehe

#

I get what you meant though.

tawdry needle
#

hah okay

#

mypy is confused because you're treating tests. as a module/package in code, but you don't have tests/__init__.py so it's not actually a module/package -- it's something else called a "namespace package" that coincidentally happens to work but isn't what you meant to do

torn sparrow
#

I added an empty __init__.py, and it got fixed.

#

I think it was just it not being recognized as a module.

tawdry needle
#

hence mypy's confusion about tests/circuit.py -- does that file correspond to tests.circuit or circuit?

tawdry needle
torn sparrow
tawdry needle
torn sparrow
tawdry needle
#

that would be either tests.circuit.test_circuit or circuit.test_circuit

torn sparrow
#

Thank you so much for the correction!

tawdry needle
#

yup, this stuff can get a little hairy. the most important point is that python only looks for modules in certain directories and does not search recursively in subdirectories

torn sparrow
#

Gotcha.

tawdry needle
#

personally i set it up so that tests is not a module (no __init__.py) and i treat everything inside as top-level

#

but that's just the way i do it, a lot of people do tests/__init__.py

#

i like it the other way because it mirrors the src/ dir

torn sparrow
#

I am sort of playing around with what's the best way too, I think at some point it just boils down to preference.

tawdry needle
#

python looks for source modules inside src/, and looks for test modules inside tests/ -- there's a nice symmetry there imo

torn sparrow
#

Salt, could I perhaps friend you hehe?

#

I'd love to chat more sometime and perhaps have some tips on my package.

tawdry needle
torn sparrow
#

Ohh gosh no, I fortunately am not that useless hehehe.

gentle solstice
vague silo
#

uWSGI is so great

#

it doesnβ€˜t need more features

astral apex
vague silo
#

those are included in maintenance mode

astral apex
#

Oh wait

#

I misread

gentle solstice
#

It needs prebuilt wheels

torn sparrow
#

Greetings,

Hope all are well. I am trying to add sphinx and numpydoc to my package, and was hoping to ask a few questions if possible. Would this channel be appropriate?

vague silo
#

yes, ask away

unique perch
#

Hi all, do you use any particular enterprise logging/monitoring platforms to track faults in production?
Second question - Any tips or advice for function libraries? I have Azure DevOps, which I think I might use so my colleagues can fork information if/when needed.

thorny shell
tawdry needle
#

we use datadog as well, i hear it's very expensive but i don't pay the bill

#

it does everything i want it to do and then some

thorny shell
#

and it's free free freeeeee

vague silo
#

I was going to say Prometheus as well, it’s really good

rapid sparrow
#

Hi all, do you use any particular enterprise logging/monitoring platforms to track faults in production?

Sentry is nice for that. It is just error management, with logging and some tracing embedded.

Otherwise Datadog is cool too. It is expensive yeah... But there is room for optimisations. If u don't mind catching only small percentage of traces 2-5% then price will be nice. As well as thoroughly cleaning logging

rapid sparrow
#

Haven't tried Enterprise grafana deployment, I do expect it to be same pain in the ass though as we still have same problems of configurability

rapid sparrow
tawdry needle
#

Nothing is free: it's just a matter of devops/infra payroll vs cloud bill

thorny shell
#

well, you know, Linux is free ... ||if your time has no value||

gentle solstice
#

If your time does have value, there's support contracts for sale.

torn sparrow
# vague silo yes, ask away

Got fixed, sorry I didn't remember to check the channel. I am having a different question now hehe. So, how can I make a Github Pages from a custom folder?

So my html code is inside a source folder inside docs.

rapid sparrow
rapid sparrow
#

Switch to GH mode, remove build step, adjust pushed folder from ./build to yours

torn sparrow
torn sparrow
#

This is the repo, could you kindly have a look at my docs?

#

For some reason, even when I put everything in the same level of docs (instead of build/html), it still doesn't work the same way as when I run .\make html.

rapid sparrow
#

u haven't added to it workflow file

torn sparrow
#

Well, I thought the issue was it not accessing.

torn sparrow
rapid sparrow
torn sparrow
rapid sparrow
#

a step to solution begins from made test showing what is wrong

torn sparrow
#

I'll refactor it.

#

One moment...

rapid sparrow
#

i am not sure if github pages can work from "main" reliably in all its features

torn sparrow
#

Like rename branch from main to master?

#

It itself says to put main iirc.

rapid sparrow
#

ergh.. this is bullshit from some recent hype that is not very well supported

#

i would recommend to ignore it and just keep to having master πŸ˜„

willow pagoda
#

#packaging-and-distribution message @random compass ah, i think it has something to do with how you have a libretro.driver.audio.driver submodule, somehow sphinx is confusing it with your driver package? i renamed the module to audio_driver.py and that also fixed it

#

i guess you can mention this in your sphinx bug report, something about the submodule name apparently conflicting with the parent package

heavy knot
#

how can i fix this all was working good before like this is random

raw wind
thorny shell
#

fwiw "abc" is the name of a python built-in module; having your own file with that name is a recipe for sadness

astral apex
#

!docs abc

rancid schoonerBOT
#
abc

Source code: Lib/abc.py

This module provides the infrastructure for defining abstract base classes (ABCs) in Python, as outlined in PEP 3119; see the PEP for why this was added to Python. (See also PEP 3141 and the numbers module regarding a type hierarchy for numbers based on ABCs.)

The collections module has some concrete classes that derive from ABCs; these can, of course, be further derived. In addition, the collections.abc submodule has some ABCs that can be used to test whether a class or instance provides a particular interface, for example, if it is hashable or if it is a mapping.

This module provides the metaclass ABCMeta for defining ABCs and a helper class ABC to alternatively define ABCs through inheritance:

astral apex
#

wat

#

I was wrong

thorny shell
#

I don't think this is the cause of their trouble; I'm just pointing it out "for future reference"

astral apex
#

Yeah, but it’s not something that they can change …unless they go talk to Danny and rearchitect Discord.py

thorny shell
#

oh I didn't even notice that it was part of "discord".

#

backs away slowly, bowing and scraping

astral apex
#

Ye

#

Only the first line of the traceback is their own code
Jumping straight into exec, which has me a bit worried

thorny shell
#

newbies gonna newbie

random compass
random compass
heady ravine
#

Hello

#

Can somone help me?

astral apex
#

With?

rustic ridge
#

I am on a trial to install graphviz to my Windows 11. I aim to conduct manual installation, means the zip archive to have downloaded from developers team server, then placing it in Windows user profile directory tree, finally adding to PATH.

However the archive downloaded today triggers positive alerts when scanned for malware. One can see few years ago there have been similar reports, that time it ended however with the judgment - all just false positives. I wonder what is the actual status quo as of time being.

pliant sapphire
#

❀️

rustic ridge
thorny shell
#

I think it's more likely that those things are buggy, than that the github download contains malware. But you can never be sure; you have to trust your instinct 😐

spark hound
#

if you are good at selenium please msg me i have a question

twilit forum
#

@heavy knot how's the quality of the code generated? Does it have specific language support?

plucky vale
#

i want to do like this cicle white checkmark to my code

#

but i have always problemes

#

can any one help me

gentle solstice
#

Are those <input type="radio">?

gentle solstice
plucky vale
#

its radio

plucky vale
#

and qt designer app

#

i turn it to this with sheetstyle

twilit forum
#

Can I teach it verilog? πŸ‘€

plucky vale
#

any helper?

sullen drum
#

hey is there any way to get amount of transaction, sent by, and time from https//cash.app/payments/90v91cz7nsj6vmfj73g0sknxm/receipt

thorny shell
#

probably by signing up for their API

kind wolf
#

anyone here have experience in blender python scripting for tools/add-ons?

ancient sky
#

Rookie question here: Is it possible to let two Git clients handel the same local repo without anything freak out on my pc?

subtle quarry
ancient sky
#

yeah

#

IDE client and Git client

#

In my case it's Pycharm and LazyGit, if that helps

rapid sparrow
#

I use Git CLI together with vscode all the time

#

Never encountered issues yet in all my years

#

In theory they can be though if difference between clients is too big may be

twilit forum
#

There shouldn't be a problem to use git repo with any hundred different clients. Hopefully. I mean, there is one .git folder and any git actions should reflect completely within that. If any client messes with the .git so that for example git cli can't deal with it, I would say that tool/client is broken.

ancient sky
twilit forum
#

What did you do? 😝 I only use git from commandline, so I don't really know what shenanigans could be doing.

#

I really like the interactive https://learngitbranching.js.org/
Darkwind Duck linked you. I wish they would update and replace git checkout with git switch and git restore though, but perhaps they are still considered experimental

thorny shell
#

I have never learned "git switch" or "git restore"

crimson spruce
#

It's available on most Git installations you'd encounter, but there's still supported Debian versions without it.

vague silo
#

git switch is still marked as experimental isn’t it

astral apex
#

yea

short peak
#

I've been using for a while already πŸ˜„

rancid oasis
#

Hey anyone here very familiar with GH can answer a basic noobs question
if im working with a fork of something and commits get merged back to the main project
in the main project or any project is there like a section to check merge history
cant find it

thorny shell
#

just do "git log", that shows all commits on your current branch.

#

You can tell merge commits from other commits because it says "Merge" in the header

#

there's probably some way of seeing them in the github UI, too, but I don't know what it is

thorny shell
#

both github and gitlab have made enough changes to their UIs in the last couple of years that I get lost

#

I just stick with my console git gui

astral apex
#

console has upcoming changes

#

_jk jk _

ancient sky
#

My brain is overloaded
I think I will stick with my brainless "one branch at a time" and merge for now🫠

remote sand
#

any static analysis tool that can tell whether a function has side-effects?

thorny shell
#

almost certainly not

#

my gut says that in order to do that reliably, you'd have to solve the halting problem

south canopy
#

Does anyone know where I can get an auto-complete extension (example: typing " would close the string with another " and leave the cursor between the quotes)

#

I'm using Python's IDLE

thorny shell
south canopy
#

So I should just get emacs?

thorny shell
#

noooooo

#

god no

#

IDLE doesn't have extensions anyway

south canopy
#

Then what's the extension tab in Settings for?

thorny shell
#

πŸ€”

#

OK maybe it does have extensions πŸ™‚

south canopy
#

🀦

#

Basically I'm trying to make IDLE a little more user friendly

#

I also need an extension to embed the shell window under the editor window

thorny shell
#

🀷

#

I certainly can't help you

twilit forum
#

I'm still using tig which I learnt from a colleague when I started working at my current job 9 years ago. Recommended πŸ‘

twilit forum
# remote sand any static analysis tool that can tell whether a function has side-effects?

Immutable type hints? Got idea from this great answer:

https://stackoverflow.com/a/27412811/393010

Doesn't detect messing with globals or printing

thorny shell
past stirrup
#

I need a good apk decompiler can I get some suggestions

ancient sky
#

Use any other editors bro

#

unless you want to test your limits

ancient sky
# south canopy Then what's the extension tab in Settings for?

hi
there are 53 extensions for IDLE listed on the pypi
https://pypi.org/search/?c=Framework+%3A%3A+IDLE
and I found another on github
https://github.com/serwy/idlex
IDK if any one of them meets your needs...

GitHub

IdleX - IDLE extensions for Python. Contribute to serwy/idlex development by creating an account on GitHub.

#

damn I really didn't know IDLE have extensions
even this many

pearl crown
#

can anyone suggest me a website like replit that allows to host repls 24x7 for free?

cerulean field
#

Is there some multi-version dependency management tool that can make some venvs via symlinks? Im looking for something poetry compatible

cerulean hollow
#

I can't determine if I should ask this here or on the #cybersecurity channel. What do you guys do today to harden and/or secure docker images?

thorny shell
#

do you mean "secure the host on which you run a docker image"?

#

images are immutable

cerulean hollow
#

Yes, mostly that. I mean it in the context that you can update existing Dockerfiles and redeploy the container with a new 'hardened' image. I'd imagine that choosing a stable base image may help with hardening. So I guess I also want to know what choices people are making when building docker images to make them less susceptible to exploits

drifting stump
#

Has anyone succeeded in using pre-commit with your virtual environment? Its an anti pattern as per pre-commit framework maintainer , and we should only use remote repos and let pre-commit create its own environment in cache for QA checks.

What if I don't want that. My poetry config already has dev dependencies for my IDE, I don't want to have two places to manage the dev dependencies around tooling.
There is a hack, by using this repo.. https://github.com/floatingpurr/sync_with_poetry
but this is not ideal. You still have two separate environment with dev dependencies.

GitHub

Sync .pre-commit-config.yaml repos starting from poetry.lock - floatingpurr/sync_with_poetry

astral apex
#

!rule ad

rancid schoonerBOT
#

6. Do not post unapproved advertising.

astral apex
#

Also this doesn’t really help anything
pre-commit already uses its own environments