15,175 Topics
| |
I wrote this line of code: database = {"host":host, "user":user, "password":password, "db":db, "charser":charset, "cursorclass":cursorclass} and i'm receiving this: {'host': '35.234.92.142', 'user': "b'freedbtech_'", 'password': "b''", 'db': "b'freedbtech_cursopython'", 'charset': 'utf8mb4', 'cursorclass': "<class 'pymysql.cursors.'>} i need to remove those "b's" and " ' " in the strings, but i don't know how to … | |
Am at an intermediate level in python and tkinter, and have been trying to figure out how to get the code below into some kind of workable form I can understand. What I want to do is, like, if I typed something into the bottom frame, then I'd like to … | |
import threading,time,sys try: import requests except: print("Please install requests module!") sys.exit() path=input("File (example: file.m3u) => ") out=path+"_out.txt" try: with open(path, 'r') as file_in: lines = file_in.read().splitlines() except: print("File error or not found!") file_out=open(out, "w") #print(str(lines)) all = len(lines) print(all) worked=0 print("Scanning {} lists... Worked will write in {}".format(all,out)) time.sleep(5) def … | |
import threading,time,sys try: import requests except: print("Please install requests module!") sys.exit() path=input("File (example: file.m3u) => ") out=path+"_out.txt" try: with open(path, 'r') as file_in: lines = file_in.read().splitlines() except: print("File error or not found!") file_out=open(out, "w") #print(str(lines)) all = len(lines) print(all) worked=0 print("Scanning {} lists... Worked will write in {}".format(all,out)) time.sleep(5) def … | |
for(#iterations) solve non linear solution get new flux klinkages solve LD and Lq solve new Id and Iq if (abs(Id_new - Id_old) < 0.01) break else put in the new Id_new and Iq_new | |
I have an array in python that has letters as strings and a comma as a string also. I have managed to find code that finds all the letters that come before that comma letter, there are other comma letters and i would like to iterate to list every letter … | |
Hey fellow Daniweebs, I would like to present a code to you, which seems to be not working for some reason , kindly help me name = input("Enter your name: ") age = input("Enter your age: ") if type(name) != str or type(age) != int: print("PLEASE ENTER VALID CREDNTIALS", end … | |
each quarter the marketing manager of a retail store divides the customers into two groups based on their purchase behavior in the previous quarter. The classes are denoted by L and H. The manager wishes to determine to which group of customers he should sent a catalog. The cost of … | |
Lines=["1x+1y+0","1x-1y+0","1x+0y-3","0x+1y-0.5"] So, How do we extract coefficients of each equation in the list? | |
I have my resoruces stored in mysql DB: eg : > |IPaddress | Status| |10.x.x.x| yes| |10.1.x.x| yes| I am trying to get the available resource and after that will update DB with status No. > query = ("SELECT IPaddress from TABLE where status='yes'") cursor = mydb.cursor() cursor.execute(query) result=cursor.fetchall() query1 … | |
The code: using Discord; using Discord.Commands; using Discord.WebSocket; using NadekoBot.Common.Attributes; using NadekoBot.Core.Services; using NadekoBot.Extensions; using NadekoBot.Modules.CustomReactions.Services; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; namespace NadekoBot.Modules.CustomReactions { public class CustomReactions : NadekoTopLevelModule<CustomReactionsService> { private readonly IBotCredentials _creds; private readonly DbService _db; private readonly DiscordSocketClient _client; public CustomReactions(IBotCredentials creds, DbService db, DiscordSocketClient client) … | |
I am new in c++, java and python | |
Hello everyone, I am writting a code where result is not coming correct because I am not able to join 2 lines to make a single line. Please help me e.g my input file is: AATTCCGGTTT CCTTAACCCCC I want my code to first join them together as AATTCCGGTTTCCTTAACCCCC and then … | |
Create a code using python of random walk where food is placed in spots on the grid. Whenever a Walker runs into the food it eats it and reproduces | |
Hi guys how are you please why When I run this code it does not work but when I change the ( tn.write(b"config t \n") tn.write(b"router ospf 10 \n") to the show command it works fine ?? **************************************************************************************************************** import sys import telnetlib import getpass host=["192.168.1.164","192.168.1.169"] devno=len(host) user='ali' Password='cisco' for i … | |
Hello! So I have this homework that i have no idea how to continue. this is an exemple of input,but i have to do it for a general one: **7 pencils car ball candy tshirt bike video_game Mike Andrew Inna** and the output must be like this: **Mike: pencils candy … | |
Hello Guys! I'm new in python and started creating this code without any experience and of course I can't know a lot about coding and I will do a lot of stupid mistakes, and this case is not exception as well. I tried to assign option menu to my list, … | |
function to add two numbers, taking as arg/param & using inputs. | |
Python program that will 1)Define a single point for the red/green dot near the supposedly enemy territory; 2)Define a subset A of your DEM raster image towards the friendly territory; 3)Calculate the line of sight for each pair (of observation pixel to target pixel); 4)Sum the total number of green … | |
Send plz python micro project title & source code | |
i am completly stuck with some problems in programming, talking exactly aboutt linked list and some others can anyone help me? | |
def Count_Total_Words(str1): total = 1 for i in range(len(str1)): if(str1[i] == ' ' or str1 == '\n' or str1 == '\t'): total = total + 1 return total string = input("Please Enter your Own String : ") leng = Count_Total_Words(string) print("Total Number of Words in this String = ", leng) | |
16 years old from egypt software engineer | |
Hand gesture recognition using car game by Python | |
for personality prediction from text by using unsupervised learning method or without training data can we able to use any other method for better accuracy nearly 75% | |
I have a string in python and i desire to find the index of the first occurrence of the letter `l` in it. Here is the code am using mystring="abcdloplu" ##how do i get the index of the first occurrence of l in the string | |
Below is a program that asks the user to input a username and password. Once logged off the user is asked to re-enter their username and password. Is the program correct where it checks if the username and password input before is correctly input again?. Any help would be welcome … | |
i am a newbie , and i have to give a program from dictionary in python in which we have multiple users . a simple username and password login program . plz explain it too . |
The End.