Home >


  • How to think about a schedule that pulls from a database as objectsMay 27

    I am working on a personal project using Python. I have been using version control to the best of my abilities and if you would like to check it out and run the app https://github.com/CodeAmend/old-bull-tools/tree/develop if you prefer Floobits, look

  • py2.7 createGraphicWindow? [on hold]May 27

    How do I create, a graphic window, with blue background? I think it is called a graphic window. Maybe it's called a GUI window. I'm not sure what this is called. -do not use TKinter or any other module. -use python 2.7 please. My goal: Learn to creat

  • Why do textbooks use pseudocode rather than real languages? [on hold]May 27

    In colleges and in algorithm textbooks, it is quite common for the teacher and author to explain control flow in pseudo-code. With the advent of more expressive languages like Python and Haskell among others, is it reasonable that colleges switch to

  • Correcting for offsetMay 21

    I have a shape file with RTK measurements as a line feature, which more or less corresponds with visible features in a raster layer (shaped as lines). These measurements however are not accurate enough, they show about a 1-3 m offset with the feature

  • Reading cell array of vectors with h5pyMay 10

    I have a data stored in .mat files, each .mat contains a cell array of vectors of length ~70. I'm trying to read these .mat files in to Python with h5py, but reading just 1000 cells takes about 7 seconds, and I have in total about 10^8 cells to read.

  • How to create a monkey patch of a method inside a method? May 6

    A 3rd party library we use contains a rather long function that uses a nested function inside it. Our use of that library triggers a bug in that function, and we very much would like to solve that bug. Unfortunately, the library maintainers are somew

  • Python: architecture implications of using external subprocess or APIApril 20

    I maintain a Python 3 package (ocrmypdf) that works with other programs primarily by making subprocess calls. This is partly for historical reasons – it is shell script that grew up. I have since added the amazing CFFI to access a C library that does

  • How to use selenium.captureNetworkTraffic in python?April 6

    I'm interesting in debugging my browser session and I found that it is possible to save http requests with their answers to a file using captureNetworkTraffic in json format. But I can't found any doc or working samples to do so. The only thing I fou

  • How to convert "ASCII" to "hex" in pythonApril 3

    How to convert "ASCII" to "HEX" in python i have one file need to read . but use below code it only can show ASCII with open('Hello.DAT','rb') as f: data= f.read() print(data) it can print data information like this 0120160218000002000

  • I can't get my first else statement to print its output and even though it is simple i'm stuck, please show me how to solve thisApril 3

    score = int(raw_input('Enter a score: ')) if score >20: print 'You achieved an A' else: if score <=10 and score >= 19: print 'You achieved a C' else: if score <10: print 'You failed' --------------Solutions------------- This condition if score

  • Multithreading : defining thread as a classMarch 31

    I have the following program that I wrote to implement thread as a class. import threading import time class MyThread(threading.Thread): def __init__(self,i): threading.Thread.__init__(self) self.i=i def prints(self): while(self.i>0): print "i=&qu

  • Python library for writing JSON piecemealMarch 10

    I'm searching for a Python 2 library for serializing values as JSON that does not require the entire value to be calculated & in memory before serialization. I'd prefer something streaming/event-based (like ijson but in reverse), but I'd also settle

  • How to find unique elements in a list in python? (Without using set)March 10

    Write a function that accepts an input list and returns a new list which contains only the unique elements (Elements should only appear one time in the list and the order of the elements must be preserved as the original list. ). def unique_elements

  • Pack 4 chars into an int (Python)?March 8

    Is it possible to pack 4 chars into an int in python and have it be represented as one value in a bytearray? I'm looking into packing it into a struct, but run into an error if I try something like characters = b'abcd' struct.pack('i',characters) ---

  • Did I do any damage by running "sudo apt-get purge ./python"?February 21

    As you know Ubuntu already has python in it. However, I have downloaded the latest 3.5.1 version's source code and compiled it using ./configure make make test sudo make install My pwd at this moment is /home/SarpSTA/Downloads/Python-3.5.1 I wanted t

  • Simplegui installationFebruary 18

    So... 1) sudo apt-get install python-setuptools 2) sudo apt-get install python-tk 3)sudo easy_install simplegui But the 3rd step doesn't work for me...it says this. Searching for simplegui Reading https://pypi.python.org/simple/simplegui/ No local pa

  • Pattern for requests with long response times?February 8

    We are currently maintaining a homegrown python "web server" where generating the response for some requests can take a very long time mostly due to heavy computations - these requests are basically posts with very long timeouts (think minutes t

  • Why do I need to use labelling when setting fill colour with a python expression in QGIS?

    Why do I need to use labelling when setting fill colour with a python expression in QGIS?January 30

    I'm having problems using a Python function in the expression editor to style a polygon fill in QGIS. I'm trying to use a random colour scheme. However, I need to do this over a series of different maps from different points in history. I need the co

  • General questions about setting up an PyWPS process to process and return shapefilesJanuary 29

    at the moment I'm learning Python in combination with OGR. I'd like to set up a PyWPS process that shall be executed from QGIS via the WPS-plugin. The process should fulfill following tasks: Read an input shapefile, change the shapefile (e.g. add or

  • 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

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