Re: help: pandas and 2d table

2024-04-16 Thread jak via Python-list
he "where" creates a new DataFrame selection that contains the same data as df, but with all values replaced by NaN (Not a Number) except for the values that are equal to 'zz'. "stack" returns a Series with a multi-level index created by pivoting the columns. Here it gives a Series with the row-col-addresses of a all the non-NaN values. The general meaning of "stack" might be the most complex operation of this script. It's explained in the pandas manual (see there). "reset_index" then just transforms this Series back into a DataFrame, and ".iloc[ :, 0 ]" and ".iloc[ :, 1 ]" are the first and second column, respectively, of that DataFrame. These then are zipped to get the desired form as a list of pairs. And this is a technique very similar to reverse engineering. Thanks for the explanation and examples. All this is really clear and I was able to follow it easily because I have already written a version of this code in C without any kind of external library that uses the .CSV version of the table as data ( 234 code lines :^/ ). -- https://mail.python.org/mailman/listinfo/python-list

Re: help: pandas and 2d table

2024-04-16 Thread jak via Python-list
Stefan Ram ha scritto: df = df.where( df == 'zz' ).stack().reset_index() result ={ 'zz': list( zip( df.iloc[ :, 0 ], df.iloc[ :, 1 ]))} Since I don't know Pandas, I will need a month at least to understand these 2 lines of code. Thanks again. -- https://mail.python.org/mailman/listinfo/python-l

Re: help: pandas and 2d table

2024-04-13 Thread Tim Williams via Python-list
On Sat, Apr 13, 2024 at 1:10 PM Mats Wichmann via Python-list < python-list@python.org> wrote: > On 4/13/24 07:00, jak via Python-list wrote: > > doesn't Pandas have a "where" method that can do this kind of thing? Or > doesn't it match what you are looking for? Pretty sure numpy does, but > that

Re: help: pandas and 2d table

2024-04-13 Thread Mats Wichmann via Python-list
On 4/13/24 07:00, jak via Python-list wrote: Stefan Ram ha scritto: jak wrote or quoted: Would you show me the path, please?    I was not able to read xls here, so I used csv instead; Warning:    the script will overwrite file "file_20240412201813_tmp_DML.csv"! import pandas as pd with ope

Re: help: pandas and 2d table

2024-04-13 Thread jak via Python-list
Stefan Ram ha scritto: jak wrote or quoted: Would you show me the path, please? I was not able to read xls here, so I used csv instead; Warning: the script will overwrite file "file_20240412201813_tmp_DML.csv"! import pandas as pd with open( 'file_20240412201813_tmp_DML.csv', 'w' )as

help: pandas and 2d table

2024-04-12 Thread jak via Python-list
Hi everyone. I state that I don't know anything about 'pandas' but I intuited that it could do what I want. I get, through the "read_excel" method, a table similar to this: obj| foo1 foo2 foo3 foo4 foo5 foo6 --- foo1| aa

Re: Fast lookup of bulky "table"

2023-01-17 Thread Dino
Thanks a lot, Edmondo. Or better... Grazie mille. On 1/17/2023 5:42 AM, Edmondo Giovannozzi wrote: Sorry, I was just creating an array of 400x10 elements that I fill with random numbers: a = np.random.randn(400,100_000) Then I pick one element randomly, it is just a stupid sort on a

Re: Fast lookup of bulky "table"

