Menu
Menu
DaniWeb
Log In
Sign Up
Read
Contribute
Meet
Search
Search
About 32 results for
cprofile
- Page 1
Python CPU Performance Analysis
Programming
Software Development
9 Years Ago
by cjohnweb
…help would be appreciated. I've read a lot about
cProfile
, but it's just not clicking. Thanks ncalls tottime …;) 1 0.000 0.000 0.000 0.000
cProfile
.py:5(<module>) 1 0.000 0.…) 1 0.000 0.000 0.000 0.000
cProfile
.py:66(Profile) 1 0.000 0.000 0.…
Scrolling with an Object
Programming
Software Development
12 Years Ago
by izthrower
… == '__main__': doprof = 0 if not doprof: main() else: import
cProfile
, pstats prof =
cProfile
.run("main()", "profile.prof") stats…
Creating lines in game
Programming
Software Development
12 Years Ago
by izthrower
… == '__main__': doprof = 0 if not doprof: main() else: import
cProfile
, pstats prof =
cProfile
.run("main()", "profile.prof") stats…
Chess in Python
Programming
Software Development
12 Years Ago
by happyhd
… Pawn or a capture # Various fixes and cleanup, thanks to
cProfile
- more efficient code # Play against (random) computer # # "AI"…: sys.exit("\n\nOkok. Aborting.") if __name__ == '__main__': #
cProfile
.run('main()') main()[/CODE]
MySQLdb interface problem
Programming
Databases
14 Years Ago
by bhanu1225
… terminalcommand _AH bz2 markupbase termios _App cPickle marshal test _CF
cProfile
math tests _CG cStringIO md5 textwrap _CarbonEvt calendar mhlib…
Re: How improve code speed
Programming
Software Development
14 Years Ago
by Ene Uran
… give function. Use something like this: [code=python]import
cProfile
def order_nodes(path_value): ... ...
cProfile
.run("order_nodes()") ... ... [/code]The many calls…
Re: How improve code speed
Programming
Software Development
14 Years Ago
by ning2009
… give function. Use something like this: [code=python]import
cProfile
def order_nodes(path_value): ... ...
cProfile
.run("order_nodes()") ... ... [/code]The many calls…
Re: Efficient SQL and Loops in Python, Postgresql, PostGIS
Programming
Software Development
14 Years Ago
by Gribouillis
You could also consider loading all the schools and children in memory and modify the database only when you know in which school each child goes (this can be done if you're able to compute the distance between a child and a school without the ST_DISTANCE function). Also, try to use the
cProfile
module to tell you where time is spent.
Re: Efficient SQL and Loops in Python, Postgresql, PostGIS
Programming
Software Development
14 Years Ago
by DdoubleD
… school without the ST_DISTANCE function). Also, try to use the
cProfile
module to tell you where time is spent.[/QUOTE] In…
Re: Thread & Queue Vs Serial
Programming
Software Development
14 Years Ago
by Gribouillis
Perhaps you could use the
cProfile
module to find out where time is spent ?
Re: Thread & Queue Vs Serial
Programming
Software Development
14 Years Ago
by Gribouillis
… good idea to find out where it comes from. The
cProfile
module allows you to spot the function calls which slow…
Re: Text Encryption/Decryption with XOR (Python)
Programming
Software Development
13 Years Ago
by TrustyTony
… test and redirected to sys.stderr [CODE]import sys import
cProfile
as profile from time import clock __all__ = ['Tester', 'do_tests'] class…
Re: How to find execution time in python .. ?
Programming
Software Development
13 Years Ago
by Gribouillis
The Timer.timeit function runs your function 1 000 000 times by default, so your function runs in 21 microseconds on average. If you want to run a program only once and measure its performance, you should use the '
cProfile
' or 'profile' module. See [url]http://docs.python.org/library/profile.html[/url].
Re: Saving multiple images
Programming
Software Development
13 Years Ago
by python_user
… import asksaveasfilename, askopenfilename from tkFileDialog import askdirectory import math import
cProfile
import pstats from CalculateImageData import CalculateImageData from VarRadioSelect import VarRadioSelect…
Re: Saving multiple images
Programming
Software Development
13 Years Ago
by python_user
… import asksaveasfilename, askopenfilename from tkFileDialog import askdirectory import math import
cProfile
import pstats from CalculateImageData import CalculateImageData from VarRadioSelect import VarRadioSelect…
Re: Best data structure for this problem ?
Programming
Software Development
13 Years Ago
by TrustyTony
Profile your code with
cProfile
to see what operations take most time. i would think that dictionary of list of sentences (or their index) containing given word would be helpfull.
Re: Best data structure for this problem ?
Programming
Software Development
13 Years Ago
by koveras vehcna
[QUOTE=tonyjv;1537676]Profile your code with
cProfile
to see what operations take most time. i would think that dictionary of list of sentences (or their index) containing given word would be helpfull.[/QUOTE] Thanks for the information.
Re: help("modules") - error
Programming
Software Development
12 Years Ago
by vegaseat
…types JpegImagePlugin bz2 nt unicodedata McIdasImagePlugin cPickle ntpath unittest MicImagePlugin
cProfile
ntsecuritycon urllib MimeWriter cStringIO nturl2path urllib2 MpegImagePlugin calendar numbers urlparse…
Re: Program won't run if input is too large
Programming
Software Development
10 Years Ago
by vegaseat
… always module timeit to time your progress. Python has module
cProfile
that can be applied to show you how many times…
Re: Python CPU Performance Analysis
Programming
Software Development
9 Years Ago
by vegaseat
On first glance look at the items with the highest tottime values. Then check the number of calls and the percall time. Remember that function calls are expensive because of the overhead.
Re: Scrolling with an Object
Programming
Software Development
12 Years Ago
by vegaseat
Take a look at: [url]http://www.daniweb.com/software-development/python/code/254039[/url]
Re: Creating lines in game
Programming
Software Development
12 Years Ago
by JoshuaBurleson
it might help to just show us the line of code you're talking about, to be honest it 176 lines is a bit much when you're talking about one section.
Re: Creating lines in game
Programming
Software Development
12 Years Ago
by izthrower
[CODE] elif event.type == MOUSEBUTTONDOWN and event.button == 1: if line_point1 is None: line_point1 = Vec2d(event.pos[X], flipy(event.pos[Y])) i = 0 x =0 while x == 0: while i <= 100: l1 = pygame.mouse.…
Re: Chess in Python
Programming
Software Development
12 Years Ago
by hughesadam_87
This is cool bud. I think if you have enough understanding of OOP to make this chess game, you ought to start learning the Enthough Tool Suite. The Enthought Tool Suite will let you rebuild this program with a total GUI and other things without adding much. I know this isn't very informative, and I'll post some tutorial videos soon, but I think …
Re: Chess in Python
Programming
Software Development
12 Years Ago
by TrustyTony
Maybe you would like to compare your code with for example [url]https://github.com/liudmil-mitev/Simple-Python-Chess[/url] (7 months not updated) by [url]https://github.com/liudmil-mitev[/url] or some other gui chess and for example improve that code for enpassant for/with him, as you have experience of implementing in your program.
Re: Chess in Python
Programming
Software Development
12 Years Ago
by happyhd
[QUOTE=shoemoodoshaloo;1775979]This is cool bud. I think if you have enough understanding of OOP to make this chess game, you ought to start learning the Enthough Tool Suite. The Enthought Tool Suite will let you rebuild this program with a total GUI and other things without adding much. I know this isn't very informative, and I'll post some …
Re: Chess in Python
Programming
Software Development
12 Years Ago
by happyhd
[QUOTE=pyTony;1776045]Maybe you would like to compare your code with for example [url]https://github.com/liudmil-mitev/Simple-Python-Chess[/url] (7 months not updated) by [url]https://github.com/liudmil-mitev[/url] or some other gui chess and for example improve that code for enpassant for/with him, as you have experience of implementing in your …
Re: Chess in Python
Programming
Software Development
11 Years Ago
by gmorcan
> "AI" not rewritten to classes yet, so computer is simply picking > # a random move. how about printing AI's moves, it's kind of hard to track them.
Re: Chess in Python
Programming
Software Development
11 Years Ago
by HTMLperson5
I have found a little flaw here...when you use `import os` you are relying on what operating system the person who is running the program is on, so when you use `clear` of course it will work on linux/unix/mac but it will not work on windows, as for windows you use `cls` So if the user is running windows, they'll will get an error every time the …
Re: Chess in Python
Programming
Software Development
11 Years Ago
by Gribouillis
You can also print chess symbols in the terminal, they are small, but it works >>> print u"\u2654\u2655\u2656\u2657\u2658\u2659\u265A\u265B\u265C\u265D\u265E\u265F" ♔♕♖♗♘♙♚♛♜♝♞♟ Together with the box drawings code points (unicode 2500 +), it should be possible to draw a nice looking chessboard in a terminal. Your os …
1
2
Next
Search
Search
Forum Categories
Hardware/Software
Programming
Digital Media
Community Center
Latest Content
Newest Topics
Latest Topics
Latest Posts
Latest Comments
Top Tags
Topics Feed
Social
Meet People
Forums
Top Members
Community Functions
DaniWeb Premium
Newsletter Archive
Markdown Syntax
Community Rules
Developer APIs
Connect API
Forum API Docs
Tools
SEO Backlink Checker
Legal
Terms of Service
Privacy Policy
FAQ
About Us
Advertise
Contact Us
© 2024 DaniWeb® LLC