On 24/11/2023 16:35, duncan smith wrote:
On 24/11/2023 14:31, Loris Bennett wrote:
Hi,
I want to print some records from a database table where one of the
fields contains a JSON string which is read into a dict. I am doing
something like
print(f"{id} {d['foo']} {d['ba
On 24/11/2023 14:31, Loris Bennett wrote:
Hi,
I want to print some records from a database table where one of the
fields contains a JSON string which is read into a dict. I am doing
something like
print(f"{id} {d['foo']} {d['bar']}")
However, the dict does not always have the same keys, so
On 26/9/23 22:27, Abdelkhelk ashref salay eabakh via Python-list wrote:
Dear Python team,
This is my not first time using Python, I tried to launch Python and it showed
I'm no expert but
"Python 3.11.3 (tags/v3.11.3:f3909b8, Apr 4 2023, 23:49:59) [MSC v.1934 64 bit
(AMD64)] on win
surel
On 31/12/22 16:45, Goran Ikac wrote:
Happy New Year, everybody!
I'm new in the Python List, new in Python world, and new in coding.
A few days (weeks?) ago, I faced a problem trying to write a program for an
exercise. I asked for help and nobody answered.
In the meantime, I found a part of the so
On Fri, Nov 11, 2022 at 8:16 PM Eryk Sun wrote:
> If sys.std* are console files, then in Python 3.6+, sys.std*.buffer.raw will
> be _io._WindowsConsoleIO
> io.TextIOWrapper uses locale.getpreferredencoding(False) as the default
> encoding
Thank you for your replies - checking the sys.stdout.buf
Consider the following code ran in Powershell or cmd.exe:
$ python -c "print('└')"
└
$ python -c "print('└')" > test_file.txt
Traceback (most recent call last):
File "", line 1, in
File "C:\Program Files\Python38\lib\encodings\cp1252.py", line 19, in encode
return codecs.charmap_encode(i
Hello,
Weird issue I've found on Windows images in Azure Devops Pipelines and
Github actions. Printing Unicode characters fails on these images because,
for some reason, the encoding is mapped to cp1252. What is particularly
weird about the code page being set to 1252 is that if you execute "chcp"
On Fri, 7 Oct 2022 18:28:06 +0100
Barry wrote:
> > On 7 Oct 2022, at 18:16, MRAB wrote:
> >
> > On 2022-10-07 16:45, Skip Montanaro wrote:
> >>> On Fri, Oct 7, 2022 at 9:42 AM Andreas Ames
> >>>
> >>> wrote:
> >>> 1. The culprit was me. As lazy as I am, I have used f-strings all over the
>
On Wednesday, February 1, 2017 at 11:55:35 AM UTC, Terry Reedy wrote:
> On 2/1/2017 1:37 AM, Christian Gollwitzer wrote:
> > Am 01.02.17 um 00:02 schrieb MRAB:
> >> On 2017-01-31 22:34, Christian Gollwitzer wrote:
> .!frame.!checkbutton
> .!frame.!checkbutton2
> .!frame2.!checkb
On Wednesday, February 1, 2017 at 11:55:35 AM UTC, Terry Reedy wrote:
> On 2/1/2017 1:37 AM, Christian Gollwitzer wrote:
> > Am 01.02.17 um 00:02 schrieb MRAB:
> >> On 2017-01-31 22:34, Christian Gollwitzer wrote:
> .!frame.!checkbutton
> .!frame.!checkbutton2
> .!frame2.!checkb
On 10/04/2022 21:20, Antoon Pardon wrote:
Op 9/04/2022 om 02:01 schreef duncan smith:
On 08/04/2022 22:08, Antoon Pardon wrote:
Well my first thought is that a bitset makes it less obvious to calulate
the size of the set or to iterate over its elements. But it is an idea
worth exploring
On 08/04/2022 22:08, Antoon Pardon wrote:
Op 8/04/2022 om 16:28 schreef duncan smith:
On 08/04/2022 08:21, Antoon Pardon wrote:
Yes I know all that. That is why I keep a bucket of possible duplicates
per "identifying" field that is examined and use some heuristics at the
end
On 08/04/2022 08:21, Antoon Pardon wrote:
Op 8/04/2022 om 08:24 schreef Peter J. Holzer:
On 2022-04-07 17:16:41 +0200, Antoon Pardon wrote:
Op 7/04/2022 om 16:08 schreef Joel Goldstick:
On Thu, Apr 7, 2022 at 7:19 AM Antoon Pardon
wrote:
I am working with a list of data from which I have t
On Wednesday, January 19, 2022 at 11:14:28 PM UTC-5, cameron...@gmail.com wrote:
> But I recommend you use shell=False and make:
>
> cmd = ["/usr/bin/transmission-remote", "--torrent", str(torrentno), "--info"]
I like that. :-)
--
https://mail.python.org/mailman/listinfo/python-list
On Wednesday, January 19, 2022 at 11:08:58 PM UTC-5, Dennis Lee Bieber wrote:
> Don't you need to provide for that %s? Perhaps
>
> cmd="/usr/bin/transmission-remote --torrent %s --info" % torrentno
That works, thanks.
--
https://mail.python.org/mailman/listinfo/python-list
I'm trying to run a shell command but the stdout is empty:
import subprocess
torrentno=8
cmd="/usr/bin/transmission-remote --torrent %s --info", str(torrentno)
res=subprocess.run(cmd, shell=True, check=True, universal_newlines=True,
capture_output=True)
print(res)
CompletedProcess(args=('/usr/b
I downloaded python. I selected it from the start menu. I clicked on:-
Python 3-9New
I got:-
IDLE (Python 3.9 64-bit)
Python 3.9 (64-bit)
Python 3.9 Manuals (64-bit)
Python 3.9 Module Docs (64-bit)
I wish to access the page where I do coding.I would appreciate help, either
directly, or with inform
First off, thanks for the answer. I don't see the cached module as a problem
here. If you provide arguments to a module, the goal is "most likely" to
alter/parameterize the behavior of the first import. Now, I agree that behavior
becomes unpredictable because passing different parameters on subs
I have found myself wanting to import module and provide arguments to them.
There's two main reason I could think of for this. First is to prevent a
circular import, though most of circular imports can be prevented by changing
the design. The second reason is to invert dependencies between two m
On 13/02/2021 19:12, Dan Stromberg wrote:
> On Sat, Feb 13, 2021 at 10:25 AM duncan smith
> wrote:
>
>> On 12/02/2021 03:04, Terry Reedy wrote:
>>> On 2/11/2021 3:22 PM, duncan smith wrote:
>>>
>>>>It seems that I can mutate a deque while i
On 12/02/2021 03:04, Terry Reedy wrote:
> On 2/11/2021 3:22 PM, duncan smith wrote:
>
>> It seems that I can mutate a deque while iterating over it if I
>> assign to an index, but not if I append to it. Is this the intended
>> behaviour?
>
> Does the deque d
Hello,
It seems that I can mutate a deque while iterating over it if I
assign to an index, but not if I append to it. Is this the intended
behaviour? It seems a bit inconsistent. Cheers.
Duncan
>>> from collections import deque
>>> d = deque(range(8))
>>> it = iter(d)
>>> next(it)
0
>>> d[1
On 27/01/2021 22:41, C W wrote:
> Great tutorial Irv, very simple with if-else example, gets the point
> across.
>
> My main takeaway from the discussion so far is that: you can't troubleshoot
> Python without some kind of breakpoint or debugger.
>
[snip]
Really?
Duncan
--
https://mail.python
On 04/11/2020 19:12, Avi Gross wrote:
> My comments at end:
>
> -Original Message-
> From: Python-list On
> Behalf Of duncan smith
> Sent: Wednesday, November 4, 2020 1:09 PM
> To: python-list@python.org
> Subject: Re: Find word by given characters
>
>
On 04/11/2020 04:21, Avi Gross wrote:
> Duncan, my comments below yours at end.
>
> ---YOURS---
> The Counter approach only requires iterating over the letters once to
> construct the letters bag, then each word once to create the relevant word
> bag. After that it's (at worst) a couple of lookups
On 03/11/2020 22:14, Avi Gross wrote:
> I, too, have wondered what exactly the point was of the required
> functionality for SCRABBLE but note you can extend a current word so
> additional letters may be available in a game but only if they are an exact
> fit to put before, after, or in middle of y
On 03/11/2020 23:35, Bischoop wrote:
> On 2020-11-03, duncan smith wrote:
>>>
>>
>>>>> from collections import Counter
>>>>> letters = 'att'
>>>>> letter_counts = Counter(letters)
>>>>> word = 'tolerate
On 03/11/2020 14:06, Bischoop wrote:
> On 2020-11-03, dn wrote:
>>
>>
>> The (full) specs are not clear. There's certainly room for
>> misunderstanding. I'd be happier if I could 'see' a full spec or
>> recognise a practical application, because then we'd be better able to
>> discuss facts. Mea
On 02/11/2020 19:09, dn wrote:
> On 02/11/2020 23:29, Bischoop wrote:
>> On 2020-11-01, duncan smith wrote:
>>>>
>>>
>>> But this generates the letters counts for each word. They only need to
>>> be generated once (outside the for loop). And usi
On 01/11/2020 13:38, Bischoop wrote:
> On 2020-11-01, Bischoop wrote:
>> I'm working on a script i which user inputs letters and then a printed
>> words containing those letters. The scripts works however I can't solve
>> one problem , it prints also words in which these letters occur more
>> tha
On 19/07/2020 16:11, Dino wrote:
> On 7/19/2020 4:54 PM, duncan smith wrote:
>>
>> It depends on what you expect the result to be. There's nothing
>> inherently wrong with transforming variables before using least squares
>> fitting. Whether it gives you the "
On 19/07/2020 11:19, Dino wrote:
>
> Hi, I am looking at someone else's code trying to understand their use
> of numpy.polyfit.
>
> My understanding was that you can use it to fit polynomials, but
> apparently, the original author has used it for logarithmic and
> exponential curves as well this
I tried:
dt=+"{:02d}".format(day)
but I got:
dt=+"{:02d}".format(day)
TypeError: bad operand type for unary +: 'str'
This works:
dt=dt+"{:02d}".format(day)
Why can't I do the shortcut on strings?
--
https://mail.python.org/mailman/listinfo/python-list
I am having the same issue. I can either get the text to wrap, which makes all
the text wrap, or I can get the text to ignore independent '/n' characters, so
that all the blank space is removed. I'd like to set up my code, so that only 1
blank space is remaining (I'll settle for none at this poi
On 21/03/2020 21:55, Skip Montanaro wrote:
>> import sys
>>
>> class C_hash(int if sys.version_info.major >= 3 else long):
> ...
>
> There's nothing incorrect with your solution. Chris offered another. I
> was going to suggest you consider running your code through 2to3 to
> see what it does. I cr
Hello,
I have a class I wrote for Python2 that needs to be made to work
on Python3. On Python2 it inherited from long, so it needs to inherit
from int on Python3. The following works, but I'm not sure it's the
cleanest solution. It's the first time I've wanted / needed to make a
parent class
On 20/03/2020 21:57, Barry wrote:
>
>
>> On 20 Mar 2020, at 00:42, duncan smith wrote:
>>
>> Bingo. Performance is indistinguishable from that of the list. Thread
>> safety is unimportant (for my purposes), but the docs at
>> https://docs.python.org/2/librar
On 19/03/2020 20:40, MRAB wrote:
> On 2020-03-19 20:08, duncan smith wrote:
>> Hello,
>> I have generator code along the following lines,
>>
>>
>> Q = queue.Queue()
>> Q.put(x)
>> while not Q.empty():
>> x = Q.get()
>>
Hello,
I have generator code along the following lines,
Q = queue.Queue()
Q.put(x)
while not Q.empty():
x = Q.get()
if :
yield x
else:
Q.put()
If I change it to,
Q = []
Q.append(x)
for x in Q:
if :
yield x
else:
Q.append()
then it runs a
On 14/02/2020 23:21, Dan Stromberg wrote:
> On Fri, Feb 14, 2020 at 3:10 PM Stefan Ram wrote:
>
>> By trial and error (never read documentation!) I found
>> that you can count the number of e's in a text by just
>>
>> Counter( text ).get( 'e' )
>>
>> (after »from collections import Counter«
On 16/12/2019 21:08, DL Neil wrote:
> On 17/12/19 5:19 am, Chris Angelico wrote:
>> On Tue, Dec 17, 2019 at 3:16 AM duncan smith
>> wrote:
>>>
>>> Hello,
>>> Not really specific to Python or matplotlib (but that's what I'm
>>&
Hello,
Not really specific to Python or matplotlib (but that's what I'm
using). I'm looking for a good combination of colours and symbols for
scatter plots, and combination of colours and line styles for line
plots. Too often I find myself producing these when I don't know whether
they will e
On 07/12/2019 17:48, RobH wrote:
> I am trying to do this project on a pi zero:
>
> http://frederickvandenbosch.be/?p=1365
>
> After overcoming a few errors, I now have the display working and the
> start of the code showing on the display, that being the time.
>
> It doesn't move on to the next
On 18/10/2019 23:57, DL Neil wrote:
> On 17/10/19 7:52 AM, MRAB wrote:
>> On 2019-10-16 19:43, duncan smith wrote:
>>> On 16/10/2019 04:41, DL Neil wrote:
>>>> On 16/10/19 1:55 PM, duncan smith wrote:
>>>>> On 15/10/2019 21:36, DL Neil wrote:
&g
On 16/10/2019 19:52, MRAB wrote:
> On 2019-10-16 19:43, duncan smith wrote:
>> On 16/10/2019 04:41, DL Neil wrote:
>>> On 16/10/19 1:55 PM, duncan smith wrote:
>>>> On 15/10/2019 21:36, DL Neil wrote:
>>>>> On 16/10/19 12:38 AM, Rhodri James wrote:
&
On 16/10/2019 04:41, DL Neil wrote:
> On 16/10/19 1:55 PM, duncan smith wrote:
>> On 15/10/2019 21:36, DL Neil wrote:
>>> On 16/10/19 12:38 AM, Rhodri James wrote:
>>>> On 14/10/2019 21:55, DL Neil via Python-list wrote:
>>> ...
>>> So, yes, the &q
On 15/10/2019 21:36, DL Neil wrote:
> On 16/10/19 12:38 AM, Rhodri James wrote:
>> On 14/10/2019 21:55, DL Neil via Python-list wrote:
> ...
>
>>> It seemed better (at the design-level) to have Man( Person ) and
>>> Woman( Person ) sub-classes to contain the pertinent attributes,
>>> source more d
Hello,
The problem I have relates to writing algorithmic code that can
handle types with a given API, but where some of the required
functionality is implemented as library functions rather than methods.
Specifically I have code that uses numpy arrays, but I want to adapt it
to use sparse arr
On 16/05/2019 22:50, Rich Shepard wrote:
> I'm developing a Python3 application using Python3-3.7.3 and
> virtualenv-16.5.0 on a Slackware-14.2 host.
>
> The project directory contains subdirectories, including gui/ (with the
> tkinter views) and classes/ with the SQLAlchemy model.py.
>
> Within
On 28/08/2017 20:17, Leam Hall wrote:
> On 08/28/2017 11:40 AM, Dennis Lee Bieber wrote:
>
> ... a bunch of good stuff ...
>
> I'm (re-)learning python and just trying make sure my function works.
> Not at the statistical or cryptographic level. :)
>
> Thanks!
>
> Leam
If it's supposed to ge
On 07/03/2019 00:18, Ethan Furman wrote:
> On 03/06/2019 10:30 AM, duncan smith wrote:
>
>> I've been trying to figure out why one of my classes can be
>> pickled but not unpickled. (I realise the problem is probably with the
>> pickling, but I get the error when I
On 06/03/2019 20:24, Peter Otten wrote:
> duncan smith wrote:
>
>> On 06/03/2019 16:14, duncan smith wrote:
>>> Hello,
>>> I've been trying to figure out why one of my classes can be
>>> pickled but not unpickled. (I realise the problem is probabl
On 06/03/2019 16:14, duncan smith wrote:
> Hello,
> I've been trying to figure out why one of my classes can be
> pickled but not unpickled. (I realise the problem is probably with the
> pickling, but I get the error when I attempt to unpickle.)
>
> A relatively mi
[snip]
Sorry, this is Python 3.6 on Linux.
Duncan
--
https://mail.python.org/mailman/listinfo/python-list
Hello,
I've been trying to figure out why one of my classes can be
pickled but not unpickled. (I realise the problem is probably with the
pickling, but I get the error when I attempt to unpickle.)
A relatively minimal example is pasted below.
>>> import pickle
>>> class test(dict):
" NOT "reply"
Sorry I can't help you on your initial problem
Regards,
Chris Roy-Smith
--
https://mail.python.org/mailman/listinfo/python-list
On 14/01/2019 20:11, duncan smith wrote:
> Hello,
> Just checking to see if anyone has attacked this problem before
> for cases where the population size is unfeasibly large. i.e. The number
> of categories is manageable, but the sum of the frequencies, N,
> precludes simple
On 15/01/2019 17:59, Ian Hobson wrote:
> Hi,
>
> If I understand your problem you can do it in two passes through the
> population.
>
The thing is that I start with the population histogram and I want to
generate a sample histogram. The population itself is too large to deal
with each population
On 15/01/2019 02:41, Spencer Graves wrote:
>
>
> On 2019-01-14 18:40, duncan smith wrote:
>> On 14/01/2019 22:59, Gregory Ewing wrote:
>>> duncan smith wrote:
>>>> Hello,
>>>> Just checking to see if anyone has attacked this problem be
On 14/01/2019 22:59, Gregory Ewing wrote:
> duncan smith wrote:
>> Hello,
>> Just checking to see if anyone has attacked this problem before
>> for cases where the population size is unfeasibly large.
>
> The fastest way I know of is to create a list of cum
Hello,
Just checking to see if anyone has attacked this problem before
for cases where the population size is unfeasibly large. i.e. The number
of categories is manageable, but the sum of the frequencies, N,
precludes simple solutions such as creating a list, shuffling it and
using the first
On 02/12/2018 18:36, Peter Otten wrote:
> duncan smith wrote:
>
>> Hello,
>> I have a lot of functions that take an instance of a particular
>> class as the first argument. I want to create corresponding methods in
>> the class. I have tried the following, wh
On 02/12/2018 18:26, Stefan Ram wrote:
> duncan smith writes:
>> I have tried to find examples of injecting methods into classes without
>
> Wouldn't the normal approach be to just define a
> class with your functions as instance methods?
>
> main.py
>
Hello,
I have a lot of functions that take an instance of a particular
class as the first argument. I want to create corresponding methods in
the class. I have tried the following, which (when called from __init__)
creates the relevant methods in an instance (Python 3.6).
def init_methods(s
On 16/11/18 14:51, Steve Keller wrote:
> Why do the integers 0 and 1 compare equal to the boolean values False
> and True and all other integers to neither of them?
>
> $ python3
> Python 3.5.2 (default, Nov 12 2018, 13:43:14)
> [GCC 5.4.0 20160609] on linux
> Type "help", "copyrig
Hello,
I'm writing some code for sparse arrays that is intended to pretty
much follow the numpy API. Because my arrays can have different default
values there is an issue with using the 'out' keyword argument for
functions. e.g. If I elementwise multiply 2 arrays with defaults a and
b, then t
On 01/09/18 18:11, moha...@gmail.com wrote:
> All,
>
> I m trying to run this small script to find the lowest of the given array of
> numbers. The script works fine for various combination of inputs but fails in
> a weird way for a particular set of inputs, can anyone point the mistake in
> the
Hello,
I have been trying to work out how to export data from a dash
application. I know little about html or javascript. I can upload data
into a table as per the example at
https://github.com/plotly/dash-core-components/pull/73. I can edit the
data in the table. But I can't find a way of ex
On 16/04/18 17:03, Irv Kalb wrote:
> I have been writing OOP code for many years in other languages and for the
> past few years in Python. I am writing new curriculum for a course on OOP in
> Python. In order to see how others are explaining OOP concepts, I have been
> reading as many books a
On 16/03/18 23:16, Steven D'Aprano wrote:
> The bug tracker currently has a discussion of a bug in the median(),
> median_low() and median_high() functions that they wrongly compute the
> medians in the face of NANs in the data:
>
> https://bugs.python.org/issue33084
>
> I would like to ask peo
On 23/01/18 23:42, Vincent Davis wrote:
> On Tue, Jan 23, 2018 at 4:15 PM Dennis Lee Bieber
> wrote:
>
>> On Tue, 23 Jan 2018 13:51:55 -0700, Vincent Davis
>> declaimed the following:
>>
>>> Looking for suggestions. I have an ordered list of names these names will
>>> be reordered. I am looking
On 17/01/18 14:29, leutrim.kal...@gmail.com wrote:
>
> Hello everyone,
>
> I am implementing a time-dependent Recommender System which applies BPR
> (Bayesian Personalized Ranking), where Stochastic Gradient Ascent is used to
> learn the parameters of the model. Such that, one iteration involv
On 21/12/17 19:06, John Ladasky wrote:
> On Thursday, December 21, 2017 at 7:37:39 AM UTC-8, MRAB wrote:
>
>> Python never makes a copy unless you ask it to.
>>
>> What x1=X does is make the name x1 refer to the same object that X
>> refers to. No copying.
>
> Well, except with very simple, muta
On 20/11/17 15:48, Jason wrote:
> a pipeline can be described as a sequence of functions that are applied to an
> input with each subsequent function getting the output of the preceding
> function:
>
> out = f6(f5(f4(f3(f2(f1(in))
>
> However this isn't very readable and does not support co
If we keep the current implementation as is, perhaps the documentation
should at least be altered ?
--
https://mail.python.org/mailman/listinfo/python-list
I wouldn't say I'm a Python noob, but I wouldn't say I'm a Python expert
either. I work in data science and use Pandas Dataframes a lot. My question is
regarding the difference in calling out a specific row, column combination in a
dataframe.
I see 3 ways of doing this:
(1) df.loc[row_ind, colu
On 22/07/2017 22:21, Albert-Jan Roskam wrote:
df1['difference'] = (df1 == df2).all(axis=1)
below here there is the mistake :
In [17]: diff = df1['difference'] = (df1 == df2).all(axis=1)
---
ValueError
On 22/07/2017 22:21, Albert-Jan Roskam wrote:
(sorry for top posting)
Try:
df1['difference'] = (df1 == df2).all(axis=1)
here below there is the mistake :
In [17]: diff = df1['difference'] = (df1 == df2).all(axis=1)
Hello to all,
I should compare two excel files with pandas.
Who can help me?
Do you have any links?
i tried this, but not working
import pandas as pd
df1 = pd.read_excel('excel1.xlsx')
df2 = pd.read_excel('excel2.xlsx')
difference = df1[df1!=df2]
print (difference)
Thank you
--
https://mail.p
On Sun, 09 Jul 2017 21:47:58 -0500, John Black wrote:
> In article <477bde19-0653-4e41-a717-0efe90ac5...@googlegroups.com>,
> timetowal...@gmail.com says...
>>
>> I use https://groups.google.com/forum/#!forum/comp.lang.python to look
>> over message posts.
>>
>> What's with all of the Case Solut
Hello to all,
I wanted to ask you how I could delete a line of an environment variable
(PATH)
~/Scaricati/pycharm-2017.1.4/bin$ echo $PATH | sed s/:/'\n'/g
/usr/local/sbin
/usr/local/bin
/usr/sbin
/usr/bin
/sbin
/bin
/usr/games
/usr/local/games
/snap/bin
/path/to/my/program ---> linea da elimi
On Sun, 14 May 2017 15:30:52 +0200, Pavol Lisy wrote:
> On 5/14/17, Charles T. Smith wrote:
>> I'm stumped by this:
...
> Did you create getopt.py in your working directory? If so then try to
> rename it.
>
> PL.
That was it! Not in my working directory, but in th
I'm stumped by this:
$ PYTHONPATH= python except
Traceback (most recent call last):
File "except", line 7, in
except getopt.error, msg:
AttributeError: 'module' object has no attribute 'error'
The program is:
$ cat except
#!/usr/bin/env python
import getopt
try:
opts, args = get
rning through assimilation. Any help is
greatly appreciated. Even if it’s pointing me to documentation that can help
me learn what to consider and lead me to what to do.
Thank you,
R. Smith
--
https://mail.python.org/mailman/listinfo/python-list
Hello,
I need to code up a table class, which will be based on numpy
arrays. Essentially it needs to behave like a numpy array, but with a
variable associated with each array dimension. It must (at least
partially) satisfy the API of an existing class. The main reason for the
new class is to
On 24/03/17 19:35, Tim Chase wrote:
> Playing around, I came across the following
>
> $ python3
> Python 3.4.2 (default, Oct 8 2014, 10:45:20)
> [GCC 4.9.1] on linux
> Type "help", "copyright", "credits" or "license" for more information.
from dis import dis
def f(x):
> ... return
On 15/02/17 13:27, spiess.benja...@googlemail.com wrote:
> Hello !:)
> I've got a problem which I would really like to solve.
> I got a cloud of points (in the simplest example its a 2-dimensional cloud of
> points).
> First, I want to set one of the points as the initial (or middle) point.
> S
On 18/01/2017 21:34, MRAB wrote:
If you're wondering about the blank lines, it's because the lines end
with '\n', which starts a new line, and the print function also starts a
new line after printing the string.
Try stripping the '\n' off the end of the line read in with the .rstrip
method.
Th
On 18/01/2017 21:21, Grant Edwards wrote:
I would have done better by posting the actual code instead of a blind
link that may point to Dog-knows-what...
sorry :-(
--
https://mail.python.org/mailman/listinfo/python-list
On 18/01/2017 21:20, Peter Otten wrote:
with open("partite.txt") as f:
by_number = sorted(f, key=lambda line: int(line.partition("'")[0]))
print("".join(by_number))
Great!!! :-)
--
https://mail.python.org/mailman/listinfo/python-list
Hi all,
could you do better?
Thank you in advance
link code:
https://repl.it/FMin/8
--
https://mail.python.org/mailman/listinfo/python-list
On 14/01/17 14:59, Xristos Xristoou wrote:
> Τη Σάββατο, 14 Ιανουαρίου 2017 - 4:38:39 μ.μ. UTC+2, ο χρήστης duncan smith
> έγραψε:
>> On 14/01/17 11:18, Xristos Xristoou wrote:
>>> i want to create a simple spatial joing using geopandas but i thing so
On 14/01/17 11:18, Xristos Xristoou wrote:
> i want to create a simple spatial joing using geopandas but i thing so
> geopandas has bug ?
>
>
>
> geopandas code :
>
> from geopandas import gpd
> import geopandas
> points = geopandas.GeoDataFrame.from_file('points.shp') # or geojson etc
> poly
Hello guys,
can someone help me to improve this script?
https://github.com/githubdavide/mitm/blob/master/mitm.py
Thank you in advance
Cheers
--
https://mail.python.org/mailman/listinfo/python-list
On 01/12/16 01:12, Chris Kaynor wrote:
> On Wed, Nov 30, 2016 at 4:54 PM, duncan smith wrote:
>>
>> Thanks. So something like the following might do the job?
>>
>> def _execute(command):
>> p = subprocess.Popen(command, shell=False,
>>
On 01/12/16 00:46, Chris Kaynor wrote:
> On Wed, Nov 30, 2016 at 4:12 PM, duncan smith wrote:
>> On 30/11/16 17:57, Chris Angelico wrote:
>>> On Thu, Dec 1, 2016 at 4:34 AM, duncan smith wrote:
>>>>
>>>> def _execute(command):
>>>> # she
On 30/11/16 17:53, Chris Kaynor wrote:
> On Wed, Nov 30, 2016 at 9:34 AM, duncan smith wrote:
>> Hello,
>> I have had an issue with some code for a while now, and I have not
>> been able to solve it. I use the subprocess module to invoke dot
>> (Graphviz) to g
On 30/11/16 17:57, Chris Angelico wrote:
> On Thu, Dec 1, 2016 at 4:34 AM, duncan smith wrote:
>>
>> def _execute(command):
>> # shell=True security hazard?
>> p = subprocess.Popen(command, shell=True, stdin=subprocess.PIPE,
>>
[snip]
Sorry, should have said Python 2.7.12 on Ubuntu 16.04.
Duncan
--
https://mail.python.org/mailman/listinfo/python-list
Hello,
I have had an issue with some code for a while now, and I have not
been able to solve it. I use the subprocess module to invoke dot
(Graphviz) to generate a file. But if I do this repeatedly I end up with
an error. The following traceback is from a larger application, but it
appears to
1 - 100 of 3427 matches
Mail list logo