15,175 Topics
| |
I was wondering if there were any USB powered web cams for the Raspberry pi that are specifically No-IR. I know about the camera module which plugs directly into the board, I was wondering however if there are any alternatives, usb powered so I could perhaps plug in more than … | |
I have basic knowledge about python. I am looking for help with this code: how is the snake moving? How does it length increases on colliding with the object? And, how does it detect when it touches itself or when it collides with the wall? It also has semicolon in … | |
Hi all, Can someone please define what a build and release engineer is in a brief summary. I've googled this but still have no idea what the person in this industry would do. **A**: What is a build and release engineer. **B**: What is a build and release engineer expected … | |
i am trying to build an app that implements a double tap feature to open another screen, the UI includes a textinput. but with this implementation the textinput doesnt respond. def change(self): self.manager.current = 'screen2' def on_touch(self,touch): if touch.is_double_tap(self): self.change() | |
Studying python and in the lesson it says to modify anc change the program. I thought I'd make the game more interactive. I know it requires the program to use inheritance and I've read everything and Ive tried everything. Ive run out of ideas and would appreciate any and all … | |
I have a Python script getData.py that uses Mechanize, and runs fine under the interpreter. It was installed using easy_install - and the install seemed to indicate it was completed. The problem is, when I try to compile it using py2exe while in the folder of the script, and using … | |
def list_function(x): x[1] = x[1] + 3 return x[1] n = [3, 5, 7] print list_function(n) It shows following error when i run the code for multiple times. 1. Oops, try again. list_function([6, 3]) returned 6 instead of [6, 6] 2.Oops, try again. list_function([1, 6]) returned 9 instead of [1, … | |
lloyd = { "name": "Lloyd", "homework": [90.0, 97.0, 75.0, 92.0], "quizzes": [88.0, 40.0, 94.0], "tests": [75.0, 90.0] } alice = { "name": "Alice", "homework": [100.0, 92.0, 98.0, 100.0], "quizzes": [82.0, 83.0, 91.0], "tests": [89.0, 97.0] } tyler = { "name": "Tyler", "homework": [0.0, 87.0, 75.0, 22.0], "quizzes": [0.0, 75.0, 78.0], … | |
can anyone suggest how to convert python code to java. Following is the python implementation """ K-prototypes clustering """ # Author: 'Nico de Vos' <njdevos@gmail.com> # License: MIT from collections import defaultdict import numpy as np from scipy import sparse from sklearn.utils.validation import check_array from . import kmodes def euclidean_dissim(a, … | |
I am learning django, here is the model i have created class UserProfile(models.Model): name = models.CharField(max_length=50, verbose_name="Name") login = models.CharField(max_length=25, verbose_name="Login") password = models.CharField(max_length=100, verbose_name="Password") phone = models.CharField(max_length=20, verbose_name="Phone number") def __str__ (self): return self.name Since `name` is a static variable, so in method `__str__`, it can also be called … | |
Hey, still a beginner in Python. I was wondering if anybody could help me out with all this info. Im planning to make an actual game, but first i have to get classes/methods etc. I thought maybe this would be some good classes: Trainer, Pokemon, Moves, Stats, Type, Pokeball, Pokedex … | |
This simple key logger shows any character/special key when pressed. | |
I'm tryng to read sentence for sentence from an input with python: sentences = raw_input("Insert some sentences here: ") (For example: Hello, my name is Mattia) How i can read sentence for sentence? For example: 1 = "Hello" 2 = "," 3 = "my" 4 = "name" 5 = "is" … | |
| Hello Everyone, I am having issues with this current script. I am trying to create a Twitch bot in Python. Any help with this would be much appreciated. The issue that I am having is it is not replying back with the message Hello there, when I type in "Hello" … |
This snippet defines a function returning new identifiers created from reading the computer's time. | |
I've been learning python and I'm almost finished and I'm learning about oop. I have a question, is it possible to make a looping menu using oop on python (Not using Tkinter, WX) without having to key in the object. I learn better through playing around with what I've learned … | |
If you develop for Android, what do you use to do so? Do you write your apps in a MS Windows environment and then drop it into the Android environment? Or, do you do all of your coding on the Android tablet itself? What do you do, how do you … | |
Hello! my name is Quentin and i am a young french programmer and i have some issue with my program i don't know how to simplify it for the refresh function and the creation of rectangles. i would like to create a fonction that create X rectangles for me then … | |
Fair warning - I'm still learning so this might be a very newb like question: What I'm trying to do: I'm trying to import a python file into a Tkinter window and run it when I press a button. Eventually I'd like to display the output of the imported script … | |
Hi guys, I am new Python user, I am using SAX module to extract some information from a very big xml file (55 GB)....I want to know if there is path, xpath or something like that in SAX module to work on a specific tags and ignore other tags in … | |
name='' eggs=0 pony=0.0 So why we write " while name:" Instead of " while name=='': " What are these Truthy and Falsey values? And what are the rules for writing name: Instead of name==''. | |
The module pyglet leans on OpenGL for graphics and is used in the scientific community together with Python. This short code snippet shows you how to use it to display an animated GIF file. The download is free, so give it a try. You don't have to download OpenGL to … | |
ID Arrival Departure ArrivalDate DepatureDate 1001 New York Holland 2009-09-23 2012-07-23 1301 Florida Germany 2010-10-23 2012-10-11 1401 New York Holland 2009-09-23 2009-09-25 1301 New York Beijing 2009-09-23 2010-09-21 1201 New York Holland 2008-01-01 2009-09-23 1001 Virginia New York 2008-01-01 2009-09-22 1021 New York Holland 2009-09-23 2009-09-25 1001 New York Holland … | |
If I wrote a program which would `Console.WriteLine()` a base64 code, like an easter egg ("a hidden secret" in gaming jargon) or something, for example string EasterEgg = "dGhlYmlnc2VjcmV0"; Console.WriteLine(b64d(EasterEgg)); And I would let a good obfuscator run through it. Now I know that crackers with enough time and knowledge … | |
I have the following code: lista_cosas=[] class cosa(): global lista_cosas def __init__(self,color): self.color=color def operacion(self): if self.color=="verde": lista_cosas.append(cosa("azul")) else: lista_cosas.append(cosa("verde")) c=cosa("verde") lista_cosas.append(c) n=0 while n<10: n+=1 for cosa in lista_cosas: cosa.operacion() and it gives me the following error: Traceback (most recent call last): File "C:/Users/elster/Desktop/Cancer modelling with python/recursive_test.py", line 21, … | |
I'm hoping to create a scheduler based on data extracted from an Excel (2016) spreadsheet. At the moment I'm using Ubuntu 14.04 LTS with the desire to port the completed project to Android through Bulldozer. I like what I've heard about the simplicity of Pyqt. The completed project must work … | |
Random Number File Writer: Write a program that writes a series of random numbers to a file. Each random umber should be in range of 1 through 500. The application should let user specify how many numbers the file will hold. Which I have. __author__ = 'Preston Howard' # Random … | |
Assignment - Create a program that asks user: 1. enter amount of money invested, number of years investing, and annual interest rate in decimal format 2. call a user-defined function to get total value at end of investment term(futureValue) 3. call another user defined function to get total interest earned. … | |
Hi guys. I have a program where users enter in their username and password. If the password and username match with the record stored in a database, they are able to pay a game which opens in a new window. If the entered information is correct, I want to print … | |
I want to consider Arrival Column and Departure, but let me consider the ARRIVAL. I have "Paris" and "Los Angeles", I want to create a dictionary that will deplay everything associated to the "Paris" and every that has to do "Los Angeles". In case they are more than more than … |
The End.