2023-01-17 Thread Edmondo Giovannozzi
ia = np.argsort(a[0,:]) > > a_elem = a[56, ia[0]] > > > > I have just taken an element randomly in a numeric table of 400x10 > > elements > > To find it with numpy: > > > > %timeit isel = a == a_elem > > 35.5 ms ± 2.79 ms per loop (mea

Re: Fast lookup of bulky "table"

2023-01-16 Thread rbowman
On Mon, 16 Jan 2023 12:28:37 -0500, Thomas Passin wrote: > On 1/16/2023 11:56 AM, rbowman wrote: >> On 16 Jan 2023 15:14:06 GMT, Stefan Ram wrote: >> >> >>>When none of those reasons matter, one can use dictionaries in >>>Python as well. And then what Chandler Carruth showed us applies:

Re: Fast lookup of bulky "table"

2023-01-16 Thread Dino
On 1/16/2023 1:18 PM, Edmondo Giovannozzi wrote: As a comparison with numpy. Given the following lines: import numpy as np a = np.random.randn(400,100_000) ia = np.argsort(a[0,:]) a_elem = a[56, ia[0]] I have just taken an element randomly in a numeric table of 400x10 elements To find it

Re: Fast lookup of bulky "table"

2023-01-16 Thread Albert-Jan Roskam
On Jan 15, 2023 05:26, Dino wrote: Hello, I have built a PoC service in Python Flask for my work, and - now that the point is made - I need to make it a little more performant (to be honest, chances are that someone else will pick up from where I left off, and implement the

Re: Fast lookup of bulky "table"

2023-01-16 Thread Thomas Passin
On 1/16/2023 11:56 AM, rbowman wrote: On 16 Jan 2023 15:14:06 GMT, Stefan Ram wrote: When none of those reasons matter, one can use dictionaries in Python as well. And then what Chandler Carruth showed us applies: I am missing something. Where is the data in your dictionary coming from

Re: Fast lookup of bulky "table"

2023-01-16 Thread Peter J. Holzer
On 2023-01-15 18:06:36 -0500, Thomas Passin wrote: > You especially want to avoid letting the database engine do full-table > scans over and over. And you never want to send a lot of rows to > Python and do post-filtering on them if you can avoid it. Another thing to avoid: Lots of smal

Re: Fast lookup of bulky "table"

2023-01-16 Thread Peter J. Holzer
according to the manner in which the data must > be accessed, a view could be built for each. At which time, even if every > row must be accessed, the retrieval will be made more efficient and/or the > response better-organised. Nitpick: A view will not be more efficient (unless it'

Re: Fast lookup of bulky "table"

2023-01-16 Thread Edmondo Giovannozzi
re I left > off, and implement the same service from scratch in a different language > (GoLang? .Net? Java?) but I am digressing). > > Anyway, my Flask service initializes by loading a big "table" of 100k > rows and 40 columns or so (memory footprint: order of 300 Mb) and

Re: Fast lookup of bulky "table"

2023-01-16 Thread Thomas Passin
On 1/16/2023 10:14 AM, Stefan Ram wrote: However, operating systems and databases also try to cache information in main memory that is estimated to be accessed often. Yes, and you can only know by testing, when that's possible. Also, if you know that you have the same queries repeated over

Re: Fast lookup of bulky "table"

2023-01-16 Thread rbowman
On 16 Jan 2023 15:14:06 GMT, Stefan Ram wrote: > When none of those reasons matter, one can use dictionaries in Python > as well. And then what Chandler Carruth showed us applies: I am missing something. Where is the data in your dictionary coming from? -- https://mail.python.org/mailman/li

Re: Fast lookup of bulky "table"

2023-01-16 Thread Dino
On 1/16/2023 2:53 AM, David wrote: See here: https://docs.python.org/3/reference/expressions.html#assignment-expressions https://realpython.com/python-walrus-operator/ Thank you, brother. -- https://mail.python.org/mailman/listinfo/python-list

Re: Fast lookup of bulky "table"

2023-01-16 Thread Dino
Just wanted to take a moment to express my gratitude to everyone who responded here. You have all been so incredibly helpful. Thank you Dino On 1/14/2023 11:26 PM, Dino wrote: Hello, I have built a PoC service in Python Flask for my work, and - now that the point is made - I need to make

Re: Fast lookup of bulky "table"

2023-01-15 Thread David
On Mon, 16 Jan 2023 at 16:15, Dino wrote: > BTW, can you tell me what is going on here? what's := ? > > while (increase := add_some(conn,adding)) == 0: See here: https://docs.python.org/3/reference/expressions.html#assignment-expressions https://realpython.com/python-walrus-operator/ --

Re: Fast lookup of bulky "table"

2023-01-15 Thread Dino
On 1/15/2023 2:23 PM, Weatherby,Gerard wrote: That’s about what I got using a Python dictionary on random data on a high memory machine. https://github.com/Gerardwx/database_testing.git It’s not obvious to me how to get it much faster than that. Gerard, you are a rockstar. This is going to b

Re: Fast lookup of bulky "table"

2023-01-15 Thread Greg Ewing
On 16/01/23 2:27 am, Dino wrote: Do you have any idea about the speed of a SELECT query against a 100k rows / 300 Mb Sqlite db? That depends entirely on the nature of the query and how the data is indexed. If it's indexed in a way that allows sqlite to home in directly on the wanted data, it wi

Re: Fast lookup of bulky "table"

2023-01-15 Thread Thomas Passin
ing. You especially want to avoid letting the database engine do full-table scans over and over. And you never want to send a lot of rows to Python and do post-filtering on them if you can avoid it. Use WHERE instead of HAVING if possible (HAVING works post-scan, WHERE works during row retrieva

Re: Fast lookup of bulky "table"

2023-01-15 Thread Weatherby,Gerard
data that has to be sent back to the client. From: Python-list on behalf of Stefan Ram Date: Sunday, January 15, 2023 at 5:03 PM To: python-list@python.org Subject: Re: Fast lookup of bulky "table" *** Attention: This is an external email. Use caution responding, opening atta

Re: Fast lookup of bulky "table"

2023-01-15 Thread rbowman
On Sun, 15 Jan 2023 08:27:29 -0500, Dino wrote: > Do you have any idea about the speed of a SELECT query against a 100k > rows / 300 Mb Sqlite db? https://www.sqlite.org/speed.html The site is old but has a number of comparisons. I have not used SQLite with Python yet but with both C and C# I'

Re: Fast lookup of bulky "table"

2023-01-15 Thread dn via Python-list
On 16/01/2023 08.36, Weatherby,Gerard wrote: I think any peformance improvements would have to come from a language change or better indexing of the data. Exactly! Expanding on @Peter's post: databases (relational or not) are best organised according to use. Some must accept rapid insert/upd

Re: Fast lookup of bulky "table"

2023-01-15 Thread Thomas Passin
On 1/15/2023 2:39 PM, Peter J. Holzer wrote: On 2023-01-15 10:38:22 -0500, Thomas Passin wrote: On 1/15/2023 6:14 AM, Peter J. Holzer wrote: On 2023-01-14 23:26:27 -0500, Dino wrote: Anyway, my Flask service initializes by loading a big "table" of 100k rows and 40 columns or

Re: Fast lookup of bulky "table"

2023-01-15 Thread Weatherby,Gerard
I think any peformance improvements would have to come from a language change or better indexing of the data. From: Python-list on behalf of Weatherby,Gerard Date: Sunday, January 15, 2023 at 2:25 PM To: Dino , python-list@python.org Subject: Re: Fast lookup of bulky "table" Th

Re: Fast lookup of bulky "table"

2023-01-15 Thread Peter J. Holzer
On 2023-01-15 10:38:22 -0500, Thomas Passin wrote: > On 1/15/2023 6:14 AM, Peter J. Holzer wrote: > > On 2023-01-14 23:26:27 -0500, Dino wrote: > > > Anyway, my Flask service initializes by loading a big "table" of 100k rows > > > and 40 columns or

Re: Fast lookup of bulky "table"

2023-01-15 Thread Weatherby,Gerard
-list@python.org Subject: Re: Fast lookup of bulky "table" *** Attention: This is an external email. Use caution responding, opening attachments or clicking on links. *** Thank you for your answer, Lars. Just a clarification: I am already doing a rough measuring of my queries. A fresh que

Re: Fast lookup of bulky "table"

2023-01-15 Thread Dino
t (to be honest, chances are that someone else will pick up from where I left off, and implement the same service from scratch in a different language (GoLang? .Net? Java?) but I am digressing). Anyway, my Flask service initializes by loading a big "table" of 100k rows and 40 column

Re: Fast lookup of bulky "table"

2023-01-15 Thread Dino
on with way too many "moving parts", but when I talked about the "table", it's actually a 100k long list of IDs. I can then use each ID to invoke an API that will return those 40 attributes. The API is fast, but still, I am bound to loop through the whole thing to respo

Re: Fast lookup of bulky "table"

2023-01-15 Thread Thomas Passin
where I left off, and implement the same service from scratch in a different language (GoLang? .Net? Java?) but I am digressing). Anyway, my Flask service initializes by loading a big "table" of 100k rows and 40 columns or so (memory footprint: order of 300 Mb) 300 MB is large enough that

Re: Fast lookup of bulky "table"

2023-01-15 Thread Peter J. Holzer
ent the same service from scratch in a different language (GoLang? > .Net? Java?) but I am digressing). > > Anyway, my Flask service initializes by loading a big "table" of 100k rows > and 40 columns or so (memory footprint: order of 300 Mb) 300 MB is large enough that you sho

Re: Fast lookup of bulky "table"

2023-01-15 Thread Lars Liedtke
Hey, before you start optimizing. I would suggest, that you measure response times and query times, data search times and so on. In order to save time, you have to know where you "loose" time. Does your service really have to load the whole table at once? Yes that might lead

Fast lookup of bulky "table"

2023-01-14 Thread Dino
(GoLang? .Net? Java?) but I am digressing). Anyway, my Flask service initializes by loading a big "table" of 100k rows and 40 columns or so (memory footprint: order of 300 Mb) and then accepts queries through a REST endpoint. Columns are strings, enums, and numbers. Once initialized,

