Search Results
|
Post |
Author |
Forum |
Replies |
Views |
Posted
[asc]
|
|
|
Thread: Pandas keep existing format of Excel
Post: Pandas keep existing format of Excel
Hello everybody,
I've written a little Python Script which loads an Excel file and picks random entries basend on a few criteria. Those entries are then written to a python list. The status of those ... |
|
AlphaInc |
Data Science |
2 |
1,067 |
Jan-01-2024, 11:25 AM |
|
|
Thread: Place QT Window in the middle
Post: RE: Place QT Window in the middle
Okay understood. Is there any possibility to set an initial position and size of my window and my Elements such as Buttons and Combobox which change proportionally when using a QVBoxLayout? |
|
AlphaInc |
GUI |
10 |
2,237 |
Jul-19-2023, 09:08 AM |
|
|
Thread: Place QT Window in the middle
Post: RE: Place QT Window in the middle
(Jul-16-2023, 01:13 PM)Axel_Erfurt Wrote: with open ('config/config.json', 'r') as fp
should be
with open ('config/config.json', 'r') as fp:
for i in data
should be
for i in data:
...
It seem... |
|
AlphaInc |
GUI |
10 |
2,237 |
Jul-16-2023, 01:24 PM |
|
|
Thread: Place QT Window in the middle
Post: RE: Place QT Window in the middle
(Jul-16-2023, 12:49 PM)Axel_Erfurt Wrote: That's not the way to use Qt or any other python code.
Colons are missing everywhere in the code.
What do you mean exactly by "not the way to use Qt" ? |
|
AlphaInc |
GUI |
10 |
2,237 |
Jul-16-2023, 01:08 PM |
|
|
Thread: Place QT Window in the middle
Post: Place QT Window in the middle
Hello,
I'm working on a Python Tool with Qt6 (I have created the UI with QT Designer) but I'm running into a few problems...
This is my code so far:
#!/usr/bin/env Python3
# Imports
from PyQt6.QtWi... |
|
AlphaInc |
GUI |
10 |
2,237 |
Jul-16-2023, 11:54 AM |
|
|
Thread: splitting file into multiple files by searching for string
Post: splitting file into multiple files by searching fo...
Hello everybody,
I got a backup of a bunch of chess games (from chess.com) I played with a friend of mine and wanted to save them as individual files. Now I only have a complete file with all games b... |
|
AlphaInc |
General Coding Help |
2 |
899 |
Jul-01-2023, 10:35 AM |
|
|
Thread: Loop through json file and reset values [SOLVED]
Post: RE: Loop through json file and reset values
(Mar-23-2023, 08:34 PM)deanhystad Wrote: Your json file is wrong.
Output:{
"person":
[
{ <-- This does not belong
{"id": "1",
"name": "... |
|
AlphaInc |
General Coding Help |
2 |
2,130 |
Apr-06-2023, 11:15 AM |
|
|
Thread: math formula does not give the same result as bash script [SOLVED]
Post: RE: math formula does not give the same result as ...
(Apr-02-2023, 11:38 AM)deanhystad Wrote: This should divide by 12, not 4.
d = ((367 * (month-2-12*a)) / 4)The other differences are caused by Python doing floating point math and bash doing integer ... |
|
AlphaInc |
General Coding Help |
3 |
971 |
Apr-02-2023, 07:21 PM |
|
|
Thread: math formula does not give the same result as bash script [SOLVED]
Post: math formula does not give the same result as bash...
Hello everybody,
I was working on a script which gets the current date of the islamic calendar. I know there is a pip-module which converts a Georgian date to islamic date but it's only defined until... |
|
AlphaInc |
General Coding Help |
3 |
971 |
Apr-02-2023, 09:37 AM |
|
|
Thread: Loop through json file and reset values [SOLVED]
Post: Loop through json file and reset values [SOLVED]
Hello everybody,
I have a json file which stores information for different people, which looks like this:
{
"person":
[
{
{"id": "1",
"name"... |
|
AlphaInc |
General Coding Help |
2 |
2,130 |
Mar-23-2023, 07:54 PM |
|
|
Thread: Get iPhone Location
Post: Get iPhone Location
Hello everybody,
I'm trying to write a script that first checks some ips of mine (phone, pc, etc.) which are stored in a json file to "confirm" that I'm home. If one ip is online (indicating that I'm... |
|
AlphaInc |
General Coding Help |
0 |
907 |
Sep-06-2022, 04:32 PM |
|
|
Thread: Adding string after every 3rd charater [SOLVED]
Post: RE: Adding string after every 3rd charater.
(Jul-10-2022, 01:34 PM)AlphaInc Wrote: Hello everybody,
I want to get the filesize of a folder and store it as a variable. So far I've manged to do so:
import os
def get_size(start_path = '.'):
... |
|
AlphaInc |
General Coding Help |
2 |
1,255 |
Jul-10-2022, 03:15 PM |
|
|
Thread: Adding string after every 3rd charater [SOLVED]
Post: Adding string after every 3rd charater [SOLVED]
Hello everybody,
I want to get the filesize of a folder and store it as a variable. So far I've manged to do so:
import os
def get_size(start_path = '.'):
total_size = 0
for dirpath, dirnam... |
|
AlphaInc |
General Coding Help |
2 |
1,255 |
Jul-10-2022, 01:34 PM |
|
|
Thread: Delete empty text files [SOLVED]
Post: RE: Delete empty text files
(Jul-09-2022, 01:36 PM)DeaD_EyE Wrote: Use pathlib.Path for better abstraction.
This could not work, because the quote is escaped by the last \.
path = 'C:\Path\to\folder\'Better:
path = r'C:\Path... |
|
AlphaInc |
General Coding Help |
5 |
1,568 |
Jul-09-2022, 02:10 PM |
|
|
Thread: Delete empty text files [SOLVED]
Post: Delete empty text files [SOLVED]
Hello everybody,
I have a folder with many text-files, some of them are emtpy but have mutliple lines (for example, someone edited an empty text file, pressed enter and saved the file). I wanted to c... |
|
AlphaInc |
General Coding Help |
5 |
1,568 |
Jul-09-2022, 12:08 PM |
|
|
Thread: Human Sorting (natsort) does not work [SOLVED]
Post: RE: Human Sorting (natsort) does not work
(Jul-04-2022, 09:56 AM)snippsat Wrote: For sorting pathlib object add key=str.
Test.
from pathlib import Path
from natsort import natsorted, humansorted
from pprint import pprint
outputs = Path(r'G... |
|
AlphaInc |
General Coding Help |
2 |
1,137 |
Jul-04-2022, 10:21 AM |
|
|
Thread: Human Sorting (natsort) does not work [SOLVED]
Post: Human Sorting (natsort) does not work [SOLVED]
Hello everybody,
With a batch-script I export mutliple text-files to a specific folder where I want to merge them into one.
Therefore I used the type-command in windows cmd which worked fine. But aft... |
|
AlphaInc |
General Coding Help |
2 |
1,137 |
Jul-04-2022, 09:08 AM |
|
|
Thread: Check if clients are online with ips stored in json [SOLVED]
Post: RE: Check if clients are online with ips stored in...
(Jun-27-2022, 08:02 AM)AlphaInc Wrote: (Jun-27-2022, 07:16 AM)ibreeden Wrote: No. You must read the ip addresses from the json file one by one, and for each address test if it responds.
from subpr... |
|
AlphaInc |
General Coding Help |
6 |
2,480 |
Jun-27-2022, 08:28 AM |
|
|
Thread: Check if clients are online with ips stored in json [SOLVED]
Post: RE: Check if clients are online with ips stored in...
(Jun-27-2022, 07:16 AM)ibreeden Wrote: No. You must read the ip addresses from the json file one by one, and for each address test if it responds.
from subprocess import call, DEVNULL
import platfor... |
|
AlphaInc |
General Coding Help |
6 |
2,480 |
Jun-27-2022, 08:02 AM |
|
|
Thread: Check if clients are online with ips stored in json [SOLVED]
Post: RE: Check if clients are online with ips stored in...
(Jun-26-2022, 05:15 PM)ibreeden Wrote: Hi @AlphaInc ,
I understand you have two problems:
You need to read a JSON file,
You need to know if an IP address responds.
You dit almost right reading t... |
|
AlphaInc |
General Coding Help |
6 |
2,480 |
Jun-27-2022, 06:31 AM |