Data dodania Pytanie
2017-08-05 12:08 Is django-channels suitable for real time game? »
I want to make a real time game, I wanted to use NodeJS-SocketIO or aiohttp, Until I met django-channels, then i read its documentation. This is a go...
(0) odpowiedzi
2017-08-05 09:08 Django ORM, how to use values() and still work with choicefield? »
I am using django v1.10.2 I am trying to create dynamic reports whereby I store fields and conditions and the main ORM model information into databas...
(4) odpowiedzi
2017-08-05 06:08 unable to get defination of an index psypg2 »
i need to recreate indexes on a table as i have to insert a lot of data into the table. i am trying to get the defination of an index in postgres usin...
(1) odpowiedzi
2017-08-05 03:08 Segmentation with Single Point Class Annotations via Graph Cuts? »
I have a dataset of images that I am trying to segment. For each image in the dataset, experts have randomly selected single pixels/points and added c...
(1) odpowiedzi
2017-08-04 23:08 Unit tests fail after a Django upgrade »
I am trying to bring a Django project from version 1.8 to 1.11. Pretty much everything seems to work fine except unit tests. We have a base test class...
(0) odpowiedzi
2017-08-04 22:08 Override accepted renderer in django-rest-framework on exception »
I'm using django-rest-framework to create an endpoint which returns a PDF. However, when there is an error rendering the PDF, I want to return a JSON ...
(1) odpowiedzi
2017-08-04 20:08 Getting Error On First Run With Buildbot »
I'm following the docs trying to get Buildbot working for the first time and I keep getting the same error: 2017-08-04 13:58:45-0400 [-] while starti...
(1) odpowiedzi
2017-08-04 18:08 Django won't use postgres schema properly »
I have a problem with using schema while running tests with django. All tables in my postgres database are in schema, let's name it 'schema'. In my se...
(0) odpowiedzi
2017-08-04 17:08 Concat elements of tuple if contiguous lables are same »
I have a list of tuples. [('a', 1), ('b', 1), ('c',1), ('d', 2), ('e',1)]` The second element of tuple is its label. I want to concatenate the co...
(1) odpowiedzi
2017-08-04 09:08 How to print out calendar.month_name array in python? »
I have the following code: import calendar month=calendar.month_name print(month) I wish to have following output which is in array form or list...
(3) odpowiedzi
2017-08-04 08:08 How To Filter Out Non Admin Accounts When Using Python Facebook SDK »
I'm attempting to use the Facebook Python SDK to access insights for marketing campaigns as described here: https://github.com/facebook/facebook-pyth...
(0) odpowiedzi
2017-08-04 07:08 Why doesn't super() work with static methods other than __new__? »
I understand that __new__ is a static method and super() can be called from it create a new object, like so: >>> class A: ... def __new_...
(3) odpowiedzi
2017-08-03 23:08 Return subset based on a list of boolean values »
I'm trying to slice a dataframe based on list of values, how would I go about this? Say I have a list, l, and it looks like: [0,1,0,0,1,1,0,0,0,1] I...
(6) odpowiedzi
2017-08-03 21:08 Scipy Sparse Cumsum »
Suppose I have a scipy.sparse.csr_matrix representing the values below [[0 0 1 2 0 3 0 4] [1 0 0 2 0 3 4 0]] I want to calculate the cumulative su...
(0) odpowiedzi
2017-08-03 19:08 RuntimeError: Never call result.get() within a task Celery »
I am using celery to send a task to remote server and trying to get the result back. The state of task is constantly updated using update_state method...
(2) odpowiedzi
2017-08-03 18:08 Why am I having this database issue? »
I am working on a Python/Django project, and we need to use two databases. Following the documentation I added a second database like this: DATABASE_...
(2) odpowiedzi
2017-08-03 17:08 Find the fibonacci sum that is less than a given number in less than O(n) »
I am trying to work on a problem and part of the solution is to find the sum of finbonacci numbers that is less than an input number. Now the upper li...
(2) odpowiedzi
2017-08-03 13:08 Tensorflow: Can't understand ctc_beam_search_decoder() output sequence »
I am using Tensorflow's tf.nn.ctc_beam_search_decoder() to decode the output of a RNN doing some many-to-many mapping (i.e., multiple softmax outputs ...
(1) odpowiedzi
2017-08-03 12:08 Fastest way to calculate the sum of specific regions of an array »
Given the following data (in python 2.7): import numpy as np a = np.array([1,2,3,4,5,6,7,8,9,10,11,12,14]) b = np.array([8,2,3]) I want to get the ...
(5) odpowiedzi
2017-08-03 10:08 Numpy: Multiplying large arrays with dtype=int8 is SLOW »
Consider the following piece of code, which generates some (potentially) huge, multi-dimensional array and performs numpy.tensordot with it (whether w...
(0) odpowiedzi
2017-08-03 06:08 Python regex search and replace all ocurrences »
I hope you can help me with this. I'm writing a code in python to replace all occurrences on a string that includes: @[username](user: id) I tried w...
(2) odpowiedzi
2017-08-03 05:08 Running Lisp program with Python2 or 3 »
I am having the lisp code that I found at the repository: https://github.com/JafferWilson/test-program I am looking for compiling and running this cod...
(0) odpowiedzi
2017-08-03 04:08 How to take a simple integer matrix as input in python3 »
I want to take a simple matrix as input in a 2-D array, but get a Runtime Error - NZEC error. Matrix - 1 2 3 4 my input code - for i in ran...
(1) odpowiedzi
2017-08-03 03:08 pyqt passing signals between classes »
I have seen similar questions but none of them seems to work in order to solve my problem. Basically, my intention is very simple. I try to pass the ...
(1) odpowiedzi
2017-08-02 20:08 Sort dictionary into list »
There are already a lot of questions about sorting dictionaries but I can't find the right answer to my question. I have the dictionary v: v = {3:4...
(7) odpowiedzi
2017-08-02 17:08 How can I replace a text delimited string list item with multiple list items in a python list? »
Given a list: mylist = ['dog', 'cat', 'mouse_bear', 'lion_tiger_rabbit', 'ant'] I'd like a one-liner to return a new list: ['dog', 'cat', 'mouse',...
(11) odpowiedzi
2017-08-02 12:08 Keeping count of clicks of <a> tag (non-JS) »
In a Django mobile web app I'm building, I'm using the sms html tag in one particular template. I.e. the typical <a href="sms:/* phone number here ...
(1) odpowiedzi
2017-08-02 05:08 How to switch from headless chrome to headed chrome when a condition is met? »
Is it possible to switch from a headless chrome to a headed chrome when a certain condition is met/ or when something is called? Here is my code: i...
(0) odpowiedzi
2017-08-02 02:08 A number smaller than negative infinity in python? »
This is possible in python2: None < float('-inf') Also, it always returns True However, on python3, this throws TypeError: unorderable type...
(1) odpowiedzi
2017-08-02 01:08 is there a way to add in more dict after inside an append? django »
Apologize if the title is a bit hard to understand. Not too sure how to explain it within a line. What I want to do is... actually I have this code ...
(2) odpowiedzi
2017-08-02 00:08 Python - curly braces in type hints »
What do these mean? def f(a: {int, float}): pass I've seen this syntax used in some standard Python modules when fetching documentation via Py...
(1) odpowiedzi
2017-08-01 19:08 Calculating Primes and Appending to a List »
I've recently started attempting to solve problems on project Euler using python, and have hit this road bump when trying to calculate primes and appe...
(7) odpowiedzi
2017-08-01 19:08 NoReverseMatch Error Django »
I have the following model: class UserPlaceReview(models.Model): place = models.ForeignKey(PlaceReview) review = models.TextField() def ...
(2) odpowiedzi
2017-08-01 17:08 create a dictionary with incrementing values »
I have a list and I want to generate a dictionary d taking out duplicates and excluding a single item, such that the first key has value 0, the second...
(5) odpowiedzi
2017-08-01 17:08 Why can't I change the list I'm iterating from when using yield »
I have some reproducible code here: def test(): a = [0, 1, 2, 3] for _ in range(len(a)): a.append(a.pop(0)) for i in range(2...
(4) odpowiedzi