15,190 Topics
![]() | |
Because Microsoft will be removing vbScript in the next version of Windows, I have been busy converting my utility vbScripts into Python. Part of this is a library of functions that I keep in `D:\include`. I'd like to maintain this system in Python, but the import process is rather clumsy. … | |
Hi there PyQt is not available as tag, but this should be a simple question anyway: - drag & drop: from QListWidget to QListwidget - pushButton action: inserts chosen items from second QListWidget into QTableWidget But: when i run my code - most of the time the chosen items are … | |
So I've successfully written a metaclass that gives python the functionality of private attributes in classes. Q: But what about `inst.__private`? A: >>> class A(object): __slots__ = ['__private'] def __new__(cls): inst = object.__new__(cls) inst.__private = 10 return inst def showprivate(inst): return inst.__private >>> inst = A() >>> inst.showprivate() 10 >>> … | |
Hi - I know that we can use Python to create a chrome extension. But anyone can guide me on how to use Python for captruing different sized screenshot of a web page? Any suggestions/ideas are welcome. | |
what are the different relational operators in python? | |
Hi, I'm having trouble with a tk scale widget. So far no one at the python forum has an answer so I found this site. As long as the resolution is set to 1, the start value can be anything I want but as soon as I set the resolution … | |
Hi im new to programming and i need a bot that autofills a website because i constantly advertise a website on different websites and i basically copy and paste repeatedly for like 5 to 8 hours a day but my friend said i might be able to make a bot … | |
hello dear community, first of all - i hope that my beginner-question will fit into this sub-forum. I hope so. Servo Control with Micropython - with the ESP 8266 ...- compared to Arduino I work with young kids and I'm always looking for economical platforms to build intriguing projects. While … | |
dear community working with Micropython - which ecosystem to choose - ESP 8266 or ESP 32? I work with Kids. I'm always looking for economical platforms to build intriguing projects. there are systematical decisions: in earlier times i use Arduino and Raspberry Pi for the projects because the eco-sytems of … | |
I have been wrestling with this for two days now and getting nowhere. Something is broken, either the GridSizer control or me. I'm hoping it's me and someone can show me the problem. I've stripped my app of non-essentials. What I am building is a Sudoku app which consists of … | |
Hi! I am creating a simple python tkinter calculator. However when I was due to submit my code in my teacher said that my code is inefficient and recommended i change the following: 1.) Create buttons using a for loop 2.) have two classes - one of which is for … | |
Hi! I am creating a simple python tkinter calculator. However when I was due to submit my code in my teacher said that my code is inefficient and recommended i change the following: 1. Create buttons using a for loop 2. have two classes - one of which is for … | |
class foo(object): __slots__ = ['__base__'] What's expected is for `foo.__base__` to be a member_descriptor object but instead what you get is: >>> foo.__base__ <class 'object'> >>> foo.__base__ is object True I guess something happens within the magic of class construction that makes use of `__base__` as an object. I stumbled … | |
#include <stdio.h> int main() int pv, cv, temp; temp = 15; pv = 1; printf("%d\n" ,pv); cv = 1 printf("%dn" ,cv); while (cv < 10) cv = temp; temp =pv; pv = cv; printf("%d\n ,pv); printf("%d\n ,cv); geche(); return 0; | |
i want to remove a card from a randomly shuffled deck. so that each time a card is picked from the again shuffled deck. that card is eliminated from further play until all 52 cards are drawn. in python3.7 | |
hi everyone. been a while since i have been on here, alot has changed. I am in the middle of amending/adding features to an installer using python. I have the dropbox API (for business) set up and working, upload and downloading without issue. The potential issue i see is during … | |
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, and that 1 is not considered a prime number. To find out if an integer n is odd one can … | |
So I have this for a sound crew to select jobs for workers based on the training they have recieved. My code allows you to add workers to the list and set what jobs they are allowed to do through use of inputs. The second Function then randomly creates job … | |
I have a python script which extracts unique ip addresses from snort log but how to modify or use regex to extract IPs only if they are logged more than 10 times per second? more specific: using "regex", if the second (i.e 41 in this scenario) doesn't change for more … | |
My Java Sir told me to install MySQL-server, workbench, and connector. I did that somehow after spending 30+ hours reading different posts. After launching Workbench, I went to Tools > Start Shell for MySQL Utilities. Which gave me this popup: https://imgur.com/GQvHKsI Pressing Download option redirected me to this website: https://imgur.com/ETr2nrY … | |
Design a function named max that accepts two integer values as arguments and returns the value that is the greater of the two. For example, if 7 and 12 are passed as arguments to the function, the function should return 12. Use the function in a program that prompts the … | |
Design a function named max that accepts two integer values as arguments and returns the value that is greater? For example: if 7 and 12 are passed as arguments to the function, the function should return 12. Use the function in a program that prompts the user to enter two … | |
I was solving a problem related to the scheduling. The problem statement is as below:- We want to keep a three months workshop in the university in which all the students of the university will participate. All the students will be trained by the lecturers of their own university for … | |
Hi all, I am trying to get the code I have working with PsychoPy3. The code was written using python and psychopy2 and with PyQt4. Now I have PsychoPy3 and PyQt5. Apperantly getting things work with PyQt5 is not really straitforward. Anyway, I have accomplished some. Now, I have an … | |
## Intro ## Receiver Operating Characteristic (ROC) plots are useful for visualizing a predictive model’s effectiveness. This tutorial explains how to code ROC plots in Python from scratch. ## Data Preparation & Motivation ## We’re going to use the breast cancer dataset from sklearn’s sample datasets. It is an accessible, … | |
Hello. I wanted to download a "Python IDE" called "PyCharm" to type code using the coding language "Python" for class. Here is the problem: When I open up the IDE called "PyCharm", it says that the "Python Interpreter" is not found. I suspected it was because I downloaded the "IDE" … | |
Hi, I have a .csv file in an AWS machine i wanted to convert that .csv file to .dat file? Can you please help me? Thansk, Swetha. G | |
I can get the output with **data_2012['DeathRate ']** where there is a space after DeathRate but I can not get the same result without space after the DeathRate i.e, **data_2012['DeathRate']** in python. | |
As I continue my conversion from vbScript to Python I am finding the gotchas. For example... A lot of my utility scripts take a file name or a file pattern as a parameter. My script, bitrate.vbs, for example allows me to invoke it as bitrate file bitrate pattern Technically file … |
The End.