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...
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...
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...
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...
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...
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...
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...
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...
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...
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...
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...
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...
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...
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...
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.
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.
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)...
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>...
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.