Home >

python

Advertisement
  • Python: making a graph of lists [on hold]January 16

    I have this csv file which contains data. It is an upper triangular matrix in the case that the diagonal and all values below the diagonal are zero, the others are positive. I converted this csv file to a list of lists. Now I want to create a weighte

  • How to send keys in an Ajax dropdown

    How to send keys in an Ajax dropdownJanuary 14

    I alredy get the Xpath, but when send keys there is error : Error Traceback (most recent call last): File "C:\Users\Admin\PycharmProjects\Belajar1\Register.py", line 23, in test_register self.email = self.driver.find_element_by_xpath(".//*[

  • How to get link from onclick event using Scrapy?January 9

    I've been using Scrapy for getting content but I am having some trouble getting links from this particular site:Taleo Site Clicking the title takes you to the job description. But the href is set to '#'. And the onclick event is: onclick="javascript:

  • Multiple terminals, multiple commands, lxterminalJanuary 9

    I am working with Python. Writing a script, I am attempting to use os.system() to open a new terminal, create new tabs and run different commands in each respective tab (which appear to run simultaneously). I am familiar with gnome-terminal as it is

  • Resolving ascii codec can't decode byte in position ordinal not in rangeJanuary 8

    I've seen all of the other posts and done quite a bit of research but I am still scratching my head. Illustrating the problem: $ python Python 2.7.6 (default, Mar 22 2014, 22:59:56) [GCC 4.8.2] on linux2 Type "help", "copyright", "

  • How to make a turtle object look at where the mouse has clickedJanuary 7

    I want a program so that the turtle goes to where you click. So far I have this: from turtle import * screen = Screen() turtle = Turtle() screen.onscreenclick(turtle.goto) But the problem is the turtle object just stays facing in the same direction.

  • How do I downgrade sdl_image to 1.2.10?January 6

    I am using pygame to try and make a game. The graphics do not show up right and are distorted. I am using OSX El Capitan. People say that there is a bug that happens on El Capitan. The solution is to downgrade sdl_image to 1.2.10, which is what a lot

  • Response from before_requestJanuary 6

    In my app I am trying to check if user is authorised to access the resource, for example when user requests to url api/proxy. I use before_request to call checking function @hook('before_request') def check_permission(): securityService = SecuritySer

  • Python: Write to new file line January 4

    This question already has an answer here: Python: Write to new file line 3 answers I have been looking around to see if I can find a way to write to a new line in a file every time the user inputs. The basic code is this: while True: f = open(server,

  • python - custom contextmanager decorator for with statementDecember 6

    here's the code... There must be some errors, cause, even though the code seems to work as I want, testing it, the decorated function resulted up to 30 time slower than the original. Decorator: import wrapt @wrapt.decorator class custom_with(object):

  • Jaccard Distance calculation using pdist in scipyDecember 4

    import scipy.spatial.distance as dist Y=[[1,2,3],[2,3,4]] Q=dist.pdist(Y,'jaccard') print Q The following snippet gives jaccard distance as 1 while it should be 0.5. On the other hand if Y=[[1,2,3],[4,2,3]] i.e if ordering is changed output is 0.33.

  • Mapping topics to labels in pythonDecember 3

    I have a file of documents labeled as follows: 101 magical awards hosted two days ago 102 it was a good badminton game where each sides ended up in a tie 101 the awards were hosted by the actor who received critical acclaim for his movie 103 heavy ra

  • pylucene install on mac failed

    pylucene install on mac failedNovember 29

    using what recommended in official document: https://github.com/fnp/pylucene/blob/master/doc/documentation/readme.pdf changed lots of environment variable but got this error in the end: clang: error: invalid argument '-compatibility_version 2.12' onl

  • HTML Annotation using pyqgisNovember 20

    I really like the html annotation tool in QGIS. My plan is to show a photo (web based image// jpg) on each point of my point shapefile. Unfortunately labels don't work as they do not parse HTML and the tooltips won't last for long (only on hoover, ri

  • How to get bit value of hex number based on position in pythonNovember 10

    Hi Friends I'm new person to Python language. I'm trying to write some small code which I want to integrate later in my python module. Here is my question I have a number like a[31:0]= 0X00010001 in a file and I want to get bit value based on positio

  • Improving a numpy implementation of a simple spring network

    Improving a numpy implementation of a simple spring networkNovember 7

    I wanted a very simple spring system written in numpy. The system would be defined as a simple network of knots, linked by links. I'm not interested in evaluating the system over time, but instead I want to go from an initial state, change a variable

  • pip install error ubuntu 15.10 ( Pillow )October 2

    When I try to install something with pip I have error. But with sudo everything is ok. pip install pillow Downloading/unpacking pillow Downloading Pillow-3.1.1.tar.gz (10.1MB): 10.1MB downloaded Running setup.py (path:/tmp/pip-build-hFguWU/pillow/set

  • Flipped (Y-axis) Raster from point cloudSeptember 18

    I have been working on a project where I need to create rasters from irregularly spaced point clouds. I am resampling my point clouds to a regular 0.25 cm grid using a nearest neighbor method pyresample. I am using the output array to make a raster u

  • Polygons across international dateline [-180..+180 longitude]

    Polygons across international dateline [-180..+180 longitude]September 17

    I'm trying to generate polygons for satellite orbital swaths. So far I have a method to generate two lines which represent the edge of each swath in [lat,long]. Some of the swath's cross the international dateline and so wrap round: I was able to sol

  • Deleting polygons with certain height and width in Python script with QGIS?September 15

    I have a polygon layer with bounding boxes (boundingLayer). This layer has attribute columns "HEIGHT" and "WIDTH". I want to delete all bounding boxes which have HEIGHT and WIDTH less than 200m. How should I proceed? boundingLayer = Qg

Copyright (C) 2017 ceus-now.com, All Rights Reserved. webmaster#ceus-now.com 14 q. 0.468 s.