15,179 Topics
| |
I'm trying to design a lambda function that returns any line in a file that begins with any digit [0-9]. The point would be to return the whole line if it does, and skip any line if it doesn't. This is for log analysis where I want all the lines … | |
Does anyone on the forum have any experience with pyspark (Python API for Apache Spark) | |
I want to create MP3 file from binary data in python. | |
How would I get a list of all ip addresses that are on a network using python. | |
I've written this function to take a list and shift each member right by the number supplied as the offset. I want to preserve the supplied list and return the shifted list. My problem is that the function modifies the supplied input list itself as well as returning a new … | |
| Here's a simple tutorial on dictionaries in Python: Dictionaries: Dictionaries are similar to other compound types except that they can use any immutable type as an index. One way to create a dictionary is to start with the empty dictionary and add items. The empty dictionary is denoted {}: [CODE]end2sp … |
Guys help me out with a .py code that will enable a user to upload data(images,mp3,AVI etc) Your will be appreciated. thank you | |
**Hi I am new here, I am learning Python, but I am mess up on this script and it keep asking the same input question... please help thanks.. ps how do you do What you name in pygames??? Justin** #SET UP GAME import random # named veriables s="Strengh" hp="Hit points" … | |
I only started learning Python a few days ago, so as a beginner, what IDE should I be using? Should I just start with IDLE, then move on to something else when I'm more advanced? I've been using Pycharm for the past few days, I didn't know if that's an … | |
Hi, i'm developing an app with python where I need to link it to MySQL? Can somebody tell me how I would do that? Anything would be gladly appreciated! | |
**Introduction** Hi guyz today I am going to writing a tutorial on dictionaries in Python....As per as getting comments from my readers I'll try to make this tutorial short.... **Layout** 1.What are dictionaries? 2.Why dictionaries? 3.How to declare/make dictionaries in Python? 4.What all you can do with a dictionary? 5.Interesting … | |
I'm using beautifulsoup to grab text from HTML files. Buts its not perfect: For example it seems to keep css and javascript code that was added haphazardly. My overall goal is to make a list of words and their frequency to compare and contrast html files to categorize them. Dealing … | |
Personally I think Python is better then ruby because it runs on the Django framwork and it can do more. But I wanted some debate from ruby devs so bring it on!! | |
This simple code shows how to write text with a given font, font size and color using the module pygame ... | |
A feature of the doctest module can be useful when people copy and paste their idle window in the python forum: the ability to transform an example from the python interpreter into python code without the prompts [icode]>>>, ...[/icode] and the output messages. The script below permits to use this … | |
So, I'm writing a smallish adventure game in Python, which operates by means of commands being typed into a tkinter textbox, hitting enter or pressing a button to submit said commands, then there being a readout box that gives the results of whatever the action was. Now, what I'd like … | |
I read the book -natural language processing with Python. and I did exactly what the author said, downloaded all packages after installation of the NLTK. then just input"from nltk.book import *" SUPPOSE: >>> from nltk.book import * *** Introductory Examples for the NLTK Book *** Loading text1, ..., text9 and … | |
I am trying to do a search for sub-folders in a directory that conaint numbers. The format could be a date range for example: 1-1, 01-1, 1-01, 01-01. The first number will only go up to 12 and the second one will go as high as 31 and im trying … | |
Hi, I've created new signal , where i specify list and object datatype. dataChanged = QtCore.Signal(list, object) But list and object datatype don't convey properly that what will be in list and in the object. So it would be good if we could declare something like this, dataChanged = QtCore.Signal(lst_employees, … | |
I want to print the string. In my code i am not getting the right string. line="\\python\001tag\file.txt" str=re.search(r"\[(0-9)+]",line) (dont use raw_string here) print str.group() This gives nothing. I want to extract 001 from there. Note: I dont want to use rawstring.because here user is getting the path from other resource. … | |
A Tkinter image button that toggles between an up and down button image. | |
There is a security technique known as code signing. It basically generates a certificate for your code. This certificate first certifies the author of the code. Second, it has a value generated from the code. This value is unique to that code. If any changes are made to the code, … | |
Hi all, I have a large txt file (3 Million lines). Like to use python , to parse the file , so it can be managed by excel. I am very new with Programming and python, like to learn it. Thanks for your support... input file format: .. ... ... … | |
I have a python code that reads a specific folder for specific files. Once it finds a file that matches the re.split peramiters that it is given it then writes the data to a csv file. The issue is that for every file that it loops through and writes it … | |
I am trying to add new data to my mysql database using tkinter in python. Does anyone have any best practices for doing this? I have tried thus far to no avail. thanks in advance for any help. | |
| Hi, this program of mine can plot timestamp & irradiance but how can i plot another line of data for temperature? This is my txt data: TimeStamp,Irradiance,Temperature 21/7/2014 0:00,0.66,26.2 21/7/2014 0:00,0.71,23.4 21/7/2014 0:00,0.65,25.4 21/7/2014 0:00,0.67,25.3 21/7/2014 0:01,0.58,30.5 21/7/2014 0:01,0.54,26.7 21/7/2014 0:01,0.63,25.5 21/7/2014 0:01,0.65,26.9 21/7/2014 0:02,0.64,22.2 and this is a snippet … |
| Hi, How can i find the maximum/minimum of a data every 24 hours. My Python delimited txt file has over 2 days worth of data This is a snippet of how my txt file data look like: TimeStamp,Irradiance,AMB_Temp 21/7/2014 0:00,5.6,25.6 21/7/2014 0:01,4.6,24.6 21/7/2014 0:02,5.6,22.6 21/7/2014 0:03,4.7,25.6 21/7/2014 0:04,5.3,24.6 21/7/2014 0:05,5.2,25.6 … |
| In my python class, we are using python 3.4.1 And we are typing in the programs from the book. Well, I've typed it in correctly and the output still doesn't align the decimal points. Can anyone help? It would be greatly appreciated. Here's the program code: # This program displays … |
| Hi, is there a simple way to convert the xls file to txt file to fit my program's code. import matplotlib.pyplot as plt x = [] y = [] t = [] fig = plt.figure() rect = fig.patch rect.set_facecolor('#31312e') **readFile = open('data.xls', 'r') sepFile = readFile.read().split('\n') readFile.close()** for idx, plotPair … |
This script of mine is storing a blank file with no .html or .py extension on my FTP server, I think it has to do with the fact that I have the file already opened in the later code, any help? Essentially this script is going to let me edit … |
The End.