Gulshan Negi
Profilo di
Nome | Gulshan Negi |
---|---|
Indirizzo email | negigulshan903@gmail.com |
Avatar | |
Messaggi | 20 |
-
- 2024-01-19 09:52:33
- Re: Problema con comunicazione tra PC ed ARDUINOUNO via USB
- Forum >> Programmazione Python >> Scripting
- Well, there are some issues with your python code, can you replace your code with this one.
import time
import serial
try:
ser = serial.Serial("/dev/ttyACM0", 115200)
if ser.is_open:
print("\nConnection was successful\n")
except Exception as e:
print(f"Connection failed: {e}\n")
exit()
while True:
time.sleep(1)
ser.write(b'a') # Use 'b' before the character to convert it to bytes
time.sleep(1)
ser.write(b'a') # Use 'b' before the character to convert it to bytes
Thanks
-
- 2024-01-12 10:16:41
- Re: decodificare una stringa
- Forum >> Programmazione Python >> Calcolo scientifico
- Well, by using below python script you can do this.
hex_string = "eehggehhdeagefhfddbcadbecbcdcdaciffabbfchaaddbdcecafabbedecccececdbfdehhfibcaabfddcgegaabacddfcbcbfeedfdccd`dccf`bag`dfceceddad`cefhggbfjde`bicfggffddfcgcefhehcddfchdgcfacdb`fegfifgdahce idiehjjghhddafhgdaggegaefkihngihhejifehjikjdkgjgighechgehde`dcb`dadddaddccfcdebdcacbcacafddecdadbacedbbadbcbc`a`bbccgdbfgdebekifidghdegbehfhfdfgihigifbcighidc`dcbefcccgceaddcfhdhfbdbbcdehddcccfdd bceaecacbbb`bfegidfbfddbd`cfdegfchfeaeeidcbccgfbh``efcfgdhkhhhjimkkhffiljjnlhmgicbfeffgeefdbeggfdbaegfdeidcbfdhdjiihdhhhcc`dihfhifahehgdehhigjihhllemmlimgfjwrfmlnliflldbcfiijfhhhaehhhlmllqoq ojlmnkfllorrqstgnirqmejppnkhqmjiijildghgehdihjnnnlkfklkkhiiaffgmkgejijhdihhhkefgddjklihjoqfnnqiimqmomnlnlikhedcgfhgjkihgighfhjfkikkhghmohhhacghehfeeghlkihdgfieh`cfddbachchcabadeeegedffdejkhkmrmpqslnk olrrsklqpxtsqpxsuyxxrqpprurrmqrslnifklckpkntvmplkjkjihhkdilknkincliibfjicfhkkjbdgchgklfeeiedhgiigihhijghggihchfehhhieoifknjnqqqihpomhklmlljkjgfkiehdchffgjhldefcgehcfgcfcaabhdegbgeddfchd gfbcehahehhiiighhfijgekiilhifhgiieigfhhjgehdfeedhhhkjidedhhifgdackjmhljgddhddchiklklgeehhfiejifhfhjihiegegifhffjikhighihieifhkhjehihghhjmgjlhjhcdhfebhichkjjgacbdfhaeeeefcigcagehf`hfkhnccebdeghhffgic gikdcccbdegjkifgbdgegeedeecafijbhkhcfcffgcecimlgefdbcac`edhejfhacfeecegihhcgkjjkjhhigeabadcgedgfdhebfcdchdbadeeihghedihiigfabcebbdbbdfhhhgeeehegehegf`adeehhecdahh`eehgebcfghdfegcdfaeabgbdgd^eacfgi hhgcdabbdc`aachjhebcbebefgbhfggedbcfceaddbebdba_` bbed`cbfbdfjbe`cdaecdbggdfabbaaab`bdccgcfbebddddefch"
# Split the string into chunks of two characters each
hex_chunks = [hex_string[i:i+2] for i in range(0, len(hex_string), 2)]
# Convert each chunk to decimal and then to bytes
decoded_bytes = bytes([int(chunk, 16) for chunk in hex_chunks])
# Decode the bytes to a string
decoded_string = decoded_bytes.decode('utf-8')
print(decoded_string)
Thanks
-
- 2023-10-13 16:37:21
- How to find best UX design bootcamps
- Forum >> Principianti
- Well, I am a software developer, recently I have made a personal educational website in Python. For my website I am thinking to design UI/UX work myself therefore looking for best UI/UX design bootcamps over the internet and I found lots of results there but it became overwhelming to choose the best one for me. According to this post review and rating is not the parameter to find the best option. My concern is that what are the parameter to check which bootcamps is best to learn UI/UX design.
What do you think about it?
Thanks
-
- 2023-09-29 18:29:24
- Python list comprehension error
- Forum >> Principianti
- Well, your coding is looking good, you need to check for below things to troubleshoot the issues.
1. Check your python environment.
2. Code execution or code isolation.
3. Check used IDE
4. Check python version
Thanks
-
- 2023-09-21 14:06:20
- Re: Pycharm bot scritto da me non funziona più
- Forum >> Programmazione Python >> IDE ed Editor
- There are some logical isssues with your code, you can try below code to fix this error.
from selenium import webdriver
import undetected_chromedriver.v2 as uc
import time
from random_username.generate import generate_username
# Initialize the Chrome WebDriver with undetected_chromedriver
driver = uc.Chrome()
with drivers:
driver.get('https://yarevival.flarum.cloud/')
logo = '''
Author: @POPEYE EL POPE
Version: 1.0
######################################## DISCLAIMER ########## ################################
| Trolletto tool is a tool that allows you to use to bot some no sense accounts to the |
| DUCE's site. Please use this tool responsibly. |
| I am NOT responsible for any damages caused or any crimes committed by using this tool. |
###################################################### ############################################
'''
print(logo)
x = 0
while x < 1:
time.sleep(4)
driver.find_element_by_class_name('item-signUp').click()
time.sleep(1)
userName = driver.find_element_by_name('username')
name = generate_username(1)
userName.send_keys(str(name0)) # Use name0 to get the string
mailField = driver.find_element_by_name('email')
mailField.click()
mailField.send_keys(f"{name0}@ADMINBRUTTO.IT")
passWord = driver.find_element_by_name('password')
passWord.click()
passWord.send_keys('arandomshittypasword')
register = driver.find_element_by_xpath('//*[@id="modal"]/div/div/div/form/div2/div2/div5/button')
register.click()
time.sleep(3)
prifileOut = driver.find_element_by_xpath('//*[@id="header-secondary"]/ul/li3/div/button/span2')
prifileOut.click()
time.sleep(1)
eXXit = driver.find_element_by_xpath('//*[@id="header-secondary"]/ul/li3/div/ul/li5')
eXXit.click()
# FOR EDUCATIONAL ILLUSTRATIVE PURPOSES ONLY AND BLA BLA BLA!
Thanks
-
- 2023-09-13 18:28:59
- Re: AttributeError: partially initialized module 'pygame' has no attribute 'init' (most likely due to a circular import)
- Forum >> Programmazione Python >> Videogames
- Well, to fix these errors you can follow some steps such as clearing python chache or updating pygame and if it still does not work then check for typo error.
Thanks
-
- 2023-08-05 17:18:34
- Re: Problema Raspberry PI con NavigationToolbar2Tk
- Forum >> Programmazione Python >> GUI
- Well, you can solve this problem by updating Matplotlib, if still not work then I will recommebnd you to use different IDE or terminals.
Thanks
-
- 2023-07-26 19:01:29
- Re: comando SQL su tabell Access con PYODBC non funziona
- Forum >> Programmazione Python >> Database
- Well, you can try this code and you can get what you are looking for.
import pyodbc conn_str = (r'DRIVER={Microsoft Access Driver (*.mdb, *.accdb)};' r'DBQ=C:\Users\User\Desktop\AAA.accdb;') conn = pyodbc.connect(conn_str) cursor = conn.cursor() cursor.execute("UPDATE X SET A = 'test' WHERE A = 'b'") conn.commit() # Commit the changes cursor.close() conn.close()
Thanks
-
- 2023-07-12 14:00:53
- Re: La clausola "WITH" in MySQL
- Forum >> Principianti
- Hello this is Gulshan Negi
Well, In contrast to Oracle and other database systems, MySQL does not support the "WITH" clause for creating CTEs. However, you can achieve similar functionality by using subqueries or temporary tables. Subqueries can be used directly in the SELECT statement, while temporary tables can be created to store the result of a subquery and then selected from.
Thanks
-
- 2023-07-03 19:13:18
- Re: Qualcuno mi potrebbe aiutare?
- Forum >> Programmazione Python >> Scripting
- Hello this is Gulshan Negi
Well, you need to replace your code with below updated code.
while True:
user = float(input("Enter which figure you want to calculate: 1 for Square, 2 for rectangle, 3 for triangle, and 4 for circle: "))
if user == 1:
side_square = float(input("Enter the side of the square: "))
area = side_square * side_square
print("Area of the square:", area)
break
elif user == 2:
long_side = float(input("Enter the base of the rectangle: "))
short_side = float(input("Enter the height of the rectangle: "))
area = long_side * short_side
print("Area of the rectangle:", area)
break
elif user == 3:
height_triangle = float(input("Enter the base of the triangle: "))
base_triangle = float(input("Enter the height of the triangle: "))
area = height_triangle * base_triangle / 2
print("Area of the triangle:", area)
break
elif user == 4:
pi = 3.14
circle_radius = float(input("Enter circle radius: "))
area = circle_radius ** 2 * pi
print("Area of the circle:", area)
break
else:
print("Try again. Your input is incorrect.")
continue
Thanks