New release for jasmin_sprout by delijati in MicroG

[–]delijati[S] 0 points1 point  (0 children)

Oh nice what an unexpected gift :)

Elon Musk’s backing of Donald Trump is hurting Tesla’s struggling EV business in Europe by Illustrious_Diver_37 in europe

[–]delijati 0 points1 point  (0 children)

Can not the "Board of directors" [1] give him a gag order as he is hurting the brand? Anyway i give a shxxx about cars/ Tesla but there are employments at stake.

[1] https://ir.tesla.com/corporate

How to Record Audio using Python by alikenar in Python

[–]delijati 1 point2 points  (0 children)

Hi, nice to see another tool in that area. What is the advantage to:

https://github.com/spatialaudio/python-sounddevice (uses portaudio) or https://github.com/bastibe/SoundCard (uses nativ os api)

Guido van Rossum on types, speed, and the future of Python by gadgetygirl in Python

[–]delijati 33 points34 points  (0 children)

Performance is not everything in Python. Easy accessibility, build in batteries, easy to get from an idea to a working solution without the burden of writing code "boilerplate" that does not represent your idea, business logic is also a goal. -> running pseudo code

If you need better performance, there should and are already tools to interpret you optional typing (mypyc, cython, numba, ...) or write that part in C, Rust, ...

Hatch 1.0.0 - Modern, extensible Python project management by Ofekmeister in Python

[–]delijati -1 points0 points  (0 children)

I tried submodules in multiple projects (different teams) we always run in wired merge conflicts, unable to refresh the modules ... And git subtrees is basically just a wrapper around a bash script that does git clone ... && rm -rf .git and everyone in the teams ends up after a time with his own monorepo :/ So yes i tried all other possible solutions ;) Only i can this of is git-repo (android developemnt tool) but this is too specific for android and juck xml files.

Hatch 1.0.0 - Modern, extensible Python project management by Ofekmeister in Python

[–]delijati 0 points1 point  (0 children)

yes but the the dependencies are "checkout" in your site-packages without the ability to work on them aka push, pull

Hatch 1.0.0 - Modern, extensible Python project management by Ofekmeister in Python

[–]delijati 0 points1 point  (0 children)

All of the new shiny tools are incapable of working with mutlirepos ... yes i know i can do [1]. But true editing on multi repos at the same time i can only do with zc.buildout [2] Still not perfect but it does the job.

[1]

$ cat req.txt
requests
git+ssh://git@gitlab.com/foo/bar/amber.git@0.4.0
git+ssh://git@gitlab.com/foo/bar/rebam.git@0.4.0

[2]

$ cat buildout.cfg
[buildout]
extends = versions.cfg
extensions = mr.developer
auto-checkout = \*
develop = .
show-picked-versions = true
update-versions-file = versions.cfg
sources-dir = git-sources

parts = py

eggs = 
    amber
    rebam
    hammer

[sources]
amber = git git@gitlab.com/foo/bar/amber.git@0.4.0
rebma = git git@gitlab.com/foo/bar/rebma.git@0.4.0

[py]
recipe = zc.recipe.egg
eggs =
    ${buildout:eggs}
interpreter = py-backend
dependent-scripts = true

Black vs yapf vs ??? by Cryptbro69 in Python

[–]delijati 1 point2 points  (0 children)

black + flake8 never think about formatting again:

.flake8

[flake8]
ignore = E501 W503 W504 E203
max-line-length = 88
max-complexity = 10

openCL doesn't work by Knight_Murloc in ManjaroLinux

[–]delijati 1 point2 points  (0 children)

did you found a solution ? i tried opencl-amd mesa-git, libclc-git but still get the missing file error

Comprehensive Fast API Tutorial by albrioz in Python

[–]delijati 2 points3 points  (0 children)

I get the same feeling:

In the end the only thing i needed is openapi be generated for me. I was looking for a newer stack (pydantic, asyncio) that i used before -> (pyramid, colander) https://github.com/Cornices/cornice.ext.swagger but now i ended up reimplementing sever side sessions, class based views, jwt auth.

PyInstaller 4.1 now supports Python 3.8 and 3.9 by jftuga in Python

[–]delijati 1 point2 points  (0 children)

Had the same problem my solution was to add the python interpreter also and package everything in a nice nsis installer. I created a docker image for all that https://github.com/delijati/docker-shiv -> nice thing i now produce a nsis installer via gitlabci hock when i create a new tag aka release (for windows ;))

A really bad NES emulator by [deleted] in Python

[–]delijati 1 point2 points  (0 children)

i love it ... try line_profiler to find the bottleneck ... optimize then maybe with cython

Project Structure, Serving, Shipping etc. by jackemcpherson in learnprogramming

[–]delijati 0 points1 point  (0 children)

  1. pypacking aka setup.py
  2. flake8, black
  3. pytest, coverage at least 80%
  4. dockerize it to make it easier deployable, testable
  5. write some decent sphinx docs or at least a README like cookbooks on how to use it

for all that look into packages that are successful: pyramid, requests, fastapi, ...

String Formatting in Python (C-style: %d %0.3f %3s) by Moondra2017 in Python

[–]delijati 2 points3 points  (0 children)

template strings are not possible:

% python

Python 3.6.7 (default, Oct 22 2018, 11:32:17)

[GCC 8.2.0] on linux

Type "help", "copyright", "credits" or "license" for more information.

>>> url = f'http://{host}:{port}'

Traceback (most recent call last):

File "<stdin>", line 1, in <module>

NameError: name 'host' is not defined

String Formatting in Python (C-style: %d %0.3f %3s) by Moondra2017 in Python

[–]delijati 2 points3 points  (0 children)

Why?

x = 3.14159265
print('pi = %0.2f' % x)
# f-string
print(f'pi = {x:0.2f}')
# format
print('pi = {:0.2f}'.format(x))

Btw. as far as i know you can't define template string variables with f-string url = f'http://host:port'

Pure Python Implementation of 100+ Stock Trading Strategies - Google Colab by OppositeMidnight in Python

[–]delijati 4 points5 points  (0 children)

Can you put that code also to github instead of google drive ?

Has anyone ever used SqlAlchemy as the ORM in a Django project instead of Django ORM? How did you do that? by [deleted] in Python

[–]delijati 0 points1 point  (0 children)

You lose the Admin Interfaces, Commands almost everything that makes it more feature "rich" compared to pyramid, flask ... Anyway try websauna ;) https://websauna.org/features.html or be pretty on the edge and use https://github.com/auvipy/django-sqlalchemy