Search Results

Search found 14486 results on 580 pages for 'python idle'.

Page 201/580 | < Previous Page | 197 198 199 200 201 202 203 204 205 206 207 208  | Next Page >

  • I have a list of names, some of them are fake, I need to use NLP and Python 3.1 to keep the real nam

    - by Sho Minamimoto
    I have no clue of where to start on this. I've never done any NLP and only programmed in a Python 3.1, which I have to use. I'm looking at the site http://www.linkedin.com and I have to gather all of the public profiles and some of them have very fake names, like 'aaaaaa k dudujjek' and I've been told I can use NLP to find the real names, where would I even start?

    Read the article

  • How can I make a siren noise in Python?

    - by Shady
    I'm trying to make a siren sound in python with beeps, but had no success.. I'm trying something like winsound.Beep(700,500) winsound.Beep(710,500) winsound.Beep(720,500) ... It's a better way to do it? And play it? Without external files... Thx

    Read the article

  • How do I parse a VCard to a Python dictionary?

    - by lecodesportif
    I'm trying to figure out how to parse a VCard to a Python dictionary using VObject. vobj=vobject.readOne(string) print vobj.behavior.knownChildren This is all I get: {'CATEGORIES': (0, None, None), 'ADR': (0, None, None), 'UID': (0, None, None), 'PHOTO': (0, None, None), 'LABEL': (0, None, None), 'VERSION': (1, 1, None), 'FN': (1, 1, None), 'ORG': (0, None, None), 'N': (1, 1, None), 'PRODID': (0, 1, None)} How can I populate the dictionary with my VCard data?

    Read the article

  • Installing Trac on Windows under Apache 2.2?

    - by Warren P
    Trac is a python-powered bug-tracking and project-management app. According to Trac's wiki, there are several options for installing Trac, a standalone server (tracd), or under a dedicated webserver using one of these options: FastCGI - Not available on windows. mod_wsgi - No version of mod_wsgi available for Apache 2.2.22 and Python 2.7.3-amd64 that actually runs on my system! mod_python - no longer recommended, as mod_python is not actively maintained anymore) CGI -should not be used, as the performance is far from optimal) That leaves me with zero ways to run Trac on Windows. Apache 2.2.22 with ModWSGI loading, crashes the Apache2.2 service on startup without any error logs. Disabling the line in the apache configuration to load mod_wsgi restores sanity. I just want an installation of Trac on windows with Authentication enabled. I am unable to get authenetication to work using basic tracd like this: tracd -p 8000 --basic-auth="c:\tmp,c:\tmp\Passwords.md5.txt,mycompany" c:\tmp\RootFolder And I am unable to get Mod_WSGI installed. I'm going to keep trying to figure out a combination that works, I suspect I should have installed 32 bit python instead of 64 bit python, to start with. Did I do wrong to install Python 64 bit 2.7.3? I tried again with all 32 bit components, and still can't get MOD_WSGI to work with apache 2.2.22. I'm going to try to compile mod_wsgi myself with Visual C++ Express 2010, but it seems to me that it ought to be easier than this to get Trac running on windows, with authentication. Is there a way to run Trac on Windows, under Apache, with authentication? The last "Trac on windows" article died in 2008, leaving only this internet archive link for "Trac on windows" setup.

    Read the article

  • What is the best practices for checking if the user of a Python script has root-like privileges?

    - by Paul Hoffman
    I have a Python script that will be doing a lot of things that would require root-level privileges, such as moving files in /etc, installing with apt-get, and so on. I currently have: if os.geteuid() != 0: exit("You need to have root privileges to run this script.\nPlease try again, this time using 'sudo'. Exiting.") Is this the best way to do the check? Are there other best practices?

    Read the article

  • Prevent lock of windows detecting user idle time

    - by Zimelemon
    I work in a Windows Terminal Server enviroment where if you left the computer for a while, windows lock the session and terminal is power off. What i need is the code needed to send a message to Windows for it to believe the user is in front of the PC (mouse or keyboard activity). Thanks in advance

    Read the article

  • How can I maximize a specific window with Python?

    - by Shady
    I'm trying to maximize a specific window with python... Here is the deal: I have a script that opens 2 firefox windows (selenium rc), and I need to maximize the second window, the last one that opens... How can I do it? I'm using this command window = win32gui.GetForegroundWindow() win32gui.MoveWindow(window, 0, 0, 1440, 900, True) that works perfectly, but only with the focus window... and the second window of firefox witch opens with the script doesnt get focused...

    Read the article

  • how to disable RemoteApp sessions lock if idle for 10 minutes and require no user needs to input password to unlock?

    - by Carlos Sanchez
    RemoteApp sessions lock if idle for 10 minutes, user needs to input password to unlock. My users are running an application from Win2008 Terminal server using RemoteApp. If the application remains idle for 10 minutes it gets "locked" and the user is required to enter username and password to continue using it. This is VERY VERY annoying as the app usually sits idle for bout 20-30 minutes, used for 1 min... repeat.

    Read the article

  • class browsing in django

    - by jamida
    I'd like to browse active classes in Django. I think I'd learn a lot that way. So what's a good way to do that? I could use IDLE if I knew how to start Django from within IDLE. But as I'm new to Python/Django, I'm not particularly wedded to IDLE. Other alternatives?

    Read the article

  • What's a good pure-python, document-based and flat-file database engine?

    - by joe Simpson
    Hi, for development i'd love to have a flat file database with the requirements up in the title, but I don't seem to be able to find a database with these requirements. I can't seem to get MetaKit to work. I only need it to work on the development machine, but in the real world my product will have more data and needs more room and will need something better. Does anyone know of a database engine capable of this or do I need to just use python's pickle and load and save a file? Joe

    Read the article

  • DeprecationWarning when pushing to Mercurial repo

    - by Josh Nankin
    I'm trying to serve a merurial repository with apache, and when I try to push to the repo I see this in the apache error.log. On the client side I get a 500 error. How do I get this to go away???? [Sun Jun 06 14:43:25 2010] [error] [client 192.168.1.8] /var/lib/python-support/python2.6/mercurial/hgweb/common.py:24: DeprecationWarning: BaseException.message has been deprecated as of Python 2.6 [Sun Jun 06 14:43:25 2010] [error] [client 192.168.1.8] self.message = message [Sun Jun 06 14:43:25 2010] [error] [client 192.168.1.8] /var/lib/python-support/python2.6/mercurial/hgweb/hgweb_mod.py:104: DeprecationWarning: BaseException.message has been deprecated as of Python 2.6 [Sun Jun 06 14:43:25 2010] [error] [client 192.168.1.8] if not inst.message: [Sun Jun 06 14:43:25 2010] [error] [client 192.168.1.8] /var/lib/python-support/python2.6/mercurial/hgweb/hgweb_mod.py:106: DeprecationWarning: BaseException.message has been deprecated as of Python 2.6 [Sun Jun 06 14:43:25 2010] [error] [client 192.168.1.8] return '0\\n%s\\n' % inst.message,

    Read the article

  • How to switch position of two items in a Python list?

    - by mikl
    I haven’t been able to find a good solution for this problem on the net (probably because switch, position, list and Python are all such overloaded words). It’s rather simple – I have this list: ['title', 'email', 'password2', 'password1', 'first_name', 'last_name', 'next', 'newsletter'] I’d like to switch position of 'password2' and 'password1' – not knowing their exact position, only that they’re right next to one another and password2 is first. I’ve accomplished this with some rather long-winded list-subscripting, but I wondered if someone could come up with something a bit more elegant?

    Read the article

  • Why does Python's math.factorial not play nice with threads?

    - by W1N9Zr0
    Why does math.factorial act so weird in a thread? Here is an example, it creates three threads: thread that just sleeps for a while thread that increments an int for a while thread that does math.factorial on a large number. It calls start on the threads, then join with a timeout The sleep and spin threads work as expected and return from start right away, and then sit in the join for the timeout. The factorial thread on the other hand does not return from start until it runs to the end! import sys from threading import Thread from time import sleep, time from math import factorial # Helper class that stores a start time to compare to class timed_thread(Thread): def __init__(self, time_start): Thread.__init__(self) self.time_start = time_start # Thread that just executes sleep() class sleep_thread(timed_thread): def run(self): sleep(15) print "st DONE:\t%f" % (time() - time_start) # Thread that increments a number for a while class spin_thread(timed_thread): def run(self): x = 1 while x < 120000000: x += 1 print "sp DONE:\t%f" % (time() - time_start) # Thread that calls math.factorial with a large number class factorial_thread(timed_thread): def run(self): factorial(50000) print "ft DONE:\t%f" % (time() - time_start) # the tests print print "sleep_thread test" time_start = time() st = sleep_thread(time_start) st.start() print "st.start:\t%f" % (time() - time_start) st.join(2) print "st.join:\t%f" % (time() - time_start) print "sleep alive:\t%r" % st.isAlive() print print "spin_thread test" time_start = time() sp = spin_thread(time_start) sp.start() print "sp.start:\t%f" % (time() - time_start) sp.join(2) print "sp.join:\t%f" % (time() - time_start) print "sp alive:\t%r" % sp.isAlive() print print "factorial_thread test" time_start = time() ft = factorial_thread(time_start) ft.start() print "ft.start:\t%f" % (time() - time_start) ft.join(2) print "ft.join:\t%f" % (time() - time_start) print "ft alive:\t%r" % ft.isAlive() And here is the output on Python 2.6.5 on CentOS x64: sleep_thread test st.start: 0.000675 st.join: 2.006963 sleep alive: True spin_thread test sp.start: 0.000595 sp.join: 2.010066 sp alive: True factorial_thread test ft DONE: 4.475453 ft.start: 4.475589 ft.join: 4.475615 ft alive: False st DONE: 10.994519 sp DONE: 12.054668 I've tried this on python 2.6.5 on CentOS x64, 2.7.2 on Windows x86 and the factorial thread does not return from start on either of them until the thread is done executing. I've also tried this with PyPy 1.8.0 on Windows x86, and there result is slightly different. The start does return immediately, but then the join doesn't time out! sleep_thread test st.start: 0.001000 st.join: 2.001000 sleep alive: True spin_thread test sp.start: 0.000000 sp DONE: 0.197000 sp.join: 0.236000 sp alive: False factorial_thread test ft.start: 0.032000 ft DONE: 9.011000 ft.join: 9.012000 ft alive: False st DONE: 12.763000

    Read the article

< Previous Page | 197 198 199 200 201 202 203 204 205 206 207 208  | Next Page >