text stringlengths 226 34.5k |
|---|
AttributeError: 'MatrixFactorizationModel' object has no attribute 'save'
Question: Im trying to run the example on Apache Spark's MLlib
[website](http://spark.apache.org/docs/latest/mllib-collaborative-
filtering.html). Below is my code:
import sys
import os
os.environ['SPARK_HOME'] = "/usr... |
python writing to different file
Question: I'm a huge python noob. Trying to write simple script that will split a line
in a file where it see's a "?"
line in Input file (inputlog.log):
`http://website.com/somejunk.jpg?uniqid&=123&an=1234=123`
line in output file (outputlog.log): `http://website.com/somejunk.jpg
uniq... |
reading HDF4 file with python - more than one dataset with same name
Question: I have a HDF4 file I need to read with python. For this I use `pyhdf`. In most
cases I am quite happy to use `SD` class to open the file:
import pyhdf.SD as SD
hdf = SD.SD(hdfFile)
and then continue with
... |
Get the full substring matching the regex pattern
Question: I am not good with regular expressions and was looking at some online
resources for what I would like to do. So basically, I have a regular
expression in Python as follows:
import re
pattern = re.compile(r'(?=(ATG(?:...)*?)(?=TAG|TGA|TAA))')... |
No api proxy found for service "taskqueue"
Question: When I'm trying to `python manage.py changepassword` command I get this
errror:
AssertionError: No api proxy found for service "taskqueue"
Here's what I have in my `PYTHONPATH`:
$ echo $PYTHONPATH
lib/:/usr/local/google_appengi... |
Send payment using Blockchain.info API - Runtime Error: ERROR: For input string: ".001"
Question: I am trying to send a payment using Blockchain.Info's payment API. I am using
a Python libary found on GitHub here:
<https://github.com/gowness/pyblockchain/blob/master/pyblockchain.py>
When running the code below I am ge... |
change order of colums in csv (python)
Question: I made a script, which reads a given input-file (**csv**), manipulates the
data somehow and writes an output-file (**csv**).
In my case, my given input-file looks like this:
| sku | article_name |
| 1 | MyArticle |
For my output-file, I nee... |
getting sublime text 3 to use anaconda python
Question: So I've installed anaconda to a directory I have privileges for but I can't
get sublime text 3 to recognise that the shell is now using anaconda python:
>which python
/local/home/USER/Apps/anaconda/bin/python
when I build with sublime laun... |
Update or 'Refresh' a Text Field in Pymel / Python
Question: Currently writing a simple script inside maya to fetch camera info and present
it in a GUI. The script prints the camera data of the selected camera no
problem however I can't seem to get it to update the text fields with the data
when the button is hit. I'm ... |
integrate 3 body system in python
Question: This is more mathemathical question.
We have 3 body system, with known initial parametrs like positions, masses,
velocityes. This make system like
[](http://i.stack.imgur.com/VyZjB.gif)
i and j = 1,2,3
S... |
How do I connect with Python to a RESTful API using keys instead of basic authentication username and password?
Question: I am new to programming, and was asked to take over a project where I need to
change the current Python code we use to connect to a Ver 1 RESTful API. The
company has switched to their Ver 2 of the ... |
Python pandas map dict keys to values
Question: I have a csv for input, whose row values I'd like to join into a new field.
This new field is a constructed url, which will then be processed by the
requests.post() method.
I am constructing my url correctly, but my issue is with the data object that
should be passed to ... |
No modules name Items in scrapy
Question: When i run My spider in scrapy it show no modules name items
In Items file i have defined only two items and i need to make csv for that
items and in spider file iam importing that file and in console importing
error is shown below
Here is code of items file :
... |
Calling and creating a function in python
Question: I'm fairly new to python (still in the first few chapters of an introductory
book) and i was wondering, once i have defined a function and saved it in
script mode, and i want to use it in another script do i have to define it the
new program?
To clarify suppose a cre... |
asyncio: Wait for event from other thread
Question: I'm designing an application in Python which should access a machine to
perform some (lengthy) tasks. The asyncio module seems to be a good choice for
everything that is network-related, but now I need to access the serial port
for one specific component. I've impleme... |
How to use a vector of struct/class in python
Question: I can't seem to find a way to implement a vector in python
struct Struct{
int a, b;
};
This is say a struct, and you could use it in a vector by declaring it
Struct b[100];
for (i = 0; i <= 99 ; i++)
b... |
Python - re-ordering columns in a csv
Question: I have a bunch of csv files with the same columns but in different order. We
are trying to upload them with SQL*Plus but we need the columns with a fixed
column arrange.
Example
required order: A B C D E F
csv file: A C D E B (sometimes a column is not in the csv becau... |
Jenkins Python API, create_node(), error: 400
Question: I'm setting my jenkins environment and, as part of this process, I need to
create a slave node.
Bellow follow the script that is crashing:
> ` import jenkins server = jenkins.Jenkins('http://localhost:9090')
> server.create_node('slave') `
Follows the output:
... |
Capture the run time from running a unittest TestCase into a Python variable
Question: I have several Python files, each containing a Python function and a TestCase,
similar to the one below. I want to have a separate python script which will
execute each file and capture the output. As it happens, all of the tests wil... |
Slinky in VPython
Question: The goal of the VPython code below is to model a slinky using 14 balls to
represent the broken-down components of the slinky. But I am facing some
problems with my code. For instance,
R[i] = ball[i].pos - ball[i+1].pos
raises
> 'int' object has no attribute 'pos'
What ... |
Error downloading HTTPS webpage
Question: I am downloading some data from some https webpage
<https://www.spar.si/sl_SI/zaposlitev/prosta-delovna-mesta-.html>, so I get
this error due to HTTPS. When I change the webpage manually to HTTP, it
downloads fine. I was looking for similar examples to fix this but I did not
fi... |
What is the purpose of using python `super() `, inside `__init__ ` other than the inheritance?
Question: I found this simple program in a Youtube tutorial which is used QtSide modules
with python. Basically what it does is connect `QLineEdit` to a
`QTextBrowser`. As you can see below, the entire program handled by sing... |
django "__init__takes at least 2 arguments" for dynamic drop down list function
Question: Regarding the django dynamic drop down list, I made some trials,
**If no dynamic function, it works without problem**
from django import forms
from django.forms import ModelForm
from .models import input
... |
Python urllib.request.urlopen() returning error 403
Question: I'm trying to download the HTML of a page (<http://www.guangxindai.com> in
this case) but I'm getting back an error 403. Here is my code:
import urllib.request
opener = urllib.request.build_opener()
opener.addheaders = [('User-agent', ... |
Python file copying deletes original file
Question: I've got the program below which runs via cron and backs up asterisk call
recordings.
It works fine for the most part, however if a call is in progress at the time
then the act of trying to copy it seems to kill it, i.e. it disappears from
both the source and destina... |
Python Gooey Run Directory
Question: I'm using the latest [Gooey](https://github.com/chriskiehl/Gooey) library on
Python 2.7 on Windows as a GUI for a simple `argparse`, but for some reason,
the script keeps giving me the `[Errno2] No File Exists`.
I think it is because there is a space in the path of the Anaconda
ins... |
How to split one event into many with reactive extensions?
Question: How do you take a single event in a reactive extensions stream and split it
into multiple events in the same stream?
I have a sequence that retrieves json data which is an array at the top level.
At the point where the json data is decoded, I would l... |
Python selenium and fuzzy matching
Question: I'm using `Selenium` to populate some drop down menus. These dropdown menus
are fairly dynamic.
What I have though are values that could be in the dropdown, for example:
<select>
<option>Red, wooly, jumper, large, UK</option>
<option>Blue, woo... |
vcfutils for parsing multiple vcf files
Question: I have multiple VCF files and What I need to achieve is to extract some rows
from VCF file based on the defined filters.. So in order to achieve that I
started off with using
import vcf
import vcf.utils
which seems to be to straight forward and ... |
Dynamic Time Warping recursive implementation
Question: Good evening ladies and gents,
I want to implement a Dynamic Time Warping (DTW) algorithm in Python.
For testing purposes I set up a small random distance matrix (e.g., generated
by the Manhattan metric) and then call my DTW algorithm with it.
im... |
python str.replace() with borders
Question: I'm trying to use the function `str.replace(",", ";"[, count])` but when i
fill in count (let's say 1) it only changes the first `","` but i want to
change a certain "," (working with boundries)` does anyone have a idea on how
to do this?
Answer: You could `rsplit` and join... |
for-in-if in jinja2 throws exception
Question: I am new to both Python and Jinja2. I'd like to read a value in a dictionary
of a list. I think there is an answer for such operation
[here](http://stackoverflow.com/a/8653568/124050). Unfortunately this does not
seem to work in Jinja2. I get this:
> jinja2.exceptions.Tem... |
Delete entries from json that are missing properties
Question: I have a json file that contains about 100,000 lines in the following format:
{
"00-0000045": {
"birthdate": "5/18/1975",
"college": "Michigan State",
"first_name": "Flozell",
"full_name": "Flozell Adams",
... |
How to hide output of subprocess in Python without preventing other subprocesses from running
Question: I run Python 3.3.5 on Windows, and a very basic version of something I'm
working on looks like this:
import os
import subprocess
import time
path = r"C:\Users\Luke\Desktop\Tor_Browser\Brows... |
Logging to console with Pyramid pshell
Question: In the process of developing a Pyramid web application, I've found it very
useful to use the command-line `pshell` to load the application and interact
with various code. However, log statements are not echoed on the console, and
I'm not sure why.
For instance, lets say... |
Python Sine function error
Question: I have worked for a while in matlab but want now also learn some python. but
after a few days i run in some trouble...
I have similar functions. one matplotlib example and one own based on some
examples (probably also the matplotlib one)
The trouble is that one function is working... |
How do I convert python time.gmtime() to MongoDB Date
Question: I need to convert the time returned by gmtime() to a readable string. As a
mistake, I populated huge data in mongo and stored date as a string. After the
discussion in my [previous
question](http://stackoverflow.com/questions/33015162/how-do-i-fetch-all-
m... |
python get and convert to date from string
Question: I want to convert the following string to date in python ,how to go about
this,
>>> d= "1997-01-29 00:00:00+00:00"
>>> import datetime
>>> datetime.datetime.strptime(d, '%Y-%m-%d').date()
Traceback (most recent call last):
File "<stdin>... |
Python customized sort
Question: I have a list of dictionary objects (read from csv) that I want to sort. E.g.
l_data.sort(key=lamdba x: (x['fname'], x['lname']))
Now I want to make the code more flexible, and want to sort on the keys based
on the input, something like:
def sort_data... |
Create multiple columns in Pandas Dataframe from one function
Question: I'm a python newbie, so I hope my two questions are clear and complete. I
posted the actual code and a test data set in csv format below.
I've been able to construct the following code (mostly with the help from the
StackOverflow contributors) to ... |
PIL installation on MAC
Question: I am trying to install PIL in my Mac.I am using the following command:
sudo pip install pil --allow-external pil --allow-unverified pil
But it gives the following error
Command "/Users/akira/anaconda/bin/python -c "import setuptools, tokenize;__f... |
Checking Facebook username availability - Python
Question: I am currently creating an application which includes checking username
availability for social networks, one being Facebook. Using python how would I
do this? I have already done it for twitter:
url = "https://twitter.com/users/username_availabl... |
Regex for absolute url
Question: I am searching quite a while for a regex compatible with Python's `re` module
for finding all URLs in HTML document and I cannot find it except one that was
only to able to check whether an url is valid or invalid (with `match`
method). I want to do simple
import requests... |
How to Properly Use Arithmetic Operators Inside Comprehensions?
Question: I am dealing with a simple csv file that contains three columns and three rows
containing numeric data. The csv data file looks like the following:
Col1,Col2,Col3
1,2,3
2,2,3
3,2,3
4,2,3
I have hard time ... |
Try to install mongodb with dijango?
Question: I am trying to configure MongoDB database to Django. I tried a lot of
tutorials but still, I am not able to configure.
I followed following tutorials commands.
<http://2buntu.com/articles/1451/installing-django-and-mongodb-in-your-
virtualenv/>
<http://django-mongodb-en... |
anaconda python: could not find or load the Qt platform plugin "xcb"
Question: On my OS(Linux Mint Debian Edition 2), except for the system
python(_/usr/bin/python_) installed by the **apt** , I also installed the
**anaconda**. But I've encounterd a problem running the following code with
the **anaconda** python
... |
opencv error : error while displaying rectangle
Question: i m not able to rectify the error. i m following the official opencv python
tutorial. I m passing a video here and doing meanshift.
source: <https://opencv-python-
tutroals.readthedocs.org/en/latest/py_tutorials/py_video/py_meanshift/py_meanshift.html#meanshift... |
Issue with scraping data with foreign characters
Question: I have written a python script to scrape data from some chinese site.
According to its head charset is "gb2312" and have also checked it with
"chardet.detect()" python library that its correct but still i get wrong
characters. Here is my code:
im... |
Python script switching between matplotlib inline and QT backend
Question: I would like to be able to switch between displaying matplotlib graphs inline
or using QT backend in a script file based on a variable called inlinemode
such as the code fragment below
import matplotlib.pylab as plt
inlinemode... |
TypeError: 'list' does not support the buffer interface
Question: I have a program that asks the user 10 questions then saves it to the file.
All of that works perfectly however I am then trying to read a set of files
that have been saved, which raises the aforementioned TypeError.
The code that is causing the problem... |
Python - String Splitting
Question: Writing `'1000011'.split('1')` gives
['', '0000', '', '']
What I want is:
['1', '0000', '11']
How do I achieve this?
Answer: The `str.split(sep)` method does not add the `sep` delimiter to the output
list.
You want to _group_ string charac... |
Python 3.5 HookManager SystemError: PyEval_EvalFrameEx
Question: I'm new here and I hope not to do any mistakes!
I'm trying to make this simple code work, I tested it on Python 3.4 32 bit and
it worked but I need to use it on Python 3.5.0 64 bit but I get this error
that I don't know how to fix.
import ... |
Delete last column from file with Python
Question: I am basically trying to do the same thing as this guy but with Python: [How
can i delete last column from my text
file](http://stackoverflow.com/questions/26940261/how-can-i-delete-last-
column-from-my-text-file)
How can I remove my last column?
I tried to load the ... |
About xlwings, the API for Excel VBA to use Python
Question: When I follow the instruction of xlwings up to:
Sub MyMacro()
RunPython ("import mymodule; mymodule.rand_numbers()")
End Sub
It gives me error like: _can't find mymodule_. My understanding is this should
be an object from ... |
Automating a wxPython main menu setup?
Question: I am trying to find a way to condense and automate the construction of a main
menu (underneath the title bar, with _file_ , _edit_ , _help_ , etc.) in
wxPython.
Writing out each and every menu item is direct, but I notice I repeat myself a
lot, between Appending, sortin... |
Join 2 trees using Python (dendroPy or other libraries)
Question: I am working on phylogenies by using Python libraries (Bio.Phylo and
DendroPy).
I have to import 2 trees in Newick format (this is obviously not the difficult
part) and join them together, more precisely I have to add one tree at one
tip/leaf of another... |
python merge panda dataframes keep dates
Question: I'd like to merge two dataframes together but add in a column based on some
logic. A simplified example of my dataframes are below:
DF_1:
domain ttl nameserver file_date
fakedomain.com 86400 ... |
Error using jsbeautifier in python with unicode text
Question: I use the following code to beautify a js file (with jsbeautifier module)
using python (3.4)
import jsbeautifier
def write_file(output, fn):
file = open(fn, "w")
file.write(output)
file.close()
def be... |
`document.lastModified` in Python
Question: In python, by using an HTML parser, is it possible to get the
`document.lastModified` property of a web page. I'm trying to retrieve the
date at which the webpage/document was last modified by the owner.
Answer: A somewhat related question "[I am downloading a file using Py... |
Cython, numpy speed-up
Question: I am trying to write an algorithm that calculates the mean value of certain
neighboring elements of a 2D array.
I would like to see if it is possible to speed it up using Cython, but it is
the first time I use it myself.
**Python version** :
import numpy as np
... |
How to plot grad(f(x,y))?
Question: I want to calculate and plot a gradient of any scalar function of two
variables. If you really want a concrete example, lets say f=x^2+y^2 where x
goes from -10 to 10 and same for y. How do I calculate and plot grad(f)? The
solution should be vector and I should see vector lines. I a... |
Python NLTK: parse string using conjoint structure, getting into infinite recursion
Question: I am new in python and nltk. I am asked to create two different parse tree for
the following sentence:
Adam slept while Josh ate and the dog barked.
Based on these two constructions:
S-> S ... |
How to execute commands with double quotes (net start "windows search") using python 'os' module?
Question: When I execute simple command like "net start", I am getting output
successfully as shown below.
Python script:
import os
def test():
cmd = ' net start '
output = os.pope... |
Pygame - TypeError: Missing 1 required positional argument
Question: I am building a game and I keep on running up against this error. I can't seem
to fix it. I believe the problem is either in the function "main" at the
bottom or in the classes "Level" and "Level01". If you find there is a way I
can improve my code ca... |
nlargest and nsmallest ; heapq python
Question: This is out of curiosity about the nsmallest and nlargest methods of heapq.py
module in python.
I was reading it [here](https://docs.python.org/2/library/heapq.html#) in the
docs.
The documentation doesn't say how it does so (nsmalles/nlargest) on any
iterable.
This mi... |
Python - create wordlist from given characters of that contain 4-5 letters and 5-6 numbers ONLY
Question: I'm looking to preform a dictionary attack and want to know how to create a
wordlist that has every 10 letter permutation of the letters a-f and 2-9
(which I can do) WHEN every word contains 5 letters (a-f) and 5 n... |
Python - Random baby name generator issues - (duplicating input, calling variables)
Question: I've been looking at this all afternoon and can't figure out why the gender
input is repeating itself despite only appearing to be called once. It's not
part of a loop that I can see either.
I've tried adding variables to act... |
How to stub the context manager close method in Python?
Question: I need to do some operations that did not work well using the builtin mock
module. Then I decided to mock this by myself, using:
import builtins
import io
from unittest import mock
import my_module
builtins.open = mock... |
Error while GARCH Modeling using Python
Question: I have a sample python code for GARCH modeling which creates a data of
randomly generated numbers. I want to replace the numbers with my own csv file
which contains a column vector, but that just doesn't work.
import numpy as np
from scipy import opti... |
Seeing all the values of variables in python as it is run
Question: In MatLab, unless I add ; at the end of the line, I can just run and see what
this code is doing. For example if I code
x=0
for i=1:1:3
x=x+1
end
then I will see that
x=0
x=1
x=2
x=3
... |
Membership comparsion in python
Question: I am not sure whether i am doing it correctly but please consider the below
code. a and b values are same (i.e "John") but when doing a membership test
(i.e a in b) then it says false. But when checking the value equality then it
shows True but somehow membership test is saying... |
How to put results of subprocess in a variable
Question: I can retrieve my data only by using cURL, I think subprocess is the easier
way to do it but I cannot put the data in a variable.
For example like this
data = subprocess.call('curl "URL" -X GET', shell=True)
Is there any easy way to do this ... |
What value to use for execution_count in code cells of iPython notebooks?
Question: What is the best value to use as an input argument for `execution_count` when
generating an iPython notebook as a json file?
I understand it should be set to `null` but a json dump automatically puts
quotes around it so I perform a sea... |
numberplate validation problems in python
Question: I am doing a practice assessment for school and me and my friends have been
having problems with this code
if len(numberplate)==7:
if numberplate[0].isalpha:
if numberplate[1].isalpha:
if numberplate[2]... |
How do I prepare this text file for nearest neighbor algorithm?
Question: I want to prepare the text file so I can use k-NN clusstering in python 2.7. I
have no idea how to approach this. Can anybody help?
The dataset is here: <http://textuploader.com/ayhqc>
Columns are separated by commas and rows are separated by n... |
Accessing the state of a Python Multiprocessing.Process subclass from the parent process
Question: I am creating a simple TCP server as a stub so I can test a script that
operates a piece of test equipment, without having to have the equipment
there. The server should sit there waiting for a connection and then maintai... |
sort a YAML block mapping sequence in python
Question: I am trying to sort a YAML block mapping sequence in the way I want it... I
would like to have something like
depth: !!opencv-matrix
rows: 480
cols: 640
dt: f
data: 'x'
but everytime I do dumping, it changes to
... |
Python script breaks after first iteration
Question: I am trying to do the following in python. Read xml file with usernames, pw,
email addresses and so on. I then want to iterate through the passwords and
try to find them in a different file. if there is a match, print the username
and password. this is what i have so... |
Python: interpolate matrix for figure
Question: I have the following matrix R:
R
array([[ 0.014985 , 0.01499475, 0.01508112, 0.01588764, 0.02019902, 0.03698812, 0.12376358],
[ 0.547997 , 0.00300703, 0.00306113, 0.00361317, 0.23311141, 0.41010791, 0.65683355],
[ 0.773... |
Sorting hybrid lists in Python
Question: Say I have this list `l = ['the fountainhead','atlas shrugged', 1, 67, 12, 0]`
which I want to sort so that the final result be `['atlas shrugged', 'the
fountainhead', 0, 1, 12, 67]`. This means that strings and integers in the
list should be both sorted in ascending order. If I... |
How to run single function in to a number of times in python
Question: I tried to run simple function n times by using the code below:
df = pd.DataFrame()
def repeat_fun(times, f, args):
for i in range(times): f(args)
def f(x):
g = np.random.normal(0, 1, 32)
mm ... |
How best to convert from azure blob csv format to pandas dataframe while running notebook in azure ml
Question: I have a number of large csv (tab delimited) data stored as azure blobs, and I
want to create a pandas dataframe from these. I can do this locally as
follows:
from azure.storage.blob import Blo... |
How do I reverse str(class) in Python?
Question: I need to define a new instance of a class from an informal string
representation of the same type of class. What is a clean way to do this in
Python?
program1.py:
fileHandle = open("filename.txt", "wb")
instance = className()
instance.a = 2
i... |
Why zipfile module is_zipfile function cannot detech a gzip file?
Question: I am aware of this question [Why "is_zipfile" function of module "zipfile"
always returns "false"?](http://stackoverflow.com/questions/14174048/why-is-
zipfile-function-of-module-zipfile-always-returns-false). I want to seek some
more clarifica... |
Python - Reading from a text file that is being written in Windows
Question: I am using Windows 7, Python 2.7. I am trying to write to a text file with one
file ID in one program that continues writing new data/numbers for several
minutes.
In a separate program, after the writing has begun, I am trying to read from
th... |
Trying to get json data from URL using Python
Question: I am learning to get json data from a link and use that data later on. But i
am getting error: "RuntimeError: maximum recursion depth exceeded while
calling a Python object"
Here is my code:
import json
import requests
from bs4 import Beaut... |
python - " Import error no module named httplib2" in only some files
Question: When I import the httplib2 in quickStart.py and run it using terminal It
works.
Now I import quickStart in another file main.py(Google app engine web app
python file) and try loading the page via localhost it shows "Import error no
module n... |
IPython autoreload changes in subdirectory
Question: I launch IPython from the main folder `/project`. Now if I make changes in the
file `/project/tests/some_module.py`, the changes fail to be autoreloaded in
IPython. Also, I get the following message after I save the changes and want
to run some other script in the pr... |
for loop returning the last object not the preceding ones python
Question:
def excel(vendor_ids):
for i in vendor_ids:
t = Test()
c = pycurl.Curl()
c.setopt(c.URL, (str("https://api.box.com/2.0/folders/%s")%(i)))
c.setopt(pycurl.HTTPHEADER, ['Authorization: B... |
How to select features, using python, when dataframe has features in rows
Question: My data frame is like this: Where px1, px2,...px99 are placeholders and appear
in data frame as columns. It has values like 5569, 5282 etc, which are real
features to be selected. These features are in many thousands. I want to
filter i... |
Arrow-key events in VTK on Windows
Question: Why are arrow key-press events not forwarded to the vtkRenderWindowInteractor
on Windows? Is there a workaround? Is there a general difference between
arrow-key events on Windows and Mac?
I can reproduce the problem with the following sample code. On Mac OS, I see
'Up', 'Do... |
Python - random card
Question: I am trying to make a program in python in which the computer displays a
random card when the user presses enter. The same card can not be printed
twice. My code so far is:
from random import *
used = []
number = randint(1,13)
if number == 11:
... |
Django {% include %} Templatetag not working for a {% load %} in file
Question: I just rent a VPS to try to publish a Django project. In debug mode in my pc
all runs ok, but when i try to run debug mode in the VPS it comes an error:
Django Version: 1.8.5
Exception Type: SyntaxError
Except... |
Serial Commands for BrainTree Scientific, Inc. Syringe Pump (model bs-8000) rs232
Question: **UPDATE:** After ensuring my commands, serial config, and terminator ('\r')
were correct I got this working on 1 of 5 computers. This leads me to believe
it is an adapter issue. I plan on calling the company to see about orderi... |
Can't read csv data from gzip-compressed file which stores name of archived file with Pandas
Question: I am trying to read csv data from gzip archive file which also stores name of
the archived data file. The problem is that pandas.read_csv() picks the name
of the archived file and returns it as very first data entry i... |
Python file reading and printing, with exceptions and terminations
Question: Hello I am a very new programmer who is self teaching Python. I have
encountered a very interesting problem and need some help in creating a
program for it. It goes like this
A hotel salesperson enters sales in a text file. Each line contains... |
Python quick search in numpy array
Question: Does Numpy have a function for quick search of element in 2D array and return
its indexes? Mean for example:
a=54
array([[ 0, 1, 2, 3],
[ 4, 5, 54, 7],
[ 8, 9, 10, 11]])
So equal value will be `array[1][2]`. Of course I can... |
LogisticRegression object has no attributes
Question: I'm a noob at both Django and scikit-learn trying to create a simple REST
server using these technologies to perform classification. So far I'm just
trying to get some sort of result to test that the controllers work, but the
program doesn't seem to detect any of my... |
Count attributes of many to many relation and filter by it
Question: I would like to do something slightly different than
[this](http://stackoverflow.com/questions/7883916/django-filter-the-model-on-
manytomany-count).
Suppose I have something like this in my models.py:
class Hipster(models.Model):
... |
Python script to download specific files from FTP and update the download directory
Question: I need some help in order to create a script to download multiple .csv files
from FTP every 24 hours, ignoring the old files and to continue downloading
the new ones to keep an update. I'm having trouble writing the pattern be... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.