e SELECT statement to query my table.
I have never used sqllite, plus there's some extra complexity as
comparing certain colum requires custom logic, but I wonder if this
architecture would work well also when dealing with a 300Mb database.
4. Other ideas?
Hopefully I made sense
nd to the query, that's unless I pre-load the data
into something that allows faster access.
Also, as you correctly observed, "looking good with my colleagues" is a
nice-to-have feature at this point, not really an absolute requirement :)
Dino
On 1/15/2023 3:17 AM, Lars Liedtke
speed of a SELECT query against a 100k
rows / 300 Mb Sqlite db?
Dino
On 1/15/2023 6:14 AM, Peter J. Holzer wrote:
On 2023-01-14 23:26:27 -0500, 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 performan
conn,adding)) == 0:
https://github.com/Gerardwx/database_testing/blob/main/src/database_testing/create.py#L40
Dino
--
https://mail.python.org/mailman/listinfo/python-list
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
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
lot of thing...
thank you for this. It's probably my lack of experience with Numpy,
but... can you explain what is going on here in more detail?
Thank you
Dino
--
https://mail.python.org/mailman/listinfo/python-list
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
cn,
"type": cd[cn]["a"],
"description": cd[cn]["b"]
})
and it works, but I look at this and think that there must be a better
way. Am I missing something obvious?
PS: Screw OpenAPI!
Dino
--
https://mail.python.org/mailman/listinfo/python-list
On 1/20/2023 11:06 AM, Tobiah wrote:
On 1/20/23 07:29, Dino wrote:
This doesn't look like the program output you're getting.
you are right that I tweaked the name of fields and variables manually
(forgot a couple of places, my bad) to illustrate the problem more
generally, but
OK options for my need. It's just that the compact, improved
visualization would be nice to have. Not so nice that I would go out of
my way to build, but nice enough to use an exising package.
Thanks
Dino
--
https://mail.python.org/mailman/listinfo/python-list
I learned new things today and I thank you all for your responses.
Please consider yourself thanked individually.
Dino
On 1/20/2023 10:29 AM, Dino wrote:
let's say I have this list of nested dicts:
--
https://mail.python.org/mailman/listinfo/python-list
you rock. Thank you, Stefan.
Dino
On 1/21/2023 2:41 PM, Stefan Ram wrote:
r...@zedat.fu-berlin.de (Stefan Ram) writes:
def display_( object, last ):
directory = object; result = ''; count = len( directory )
for entry in directory:
count -= 1; name = ent
$ python
Python 3.8.10 (default, Mar 15 2022, 12:22:08)
[GCC 9.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> b = True
>>> isinstance(b,bool)
True
>>> isinstance(b,int)
True
>>>
WTF!
--
https://mail.python.org/mailman/listinfo/python-list
r and over again)
Does such a marvel exist?
Thinking about it, it doesn't necessarily need to be Python, but I guess
I would have a chance to tweak things if it was.
Thanks
Dino
--
https://mail.python.org/mailman/listinfo/python-list
On 1/23/2023 11:22 PM, Dino wrote:
>>> b = True
>>> isinstance(b,bool)
True
>>> isinstance(b,int)
True
>>>
ok, I read everything you guys wrote. Everyone's got their reasons
obviously, but allow me to observe that there's also something calle
On 1/25/2023 1:33 PM, orzodk wrote:
I have used locust with success in the past.
https://locust.io
First impression, exactly what I need. Thank you Orzo!
--
https://mail.python.org/mailman/listinfo/python-list
On 1/25/2023 1:21 PM, Thomas Passin wrote:
I actually have a Python program that does exactly this.
Thank you, Thomas. I'll check out Locust, mentioned by Orzodk, as it
looks like a mature library that appears to do exactly what I was hoping.
--
https://mail.python.org/mailman/listinfo
On 1/25/2023 3:27 PM, Dino wrote:
On 1/25/2023 1:33 PM, orzodk wrote:
I have used locust with success in the past.
https://locust.io
First impression, exactly what I need. Thank you Orzo!
the more I learn about Locust and I tinker with it, the more I love it.
Thanks again.
--
https
On 1/25/2023 4:30 PM, Thomas Passin wrote:
On 1/25/2023 3:29 PM, Dino wrote:
Great! Don't forget what I said about potential overheating if you hit
the server with as many requests as it can handle.
Noted. Thank you.
--
https://mail.python.org/mailman/listinfo/python-list
in
offers.
Anyway, everything is equivalent to a Turing machine and IA will screw
everyone, including programmers, eventually.
Thanks again and have a great day
Dino
On 1/25/2023 9:14 PM, avi.e.gr...@gmail.com wrote:
Dino,
There is no such things as a "principle of least surprise&qu
On 1/25/2023 5:42 PM, Chris Angelico wrote:
Try this (or its equivalent) in as many languages as possible:
x = (1 > 2)
x == 0
You'll find that x (which has effectively been set to False, or its
equivalent in any language) will be equal to zero in a very large
number of languages. Thus, to an
y suddenly fall apart.
also carefully designed systems that are the work of experts may
suddenly fall apart.
Thank you for all the time you have used to address the points I raised.
It was interesting reading.
Dino
--
https://mail.python.org/mailman/listinfo/python-list
occupation of my script? Google is coming up with quite a few options,
but I value the opinion of people here a lot.
Thank you for any feedback you may be able to provide.
Dino
--
https://mail.python.org/mailman/listinfo/python-list
On 2/10/2023 7:39 PM, Dino wrote:
- How would you structure the caching so that different caching
strategies are "pluggable"? change one line of code (or even a config
file) and a different caching strategy is used in the next run. Is this
the job for a design pattern such as
ially more relevant
entries.
I am thinking of the Least Recently Used principle, but how to implement
that is not immediate. Before I embark on reinventing the wheel, is
there a tool, library or smart trick that will allow me to remove
elements with LRU logic?
thanks
Dino
--
Thank you Mats, Avi and Chris
btw, functools.lru_cache seems rather different from what I need, but
maybe I am missing something. I'll look closer.
On 2/14/2023 7:36 PM, Mats Wichmann wrote:
On 2/14/23 15:07, Dino wrote:
--
https://mail.python.org/mailman/listinfo/python-list
Thank you, Gerard. I really appreciate your help
Dino
On 2/16/2023 9:40 PM, Weatherby,Gerard wrote:
I think this does the trick:
https://gist.github.com/Gerardwx/c60d200b4db8e7864cb3342dd19d41c9
#!/usr/bin/env python3
import collections
import random
from typing import Hashable, Any
On 3/4/2023 10:43 PM, Dino wrote:
I need fast text-search on a large (not huge, let's say 30k records
totally) list of items. Here's a sample of my raw data (a list of US
cars: model and make)
I suspect I am really close to answering my own question...
>>> import time
&g
.
are there other options that are fast out there? Can I "grep" through a
data structure in python... but faster?
Thanks
Dino
--
https://mail.python.org/mailman/listinfo/python-list
Here's the complete data file should anyone care.
Acura,CL
Acura,ILX
Acura,Integra
Acura,Legend
Acura,MDX
Acura,MDX Sport Hybrid
Acura,NSX
Acura,RDX
Acura,RL
Acura,RLX
Acura,RLX Sport Hybrid
Acura,RSX
Acura,SLX
Acura,TL
Acura,TLX
Acura,TSX
Acura,Vigor
Acura,ZDX
Alfa Romeo,164
Alfa Romeo,4C
Alfa
On 3/5/2023 1:19 AM, Greg Ewing wrote:
I just did a similar test with your actual data and got
about the same result. If that's fast enough for you,
then you don't need to do anything fancy.
thank you, Greg. That's what I am going to do in fact.
--
https://mail.python.org/mailman/listinfo/pyth
t of the box,
which is chump change in the context of a web UI.
Thank you again for taking the time to look at my question
Dino
On 3/5/2023 10:56 PM, avi.e.gr...@gmail.com wrote:
Dino, Sending lots of data to an archived forum is not a great idea. I
snipped most of it out below as not to repli
On 3/5/2023 9:05 PM, Thomas Passin wrote:
I would probably ingest the data at startup into a dictionary - or
perhaps several depending on your access patterns - and then you will
only need to to a fast lookup in one or more dictionaries.
If your access pattern would be easier with SQL querie
On 3/4/2023 10:43 PM, Dino wrote:
I need fast text-search on a large (not huge, let's say 30k records
totally) list of items. Here's a sample of my raw data (a list of US
cars: model and make)
Gentlemen, thanks a ton to everyone who offered to help (and did help!).
I loved the
my little application.
Re-requesting from the server seems to win hands down in my case.
I am sure that them google engineers reached spectacular levels of UI
finesse with stuff like this.
On Mon, 6 Mar 2023 21:55:37 -0500, Dino wrote:
https://schier.co/blog/wait-for-user-to-stop-typing-using-
On 3/7/2023 1:28 PM, David Lowry-Duda wrote:
But I'll note that I use whoosh from time to time and I find it stable
and pleasant to work with. It's true that development stopped, but it
stopped in a very stable place. I don't recommend using whoosh here, but
I would recommend experimenting wit
icacies of JavaScript web development in a Python forum. Should
I have stopped them? How?
One thing is for sure: I am really grateful that so many used so much of
their time to help.
A big thank you to each of you, friends.
Dino
--
https://mail.python.org/mailman/listinfo/python-list
Patty wrote:
> Thanks so much for this reference - and the detailed further explanation! I
> have a Windows 7 system and recently installed Visual Studio 2010 for the
> SQL Server, Visual C/C++ and Visual Basic. I would love to have this Python
> tool installed under Visual Studio but a few que
The PTVS release is really an extended version of the tools in IronPython 2.7.
It adds support for CPython including debugging, profiling, etc... while still
supporting IronPython as well. We'll likely either replace the tools
distributed w/ IronPython with this version (maybe minus things li
The first check is also off - it should if issubclass(type(Test), type):
otherwise you miss the metaclass case:
class foo(type): pass
class Test(object):
__metaclass__ = foo
obj = Test
if type(obj) == type: 'class obj'
else: 'not a class'
just on the off-chance you run into a metaclass :)
Warnings is one of the features that didn't quite make it for v1.0. In general
w.r.t. non-ASCII characters you'll find IronPython to be more like Jython in
that all strings are Unicode strings. But other than that we do support
PEP-263 for the purpose of defining alternate file encodings.
We'
Yes, IronPython generates IL which the JIT will then compile when the method is
invoked - so our parse/compile time is slower due to this. We've experimented
w/ a fully interpreted mode (which can be enabled with -X:FastEval) where we
walk the generated AST instead of compiling it, but that mod
Given a file foo.py:
def f():
You should get these results:
IronPython 1.0.60816 on .NET 2.0.50727.312
Copyright (c) Microsoft Corporation. All rights reserved.
>>> try:
... execfile('foo.py')
... except IndentationError, e:
... import sys
... x = sys.exc_info()
...
>>> print x[1].fi
Currently IronPython doesn't support being hosted in WSH. It's something we've
discussed internally in the past but we've never had the cycles to make it work.
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of misiek3d
Sent: Thursday, June 28, 2007 3:07 AM
I'm assuming this is by-design, but it doesn't appear to be documented:
>>> '%8.f' % (-1)
' -1'
>>> '%#8.f' % (-1)
' -1.'
The docs list the alternate forms, but there isn't one listed for f/F. It
would seem the alternate form for floating points is truncate & round the
floating poin
Hughes
Sent: Friday, April 28, 2006 1:00 PM
To: python-list@python.org
Subject: Re: Undocumented alternate form for %#f ?
Dino Viehland wrote:
> I'm assuming this is by-design, but it doesn't appear to be
> documented:
>
> >>> '%8.f' % (-1)
> '
>>
>> Oh, I know what you mean.
>> But that was exactly the reason for having a .DLLs folder, isn't it?
>> When you place an assembly into this folder, you avoid having to write
>> this boilerplate code, and simply import the assembly as you would
>> with a normal python module. At least, that´s ho
Dirkjan Ochtman wrote:
>
> It would seem to me that optimizations are likely to require data
> structure changes, for exactly the kind of core data structures that
> you're talking about locking down. But that's just a high-level view,
> I might be wrong.
>
In particular I would guess that ref co
u gorenavedenom flajeru u 8. redu:
"postoji više od 60.000 virusa i drugih štetnih programa "
samo virusa ima nekoliko stotina tisuca, zajedno sa potencijalno stetim
aplikacijama i ostalim malicioznim kodom brojka ide preko milion
--
http://mail.python.org/mailman/listinfo/python-list
The end result of that is on a 32-bit machine IronPython runs in a 32-bit
process and on a 64-bit machine it runs in a 64-bit process.
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Mike Driscoll
Sent: Friday, July 25, 2008 5:58 AM
To: python-list@python
IronPython doesn't have an interpreter loop and therefore has no POP / TOP /
etc... Instead what IronPython has is a method call Int32Ops.Add which looks
like:
public static object Add(Int32 x, Int32 y) {
long result = (long) x + y;
if (Int32.MinValue <= result
instructions, once it's known what the values of
the variables are that are the operands. The trade-off is compilation
time + type checks + stub look-up.
What I want to know is, if __add__ performs an attribute look-up, is
that optimized in any way, after the IP is already in compiled code?
Af
Lev wrote:
> I'm an on and off Python developer and use it as one of the tools.
> Never for writing "full-blown" applications, but rather small, "one-of-
> a-kind" utilities. This time I needed some sort of backup and
> reporting utility, which is to be used by the members of our team
> once or twi
Stefan wrote:
> >From an implementors point of view, it's actually quite the opposite. Most
> syntax features of Python 3 can be easily implemented on top of an existing
> Py2 Implementation (we have most of them in Cython already, and I really
> found them fun to write), and the shifting-around in
Steve wrote:
> id() simply returns a unique value identifying a particular object. In
> CPython, where objects do not migrate in memory once created, the
> memory
> address of the object is used. In IronPython each object is assigned an
> id when it is created, and that value is stored as an attrib
In the ssl module docs (and in the tests) it says that if you have a client
specifying PROTOCOL_SSLv23 (so it'll use v2 or v3) and a server specifying
PROTOCOL_SSLv3 (so it'll only use v3) that you cannot connect between the two.
Why doesn't this end up using SSL v3 for the communication?
--
Kirby wrote:
> ** Unconfirmed rumors about IronPython leave me blog searching this
> afternoon. Still part of Codeplex?
IronPython is still using CodePlex for bug tracking and posting releases but
active development is now on GitHub w/ a Mercurial mirror. Jeff's blog has
more info: http://jdha
Terry wrote:
> > IronPython targets Python 2.6.
>
> They plan to release a 2.7 version sometime this year after CPython2.7
> is released. They plan to release a 3.2 version early next year, soon
> after CPython. They should be able to do that because they already have
> a 3.1 version mostly done
59 matches
Mail list logo