19ecal
@19ecal
I know a reasonable amount of Python. I'm doing GCSE Computer Science and also SANS Foundations, where I'm learning a bit of C, not much tho
i am making an interpreter for a language and i am wondering when i am making the ast whether i should be passing around a Node, Node*, std::sharedptr
Blank Repl
ANDREWVOSS If you don't want to deal with dynamically allocated memory, then use uniqueptr or sharedptr, which deal with it for you. The main difference is that there can only be 1 uniqueptr pointing to any given Node, while you can have any number of sharedptrs pointing to a Node. I'd recommend unique_ptr, unless you need to have multiple pointers to a node.1 year ago
I'm trying to make a class to interact with a database server (which I have already written and works), but I do not know enough about async programmi
Python
19ecal Fixed with nest-asyncio package, added
import nest_asyncio
nest_asyncio.apply()
to the top of sqlclient.py1 year ago
i need to sanitise some input to use in an sql query, but the python module i am using does not appear to support parameterised queries (i.e cur.execu
Basically put this in your .replit file:
run = "(python3.10 --version || install-pkg python3.10) && clear && python3.10 main.py"
Explanation:
(python3
UMARismyname just saying for anyone who came here from google, this won't work anymore. You could fork this to get a nix-based python 3.10 repl with all features you'd usually expect included, or this for 3.119 months ago
19ecal UPDATED (using nix):
make a new nix repl: https://replit.com/new/nix
put this into replit.nix:
{ pkgs }: {
deps = [
pkgs.python310
];
}
put this in .replit
run = "python3.10 main.py"
`1 year ago
prajwal0 Does this work with external packages from PyPI (pip install __ or Replit's packaging manager)?1 year ago
Huffman Compression/Coding in Python
Huffman Coding is a way of compressing text using binary trees, with my implementation I compressed the entire s
Python
I'm trying to use netcat but according to install-pkg netcat; netcat --version the installed version is bash: netcat: command not found funny ikr
How
i'm trying to make it so that you can download an image just by clicking on it
currently i have
but on clicking the image there is a warning Download
I'm making a command line thing
But that is not what I'm asking about
Do I go pythonic
srcpath=os.path.normpath(os.path.expanduser(args.src)) if args.
https://exploit-me.19ecal.repl.co
There's a PHP server running there that is hiding a secret
See if you can find the flag
No prizes
Python
I'm trying to make a function to compile and run a C/C++ file I give it, then delete the executable
In .replit I have run="bash main.sh"
In main.sh:
g
programmeruser The shell tab that you opened and the script are two different bash instances.
EDIT: see my comment below2 years ago
Ok, so I've got a basic Flask server running, nothing complicated, code:
from flask import Flask
app=Flask(name)
@app.route("/")
def hello():
return
Coder100 res=requests.get("http://FreshThunderousRepositiories.19ecal.repl.co")
print(res.text)
`2 years ago
Coder100 You can't have the extra www, it's already a subdomain.
You should know that it is hosted on
http://FreshThunderousRepositiories.19ecal.repl.co
lol2 years ago
19ecal Ok, having changed the code to request to http://www.FreshThunderousRepositiories.19ecal.repl.co instead of https:// , requests returns HTML for this page
image
Which is clearly not my basic server
And urllib returns 4042 years ago
A simple GUI for my quadratic equation calculator
Again, probably not the best way to do it, suggestions welcome.
Note: Originally made in IDLE on my
Python
I made this.
It should solve quadratics of the form ax^2+bx+c=0, when a!=0.
It's probably not the most efficient way of doing it.
Suggestions welcome
Python