RE: Can you help me with this memoization simple example?

2024-03-31 Thread AVI GROSS via Python-list
and the memorize function you make gets relatively few requests that are identical, it may not be worthwhile. -Original Message- From: Python-list On Behalf Of MRAB via Python-list Sent: Sunday, March 31, 2024 3:24 PM To: python-list@python.org Subject: Re: Can you help me

Re: Can you help me with this memoization simple example?

2024-03-31 Thread MRAB via Python-list
On 2024-03-31 09:04, marc nicole wrote: Thanks for the first comment which I incorporated but when you say "You can't use a list as a key, but you can use a tuple as a key, provided that the elements of the tuple are also immutable." does it mean  the result of sum of the array is not

Re: Can you help me with this memoization simple example?

2024-03-31 Thread marc nicole via Python-list
Thanks for the first comment which I incorporated but when you say "You can't use a list as a key, but you can use a tuple as a key, provided that the elements of the tuple are also immutable." does it mean the result of sum of the array is not convenient to use as key as I do? Which tuple I

Re: Can you help me with this memoization simple example?

2024-03-30 Thread MRAB via Python-list
On 2024-03-31 00:09, marc nicole via Python-list wrote: I am creating a memoization example with a function that adds up / averages the elements of an array and compares it with the cached ones to retrieve them in case they are already stored. In addition, I want to store only if the result of

Can you help me with this memoization simple example?

