#voice-chat-text-1
1 messages · Page 33 of 1
@proper ridge do you know you can close tabs 😂😂😂
wtf :\
it would be worse if it was a single window with the same amount of tabs
migration to firefox is still in progress
good to know
@proper ridge what are you working on ?
pickle might work; depends on the type
pickle is the way model weights are loaded by many AI libraries
only load trusted data, because pickle allows arbitrary code execution
at least it's not Yandex Browser
@deep niche @stray imp 👋
Hello @stuck bluff , how are you doing?
@shrewd tide 👋
very terrible user experience despite all the AI features they're marketing
@sudden fern 👋
Have you used Arc ?
just another chrome
i agree
hmm
reminds of mongo requiring AVX to start
"someone somewhere forgot if exists"
wouldn't be surprised if they use AVX for BSON/JSON parsing thus leading to relatively poor performance on pre-AVX CPUs~~ (which would look bad on benchmarks)~~
Self means exactly the same type
for [[1]], __getitem__ does not return Self
what you seem to have meant there was returning a type that implements the same protocol
hmm
or not, that one might be correct
ig Collection itself is fine
(I might've confused it with what recursive one does)
seems correct
@wise hazel 👋
hey
otherwise it'd be very complex
you can only reasonably check that statically (using mypy and others)
list only supports int for __mul__
because it repeats the list
!e
print([1] * 2)
print([1] + [1])
print([1] * [1])
:x: Your 3.12 eval job has completed with return code 1.
001 | [1, 1]
002 | [1, 1]
003 | Traceback (most recent call last):
004 | File "/home/main.py", line 3, in <module>
005 | print([1] * [1])
006 | ~~~~^~~~~
007 | TypeError: can't multiply sequence by non-int of type 'list'
!e
print([1] @ [1])
: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 | print([1] @ [1])
004 | ~~~~^~~~~
005 | TypeError: unsupported operand type(s) for @: 'list' and 'list'
!d operator.matmul
operator.matmul(a, b)``````py
operator.__matmul__(a, b)```
Return `a @ b`.
Added in version 3.5.
added because of numpy
it's part of Python
@ binary operator
it's not used anywhere in Python itself afaik
the only type you can reasonably use there is probably tf.Tensor
@thin lintel some amounts of background noise
Sorry, I'm in train
list and others are only useful for inputs, I'd expect
.
python supports operator overloading so just implement the functionality
For the Collection class I have you mean?
Hi
I'm back
(was outside signing papers)
for __method__s
somewhere in the nested sections it lists operator overloading
also clarifies that constructors aren't entirely a thing inherent to class
and rather just what type.__call__ does
two more messages approximately
ohhh
!e
help(list)
yeah, probably should base functionality on usecase
:white_check_mark: Your 3.12 eval job has completed with return code 0.
001 | Help on class list in module builtins:
002 |
003 | class list(object)
004 | | list(iterable=(), /)
005 | |
006 | | Built-in mutable sequence.
007 | |
008 | | If no argument is given, the constructor creates a new empty list.
009 | | The argument must be an iterable if specified.
010 | |
... (truncated - too many lines)
Full output: https://paste.pythondiscord.com/6CL6YLGO3FGQFLGBHTCR2OFL4I
help(list)
and, yes, help does work there
!e
code
class list([iterable])```
Lists may be constructed in several ways:
• Using a pair of square brackets to denote the empty list: `[]`
• Using square brackets, separating items with commas: `[a]`, `[a, b, c]`
• Using a list comprehension: `[x for x in iterable]`
• Using the type constructor: `list()` or `list(iterable)`...
!e print('Hello World')
:white_check_mark: Your 3.12 eval job has completed with return code 0.
Hello World
there is often a set of operators expected from a certain concept (e.g. a number)
!e help(list)
:white_check_mark: Your 3.12 eval job has completed with return code 0.
001 | Help on class list in module builtins:
002 |
003 | class list(object)
004 | | list(iterable=(), /)
005 | |
006 | | Built-in mutable sequence.
007 | |
008 | | If no argument is given, the constructor creates a new empty list.
009 | | The argument must be an iterable if specified.
010 | |
... (truncated - too many lines)
Full output: https://paste.pythondiscord.com/MS2ZCRFEWXN4Z4G6T4YBBECIHI
in Rust, there is a common pattern of having a IntoSomething interface (IntoIterator, IntoFuture) to allow for conversion into something compatible on "user-facing" methods/functions
class IntoCollection(Protocol[T]):
def into_collection(self) -> Collection[T]: ...
^ not entirely valid in case of Python
ndarray has a fixed-ish set of what can convert to it
so maybe just re-export that
@proper ridge usually grouped by what they do
__gt__/__lt__/__le__/__ge__ should be together, for example
!e
print({1, 2, 3} - {2})
:white_check_mark: Your 3.12 eval job has completed with return code 0.
{1, 3}
!e
print({1, 2, 3} ^ {1, 2, 4})
:white_check_mark: Your 3.12 eval job has completed with return code 0.
{3, 4}
!e
print({1, 2, 3} & {1, 2, 4})
:white_check_mark: Your 3.12 eval job has completed with return code 0.
{1, 2}
symmetric difference
@proper ridge CustomClass() != object() should be supported
cross-type equality checks are normal for Python
check the type, then compare the result if types are the same
otherwise return NotImplemented
Brb
raise TypeError equivalent for equality check is return NotImplemented
and generally for operators that is the case
!e
print([].__mul__([]))
: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 | print([].__mul__([]))
004 | ^^^^^^^^^^^^^^
005 | TypeError: 'list' object cannot be interpreted as an integer
hmm
(not in that case though)
I'm trying to remember when it does that
!e
import numpy as np
a = np.array([[1, 2, 3]])
b = np.array([[1], [2], [4]])
print(np.matmul(a, b))
print(np.matmul(b, a))
:white_check_mark: Your 3.12 eval job has completed with return code 0.
001 | [[17]]
002 | [[ 1 2 3]
003 | [ 2 4 6]
004 | [ 4 8 12]]
!e
import numpy as np
a = np.array([[1, 2, 3]])
b = np.array([[1], [2], [4]])
print(np.dot(a, b))
print(np.dot(b, a))
:white_check_mark: Your 3.12 eval job has completed with return code 0.
001 | [[17]]
002 | [[ 1 2 3]
003 | [ 2 4 6]
004 | [ 4 8 12]]
(it's not)
that border is giant though
@thin lintel Baltic states are having the same issue because Kaliningrad
... one of rare cases when I'm not referring to it as Koenigsberg
1340km long border
cancoon
"just bring your own veterinarian"
I have a ollama GPU instance if anybody need.
I can't type on voice chat and unmute my mic, it says no permission
@dim basin 👋
The voice verification systyem is pretty bad.
It's a bit annoying, but it drastically cut down on hit-and-run trolling in the VC
Hey 👋
i may have asked this question before but do you know anything do to with custom tkinter? i'm trying to create a gui for a program i've made in python and need some help setting up a combo box
combo box?
Not my area, sorry. Try asking in #user-interfaces or see #❓|how-to-get-help.
Html?
Also, I'm liable to be asleep shortly.
When you define __eq__, do you need to define __ne__ as well?
Seems quite redundant.
!e
class C:
def __eq__(self, other): return True
print(C() != C())
:white_check_mark: Your 3.12 eval job has completed with return code 0.
False
!e
class C:
def __eq__(self, other): return False
print(C() != C())
:white_check_mark: Your 3.12 eval job has completed with return code 0.
True
By default __ne__ delegates to __eq__, but you may want to implemented if you want to implement richer behaviour (e.g. when you use comparison operators on numpy arrays, they return arrays not booleans).
!e
class C:
def __eq__(self, other): return NotImplemented
print(C() != C())
:white_check_mark: Your 3.12 eval job has completed with return code 0.
True
I see.
I don't know what __ne__ would be there
hmm
the result is surprisingly adequate
NotImplemented
(I did expect that but was not sure)
I guess it's not == unless explicitly defined otherwise?
Feels verryyy weird to me right now.
@functools.total_ordering```
Given a class defining one or more rich comparison ordering methods, this class decorator supplies the rest. This simplifies the effort involved in specifying all of the possible rich comparison operations:
The class must define one of `__lt__()`, `__le__()`, `__gt__()`, or `__ge__()`. In addition, the class should supply an `__eq__()` method.
For example:
Then why is __ne__ even included?
^ if you want to fill comparison methods
see what numpy does
!e
import numpy as np
not np.ones(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 2, in <module>
003 | not np.ones(5)
004 | ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()
I do consider a.all and a.any for __eq__ already.
!e
import numpy as np
print(np.ones(5) == np.ones(5))
print(np.ones(5) != np.ones(5))
:white_check_mark: Your 3.12 eval job has completed with return code 0.
001 | [ True True True True True]
002 | [False False False False False]
result of == is unnotable, so != needs be derived
@plain moss 👋
iirc Rust allows custom != too
but clippy considers it a warning
(maybe rustc too)
Rust itself seems to override it only for slices and arrays
I'm still searching in numpy's src, few more moments...
.
numpy can't override not so it has to prevent it
!eval Example of where __eq__ and __ne__ might return something other than booleans. ```py
from dataclasses import dataclass
class Expr:
def eq(self, other):
return Eq(self, other)
def __ne__(self, other):
return Ne(self, other)
def __add__(self, other):
return Add(self, other)
def eval(self):
raise NotImplementedError()
@dataclass(eq=False)
class Binop(Expr):
lhs: Expr
rhs: Expr
class Eq(Binop):
def eval(self):
return self.lhs.eval() == self.rhs.eval()
class Ne(Binop):
def eval(self):
return self.lhs.eval() != self.rhs.eval()
class Add(Binop):
def eval(self):
return self.lhs.eval() + self.rhs.eval()
@dataclass(eq=False)
class Num(Expr):
value: float
def eval(self):
return self.value
x = Num(2)
y = Num(3)
expr = x + y == y + x
print(expr)
print(expr.eval())
:white_check_mark: Your 3.12 eval job has completed with return code 0.
001 | Eq(lhs=Add(lhs=Num(value=2), rhs=Num(value=3)), rhs=Add(lhs=Num(value=3), rhs=Num(value=2)))
002 | True
It has __ne__ (through its parent class _ArrayOrScalarCommon).
I see.
This is useful for when I implement my QNum primitive, but I still don't quite understand how it would work for like when you have a class and try to just define it for that class.
> it will literally solve all issues
no humans => no issues
Even mathematics itself is not complete enough to solve all issues.
there are reasons why you need separated thinking, and more than one perspective
Exactly.
hive mind is sure road to death of society, so this is how it will solve all issues
It's just techbro optimism that is insane to me
Or we can pull a "Girl with all the gifts" type of thing.
it's not even optimism, it's plain delusion
This is why I always recommend talking about coding, can't hype sth without showing it actually working.
normal people call it delusion, techbros call it the future
They literally talk about anything besides SE, let alone python. I honestly have made a game out of it hehe.
SE/Python is pretty boring
That's the point of the server though.
It's like talking about Math, it's a solved problem
No Rabbit, not to that degree.
sure but talking about solved problems is generally boring
And since when is math considered objectively solved?
except at insane high end, it's solved 1+1 = 2 and 2+2 = 4
I literally have 5 questions from the top of my head that I haven't seen a single publication or reference that solves it.
3x+1?
unsolved problems are too niche
and communicating solved problems is more important (and, yes, boring)
Do you really see our questions as that trivial?
Do you want honesty?
Yes.
Yes, most programming problems people bring in voice is newbie solved issues. Most people here are writing CRUD apps. Here is FastAPI, learn classes and a database. Enjoy
Besides the newbies learning how to code?
even mathematicians themselves call that one a waste of time lol
Ask the ones who are actually working in the industry. Do you think Anokhi's work for instance is trivial?
Anokhi work is not trivial
if your company is solving an unsolved problem, good idea could be to shut up and monetise it
Since when is calculus a waste of time?
but Anokhi can't really talk about his work either because it's work
Rarely people are that smart to solve sth without collaborating with others.
we have some interesting fraud problems at work, I can't talk about it period.
.
it's not calculus

When people bring programming calculus level problems into VC, sometimes people do help out, it's pretty darn rare it happens.
3x + 1, that's a simple 1st degree variable equation. That's what we learned back in elementary school as calculus.
most of time it's "My Python install is borked"
3x + 1 is number theory not calculus
And sure, your quantum computing stuff is interesting to some, I just find it boring because I tend want to mess with practical stuff and Quantum computers are not out of the lab
That's literally why I do it.
It's useless at the moment. That's why it's an unsolved problem.
Sure but others may not find it interesting if they are trying to get venv running
They leave as fast as they come.
Number theory for us was different subsets of numerical values, natural, float, etc. As well their underlying properties. When they introduced variables and functions it was in calculus.
integers -- number theory
floats -- calculus
Floats are real numbers. We had them under number theory.
(at least that's how most of the world views it)
I honestly never got that impression during my school days. Even when I was competing at olympiad level, we always referred to the type of numbers as number theory, and variables and functions as calculus.
I recall the IGCSE system also using it like us, maybe I remember falsely.
I remember this from like 2nd or 3rd grade.
natural numbers, not whole numbers, because "whole numbers" is ambiguous
"natural numbers" is ambiguous too, but not as much
I even remember when I came to KL, I had this friend who was in 8th grade or so and was like I don't get x, what the fuck is x, and she had just been exposed to variables in calculus.
calculus is where many people start learning what functions are, yes
anyone here ever used Ctk?
instead of set theory where it really comes from
So, we had number theory in elementary to introduce arithmetics and different number classes, and then it would branch out into calculus, linear algebra, probability and statistics, discrete mathematics, and geometry (I don't think I missed any? I'm just looking at the books I had from back in the day).
Calculus had the variables and functions, basically the base framework. LA was mostly vectors, matrices, and their properties (though we did have systems of linear equations where you would have variables). Probability and statistics felt like applied calculus because you would analyze functions to generate some insight. Discrete mathematics was a bit weird, it was mostly combinatorics like the pigeon hole problem, and geometry was geometry.
That's how it was for us. When I came to KL we were still in the same system, but I did get a chance to check out the IGCSE A and O level stuff, and it seemed almost identical, but this is from more than 4 years ago, and in a different language, so maybe I misspeak.
I'm googling it, if feels like I'm remembering correctly, but please do correct me if I'm wrong.
I'll get the books out, one sec...
all I'm able to find related to number theory specifies it's about integers within the first couple of sentences
.
and calculus is described as differentiation and integration
... which doesn't work on integers
and, yes, that is indeed a very limited description
We had those in calculus too. So I got my books out. I only have from after 9th grade with me.
9th grade chapters:
1, 2) Number theory
3) Geometry
4) Powers
5) Algebraic expressions (first mention of variables, i.e., x)
6) coordinates
7) Algebraic expression 2 (I don't know the translation)
8) Volume
pygame+pybox2d
Another compilation of the bouncing simulations! How many songs are you able to guess?
Learn more about my projects. Support my work through Patreon and get some of my source codes: https://www.patreon.com/CodeCraftedPhysics
Improve your programming skills with code challenges from CodeCrafters! Build your own Git, Redis, Docker — in any langu...
10th almost just an expansion. 11th where we got calculus is where it more formally introduces functions and variables and expands more on those.
Again, this was my experience with my system and IGCSE if I recall correctly. I didn't check the US version with AP courses (could never get access to those back in the day).
I only remember the maths education for 8~11th grade, since that was basically re-learn of everything
For us 8-11th was like proper math, before that is like just building preliminaries for preliminaries.
So, for special schools, you would apply most during 8-11th.
We had 12th being the last year so kids would just prepare for konkoor.
I got a wave of nostalgia reading those books, thanks AF.
Really really loved those books. They're honestly also more advanced than most stuff I read these days (comparing to OCW stuff especially).
Did you guys also have the branch out option between math-physics, biology, and then humanities?
We had these three branches.
I was math-phy, so we had all the math and phy books (with additional chapters teehee). Biology kids had a lighter math and phy but instead had biology book. Humanities course was basically for drop outs.
Perfume is for ladies if I'm not mistaken.
Men wear cologne.
Sharper smell usually.
Dead people usually don't smell pleasent, yes.
Sounds like sth Tina Belcher would write.
found the program; tried to translate
https://gist.github.com/afeistel/68bdee328d5d2c348e1eff6fd801a6d8
that's decided before starting education where I was
HEHEHEHE
people get into that school from other schools
Gotcha.
it's only recently that some level of branching was intoduced for math students
I loved math, but some other kids had their parents choose for them.
It's needed. Otherwise, they're trying to produce one size fit all product.
^ this excludes geometry and algebra
mostly
those two were separate subjects
(from the rest of the mathematics)
one book for geometry
one book for algebra
zero books for everything else
Gotcha.
books we only used for exercises
Ohh like tutorial books?
no, just big lists of exercises
Yeah, we had those too. You would read from one book, and do tutorials in another.
Oh I see.
Demidovich-style
My favorite books that I read throughout the year (advanced level of the curriculum, helped me stay sharp) were lecture + tutorial + MCQ and repeat.
Like each chapter had around 300 or so MCQs.
God I wish it was digital, I would have so grinded it for achievements.
Achievement Unlocked "BookWorm"
we normally didn't have multiple-choice questions
I only remember the ones on the final state exam
It's basically the final boss like in MK: Armageddon.
for algebra and geometry questions were almost always one of three sorts:
prove this
is this correct (prove)
calculate that (and show how)
So, in our system you have three categories of exams:
- Standard exams (these were the ones you do for your degree, part of the standard curriculum. They were long answer questions, short answer questions, and MCQs)
- Competition exams (Almost entirely MCQs, very time intensive. I did have some of these be in multiple stages, and you would for instance have like 100 MCQs in 90 minutes, and then have the second stage be the long answer questions. MCQs would teach kids about time management and being efficient)
- Final exam (Konkoor, which is basically the ultimate exam consisting of everything from your entire education. Also completely MCQ)
So these were under standard exams, as your long answer questions. We had these mostly for geometry if I recall correctly. And of course in LA.
Calculate that was in both MCQ and long answer format.
(not exams)
just for weekly tests
Yeah we had those too. These were subsets of standard exams for each chapter.
You would then have them in the final exam at the end of the academic year.
For standard we had weekly tests, and then two final exams (one in the middle of the year, the other at the end).
there is one dumb statistics problem in the final maths exam in Russia which always takes a whole page to prove (and it's in almost all variants we had)
Although weekly tests depended on the lecturer too.
HEHEHE
Same. We had those too. God you'd feel insane if you would lose marks for a simple calculation mistake.
Like put 12 instead of 16.
I was confident enough to leave after only half the assigned time had passed (2 hours out of 3h55m)
I got low marks once in my life because I used to do alot of the calculations in my head (now my answers were correct, but my lecturer minused marks to teach me a lesson. I did make lots of small careless calculation mistakes here and there too.)
I would solve a three hour exam in 10 minutes, but I would sit until the very end reviewing the exam over and over and over and over.
God no, I would OCD-like review the exam 100 times.
If I was confident, I would start adding extra stuff to my questions out of boredom.
I had way worse things to worry about at that time lol
I checked the whole thing once
and just to avoid extra stress left it as is
which resulted in an imperfect 100/100
I mean, me too (family stuff mostly, home was hell) and I was very fat back then so studying was my favorite thing, and grades were my way of proving to myself I understood it properly.
and, yes, 100/100 can be imperfect because of conversion mechanism
30/32, 31/32 and 32/32 all coalesce into 100/100
I don't get it. It's full mark, no?
Ohh.
primary score gets converted non-linearly
someone, who I tried helping, getting <70 was more worrying
I see.
I was super sensitive about grades, like our scales were on 20/20 scale. Once I got 19.75/20 (meaning a single, small mistake costing 0.25). I felt such shame that I wanted to just die. Don't know why I cared so much.
!e
print(f'{19.75/20:%}')
:white_check_mark: Your 3.12 eval job has completed with return code 0.
98.750000%
It did push me to work harder though, until my love for the curriculum became big enough to outweigh my stress and I worked as hard if not harder but with less stress.
I didn't know this command, nice!
I can imagine myself crying about this back then. Like if I knew it was not 100/100, I would have probably cried my eyes out in private somewhere hehe.
Like why? You got your grade, why would you care? It took a while to understand grades are just grades, stuff you need to graduate.
@proper ridge first two are just 3 without 1x
yes, audible (just came back)
@proper ridge [[1, 2, 3]] instead of [1, 2, 3]
[1,2,3] is ambiguous
for me seeing it as [[1],[2],[3]] feels more natural
!e
import numpy as np
a = np.array([[1,3,5]])
print(a @ a)
: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 | print(a @ a)
004 | ~~^~~
005 | ValueError: matmul: Input operand 1 has a mismatch in its core dimension 0, with gufunc signature (n?,k),(k,m?)->(n?,m?) (size 1 is different from 3)
!e
import numpy as np
a = np.array([[1,3,5]])
print(np.dot(a, a))
: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 | print(np.dot(a, a))
004 | ^^^^^^^^^^^^
005 | ValueError: shapes (1,3) and (1,3) not aligned: 3 (dim 1) != 1 (dim 0)
it's too smart
@proper ridge maybe also first check that there's exactly 2 dimensions on both
otherwise ambiguous
many matrices is the example
that's where you'll need 3
and only three, since you can always reshape everything else to one one dimension
many operators
no
not sequential
parallel
I don't know why I'm here and my English is weak (: But can you evaluate this project that I did (I'm new to Python))
import turtle
def draw_sun():
turtle.color("yellow")
turtle.begin_fill()
for _ in range(36):
turtle.forward(100)
turtle.right(170)
turtle.end_fill()
def draw_moon():
turtle.color("black")
turtle.begin_fill()
turtle.circle(50)
turtle.end_fill()
def main():
choice = input("Enter 'day' or 'night': ")
turtle.speed(6)
if choice == "day":
draw_sun()
elif choice == "night":
draw_moon()
else:
print("error")
turtle.done()
if name == "main":
main()
C_i = A_i * B_i
!code
you have two lists of operators
you make a third one out of those
(with syntax highlighting)
https://paste.pythondiscord.com/HOJQ
i speak arabic so i can translate if you want
print("Hello Ali!")
.
ok
عايز تقوله ايه؟
[A_0, A_1, ..., A_i, ..., A_n]
[B_0, B_1, ..., B_i, ..., B_n]
[C_0, C_1, ..., C_i, ..., C_n]
بس بعتت اول مشروع الي بالبايثون بمكتبة السلحفاة قلت خليهم يقيموه -- اعطيني تقييمك لو عاوز تشوفه
.
yes
code seems clean enough
one thing I'd generally suggest when taking string input that you test for exact match would be to remove trailing/leading whitespace
!e
s = " day "
print(s == "day")
:white_check_mark: Your 3.12 eval job has completed with return code 0.
False
!e
s = " day ".strip()
print(s == "day")
:white_check_mark: Your 3.12 eval job has completed with return code 0.
True
@proper ridge this would more often come up with many vectors rather than many operators
shape (1, VECTOR_SIZE, VECTOR_COUNT) when plugging into matmul
(optionally reordered)
operators depend on physical arrangement of stuff, right?
so many operators might come up when we're evaluating and comparing different arrangements or whatever
like many different quantum computers
rather than many different inputs
no
1 because matmul still needs to be pointed at two dimensions to treat as matrix ones
yes, three dimensional
not more
(VECTOR_SIZE, VECTOR_SIZE, OPERATOR_COUNT)
when we multiply
(VECTOR_SIZE, VECTOR_COUNT)
by
(VECTOR_SIZE, VECTOR_SIZE, OPERATOR_COUNT)
there will be
(VECTOR_SIZE, VECTOR_COUNT, OPERATOR_COUNT) (another place where 3 dims appear)
as output
vectors input
operators
vectors output
10 operators
25 vectors
250 results
it just didn't embed because the site is always broken in one way or another
open-source mostly
rare
@ornate cobalt @proper ridge three skews makes a rotation
I will not teach how because I don't know how
Check out Jane Street's excellent Academy of Math and Programming (AMP). https://bit.ly/3T6gc3n
Jane Street has put together a fun logic puzzle to get folks excited about the AMP program. You don’t need to complete the puzzle to apply – it’s just something fun to get you thinking! Check it out: https://bit.ly/sum-amp
Here are Andrew Taylors sl...
what OS?
there was something earlier with draw.io
#voice-chat-text-0 message
11
activate as in?
did you check "add to path" during installation?
how are you trying to run it?
It say Its not Turned on
any chance I can get granted permission to speak on the voice chat?
In path
where does it say that?
I need to speak to @ornate cobalt
!voice
Can’t talk in voice chat? Check out #voice-verification to get access. The criteria for verifying are specified there.
How do I do that path
what's up
re-run the installer
check "add to path"
click customize installation
next
install
Vue?
view
How much more I need to talk so I Can talk in Ff
I don't remember any problems specific to Vue
Vc
50 undeleted messages
It should tell you
!user in #bot-commands to see how many messages bot sees you've sent
womp womp
ways to call Python from PHP that I'd expect to be possible:
subprocess
network
direct function call -- difficult
second one is preferred generally
why:
starting Python interpreter frequently is inefficient
Python startup times are terrible
that's why using some sort of API to connect them is suggested
normal Vue on its own has no way of communicating to Python because it's a front-end framework
in modern Vue installation, you're often be dealing with Nuxt or something similar that allows back-end functionality too
fetch
for fetch to work you need proxying to back-end
at some point in the stack
(as in static Vue won't be enough)
tihs is perfect! Thanks a lot once again

in LiveShare's model, there's only one copy of the file
your local version of the project, if existent, does not synchronise to remote when you connect to remote
(local version as in a file not what you see in the UI)
for synchronising process on a project across computers, you can use a VCS (for example, Git)
hi, i am new
it thinks of a local view of the file as just a temporary (optionally altered or outdated) representation
i can't make the import functionality work
with my own files
i am not american i am french
there's quite many non-Americans in the VC
(so that assumption was a bit off)
@ornate cobalt you can use std::sync::mpsc::Sender for reports if you want to have it shared at a performance cost
@serene quail it stands for distributed denial of service
denial of service: something doesn't work (usually because of high load)
distributed: many sources of attack
can any of you help 😭
what's the project structure?
What's the issue?
you're importing your own modules, right?
i am completely new so i am not sure what you mean by project structure but it's in the same folder
different files in the same folder
yes
so
/folder
module_1.py
module_2.py
and module_2.py has
import module_1
something like this, right?
exactly
import "something" could not be resolved
is the file named exactly something.py?
yes altho
how are you running the script?
i am working with .ipynb
why ? because my friedn who was supposed to introduce me to dev told me to
you're trying to import .ipynb from another .ipynb?
so i'll just have to copy pasta everything
@proud coral typing speed is generally not the bottleneck
its effects, though not zero, are negligible
most time is spent reading
> ChatGPT
> concise
not at all, in my experience
you need to ask it to be
@wraith portal with enough experience you'll often end up in situations when you don't need to google for hours
navigating docs will take over
Afaik the bot counts the messages continuously?
I think it just uses search
not sure, but that's very likely
!source user
nowadays I use StackOverflow way more rarely than years earlier
same sadly
I don't think there is a search function for bots?
as for AI assistance -- I don't do that at all, not worth it
AF, what do you think?
pseudocode:
Define type of a and b:
if both are bras or both are kets:
raise ValueError("Cannot multiply two kets or bras together.")
elif one is a bra and the other is a ket:
if the dimensions don't match:
raise ValueError(f"The dimensions don't match. {a.shape} and {b.shape}")
return a @ b
elif a is an operator:
if b is a bra:
raise ValueError("Cannot multiply A<psi|. The dimensions don't match.")
elif b is a ket:
if dimensions don't match:
raise ValueError(f"The dimensions don't match. {a.shape} and {b.shape}")
return np.dot(a, b)
elif b is an operator:
if dimensions don't match:
raise ValueError(f"The dimensions don't match. {a.shape} and {b.shape}")
return a @ b
elif b is an operator:
if a is a ket:
raise ValueError("Cannot multiply |psi>A. The dimensions don't match.")
elif a is a bra:
if dimensions don't match:
raise ValueError(f"The dimensions don't match. {a.shape} and {b.shape}")
return np.dot(a, b)
else:
raise ValueError("Unknown error has occurred.")
yeah, I looked up, and, yes, it seems to have a separate service for that
you can see that in source
here
Sorry we don't have any experience with bras 🙃🙃 . JK
bras are basically row vectors.
Kets are column vectors.
It's the braket notation introduced by Dirac to simplify the shape.
@serene quail what do you mean by minecraft script?
Makes your life a lot easier.
Really??☠️☠️
JS I think? Like MineFlayer?
Alisa sent the wiki on it. Have a look.
My bad I have dark humor
"c" got lost somewhere in the process
Hehehe.
!d tkinter.ttk
Source code: Lib/tkinter/ttk.py
The tkinter.ttk module provides access to the Tk themed widget set, introduced in Tk 8.5. It provides additional benefits including anti-aliased font rendering under X11 and window transparency (requiring a composition window manager on X11).
The basic idea for tkinter.ttk is to separate, to the extent possible, the code implementing a widget’s behavior from the code implementing its appearance.
Dirac probably just bended it into -.
tkinter is somewhat limited in its functionality
Gotta love Dirac. Made such an awesome representation for vectors and matrices in quantum mechanics, and even went ahead and fixed Feynman's problem with path integrals. Absolute legend.
@serene quail are you following one of these two guides for adding entities?
https://forge.gemwire.uk/wiki/Making_Entities
https://fabricmc.net/wiki/tutorial:entity
no the topic of minecraft,
in new versions of OpenComputers, the default OS comes with micropython pre-installed
since the computers there are now just RISC-V emulators rather than Lua runtimes
@obtuse valve why are you dealing with pointers in Rust?
or did you mean references?
*&
THIS
in most cases:
*&x is x
&*x is x
normally you only need * to extract a value out of Box or to extract a Copy value out of &T
this does not involve a box does it
but * still manages to turn &x into x
let x: i32 = 2;
let y: &i32 = &x;
let z: i32 = *y;
for T: Copy, * on &T will give you T
it's basically just a way to clone the value
what if i make z mut lol
can i?
or will rust bitch
let's check using playground
let mut x: i32 = 2;
let y: &mut i32 = &mut x;
let z: i32 = *y;
y points to x
z has the same value as x but is at a different place
modifying y will modify x but won't modify z
or to modify a value behind &mut T
*y = 3;
fn main() {
let mut x: i32 = 2;
let y: &mut i32 = &mut x;
let z: i32 = *y;
*y = 3;
println!("{x} {z}");
}
3 2
but isnt the value of z directly taking the raw value of y? so if you modify x and save it to y, surely z will also follow suit?
this sucks man
z got assigned by copy and then said too late..
z has been moved out of the reference
however
if you instantly take the *y by ref again, it's not moved
fn main() {
let mut x: i32 = 2;
let y: &mut i32 = &mut x;
*&mut*y = 4;
println!("{x}");
}
4
so when you do *y, you are effectively assigning new memory in order to dump y's value and assigning to z so when y gets changed, z no longer is updated because it has its own "version" of y, which is "outdated"?
yes
z is new memory disjoint from x and y
if you change y before assignment then z will have new value
& allows for other variables to access the memory location of the referenced variable (and effectively allows the value of the referenced variable to be accessed)
whereas * just fucking unpacks the value of the accessed variable and dumps it into new memory?
ik * is also used for unpacking right?
is it still true in py?
i read * as "value at"
not in Rust
in Rust you need ..
iirc
PyO3 user guide
and the whole section on enums
https://pyo3.rs/main/class#pyclass-enums
PyO3 user guide
python has enums?
!d enum
Added in version 3.4.
Source code: Lib/enum.py...
yeah sure
though I think it's not what PyO3 maps it to
yeah im rambling a bit
ok so
what happened i was at a cs taster yesterday
and then the teacher asked us to devise a solution to a contrived problem
and it involved data handling
and then i just assumed that i was using a decently equiped library eg numpy
and i just wrote code that used method calls
but bitch actually wanted me to impl those logic instead of using methods
smfh
and said "stick to something simple"
bitch
send
translation: doesn't know numpy
I was referring to what Crow and ACE said
maybe i joined late
!paste
a = np.array([1, 2, 3])
b = np.array([[1],
[2],
[3]])
c = np.eye(3)
d = np.array([[0, 0, 1],
[0, 1, 0],
[1, 0, 0]])
e = np.array([[1, 2, 3],
[4, 5, 6],
[7, 8, 9]])
!e
import numpy as np
print(np.array(123).ndim)
:white_check_mark: Your 3.12 eval job has completed with return code 0.
0
Shady
lol next time i see my cs teacher i will produce a rap again
and then i'll ask chadgpt to do somethin
i will RAP
!d statistics
Added in version 3.4.
Source code: Lib/statistics.py
This module provides functions for calculating mathematical statistics of numeric (Real-valued) data.
The module is not intended to be a competitor to third-party libraries such as NumPy, SciPy, or proprietary full-featured statistics packages aimed at professional statisticians such as Minitab, SAS and Matlab. It is aimed at the level of graphing and scientific calculators.
okok so for the summer task she told us to make a python programme/website/a writeup on some cringey topics eg ai
what should i do
the actual first impressions
what topics other than AI are there
holdup lemme pull up the docs
istg half the class is gonna do some "AI" eg imagenet with pytorch, llms with pytorch etc and using some chatgpt4 api and calling a "python programme"
HOLDUP
EXACTLY
THEY DONT EVEN FUCKING UNDERSTAND THE TECH AND JUMPING THE TECH BANDWAGON
wrapping API -- that's what most AI companies do anyway
but can they git clone --recurse-submodules
but they're not 🤦♂️
you are really assuming their intelligence (ik this is probs meant to be funny)
use AI to show how mediocre AI is
yeah imma use chatgpt to write AI slander
2. is quite useful
MAKE A FUCKING RAYTRACER IS PYTHON 🤓
i was seriously considering 2.
but i need hw
@proper ridge I'll DM the link to the latest one if you have enough bandwidth to download 128.5MB video
my dad offered me a raspberry pi but idk what impressive task i can do
host a website
ROS/ROS 2 is quite interesting
send to me
eg
robot.forward(10)
robot.left_turn(90)
robot.detonate_nuke()
you can try and fix their installation script
stupid
that's the most i can do with some low effort shit
rust simulator????
oh coffee time
scratch programming lmao
unless i make a PID
partial integral deririvative
autopilot obstacle avoidance system
then that will be full tryhard
browser isn't happy about playing it
or edge inference/compute using ||jetson nano and more "edge asic xPUs"||
for ai i am writing an autograd lib
like currently but the code is broken
this shows understanding but i will have to improve it much more in order to look impressive
feel free to shit on my code /j https://github.com/andreaslam/TensorOps
||disclaimer: only 1/2 examples works||
this is not appropriate for our server
the server is connected to almost a gigabit internet, so idk what goes wrong
quantum simulator wot
what is this guy on
oh yes
you can do that
ace is very correct
practice means do something you know you will have fun doing
what i did was a celestial spere with computer vision
!e
import numpy as np
x = np.random.normal(size=5)
r = (x ** 2).sum() ** .5
print(x[:3] / r)
:white_check_mark: Your 3.12 eval job has completed with return code 0.
[ 0.72312847 -0.45571975 -0.30248167]
hmm
fun stuff
python+python
pypy
@proper ridge as an aside: do you know what this does?
idk wdym
like what can i do with robot os without a robot smfh
it needs to be two elements smaller than the original
that's a very advanced concept called distance
!e
import numpy as np
x = np.random.normal(size=5)
r = (x ** 2).sum() ** .5
print(x[:-2] / r)
:white_check_mark: Your 3.12 eval job has completed with return code 0.
[-0.16864996 0.47857762 -0.36460653]
a bit more clear with -2
@proper ridge size=3 is easiest to analyse
try generating the result for size=3 many times
then look at the distribution
size=(3, samples)
.sum(axis=0)
!e
import numpy as np
x = np.random.normal(size=(3, 10))
r = (x ** 2).sum(axis=0) ** .5
print(x[:-2] / r)
:white_check_mark: Your 3.12 eval job has completed with return code 0.
001 | [[-0.2111328 0.45509363 -0.44989202 0.12070381 0.84373616 0.35359651
002 | -0.87185307 0.31055352 -0.21751166 0.02702108]]
this is just the original but repeated many times
result will have a somewhat unexpected distribution
x = np.random.normal(size=(3, 1000))
r = (x ** 2).sum(axis=0) ** .5
y = x[0] / r
y.sort()
plt.plot(np.arange(len(y)), y)
I've used it somewhere in there, yes
at the very end
I think this should be visual enough
!e
import numpy as np
import matplotlib.pyplot as plt
x = np.random.normal(size=(3, 1000))
r = (x ** 2).sum(axis=0) ** .5
y = x[0] / r
y.sort()
plt.plot(np.arange(len(y)), y)
plt.save('out.png')
:x: Your 3.12 eval job has completed with return code 1.
001 | Traceback (most recent call last):
002 | File "/home/main.py", line 8, in <module>
003 | plt.save('out.png')
004 | ^^^^^^^^
005 | AttributeError: module 'matplotlib.pyplot' has no attribute 'save'. Did you mean: 'imsave'?
I don't remember if it can
!e
import numpy as np
import matplotlib.pyplot as plt
x = np.random.normal(size=(3, 1000))
r = (x ** 2).sum(axis=0) ** .5
y = x[0] / r
y.sort()
plt.plot(np.arange(len(y)), y)
plt.imsave('out.png')
:x: Your 3.12 eval job has completed with return code 1.
001 | Traceback (most recent call last):
002 | File "/home/main.py", line 8, in <module>
003 | plt.imsave('out.png')
004 | TypeError: imsave() missing 1 required positional argument: 'arr'
It definitely can save files.
!e
import numpy as np
import matplotlib.pyplot as plt
x = np.random.normal(size=(3, 1000))
r = (x ** 2).sum(axis=0) ** .5
y = x[0] / r
y.sort()
plt.plot(np.arange(len(y)), y)
plt.savefig('out.png')
:white_check_mark: Your 3.12 eval job has completed with return code 0.
🎉
least impressive plot
!e
import numpy as np
import matplotlib.pyplot as plt
x = np.random.normal(size=(4, 1000))
r = (x ** 2).sum(axis=0) ** .5
y = x[:2] / r
plt.scatter(*y)
plt.savefig('out.png')
:white_check_mark: Your 3.12 eval job has completed with return code 0.
it's constant density
this is easy-ish to understand
projecting a sphere onto a line
whereas this involves a four dimensional sphere to work
???
sounds like .reshape()
dude i barely know complex numbers dude, im supposed to start learning them when my further maths course starts
you forgot that im really bad at mafs
So the wires are the data and the matrices are the code?
can somebody help me with a project real quick it only takes 10 minutes I need to ask if I did something wrong
Maybe try #help ?
look at dms
okok should i start debugging my autograd lib
i can streammmmmmm
yeah i would fix my autograd lib and call it a day i guess
... everything starts with a failing test...
FWIW, @proper ridge is laying down some solid wisdom.
Yeah, and also grants.
Yeah but the whole point of open source is to be independent. You don't wanna be under a company.
Everyone has wisdom. Just share your experiences.
heheheheheh i suck at accounting lol
i took an accounting class for like a term 2 years ago
credit side never equalled debit side
tax deductible?
and exemptions??
mark to market accounting?
shitter
how to commit fraud 101 /j
in how Oxide operate, open source value doesn't come from donations; it comes from what it gives them as a business: publicity, more job candidates, contributions from external developers
is it this project https://oxide.computer/
and all that for the company that doesn't use Microsoft/Oracle style of monetisation
Yet another package doing QMP wrong, smh:
https://github.com/SaashaJoshi/piQture
probably some person using chadgpt for it:
Have fun performing image processing on 10 by 10 pixel images hehehe.
No, it's just copying what's been out there for nearly 10 years now.
that's even worse, git cloning
"you don't have to license the bios if you don't use a bios"
HEHEHE
issue: rewrite your shit so that it's correct
AMD
It's correct, just very very very expensive.
issue: fix skill issue lmao
This is the cycle QML guys make:
- Do QML
- See QML suck ass
- Cry about it
- Think of bottlenecks
- Choose to work on changing QML as a whole, or giving up and moving to another thing
this would be a solution to your cycle /s
It's not a skill issue, it's just a hard problem. Issue is people try to fix components when the whole framework is just flawed. It's like trying to replace parts without thinking of the machine as a whole.
interesting
so moral of the story: vertically integrate everything so that you set the standards?
lol
alternately outsource the production of code etc but buy the rights for them for cheap? eg hire programmers in areas with cheap labour costs
but apple was technically aimed towards a different niche
the "pros"
yeah, i though apple was always luxury/status/lifestyle brand
quality control nightmare + subcontractors will push for higher budget instead of optimising the process
oooooooof
||chatgpt||
completely forgot about that lol, my capitalist side took over /j
lol im typing this from m1 air lol
but i thought we were initially talking about companies @outer oriole
like we were talking initially about google being vertically integrated
and the advantages of it
So whyare we talking about M chips?
Engine. Pistons.
that's such a small part of APple
dude calm down
vertical intergration works best when you have boatloads of cash
does not work for small businesses becasue it's not viable to exclusively serve yourself
buying apple products because of the processor is reasonable, and that's the success of it
As a developer, I hate the M chips
when the OS only runs on their chips, which you cannot buy, you cannot hackintosh
that's how they are killing the hackintosh
i can hear you
say something
all good
shit my airpods are gonna die soon
they're a lifestyle company
luxury
conspicious consumption
it's like a badge of exclusivity
pcmr moment:
so public companies are bad????
google = big bad boi???
lemao dont be evil
closedai:
i mean openai
I think maybe Ford
What's the title of this book?
Question about Kodak
Yes, when Andy Grove moved to RAM chips people thought he was the crazy
did oyu say they didn't make digital cameras?
exerpt from zero to one by peter thiel, that's what i thought about products
Kodak had invented digital camera, had some patents on it but didn't do anything with it because film
> peter thiel
well that makes it a never-read book for me
It's worth reading even if you don't implement it
lol
Led by CEO Antonio M. Perez, Kodak is struggling to reinvent its business model. It's not alone
In hell, the only vendor is IBM Global Services
"developers developers developers"
oh wait not that quote
shit
you were faster than me
i was typing that shit
i heard ballmer
my brain:
Pichai Sundararajan (born June 10, 1972), better known as Sundar Pichai (), is an Indian-born American business executive. He is the chief executive officer (CEO) of Alphabet Inc. and its subsidiary Google.
Pichai began his career as a materials engineer. Following a short stint at the management consulting firm McKinsey & Co., Pichai joined Goo...
r/trueoffmychest /j
iirc theprimagen made a vid on this
i watched it this afternoon
I WATCHED IT IT WAS W TAKE
it was so fun
the only time I use copilot is on someone else's IDE when they need help/quick demo/whatever
(copilot not Copilot; I have no idea what exactly they have enabled)
as for grouping:
some would call K-means AI too
It's like everyone who use Copilot says "Write Fizzbuzz" and it works great
then they give it some leetcode, it goes great
lol
then they are like "Write this crazy CRUD app" and 💥
new leetcode problem releases:
it has no clue what to do
is this how ultron is built lol
fancy search solutions + copy paste in case of leetcode
startup cost:
- chadgpt subscription cost
grifters are just trying to put money from PE in their pocket
and Red Hat
and Vagrant
(idk what else hashicorp did)
yaay
Hashi also did Packer (a handy image/package building tool) and Nomad (a much lighter alternative to k8s ) based on Consul.
oh alr
What are you working in?
@proper ridge Why you have so many tabs open?
isn't this make your computer/laptop slow
Truue
yippee
Happy birthday, CheeseburgerFreedomLand!
I'm jumping head first back into python with only gdscript experience and vague memories of python in high school to guide me.
@thin lintel my airpods got charged
turns out i think the left slot got dirty
popcat1!!!!!
youre one step closer to getting the rap album
I speak a bit fast too, but if you want everyone to comprehend what you're expressing, it's best to slow down a bit.
I'm ok.
And no, not an 'merican either. Was just working late.
He's from somewhere on earth, why care which patch of earth?
yeah i know
well use ctrl f to fix it
do you like rust/!??!?!?!?!
yayyyayazyay
HAHAHAHAHHAHA
RUST
i program in fortnite!!!1!!
is the earth flat!>!!.!>?!/!11!
!lol!
Thanks to discord.py, sending local files as embed images is simple. You have to create an instance of discord.File class:
# When you know the file exact path, you can pass it.
file = discord.File("/this/is/path/to/my/file.png", filename="file.png")
# When you have the file-like object, then you can pass this instead path.
with open("/this/is/path/to/my/file.png", "rb") as f:
file = discord.File(f)
When using the file-like object, you have to open it in rb ('read binary') mode. Also, in this case, passing filename to it is not necessary.
Please note that filename must not contain underscores. This is a Discord limitation.
discord.Embed instances have a set_image method which can be used to set an attachment as an image:
embed = discord.Embed()
# Set other fields
embed.set_image(url="attachment://file.png") # Filename here must be exactly same as attachment filename.
After this, you can send an embed with an attachment to Discord:
await channel.send(file=file, embed=embed)
This example uses discord.TextChannel for sending, but any instance of discord.abc.Messageable can be used for sending.
!lol
lol!
!lol!
!lol!
!gg!
wtf
i summoned the demons
colonise the schedule lol
!lol!
ohshit
i de-summoned the thingy
no home?
:(
no web
🕸️
dude
guess what
my first lang was js
im a traumatised soul /j
embrace the inner chaos
today's vibe https://www.youtube.com/watch?v=fLexgOxsZu0
The official music video for Bruno Mars' "The Lazy Song" from the album 'Doo-Wops and Hooligans''.
Stream: https://apple.co/38qBTEU
Directed by Bruno Mars and Cameron Duddy
Choreographed and Performed by Poreotics: http://poreotics.com
Comic Chimp Mask used by permission of Easter Unlimited, Inc. / FunWorld Div. All Rights Reserved. Copyright...
@soft turtle @shy jasper 👋
oh hi! I was just leaving
aight you're good
picture
ours has a yellow lid
yeah ive seen this verision before
i take 4 a levels
and i plan to take crest award + epq
@woven vine 👋
What's up?
One minute…
I don't write English very well and I can't speak on the call because of the verification
