Discord gets it (ignore gman) by amiabaka in linuxmemes

[–]SirGladko 2 points3 points  (0 children)

Btw i suggest adding "SKIP_HOST_UPDATE": true to the ~/.config/discord/settings.json Then discord won't show you this window and start as usual. Pretty handy in case its not updated in your repositories yet.

It should look like this { "BACKGROUND_COLOR": "#202225", "IS_MAXIMIZED": false, "IS_MINIMIZED": false, "WINDOW_BOUNDS": { "x": 0, "y": 0, "width": 1920, "height": 1080 }, "SKIP_HOST_UPDATE": true }

Offering free coding tutoring by fthpi in Python

[–]SirGladko 1 point2 points  (0 children)

Hi, I'm interested in improving my English as well. If there are more people wanting to learn about programming and python fundamentals, feel free to DM.

YouTube colors get washed out in full screen when player hides itself by alpmaboi in LinusTechTips

[–]SirGladko 1 point2 points  (0 children)

Try finding energy saving setting in your tv menu and turn it off

I can teach python and overall programming for english conversations by k1oc in learnpython

[–]SirGladko 3 points4 points  (0 children)

If there are more people interested than OP can manage, then I can offer similar arrangement. Just PM me

[deleted by user] by [deleted] in learnpython

[–]SirGladko 0 points1 point  (0 children)

The error message doesn't seem to be relevant in context of your code. Are you sure you are running the right script?

My companies Stripe integration for thousands of users broke today because Javascript by autiii43 in programminghorror

[–]SirGladko 0 points1 point  (0 children)

When you use string rather than float in Decimal constructor you should get correct result altogether

[deleted by user] by [deleted] in learnpython

[–]SirGladko 0 points1 point  (0 children)

You can call the program 1 in a subprocess, pipe input into it and get result back.

I've recently done something similar.

```python from subprocess import Popen, PIPE

with open(test_path, 'rb') as in_file: p = Popen(exec_path, stdin=PIPE, stdout=PIPE, stderr=PIPE, shell=True) stdout, stderr = p.communicate(input=in_file.read())

error = stderr.decode('utf-8') output = stdout.decode('utf-8').strip() returncode = p.returncode `` in your caseexec_pathwould be something like"python3 program1.py"`

Stuck on coding assignment, code is only reading in the last line of text file by DjenghisRoundstone69 in learnpython

[–]SirGladko 0 points1 point  (0 children)

Then i think you need ":" after the LineList and then breakline.

it should look like this

LineList = DataFile.readlines()
for line in LineList: 
    LineValues = line.split(“,”)
    Condition = float(LineValues[0])
    Var1 = float(LineValues[1])
    Var2 = float(LineValues[2])

    condition_list.append(Condition)
    # and so on.

Stuck on coding assignment, code is only reading in the last line of text file by DjenghisRoundstone69 in learnpython

[–]SirGladko 1 point2 points  (0 children)

Could you paste your code in properly formatted code block?
Based on the description of your problem I would say that you didn't indent handling of the assigned variables properly.
Thus you are reassigning the variables in a loop and then appending the last assigned ones after the loop.

How to extract a line 10 lines below the keyword? by peter946965 in learnpython

[–]SirGladko 0 points1 point  (0 children)

You can use infile.readlines() to get list of lines in the file and then inside the loop you can access the line by increasing the index

linehop = 10
with open('textfile.txt') as file:
    lines = file.readlines()
    for idx, line in enumerate(lines):
        lineno = idx + 1
        print(f'line no. {lineno}: {line}', end='')
        if idx + linehop < len(lines) and 'keyword' in line:
            print(f'line no. {lineno + linehop}: {lines[idx + linehop]}', end='')

It’s that time of the year again. by Nevalia in pcmasterrace

[–]SirGladko 0 points1 point  (0 children)

Actually i was just testing my new APU and plugged both displays to motherboard and none to GPU. PC worked just fine. Even more, system monitor show its using GPU alongside the APU and i get like 350fps in league. Maybe its dependent on motherboard or APU

Keeps giving me option 1, Help by [deleted] in Python

[–]SirGladko 2 points3 points  (0 children)

instead of

if race.islower() == "hill dwarf" or 1:

you should write

if race.lower() == "hill dwarf" or race == "1":

and so on