Quantcast
Channel: User Louis Maddox - Stack Overflow
Browsing all 45 articles
Browse latest View live

Comment by Louis Maddox on How to perform assignment destructuring using the...

Open question at bugs.python.org/issue43143 (see stackoverflow.com/questions/59567172/…)

View Article



Comment by Louis Maddox on How to get my own GitHub events payload json for...

Word of warning with this: the docs say"Warning: When using the whole github context, be mindful that it includes sensitive information such as github.token. GitHub masks secrets when they are printed...

View Article

Comment by Louis Maddox on Counting commas in a line in bash

I tried this and some of the lines got executed and the shell raised an error that the values were not found... Something not right with this one

View Article

Comment by Louis Maddox on Error while reading data, error message: CSV table...

I resolved this without the allow_jagged_columns option (which says it should be used for columns that are 'optional'. The allow_quoted_newlines flag is the relevant one for this error if it's caused...

View Article

Comment by Louis Maddox on how to grep ASCII control character

This does not work for me (GNU grep 3.4): grep -a '[:cntrl:] does not match the same as grep -a $'\00'. For example piping in printf "hell0\x0\nworld\n:-)\x0:-(\n"

View Article


Comment by Louis Maddox on Google Big Query won't let me schedule query

The question is closed so I have to comment here: this can happen if your browser blocks popups, as the auth for creating/modifying scheduled queries uses a popup. If it's blocked, you see the...

View Article

Comment by Louis Maddox on Unable to create a scheduled query in BigQuery,...

No, you don't need to do this.

View Article

Comment by Louis Maddox on Is there a way in Python to do paragraph...

LexPredict has paragraph segmentation lexpredict-lexnlp.readthedocs.io/en/docs-0.1.6/modules/…

View Article


Comment by Louis Maddox on How to properly write cross-references to external...

There's a guide to the syntax of the inventory here: in particular the format of each line of object data goes {name} {domain}:{role} {priority} {uri}...

View Article


Comment by Louis Maddox on How to increase the maximum size of the AWS lambda...

You can get it down by building these (NumPy and SciPy) from source, I don't know if there's an easier way but see my comments in this thread for key parts of the Dockerfile I used: discuss.python.org/t/…

View Article

Comment by Louis Maddox on No module named 'pydantic_core._pydantic_core' in...

No you don't need to explicitly include pydantic or pydantic_core if using it via FastAPI. pip install fastapi lets import pydantic and import pydantic_core._pydantic_core run just fine. In fact the...

View Article

Comment by Louis Maddox on How do I add selenium & chromedriver to an AWS...

Not the case that selenium requires Dockerising your Lambda! I'll add an alternative approach as a separate answer, I got a zipped size of 70MB. Previously was 44MB (in the midst of an upgrade now, not...

View Article

Comment by Louis Maddox on FastAPI: How to specify possible values for a...

ConfigDict has a flag use_enum_values = True for this case docs.pydantic.dev/latest/api/config/…

View Article


Comment by Louis Maddox on Error with simple subclassing of pathlib.Path: no...

You don't need to do this (define the _flavour attribute) since Python 3.12 docs.python.org/3/whatsnew/3.12.html

View Article

Comment by Louis Maddox on Using Rust nightly in production

Note: Pyo3 moved to stable in 2020 github.com/PyO3/pyo3/issues/5

View Article


Reorder rows of pandas DataFrame according to a known list of values

I can think of 2 ways of doing this:Apply df.query to match each row, then collect the index of each resultSet the column domain to be the index, and then reorder based on the index (but this would...

View Article

Insert mode on Google Keyboard

I've just been typing HTML in a browser tab online and all of a sudden had triggered insert mode (where typing overwrites the following character) using a keyboard on a Chromebook (Chrome OS) - I had...

View Article


How to make vim code folding sync across splits?

I'm trying out code folding in vim but noticed it doesn't seem to mirror across pane splits when using scrollbind to achieve a "2-up" view of a long text/code file with relatively narrow lines (set up...

View Article

Answer by Louis Maddox for cross-compilation terminologies --- build, host...

"There are three system names that the build knows about: the machine you are building on (build), the machine that you are building for (host), and the machine that GCC will produce code for (target)....

View Article

Answer by Louis Maddox for Reading only a part of a large wav file with Python

There are a few packages you may want to look into for handling audio: commonly soundfile is used for I/O, as is librosa. The 'sampling rate' AKA 'frame rate' is the number of audio samples per second,...

View Article
Browsing all 45 articles
Browse latest View live




Latest Images