Data dodania Pytanie
2017-12-07 05:12 How i delete list in json file in python? »
i have some code and json file like this import json param1 = "xxxxxx" param2 = "11111111111111" param3 = "333333333" with open('data/'+param1+'....
(2) odpowiedzi
2017-12-06 16:12 How do I return the results of the dice to make a histogram? »
So I have this assigment in CSP where I need to make a dice simulator (specifics include: "Write a program to calculate the total of a roll of three 4...
(0) odpowiedzi
2017-12-05 18:12 Newton method in python for multivariables (system of equations) »
My code is running fine for first iteration but after that it outputs the following error: ValueError: matrix must be 2-dimensional To the best of ...
(2) odpowiedzi
2017-12-03 22:12 multiplying 2 integers of the same value by 300 yields different results »
I am trying to figure out why a difference of 283 happens when I decide to multiply rather than divide. Here is some Python code from my terminal. As...
(2) odpowiedzi
2017-12-02 13:12 Python - Float variable always returning as largest in comparative »
I am experiencing problems with a variable in my code. Here is part of my code: import re name = raw_input("Input the Character's name: ") name = na...
(2) odpowiedzi
2017-12-02 01:12 Recieving Attribute Erro regarding 'BetaCandidateServicer' using gRPC? »
I'm using Python 2.7 and Proto3 and receiving the error: E1201 19:25:26.880457900 25127 ev_epollex_linux.cc:1482] Skipping epollex becuase GRPC_L...
(0) odpowiedzi
2017-12-01 06:12 What will be the cause of the below error »
I am trying to create directory with paramiko but getting an error with no error message. sftp.mkdir(folder, 0777) File "C:\Python27\lib\site-package...
(0) odpowiedzi
2017-11-30 11:11 Storing Spanish characters in MSSQL Database »
I need to store the Spanish characters á,é,í,ó,ú,ü,ñ,¿,¡ in the MSSQL 2014 Database having iso-1 as the character set and SQL_Latin1_General_...
(0) odpowiedzi
2017-11-28 20:11 Map Reduce: Why does this code give the correct output for max but not min? »
I am testing some map reduce code in Ubuntu, python 2 with commmand: cat testfile2 | ./mapper.py | sort | ./reducer.py I get the correct output f...
(1) odpowiedzi
2017-11-28 17:11 Setup.py on CentOS7 pywrap_tensorflow_internal error »
Trying to install Tensorflow 1.3 for CPU support with Python 2.7 on a CentOS7 environment, dependencies I believe are met and using setup.py because I...
(0) odpowiedzi
2017-11-28 10:11 Radiobutton IN tkinter »
I m creating a GUI for a simple quiz and I want my answer to be checked in radiobutton . But the problem is that I can not mark or unmark it , its alw...
(1) odpowiedzi
2017-11-27 19:11 python manager register issue or just my faulty code »
I use a python manager to share data between processes. I wanted to break up my code into smaller pieces and created a function 'soFactory' that would...
(1) odpowiedzi
2017-11-27 18:11 What versions of Python will work in Windows xp? »
What versions of Python will work in Windows xp? I would like the most advanced version of Python that still works on windows xp. I need Python 2 an...
(1) odpowiedzi
2017-11-27 06:11 How to compare column value in csv »
I tend to compare two column value like: name columnA columnB hahaha [123] 123 one with square brackets,one without squar...
(1) odpowiedzi
2017-11-25 19:11 SVM inaccurate audio classification despite high accuracy (python 2.7) »
I have a project where I am required to classify audio. I got the audio features through R's specan function from the warbleR library, and saved them ...
(0) odpowiedzi
2017-11-24 07:11 Forgotten arguments in a function »
It is my simple silly programm. Answer should be like “x|x”, but it is not. enter image description here enter image description here ...
(1) odpowiedzi
2017-11-23 18:11 I am writing an ATM program with python but i have some problems »
print("\nWelcome to ATM\n") print(""" Transactions: 1-Balance Inquiry 2-Deposit 3-Withdraw Money You can exit from ATM with 'E' key. """) Balance =...
(1) odpowiedzi
2017-11-22 23:11 can a function be static and non-static in python 2 »
Lets say I have this class: class Test(object): def __init__(self, a): self.a = a def test(self, b): if isinstance(self, Tes...
(1) odpowiedzi
2017-11-22 15:11 Enter and store a number starting with 0 (zero) in Python? »
I am working on a simple student attendance program in Python2. I am using an HID scanner that acts as a keyboard. The student IDs each have a barco...
(1) odpowiedzi
2017-11-22 01:11 How can I go to a saved spot in my text? »
I'm trying to make 2 things: so first is, how can I go to a certain spot in the text? Like, if the person put in an invalid name, then I want it to go...
(0) odpowiedzi
2017-11-21 22:11 How to sort a file alphabetically by named column, python, csv »
I have three csv files each with three named columns, 'Genus', 'Species', and 'Source'. I merged the files into a new document and now I need to alpha...
(1) odpowiedzi
2017-11-21 08:11 Segmentation Fault | Python | Cloud9 »
Everyone! So I am making a quick python text based game as an exercise while learning python. However my code which was running fine stopped functioni...
(0) odpowiedzi
2017-11-20 14:11 Downloading a file through Rest service »
Rest server will run on on one machine,when curl request for a particular file come to my rest server from outside of public network i need to send a ...
(0) odpowiedzi
2017-11-18 19:11 Removing extra output from "su - <username> sh -c '<command>'" in a shell script »
In my python script, I'm trying to get the output of a command that needs to be run as a different user. So I have this code: username = "<usernam...
(0) odpowiedzi
2017-11-18 12:11 I want to calculate slope and intercept of a linear fit using pykalman module »
Consider the linear regression of Y on X, where (xi, yi) = (2, 7), (0, 2), (5, 14) for i = 1, 2, 3. The solution is (a, b) = (2.395, 2.079), obtained ...
(1) odpowiedzi
2017-11-17 20:11 How to remove superfluous characters from returned list result by print statement »
I have a small application connected to a DB. I can insert data with raw_input and then I have select query to return some results as a report. this ...
(2) odpowiedzi
2017-11-17 15:11 Each subject has a subject code.When i select one subject its subject code should be displayed in the edit box »
I have a new QLineEdit(box) for the subject code.Each subject has a subject code(for eg Sentiment Analysis has code CS01,Data Cleansing has CS02,etc.)...
(1) odpowiedzi
2017-11-15 07:11 python unicode convert to Japanese character »
I am trying to convert u'\u30c9\u30e9\u30b4\u30f3' to japanese character using python here is my sample code s = u'\u30c9\u30e9\u30b4\u30f3'.encode(...
(2) odpowiedzi
2017-11-13 23:11 Python print result to variable with correct formatting »
I have a script that uses raw_input to enter a IPv4 IP address in CIDR format. #<--BEGIN IPv4 CIDR FORMATTING --> # Get address string and CID...
(1) odpowiedzi
2017-11-13 10:11 Converting a Github heroprotocol library from Python 2 to Python 3 »
I am trying to port a python Library called heroprotocol created by Blizzard ent. This library is used to parse replay files from an online game calle...
(0) odpowiedzi
2017-11-11 05:11 Regex to insert content just before mediawiki category links »
I'm trying to use a regex to insert a template into a page, before all category or interwiki links, but after everything else. So if you have a page t...
(3) odpowiedzi
2017-11-10 23:11 python url request causes sslv3 handshake errors. howto transform the script? »
I'm trying to get the siemscript of Sophos Central running for my graylog server. Script is python and not maintained for a yr. running it with pytho...
(0) odpowiedzi
2017-11-08 11:11 Print list separated in a single row in python »
I've got data = list(a.fetchall()) print data It returns: [('Data1',), ('Data2',), ('Data3',), ('Data4',), ('Data5',), ('Data6',), ('Data7 ',), (...
(4) odpowiedzi
2017-11-08 06:11 What ordering does dict.keys() and dict.values() guarantee? »
This question arises from this answer where one user uses d.keys() and d.values() separately to initialise a dataframe. It's common knowledge...
(1) odpowiedzi
2017-11-07 20:11 "Regrouping" data from nested dictionaries »
I have a JSON document like this: { 'item1':{ 'value':[a,b], 'number':1 }, 'item2':{ 'value':[a], 'number':2 }, 'item3':{ 'val...
(1) odpowiedzi