15,175 Topics
| |
Is it possible to store a certain function as a variable? If not, is it okay to make a class, and define a function. Store the class as the variable and invoke that function? | |
I got bored of revision last night, and decided to have another go at python! So to refresh my memory and have a bit of a practice I wrote a quick phone-book program. I'd be grateful if y'all could give me some tips and ways to improve on it/make it … | |
help me asp..... In this assignment you have to write functions (in python) that applies various preprocessing techniques which are popular in Natural Language Processing (NLP). For this purpose, you are supplied with a Text Dataset (“corona_data\test_small.tsv”) and you have to process that dataset using the following techniques: 1. Tokenization … | |
Hello all I am new to Python and I am taking a programming class but I can't seem to figure out what I am doing wrong to get the programming correct. I have the following but it isn't working correctly. print ("Change Calclator") quarter = .25 dime = .10 nickel … | |
I am trying to add two two `functions` in one input tag. BUT failed many times. **What i am trying to do ?** There are two functions in different `input` tags in my HTML template. One for `add tag` by `,` . AND second for `autocomplete`. I am trying to … | |
I already have mechanize but it said that I dont have the module name of mechanize what should I do? And is python | |
I run Python 3.x on a Windows 10 laptop and I have a daily routine that involves opening three Python scripts in succession, and running them all concurrently, each one in its own, separate instance of Idle. I have been wondering whether I could automate the entire process. I imagine … | |
hello, i barely know how to use python and i need to write a cubic spline interpolation code in python for my programming assignment . I have C++ code but i know nothing about c++ so can someone help me to convert that code to python code? this is a … | |
def findMaximumPath(mat): rows = cols = len(mat) count_list = [] for i in range(rows): summ = 0 mat_index = [rows-1, cols-1] curr_index = [0, i] summ = mat[curr_index[0]][curr_index[1]] while curr_index[0] != rows-1 and curr_index[1] != cols-1: if mat[curr_index[0]][curr_index[1]+1] > mat[curr_index[0]+1][curr_index[1]]: curr_index[1] = curr_index[1] + 1 else: curr_index[0] = curr_index[0] + … | |
I have a very little approach with coding in C# in asp.net please help converting this python code into c#. # Python example - Fourier transform using numpy.fft method import numpy as np import matplotlib.pyplot as plotter # How many time points are needed i,e., Sampling Frequency samplingFrequency = 100; … | |
For those who are afraid of lycanthropes and full moons, here is a way to figure out the phase of the moon. | |
I am building a python vending machine program where you input price and get change due. Ive got the price working fine and the change for the most part, but Im trying to figure out how to give exact change. Im using dollars, quarters, dimes, nickels and pennies. I am … | |
Dear friends: I need to develop a numerical computation software with a GUI interface like the attachment. I have tried tkinter package, but it seems that it can not resolve this mission. Could you please give me some suggestions about which package should i use to obtain this goal. Regards … | |
I'm trying to convert a Java code into Python. I could adapt most of the code, however, it is difficult to me to link all the functions. The java code is used in Weka. I would like a stand-alone python code. The algorithm in the code is presented in this … | |
Is there a standard algorithm that can output the difference time (in seconds) and use it to print the minutes, hours, numbers? I would appreciate it if you show this algorithm in Flowgorithm app. | |
Hi i want to know we can perform features etraction on ham10000 and segementation also train model with cnn | |
i have start to convert by hand a python script to php its an example how to mine in python but i want implement a kind of same in my php project **That its what i did until now** $MAX_NONCE = 100000000000; $prefix_zeros = need convertion; //execute sql statement and … | |
I used to this code for a splash screen but doesn't run. Please could someone assist. Or help with a link I can check Tkinter splash screens. [code] from Tkinter import * try: from PIL import Image, ImageTk except ImportError: import Image, ImageTk class SplashScreen(Toplevel): def __init__(self, master, image=None, timeout=1000): … | |
I have a Py file that consists of 100+ frames, aprox 80+ radio buttons and 65 textboxes. I have attached shortened exert from main file. Textbox 1 takes on a value when a radio button is pressed. When button "Show Values is pressed it inserts the accumulated of all textboxes … | |
I have never learn python and i need to write one small program in it. I have C++ code so can someone convert that code to python code ? code: #include <stdio.h> int N; struct { int y, x1, x2; } platforme[100]; int spusti(double x, int y) { int rez … | |
I'm new to c# and would like to convert this code from Python. Any help or orientation would be great. Thanks D. api_url_base = 'https://oneapi.zemanta.com/o/token/' api_token = b64encode(b"2JreK10kPxO3P0wHPkqjfDSw8yKdHzSSyIQNavWH:JLYcjOjoP9LzTO6AI7N0FprW7Uuy8pZVFxk6eRIfDgTSHNaZGAHOMbickdzvtv41PXVpJZ9O2y5DHPpJs4rTchpv9MIursLi4S1Om4qINLanazpygR3Zr8rKTHdsZm8B").decode("ascii") headers = {'Content-Type': 'application/x-www-form-urlencoded', 'Authorization': 'Basic {0}'.format(api_token)} payload = {'grant_type': 'client_credentials'} api_url = '{0}'.format(api_url_base) r = requests.post(api_url, headers=headers, data=payload) ret = json.loads(r.content) … | |
Hi, I try to convert the c code into python it actually complie but no result came out Code in C #include <stdio.h> # include <math.h> double const pi=3.1415926535897932384626433; double const twopi=2.0*pi; double const halfpi=pi/2.0; float cos_32(float x) { int quad; x=fmod(x,twopi); if (x<0) { x=-x; } quad=int(x/halfpi); switch (quad) … | |
how to extract and save images from csv file in python | |
Hi, I have created a two player board game url deleted - rule 2.7 Thes problem is that AI is easily beatable. I used heuristics to find best move for the AI. The rules of game are as follows 1) 9 by 9 grid is divided into 9 grids of … | |
I have a file that contains a class, its called test.py. How can i call on that class within another file called xml.py? | |
Hi everybody, I'm doing some programming in Flask, and as part of the program I'm doing a basic system of logging in, but that's not where my problem resides. During my programming, the page that is supposed to verify a login absolutely refuses to go past a specific line of … | |
| Hey, Im working on the UNO game in python and am almost done with the rest of the code but I am not able to print the UNO logo as of yet. Please help. I need to submit my work tomorrow. |
i have a set of code for a gui that runs using a dictionary but i cant get the code to exit once the user presses the last button named end import sys import tkinter as tk from functools import partial class Situation(tk.Frame): def __init__(self, master=None, story='', buttons=[], **kwargs): tk.Frame.__init__(self, … | |
If you run the following code (on Windows 7, Python 2.6.5), you should see a light border around a black square and some text below it. How do I get rid of that border? Thanks! [code=python] from Tkinter import * class App: def __init__(self, master): #background frame self.bgFrame = Frame(master, … | |
Hi, how do we write value into text file in wxpython. As in python, file_out = open("filename", "wb") is used (as far as I know). Im trying to write the value from textctrl using: self.val = self.textctrl.GetValue() So, as for the next step to write the value into text file, … |
The End.