• Member Avatar for vegaseat
    vegaseat

    Marked Solved Status for Best Python Books

    Any good beginner books on python? I want to learn python easy and fast.I have coded some basic programs in c,c++,Java. Wanna learn python for scripting in linux.
  • Member Avatar for vegaseat
    vegaseat

    Marked Solved Status for looking for random image generator PIL script

    I'm looking for a script that generates random images using the PIL Image module by assigning random RGB values to each pixel on a blank canvas. Does anyone have one …
  • Member Avatar for vegaseat
    vegaseat

    Marked Solved Status for No module named PySide

    Hi When I run main.py I got this error how can I fix it? I'm using https://github.com/PicciMario/iPhone-Backup-Analyzer-2 / Traceback (most recent call last): File "./main.py", line 44, in <module> from …
  • Member Avatar for vegaseat
    vegaseat

    Marked Solved Status for extracting floats from a string

    I have this script which can calculate the total of numbers given in a string total = 0 for c in '0123456789': total += int(c) print total How should I …
  • Member Avatar for vegaseat
    vegaseat

    Marked Solved Status for How to call a function from Tkinter without using button

    Hi everybody! How can i call a function from Tkinter without using Buttons? I have a test.py file and there is a function def message in it: def message(): print('Good …
  • Member Avatar for vegaseat
    vegaseat

    Marked Solved Status for How can i creat e text file to use as a database in python

    Hi everybody. How can i creat e text file to use as a database in python? I want to save my project's data changes into hard disk. What should i …
  • Member Avatar for vegaseat
    vegaseat

    Marked Solved Status for Ceaser cipher

    I need help with this program I am doing. I need to be able to select encrypt or decrypt(ive only done encrypt at the momment) and need to be able …
  • Member Avatar for vegaseat
    vegaseat

    Marked Solved Status for How to know which row of array that qualify some conditional state?

    If I have an array >>> a=np.array([[1,2,1],[3,4,2],[6,5,3],[7,8,4]]) >>> a array([[1, 2, 1], [3, 4, 2], [6, 5, 3], [7, 8, 4]]) and I want to find if first column which …
  • Member Avatar for vegaseat
    vegaseat

    Marked Solved Status for creating list of lists

    Hello friends. I want to create a list of sublists E.G. i = 0 pack = [] list = [0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20] while i < 17: sublist = list[list[i]: list [i + …
  • Member Avatar for vegaseat
    vegaseat

    Replied To a Post in How to call a function from Tkinter without using button

    Let's assume your favorite_movies is a list object with movie titles ... # test list favorite_movies = [ "Gone with the Wind", "Batman IV", "Spiderman VII", "Sniper III"] favorite_movies_string = …
  • Member Avatar for vegaseat
    vegaseat

    Replied To a Post in How to call a function from Tkinter without using button

    `favorite_movies = pickle.load( open("films.db", "rb"))` will give you a Python object like a list or dictionary, whatever you saved. You would have to process it to give you a meaningfull …
  • Member Avatar for vegaseat
    vegaseat

    Edited Distances between cities (Python)

    Knowing the longitude and latitude coordinates of two cities you can calculate the distance between them. Use the code in https://www.daniweb.com/software-development/python/code/490561/postal-code-zips-and-location-python to find the coordinates.
  • Member Avatar for vegaseat
    vegaseat

    Created Distances between cities (Python)

    Knowing the longitude and latitude coordinates of two cities you can calculate the distance between them. Use the code in https://www.daniweb.com/software-development/python/code/490561/postal-code-zips-and-location-python to find the coordinates.
  • Member Avatar for vegaseat
    vegaseat

    Created Postal Code Zips and Location (Python)

    Using http://download.geonames.org/export/zip/ you can get postal information for most countries in the world. The raw data string can be transformed into a Python list of lists that can be searched …
  • Member Avatar for vegaseat
    vegaseat

    Replied To a Post in creating list of lists

    Looks like you want this ... mylist = [0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20] size = 3 newlist2 = [mylist[n : n + 3] for n in range(0, len(mylist)) if n < len(mylist)-size] print(newlist2)
  • Member Avatar for vegaseat
    vegaseat

    Replied To a Post in creating list of lists

    You can study up on list comprehension ... mylist = [0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18] size = 3 newlist = [mylist[n : n + size] for n in range(0, len(mylist), size)] print(newlist) ''' result …
  • Member Avatar for vegaseat
    vegaseat

    Replied To a Post in How to know which row of array that qualify some conditional state?

    Another possibility (finds all occurrences of search) ... import numpy as np a = np.array([[1,2,1],[3,4,2],[6,5,3],[7,8,4]]) print(a) ''' [[1 2 1] [3 4 2] [6 5 3] [7 8 4]] ''' …
  • Member Avatar for vegaseat
    vegaseat

    Marked Solved Status for count of substrings. append method

    Hello Daniweb! I learn in the Computer Sciences Circle, [Click Here](http://cscircles.cemc.uwaterloo.ca/) in the chapter 8. there strings, for exemple "sse" and "assessement" or "an" and "trans-panamian bananas", and we just …
  • Member Avatar for vegaseat
    vegaseat

    Replied To a Post in count of substrings. append method

    snippsat's latest re approach is actually quite speedy.
  • Member Avatar for vegaseat
    vegaseat

    Replied To a Post in How can I take the results and auto copy to clipboard?

    Since you are using the Windows OS see ... https://www.daniweb.com/software-development/python/code/490440/copy-to-and-from-the-clipboard-windows
  • Member Avatar for vegaseat
    vegaseat

    Created Copy to and from the clipboard (Windows)

    Using the Python win32 extensions it is relatively simple to copy to and from the clipboard. Sorry. the Windows OS is a requirement.
  • Member Avatar for vegaseat
    vegaseat

    Replied To a Post in isprime function (Python)

    Testing the 2 "integer is even" expressions ... ''' timeit_lambda_simple101.py using Python module timeit on a simple statement (by default timeit turns off garbage collection) ''' import timeit # using …
  • Member Avatar for vegaseat
    vegaseat

    Edited isprime function (Python)

    Just a small mildly optimized function to check if an integer is a prime number. For very large numbers use the Miller-Rabin primality test. There have been questions why I …
  • Member Avatar for vegaseat
    vegaseat

    Edited Check if a number is a prime number (Python)

    This simple isprime(number) function checks if the given integer number is a prime number and returns True or False. The function makes sure that the number is a positive integer, …
  • Member Avatar for vegaseat
    vegaseat

    Edited Check if a number is a prime number (Python)

    This simple isprime(number) function checks if the given integer number is a prime number and returns True or False. The function makes sure that the number is a positive integer, …
  • Member Avatar for vegaseat
    vegaseat

    Edited Check if a number is a prime number (Python)

    This simple isprime(number) function checks if the given integer number is a prime number and returns True or False. The function makes sure that the number is a positive integer, …
  • Member Avatar for vegaseat
    vegaseat

    Replied To a Post in Memorable Quotations

    A quote in front of a group of women: If you want to be happy, get drunk. If you want to be happy for a while, get married. If you …
  • Member Avatar for vegaseat
    vegaseat

    Replied To a Post in how do the uppercase and lowercase?

    @L7Sqr In all fairness SneeKula answered the original question. Sometimes it is fun to experiment a little to get to know the language better. Yes, I would rather use the …
  • Member Avatar for vegaseat
    vegaseat

    Replied To a Post in Random Facts

    In less than a year the Euro has fallen from US$1.38/Euro to US$1.18/Euro. https://finance.yahoo.com/echarts?s=EURUSD%3DX+Interactive#
  • Member Avatar for vegaseat
    vegaseat

    Replied To a Post in How can i creat e text file to use as a database in python

    You can store it in any folder you want, as long as you give it the full path name. For convenience, I would keep the code .py file and the …
  • Member Avatar for vegaseat
    vegaseat

    Marked Solved Status for python

    anyone good at python please can you email me Josephawino@hotmail.co.uk
  • Member Avatar for vegaseat
    vegaseat

    Marked Solved Status for what do you prefere for naming: database - c++ - java - php?

    what do you prefere for naming: database - c++ - java - php? 1- User_id - User_Name 2- user_id - user_name 3- UserId - UserName 4- userId - userName 5- …
  • Member Avatar for vegaseat
    vegaseat

    Replied To a Post in Random Facts

    Apparently if you fly a union jack upside down it's offensive to the Queen.
  • Member Avatar for vegaseat
    vegaseat

    Replied To a Post in The ultimate Caesar Cipher (Python)

    Modified code to avoid shift of 32 or shifts higher or equal to 95. A shift of 32 changes a..z to A..Z. A shift of 95 wraps around to the …
  • Member Avatar for vegaseat
    vegaseat

    Edited The ultimate Caesar Cipher (Python)

    Python's double ended queue module makes Caesar's cipher easy.
  • Member Avatar for vegaseat
    vegaseat

    Edited The ultimate Caesar Cipher (Python)

    Python's double ended queue module makes Caesar's cipher easy.
  • Member Avatar for vegaseat
    vegaseat

    Edited The ultimate Caesar Cipher (Python)

    Python's double ended queue module makes Caesar's cipher easy.
  • Member Avatar for vegaseat
    vegaseat

    Edited The ultimate Caesar Cipher (Python)

    Python's double ended queue module makes Caesar's cipher easy.
  • Member Avatar for vegaseat
    vegaseat

    Edited The ultimate Caesar Cipher (Python)

    Python's double ended queue module makes Caesar's cipher easy.
  • Member Avatar for vegaseat
    vegaseat

    Edited The ultimate Caesar Cipher (Python)

    Python's double ended queue module makes Caesar's cipher easy.
  • Member Avatar for vegaseat
    vegaseat

    Created The ultimate Caesar Cipher (Python)

    Python's double ended queue module makes Caesar's cipher easy.
  • Member Avatar for vegaseat
    vegaseat

    Replied To a Post in Ceaser cipher

    One of the simpler Caesar ciphers can be done using Python's double-ended queue rotation.
  • Member Avatar for vegaseat
    vegaseat

    Replied To a Post in Python GUI Programming

    One way to show a picture with PySide (public PyQT) ... ''' ps_designer_dialog_picture101.py use the Designer program that comes with the PySide installation, for instance in C:\Python33\Lib\site-packages\PySide\Designer.exe 1) create a …
  • Member Avatar for vegaseat
    vegaseat

    Marked Solved Status for removing line numbers

    I copied this code from page 11 of http://personal.denison.edu/~krone/cs173/files/PythontoC++.pdf and assigned it to a Python string. Alas there are still line numbers. How could I use Python to remove these? …
  • Member Avatar for vegaseat
    vegaseat

    Marked Solved Status for python timer

    so, i got this code, what it does is that it counts down from 20 minutes, is there a way to do so it counts from 0 to 20 min …
  • Member Avatar for vegaseat
    vegaseat

    Marked Solved Status for How to call a function from linux terminal

    Hi everybody. I've created a .py file with a simple function in it. Now i want to call that function from linux shell scripting. How should i do that? please …
  • Member Avatar for vegaseat
    vegaseat

    Replied To a Post in How can i creat e text file to use as a database in python

    Module pickle is made for this ... ''' pickle_list101.py use module pickle to dump and load a list object use binary file modes "wb" and "rb" to make it work …
  • Member Avatar for vegaseat
    vegaseat

    Replied To a Post in Python GUI Programming

    Dress up your Tkinter programs with a background image ... ''' tk_Image_label_button1.py put a background picture and a button on a Tkinter label ''' try: # Python2 import Tkinter as …
  • Member Avatar for vegaseat
    vegaseat

    Replied To a Post in Starting Python

    In case you need to know ... ''' np_version.py get the version of numpy you have installed ''' import numpy print(numpy.__version__) ''' possible result ... 1.9.0 '''
  • Member Avatar for vegaseat
    vegaseat

    Replied To a Post in PIL and matplotlib for Linux

    It is my understanding that pillow has basicly taken over the further development of PIL.

The End.