NeoFromMatrix

u/NeoFromMatrix


r/learnpython•

I have an application which runs with a http server in the background. It will receives jobs with one or multiple images as data (also videos in the future) and has to process them step by step (modify images, create archive, ftp upload and a few more steps).

Multiple jobs can arrive at nearly the same time. (or another can arrive while one is still under processing). Each processing step should only exist once in the system as they can be heavy on recources (either network I/O or CPU e.g.).

I'd like to create a structure for the application (which can be flexible on the steps for each job), which schedules the steps from the jobs in multiple queues and has multiple processes which wor

34

r/raspberry_pi•

Hello!

I'd like to design a pcb which fits on the bottom of the pi zero and breaks out the micro usb host as usb type a connector. It would be mounted via two screw holes and the psb connected via castellated pads.

I've found the board outline here: https://www.raspberrypi.org/documentation/hardware/raspberrypi/mechanical/rpi-zero-v1_2_dimensions.pdf

Does anyone know where I can get a specifications for the 4 pads on the bottom which belong to the usb otg?

I'm aiming at a single pcb solution (no pogo pins or usb usb connector) for the lowest price possible.

Edit: here is an image of the finished pcb, please provide feedback if you're interested: [Screenshot_2016-10-31_17-27-07.png](ht

20

r/linux_devices•

I'm looking for a new business laptop, running only Linux.

Outline:

Full HD or 2K non anti glare display
long battery life
Intel 6 or 7th gen processor (preferably beefy dual core or quad core) with DDR4
NVME ssd support
accidental damage protection for private customers in europe
Intel network cards (wireless AC and gigabit ethernet)
all usb ports 3.0

optional:

Display port
USB type C (thunderbolt)

Should be from the business sector, repairable hardware, long lifetime, somewhat rugged.

I'm looking at HP Probook or Dell latitude. Lenovo is heading down the sewer pipe with their recent software decision imho...

Whats your e

48

r/linuxboards•

Hello!

I'm searching for an industrial som/com with good peripheral library (for c and possibly python3) support and probably prebuild images.

Should have some displaying capability (probably LCD?), ethernet, spi, i2c, uart. Suited for embedding in devices.

With prebuild images, I'd like to run my application as simple program, not barebone!

Anyone knows of such a board ? Long term availability would also be very nice.

25

r/opensource•

Hello!

I'm searching for an open source cross platform (Windows 7, Linux) inventory management software.

Each item will be recorded with a unique inventory number, image, buying date, location. Regularly the items are checked for integrity and the result is noted in the inventory software. An image of the current state may also be added.

After entering the inspection of an item, we should be able to print out the page, sign it and keep it for documentation purposes.

The data should be stored in a standard format.

Anyone knows such a software?

25

r/learnpython•

Hello!

I have a function which should be called every ~15 seconds, which takes ~0-5 seconds to complete (fetches data from a webpage, opens multiple selenium windows and loads urls).

Also I have a http server(bottle) running which should change the urls of the selenium instances when receiving a POST request.

The POST request should have a higher priority than the periodic call from above. (if the periodic routine is running it should be stopped and be executed with other parameters from the POST request)

Currently I'm scheduling the periodic call with threading.Timer, is there another way maybe with asynchronous programming?

22

r/learnpython•

I want to open/load a json file (which might have multiple hundred entries on one single level) to use it in a short script afterwards.

I could either:

override = json.loads(open("/path/to/file.json").read())

or

with open("/path/to/file.json") as weekly_fh:
jsoncontent = weekly_fh.read()
weekly = json.loads(jsoncontent)

This should run on a low end hardware (C.H.I.P, 512MB RAM). Which is the proper way to handle this situation? I could also just open it (example 1) and don't give a shit about closing the file handle (which I assume is automatically handled in the second example). But this just feels wrong as I come from a C background.

The script itself has a

27

r/learnpython•

I'm downloading images from an imap account and process them afterwards (rotate, strip exif, resize, zip, upload via ftp, send links to them via email...).

Whats best practice for sanity checking them?

32

r/learnpython•

I have following folder architecture;

projectdir/
├── lib/
│ ├── moduleA.py
│ └── moduleB.py
├── tools/
│ └── helperscript.py
└── mainscript.py

In helperscrip.py I want to import moduleB, which is also uses by mainscript.py. How can I accomplish this with the least amount of modifications on my system (and no weired hack around)? (should be a download and run application from github).

310

r/PostPreview•

projectdir/
├── lib/
│ ├── moduleA.py
│ └── moduleB.py
├── tools/
│ └── helperscript.py
└── mainscript.py

10


r/learnpython•

Hello!

I have a script which checks if an unread email is present at an imap server and starts processing it if it is.

I have currently three ideas how I could realize the starting:

  1. use cron/cronjob/crontab to start the python script every minute
  2. use a systemd timer to start it periodically
  3. let the script run as a daemon

Which one would you prefer and why?

I would assume the third option would hog some ram but would consume lower processing power/energy over time sice the interpreter would not be started and closed every minute. Not how big of a problem memory leaks are (in the interpreter).

23


r/PFSENSE•

Hello

I've setup pfsense 2.3.2 with squid, squidguard and a captive portal. Captive portal authentication works, I can access https sites after login. But on http sites I get "ERROR The requested URL could not be retrieved" and "Access Denied", but only when I set Authentication under squid to Captive Portal.

If I set authentication under squid to no authentication everything works fine.

Anyone a idea what might be going on ? Thought https://redmine.pfsense.org/issues/5594 is only related to 2.2.x

20

r/sysadmin•

Hello!

Disclosure: I'm not a sysadmin, just a ee student with quite some interest and knowledge on Linux based machines.

I'm currently researching methods to log the access of a wireless network. The idea is to identify a person or device if someone accesses illegal content or we (volunteer fire department) are sued.

Size wise: ~ 30/6Mbits connection , maybe 25 users on one day of the week, most of the time less or none.

I would not expect the users to spoof their MAC address, so just logging the MAC address should be sufficient. (well, if someone uses a vpn, tor or proxy I don't really care...)

Any software/OS/way I could accomplish this? Ideally with free software (ipfire?) Hardware

59