Re: Tkinter: multicolumn table widget

2022-06-06 Thread Rich Shepard
On Tue, 31 May 2022, MRAB wrote: There's an example of how to show a tooltip here: https://stackoverflow.com/questions/3221956/how-do-i-display-tooltips-in-tkinter MRAB, A tooltip would work. I downloaded the first example and assume that it will display a treeview cell when the cursor hovers

Re: Tkinter: multicolumn table widget

2022-05-31 Thread Rich Shepard
On Tue, 31 May 2022, MRAB wrote: The note could be displayed partially in the column itself, with the full text displayed either in read-only textbox nearby when the row is selected (and it's the only selected row), or in the form of a tooltip when you hover over it. There's an example of how t

Re: Tkinter: multicolumn table widget

2022-05-31 Thread MRAB
ou, I will. Each time I add a row to the contacts database table I include a note of what was discussed and what needs to be done. I'd like to be able to see the entire note with each contact event. I'm not committed to using a table so I'm totally open to other approaches. My need

Re: Tkinter: multicolumn table widget

2022-05-31 Thread Rich Shepard
o the contacts database table I include a note of what was discussed and what needs to be done. I'd like to be able to see the entire note with each contact event. I'm not committed to using a table so I'm totally open to other approaches. My needs are few: - The returned results ar

Re: Tkinter: multicolumn table widget

2022-05-31 Thread MRAB
On 2022-05-31 19:47, Rich Shepard wrote: My web searches haven't helped me learn how to design a read-only scrollable table widget displaying rows retrieved from postgres database tables. This is for my business development application. I'm writing a view module that displays my conta

Tkinter: multicolumn table widget

2022-05-31 Thread Rich Shepard
My web searches haven't helped me learn how to design a read-only scrollable table widget displaying rows retrieved from postgres database tables. This is for my business development application. I'm writing a view module that displays my contact history with a named person. The per

Re: Dispatch table of methods with various return value types

2020-11-27 Thread Loris Bennett
such. As I am the main user, I usually give myself fairly rapid feedback ;-) > NB If you are concerned about the actual information being presented, surely > that will have already been tested as accurate by the unit test mentioned > earlier? This is true. Although obviously, if the inf

