![Solely CS](/img/default-banner.jpg)
- 14
- 302 942
Solely CS
United Kingdom
Приєднався 27 чер 2022
I make videos on programming, primarily in Python.
Python BeautifulSoup for Beginners - A Complete Web Scraping Project
Building A Web Scraper With Python & BeautifulSoup (Python Web Scraping For Beginners - A Complete Web Scraping Project).
Gear I Use:
🎙 Microphone: amzn.to/42fT8ls
💻 Laptop: amzn.to/41PoVct
⌨️ Keyboard: amzn.to/41RI91c
🖱️ Mouse: amzn.to/41NNV3L
🎧 Headphones: amzn.to/3BGWSRX
📚 What I'm Currently Reading: amzn.to/40Onafe
🐦 Twitter - SolelyCS
Gear I Use:
🎙 Microphone: amzn.to/42fT8ls
💻 Laptop: amzn.to/41PoVct
⌨️ Keyboard: amzn.to/41RI91c
🖱️ Mouse: amzn.to/41NNV3L
🎧 Headphones: amzn.to/3BGWSRX
📚 What I'm Currently Reading: amzn.to/40Onafe
🐦 Twitter - SolelyCS
Переглядів: 696
Відео
Avoid THIS Python Function!!
Переглядів 330Рік тому
In this video, I explain how to use Python’s built-in eval() function & the importance of understanding the potential security risk associated with using it. ⏰ Timestamps: 0:00 - How Does The Eval() Function Work? 1:04 - Security Risks 🔔 SUBSCRIBE ON UA-cam: ua-cam.com/channels/vwatS_pjvkJeoy8SopPwRw.html Gear I Use: 🎙 Microphone: amzn.to/42fT8ls 💻 Laptop: amzn.to/41PoVct ⌨️ Keyboard: amzn.to/4...
You're a genius! What a fantastic video!👏👏
Great video again
Great tips
Excellent video, good job!
cooool
Smart
More pandas short videos please
How I can get Aviator predictor by python output
Which editor it is?
I love replit, no clue how to install python (joekry)
Hey which editor do you use?
Wouldn't it be better to define the escape sequences somewhere that makes it obvious which colour is being represented? e.g. function called colPrint & pass the required colour as a parameter: colPrint("blue", "This is a colour")
oh that's why Python uses self instead of this as a keyword
Switch to polars for efficiency!
Can we get it in Cornflower blue?
Pretty sure you can make these using rgb values too? Ive dont it a while ago I am not sure. But if anyone wants I can write the code here
Good Video :)
what code editor did you use in this video?
Replit
I used this to make a command prompt GUI that highlights the selected option
This kid doesn't know crap XD GregTheMadMonk 2 months ago This is not Python-specific btw (in case some didn't know), it's a feature of what's called "ANSI escape codes" which is a set of character sequences designed to control the cursor/appearance for terminal output. They can help you clear the lines, change cursor around, format text and more. Originally present since the 70s (sometimes they're even called VT100 escape codes by the name of popular terminal of that era), they are now widespread and supported almost in every terminal emulator. 28 Solely CS Reply 13 replies LuckyButUnlucky LuckyButUnlucky 2 months ago But they are the slowest way of doing this. In Windows the Win32 API gives functions to edit the terminal cell color and ascii symbol directly. Reply James James 1 month ago @LuckyButUnlucky that however, is platform specific. Given the advice is for python, I’d say unspecific and speed agnostic advice is better, no? Reply LuckyButUnlucky LuckyButUnlucky 1 month ago I'm not one for boiler plate code much so Ascii escape codes are the same. I do always side with speed because I used to start off learning batch script. That's slow as hell and made me value the speed that the Windows API has given me in making console/terminal games and programs. Yes ascii codes are quick in some ways if you don't want to build up the functions yourself for changing the colors directly. The Windows API for the Windows console is much more useable and understandable than the Linux console API or the Mac one. Reply GregTheMadMonk GregTheMadMonk 1 month ago (edited) @LuckyButUnlucky @James if you want to create a python (or any other language for that matter) application with a proper TUI you would probably use neither ASCII codes nor bare platform API unless building a new TUI library IS the point of your application. You'd probably go with something like ncurses or some cross-platform analog. ASCII codes are to be used where the performance doesn't really matter and where other means aren't available. Like in shell/batch scripts or simple text-based applications where you wouldn't bother performing a system call just to clear/color the line. Either way, if your program takes a performance hit from outputting text (with ASCII codes or not), you're most probably doing something wrong. Standard output is usually buffered anyway. Reply LuckyButUnlucky LuckyButUnlucky 1 month ago @GregTheMadMonk Printing text with the std output function of any library to the console is much faster if you don't include ascii escape codes and such it has to analyze. And curses for Linux is cool and all too if you don't want to learn how the Linux API actually works instead of relying on other peoples open source code to do it for you. Even in Windows outputting colored text to the screen doesn't reach 60fps because it uses GDI and the function doesn't utilize the GPU hardly. Not too mention the Win32 API only works with the original console now. Which I have copied and opens it along side my programs for compatibility. In short do it yourself build your libraries from the system API not something that is already built off of it. I guess that's the different between a Python programmer and a C/C++ like me. Reply GregTheMadMonk GregTheMadMonk 12 hours ago @LuckyButUnlucky "In short do it yourself build your libraries from the system API not something that is already built off of it." This is horrible advice that encourages bad practices (even among experienced programmers) in C/C++ community (source: I'm also a professional C++ developer). 100% DIY only if there is an actual need for it, unless doing it from scratch is the point. Also how on earth are you planning to utilize GPU while using standard output without is a mystery to me. You might mean creating/using a custom GPU-accelerated terminal emulator but even this has nothing to do with ASCII codes parsing speed Reply LuckyButUnlucky LuckyButUnlucky 3 hours ago @GregTheMadMonk If you don't know how to implement the GPU with the standard input/output. Maybe doing stuff on your own a bit might catch you up. That's basic GPU programming at it's finest. Reply GregTheMadMonk GregTheMadMonk 2 hours ago @LuckyButUnlucky Do you even know what a GPU is? Do you realize it's a piece of hardware and you don't "implement" it? And what exactly is that "gpu programming" you're talking about? CUDA? Shaders? You're probably a troll tho Reply LuckyButUnlucky LuckyButUnlucky 2 hours ago (edited) @GregTheMadMonk You're using a game maker to help you out. And if you know about CUDA API than you should have already figured this out. No need to get frustrated you can't do stuff from scratch. Reply GregTheMadMonk GregTheMadMonk 2 hours ago @LuckyButUnlucky ok definitely troll Or you're 12 Reply LuckyButUnlucky LuckyButUnlucky 1 hour ago @GregTheMadMonk You're getting angry because I knew something you didn't? You don't seem like a professional at all. Anyways you can accelerate standard console output at least in C/C++ with the CUDA API. Now you know Mr. Professional don't get more angry for telling you this. Reply GregTheMadMonk GregTheMadMonk 7 minutes ago @LuckyButUnlucky no you cannot. GPUs don't do text processing and they never did Reply LuckyButUnlucky LuckyButUnlucky 1 minute ago @GregTheMadMonk You're the prime example where people shouldn't learn Python as their first language.
Have You Used Python's Eval() Function Before?
Yes :)
Very useful…. Thanks ❤ However it change all output text in the terminal // not only the specified printed text //
Name of the editor used here?
Same question
Replit
If u dont need the index then use _
'from __future__ import braces' is another good one
As if ypton wasn't heavy enough already
For anyone who does not want to use so specific colors, there is a library called Fore. It defines these escape character series to be readable.
What's the library name?
Great
What code editor is that?
Replit
What's auditor that you use
Wow.. Nice
Should omit the “!= 0” part because it’s functionally useless. Just need “if n%2”
Im on Mac, how do you make it so that the terminal only shows the output
How can I do this in Java