Sample Filter
   11 tags on

1 answer

Parallel computing in python significantly slower than regular for loop

So I'm trying to do some simple image analysis in python, I have a numpy array of the video in question and it has a shape of (930, 256, 256), i.e. 930 frames of a resolution of 256 by 256 pixels. ...

0 answers

How to go backwards in an FTP connection : PYTHON

ftp.cwd("TXNnIGZvbGRlcg==/") file = open('msg.txt', 'rb') file.storbinary('STOR msg.txt', file) file.close So just a quick answer I need... the code ...

0 answers

Hadoop Streaming using python

I am trying to execute the map reduce code as below - hadoop jar /usr/lib/Hadoop/Hadoop-streaming-0.20.2-cdh3u2.jar –file mapper.py –mapper mapper.py –file reducer.py – reducer reducer.py –input ...

0 answers

switching to MPI_LONG_LONG_INT crashes?

I had the following code which 'all gathered' values from all processes into nbodiesPerProc. int nBodies = 10; std::vector<int> nbodiesPerProc(m_processes); int err = ...

0 answers

TextInput widget not working in Kivy with Python

For some reason the second text input box does not work when added within the .kv file. I am not sure if this is because I override the init method in order to populate a category spinner. The text ...

2 answers

Xcode: Working copy has uncommitted changes

When trying to switch branch in Xcode 7 beta 3 or 6.4 I get "Working copy has uncommitted changes". If I commit or discard all changes and try again I get the same result. Update: So now I'm unable ...

2 answers | 7 mins ago by Andreas on Stack Overflow stackoverflow.com
12 answers

How to add to the pythonpath in windows 7?

I have a directory which hosts all of my django apps (C:\My_Projects). I want to add this directory to my pythonpath so I can call the apps directly. I have tried adding C:\My_Projects\; to my Path ...

2 answers

Why c++ containers do not implement erase( reverse_iterator position )?

I looked at some C++ containers (vector, deque, list, map, set) and found that none of them implement erase(reverse_iterator position) There is a way to get iterator from reverse_iterator as ...

2 answers | 7 mins ago by Nikolay on Stack Overflow stackoverflow.com
1 answer

Problems with Upgrade to Python3

I updated my Mac to Python 3.4.3, I changed my interpreter in PyCharm to be Python 3.4.3. When I try to run a test, it looks like it is still using Python 2.7. Traceback (most recent call last): ...

1 answers | 7 mins ago by DarthOpto on Stack Overflow stackoverflow.com
1 answer

Why is my code for finding number of trailing zeros in a factorial returning garbage value

I want to find number of trailing zeros in a factorial but my code is returning garbage value #include<iostream> using namespace std; int main() { long int n; cin>>n; int ...

1 answers | 10 mins ago by Bhavya Bhatia on Stack Overflow stackoverflow.com
0 answers

Why Do I get an ImportError when building a .exe with pyinstaller?

I just created a small GUI program that compiles and works fine in IPython, but when I try to export it to a .exe using pyinstaller it gives me an import error. I'm sure it's sklearn because when I ...

1 answer

Using a shared variable in a function

Hi I'm following a neural net tutorial where the author seems to be using shared variables everywhere. From my understanding, a shared variable in theanos simply is a space in memory that can be ...

1 answers | 11 mins ago by Dr.Knowitall on Stack Overflow stackoverflow.com
1 answer

Building a mask from a set of segment ranges

I'm working with data that consists of long sequences (the entire human genome, so total sequence length ~3e9). I have 22 files, each containing a sub-sequence between 5e7 and 2.5e8 characters. For ...

0 answers

DynamoDB consistent read results in schema error

I am trying to interact with a DynamoDB table from python using boto. I want all reads/writes to be quorum consistency to ensure that reads sent out immediately after writes always reflect the correct ...

0 answers

SDL Texture not rendering after use of copy constructor

I'm fairly new to coding so sorry if this is a stupid question/fix. I'm making a basic program using SDL to render graphics. I have two classes that deal with Rendering: A Texture class (that loads ...

1 answer

Loop Insertion into Dictionary - Python

I'm a Cobol for Z/OS, AS/400, and I'm trying to learn new programming languages to do a few things at home. So I've picked up Python and started giving it a try. But now I'm struck with a problem I ...

0 answers

vim in Cygwin replaces first character with 'g' on opening a file

I use vim in Cygwin terminal. It was working fine. Recently, I added a package in Cygwin which caused update of vim and some other components. Now when I open any file in vim, the first character in ...

1 answer

python daemon signal does not work

I wrote a python daemon script and registered some signal handlers , but when i use kill -1 pid , i found that signal handler does not work. Any body know why? Here is the script: test.py: ...

1 answers | 16 mins ago by wxfengyun on Stack Overflow stackoverflow.com
1 answer

In Windows, is there a way to get a notification when a new MIDI port is available?

In Windows, is there a way to get a notification when a new MIDI port is available? Is there a better solution that polling the list of ports?

1 answers | 16 mins ago by FigBug on Stack Overflow stackoverflow.com
3 answers

How to Find number of unique straight lines in a matrix

We have been given a matrix of size M * N and value inside each location of matrix is represented as a Dot. We have to find number of unique straight lines that can be drawn through 2 or more points. ...

3 answers | 17 mins ago by Neer1009 on Stack Overflow stackoverflow.com
1 answer

Store output of system command into local char array in c

Is there any way to store output of system command into char array, since system command is returning only int.

1 answers | 18 mins ago by ashutosh on Stack Overflow stackoverflow.com
1 answer

How to create a database to store and access files for R and Python?

I have almost zero knowledge of databases so please bear with me. Workflow The following figure illustrates what I want to achieve: We perform driving experiments in a driving simulator in our ...

1 answers | 20 mins ago by umair durrani on Stack Overflow stackoverflow.com
0 answers

'Commit to Branch' option in XCode 6

In earlier versions of XCode, there was an option called Commit to Branch on commit page which really helped when you'd messed around too much with your code in a particular branch and didn't want to ...

0 answers

Installer with Python tools for Visual Studio

I want to know how I can create a installer from python, I use Python Tools for Visual Studio, and I need a installer to finish my project, I would prefer to create the installer with Visual Studio, ...

0 answers

Reading Sepcific CSV column Value and passing it to CURL/URLLib as param in Python

Hi All I have a scenario to handle through Python Scripts that requires reading a value from CSV file and using it in a CURL command (equivalent in python URLLIB) as follows: Here is the CSV file for ...

1 answer

numpy array from csv file for lasagne

I started learning how to use theano with lasagne, and started with the mnist example. Now, I want to try my own example: I have a train.csv file, in which every row starts with 0 or 1 which ...

0 answers

Kafka - Delayed Queue implementation using high level consumer

Want to implement a delayed consumer with the high level consumer api main idea: produce messages by key (each msg contains the time it was produced at) auto.commit.enable=false consume a message ...

2 answers

STL <map> allows duplicate pairs?

I have written the following code and was surprised at the output. I heard that <map> avoids collision of keys, but here it appears to allow insertion of duplicate pairs. ...

2 answers | 22 mins ago by YS. on Stack Overflow stackoverflow.com
0 answers

Create line extensions for given line created by user

I've been working in an app which I have to capture user's touches and draw a line on the screen. This is working so far. The problem is that I'd like to create some kind of extension for that line ...

1 answer

Call specific function from a specific derived type from base

Let's put it this way..... struct A {virtual void something(){cout <<"I'm A.";}}; struct B, A { void something(){cout << "I'm B.";} void somethingFromB(){cout << "I'm from B.";} } ...

15 30 50 per page
1 2 3