Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

python

  1. N

    Python - Path to working directory and files.

    To create a portable application or script, the first step is to set a universal method so the working directory will always find its dependent files. And the most dependable way is to utilize the standard libraries that Python comes with, in this case, "sys" and "os". To avoid the program...
  2. EkBass

    Chat locally with Llama2-7b via console

    Hi folks. I am surprised of the development of the smaller models in past two years. Current 13b and even 7b models can outrun DaVinci 3.0 thought OpenAI has also moved on with its products. However, im using I7-7700 with 32gb ram (no GPU) and this client with 7b model runs smoothly. No need to...
  3. martian94

    Python Bubble sort with iteration print

    Hello! I'm new to coding and I am in the noob phase. I am tasked with creating a bubble sort algorithm. My problem is, hopefully, quite simple to you. The iterations in the print statements seem to sort the numbers list right away, instead of printing each iteration of two numbers switching...
  4. FastFooDD

    Python calculator works fine but after one operation its result is always 0

    from customtkinter import * import tkinter.messagebox app = CTk() app.geometry("420x500") app.resizable(False, False) set_appearance_mode("dark") tempLabel = "" valuesInt = "" valuesInt2 = "" i = 0 i2 = 0 symbol = "" #[FUNCTIONS] def labelUpdate(button): global tempLabel tempLabel +=...
  5. L

    Python ValueError: non-broadcastable output operand with shape (352,1) doesn't match the broadcast shape (352,2)

    import tensorflow as tf from tensorflow.keras.models import Sequential from tensorflow.keras.layers import LSTM, Dense import numpy as np from sklearn.preprocessing import MinMaxScaler from sklearn.model_selection import train_test_split import matplotlib.pyplot as plt # List of GIDs to be used...
  6. Velpus Captiosus

    Python Python Web Programming Flask website cookies issue

    I have this function in Flask: @app.route('/<usrname>?<app>',methods=['POST','GET']) def mainW(usrname:str,app:str): if request.method=='POST': action = request.form.get('action') if action == 'email': return...
  7. Kaworu

    Python [Flask] I have error with my database (flask shell runtime error)

    Hi! I am still trying to learn Flask. And I have some problems that I cannot fix myself. Okay, so now I have a code (classes) that define a database. And I would like to generate the database in flash shell. However, I have some fundamental error with my database, yet I do not know why. My...
  8. Kaworu

    Python [OOP] I can't create an object - I got an invalid syntax error.

    Hi. I created a simple script to generate safe passwords. When I tried to rewrite it as OO code, I suddenly have an error. My code is this: The error is in the first line after if __name__ == "__main__". Exactly in the place when there is an equality sign. SyntaxError: invalid syntax Its...
  9. A

    Python Online Compiler

    Python Online Compiler & Editor Python online compiler lets you write, share, and compile Python code online – It’s the quickest and easiest Python’s online compiler for almost all versions. The best part is that you don’t need to worry about installing anything on your device. There’s no need...
  10. A

    Python Dive into Data Structures with Online Python Compiler!

    Hey Python Enthusiasts! I hope this post finds you well on your coding journey. Today, I'm excited to share a fantastic resource for honing your skills in data structures using Python. Drumroll, please... 🥁 Introducing Our Online Python Compiler for Data Structures! Whether you're a beginner...
  11. Kaworu

    Python Python tutorial: apparently gamemap: GameMap in entity.py does not work?

    Hi! I am following the Python Roguelike tutorial. I am currently in the 6th part of it. And in my source code there is an error I cannot fix myself. When I am trying to run main.py, the window with the game gets generated. However, when I try to make any move, an error occurs: Traceback (most...
  12. Velpus Captiosus

    Python Element is added to a list when it shouldnt

    Hello everyone.Only part of the Node class is relevant to my question: import math class Node: prevNodes = [] b = 0.5 def __init__(self,value,nextNode): self.value = 0 if nextNode is not None: self.nextNode = nextNode...
  13. Kaworu

    Python [Flask-Moment] I can’t show the current time

    Hi! I am slowly learning Flask framework. When trying to show the current time (and time that had passed since the page got generated) I encountered an error. My app.py looks like this: My index.html in templates folder looks like this: And what I get is this: I dunno what I am doing...
  14. P

    Python Tried many times to fix the string prediction problem but...

    I am running this code below: # Import modules import numpy as np import pandas as pd from sklearn.model_selection import train_test_split import tensorflow as tf from tensorflow import keras from tensorflow.keras import layers """ This module is a string prediction model using LSTM. It takes a...
  15. nafisbd

    Python How do I prepare for a software engineering Msc(conversion) in 1 month

    Hi, I am a non computing graduate. Have basic HTML knowledge gather using freecodecamp. I am transitting from marketing industry to IT (programming) industry. I have enrolled in a masters in UK which will start in just one month. But I am not sure If i will be able to fully concentrate or spend...
  16. Cooldude100

    Python How do I get paid ads on my website.

    I am making a payment website using stripe. It is sort like paypal or venmo. But you don't need any transaction fees. The way I hope to accomplish this is with ads. I am using anvil but there is no ad option.
  17. Cooldude100

    Python I need devs for my project.

    Hello, my name is Grayson. I am looking for devs to help me create a payment Api for a website called Fruit surf. They will get half of the revenue from the website as long as they are a dev. Please help me. Also they must use python and know pyscript.
  18. Cooldude100

    Python Py-script chatgpt payment api

    I am having troubles with trying to figure out how to use a payment Api. So, I asked ChatGPT to help me. Here is the code: import jsonfrom http.server import BaseHTTPRequestHandler, HTTPServerclass PaymentHandler(BaseHTTPRequestHandler): def _send_response(self, status_code, data)...
  19. Cooldude100

    pyscript not showing

    I am using pyscript and typed in this code <!DOCTYPE html> <html> <link rel="stylesheet" href="https://pyscript.net/latest/pyscript.css" /> <script defer src="https://pyscript.net/latest/pyscript.js"></script> <body> <title>Making transactions so much easier! Fruit Surf</title>...
  20. Cooldude100

    How to transfer visa and Mastercard with sqlite

    Hello. I am making a money transferring software like Venmo or PayPal and I was wandering if anyone could help me get the code for the transactions. I am using SQLite and not flask. If anyone can help, please do.
Back
Top Bottom