14,951 Topics

Member Avatar for
Member Avatar for Daniel_118

# Find minimum integer coefficients for a chemical reaction like # A * NaOH + B * H2SO4 -> C * Na2SO4 + D * H20 import sympy import re # match a single element and optional count, like Na2 ELEMENT_CLAUSE = re.compile("([A-Z][a-z]?)([0-9]*)") def parse_compound(compound): """ Given a chemical compound …

Member Avatar for JamesCherrill
0
406
Member Avatar for TylLang

Tyl is a programming language that is intended for curious people who are interested in software development, as well as for intermediate and experienced developers who want to try a different programming language. Some of Tyl features: - Clean code - Symbolized keywords - One-line statements - System modules & …

Member Avatar for Reverend Jim
1
927
Member Avatar for Zarar_1
Member Avatar for Christina_7

Hi Dani, I'm new to Python . I started working on an automation project where i need to connect to a SunOS server through a windows jump server and run commands to get output on my local machine. I checked this existing module on python called jumpssh but not sure …

Member Avatar for rproffitt
0
776
Member Avatar for alice2002

I'm an absolute beginner. I needed help in creating a "loop"(idk if that's what it would be called). Basically I want to know how I can make a menu where I can select an option and then go back to the previous menu and creating kind of a loop somehow, …

Member Avatar for stokes
0
364
Member Avatar for zoro007

Hello, Please i need help with python 2.7 i use "from string import Template" and there error with Unicode if i print the string without Template working good and if i print it under Template appear error ""AH01215: UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 8: ordinal not …

Member Avatar for zoro007
0
395
Member Avatar for Abdallaselim77

