Interesting Tags
   11 tags on

0 answers

Robots.txt - Does it matter if the Disallow path is different from Drupals Directory?

I'm looking to NOINDEX all my tag pages i.e. Mysite.com/tags/tabs mysites.com/tags/people ect If I add the following to my robots.txt page (see: http://jsfiddle.net/psac2uzy/) Disallow: /tags/ ...

3 answers

Python Sort a List containing sets

Any idea how to sort a list that contains elements of type set ? This is the code I'm using: sorted_by_second = sorted(result_list, key=lambda set: set[1]) Example of how my result_list looks ...

3 answers | 2 mins ago by user4045430 on Stack Overflow stackoverflow.com
0 answers

python pandas: case insensitive drop column

I have a df and I want to drop a column by label but in a case insensitive way. Note: I don't want to change anything in my df so I'd like to avoid 'str.lower'. heres my df: print df Name ...

1 answer

python-dev: how to change library architecture

I am trying to use the python-dev api but I am running into a few issues. This is the code I am trying to compile #include <stdio.h> #include <signal.h> #include <unistd.h> ...

1 answer

Using a global struct with pthreads in C

I'm trying to simulate clients going into a bank and being served by tellers over a period of time. I am using a thread to determine if a client came into the bank via an arrival rate and am using ...

4 answers

Calling to a Sikuli script from Python (Selenium)

While running Selenium tests on a website, I have some Flash elements that I cannot test with Selenium/Python. I wanted to call out for a separate terminal window, run the Sikuli OCR tests, and then ...

4 answers | 5 mins ago by Dave on Stack Overflow stackoverflow.com
1 answer

Convert a datetime.timedelta into ISO 8601 duration in Python?

Given a datetime.timedelta, how to convert it into a string of ISO 8601 duration format? Ex, >>> iso8601(datetime.timedelta(0, 18, 179651)) 'PT18.179651S'

0 answers

Disable stylesheet and images on Google Search with Selenium FirefoxDriver

The following code disables stylesheets and images on a page loaded with Selenium Firefox webdriver: from selenium import webdriver firefox_profile = webdriver.FirefoxProfile() ...

3 answers

Python 3.4 - reading data from a webpage

I'm currently trying to learn how to read from a webpage, and have tried the following: >>>import urllib.request >>>page = ...

0 answers

Django: How to exclude certain parameters in dynamic urls?

I am mapping a dynamic url parameter such as a pagename in my application like so myapp.com/[pagenamehere] My urls.py for this looks like: url(r'^(?P<pagename>[a-zA-Z0-9_.-]*)/$', ...

1 answer

element is not clicked [selenium]

I am using selenium2library(python) for our automation. this is the method is used def get_appointment_from_manage(self, date, appt_id): ref_date = "//*[@data-date=\"%s\"]" % date ...

7 answers

Adding spaces in elements of list(PY)

I have a problem: I have a list that consists of elements of different lenghts: det_slopes_JKH = ['Superpipe Bolgen','JatzPark','Avalanch Training Center','Bräma schwer'] and i would like to add ...

7 answers | 9 mins ago by Federico P. on Stack Overflow stackoverflow.com
0 answers

Unresolved import: parse

I'm having this import: from pattern.de import parse Eclipse tells me that it can not find it: Unresolved import: parse despite the Python interpreter doesn't seem to have a problem executing my ...

1 answer

match plot color with ticks color

I am making a plot with bars, including twin axis. I want the ticks have exactly the same color as the bars, that means, including the parameter "alpha". However I cannot give them this paramenter. ...

1 answers | 12 mins ago by newPyUser on Stack Overflow stackoverflow.com
1 answer

Django Project Logic Solution

I'm starting to develop my first webapp, and I'm using django. Before anything I'm working on the software logic, how it should work, the links and objects it needs. The problem is: I need the app ...

1 answer

Analyzing graphs in Django

I have a Django based backend where there are many users (Users 1, 2, 3 ... 100). For each user X, I can get a list of users (A, B, C) who are friends with that user on Facebook (I can find using ...

0 answers

Python Hive Client pyhs2: How to return results from a select statement?

Below is my code: import pyhs2 with pyhs2.connect(host='localhost', port=10000, authMechanism="PLAIN", user='biuser', password='biuser', ...

1 answer

IndentationError in for loop python

I don't quite understand what is the problem of my code below for stripe in [sku.value for sku in model_sheet.col(13) if str(sku.value)]: try: stripe = int(stripe) except ...

1 answers | 17 mins ago by Mahan on Stack Overflow stackoverflow.com
0 answers

Python try / except issue with SMTPLib

I've written a simple SMTP client using Python's SMTPLib. Just trying to add some error handling - specifically in this instance, when the target server to connect to is unavailable (eg, wrong IP ...

0 answers

PySpark not working on yarn-client master

I'm having a weird issue running PySpark with --master yarn-client. The following message will pop up over and over, and I need to ctrl+c to get a prompt, and even then the messages continue to pop ...

1 answer

Catch an iframe dialog box using Selenium in Python

I am involved in a project which involves logging to a secured website and downloading a file by clicking on an element within the page which then shows a dialog box where the "OK" button has to be ...

2 answers

how to surround selected text in PyCharm like with sublim text

I'm wondering if there is a way to configure PyCharm to be able to surround selected code with parenthesis by just typing on the parenthesis key like when we use SublimText 2. Thanks.

1 answer

Python decorator with optional argument (which is function)

Note: I know that decorators with optional argument contain three nested function. But optional argument here is function itself. Please go through the complete post before you mark this as duplicate. ...

2 answers

Trac Plugin Not working

At work we are using Trac on several internal wiki's and an external wiki. REcently we found the need for a new plugin. After we going through a few tutorials we went to install a plugin to make sure ...

24 answers

Reverse a string in python without using reversed or [::-1]

I came across a strange Codecademy exercise that required a function that would take a string as input and return it in reverse order. The only problem was you could not use the reversed method or the ...

1 answer

How to check for a ForeignKey that no longer exists?

class PersonSite(models.Model): vps_id = models.AutoField(primary_key=True) person = models.ForeignKey(CanonPerson, db_column='p_id',null=True) site = ...

1 answers | 34 mins ago by Hooman on Stack Overflow stackoverflow.com
0 answers

cyrillic caracters in Python 2.7

The function returns places in radius using Google Places Api. To be exact I use this library to cope with task. The problem is that cyrillic symbols are shown like that: ÐО Сбербанк Ð ...

4 answers

Eclipse + Pydev wont keep interpreter setting within the same session.

I'm attempting to get eclipse running as something more powerful than a colored text editor so that I can do some Maya scripting. There's literally nothing fancy about this setup, it just doesn't keep ...

1 answer

Error in interaction with web elements using Selenium in Python

I have Python-3.4.1 32 bit on a Windows 7 64 bit machine with Selenium using Google Chrome version 39. I am endeavoring to automatically download a CSV file from a secured website after logging in. In ...

1 answer

ImportError: No localization support for language 'eng' in python

i am getting ImportError: No localization support for language 'eng' when using MySQL Connector Python. My Traceback is as below. Traceback (most recent call last): File \"DB_Module.py\", line 151, ...

15 30 50 per page
1 2 3