Re: Dispatch table of methods with various return value types

2020-11-19 Thread dn via Python-list
e-brain to know what happens? # this code has a comment ... # add one to x x += 1 I'm afraid the idea of 100% code-coverage is a nirvana that is probably not worth seeking. See also @Ned's comments (about his own coverage.py tool) https://nedbatchelder.com/blog/200710/f

Re: Dispatch table of methods with various return value types

2020-11-18 Thread Loris Bennett
; at the > same > time as the first, is the reporting-routine "dependent" upon the > data-processor? > > function get( self, ... ) > self.get_data() > self.present_data() > > function add( self, ... ) >

Re: Dispatch table of methods with various return value types

2020-11-17 Thread dn via Python-list
in "get"); whilst maintaining/multiplying SRP... Otherwise the code must first decide which action-handler, and later, which result-handler - but aren't they effectively the same decision? Thus, is the reporting integral to the get (even if they are in separate routines)? I

Re: Dispatch table of methods with various return value types

2020-11-17 Thread Loris Bennett
rom a database seems to be significantly different to testing whether the reporting of an action is correctly laid out and free of typos. > Otherwise the code must first decide which action-handler, and later, > which result-handler - but aren't they effectively the same decision? >

Re: Dispatch table of methods with various return value types

2020-11-17 Thread dn via Python-list
On 17/11/2020 22:01, Loris Bennett wrote: Hi, I have a method for manipulating the membership of groups such as: def execute(self, operation, users, group): """ Perform the given operation on the users with respect to the group """ action = {

Dispatch table of methods with various return value types

2020-11-17 Thread Loris Bennett
Hi, I have a method for manipulating the membership of groups such as: def execute(self, operation, users, group): """ Perform the given operation on the users with respect to the group """ action = { 'get': self.get, 'add': sel

Re: creating a table within python code

2020-05-28 Thread Peter J. Holzer
On 2020-05-22 10:22:40 -0400, Buddy Peacock wrote: > Thank you Souvik, but still having issues. I have pasted the command line > interaction this time. My prior message is what appeared in the browser. > =

Re: creating a table within python code

2020-05-22 Thread Buddy Peacock
Session from sqlalchemy import create_engine from sqlalchemy.orm import scoped_session, sessionmaker app= Flask(__name__) engine = create_engine(os.getenv("DATABASE_URL")) db = scoped_session(sessionmaker(bind=engine)) @app.route("/") def main(): app.run() db.execute(&qu

Re: creating a table within python code

2020-05-22 Thread Souvik Dutta
gt;> >>> "C:\Users\buddy\AppData\Local\Programs\Python\Python38\Lib\site-packages\flask\_compat.py", >>> line 39, in reraise >>> raise value >>> File >>> >>> "C:\Users\buddy\AppData\Local\Programs\Python\Python38\Lib\site-packages\f

Re: creating a table within python code

2020-05-22 Thread Souvik Dutta
message. >>>> >>>> flask.cli.NoAppException: Failed to find Flask application or factory in >>>> module "create_db". Use "FLASK_APP=create_db:name to specify one. >>>> Traceback (most recent call last) >>>> File >>>&

Re: creating a table within python code

2020-05-22 Thread Buddy Peacock
; line 97, in find_best_app >> raise NoAppException( >> flask.cli.NoAppException: Failed to find Flask application or factory in >> module "create_db". Use "FLASK_APP=create_db:name to specify one. >> >> I used: >> FLASK_APP=create_db.py at the command

Re: creating a table within python code

2020-05-22 Thread Souvik Dutta
port os > from flask import Flask, session > from flask_session import Session > from sqlalchemy import create_engine > from sqlalchemy.orm import scoped_session, sessionmaker > engine = create_engine(os.getenv("DATABASE_URL")) > db = scoped_session(sessionmaker(bind=engine)

creating a table within python code

2020-05-22 Thread Buddy Peacock
code: import os from flask import Flask, session from flask_session import Session from sqlalchemy import create_engine from sqlalchemy.orm import scoped_session, sessionmaker engine = create_engine(os.getenv("DATABASE_URL")) db = scoped_session(sessionmaker(bind=engine)) def main()

Re: Tkinter: which ttk widget for database table primary key?

2020-03-18 Thread Rich Shepard
On Wed, 18 Mar 2020, MRAB wrote: You can make the Entry widget read-only: entry_widget['state'] = 'readonly' The user will still be able to copy from it. Alternatively, you can disable it: entry_widget['state'] = 'disabled' The user won't be able to copy from it. When updating the GUI,

Re: Tkinter: which ttk widget for database table primary key?

2020-03-18 Thread Rich Shepard
On Wed, 18 Mar 2020, Christian Gollwitzer wrote: You can use an Entry and set it to readonly state. Or you can use a Label. The advantage of the readonly Entry is, that the user can still copy/paste the content, and that it can scroll if the string is very long. Christian, Thank you. I did no

Re: Tkinter: which ttk widget for database table primary key?

2020-03-18 Thread MRAB
On 2020-03-18 20:39, Rich Shepard wrote: Subject might be confusing so I'll expand it here. My application uses a database backend in which each table has a unique and database-generated sequential numeric key. I want to display that key in the GUI for that class but it's not ente

Re: Tkinter: which ttk widget for database table primary key?

2020-03-18 Thread Christian Gollwitzer
Am 18.03.20 um 21:39 schrieb Rich Shepard: Subject might be confusing so I'll expand it here. My application uses a database backend in which each table has a unique and database-generated sequential numeric key. I want to display that key in the GUI for that class but it's not ente

Tkinter: which ttk widget for database table primary key?

2020-03-18 Thread Rich Shepard
Subject might be confusing so I'll expand it here. My application uses a database backend in which each table has a unique and database-generated sequential numeric key. I want to display that key in the GUI for that class but it's not entered by the user or altered. It seems to m

How to hide warning about drop table message to MariaDB

2020-01-19 Thread ^Bart
I ran this code: #!/usr/bin/python import MySQLdb # Open database connection db = MySQLdb.connect("localhost","root","MyPwd","MyDB") # prepare a cursor object using cursor() method cursor = db.cursor() # Drop table if it already exist using execute

Re: How to hide warning about drop table message to MariaDB

2020-01-19 Thread DL Neil via Python-list
On 20/01/20 4:35 AM, Python wrote: ^Bart wrote: I ran this code: #!/usr/bin/python import MySQLdb # Open database connection db = MySQLdb.connect("localhost","root","MyPwd","MyDB") # prepare a cursor object using cursor() method cursor = db.cursor()

Re: How to hide warning about drop table message to MariaDB

2020-01-19 Thread Python
^Bart wrote: I ran this code: #!/usr/bin/python import MySQLdb # Open database connection db = MySQLdb.connect("localhost","root","MyPwd","MyDB") # prepare a cursor object using cursor() method cursor = db.cursor() # Drop table if it already exist usin

Re: How to compare in python an input value with an hashed value in mysql table?

2020-01-16 Thread centredeformationfrance
Thank you so much Pieter! Danku well Where can I write you a review 5/5! Linkedin? Google business? Facebook page? Thank you!Thank you!Thank you!Thank you!Thank you! X 1! :-) -- https://mail.python.org/mailman/listinfo/python-list

Re: How to compare in python an input value with an hashed value in mysql table?

2020-01-16 Thread Pieter van Oostrum
Growth Hacking Formation writes: > Thanks for helping. That is what I thought. > Lets say it is the case and I get the key. We know it uses sha256 and it > apply to the ascii code. > What should be the python code in this scenario? > I am novice and the hash python module is a bit too complex fo

Re: How to compare in python an input value with an hashed value in mysql table?

2020-01-14 Thread Chris Angelico
On Wed, Jan 15, 2020 at 5:41 PM Growth Hacking Formation wrote: > > Thanks for helping. That is what I thought. > Lets say it is the case and I get the key. We know it uses sha256 and it > apply to the ascii code. > What should be the python code in this scenario? > I am novice and the hash pytho

Re: How to compare in python an input value with an hashed value in mysql table?

2020-01-14 Thread Growth Hacking Formation
Thanks for helping. That is what I thought. Lets say it is the case and I get the key. We know it uses sha256 and it apply to the ascii code. What should be the python code in this scenario? I am novice and the hash python module is a bit too complex for me. I read the doc. Thanks. -- https://m

Re: How to compare in python an input value with an hashed value in mysql table?

2020-01-14 Thread Chris Angelico
On Wed, Jan 15, 2020 at 10:54 AM Dennis Lee Bieber wrote: > > On Tue, 14 Jan 2020 10:02:08 -0800 (PST), Growth Hacking Formation > declaimed the following: > > > > > >Hello @formationgrowthhacking, > >thank you for your message and for using my plugin. > >For license key hashi

Re: How to compare in python an input value with an hashed value in mysql table?

2020-01-14 Thread Growth Hacking Formation
Thanks for your help. Litle details, the license key is goldQ3T8-1QRD-5QBI-9F22 and it is stored in database already encrypted. License key is not saved in database with clear text. It is already encrypted. I am not sure what is this hash column for? License key => def50200962018b6bbed50fc53a

Re: How to compare in python an input value with an hashed value in mysql table?

2020-01-14 Thread dieter
ad...@formationgrowthhacking.com writes: > I have a wordpress 5.3 websites which sell a software with license key. > > The license key is encrypted and stored in Mysql table. there are 2 columns > "license" and &

Re: How to compare in python an input value with an hashed value in mysql table?

2020-01-14 Thread Pieter van Oostrum
ad...@formationgrowthhacking.com writes: > I have a wordpress 5.3 websites which sell a software with license key. > > The license key is encrypted and stored in Mysql table. there are 2 columns > "license" and &

How to compare in python an input value with an hashed value in mysql table?

2020-01-13 Thread admin
I have a wordpress 5.3 websites which sell a software with license key. The license key is encrypted and stored in Mysql table. there are 2 columns "license" and "hash

Re: tkinter: widget to display set returned from database table

2019-06-20 Thread Rich Shepard
On Thu, 20 Jun 2019, Terry Reedy wrote: There is no sin is using less than all the features of a widget. Anyway, think of the tree having one node, which you can hide (not show), representing the table, and n leaves, representing the rows of the table, which you do show. Terry, This

Re: tkinter: widget to display set returned from database table

2019-06-20 Thread Rich Shepard
On Thu, 20 Jun 2019, MRAB wrote: Here's a small example. Thank you very much. Your example makes much more sense to me than do the ones I've found on the web. Best regards, Rich -- https://mail.python.org/mailman/listinfo/python-list

Re: tkinter: widget to display set returned from database table

2019-06-19 Thread Terry Reedy
On 6/19/2019 6:50 PM, Rich Shepard wrote: In a database application I want to design a view for the table rows returned from a select statement. Tkinter has a listbox widget and web searches suggest that multicolumn listboxes are best based on ttk.Treeview Right. widgets, but my understanding

Re: tkinter: widget to display set returned from database table

2019-06-19 Thread MRAB
On 2019-06-19 23:50, Rich Shepard wrote: In a database application I want to design a view for the table rows returned from a select statement. Tkinter has a listbox widget and web searches suggest that multicolumn listboxes are best based on ttk.Treeview widgets, but my understanding of a

tkinter: widget to display set returned from database table

2019-06-19 Thread Rich Shepard
In a database application I want to design a view for the table rows returned from a select statement. Tkinter has a listbox widget and web searches suggest that multicolumn listboxes are best based on ttk.Treeview widgets, but my understanding of a treeview is to display a hierarchical set

Re: How to create a RGB color Table

2019-06-17 Thread Vlastimil Brom
po 17. 6. 2019 v 11:30 odesílatel Jorge Conrado Conforte napsal: > > HI, > > Please someone could help me. How can I create a new color table with the > values of r g and b that I have. I use the Mataplolib color tables. However, > I would like to use a new color table with th

How to create a RGB color Table

2019-06-17 Thread Jorge Conrado Conforte
HI, Please someone could help me. How can I create a new color table with the values of r g and b that I have. I use the Mataplolib color tables. However, I would like to use a new color table with the respective r g b values that I have. Thank you. [https://ipmcdn.avast.com/images/icons

Re: Read the table data from PDF files in Python

2019-04-24 Thread Mark Kettner
I've heard about camelot a while ago: https://camelot-py.readthedocs.io/ but I never really used it and cannot provide any support or comparison to other data-extraction tools or the like. -- Mit freundlichen Gruessen / Best Regards Mark Kettner -- https://mail.python.org/mailman/listinfo/pyth

Re: Read the table data from PDF files in Python

2019-04-24 Thread Peter Pearson
On Wed, 24 Apr 2019 02:36:27 -0700 (PDT), mrawat...@gmail.com wrote: > Hello, > Anyone knows how to fetch the data from PDF file having tables with > other text in Python. Need to fetch some cell values based on > condition from that table. You might find pdftotext useful.

Re: Read the table data from PDF files in Python

2019-04-24 Thread Rhodri James
On 24/04/2019 10:36, mrawat...@gmail.com wrote: Anyone knows how to fetch the data from PDF file having tables with other text in Python. Need to fetch some cell values based on condition from that table. Hi there! If you have any alternatives to doing this, use them. Extracting data from

Read the table data from PDF files in Python

2019-04-24 Thread mrawat213
Hello, Anyone knows how to fetch the data from PDF file having tables with other text in Python. Need to fetch some cell values based on condition from that table. Thanks, Mukesh -- https://mail.python.org/mailman/listinfo/python-list

Re: Python BeautifulSoup extract html table cells that contains images and text

2017-07-29 Thread Piet van Oostrum
Umar Yusuf writes: > Hi all, > > I need help extracting the table from this url...? > > from bs4 import BeautifulSoup > url = "https://www.marinetraffic.com/en/ais/index/ports/all/per_page:50"; > > headers = {'User-agent': 'Mozilla/5.0

Python BeautifulSoup extract html table cells that contains images and text

2017-07-25 Thread Umar Yusuf
Hi all, I need help extracting the table from this url...? from bs4 import BeautifulSoup url = "https://www.marinetraffic.com/en/ais/index/ports/all/per_page:50"; headers = {'User-agent': 'Mozilla/5.0'} raw_html = requests.get(url, headers=headers) raw_

Re: how to create this dependency table from ast?

2017-07-02 Thread breamoreboy
On Sunday, July 2, 2017 at 2:32:36 PM UTC+1, ad...@python.org wrote: > ad...@python.org: > > Hi, Ho! > > > it is crucial that you dump that fucking Windows of yours and become > real pythonic under Linux ! Isn't this spammer, or is it spanner, cute? I'm rather upset that he's been duplicating m

Re: how to create this dependency table from ast?

2017-07-02 Thread Ho Yeung Lee
gt; > > > > it is crucial that you dump that fucking Windows of yours and become > > > real pythonic under Linux ! > > > > i do not understand what is difference in result if run in window and linux > > > > goal is to create a tab

Re: how to create this dependency table from ast?

2017-07-02 Thread Ho Yeung Lee
> real pythonic under Linux ! > > i do not understand what is difference in result if run in window and linux > > goal is to create a table > > graph = {'A': ['C'], > 'B': ['C'], > 'C':

Re: how to create this dependency table from ast?

2017-07-02 Thread Ho Yeung Lee
and linux goal is to create a table graph = {'A': ['C'], 'B': ['C'], 'C': ['D'], 'C': ['E']} from a = 1 b = 1 c = a + b d = c e = c Python 2.7.6 (default, O

how to create this dependency table from ast?

2017-07-02 Thread Ho Yeung Lee
i find parseprint function not exist in python 2.7 goal is to create a table graph = {'A': ['B', 'C'], 'B': ['C', 'D'], 'C': ['D'], 'D': ['C'],

Re: Read a text file into a Pandas DataFrame Table

2017-04-13 Thread breamoreboy
On Thursday, April 13, 2017 at 9:15:18 AM UTC+1, David Shi wrote: > Dear All, > Can anyone help to read a text file into a Pandas DataFrame Table? > Please see the link below. > http://www.ebi.ac.uk/ena/data/warehouse/search?query=%22geo_circ(-0.587,-90.5713,170)%22&result=sequence

Read a text file into a Pandas DataFrame Table

2017-04-13 Thread David Shi via Python-list
Dear All, Can anyone help to read a text file into a Pandas DataFrame Table? Please see the link below. http://www.ebi.ac.uk/ena/data/warehouse/search?query=%22geo_circ(-0.587,-90.5713,170)%22&result=sequence_release&display=text Regards. David -- https://mail.python.org/mailman/listinf

Re: A Python solution for turning a web page into Pandas DataFrame table

2017-04-07 Thread Steve D'Aprano
On Fri, 7 Apr 2017 07:08 pm, David Shi wrote: > > > Is there a Python solution for turning a web page into Pandas DataFrame > table? Looking forward to hearing from you. What, *any* web page? Like this? http://www.math.ubc.ca/~cass/courses/m308-03b/projects-03b/skinner/

A Python solution for turning a web page into Pandas DataFrame table

2017-04-07 Thread David Shi via Python-list
Is there a Python solution for turning a web page into Pandas DataFrame table? Looking forward to hearing from you. Regards. David -- https://mail.python.org/mailman/listinfo/python-list

table class - inheritance, delegation?

2017-03-31 Thread duncan smith
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

Re: read a table and make a basic plot

2016-12-19 Thread Peter Otten
Peter Otten wrote: > Here's a simple implementation that assumes both input and output file ... are in TAB-delimited text format. -- https://mail.python.org/mailman/listinfo/python-list

Re: read a table and make a basic plot

2016-12-19 Thread Peter Otten
metal.su...@gmail.com wrote: > Hi, I'm learning python and full of extensive tutorials around. Getting a > bit lost and overflowed in my head with tuples, dictionaries, lists, etc > ... etc... Everything great, but I'd like to perform some basic task while > learning the rest. For example, I'm hav

read a table and make a basic plot

2016-12-18 Thread metal . suomi
Hi, I'm learning python and full of extensive tutorials around. Getting a bit lost and overflowed in my head with tuples, dictionaries, lists, etc ... etc... Everything great, but I'd like to perform some basic task while learning the rest. For example, I'm having a hard time to find some practi

Re: Tie dictionary to database table?

2016-06-16 Thread Lawrence D’Oliveiro
On Friday, June 10, 2016 at 12:30:47 AM UTC+12, Peter Heitzer wrote: > What I would like is if I write > > email['frank']='fr...@middle-of-nowhere.org' > > in my python script it generates a statement like > update users set email='fr...@middle-of-nowhere.org' where username='frank'; That’s not

  1   2   3   4   5   6   7   8   >