MyMainWindow::createUI() { label = new QLabel("foo"); button = new QPushButton("Browse"); connect(button, SIGNAL(clicked()), SLOT(browse())); layout = new QHorizontalLayout(); layout->addWidget(label); layout->addWidget(button); setLayout(layout); } void MyMainWindow::browse() { QString directory = QFileDialog::getExistingDirectory(this, tr("Find Files"), QDir::currentPath()); if (!directory.isEmpty()) { if (directoryComboBox->findText(directory) == -1) directoryComboBox->addItem(directory); directoryComboBox->setCurrentIndex(directoryComboBox->findText(directory)); } } MyMainWindow::createUI() { label = new QLabel("foo"); button = …

Member Avatar for Reverend Jim
1
905
Member Avatar for Mariam_9
Member Avatar for Connor_1

The purpose of this assignment is to provide you with experience in coding programs that make use of parallel lists. This program maintains 2 parallel lists. The first list maintains names of students and the second list maintains their grades. These 2 parallel lists are shown below: Elements in parallel …

Member Avatar for rproffitt
0
567
Member Avatar for joy_deep

Hello, I am new to Python. I am learning boxsizer. I want to put two buttons on my panel. One at top right corner and one at bottom right corner. How do I achieve this? Thanks

Member Avatar for Jonny_4
0
991
Member Avatar for Saran_1

I have scoured Stack over flow and the Pandas documentation for a solution to this issue. I am attempting to recursively move through a directory and concatenate all of the headers and their respective row values. Below is what I have so far after much experimentation with other libraries: import …

Member Avatar for m_26
0
18K
Member Avatar for vegaseat
Member Avatar for paddy3118
1
2K
Member Avatar for Kincso

This is a program to get a student mark, as an input from user and print its grade based on the following criteria: if mark>=80 print 'A' if mark between 70-80 print 'B' if mark between 60-70 print 'C' if mark between 50-60 print 'D' if mark < 50 print …

Member Avatar for Reverend Jim
0
631
Member Avatar for GiorgosMaragkop

I am currently building a LSTM model to predict only the daily Open price of a stock. Is there a difference in the prediction of the Opening price if I include other parallel series (High, Low, Close, technical indicators etc) using a Multiple Parallel Series Model compared to using a …

Member Avatar for rproffitt
0
297
Member Avatar for glez_b

I interpolated temperature data observed on an urban area formed by 12 locations. Now i would like to remove all interpolated values that are outside the shapefile layer. How can i do it? The shapefile links: https://www.dropbox.com/s/0u76k3yegvr09sx/LimiteAMG.shp?dl=0 https://www.dropbox.com/s/yxsmm3v2ey3ngsp/LimiteAMG.cpg?dl=0 https://www.dropbox.com/s/yx05n31dfkggbb6/LimiteAMG.dbf?dl=0 https://www.dropbox.com/s/a6nk0xczgjeen2d/LimiteAMG.prj?dl=0 https://www.dropbox.com/s/royw7s51n2f0a6x/LimiteAMG.qpj?dl=0 https://www.dropbox.com/s/7k44dcl1k5891qc/LimiteAMG.shx?dl=0 The Data is: Lat Lon T 0 20.8208 …

Member Avatar for rproffitt
0
1K
Member Avatar for Sharif Ashik

I am highly interested to be a **Data Scientist.** so,whats your suggestion ? How can I go ahed

Member Avatar for rproffitt
0
177
Member Avatar for Henry_28

Hey there, so i'm trying to answer this question but i'm hitting a snag. i'm not familiar with the environment so it's very difficult to understand the syntax. I would like someone to help me look through and assist with the syntax. Also how to pass the input to get …

Member Avatar for Reverend Jim
0
178
Member Avatar for Connor_1

***** I created the format: def main(): pennies=int(input("Enter pennies:")) nickels = int(input("Enter nickels:")) dimes = int(input("Enter dimes:")) quarters = int(input("Enter quarters:")) print("You entered:") print("\tPennies:" , pennies) print("\tNickels:" , nickels) print("\tDimes:" , dimes) print("\tQuarters:" , quarters) total_value = get_total(pennies, nickels, dimes, quarters) v_Dollars, v_Cents = divmod(total_value, 1) print("Total = ${:,.2f}".format(total_value)) print("You …

Member Avatar for woooee
0
263
Member Avatar for TickleMeElmo

Hey guys, I'm in desparate need of assistance with my A-Level project. I'm writing a Banking system in Python and I'm being told by the idle log that a function hasn't been defined - even though that function is right above it! My Full Code is: #'http://effbot.org/tkinterbook/tkinter-index.htm' <<< Tkinter Tutorials …

Member Avatar for woooee
0
1K
Member Avatar for Marie_3

Hey there! I have problem with a programm of mine in pyhton. I want to find the index of the character "o" in my list. How can I find that out. Thx for your help in advanced!! s1 = [["aidl"],["utov"]]

Member Avatar for rproffitt
0
132
Member Avatar for dseto200

Listed below is the original word jumble python program. According to the exercise i'm supposed to add hints see next thread on my modified program however it doesn't work correctly. [code=python] # Word Jumble # # The computer picks a random word then "jumbles" it # The player has to …

Member Avatar for Akash_22
1
7K
Member Avatar for Jiby_1

After running a python code for usb device following error is occured Traceback (most recent call last): File "test1.py", line 6, in dev = usb.core.find(idVendor=0x1d6b, idProduct=0x0001) File "/usr/lib/python2.7/site-packages/usb/core.py", line 1263, in find raise NoBackendError('No backend available') usb.core.NoBackendError: No backend available

Member Avatar for rproffitt
0
4K
Member Avatar for pelin

i am almost done with the hangman game but i just need to migrate it to graphics i know i need to use entrybox but i still dont know. [CODE]rom graphics import* from random import * MAX_BAD_GUESSES = 7 def readfile(): infile = open("wordlist.txt","r") contents = infile.read() lines = contents.split("\n") …

Member Avatar for Devarshi_1
0
628
Member Avatar for Barnacle

from tkinter import * import time root = Tk() root.title("Testing System") root.geometry("900x600") def main(): def tick(): time_str1= time.strftime("%H:%M:%S") clock.config(text = "Current Time:\n" + time_str1) clock.after(200, tick) def date(): date_str1 = time.strftime("%A, %d %B %Y") date2.config(text = date_str1) date2.after(200, tick) frame = Frame(root) clock = Label(frame, font = ("times", 14, "bold"), …

Member Avatar for woooee
0
336
Member Avatar for Imran_28

I want to add a function for user to change file. I am not really sure on how. I have already created a function in the end but its not getting me anywhere. This is my code: import string import re filename = "phil.txt" def countLines(): Read number of lines …

Member Avatar for Reverend Jim
0
334
Member Avatar for Peter_TARAS

Hello, I am learning Tkinter. As a part of the learning process I am building a Notepad clone in order to become familiar with Tkinter widgets. I am pretty close to completing it - I added about 90% functionality to the application - but I face two problems: 1) The …

Member Avatar for bevis.hobbs
0
22K
Member Avatar for anton.yakushin

I am wondering if anyone could recommend the best CMS for an Airbnb-style marketplace that allows people to sublet their apartments, and other people to search, filter, and pay for the apartments listed. These are the main requirements: - Ability to sign up both buyers and sellers. - Accounts for …

Member Avatar for johnlee90
0
2K
Member Avatar for Kincso

Task 2: Write a program that simulates an unbiased coin flip. Your program should print true if the coin flip results in a head and false if the coin flip results in a tail. Hint: any value greater than 0.5, represents Head otherwise it represents Tail

Member Avatar for Reverend Jim
0
234
Member Avatar for cakeboy

Hi, I'm attemting to learn programming with Python and am currently trying to design an adventure game that sets up rooms and a player can move between them. I'm having problems working out a lop function that can move the player around the rooms. The current method has an error …

Member Avatar for Reverend Jim
0
781
Member Avatar for Michael_102

Machine learning is the science of getting computers to act without being explicitly programmed. machine learning has given us self-driving cars, practical speech recognition, effective web search, and a vastly improved understanding of the human genome. It is so pervasive today that you probably use it dozens of times a …

0
241

The End.