#voice-chat-text-0
1 messages ยท Page 285 of 1
thanks. checking out the src for it rn.. looks like merge sort?
@rugged root
!server
huh
@next tapir #web-development
Expand Critical and see what it says
Thinking
@rugged root
wtf thats what happened to me yesterday but not that bad
That just means that it crashed, that's not the issue
That's for every crash
eyyy its javascript
2 warnings?
3
4
idk im just showing u loads of stuff at this point
this is for critical
Sorry, my attention is split right now, sorry
its alr
!pep 582
@rugged root https://youtu.be/H7ND17Zf68s
Provided to YouTube by Arista
Working in the Coal Mine ยท Lee Dorsey
The New Lee Dorsey
โ Originally released 1966. All rights reserved by RCA Records, a division of Sony Music Entertainment
Released on: 2000-11-28
Composer, Lyricist: Allen Toussaint
Auto-generated by YouTube.
Okay sorry, on that main screen, right click the Error category and select View All Instances
Mmmm.... Red Bull....
#include <type_traits>
constexpr int someFunction()
{
if (std::is_constant_evaluated())
return someConstexprFcn();
else
return someNonConstexprFcn();
}
or
constexpr int someFunction(bool b)
{
if (b)
return someConstexprFcn();
else
return someNonConstexprFcn();
}
@next tapir you mentioned you were working in C++... i'm trying to learn it.. quick question: which one of these code implementation is usually preferred (the book gave me both but i don't know which one is preferable)?
First one feels more explicit at least
i grew up with floppies
Kings Quest floppies!!
@summer swift๐
PyCharm's LSP is very sensitive to how modules are structured
I haven't tested that for PyRight
* re-exports destroy PyCharm's performance
len requiring Sized is very much proper warning
do not suppress that
Stubs issue in qiskit:
https://github.com/Qiskit/qiskit/issues/6905
https://github.com/Qiskit/qiskit/issues/9530
yes it's amazing!
music band, who I help, played a lot with it by shoving their own texts into it
annotations changes the order of evaluation
so it might break something
if I understand correctly
@molten pewter
there might be a shortcut
there is a button
"The Benefit" of trucks is relaxed ecology regulations
ctrl+shift+a
and it's not on the ctrl+/ list I think
@next tapir Catch you later
Not that I can find
The 2024 Ford Maverickยฎ has 3 different trims, luxury features, and brand new technology. Decide between 2 different engines & a wide variety of customizable features to fit your style. Explore the possibilities and learn more about pricing.
I see. Yeah, I was considering suppressing the import untyped error.
I don't see having to generate stub files for all 3rd-party packages myself an immediate task.
I don't understand the error you mentioned though. Why isn't Iterable supported?
T: Sized => len(t)
T: Sequence => t[i]
T: MutableSequence => t[i] = x
the only thing that Iterable gives is __iter__
Ohh.
__iter__ returns Iterator
the only two methods that Iterator provides are __next__ and __iter__ (latter returns self)
Is Sized also an Iterable?
Like does it support __iter__.
Ok I see.
So I should just switch from Iterable to Sized?
!e
from typing import Sized, Iterable
print(issubclass(Sized, Iterable))
@vocal basin :white_check_mark: Your 3.12 eval job has completed with return code 0.
False
huh
huh
I guess not like this
HEHEHE
maybe not
I just don't want to specifically say List or NDArray.
I want both supported.
Hence the Iterable habit.
Sequence covers both and also supports indexing
!e
from typing import Collection, Sized, Iterable
print(issubclass(Collection, Iterable))
print(issubclass(Collection, Sized))
I remember there was a reason for going with Iterable when we discussed this a few months back.
@vocal basin :white_check_mark: Your 3.12 eval job has completed with return code 0.
001 | True
002 | True
Collection is Iterable+Sized+Container
!e
from typing import Sequence, Sized, Iterable
print(issubclass(Sequence, Iterable))
print(issubclass(Sequence, Sized))
@upper basin :white_check_mark: Your 3.12 eval job has completed with return code 0.
001 | True
002 | True
I have an impossible problem for you
Alisa, would it be wise to opt to use Collection all the time instead of Iterable?
Like whenever I want to support List and NDArray.
at times you'll need Sequence according to warnings
I'd suggest just following what the warning say
when it requires indexing => put Sequence
But isn't Sequence basically under Collections?
Like Collections is like Sequence with __contains__, no?
But then I'd end up using multiple types, which makes it harder to track.
Sequence: Reversible + Collection + __getitem__
Reversible: Iterable + __reversed__
Collection: Sized + Iterable + Container
Sized: __len__
Iterable: __iter__
Container: __contains__
!e
from collections.abc import Sequence
help(Sequence)
@vocal basin :white_check_mark: Your 3.12 eval job has completed with return code 0.
001 | Help on class Sequence in module collections.abc:
002 |
003 | class Sequence(Reversible, Collection)
004 | | All the operations on a read-only sequence.
005 | |
006 | | Concrete subclasses must override __new__ or __init__,
007 | | __getitem__, and __len__.
008 | |
009 | | Method resolution order:
010 | | Sequence
011 | | Reversible
... (truncated - too many lines)
Full output: https://paste.pythondiscord.com/CBU76JYPPICJOHFMJNWOYGJTSI
^ how to find that stuff without visiting docs
Alisa?
qoin\qrng.py:301: error: Value of type "Collection[Any]" is not indexable [index]
Sequence
Ok, lemme try that.
I don't understand, why does it pass for Sequence, but not for Collection?
They both support Iterable.
.
!e
from collections.abc import Collection
help(Collection)
@upper basin :white_check_mark: Your 3.12 eval job has completed with return code 0.
001 | Help on class Collection in module collections.abc:
002 |
003 | class Collection(Sized, Iterable, Container)
004 | | Method resolution order:
005 | | Collection
006 | | Sized
007 | | Iterable
008 | | Container
009 | | builtins.object
010 | |
011 | | Class methods defined here:
... (truncated - too many lines)
Full output: https://paste.pythondiscord.com/N7P3ZXPINSF37YCKZ4LNX3AQYI
OHHH
Ok, so Collection and Sequence are actually not in different levels, one has __contains__, the other has __getitem__.
I think there is no thing that unifies Sequence[T] and Mapping[int, T]
because many of their methods would differ
PSF?
hmm
So MutableSequence it is?
for assigning
Yeah.
To also allow that on top of the other stuff.
!e
from collections.abc import MutableSequence
print(issubclass(list, MutableSequence))
@upper basin :white_check_mark: Your 3.12 eval job has completed with return code 0.
True
!e
from collections.abc import MutableSequence
from numpy.typing import NDArray
print(issubclass(NDArray, MutableSequence))
@upper basin :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 | print(issubclass(NDArray, MutableSequence))
004 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
005 | File "<frozen abc>", line 123, in __subclasscheck__
006 | TypeError: issubclass() arg 1 must be a class
Back in a jiffy
!e
from collections.abc import MutableSequence
from numpy import ndarray
print(issubclass(ndarray, MutableSequence))
@upper basin :white_check_mark: Your 3.12 eval job has completed with return code 0.
False
huh.
!e
from collections.abc import MutableSequence
from numpy import array
print(isinstance(array([0]), MutableSequence))
@vocal basin :white_check_mark: Your 3.12 eval job has completed with return code 0.
False
Ohh, so MutableSequence supports append, but ndarray doesn't.
Am I understanding correctly?
I am stupid, I know ndarray doesn't have append, but still I want to check HEHEHE.
Wait, so since append is different, wouldn't that cause problems down the line when you pass a ndarray?
Is there a common way between the two to append sth?
Ohh, unless I always would return either an ndarray or a list. Then I can just code that conversion in.
The gods of network connections is angry with me
And has been for a while
Wheeeeeeeee
you back@rugged root?
Here but still bouncing back and forth between work and here
Dealing with issues we're having with our phone systems at work
okay lmk when you have a sec
How will I be able to speak in the vc
@whole bear Shock collars
You still need to hit your message count. Just hang out, chat normally, check out other channels on the server, etc. You'll get there naturally
Oh okay thanks
No problem!
@upper basin Might just mean it's not updated server side or something. Don't worry about it, it'll fix itself
And if people are here in VC, typically they'll also be watching the text channel too so that no one gets left out of the conversation
Guys, would it be possible if you could have a look and let me know what you think of the package?
https://github.com/ACE07-Sev/Qoin/tree/main?tab=readme-ov-file
Hey guys, I need some advice, I have recently started learning computer vision, i know basic to intermediate python and learning, but how deep should i go in math(linear algebra)? any suggestions?
I have done the linear algebra course on machine learning by Luis Serrano on coursera...that enough?
homotopy ๐
ok thanks!
group theory err no, its really for research side innit
it does include lin alg, yes
groups are fun yeah
Yeah things like hypothesis testing and all those things are required if your thinking of doing research
uh Algebraic geometry and such includes gt
did u sleep?
Sorry, one of my bosses asked me a question. Yeah, I did sleep, but I've got a sinus infrection or something so I'm still bleh
Guinea pigs are potatoes
pookie and kitten @peak depot
"Dude, I JUST got it warm"
Standard silly overpriced gaming chair
I don't think I could use a chair without armrests
Just buy a bed and lie down, A.C.E approved advice.
It got stars...๐
Okay so you for sure have nothing on the external drive, right? Because we're going to reformat it
I'm terrified of giving him any advices after last time.
@golden delta Right click the external drive, and near the bottom is Format
Then you'll just select NTFS for the file system type
And just do the quick format
Yep
Then you'll be able to back up to it
One sec.
This is why we need the Thor hammer coming down to ban people.
Just kick them out of valhalla.
If people kept tripping there, would it be Fallhalla?
Yes.
isn't fast food an american thing? what is italian fast food?
Fast food means you don't have to wait a long time to get it
Like you can get it from a drive-thru window
As opposed to traditional places where you're seen to a table, sit down, spend an hour or so there, etc.
@civic ivy Sup
Eating food
stick it in a microwave n serve
Chicken Carbonara
To do what
On the street
Nah
so sexy
lichess 
Nah
Nice hockey
Quiet isn't always bad
?
Both?
I'll let you know after my headache subsides
I'm glad that Rust is making me think in a functional style again
It's very satisfying
@stuck furnace Yo
It's also reminding me that I'm over thinking a lot of this
Rust as in the game?
Programming language
Like doing a quick N factorial thing:
fn factorial(num: u64) {
let nums = 1..=num;
nums.fold(1, |acc, x| acc * x)
}
So nice and clean
Is factorial always absolute value?
Code me a bot that auto plays blackjack for me so i become a gazillionaire
@whole bear Yes?
Trying to troubleshoot our phone systems
And learning Rust
Oh pff
std::ops::Mul::mul
make the reader confused
fn factorial(num: u64) -> u64 {
(1..=num).fold(1, |acc, x| acc * x)
}
I'm the reader!
imo, std::ops stuff is underutilised
what is this .fold function?
reduce
That one
Reduce never made sense to me to describe this
I mean I guess it does reduce the number of values
!d functools.reduce
functools.reduce(function, iterable[, initializer])```
Apply *function* of two arguments cumulatively to the items of *iterable*, from left to right, so as to reduce the iterable to a single value. For example, `reduce(lambda x, y: x+y, [1, 2, 3, 4, 5])` calculates `((((1+2)+3)+4)+5)`. The left argument, *x*, is the accumulated value and the right argument, *y*, is the update value from the *iterable*. If the optional *initializer* is present, it is placed before the items of the iterable in the calculation, and serves as a default when the iterable is empty. If *initializer* is not given and *iterable* contains only one item, the first item is returned.
Roughly equivalent to:
three-argument form of this
I'm still getting used to the pipes for lambdas
two-argument form in Rust would be .reduce(...).unwrap()
Wait, what I did has only two arguments
implicit default 0 val for the init
!e
from functools import reduce
reduce("literally whatever", [])
@vocal basin :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 | reduce("literally whatever", [])
004 | TypeError: reduce() of empty iterable with no initial value
no implicit default
Rust's fold is three-argument just like its equivalent in Python
Ah, I get what you mean now
iter, init, func in Rust
func, iter, init in Python
Yeah the iter is implicit in this case since it's a method call
It's so nice
@acoustic mirage๐คจ
75
That's a lot
Why is your name close to mine?
then there's also itertools::Itertools
.... because they happen to have a similar name?
Hey Mindful ๐
Omg I thought you were a new person
There's almost 400k users on the server. Of course there are going to be other users with mayor in their name
Man, $10 whole dollars
That's wild
@stark river Whatcha up to
"For just 10 cents a day, you too can support a starving data scientist."
enjoying the weekend.. studying some C++.. watching some old episodes
you're supposed to put /s at the end so we know it's sarcasm
every time i hear the word dollar i think of that joke: what's the difference between a dollar and a pound? i don't dollar ur mum
Well played
GBlbs
That tracks
Tithing is a good way
@peak depot You're dead to me
Have fun
@peak depot Karma
Just sayin'
Yet
God iterator has so much
Now to deal with hashmaps
@wind warren Yo
only five of them are deprecated
so that leaves 111
@civic ivy You're a big boy, you can make your own bad decisions without our input
Yep
Rather not be a scape goat for stupid
where does the warning originate from?
Good....wby lol
what do ido
regardless of whether it's real, do not click
Nope I'm not good at itt anyways
only download drivers from the official site
visit the link instead of pressing Yes
manually type it
the popup might be illegitimate
select the videocard you have
idk what i have
i cant find it
what now?
first one (adrenalin) is the regular one
downloading
i got blue screen of death yesterday
it told me to save in my files thing
@civic ivy that's just someone's mic echoing, quite likely
what do i do once its downloaded
open the installer; most of the steps have okay settings by default, no extra config needed
during installation it will bug out a bit -- that's normal
it told me to press yes or no (make changes to device) blah blah blah
now what i do
it didn't provide any folder by default?
i accidentally removed it
like i was trying in discord
and it was highlited
so whatever it was in it changed to what i typed
just re-open it so it fills it correctly again
@upper basin does it support importing SVG?
Canva? I think so?
Do you have a svg file I can try?
it might also be from the stream
I love and hate you at the same time rn HEHEHE.
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.
Hello World!
import asyncio
async def main():
print('Hello ...')
await asyncio.sleep(1)
print('... World!')
asyncio.run(main())
```...
do you use threading now?
@frozen owl what queue are you using?
queue.Queue, right?
yeah
don't index into it
oh, wait
what was that [0]?
it's not on a queue
what is that .queue[0]
you shouldn't access .queue of Queue
that's collections.deque that's inside the Queue
!e
from queue import Queue
print(Queue().queue)
@vocal basin :white_check_mark: Your 3.12 eval job has completed with return code 0.
deque([])
don't access that
never
.queue attribute is not thread-safe
.put() and .get()
if don't want to consume it, put it back into the queue
on which condition do you not consume it?
do you care about the order?
@upper basin this svg was made in draw.io manually; maybe something like this can be imported
Gotcha! I'll try to add it in there. Thank you so much!
it might make sense to have a task per item
@wise loom as far as I saw, twisted is still used as runtime for some other stuff; and it still seems actively developed
and this is the draw.io shape source
https://paste.pythondiscord.com/I26Q
how did you create this link?
!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.
nice! sadly it's hard to find projects using it these days. not that it should be more used, maybe it has downsides idk.
Python has evolved a lot..
like a queue between each thread for communication?
there's a link there
yep its good
something like this
async def process_in(
in_: In,
) -> Out:
...
async def process_one(
in_: In,
out: asyncio.Queue[Out],
):
await out.put(await process_in(in_))
async def process_many(
in_: asyncio.Queue[In],
out: asyncio.Queue[Out],
):
async with asyncio.TaskGroup() as tg:
while True:
tg.create_task(process_one(await in_.get()))
after i connect to the server through ServerListenerThread, should I send it back directly to GUI or should i send it back through the LiaseThread
but im using threads not async
im not very good at async lol
put more state validation (runtime assertions) in the code, if you think there's a logic error
PySide is the official one
and, yes, that might cause issues too
(as in two different Qts might have integration problems)
make sure the error in the GUI is linked to a specific source error
Alisa can I send you the little gif I made with the logo?
I think you'll like it.
teehee
Oh no, I meant may I?
I can dm it.
you may
@frozen owl I though I saw Ok somewhere else but there you have ok
different casing
@golden delta as in returned/set, not checked
what?
(search globally)
I can't, says friends only hehe.
@frozen owl
where is "ok" response created?
log every event properly to track what actually happens
preferably in a file
!d logging
Source code: Lib/logging/__init__.py...
i want to generate a link for direction on google map i have longitude and latitude without api how can i
f"https://www.google.com/maps/search/?api=1&query={latitude},{longitude}"
I think
that's API that you need a key for
it require api i think
not a key
@frozen owl
make sure you show the exact error that happened
in the UI
if there is no error you can show => no error will be shown
use "showing the exact error cause in the UI" as the guiding mechanism for restructuring the code to fix the bug
@vocal basin i want to show you project i am working on
need some sugestion too should i dm you
your understanding of what happens in the program (event-wise) might be wrong or incomplete (or totally correct)
logging will help with analysing it
is it in Python? is it open-source?
yes django i am going to make it open -source
i want to submit it in college
as my finial year project
it's probably fine if it's open-source on something like GitHub then
i am still working on it
also GitHub issues should be okay -- because that's not code written for you by someone but just comments on the code/functionality
(and the project will appear more active)
yeah, logger should be defined module-level
probably
for ease of use
@next tapir
Python Community role?
so the bug is that it doesn't exclude
(from #voice-verification)
should i do screen share on my server
GitHub's guides themselves are relatively good, so just reading them should be enough
https://docs.github.com/en/get-started/start-your-journey/hello-world
ok i will upload it later on github
@golden delta you can make an alt for testing joining/leaving; they are allowed by discord, judging by the existence of "switch accounts" feature
yea
@ancient remnant verify program state as soon as possible, i.e. before putting the piece in the box
yeah, there needs to be a mod in the VC
(for Video)
yeah, there were enough previous instances of misuse that it got locked down
it can be given for longer
sometimes
temporary, then probation period, then permanent
?
I'm not joining more servers, for now
(a bit busy generally)
ok no problem
I prefer not being voice-verified
@frozen owl also log where you connect successfully and where you set the UI error
and all that causes that (within reason)
so it tries different ways and only one succeeds
and it reports only the failure
there are two login results in the log
error and ok
is the first error (auth by key) reported?
so it's just reporting that too early
just as it's not yet the time to report ok, it's not yet the time to report error
maybe it returns something
status or whatever
@whole bear what'sup
@spare siren๐
chess match?
Send link
can we play on activity ?
What is that?
we can share activity in vc
yep it needs permission i think
No Dms
i share link
Send it here
sup?
How you doin?
I challenge you haha
@whole bear
@vocal basin you wanna play?
Join the challenge or watch the game here.
chess.com? if its possible
can't; regional restrictions
ok
do you have vpn lol
chess.com is behind cloudflare which prevents proxies/vpns/tor
Karjakin got banned there
and then retaliation happened
I don't think printing will consume it
@frozen owl why do you have that huge dock at the bottom taking screen real estate? just hide it. 
defaults write com.apple.dock autohide-time-modifier -float 0.15; killall Dock
@whole bear yeah, waht's up?
same old, same old! wake up, pretend not to be an introvert, sleep, and repeat.
what about you?
Eh
Sent a challenge
yo
it might be possible for me to play on chess.com but only from a phone
quite common for mobile apps to have built-in mirrors
@frozen owl whatever you're doing with locks, it's probably better to use with lock:
with instead of acquire
where lol
gg
@vocal basin https://play.typeracer.com?rt=2qxytqrkxa
touchtyping?
@wind raptor hello
good and you
how's your college going on
cool
nice
working on project
garbage reporting system
making tweet to goverment to clean the garbage
i need tweeter dev acc which provide 1500 free tweets per m
yes
can we share activity in vc
like we can play game bobble league
ok
yes
does we need permission for it?
ok
yes
website is half done
don't have much idea how to create bot
have to work on frontend
i want to create a google direction link using longitude and latitude
without api
any idea?
like i think coz it will be a static link
yes
Can I ask smthg here related to sql
c.commit() is for saving all the stuff? or it has smthg else to do ?
commit() will save your database changes.
That's the only major thing right? Aight thankyou
There are certain things that save automatically and certain things that don't
*> <*
Oracle SQL?
SQL?
like python connectivity SQL?
SQLite?
I use idle
The one built into Python is SQLite
Oh okay yea ig๐ซ
So close() doesn't save changes but just closes it right
yooooo
close will close your cursor or database connection depending on what you close
Alright thank you!
Whitespace = String(" ") | String("\n") | String("\t")
Whitespaces = Join @ Many(Whitespace)
Digit = CharSatisfy(str.isdigit)
Integer = int % ( Join @ (Optional(String("-") | String("+"))
+ Some(Digit)
+ ~Whitespaces) )
Float = (Optional(Char("+") | Char("-")) +
(
( Optional(Some(Digit)) + Char(".") + Some(Digit) ) |
( Some(Digit) + Optional(Char(".") + Many(Digit)) )
) +
Optional(Char("e") + Some(Digit)) +
~Whitespaces
) @ Join % float
Anytime ๐
jsString = "".join @ (~Char('"') + ManyUntil(jsEscChr | AnyChar, ~Char('"')))
jsArray = list @ forward(lambda:
Between("[", "]", SepBy(jsVal, ~Terminal(",")))
)
jsObject = dict @ forward(lambda:
Between("{", "}", SepBy(Tuple @ (jsString + ~Terminal(":") + jsVal),
~Terminal(",")
))
)
jsVal = jsNumber | jsString | jsObject | jsArray | jsTrue | jsFalse | jsNull
jsonP = ~Whitespaces + jsObject + ~Whitespaces
use pom::Parser;
use pom::parser::*;
#[derive(Debug)]
enum Expr {
Ident(String),
Expr(Vec<Expr>),
}
fn space() -> Parser<u8, ()> {
one_of(b" \t\r\n").repeat(0..).discard()
}
fn expr() -> Parser<u8, Vec<Expr>> {
let element = list(call(value), space());
sym(b'(') * space() * element - sym(b')')
}
fn ident() -> Parser<u8, String> {
none_of(b"()[]{} ").convert(|x| String::from_utf8(vec![x]))
}
fn value() -> Parser<u8, Expr> {
(ident().map(Expr::Ident) | expr().map(Expr::Expr)) - space()
}
fn main() {
let src = b"(a (b c))";
println!("{:?}", src);
let parser = value();
println!("{:?}", parser.parse(src));
}
hi
@solid trail ๐
Nevermind . ๐
Ikr, just not active enough out there ๐
Ofc
What are you wanting to talk about ?
Texts seem weird but we'll take it
oh
One day I will talk I promise lmaoo
And I"d like to answer to them depending on mood lol
Ofc irony
Ttspeech is more annoying than useful fr
Ahahah let's put some schedules on the said bot
Texting >>
Yup it has to be on DIscord
Well could've been nice to have a mic allowed
So
Have a good night
Ofc and completely understandable ๐
See you ๐
Better be quite than having trolls every 10mins ofc
++
@hoary sandal ๐
hi
KeyError Traceback (most recent call last)
File ~\anaconda3\Lib\site-packages\pandas\core\indexes\base.py:3653, in Index.get_loc(self, key)
3652 try:
-> 3653 return self._engine.get_loc(casted_key)
3654 except KeyError as err:
File ~\anaconda3\Lib\site-packages\pandas\_libs\index.pyx:147, in pandas._libs.index.IndexEngine.get_loc()
File ~\anaconda3\Lib\site-packages\pandas\_libs\index.pyx:176, in pandas._libs.index.IndexEngine.get_loc()
File pandas\_libs\hashtable_class_helper.pxi:7080, in pandas._libs.hashtable.PyObjectHashTable.get_item()
File pandas\_libs\hashtable_class_helper.pxi:7088, in pandas._libs.hashtable.PyObjectHashTable.get_item()
KeyError: 'Volume'
The above exception was the direct cause of the following exception:
KeyError Traceback (most recent call last)
Cell In[35], line 1
----> 1 rearranged_data['Dollar_Trade_Volume'] = rearranged_data['Close'] * rearranged_data['Volume']
File ~\anaconda3\Lib\site-packages\pandas\core\frame.py:3761, in DataFrame.__getitem__(self, key)
3759 if self.columns.nlevels > 1:
3760 return self._getitem_multilevel(key)
-> 3761 indexer = self.columns.get_loc(key)
3762 if is_integer(indexer):
3763 indexer = [indexer]
File ~\anaconda3\Lib\site-packages\pandas\core\indexes\base.py:3655, in Index.get_loc(self, key)
3653 return self._engine.get_loc(casted_key)
3654 except KeyError as err:
-> 3655 raise KeyError(key) from err
3656 except TypeError:
3657 # If we have a listlike key, _check_indexing_error will raise
3658 # InvalidIndexError. Otherwise we fall through and re-raise
3659 # the TypeError.
3660 self._check_indexing_error(key)
KeyError: 'Volume'
@stone apex ๐
Those kinds of systems https://en.wikipedia.org/wiki/Methane_clathrate
Methane clathrate (CH4ยท5.75H2O) or (4CH4ยท23H2O), also called methane hydrate, hydromethane, methane ice, fire ice, natural gas hydrate, or gas hydrate, is a solid clathrate compound (more specifically, a clathrate hydrate) in which a large amount of methane is trapped within a crystal structure of water, forming a solid similar to ice. Originall...
@jade mountain ๐
yo
@oak walrus ๐
hello
oh hi
@spare talon ๐
Hello
Hey
hey
yes
hi
5. Do not provide or request help on projects that may violate terms of service, or that may be deemed inappropriate, malicious, or illegal.
I forgot that I'm even in this VC
I am practicing
nice
dude i really want an amd gpu
dang
@rugged root good morning
you could try to convert it into an .exe file
Hello
Better get grindin'
im just wondering
i want to generate a list [1,2,2,2,2,2,1] by using the np.ones
i remember seing it somewhere but i forgot
in general curious as to how i could create patterns in lists
Generators?
!e
import numpy as np
arr = np.zeros(7)
arr[:-1] += np.ones(6)
arr[1:] += np.ones(6)
print(arr)
@vocal basin :white_check_mark: Your 3.12 eval job has completed with return code 0.
[1. 2. 2. 2. 2. 2. 1.]
this?
tbf it's faster to just += 1
!e
import numpy as np
arr = np.zeros(7)
arr[:-1] += 1
arr[1:] += 1
print(arr)
@vocal basin :white_check_mark: Your 3.12 eval job has completed with return code 0.
[1. 2. 2. 2. 2. 2. 1.]
or pre-fill with 2, then change arr[0] and arr[-1]
thanks
@vocal basin hi
Error while reading CSS rules from https://cdn.jsdelivr.net/npm/leaflet@1.6.0/dist/leaflet.css SecurityError: Failed to read the 'cssRules' property from 'CSSStyleSheet': Cannot access rules
127.0.0.1/:1 Access to resource at 'https://b.tile.openstreetmap.org/15/23036/14606.png' from origin 'http://127.0.0.1:1111' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
14606.png:1
GET https://b.tile.openstreetmap.org/15/23036/14606.png net::ERR_FAILED 418 (I'm a teapot)
it's complaining that the resources are hosted somewhere else instead of on 127.0.0.1:1111 itself
two ways to fix it:
configure cors policy
use your server as a proxy
i stuck here like trying to slove from 3-4 hrs
where does the map URL come from? (in the code)
nope
crossorigin="anonymous"
<link crossorigin="anonymous" ...> <!-- for css -->
<img crossorigin="anonymous" ...> <!-- for png -->
ok i try
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/leaflet@1.6.0/dist/leaflet.css" crossorigin="anonymous">
but png are in coming from cdn
@wind raptor hi
do you put images in the <img> tag?
nope
<canvas>?
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.
there is a way to have cross-origin images in canvas, but I don't understand it
https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image
also this if you're not too worried about security yet
https://github.com/adamchainz/django-cors-headers
line 287 -- don't send that publicly
yes
(that includes not sending it to the browser)
that's why i just want to show you
i want to caputer ss of that map and have to save it to folder
n Leaflet, L.tileLayer is used to create a layer that loads and displays map tiles from a tile server. These map tiles are small square images that, when assembled together, create the map you see on the screen. The L.tileLayer function takes a URL template for the tile images and options to customize the appearance and behavior of the layer.
have you tried this?
nope
it's a way to partially disable the default security mechanisms the browser has;
so that it takes whatever content your site has to be as trustworthy as the site itself
(if you don't want to do proxying)
ok i try
External Server: OpenStreetMap tiles reside on a separate server (tile.openstreetmap.org). django-cors-headers only affects headers sent by your Django server, not by other external servers.
The Core Problem: The CORS restriction occurs because your web page (originating from your development server like http://127.0.0.1:1111) attempts to load map tiles directly from a different domain
is it an actual error message or GPT explanation?
can hemlock gives permission to do screen share
gpt
it seems to be wrong
though only partially
that resource may indeed send headers against embedding
ok then i follow the documation
if it fails even with completely relaxes CORS => then you'll need proxying
either through django itself or through something in front of it like nginx
does i need to this also?
I don't know how to configure djanjo-cors-headers (never used it before)
there screen share is avaible
I probably won't be able to help anyway, since I have zero experience properly setting up CORS
gaussian summation only works when starting from 1? ๐ค
(n)(n+1)/2 or complex thing?
(n)(n+1)/2 being sum of [0,n] works for all non-negative integers
as for Gaussian sum (complex thing involving roots of unity) -- idk
there are reformulation for alternative starting positions, which can be derived from the base case
( and for negative: sum of (n,0) )
pls keep ping on for replying...
gaussian summation for range 3..10?
the formula needs to start from i=1
!e
def gauss_sum(n):
return n * (n + 1) // 2
def gauss_sum_range(a, b):
return gauss_sum(b) - gauss_sum(a - 1)
print(gauss_sum_range(3, 10))
print(sum(range(3,11)))
@vocal basin :white_check_mark: Your 3.12 eval job has completed with return code 0.
001 | 52
002 | 52
Sup
Yes I am
Yes I entered one VC that you were in one time
I think it was today
Today at 7 AM
@somber heath hello
Sure
!e
def gauss_sum(n):
return n * (n + 1) // 2
def gauss_sum_range(a, b):
return gauss_sum(b) - gauss_sum(a - 1)
print(gauss_sum_range(4,10))
print(sum(range(4,11)))
@stark river :white_check_mark: Your 3.12 eval job has completed with return code 0.
001 | 49
002 | 49
!e
print(6**6**6)
@somber heath joining?
how
How what?
@somber heath where R U from?
ok now i get it
for -ve, just multiply by -1?
!e
def gauss_sum(n):
return n * (n + 1) // 2
print(gauss_sum(-5))
print(sum(range(-1, -5, -1))) # sum of x: n < x < 0
@vocal basin :white_check_mark: Your 3.12 eval job has completed with return code 0.
001 | 10
002 | -10
huh
yeah, inverse
idk if there's a way to formulate the rule concisely and universally for both negative and positive
except for the inductive form
gauss_sum(0) = 0
gauss_sum(n + 1) = gauss_sum(n) + n + 1
@tidal mirage ๐
!e ```py
import copy
import math
import numpy as np
x_train = np.array([1, 2, 3, 4, 5], dtype=np.float64)
y_train = np.array([300, 500, 700, 900, 1100], dtype=np.float64)
def compute_cost(x, y, w, b):
m = x.shape[0]
cost = 0
for i in range(m):
f_wb = w * x[i] + b
cost = cost + (f_wb - y[i]) ** 2
total_cost = 1 / (2 * m) * cost
return total_cost
def compute_gradient(x, y, w, b):
m = x.shape[0]
dj_dw = 0
dj_db = 0
for i in range(m):
f_wb = w * x[i] + b
dj_dw_i = (f_wb - y[i]) * x[i]
dj_db_i = f_wb - y[i]
dj_dw += dj_dw_i
dj_db += dj_db_i
dj_dw = dj_dw / m
dj_db = dj_db / m
return dj_dw, dj_db
def gradient_descent(x, y, w_in, b_in, alpha, num_iters, cost_function, gradient_func):
w = copy.deepcopy(w_in)
# history of cost function and parameters at each epoch
J_history = []
p_history = []
w = w_in
b = b_in
for i in range(num_iters):
dj_dw, dj_db = gradient_func(x, y, w, b)
# update weights and biases
w = w - alpha * dj_dw
b = b - alpha * dj_db
if i < 100000:
J_history.append(cost_function(x, y, w, b))
p_history.append([w, b])
if i % math.ceil(num_iters / 10) == 0:
print(
f"Iteration {i:4}: Cost: {J_history[-1]:.3e}",
f"dj_dw: {dj_dw:.3e} dj_db: {dj_db:.3e}",
f"w: {w:.3e} b: {b:.3e}",
)
return w, b, J_history, p_history
w_init = 0
b_init = 0
epochs = 10000
temp_alpha = 1e-2
run gradient descent
w_final, b_final, J_hist, param_hist = gradient_descent(
x_train, y_train, w_init, b_init, temp_alpha, epochs, compute_cost, compute_gradient
)
print(f"(w, b) found by gradient descent: ({w_final:8.4e}, {b_final:8.4e})")
@fast sparrow :white_check_mark: Your 3.12 eval job has completed with return code 0.
001 | Iteration 0: Cost: 2.216e+05 dj_dw: -2.500e+03 dj_db: -7.000e+02 w: 2.500e+01 b: 7.000e+00
002 | Iteration 1000: Cost: 5.279e+00 dj_dw: 3.572e-01 dj_db: -1.290e+00 w: 2.021e+02 b: 9.238e+01
003 | Iteration 2000: Cost: 1.791e-01 dj_dw: 6.579e-02 dj_db: -2.375e-01 w: 2.004e+02 b: 9.860e+01
004 | Iteration 3000: Cost: 6.073e-03 dj_dw: 1.212e-02 dj_db: -4.374e-02 w: 2.001e+02 b: 9.974e+01
005 | Iteration 4000: Cost: 2.060e-04 dj_dw: 2.231e-03 dj_db: -8.056e-03 w: 2.000e+02 b: 9.995e+01
006 | Iteration 5000: Cost: 6.987e-06 dj_dw: 4.110e-04 dj_db: -1.484e-03 w: 2.000e+02 b: 9.999e+01
007 | Iteration 6000: Cost: 2.370e-07 dj_dw: 7.568e-05 dj_db: -2.732e-04 w: 2.000e+02 b: 1.000e+02
008 | Iteration 7000: Cost: 8.037e-09 dj_dw: 1.394e-05 dj_db: -5.032e-05 w: 2.000e+02 b: 1.000e+02
009 | Iteration 8000: Cost: 2.726e-10 dj_dw: 2.567e-06 dj_db: -9.268e-06 w: 2.000e+02 b: 1.000e+02
010 | Iteration 9000: Cost: 9.246e-12 dj_dw: 4.728e-07 dj_db: -1.707e-06 w: 2.000e+02 b: 1.000e+02
011 | (w,
... (truncated - too long, too many lines)
Full output: https://paste.pythondiscord.com/OZMYEHGDPWNL7DE6BDDJY7Y53U
@bright sierra ๐
brb
@whole bear you were warned about asking personal questions yesterday
@scarlet haloAre you there?
@whole bear you're missing out on stream time smh
Coming
Talking to my fam
!stream 717749310518722691
โ @whole bear can now stream until <t:1711810338:f>.
@rocky cosmos๐
ะฒ
@spare talon๐
Sup
@tranquil axle๐
hi
so i need to send messeges to voice verify
so anything will do
ok
so u guys playing chess
yea i can play with u
wait i wil make an account in chess.com
๐ ๐
ok send me invitation
Join the challenge or watch the game here.
sup mayor charizard
ok
being a long time since i last played
nice game bro
bye
you guys where nice
bye see you later
guys can anyone help me
hey sup
Heyo
man it's holiday.. touch grass
I did
or dont .. whatevr
how was dinner?
We had an egg hunt all morning
The prime rib was so tender
egg hunt in the morning
bug hunt in the evening
pretty much
join ov
@ivory stumpI'm back
@dire folioSorry for the ping but can you stream me?
Hi
Wrong emoji sorry
Si senรดr
@scarlet halo
@wind raptor Seriously the moment I join
you leave
I don't need perms
wait do people actually do that lol
hola
@mystic river๐
How is everyone doing
Good hbu?
Good Good
right now just firguring out running LocalLLMs for work
Why can't I talk :/
!vocie
!voice
Canโt talk in voice chat? Check out #voice-verification to get access. The criteria for verifying are specified there.
i just joined today
Thank you chris
I think you just add it to your .bashrc file or something
its been a while, I figured. Last time i used Ubuntu was during the 16.04 days lol
@wind raptor
USE CLOUDFLARE + FREENOM
tell @frozen owl
freenom is a free domain registrar
and cloudflare is a great DNS Provider + CDN
yes I used it before
Well yeah thats cloudflare
AH FUCK TEHY SHUT DOWN
fair point @wind raptor
but I used it before
@wind raptor Ik its the rules to wait 3 days but can i just talk now possibly? I may be able to help Alk but its frustration having type so much
its not like tor
this one?
oka
@Mindful Dev @ALKK | NotACrow DynamicDNS Exsits he could use that instead of static ip
@ALKK | NotACrow so what is your end goal with reaching your pc accross the world
if its not port forwarded
unless you have uPNP enabled on the router
and force ur PC accross the world to open it temporarly
ohhhh
ohhhhh
so he has access but not like 100 percent
only ssh
oh
@frozen owl you can portforward via the terminal i believe
if your router has Upnp enabled
thats the important part
anyones guys I'm trying to run a localllm what about the rest of yall?
yes
Universal Plug n Play
RTX 3070 on the main PC and on my Laptop a 2070 Super,
right now i am trying to use GPU over IP so my laptop GPU can support the process
ehh kinda
no
they are both at my desk lol
just one is a laptop
correct
ikr
its not hard I found a thing on github
sync ewhat?
syncthing
its just a P2P based file transfer application
so sftp?
if you want files and security just use SFTP
not P2P is different it doesn't have security i don't think
its mostly used over local netowrks than remote
its what providers like AWS use for thier datacenters
say it again?
it cut for a bit
ohh
well syncthing is meant for files
ohhh
so you want to make API calls to your machine?
curl?
curl is a good one
yes you could
curl is a protocal and application mostly for linux distros
let me see
curl makes a get request... there's flags for a lot of options in it
iirc curl has a flag for socket connection... dunno it has so many flags
just google "use CURL for remote socket connections"
i once looked at the man pages for curl.. most exhaustive reading
yeah good luck w that
man curl | grep socket
@frozen owl @stark river you want to just hop in a call so we can talk
i dont have mic
why lol
i'm on a desktop
i have a mic
brb
aight
ugh it might take a while i have to go build my new chair
nice... i also wish i got into carpentry
then i could build tables instead of tables
felt like my first try at the joke was too obscure
47,123
343,814