2024-03-30 Thread marc nicole via Python-list
I am creating a memoization example with a function that adds up / averages the elements of an array and compares it with the cached ones to retrieve them in case they are already stored. In addition, I want to store only if the result of the function differs considerably (passes a threshold e.g.

Re: Can u help me?

2024-03-06 Thread Grant Edwards via Python-list
On 2024-03-06, MRAB via Python-list wrote: > On 2024-03-06 01:44, Ethan Furman via Python-list wrote: >> On 3/5/24 16:49, MRAB via Python-list wrote: >> > On 2024-03-06 00:24, Ethan Furman via Python-list wrote: >> >> On 3/5/24 16:06, Chano Fucks via Python-list wrote: >> >> >> >>>

Re: Can u help me?

2024-03-05 Thread MRAB via Python-list
On 2024-03-06 01:44, Ethan Furman via Python-list wrote: On 3/5/24 16:49, MRAB via Python-list wrote: > On 2024-03-06 00:24, Ethan Furman via Python-list wrote: >> On 3/5/24 16:06, Chano Fucks via Python-list wrote: >> >>> [image: image.png] >> >> The image is of MS-Windows with the

Re: Can u help me?

2024-03-05 Thread Mats Wichmann via Python-list
On 3/5/24 18:44, Ethan Furman via Python-list wrote: On 3/5/24 16:49, MRAB via Python-list wrote: > On 2024-03-06 00:24, Ethan Furman via Python-list wrote: >> On 3/5/24 16:06, Chano Fucks via Python-list wrote: >> >>> [image: image.png] >> >> The image is of MS-Windows with the python

Re: Can u help me?

2024-03-05 Thread Ethan Furman via Python-list
On 3/5/24 16:49, MRAB via Python-list wrote: > On 2024-03-06 00:24, Ethan Furman via Python-list wrote: >> On 3/5/24 16:06, Chano Fucks via Python-list wrote: >> >>> [image: image.png] >> >> The image is of MS-Windows with the python installation window of "Repair Successful". Hopefully

Re: Can u help me?

2024-03-05 Thread MRAB via Python-list
On 2024-03-06 00:24, Ethan Furman via Python-list wrote: On 3/5/24 16:06, Chano Fucks via Python-list wrote: [image: image.png] The image is of MS-Windows with the python installation window of "Repair Successful". Hopefully somebody better at explaining that problem can take it from

Re: Can u help me?

2024-03-05 Thread MRAB via Python-list
On 2024-03-06 00:06, Chano Fucks via Python-list wrote: [image: image.png] This list removes all images. -- https://mail.python.org/mailman/listinfo/python-list

Re: Can u help me?

2024-03-05 Thread Ethan Furman via Python-list
On 3/5/24 16:06, Chano Fucks via Python-list wrote: [image: image.png] The image is of MS-Windows with the python installation window of "Repair Successful". Hopefully somebody better at explaining that problem can take it from here... -- ~Ethan~ --

Can u help me?

2024-03-05 Thread Chano Fucks via Python-list
[image: image.png] -- https://mail.python.org/mailman/listinfo/python-list

Re: Fwd: Can you help me with this Python question?

2022-10-13 Thread Axy via Python-list
Well, although I never used pandas and never will, if that's about artworks, that's mine. Obviously, you need to iterate columns and sum values returned by the snippet you provided. A quick search tells us to use colums property. So, it might look like this: na_sum =

Fwd: Can you help me with this Python question?

2022-10-13 Thread Sarah Wallace
For a python class I am taking.. In this challenge, you'll be working with a DataFrame that contains data about artworks, and it contains many missing values. Your task is to create a variable called na_sum that contains the total number of missing values in the DataFrame. When that's completed,

Is the bug reported to python Recently i upgraded my python version and its directory But when i try to download pyqt5 it gives out a holy error Do i have to install py 3.9 again pls help me take a lo

2021-10-17 Thread Umme Salma
-- https://mail.python.org/mailman/listinfo/python-list

Re: Help me split a string into elements

2021-09-04 Thread Neil
DFS wrote: > Typical cases: > lines = [('one\ntwo\nthree\n')] > print(str(lines[0]).splitlines()) > ['one', 'two', 'three'] > > lines = [('one two three\n')] > print(str(lines[0]).split()) > ['one', 'two', 'three'] > > > That's the result I'm wanting, but I get data in a slightly

Re: Help me split a string into elements

2021-09-04 Thread DFS
On 9/4/2021 5:55 PM, DFS wrote: Typical cases:  lines = [('one\ntwo\nthree\n')]  print(str(lines[0]).splitlines())  ['one', 'two', 'three']  lines = [('one two three\n')]  print(str(lines[0]).split())  ['one', 'two', 'three'] That's the result I'm wanting, but I get data in a slightly

Help me split a string into elements

2021-09-04 Thread DFS
Typical cases: lines = [('one\ntwo\nthree\n')] print(str(lines[0]).splitlines()) ['one', 'two', 'three'] lines = [('one two three\n')] print(str(lines[0]).split()) ['one', 'two', 'three'] That's the result I'm wanting, but I get data in a slightly different format: lines =

Re: help me please. "install reppy"

2021-07-23 Thread Jack DeVries
See here for a discussion around this issue: https://github.com/seomoz/reppy/issues/90 This project requires a C++ build environment to be setup on your computer. The fact that your compiler is reporting that `std=c++11` as an unknown option shows that you don't have a C++ build environment set

Re: help me please. "install reppy"

2021-07-23 Thread Jack DeVries
Oops, forgot the link to the standard library robots.txt parser. Here are the docs! https://docs.python.org/3/library/urllib.robotparser.html *sorry for the noise* On Thu, Jul 22, 2021 at 11:34 PM Jack DeVries wrote: > See here for a discussion around this issue: >

help me please. "install reppy"

2021-07-22 Thread たこしたこし
I get an error so please help. I don't know what to do. Windows 10 Python 3.9.6 from takashi in Japan Microsoft Windows [Version 10.0.19042.1110] (c) Microsoft Corporation. All rights reserved. C:\Users\user>pip3 install reppy Looking in indexes: https://pypi.python.org/simple/ Collecting reppy

Help me in setting the path in python program.

2021-06-07 Thread Maheshwari Gorle
I am using Google co lab. Guide me how to set the path. # Error: SwissEph file 'se13681s.se1' not found in PATH '/usr/share/ephe/' is coming, how to overcome this problem. pip install pyswisseph import swisseph as swe swe.set_ephe_path ('/usr/share/ephe') # set path to ephemeris files jd =

How to convert csv to netcdf please help me python users

2020-05-29 Thread kotichowdary28
Hi all I hope all are doing well please help me how to convert CSV to NetCDF. Im trying but its not working #!/usr/bin/env ipython import pandas as pd import numpy as np import netCDF4 import pandas as pd import xarray as xr stn_precip='ts_sept.csv' orig_precip='ts_sept.csv' stations

please help me while installing pyttsx3 it shows error

2020-04-27 Thread AMAN BHAI PATEL
PS C:\Users\amanb\OneDrive\Desktop\jarvis> pip install pyttsx3 Collecting pyttsx3 Using cached pyttsx3-2.87-py3-none-any.whl (39 kB) Collecting comtypes; platform_system == "Windows" Using cached comtypes-1.1.7.zip (180 kB) Installing collected packages: comtypes, pyttsx3 Running setup.py

Re: help me subcorrect

2020-04-11 Thread Souvik Dutta
Did you send a screenshot? If so then understand that this mailing list does not support photos so you cannot send that. Try giving us a verbal description. And if you write anything other that the sub then sorry that is my Gmail's fault. Souvik flutter dev On Sat, Apr 11, 2020, 8:32 PM khuchee

help me subcorrect

2020-04-11 Thread khuchee
Sent from Mail for Windows 10 -- https://mail.python.org/mailman/listinfo/python-list

Re: Can you help me solve this?

2020-03-16 Thread Pieter van Oostrum
Pieter van Oostrum writes: > Joseph Nail writes: > >> Hello, >> I have one problem. Somehow in my function when I wrote y=x, they are the >> same variable and then it also changes age or height (which were x) in the >> main program. See more in attached file. >> Maybe it is bug or maybe it

Re: Can you help me solve this?

2020-03-16 Thread Pieter van Oostrum
Joseph Nail writes: > Hello, > I have one problem. Somehow in my function when I wrote y=x, they are the > same variable and then it also changes age or height (which were x) in the > main program. See more in attached file. > Maybe it is bug or maybe it should run that way. If you write y = x,

Re: Can you help me solve this?

2020-03-16 Thread Igor Korot
Hi, On Mon, Mar 16, 2020 at 4:26 PM Joseph Nail wrote: > > Hello, > I have one problem. Somehow in my function when I wrote y=x, they are the > same variable and then it also changes age or height (which were x) in the > main program. See more in attached file. > Maybe it is bug or maybe it

Can you help me solve this?

2020-03-16 Thread Joseph Nail
Hello, I have one problem. Somehow in my function when I wrote y=x, they are the same variable and then it also changes age or height (which were x) in the main program. See more in attached file. Maybe it is bug or maybe it should run that way. --

Re: Help me fix a problem

2019-09-06 Thread Spencer Du
On Friday, 6 September 2019 20:15:40 UTC+2, MRAB wrote: > On 2019-09-06 18:11, Spencer Du wrote: > > Hi > > > > I want to print yes in gui.py but it does not get printed because of the > > json. How do I fix this. Execute embedded.py and then gui.py to test. > > > > def on_message(client,

Re: Help me fix a problem

2019-09-06 Thread Spencer Du
On Friday, 6 September 2019 20:15:40 UTC+2, MRAB wrote: > On 2019-09-06 18:11, Spencer Du wrote: > > Hi > > > > I want to print yes in gui.py but it does not get printed because of the > > json. How do I fix this. Execute embedded.py and then gui.py to test. > > > > def on_message(client,

Re: Help me fix a problem

2019-09-06 Thread Spencer Du
On Friday, 6 September 2019 20:15:40 UTC+2, MRAB wrote: > On 2019-09-06 18:11, Spencer Du wrote: > > Hi > > > > I want to print yes in gui.py but it does not get printed because of the > > json. How do I fix this. Execute embedded.py and then gui.py to test. > > > > def on_message(client,

Re: Help me fix a problem

2019-09-06 Thread MRAB
On 2019-09-06 18:11, Spencer Du wrote: Hi I want to print yes in gui.py but it does not get printed because of the json. How do I fix this. Execute embedded.py and then gui.py to test. def on_message(client, userdata, msg): print("message recieved= " + msg.payload.decode()) #

Help me fix a problem

2019-09-06 Thread Spencer Du
Hi I want to print yes in gui.py but it does not get printed because of the json. How do I fix this. Execute embedded.py and then gui.py to test. embedded.py import paho.mqtt.client as mqtt from mqtt import * client = mqtt.Client() client.connect("broker.hivemq.com",1883,60)

Re: Please help me

2019-08-06 Thread Brian Oney via Python-list
On Mon, 2019-08-05 at 21:10 +0430, arash kohansal wrote: > Hello ive just installed python on my pc and ive already check the > path > choice part but microsoft visual code can not find it and it does not > have > the reload item Check out: https://code.visualstudio.com/docs/languages/python or

Re: Please help me

2019-08-05 Thread MRAB
On 2019-08-05 17:40, arash kohansal wrote: Hello ive just installed python on my pc and ive already check the path choice part but microsoft visual code can not find it and it does not have the reload item 1. Open Visual Studio Code. 2. Press F1, type "Python: Select Interpreter", and then

Please help me

2019-08-05 Thread arash kohansal
Hello ive just installed python on my pc and ive already check the path choice part but microsoft visual code can not find it and it does not have the reload item -- https://mail.python.org/mailman/listinfo/python-list

Can someone help me paral/accelerate this code for Cuda?

2019-05-15 Thread amoxletne5
It’s pretty darn slow. I don’t think it’s optimizing the Nvidia Tesla v100 power. It uses some openCv , and it just screams for paral/acceleration. I’d also love to learn and see how it’s done import cv2 import numpy as np import os import pickle import sys from cgls import cgls from filterplot

Re: help me in a program in python to implement Railway Reservation System using file handling technique.

2018-11-26 Thread Mario R. Osorio
On Saturday, November 24, 2018 at 1:44:21 AM UTC-5, Chris Angelico wrote: > On Sat, Nov 24, 2018 at 5:36 PM wrote: > > > > hello all, > > please hepl me in the above program. python to implement Railway > > Reservation System using file handling technique. > > > > System should perform below

Re: help me in a program in python to implement Railway Reservation System using file handling technique.

2018-11-25 Thread Bob Gailer
On Nov 24, 2018 1:35 AM, wrote: > > hello all, > please hepl me in the above program. What do you mean by "the above program"? I don't see any. python to implement Railway Reservation System using file handling technique. > > System should perform below operations. > a. Reserve a ticket for a

Re: help me in a program in python to implement Railway Reservation System using file handling technique.

2018-11-25 Thread francis
On Saturday, 24 November 2018 14:33:29 UTC+8, jasmin amrutia wrote: > hello all, > please hepl me in the above program. python to implement Railway Reservation > System using file handling technique. > > System should perform below operations. > a. Reserve a ticket for a passenger. > b. List

Re: help me in a program in python to implement Railway Reservation System using file handling technique.

2018-11-23 Thread Chris Angelico
On Sat, Nov 24, 2018 at 5:36 PM wrote: > > hello all, > please hepl me in the above program. python to implement Railway Reservation > System using file handling technique. > > System should perform below operations. > a. Reserve a ticket for a passenger. > b. List information all reservations

help me in a program in python to implement Railway Reservation System using file handling technique.

2018-11-23 Thread jasminamrutia007
hello all, please hepl me in the above program. python to implement Railway Reservation System using file handling technique. System should perform below operations. a. Reserve a ticket for a passenger. b. List information all reservations done for today’s trains. --

Re: can you please help me in opening the python programming.

2018-11-23 Thread Bob Gailer
We would be glad to help. I can't tell from your question what kind of help you need so please give us more information. Have you tried to install python? If so has the installation succeeded? What do you mean by "open the programming"? What have you tried? What do you expect to see? --

can you please help me in opening the python programming.

2018-11-23 Thread hello!
Sent from Mail for Windows 10 -- https://mail.python.org/mailman/listinfo/python-list

Re: help me in python plssss!!!!

2018-09-14 Thread Max Zettlmeißl via Python-list
on / 2.0 > > epsilon = 2 * epsilon > > help me! > This list is not here to solve every single step of what is (presumably) your homework for you. Everything you present right here is what I helped you with in "how to convert this psuedo code to python". You will have to at lea

help me in python plssss!!!!

2018-09-14 Thread Noel P. CUA
Calculate the true, relative and approximate errors, and Relate the absolute relative approximate error to the number of significant digits. epsilon = 1 while epsilon + 1 > 1: epsilon = epsilon / 2.0 epsilon = 2 * epsilon help me! -- *This email and any files transmit

Help me with the Python! ODE system.

2018-03-02 Thread alenkabor129769
I can not find an example with this function: https://docs.scipy.org/doc/scipy/reference/generated/scipy.integrate.RK45.html#scipy.integrate.RK45. -- https://mail.python.org/mailman/listinfo/python-list

Re: help me ? (Posting On Python-List Prohibited)

2018-03-01 Thread Rustom Mody
On Thursday, March 1, 2018 at 5:37:28 AM UTC+5:30, Steven D'Aprano wrote: > On Wed, 28 Feb 2018 09:58:24 -0800, Aktive wrote: > > > what the hell do you care about cheating.. > > > > the world doest care about cheating. > > > > its about skill. > > Because cheaters don't have skill. That's why

Re: help me ? (Posting On Python-List Prohibited)

2018-02-28 Thread Steven D'Aprano
On Wed, 28 Feb 2018 09:58:24 -0800, Aktive wrote: > what the hell do you care about cheating.. > > the world doest care about cheating. > > its about skill. Because cheaters don't have skill. That's why they cheat. > You guys been too much in school Ah, spoken like a cheater. -- Steve

Re: help me ? (Posting On Python-List Prohibited)

2018-02-28 Thread Aktive
On Wednesday, 28 February 2018 06:00:07 UTC+1, Lawrence D’Oliveiro wrote: > On Wednesday, February 28, 2018 at 4:44:04 PM UTC+13, jlad...@itu.edu wrote: > > This is part of the reason why interviews for software developer jobs > > have gotten so crazy. > > This is why you need to have a CV that

Re: help me ?

2018-02-27 Thread Rick Johnson
On Tuesday, February 27, 2018 at 12:56:52 PM UTC-6, Grant Edwards wrote: [...] > The fun part is giving them a solution that's so obscure and "clever" > that it technically meets the stated requirement but is so far from > what the instructor wanted that they don't get credit for it (and > there's

Re: help me ?

2018-02-27 Thread amber
On 02/27/2018 06:54 PM, Grant Edwards wrote: > The fun part is giving them a solution that's so obscure and "clever" > that it technically meets the stated requirement but is so far from > what the instructor wanted that they don't get credit for it (and > there's no way the student will be able

Re: help me ?

2018-02-27 Thread jladasky
On Tuesday, February 27, 2018 at 10:56:52 AM UTC-8, Grant Edwards wrote: > If the student is actively trying to avoid learning something, there's > nothing you can do to help them. They're just wasting their own time > and money. This is part of the reason why interviews for software developer

Re: help me ?

2018-02-27 Thread Michael F. Stemper
On 2018-02-26 07:17, Stefan Ram wrote: Percival John Hackworth quoted: Define 2 lists. The first one must contain the integer values 1, 2 and 3 a =[ 1, 2, 3 ] and the second one the string values a, b and c. b =[ 'a', 'b', 'c'] Iterate through both lists to create

Re: help me ?

2018-02-27 Thread Steven D'Aprano
On Tue, 27 Feb 2018 10:56:18 -0700, Ian Kelly wrote: > Cheaters are gonna cheat. In the unlikely event they don't get the > answer here, they'll probably just manage to convince somebody to do the > work for them somewhere else. Honestly, I don't know if it's even worth > the bother to engage.

Re: help me ?

2018-02-27 Thread Ian Kelly
On Tue, Feb 27, 2018 at 2:50 PM, Andre Müller wrote: > Hello, > > it's a duplicate: > https://python-forum.io/Thread-Working-with-lists-homework-2 > > I have seen this more than one time. We don't like it. You keep people busy > with one question at different places. You

Re: help me ?

2018-02-27 Thread Andre Müller
Hello, it's a duplicate: https://python-forum.io/Thread-Working-with-lists-homework-2 I have seen this more than one time. We don't like it. You keep people busy with one question at different places. You need two lists and one empty list. One outer loop iterating over the first list and one

Re: help me ?

2018-02-27 Thread Grant Edwards
On 2018-02-27, Ian Kelly wrote: > On Tue, Feb 27, 2018 at 10:16 AM, Igor Korot wrote: >> Congratulations! >> You have an "A" for solving the problem and "F" for helping the guy cheat. >> You should be expelled from the course. > > In my experience, this

Re: help me ?

2018-02-27 Thread Ziggy
On 2018-02-26, sotaro...@gmail.com wrote: > > Help me ! a=[1,2,3,] b=["a","b","c"] x=[] z=[] bonus=[] for digits in a: for letters in b: x.append(str(digits) + letters) bonus.append(letters + str(digits))

Re: help me ?

2018-02-27 Thread Larry Martell
On Tue, Feb 27, 2018 at 12:56 PM, Ian Kelly wrote: > On Tue, Feb 27, 2018 at 10:16 AM, Igor Korot wrote: >> Congratulations! >> You have an "A" for solving the problem and "F" for helping the guy cheat. >> You should be expelled from the course. > > In

Re: help me ?

2018-02-27 Thread Ian Kelly
On Tue, Feb 27, 2018 at 10:16 AM, Igor Korot wrote: > Congratulations! > You have an "A" for solving the problem and "F" for helping the guy cheat. > You should be expelled from the course. In my experience, this is what happens pretty much every time. Somebody posts a

Re: help me ?

2018-02-27 Thread Igor Korot
final list contain all possible combinations : [1a, a1, 1b, >>b1, 1c, c1, 2a, a2, 2b, b2, 2c, c2, 3a, a3, 3b, b3, 3c, c3] >> >>Help me ! > > #a list of integers > nums = [1, 2, 3] > > #a list of letters > ltrs = ['a', 'b', 'c'] > > #a list to hold

Re: help me ?

2018-02-27 Thread Sir Real
e A and B >elements. The final list should look like one of the 2 lists: >1. [1a, 1b, 1c, 2a, 2b, 2c, 3a, 3b, 3c] >2. [a1, a2. a3, b1, b2, b3, c1, c2, c3] >BONUS: Make the final list contain all possible combinations : [1a, a1, 1b, >b1, 1c, c1, 2a, a2, 2b, b2, 2c, c2, 3a, a3, 3b,

Re: help me ?

2018-02-27 Thread alister via Python-list
d B elements. The final list should look like one of the 2 lists: > 1. [1a, 1b, 1c, 2a, 2b, 2c, 3a, 3b, 3c] > 2. [a1, a2. a3, b1, b2, b3, c1, c2, c3] > BONUS: Make the final list contain all possible combinations : [1a, a1, > 1b, b1, 1c, c1, 2a, a2, 2b, b2, 2c, c2, 3a, a3, 3b, b3, 3c, c3] >

Re: help me ?

2018-02-26 Thread ziggyvimar
e A and B > elements. The final list should look like one of the 2 lists: > 1. [1a, 1b, 1c, 2a, 2b, 2c, 3a, 3b, 3c] > 2. [a1, a2. a3, b1, b2, b3, c1, c2, c3] > BONUS: Make the final list contain all possible combinations : [1a, a1, 1b, > b1, 1c, c1, 2a, a2, 2b, b2, 2c, c2, 3a, a3, 3b

Re: help me ?

2018-02-26 Thread Lutz Horn
Define 2 lists. ... [...] Help me ! Sounds like homework. Have you tried anything? Does it work? -- https://mail.python.org/mailman/listinfo/python-list

Re: help me ?

2018-02-26 Thread Peter Otten
Christian Gollwitzer wrote: > Am 26.02.18 um 10:40 schrieb sotaro...@gmail.com: >> Define 2 lists. The first one must contain the integer values 1, 2 and 3 >> and the second one the string values a, b and c. Iterate through both >> lists to create another list that contains all the combinations

Re: help me ?

2018-02-26 Thread Christian Gollwitzer
Am 26.02.18 um 10:40 schrieb sotaro...@gmail.com: Define 2 lists. The first one must contain the integer values 1, 2 and 3 and the second one the string values a, b and c. Iterate through both lists to create another list that contains all the combinations of the A and B elements. The final

help me ?

2018-02-26 Thread sotaro237
, 1c, 2a, 2b, 2c, 3a, 3b, 3c] 2. [a1, a2. a3, b1, b2, b3, c1, c2, c3] BONUS: Make the final list contain all possible combinations : [1a, a1, 1b, b1, 1c, c1, 2a, a2, 2b, b2, 2c, c2, 3a, a3, 3b, b3, 3c, c3] Help me ! -- https://mail.python.org/mailman/listinfo/python-list

Re: RegExp - please help me!

2017-12-27 Thread szykcech
> (?s)struct (.+?)\s*\{\s*(.+?)\s*\}; Thank you Vlastimil Brom for regexp and for explanation! -- https://mail.python.org/mailman/listinfo/python-list

Re: RegExp - please help me!

2017-12-27 Thread Lele Gaifax
szykc...@gmail.com writes: > Please help me with this regexp or tell me that I neeed do this in other way. I think that using regexps to parse those structures is fragile and difficult to get right[0], as there are lots of corner cases (comments, complex types, ...). I'd suggest using a t

Re: RegExp - please help me! (Posting On Python-List Prohibited)

2017-12-26 Thread szykcech
W dniu wtorek, 26 grudnia 2017 21:53:14 UTC+1 użytkownik Lawrence D’Oliveiro napisał: > On Wednesday, December 27, 2017 at 2:15:21 AM UTC+13, szyk...@gmail.com wrote: > > struct (.+)\s*{\s*(.+)\s*}; > > You realize that “.” matches anything? Whereas I think you want to match > non-whitespace in

Re: RegExp - please help me!

2017-12-26 Thread Peter Pearson
On Tue, 26 Dec 2017 05:14:55 -0800 (PST), szykc...@gmail.com wrote: [snip] > So: I develop regexp which to my mind should work, but it doesn't and > I don't know why. The broken regexp is like this: > struct (.+)\s*{\s*(.+)\s*}; [snip] You'll probably get better help faster if you can present

Re: RegExp - please help me!

2017-12-26 Thread Vlastimil Brom
; As you can see it has two groups: struct name and struct definition. > It fails even for such simple structure: > struct Structure > { > int mVariable1; > QString mVariable2; > bool mVariable3 > }; > > Please help me with this regexp or tell me that I neee

RegExp - please help me!

2017-12-26 Thread szykcech
ken regexp is like this: struct (.+)\s*{\s*(.+)\s*}; As you can see it has two groups: struct name and struct definition. It fails even for such simple structure: struct Structure { int mVariable1; QString mVariable2; bool mVariable3 }; Please help me with this regexp or tell me that

Re: Can anybody help me retrieve how to retrieve output from this Python code below!

2017-07-11 Thread Peter Otten
ksatish@gmail.com wrote: [snip code] Wasn't there any documentation to go with that script? That's the preferable method to use software written by someone else ;) Anyway -- First you have to undo what was probably changed by yourself: $ diff -u json2csv_orig.py json2csv.py ---

Can anybody help me retrieve how to retrieve output from this Python code below!

2017-07-11 Thread ksatish . dtc
try: import unicodecsv as csv except ImportError: import csv import json import operator import os from collections import OrderedDict import logging logging.basicConfig(level=logging.DEBUG) class Json2Csv(object): """Process a JSON object to a CSV file""" collection = None

Re: Help me cythonize a python routine!

2016-11-10 Thread BartC
On 09/11/2016 21:25, breamore...@gmail.com wrote: On Wednesday, November 9, 2016 at 7:34:41 PM UTC, BartC wrote: However according to your mindset nothing matters provided it's fast, > accuracy does not matter to users. Hence your recent comment on another thread about converting invalid

Re: Help me cythonize a python routine!

2016-11-09 Thread Steven D'Aprano
On Thursday 10 November 2016 18:23, Andrea D'Amore wrote: > On 10 November 2016 at 00:15, Steve D'Aprano > wrote: >> py> import collections > […] >> py> import os >> py> os.listdir('/usr/local/lib/python3.5/collections/') > > Not > >

Re: Help me cythonize a python routine!

2016-11-09 Thread Andrea D'Amore
On 10 November 2016 at 00:15, Steve D'Aprano wrote: > py> import collections […] > py> import os > py> os.listdir('/usr/local/lib/python3.5/collections/') Not os.listdir(collections.__path__[0]) since it's already there? -- Andrea --

Re: Help me cythonize a python routine!

2016-11-09 Thread Ethan Furman
On 11/09/2016 04:30 PM, Michael Torrie wrote: On 11/09/2016 04:21 PM, Ethan Furman wrote: On 09/11/2016 21:25, breamore...@gmail.com wrote: [...filtered...] Mark, you do not need to be insulting nor condescending. Agreed. Is he still being filtered on the mailing list? He's still in my

Re: Help me cythonize a python routine!

2016-11-09 Thread Michael Torrie
On 11/09/2016 04:21 PM, Ethan Furman wrote: >> On 09/11/2016 21:25, breamore...@gmail.com wrote: > > [...filtered...] > > Mark, you do not need to be insulting nor condescending. Agreed. Is he still being filtered on the mailing list? He's still in my killfile. --

Re: Help me cythonize a python routine!

2016-11-09 Thread Ethan Furman
On 09/11/2016 21:25, breamore...@gmail.com wrote: [...filtered...] Mark, you do not need to be insulting nor condescending. -- ~Ethan~ -- https://mail.python.org/mailman/listinfo/python-list

Re: Help me cythonize a python routine!

2016-11-09 Thread Steve D'Aprano
On Thu, 10 Nov 2016 10:01 am, BartC wrote: > I haven't ruled out that collections is written in Python. But I can't > find a 'collections.py' module in my Python 3.4; the nearest is > "__init__.py". And there /is/ a lot of code there. And that's exactly right. py> import collections py>

Re: Help me cythonize a python routine!

2016-11-09 Thread BartC
On 09/11/2016 21:25, breamore...@gmail.com wrote: On Wednesday, November 9, 2016 at 7:34:41 PM UTC, BartC wrote: All the real work is done inside the Collections module. If that was written in Python, then you'd have to Cythonise that, and there might be quite a lot of it! But I think

Re: Help me cythonize a python routine!

2016-11-09 Thread BartC
On 05/11/2016 04:11, DFS wrote: It reads in a text file of the Bible, and counts the Top 20 most common words. http://www.truth.info/download/bible.htm import time; start=time.clock() import sys, string from collections import Counter #read

Re: Help me!, I would like to find split where the split sums are close to each other?

2016-10-16 Thread Michael Torrie
On 10/16/2016 05:25 AM, k.adema...@gmail.com wrote: > Help me!, I would like to find split where the split sums are close > to each other? > > I have a list is > > test = [10,20,30,40,50,60,70,80,90,100] > > ​and I would like to find split where the split sums a

Re: Help me!, I would like to find split where the split sums are close to each other?

2016-10-16 Thread breamoreboy
On Sunday, October 16, 2016 at 12:27:00 PM UTC+1, k.ade...@gmail.com wrote: > Help me!, I would like to find split where the split sums are close to each > other? > > I have a list is > > test = [10,20,30,40,50,60,70,80,90,100] > > ​and I would like to find split where

Help me!, I would like to find split where the split sums are close to each other?

2016-10-16 Thread k . ademarus
Help me!, I would like to find split where the split sums are close to each other? I have a list is test = [10,20,30,40,50,60,70,80,90,100] ​and I would like to find split where the split sums are close to each other by number of splits = 3 that ​all possible combinations and select the split

Re: Help me

2016-03-30 Thread Ethan Furman
On 03/30/2016 06:10 AM, srinivas devaki wrote: ahh, this is the beginning of a conspiracy to waste my time. PS: just for laughs. not to offend any one. It's fair: you waste ours, we waste yours. :) A fair, if not good, trade. -- ~Ethan~ --

Re: Help me

2016-03-30 Thread srinivas devaki
ahh, this is the beginning of a conspiracy to waste my time. PS: just for laughs. not to offend any one. Regards Srinivas Devaki Junior (3rd yr) student at Indian School of Mines,(IIT Dhanbad) Computer Science and Engineering Department ph: +91 9491 383 249 telegram_id: @eightnoteight On Mar 30,

Re: Help me

2016-03-30 Thread Ben Finney
Smith writes: > Il 29/03/2016 11:17, Ben Finney ha scritto: > > You'll get better help if you: > > > > * Summarise the problem briefly in the Subject field. > > > > * Actually say anything useful in the message body. > > > thanks a lot You're welcome. Feel free to ask about the

Re: Help me

2016-03-30 Thread Smith
Il 29/03/2016 11:17, Ben Finney ha scritto: Smith writes: [a URL] You'll get better help if you: * Summarise the problem briefly in the Subject field. * Actually say anything useful in the message body. thanks a lot --

Re: Help me

2016-03-29 Thread Ben Finney
Smith writes: > [a URL] You'll get better help if you: * Summarise the problem briefly in the Subject field. * Actually say anything useful in the message body. -- \ “My house is on the median strip of a highway. You don't really | `\notice, except I have to

Help me

2016-03-29 Thread Smith
https://github.com/githubdavide/ip-pubblico-send/blob/master/ip-pubblico.py -- https://mail.python.org/mailman/listinfo/python-list

Re: TSP in python ; this is code to solve tsp whenever called, where given coordinates as in name of pos and then start coordinate as in start, help me how it works ?

2016-03-20 Thread Mark Lawrence
On 18/03/2016 17:04, Qurrat ul Ainy wrote: help required !!! For what, house cleaning? -- My fellow Pythonistas, ask not what our language can do for you, ask what you can do for our language. Mark Lawrence -- https://mail.python.org/mailman/listinfo/python-list

Re: TSP in python ; this is code to solve tsp whenever called, where given coordinates as in name of pos and then start coordinate as in start, help me how it works ?

2016-03-20 Thread Qurrat ul Ainy
help required !!! -- https://mail.python.org/mailman/listinfo/python-list

  1   2   3   4   5   6   7   8   >