Python Forum
Search Results
Post Author Forum Replies Views Posted [asc]
    Thread: How to find link to video file from URL
Post: RE: How to find link to video file from URL

The problem is, that requesting a Video requires a valid session (Cookie and Authkey). Maybe it's easier to use selenium. Otherwise, you've to reverse engineer the way how authorization works on this ...
DeaD_EyE Web Scraping & Web Development 21 777 May-11-2022, 01:51 PM
    Thread: What reason have you quit a job?
Post: RE: What reason have you quit a job?

I didn't quit my last (low-tech) job, I was fired, and this was a lucky chance. In my new (high-tech) job, I learned myself to program industrial robots and I visited many countries for commissioning....
DeaD_EyE Bar 11 1,731 May-07-2022, 11:05 AM
    Thread: [solved] Basic question on list matchiing
Post: RE: [solved] Basic question on list matchiing

You could use ArgumentParser, which returns a Namespace, where you can access for example to answer. from argparse import ArgumentParser ANSWERS = ("n", "y") def get_args(): parser = Argument...
DeaD_EyE General Coding Help 7 308 May-02-2022, 01:03 PM
    Thread: getting mantissa size of float
Post: RE: getting mantissa size of float

Yes, I was talking about the implicit 1. Quote:Perhaps sys.float_info.mant_dig is the required information? It gives 53 on my system. Same here. It's hard to find a different result.
DeaD_EyE General Coding Help 7 429 May-02-2022, 12:47 PM
    Thread: getting mantissa size of float
Post: RE: getting mantissa size of float

(May-02-2022, 07:46 AM)Gribouillis Wrote: What does this mean? What is the ┬źeffective mantissa┬╗. Do you have a reference for this? IEEE 754: A double precision float (64 bit) has 52 bits for mantiss...
DeaD_EyE General Coding Help 7 429 May-02-2022, 07:53 AM
    Thread: getting mantissa size of float
Post: RE: getting mantissa size of float

There is a function in the module math: https://docs.python.org/3/library/math.html#math.frexp It returns different values, but after the calculation you get the same result. I'm not complete sure wh...
DeaD_EyE General Coding Help 7 429 May-02-2022, 07:47 AM
    Thread: getting mantissa size of float
Post: RE: getting mantissa size of float

Not so easy. From stackoverflow: https://stackoverflow.com/questions/4533...ut-strings I think this is the best solution (float.mantissa() and float.exponent() would be nicer): from decimal import De...
DeaD_EyE General Coding Help 7 429 May-02-2022, 07:34 AM
    Thread: Can I check multi condition for 1 item in a easy way?
Post: RE: Can I check multi condition for 1 item in a ea...

if item and item not in Error_List: print(item)This should work, if item is a NoneType, Boolean or something different which is not in Error_List.
DeaD_EyE General Coding Help 4 364 May-01-2022, 12:21 PM
    Thread: What am I doing wrong?
Post: RE: What am I doing wrong?

Try this: EC.presence_of_element_located((By.PARTIAL_LINK_TEXT, ltext)))Reference: https://selenium-python.readthedocs.io/w...icit-waits
DeaD_EyE Web Scraping & Web Development 2 461 Apr-29-2022, 06:35 AM
    Thread: SystemError: initialization of integer failed without raising an exception
Post: RE: SystemError: initialization of integer failed ...

This does run with Python 3.7 https://github.com/JHUISI/charm/issues/239 The last update was 2015, so 7 years ago (2022). This is a very long time for crypto libraries.
DeaD_EyE General Coding Help 2 246 Apr-19-2022, 10:46 AM
    Thread: database versus flat files
Post: RE: database versus flat files

(Apr-19-2022, 07:39 AM)DPaul Wrote: I'm currently involved in transforming large legacy "databases" (excel, access, csv...) into something organised and searchable by the public. Searchable by publ...
DeaD_EyE Bar 9 329 Apr-19-2022, 10:33 AM
    Thread: Process finished with exit code 137 (interrupted by signal 9: SIGKILL)
Post: RE: Process finished with exit code 137 (interrupt...

This is an OOM (Out-Of-Memory). The sigkill comes from the Kernel because it's out of free memory. buy more RAM use an iterative approach to process data in smaller chunks, which fits into RAM run y...
DeaD_EyE General Coding Help 2 372 Apr-18-2022, 06:08 PM
    Thread: Pass variable to subprocess
Post: RE: Pass variable to subprocess

4 alternatives: import subprocess # VARIABLE=12 # v_num_final_distinct_grid_disks_per_cell_and_dg = subprocess.check_output("cat /tmp/logall | sort -u | grep -v VARIABLE", shell=True) # grep -v is i...
DeaD_EyE General Coding Help 4 340 Apr-12-2022, 12:35 PM
    Thread: Tracking leap.py years for gregorian calendar (Exercism org)
Post: RE: Tracking leap.py years for gregorian calendar ...

(A leap year is divisible by 4) and (a leap year is not divisible by 100 or a leap year divisible by 400). Natural language is unsuitable for programming tasks because ambiguities and inaccuracies are...
DeaD_EyE Homework 10 691 Apr-04-2022, 09:56 PM
    Thread: forloop to compute sum by alternating from addition to subtraction
Post: RE: forloop to compute sum by alternating from add...

Example with operator, iterator.cycle and Fraction. It's not the "better" way, just a different way to show up, what is Python able to do. The better way is often lesser code and not more code. impor...
DeaD_EyE General Coding Help 3 322 Apr-02-2022, 09:36 AM
    Thread: Video Streaming
Post: RE: Video Streaming

Then you've to transcode the whole material or find something, which can play mjpeg. On-The-Fly Transcoding on the server is also possible, but it eats up your CPU/GPU on the server. Here is a tutor...
DeaD_EyE News and Discussions 4 375 Mar-31-2022, 02:44 PM
    Thread: convert a named tuple to a dictionary
Post: RE: convert a named tuple to a dictionary

(Mar-31-2022, 05:38 AM)buran Wrote: BTW, my question "why" was targeted at others, suggesting functions that mimic the method. It helps to understand how Python works. Looking in existing Python-Cod...
DeaD_EyE General Coding Help 13 712 Mar-31-2022, 10:28 AM
    Thread: Video Streaming
Post: RE: Video Streaming

Quote:requirements: - The player must be in the browser. You could use JavaScript: https://videojs.com/guides/embeds/ There are many other existing projects, which do the same. It's not possible with...
DeaD_EyE News and Discussions 4 375 Mar-30-2022, 02:13 PM
    Thread: [SOLVED] Concat data from dictionary?
Post: RE: Concat data from dictionary?

from tkinter import Tk from tkinter import messagebox from itertools import chain from ipaddress import ip_address from netifaces import interfaces, ifaddresses, AF_INET, AF_INET6 Tk().withdraw() #...
DeaD_EyE General Coding Help 4 370 Mar-30-2022, 01:59 PM
    Thread: list, map and put of the Queue in the Tree Data Structure
Post: RE: list, map and put of the Queue in the Tree Dat...

Queue.put returns None, but the method is still called, and the elements are put into the queue. map can be used to make such funny things. The biggest disadvantage is that you can't do error handling...
DeaD_EyE Homework 6 464 Mar-30-2022, 12:44 PM

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020