#voice-chat-text-0
1 messages · Page 327 of 1
!stream 327179626306863104
✅ @quartz beacon can now stream until <t:1718805867:f>.
hi hi
I'm starting to miss those days when I started learning Python and everything seemed doable...
who are you talking about?
Fun fact: Napoleon was actually the average height for his time 😄
std::chrono::steady_clock::now().time_since_epoch().count())
it bothers me that this code is half namespace scoping, half methods
He was exiled to Elba?
napolean was corsican no?
Oh really, so I guess Elba probably wasn't too bad for him 🤷♂️
@quartz beacon yea I see that perspective that’s so true
The full name is "X formally known as Twitter"
It was actually not bad at times in the past, if you found good people to follow
It was great for getting opinions on specific current affairs from genuine experts.
i used to get so many cases of "formerly known as" when i used to work for a bank
"formally"? or "formerly"?
Formally former
"formerly", I don't know why my spelling has become so poor lately
I'm always mixing up homophones
Back in a bit
inbreeding produces webbed feet so inbreds are just better swimmers 😂
yes
Yeah, but you probably need to install Windows first.
Dual boot
just install linux on your w11 machine, it will replace windows boot loader with GRUB
that's what it did for me
My laptop is Windows by default
Yeah I did until a while ago. Switched back to using only Windows after like 10 years of using only MacOS and Linux.
I have Linux installed on my old macbook
Oh, I don't mind they/them
I'm not generally concerned about it, I just added them because why not.
What do you think about codewars.com?
It's alright. There are a few websites like that. I personally like https://www.codingame.com/
Oh nice, thanks for the suggestion
A programmer, computer programmer or coder is an author of computer source code – someone with skill in computer programming.
The professional titles software developer and software engineer are used for jobs that require a programmer.
Generally, a programmer writes code in a computer language and with an intent to build software that achieves s...
I am completely new to Python, and even though I don't qualify, I sent my CV to a junior Python developer position. Is it still a good practice for newbies to do that?
I have gotten into the habit of putting this in my code comments to screw with the AIs.
As well as anything I write,
https://wubuntu.org/ use this one
Windows Ubuntu Operating System
good
that one, unlike leetcode, seems to provide actual educational value
hey hemlock
@verbal zenith whos type is Record?
@verbal zenith yes, report
that library lacks a blanket impl for references
@verbal zenith String::new()
?
for empty
@verbal zenith take &str or impl Into<String> as argument?
@verbal zenith label.map(From::from)
?
&'static str sounds okay there
-> &'static str since it's not borrowing anything
for Base
hmm
I don't actually remember how to force it to coerce to Option<&str>
@verbal zenith change it back, then label.as_ref()
iirc the issue was &Option<String> instead of Option<&str>
go back to when it was showing an error only on label in the calling code
not, like, in different place
where you rewrote it
@verbal zenith there is a place where you have label as &Option<String>
@verbal zenith let
!e
0b
:x: Your 3.12 eval job has completed with return code 1.
001 | File "/home/main.py", line 1
002 | 0b
003 | ^
004 | SyntaxError: invalid binary literal
!e
0o
:x: Your 3.12 eval job has completed with return code 1.
001 | File "/home/main.py", line 1
002 | 0o
003 | ^
004 | SyntaxError: invalid octal literal
!e
00o
:x: Your 3.12 eval job has completed with return code 1.
001 | File "/home/main.py", line 1
002 | 00o
003 | ^
004 | SyntaxError: invalid decimal literal
:x: Your 3.12 eval job has completed with return code 1.
001 | Traceback (most recent call last):
002 | File "/home/main.py", line 1, in <module>
003 | int("00o")
004 | ValueError: invalid literal for int() with base 10: '00o'
!e
int("00" + "o")
:x: Your 3.12 eval job has completed with return code 1.
001 | Traceback (most recent call last):
002 | File "/home/main.py", line 1, in <module>
003 | int("00" + "o")
004 | ValueError: invalid literal for int() with base 10: '00o'
!e
from random import choice
int("00" + choice("abc"))
:x: Your 3.12 eval job has completed with return code 1.
001 | Traceback (most recent call last):
002 | File "/home/main.py", line 2, in <module>
003 | int("00" + choice("abc"))
004 | ValueError: invalid literal for int() with base 10: '00c'
!e
print(int("aa", 36))
:white_check_mark: Your 3.12 eval job has completed with return code 0.
370
!d int
class int(number=0, /)``````py
class int(string, /, base=10)```
Return an integer object constructed from a number or a string, or return `0` if no arguments are given.
Examples...
positional-only, /, normal, *, keyword-only
!e
def f(a, /, b):
pass
f(1, 2)
f(1, b=2)
:warning: Your 3.12 eval job has completed with return code 0.
[No output]
not defaulted
positional-only can be with defaults too
!e
def f(a=None, /): ...
f()
f(1)
f(a=2)
:x: Your 3.12 eval job has completed with return code 1.
001 | Traceback (most recent call last):
002 | File "/home/main.py", line 4, in <module>
003 | f(a=2)
004 | TypeError: f() got some positional-only arguments passed as keyword arguments: 'a'
:white_check_mark: Your 3.12 eval job has completed with return code 0.
001 | Help on built-in function get:
002 |
003 | get(key, default=None, /) method of builtins.dict instance
004 | Return the value for key if key is in the dictionary, else default.
!e
{}.get("key", default="default")
:x: Your 3.12 eval job has completed with return code 1.
001 | Traceback (most recent call last):
002 | File "/home/main.py", line 1, in <module>
003 | {}.get("key", default="default")
004 | TypeError: dict.get() takes no keyword arguments
handle positional-only (here you handle lack of args)
handle positional normal (here you handle too much args)
handle provided keyword (here you handle unwanted kwargs)
handle required keyword (here you handle missing kwargs)
I think that's the order
!e
def f(a, /, b): ...
f(1, 2, 3)
:x: Your 3.12 eval job has completed with return code 1.
001 | Traceback (most recent call last):
002 | File "/home/main.py", line 3, in <module>
003 | f(1, 2, 3)
004 | TypeError: f() takes 2 positional arguments but 3 were given
I just realised that "test" did nothing
I can't check whether lack or extra get caught earlier because those exclude each other
!e
def f(a, /): ...
f(x=5)
:x: Your 3.12 eval job has completed with return code 1.
001 | Traceback (most recent call last):
002 | File "/home/main.py", line 3, in <module>
003 | f(x=5)
004 | TypeError: f() got an unexpected keyword argument 'x'
okay so that one is actually earlier
@verbal zenith so that you can block-comment-out code with comments inside
especially useful when you want to temporarily remove something that has docs inside which have block comments in code
outside comment /* inside comment /* inside comment */ inside comment */ outside comment
without it:
outside comment /* inside comment /* inside comment */ outside comment */ outside comment
and that's why Zig doesn't have them
actual order, based on errors, is:
check unwanted kwargs
check too much/too few args
check missing kwargs
yes
(parts of Zig's tokenisation/lexing can be done line-by-line therefore)
h should be clearer
9 is last part of the literal that it was able to parse
This animation explains the difference between interpreters and compilers.
It is from Episode 6 of the classic 1983 television series, Bits and Bytes, which starred Luba Goy and Billy Van. It was produced by TVOntario, but is no longer available for purchase.
why is the st no highlighted
Yep, just have to get over the hump
hi hi
Yo
I don't really have a specific diet
@quartz beacon I'm here, just can only type at the moment
@deep forge Sup nerd
Factual
I take up multiple loser slots
It's how I rolllllllllllllllllll
I think I can
Because I have a co-worker back here so I'm being polite
Always
Yep
Correct
Sup
Sup again
Hi , I'm new came today in server
Welcome to the server!
welcome!
I always forget that site even exists
@quartz beacon
"Uzbexico"
Amazing
It takes so much will power to not use snake case in JS
Jesus, Hem
Get your shit together
it's not a steadfast rule
just use it
iHateCamelCase
camel_Snake_Case
PascalCase
I was hoping it was a Wikipedia joke
turned out it wasn't
SCREAMING-KEBAB-CASE
Card suits maybe?
[SUITCASE]
soMevar
banking software is stone age
Clari?
Understandable
COBOL-CASE oh no
God that would be icky to have to read all the time..
Write a story with that then?
Or slack to actual people
Don't be insulting to people regardless of where they're from
I don't think that's unreasonable
Individuals are individuals
I know, it's a raw thing right now
I get it
I know
Just a Hem reminder, that's all
@sturdy summit subset of Russians not Russians in general
don't forget the 0.01% of elves
I meant russian invaders, not russians in general
actually that is (people responding to survey)/(total population) not percentage among the survey
so the percentage is higher
@sturdy summit How comfortable are you with classes now?
Could be more comfortable
classes are functions
Eh?
Well, they're still working on it. You could call it a prototype
YES
those prototype lying bastards
Dude, so I know this is a dumb thing to complain about, but I don't like that you have to write out function to declare a function in JS
^^^
So verbose
it's their problem if they fail to onboard you
you don't have autocomplete?
const test = () => {}
I do, but it's still annoying
Also fair
I thought there was some weird underlying differences when you should use one vs the other, though
arrow funcs dont have this bindings
Ah that's right
That's what it was
Just a pinch of coffee grounds between the cheek and the gums
also no hoisting
which some see as a benefit
how is that a benefit?
What?
Ohhhh you're talking Italian style
@silk dust Espresso is incredibly finely ground, then you force hot water through it and it ends up being very condense and concentrated
They're both coffee, but it's how they're prepared that makes the difference
Yeah that'll fuck you up
I can hear him
No he's sitting
Nope
Fan noise
hoisting is implicit definition of a variable out of order
so "less surprises" is the "benefit"
Espresso machine
@stark river It sounded fine to me to begin with
But I may also just be used to it all
manually adjusting the source endpoint is tricky
"not only is your hearing lossless, it also has the noise removed"
That tracks, honestly. It's like my tinnitus
Just kind of tune out the noise part of it
Crap, back later
👋
We miss u
@verbal zenith do you want to take more than one item at a time?
first, use clap
otherwise, just .next instead of for
Command Line Argument Parser for Rust
hi
for is syntax sugar around IntoIterator::into_iter, Iterator::next and while
by using .next you can also get rid of .skip
(just .next once and ignore the result)
waiting for AI to solve this (without just reading the solutions lmao)
https://parrrate.github.io/exercises/
tbf if it ever gets trained on solutions from there, not bad
oh, and if you ever want -flag syntax instead of -f or --flag, it's not going to work
this is all rust
worse
it's typesystem-heavy Rust
almost Haskell-level madness
but with lifetime pain
whyyy
over half of exercises there come from actual practical code
@spare galleon just a sound I think
@cedar mason it borrows some parts from bash
and Windows Powershell comes with some stuff to be more faimilar to bash users
like ls
Error code: PR_END_OF_FILE_ERROR
The PR_END_OF_FILE_ERROR is an error code encountered in Mozilla Firefox (and other browsers based on Mozilla code) which typically indicates an issue with the SSL/TLS connection. This means the browser was unable to establish a secure connection to the website, and it prematurely ended the handshake process. Here are some common causes and solutions:
Common Causes
-
Server-Side Issues:
- The server you are trying to connect to might be misconfigured or experiencing issues.
- The server might not support the required SSL/TLS versions or ciphers.
-
Client-Side Issues:
- Corrupted browser profile or cache.
- Incorrect browser or system settings.
- Problems with the installed security software (antivirus, firewall).
-
Network Issues:
- Network misconfiguration.
- Interference by proxies or network filtering software.
Solutions
1. Check the Website
- Make sure the website is online and properly configured. You can try accessing it from another browser or device.
2. Clear Browser Cache
- In Firefox, go to
Options(orPreferences) >Privacy & Security>Cookies and Site Data>Clear Data.
3. Disable Extensions
- Disable any browser extensions, especially those related to security, privacy, or VPNs, to see if they are causing the issue.
4. Refresh Firefox
- This can fix many issues by restoring Firefox to its default state while saving essential information like bookmarks and passwords. Go to
Help>More Troubleshooting Information>Refresh Firefox.
5. Check SSL/TLS Settings
- Ensure that SSL and TLS are enabled. Go to
about:configin the address bar, search forsecurity.tls.version.minandsecurity.tls.version.max, and ensure they are set to the appropriate values (1 for SSL 3.0, 3 for TLS 1.2, and 4 for TLS 1.3).
6. Update Firefox
- Make sure you
you are using the latest version of Firefox.
7. Check Security Software
Temporarily disable your antivirus or firewall to see if they are interfering with the connection. Some security software intercepts HTTPS connections, which can cause this error.
8. Check System Date and Time
Ensure your computer's date and time are set correctly. Incorrect date and time settings can cause SSL/TLS handshake failures.
9. Reset Network Settings
Reset your network settings or try using a different network.
10. Test with Another Browser
Test the website with another browser to determine if the issue is specific to Firefox.
If none of these solutions work, you may need to provide more details about the context in which you are encountering the error for further troubleshooting.
(this was contextualised in VC as ChatGPT response, if anyone else is re-reading this afterwards)
((mostly saying that for mods so that it's clear it's not rule 10))
yes, now just have to restart
you can post chatgpt responses if you label them as such
you said it's ChatGPT in VC so it's fine
lol ik
Powershell nowadays is the main way to do command line stuff on Windows
it's also supported on Linux (e.g. Ubuntu Server suggests to install it)
I'm planning to move off Ubuntu eventually
(idk if I want to stay on Debian-based distro even)
I might even end up using Alt Linux lmao
if software you're working on doesn't directly involve visual stuff, you can use a remote Linux machine for that
or wsl
that's how I develop almost anything nowadays
line 25 missing style comma
@verbal zenith is RR not showing formatting issues or is it just busy arguing about errors?
Rust Rover
(rustfmt says there should be a comma)
you can configure it
@verbal zenith the programming language you make is compiled or interpreted ?
I really need strict formatting just because of how giant the project is
(those are lines)
oh, wait, not those vertical tabs
I thought about the character lol
@cedar mason I use it when I need light theme because for whatever reason I don't have it configured to dark theme
somehow
so, basically, "I use it accidentally"
oh and also second browser that doesn't take ages to start up like firefox when it detects an update
(on default settings)
I'm sure firefox supports installing update during runtime
but I can't be bothered searching for the option
Brave is cringe
I'd just rather not touch that
wats wrong with Brave?
monetarily cringe, including how they block ads
Nothing it's aùazing
well i use ff as my main..
brave is just there as a chrome alt for web testing
can someone help me set up visudal studio code im new to coding and need to use python for my internship, I just joined the server so i cant speak in VC
chromium and node use the same js engine,
therefore another reason: people want js to run the same way there and there
sorry i use vim
are you following this tutorial?
https://code.visualstudio.com/docs/languages/python
also there is no setting up in vs code.. everything is ootb
whats ootb
out of the box
okay
oh no i havent
thakn you
for very later, "magic spell" to fix venv sometimes: ctrl+shift+p select interpreter
(VSC doesn't auto-activate venv as eagerly as it should)
((even when it itself created it))
(((how)))
what is venv
activate the venv before calling vscode
if you don't have a venv, you don't need that thing yet
oh okay
doesn't work with remote
VSC has its own way of activating the venv
fun fact:
you can delete activate scripts and it'll still activate the venv
wait are you talking to me
im confused
!d venv
Added in version 3.3.
Source code: Lib/venv/
The venv module supports creating lightweight “virtual environments”, each with their own independent set of Python packages installed in their site directories. A virtual environment is created on top of an existing Python installation, known as the virtual environment’s “base” Python, and may optionally be isolated from the packages in the base environment, so only those explicitly installed in the virtual environment are available.
When used from within a virtual environment, common installation tools such as pip will install Python packages into a virtual environment without needing to be told to do so explicitly.
A virtual environment is (amongst other things):
no. parrrate
this is cursed but true
ohh
sadly there is no way to make it work this way without deleting scripts I think
bcoz it's present in its json settings until they are updated
probably some cache thing
no
it, by default, copies the activation command to terminal
but, if it doesn't find a script, it decides to update env variables when starting a terminal instead
idk what PyCharm does in that case
last time I tried to use PyCharm's terminal and python console it was too broken
@verbal zenith used for scoping of unsafe and other invariant-sensitive state also
same in C++ and everywhere
C++ Core Guidelines talk a lot about invariants
tbf that's kind of a "point this to someone if they do dumb stuff with the language" document so repetition is for the best and to be expected
@cedar mason closer to sealed class than just class
(as in what Rust structs are)
homebrew is in Ruby too I think
@vocal basin would it make sense to store a mutable reference to a vec so I can push all errors to it as I parse other files even?
Then store sources in some other mutable vec
other options:
impl FnMut(Error)
&mut dyn FnMut(Error)
&mut dyn Extend<Error>
&mut impl Extend<Error>
so its a dns spoofing
if you're not trying to make an iterator out of your parsing state
ngx is fun
|e| vec.push(e)
&mut |e| vec.push(e)
&mut vec
&mut vec
are you making it multi-threaded?
if you expect it, just use the first option
you can always replace Vec with a thread-okay queue
@cedar mason did you ever watch mr robot
@cedar mason double ratchet?
Based on an ultra-low-power STM32 MCU for daily exploration of access control systems and radio protocols. Open-source and customizable
I'm more interested in how to make my error system more versatile
(the rolling thing or whatever)
Can you think of an API if you will that would be nice to use? Should I use a struct that stores an ariadne report?
many report/tracing APIs have a "subscriber" trait where you can respond to references to events
and events themselves normally involve zero allocations to instantiate
(at least when they're repeated)
Yeah I don't understand how that would work, any guides that speak on that?
Source of the Rust file src/lib.rs.
(args field there is just a thing you can display)
Please don't link stuff like this here
Because while it's important to discuss security, we prefer broad stroke conversation rather than "here's a full implementation on browser pen testing"
ease of mal-use
We aren't the server for this kind of stuff
I'm not promoting anything with ill intend
I condem bad use
Hemlock you should know
I'm not claiming you are. However we don't want something that's so easily abuseable just linked here.
That's not really the issue, it's how easy it is for someone with said bad intent to hop in and click that link
You still need a basic understanding to set it up and do harm
This isn't a debate
I doubt any newbie will do anything bad
the issue is mostly links I believe
struct Error<'a> {
r#where: Where,
kind: ErrorKind<'a>,
details: Arguments<'a>,
}
Links and giving code examples or implementation details on how to do stuff like that
Sad but ok
Thank you
wait how do i create a virtual enviornmnt in vs
ctrl+shift+p create environment
i made a phython fial
did you do this?
"I'm more sad about how that project has four numbers in the version instead of three"
this one
life is an exam
spyder
spyder
first
inside VS code
how do i do that
ctrl+`
` is to the left of 1
normally
@limpid vale VSC is in that intermediate class of something that's either an editor or an IDE depending on how you use it;
same goes for Fleet and (less) Sublime
okay i did it
Would you recommend VScode for scientists?
what field
Engineering or chemistry
okay, I'm not cruel enough to ask why not just use matlab
VSC has Jupyter support, if that's something you're familiar with
JupyterLab is actually pretty good
"JupyterLab+JupyterHub is more than just a careless Python environment, it's also a careless administration environment"
it is quite powerful
that thing allows shell access
there is a jupyterhub?
Hadn't heard of that either
multi-user
Gotcha
like if you want to have ssh-like interface to your server but in web you just use that
but only shell itself
no port forwarding and other fun
because browser
zsh is the default terminal shell on the computer (macbook, I guess?)
similar to bash
oh okay
@cedar mason "you get to learn how to categorise stuff you don't care about, so you know how not to care about it better"
lmao
Minister of health
No I don't know what Juyper is
De neus - Maggie De Block - videoconferentie 07.04.2020
Er is een reuze keuze neuzen
in de kleuren rood en paars
de kwaliteit laat minder keuze
goede neuzen zijn zeer schaars.
Platte neuzen, pimpelneuzen
paars boegbeeld op een dronken schip,
een kleine keuze matineuzen,
't aardbeitype, mop en wip.
De neus, o erfdeel zo koen en schrander
edel ...
it's not surprising for people troubled with health issues to be more determined to fix healthcare for everyone
which chin is real?
isnt it the thing where u type code and the terminal runs right below the code
I thought something like that kind of existed
i had to use it for my course but idk how lowkey
But I suppose VsCODE being more versitile is nice
yeah thats why im tryna learn it
i only took intro to comp sci
im in HS
i used apache netbeans
Oh ok, well I just finished HS. I'm considering going for engineering or chemistry
me too
nice
coding is the one thing im bad it
but im supposed to use multi agent AI crews to support market research for this internship
I'm pretty ok in my opinion
where u studying at
since Java IDE got mentioned, I'm obliged to remind everyone that Eclipse is newer than IntelliJ IDEA
Sweden
Cool
" fortunately it's 'Texas, US', not 'Texas, Belarus' "
there is some meme about Texas and Belarus being connected, I don't even remember where it came from
i neber heard it
i just know
that ppl think texas is like
the most obnoxious place ever
(need to research; brb)
i know this one
so my course says i need these things but idk what any of this is
so how do i do it
on VS code
ewwwww use dark mode instead of light mode, my eyes ahhhhhhhhhhh
jupyter regular or jupyterlab?
idk
2
is there a theme config in this thing?
is better
that is just jupyter lab
i want to follow along but on VS code
you can export the .ipynb and open it in VSC
where?
what is the url of this site?
this
* just jupyter (no lab)
how do i open it
so it's embedded, right?
inside jupyter: file > save as/export (or something similar, I don't remember)
hmm
when clicking "download as"?
nope
I guess they're preventing it then
that cannot be
you can always save to disk
yeah, now you can move the file to whatever directory you have opened in VSC
whats a directoryh
what is in your browser cannot be prevented from being saved to disk.. always
...
folder
does it fold clothes?
.
just without the "create" step
https://marketplace.visualstudio.com/items?itemName=ms-toolsai.jupyter
(whether or not it works, I'm not sure)
it also needs jupyter installed in venv
pip install jupyter
(in the terminal inside VSC where it shows (.venv))
okay
i did hta
i mean it just popped up and i clicked install
when i run this second line it errors
saying no module named autogen
pip install autogen
how do you do that
in the terminal (bottom)
in this
pip install autogen
woah
okay i did it and a bunch of shit like
appeared
i think it worked
wait so what is pip installing
i cna just say that
and it will isntall whatever
or what
this means there is no function by that name in that module
oh
could be a version issue 
some function was previously there and now is not
i'd check with the online version what packages they are using
there is a way to pip freeze the modules into a requirements.txt
these are the files in this directory
trying to rem if there is a way to dl requirements.txt from a jupyter notebook
okay
try %pip freeze > requirements.txt in one of the cells inside the online jupyter lab that is in the browser
see if it creates a new file
insert new cell
don't worry about it rn.. see if it created a new file in the files directory
not in the terminal.. you can paste this into a file named requirements.txt .. or you can dl the file
once i download it thenwhat
oh autogen is a microsoft package not a pypi one
it was pip install pyautogen not autogen
so i just type that into terminal
type pip uninstall autogen and then pip install pyautogen
the code should run the autogen part now .. it might give an error at openai package or dotenv package now
you have to ask a mod @idle epoch
did you uninstall autogen and install pyautogen?
okay
yes
when i join vc it just rtc connections
it should work according to its docs
yeah
idk
what if i dont use juypter
do i rlly need it
for this course
cojuld i just follow along with python
if you know how to directly write a .py file instead of a .ipynb file then you don't need jupyter . you can directly write the script in python
i mean idk anything tbh
but like i thought juypter was a platform just for running ur program
and seeing the results beneath it
when i could just get the results in terminal
jupyter is only there to allow code to be run in separate cells.... you can copy past the code in python and run it all at once
but if it is not working in jupyter notebook it won't work in python
the issue is the missing packages
maybe removing juypter is gonna taek away some unnecessary complications
yeah
its the autogen problem
dl the requirements.txt file to your disk in the folder where your ipynb file is
my best guess it that you did not install to the virtual environment.. otherwise the package should have been picked up by the interpreter
Is it not possible to stream without a mod in the channel?
i dont think so
wow
i did that
but its just a .txt file
pip install -r requirements.txt iirc
how to do that
okay
I've just closed VSC and it freed up something like 30GB of memory (client side + server side)
I think this is a record for me so far
oh wait its zsh so it is pip uninstall autogen pyautogen && pip install -r requirements.txt... either way it should work
sounds like a memory leak
where did you save the requirements.txt
- yes, it is
- also it's bad at reclaiming and reducing caches
it has a diff filename.. rename it to requirements.txt
mv "requirements (1)".txt requirements.txt
i renamed it
pip uninstall autogen pyautogen && pip install -r requirements.txt
it doesn't clean cache.. i have to manually clean it
i dont know what that is.. i never had a requirements.txt that complicated...
try pip install pyautogen again
okay
uh
yeah idk
You can totally share a before and after iamge of the table
and we can see the results you are describing
What I use to learn (the BEST IT training): https://ntck.co/itprotv (30% off FOREVER) *affiliate link
🔎🔎FREE Python Lab: https://ntck.co/pyep1
Support the course: https://ntck.co/pythonrightnow
🔥🔥Join the NetworkChuck membership: https://ntck.co/Premium
**Sponsored by ITProTV
SUPPORT NETWORKCHUCK
---------------------------------------...
@idle epoch !paste
!paste
If your code is too long to fit in a codeblock in Discord, you can paste your code here:
https://paste.pythondiscord.com/
After pasting your code, save it by clicking the Paste! button in the bottom left, or by pressing CTRL + S. After doing that, you will be navigated to the new paste's page. Copy the URL and post it here so others can see it.
!code
@whole bear
Soc Analyst
I would prefer if you not share my personal information with others 🙂
officially
it is mine to sahre
@whole bear
I just dragged out my discord 😭
Function for determining the closest color
def closest_color(rgb, colors_rgb):
r, g, b = rgb
color_diffs = []
for color in colors_rgb:
cr, cg, cb = color
color_diff = sqrt((r - cr) ** 2 + (g - cg) ** 2 + (b - cb) ** 2)
color_diffs.append((color_diff, color))
return min(color_diffs)[1]
@dawn cliff👋
Mount Kosciuszko ( KOZ-ee-USS-koh; Ngarigo: Kunama Namadgi) is mainland Australia's tallest mountain, at 2,228 metres (7,310 ft) above sea level. It is located on the Main Range of the Snowy Mountains in Kosciuszko National Park, part of the Australian Alps National Parks and Reserves, in New South Wales, Australia, and is located west of Cracke...
@calm bay👋
You should ask it
Yes, I rather suspect that's about to happen.
id like to screen share and talk twhe they leave my room
and screen sharing you'd wanna talk to the mods, though they're not always available to enable a session
nvm i just joined like 2 mins ago. ill have to be here for 3 days
You can always ask
ill ask by typing
share screenshots here
when i saw this on a lecture on python, i was wonder if i could do the same of using "str" function. I tried it my self and it surprisingly worked (second sc).
now im trying to find a way i can add x + y but i want to put the word "and" so the output can be oldest child's name **and ** youngest childs name when i use print(x+y)
i tried print(x + "and" y)
didnt work
str around input is unnecessary
print(f"{name_1} and {name_2}")
thanks, i knew i could do that but i was trying to see if i could do that but using "+" function
i guess it doesnt work like that
name_1 + " and " + name_2
only after getting extremely sleep deprived did I make the realisation that Python's print(f is visually reminiscent of C's printf
thanks tho!
from PIL import Image
from scipy.spatial import KDTree
import numpy as np
def apply_palette_to_image(palette, image):
arr = np.array(image)
kdt = KDTree(palette)
idx = kdt.query(arr)[1]
return Image.fromarray(palette[idx])
image = Image.open(...)
palette = np.array([(0,0,0), (127, 127, 127), (255, 255, 255)]).astype(np.uint8)
result = apply_palette_to_image(palette, image)
result.show()```
oh, i see it now. It can still work with out it
in wht cases would using that work?
input always returns a string type
Is this an improved version of mine? 🙂
Some thoughts on the matter.
What exactly did you change? 🙂
Made something that can be applied to the whole image at once, vs per pixel.
Okay, thanks! Unfortunately I still have the same problem as before...
Are you familiar with such color algorithms?
The closest colour not really being what you want?
You want to determine what the closest is by giving priority or greater weighting to some other criterion?
I have the feeling that the function that searches for the closest color from the excel list does not quite work... there are actually colors in the list that would match the skin tone much better...
Especially in this area
It's much too dark and too "reddish"
Preprocess the image?
I'm not sure. Maybe playing around with the contrast.
Eliminate those colours from the palette, maybe.
Anything that's too close to a specified colour.
Yes, but I also want to turn other pictures into mosaics... so I thought the more colors the better...
is this where i get help with python?
I asked for help before but I can't find the chanel anymore
Someone pinch me bruh
I got my dream job
FUCK YEAH
I'm gonna sleep now
But god damn
what a f$cking day
congrats! 🎉
The guy i spoke to senserly restored my faith in humanity
I'm so amazed that maybe the world is not as dark this guy gave me actual hopes
Like
I'm still processing
How life changing
It was
Like i'm speechless
Aye cya guys ❤️
Finally my absolute sweat pain and tears paid off
Faith in humany from 0% to at least 10%
Only took me 8 years of hell
😄
Thanks
The world is dark, you just found a bright torch.
Y'all's interview process is crazy fast. Here in the states they keep us guessing for weeks with either a follow up interview or just ghost.
Great gif too, fun movie
The world is rotting because of the people in power.
But i have learned that it's not all lost at the end.
There are people out there that are doing everything to make it better and i just met someone like that
they should be praised
Ironacally the only "heroes" we praise are criminals
killers get flashy names and docus with attention
Meanwhile the actual heroes get not enough credit
Believe me i thought (almost) i was never gonna find someone who actually has a positive and revolutionary mindset
If you told me yesterday i would call you crazy
All will be lost in the end, for humanity at least, the world will go on, humans living on it? Not if the summers start hitting 150 instead of 120.
At least we can try to save the world and make it a better place.
But as long as their is a world goverment that is just one big mafia we can only fight for a better future
And hope someone will put a bullet inside of every corrupt leader. a bullet is too peaceful & humane as a punishment for destroying the planet but ok.
If you give them the real deserving punishment like 20 years of pure agony & torture, then we are no different than these evil crapbags.
Until then
Let's pray
Amen
And goodnight 😄
what is it enums in python?
thanks
@wise loom the haters
Hi
when i click on this function why does it lead me to the none variable?
@calm snow any idea
I got this error after running the program for a few minutes. I cannot run the program again.
!rule 5 seems like windows or whatever else is doing its job correctly
5. Do not provide or request help on projects that may violate terms of service, or that may be deemed inappropriate, malicious, or illegal.
welcome opal 😄
sort of exposing scammers ..
ah
i used to watch those all the time
i remember doing the anydesk reverse control lol
drop a exe file take control of their system
good stuff
or a simple rubber ducky reversal
one death is a tragedy, one million deaths is a statistic - J. Stalin
thats a genocide....
not always, genocide is targeting a specific group
COVID wasn't genocide
COVID was disease
in the situation of stalin
genocide
in the case of covid
disease
@primal shadow join vc
😂 ... i always buy the warm clothes from the country i go to..
i figure they are more suited to their winter
don't buy from UP and expect it to be nice and warm like a lined jacket
38C is painful enough
I think the thought is lost
but also one million tragedies
just not all for the same person
tell that to stalin
we drink only vodka in my country
okay i must make break fast watch mr robot
im so close to finishing the show
try a nice margarita
☕
oooooh
do red bull and vodka
put your brain on wired mode
its the best duo
and add ice to this
XDDDDD guys where did you lernt polish bad words?
:3
doesnt meta do that
That shit is dangerous my dude
what?
i did this soo many times
i will do that someday
and im still alive
i want vodka and redbull
pound out 40 leetcode questions like i did once
super fun
I prefer not drinking and driving instead
I would not do grapefruit
its depends from your preferences
sure why not