15,185 Topics
| |
0ello I'm trying creating a triangular mesh from png. How can I extract the basic information from a image contour to create a mesh? I used opencv module in order to extract the contours . On xyContour variable I have essentially a path, but with a path I think that … | |
**I have an issue with running python scripts on linode cloud server. I create a scrapping script to scrape data by check in and check out so that i run the script using screen method. It run over one day very smoothly but today it hang. No response. When i … | |
Hi. I'm creating a web crawler, I want to send the output into a txt file, how can I do it? And I also want to give a path to the script to set the directory. How can I do it now? | |
I am making a Python script which will search for Thread-ID and according to thread-ID it will find corresponding UIDs. After getting the UID I will be able to get required data for analysis. My ultimate goal is to make a graph, something like the following: https://dl.dropboxusercontent.com/u/32435266/Graph3.png Is this the … | |
Hi Guys, I've been asked to create a GUI to output all the information gather by the program I currently have, however I'm new to using Tkinter and was wondering if someone could possible help... #!/usr/bin/python """ header comment section ****** file: M:\testPCAN\miketst.py ***** END of header comment section """ … | |
Hello! I was wondering if anybody could help me with something. I'm writing off-line banking application. I already have a code in Python and now I need to write window aplication for it. How should I begin? I wrote some simple code for main window in PyQt. But I dont … | |
I am currently troubleshooting a utility that I have been working on. The main file of the utility is below. Please not that `flatten_dict` and `makerows` are seperate files and functions, respectively. My objectives are to: * Recursively traverse a directory - done * Find XML and text files only … | |
Hello, again, people. You helped me to install Python on my Desktop, and now I cannot get it running on my Laptop… same as the Desktop… Win 7, 32-bit, SP1. I think I did the same procedures, but it wouldn’t work. So, I UN-installed Python. Then re-installed it. Same problems… … | |
Write a function named repeatCount(). The function repeatCount() takes two string parameters: --> the name of an input file and the name of an output file. The function repeatCount() should read each line of the input file, identify the number of words on the line that occur more than once, … | |
I am implementing the last feature of my Python Checkers Game, which is to require the user to make multiple jumps. For captures, I do the following: 1 Check if the move is valid: 2 self.validatedMove = True (The move that has been made is valid.) 3 self.capture() (Captures the … | |
ok, so if you know me well, this gets a little complex... what I'm trying to do is execute a function from a script that requires 2 arguments where the names varry depending on the script. but I'd like that function to be executed in a namespace where I can … | |
Hello all, I have started an new project which needs a Fibonacci sequence (all Fibonacci numbers below 4,000,000) Here is my code for calculating Fibonacci numbers: numbers_list = [] number1 = 1 number2 = 2 total = 0 while (total < 4000000): total = number1 + number2 number1 = number2 … | |
Hi, I'm taking an online Python class. This is the first time I have used Python. I need Help with an assignment. For the assignment I have to **Write a program that counts the number of words and the number of characters of each word in a sentence entered by … | |
# GITHUB INSIDE THE CLI # This is my repo : [https://github.com/harshasrinivas/cli-github](https://github.com/harshasrinivas/cli-github) It's a **python app** to display **Github inside the Command line Interface** It uses the GITHUB API I started working on it, a couple of days back. If you people could give comments and suggestions on where i … | |
Hello there. I am new in Python, so sorry for stupid question. Here is my chunk of code. class Map(object): scenes = [ 'central_corridor': CentralCorridor(), 'laser_weapon_armory': LaserWeaponArmory(), 'the_bridge': TheBridge(), 'escape_pod': EscapePod(), 'death': Death() ] def __init__(self, start_scene): self.start_scene = start_scene def next_scene(self, scene_name): return Map.scenes.get(scene_name) def opening_scene(self): return self.next_scene(self.start_scene)ap = … | |
I was bored so i created this program ti simulate a game of paper, scissors, rock. It was working well untill idecided to tinker a-bit. Now when I run it and enter a move it outputs this: Python 3.4.3 (v3.4.3:9b73f1c3e601, Feb 23 2015, 02:52:03) [GCC 4.2.1 (Apple Inc. build 5666) … | |
I am making a chat client to connect to a server I already made with sockets in Python 3, but I am having a problem with the new encoding and decosing stuff for Python 3. Here is the relevant code: else : # user entered a message msg = sys.stdin.readline() … | |
Hello everybody. I'm looking for a good cool and fun DDOS script in python. Any suggestion? How can I create a good fun DDOS script using URLLIB?! | |
I am currently attempting to work on converting a fairly sizeable JSON object and convert it into a CSV format. However, when I attempt to do so, using a conventional approach (that seems to work with other files). I am presented with a "ValueError: too many values to unpack" I … | |
this applies to 3D vertex coordinates if I was planing to lower the quality and byte size to a bu16, bs16, bu8, or bs8 mantissa, how would I calculate the exponent I'd need to restore them when the data is needed?? some help understanding, here's the code that reads the … | |
Function coinT() tests if two time series are stationary using ADF test and Hurst exponent. Time series are stored in cvs files 1511x6 each, but for testing only a vector of the 5th column is returned by function stock(), there are 50 files in total. It seems that the program … | |
Write a function called parseExtension that takes a file name as a string parameter and returns the file extension. Example: If your function was passed “python.exe” as a string parameter it would return “exe”. I want it to take userinput and seperate the files from the extension starting at the … | |
been scouring google for nearly a month now trying to find something. now as the requirement grows, I need more help tryingto find something. Portable Python is what I'm currently using, but alot of my developers (including myself) don't like the Wine wrapper... Pyzo supports linux mac and win, but … | |
Trying to create function called parseExtension that takes a file name as a string parameter and returns the file extension. Going to ask users to input a filename ie. Python.exe then print the file extension. I tried to split the text and a number of issues for me so far. … | |
Hey guys, I've got an AES encrypted file that my task is to decrypt knowing that it used gcc PRNG to generate the key and I know in which week it happened ... So I made a script and it works great except for that fact that .. well there's … | |
!USING PYTHON 3.1! Hello DaniWeb! Today I'm going to teach you a cool variable trick that I learned. So here's an example: [CODE] a, b, c = input('?x?x?: ').split('x') [/CODE] Now let's input something like: [CODE] >>> a, b, c = input('?x?x?: ').split('x') ?x?x?: 1x2x3 [/CODE] Now, variable 'a' is … | |
Hello, I have used geopy module for my school project. Today, I run my code but an error occurred error was: geopy.exc.GeocoderServiceError: HTTP Error 500: Internal Server Error it occurred at geolocator = Nominatim() location = geolocator.reverse(pr, timeout = 20) before a few days, my code worked well, so I … | |
Good Afternoon: I would like to have this JSON object written out to a CSV file so that the keys are header fields (for each of the columns) and the values are values that are associated with each header field. Is there a best practice for working with this? Ideally … | |
Hello I am new to Python and I have a question for a simple piece of code as below: temp = '32' if temp > 85: print "Hot" elif temp > 62: print "Comfortable" else: print "Cold" According to my understanding, when the program compiles and goes to line 2, … | |
records = [ ('foo',1,2), ('bar','hello'), ('foo',3,4), ] def do_foo(x,y): print 'foo\t{0}{1}'.format(x,y) def do_bar(s): print 'bar\t{0}'.format(s) for tag , *args in records: if tag == 'foo': do_foo(*args) elif tag == 'bar': do_bar(*args) when i run the above program , i get invalid syntax .I dono why this happens? Can someone help … |
The End.