On 22:43 Sat 04 Mar 2023, Dino wrote:
How can I implement this? A library called Whoosh seems very promising
(albeit it's so feature-rich that it's almost like shooting a fly with
a bazooka in my case), but I see two problems:
1) Whoosh is either abandoned or the project is a mess in terms of
tical tests against
nonuniform PRNGs had already been done somewhere.
--
David Lowry-Duda
--
https://mail.python.org/mailman/listinfo/python-list
On Mon, Dec 05, 2022 at 10:37:39PM -0300, Sabrina Almodóvar wrote:
The Python Paradox
Paul Graham
August 2004
[SNIP]
Hence what, for lack of a better name, I'll call the Python paradox:
if a company chooses to wri
Inspired by the recent thread about pseudorandom number generators on
python-ideas (where I also mistakenly first wrote this message), I began
to wonder: suppose that I had a pseudorandom number generator that
attempted to generate a nonuniform distribution. Suppose for instance
that it was to
One can use the `dis` module and investigate the generated python
bytecode. For me, I get
# file "dis1.py"
thing = 123
for i in range(10):
if "hi" == str(thing):
print("found")
break
The bytecode is then
1 0 LOAD_CONST 0 (123)
2 STORE
On Tue, Oct 11, 2022 at 12:32:23PM -0700, SquidBits _ wrote:
Does anyone else think there should be a flatten () function, which just turns
a multi-dimensional list into a one-dimensional list in the order it's in. e.g.
[[1,2,3],[4,5,6,7],[8,9]] becomes [1,2,3,4,5,6,7,8,9].
I have had to flatt
On Tue, Jul 19, 2022 at 03:58:41PM +0200, Antoon Pardon wrote:
I am writing a python package which has the following structure
PACKAGE
* module1.py
* module2.py
* data.cfg
However the data.cfg should be build at installation time.
Can someone give advise on which packaging tool and ho
Please don't use all caps in the subject line. It comes across as if
you're yelling at the list --- this doesn't make people want to be more
helpful.
Instead, use meaningful, specific subject headers. Also, please be
precise and informative about what your problem is. It's not clear what
you
> Hi.I am learning python and I am working with some netCDF files.
> Suppose I have temperature data from 1950-2020 and I want data for
> only 1960-2015. How should I extract it. --
Alternately, use https://unidata.github.io/netcdf4-python/ or gdal.
It might also be possible to read
https://st
> l1=['a','b','c']
> l2=['j','k','l']
>
> I want to build a string like this
> "foo a j, b k, c l bar"
> Is it possible to achieve this with f strings or any other
> simple/efficient way?
Here is a small list of things that want to be done (and natural ways to
perform them)
1. pair items in th
On Tue, Nov 16, 2021 at 06:24:43PM -0500, Alan Bawden wrote:
>```python
>def add_to(elem, inlist=[]):
>inlist.append(elem)
>return inlist
>
>list1 = add_to(1)
>list2 = add_to(2)
>print(list1) # prints [1]
>print(list2) # prints [1, 2], potentially confusin
On Tue, Nov 16, 2021 at 05:04:05PM +0400, Abdur-Rahmaan Janhangeer wrote:
> A simple question: why do we need field(default_factory ) in
> dataclasses?
For the same reason that the following code doesn't do what some people
might expect it to:
```python
def add_to(elem, inlist=[]):
inlist.a
> x_increment, y_increment = (scale * i for i in srcpages.xobj_box[2:])
>
> (scale * i for i in srcpages.xobj_box[2:]) is a generator, a single
> object, it should not be possible to unpack it into 2 variables.
If you know the exact number of values in the generator, you can do
this. Here is an
> Have I missed something and has the maillinglist been moved. Activity
> is very low here, about one message every five days.
I think you might need to check how you access the mailing list. There
have been more than 5 messages in the last day. See for example the
archives:
https://mail.pyth
> I am using the first bar graph listed at this site:
> https://matplotlib.org/stable/gallery/index.html
>
> The problem I have is that there is too much white space around the graph.
> My data would be better displayed if I could widen the graph into the space
> to the right and left of the chart
> I am trying to modify the "Bar Graph Demo" at
> https://matplotlib.org/stable/gallery/index.html, Lines, bars, and
> markers
> but the more I experiment and change the code, the more messed up it
> becomes.
It is much easier to give constructive suggestions if you give a minimum
runnable code
> You wouldn't see Tim Peters or even Guido here nowadays, and
> Steven D'Aprano was IMO forced out for no good reason ... you see
> the results here every day...
What happened to Steven D'Aprano?
- DLD
--
https://mail.python.org/mailman/listinfo/python-list
> Are there reasons why someone might prefer StackOverflow to this list?
> Are they more to do with the person, or something the Python Community
> should address?
I think general discoverability is a driving force. A beginner has a
problem, goes to google, types in their problem, and sees some l
Hello,
> I've created a code to run a 2D mapping using matplotlib from a .csv
> file.
> I've tried to set the maximum color (red) of the scale as 80% of the maximum
> value and not as the maximum value of my .csv file.
> Does someone know how to modify that?
If I understand what you're trying t
> assert condition, expression
>
> Only is condition is false with expression be evaluated.
> So you can safely do expensive things I the expression with incuring
> and cost if the condition is True.
I think I've only every used a string as the expression. Have you found
it useful to use compli
uage
do they use? And does it influence math education at all? (Coming from
someone who sometimes tries to teach undergraduates about math).
- David Lowry-Duda
--
https://mail.python.org/mailman/listinfo/python-list
t.
You can examine this with this little code.
```
arr = [1, 2, 3]
arr_other = arr
arr_other[1] = "different"
print(arr_other) # This line prints the same
print(arr) # array as this line.
```
Thus when you assign `tt = arr2`, modifying `tt` will modify `arr2`, and
vice-ver
On Thu, Jan 21, 2021 at 06:19:03AM -0500, TheGemmyGuy wrote:
> A quick question; for mailing, do I send a message through e-mail or the
> Python Mailman page?
Whatever you did here works. I use email. - DLD
--
https://mail.python.org/mailman/listinfo/python-list
> I want to have an argument's presence only - value is not required.
> For example, my program main.py needs to know if "-r" is present when program
> is invoked.
> So the value command line would be:
> (1) python3 main.py -r
> or...
> (1) python3 main.py
>
> I tried following:
> parser.add_ar
. And given an object or
funcation, appending `?` will bring up the documentation (as given in
the docstring) for that object or function. This is true even for
user-defined functions and objects, even if they were defined during the
same interactive session.
Good luck!
--
David Lowry-Du
n dictionary
# d doesn't "know" that myobj1 and myobj2 are "the same"
```
This difference in behavior is due to the default __hash__ and __eq__
methods for myclass, which don't consider the attributes of each
instance, whereas the hashing and comparison of tuples does consider the
contents of the tuple.
- DLD
--
David Lowry-Duda
--
https://mail.python.org/mailman/listinfo/python-list
ert it to Python 3 without having the
> source?
Unfortunately, you'll need to recompile the .so file (or replace the
dependency). Good luck!
- DLD
--
David Lowry-Duda
--
https://mail.python.org/mailman/listinfo/python-list
that come up while you're trying to
write a solution, I think more people would be more inclined to help.
Good luck! - DLD
--
David Lowry-Duda
--
https://mail.python.org/mailman/listinfo/python-list
C is a frequent lowest-common-denominator language. Is my
understanding right?
- DLD
--
David Lowry-Duda
--
https://mail.python.org/mailman/listinfo/python-list
On Wed, Dec 04, 2019 at 07:17:58PM +0100, Christian Heimes wrote:
>
> At least the first pages are packaging files for Debian, Fedora, and
> other Linux distributions. Downstream distributions provide a Python
>
>
>
> Attackers abuse the fact and try to typo-squat packages in hope that
> somebod
I notice that "python3-dateutil" is in over 4000 github repositories
[1]. That sounds like a disaster.
[1]: https://github.com/search?q=python3-dateutil&type=Code
- DLD
--
David Lowry-Duda
--
https://mail.python.org/mailman/listinfo/python-list
mething
like
\documentclass[12pt, a4paper]{article}
If you wanted a completely different (and perhaps lackluster) approach,
you could just view the notebook in your favorite browser and
print-to-pdf.
Good luck!
DLD
--
David Lowry-Duda
--
https://mail.python.org/mailman/listinfo/python-list
add(*matrix):
print(len(matrix))
and this will tell you how many arguments were passed in.
Good luck!
David Lowry-Duda
--
https://mail.python.org/mailman/listinfo/python-list
()`, it can
be a bit nonintuitive how to alter the plot through the MATLAB-style
interface. I think this might be happening here.
If you provide a complete minimally-running-code sample, I'd be happy to
go through it in a bit more detail.
- David Lowry-Duda
--
https://mail.python.org/ma
34 matches
Mail list logo