#voice-chat-text-0
1 messages · Page 157 of 1
it was funny to me
happy to hear
guys i dunno why people think and say that is better programing in iOS than Win
im so blinded about what you can do in iOS and dont Win or Linux
lmao
on this TOPIC
@slender sierra
hiiii
sup
hallo na wie i dunno
i didnt know
i saw her
just enjoy dont send
nein
Learn the basics of computer science from Harvard University. This is CS50, an introduction to the intellectual enterprises of computer science and the art of programming.
💻 Slides, source code, and more at https://cs50.harvard.edu/x.
⭐️ Course Contents ⭐️
⌨️ (00:00:00) Lecture 0 - Scratch
⌨️ (01:45:08) Lecture 1 - C
⌨️ (04:13:23) Lecture 2 -...
o yeah you got me here coding
im havard student from now
i ll do my best
you got cats ?
cat==love
my cat also loves programing
he knows the keyboard
bye guys have to go!
bye have a good night
or day
also i have to go, have a good night, it was a great chat and remember guys "ON THIS TOPIC" see ya
@wind patio What is your python level?
translating to jquery
function loop() {
let x = $("details>summary>span:nth-child(5)");
$(x).each(function(index) {
i = index;
y = $(this).text();
c = colours[$(this).text()]
recolor(y,i,c)
})
}
lol let x equal what ...?
like 8am ish
!voice
Can’t talk in voice chat? Check out #voice-verification to get access. The criteria for verifying are specified there.
hello @indigo lionhow is your day going
nah just to touch some grass
nice
hello @rocky yew how are you doing
how is your day going
i am just a 15y/o student
just trying to learn some programming languages
did the basics of java and python
and now learning advanced java
India
ok
hey
const colours = {
"Project": "#DDDDDD",
"Vanity": "#DD7034",
"Discord": "#7289DA",
"Logbook": "#888888",
"Star Drive": "#FFE417",
"PC FIxIT": "#9A698C",
"Quicklinks": "#7A958E",
"Youtube": "#E31937",
"Book": "#D6BB87"
};
function loop() {
let x = $("details>summary>span:nth-child(5)");
$(x).each(function(index) {
color = colours[$(this).text()];
$(this).closest("details")
.css("border-color", color);
$(this).parent()
.css("background", color);
console.log(index + " " +
$(this).text() +
" gets colored " + color);
})
}
function setpost() {
// const obj = JSON.parse(database);
}
//setpost();
loop();
I'm done for today
bro
ım muted
:D
where are you from
@lunar haven
bro ım muted
bro ım from turkey
please talk slowly
ı dont understand
:D
:f
press f to pay respect
BRO what do you say
f
where are you from?
turkey
ım bored
:D
bro you are racıst?
:D
are you greek?
BRO TALK SLOWLY
ı dont understand
YES
koksal is GOD
hello
how do I get mic permission
I had 2 tabs open
I think sth weird
buggy
but rn no permission 😄
ok i asked
I have typing privilege good
Sow what happened, did you give me mic rights for a moment or what
cause I did see my icon going green
ok
ye im waiting
ye
""
yea
I am just a little gnome
ok I did
hello super </dev>
ok my friend is ready now
I gotta go haha
but I willbe back
:incoming_envelope: :ok_hand: applied timeout to @whole bear until <t:1688244084:f> (10 minutes) (reason: duplicates spam - sent 4 duplicate messages).
The <@&831776746206265384> have been alerted for review.
@whole bear were you trying to get voice verified? If so, please don't spam in order to do so, otherwise you'll end up getting voice banned - engage meaningfully. I'm going to let the mute stand.
hey 👋
nah, not today :p
!ban 1110651950854324346 not appropriate for this server
:incoming_envelope: :ok_hand: applied ban to @cerulean cave permanently.
ow
Me when dealing with 2 hours software
:)
:D
:-)
:))
is name ascıı art
:D
"| _ _ |",
"| ,':`._.':`. |",
"| ..-':::::::' `--.. |",
"| \\::::::::: / |",
"| _`.:::::: `._ |",
"| .':::_.`--'. ,'--'._ `, |",
"| `.::: o :: o : ,' |",
"| ,':`.____.;:.____.' `. |",
"-------------------------------",
@snow oasis BR?
yes
me too
nice
fr
bagel
oh is sooooooooooooooooo loooooooooooooooooong
Im collecting some data from an ETL API I have developed at my job to build a dashboard
not so interesting
hellothere
what
?
ok perfect
enyjoy it
yeah there a episodes
do you know why that i cant use the microphone
?
max
im going to be get mad with this
does anyone want to study aerospace engineering too ?
Hi @lunar haven
Could you elaborate a bit what you're working on for the late joiners?
Is this specific voice channel only to be used for the MIT course?
Awesome thanks!
I've been hacking away at a stock market low-frequency trading benchmarking system, low frequency in the sense that portfolios are re-balanced once every quarter. I'm trying to make different strategies "compete" against each other using different search algorithm. One interesting finding is that it seems that a random monte carlo style search is better at finding good strategies than using approximate search algorithms such as Simulated Annealing or Genetic Algorithms.... Of course all (most of it) in Python, the rest in in SQL!
Just wanting to share what I'm working on, no worries.
Im sharing what I am working on currently.
Using python to analyze what stock market strategies perform best by ranking stocks.
Millions of possible combinations so reducing search space is key.
72 quintillion to be precise 😄
?
Not parameters, possible solutions!
Assuming that we have 8 sectors and 4 indicators the total number of possible configurations are going to be: 72,969,250,332,651,749,376
The math is a bit extensive to share here, but yeah large search space !
@whole bear :white_check_mark: Your 3.11 eval job has completed with return code 0.
2,000,000,000,000
If interesting sharing a snippet of how I got to that number
How can I just share markdown formatted text?
@whole bear I'm from Argentina.
## Quantifying the search space
Suppose we have a ranking system that uses 4 variables and associates a specific weight to a variable.
The sum of weights must equal to one.
Now suppose we want to discretize our search space into increments of 0.01.
We can express this using the following relationships.
```py
x = 0.01*a
y = 0.01*b
z = 0.01*c
w = 0.01*d
0.01 * (a + b + c + d) = 100
C(n, r) = n! / [(r!)*(n-r)!]
C(100, 4) = 3,921,225
If we are to search different stock rankings, different sector weightings, and a stop loss tolerance as we do in version 0.01 of mercury then the size of our parameter space is going to be a very large number.
Assuming that we have 8 sectors and 4 indicators the total number of possible configurations are going to be: 72,969,250,332,651,749,376
72 Quintillion possibilities.
I've been in this server for a good year now lol but no I haven't send 50 messages
im good how about yourself
lol yea I've been in other serves besides this
Where are you from @lunar haven
depends on rounding
I saw is past tense
hi
you giving a lecture?
You'll get smart really soon!
learn by mistakes is what I do... ;/
Like we all do, informed trial and error
They say fish is better for the brain, omega3 you know
I gave a lecture to a u10s rugby team the other day about their attacking structure
We rolling they hating'
SUIIIIIII - Ronaldo is all I know
my friend knows a few of the irish players
hes mma
johnny sexton is my favourite player of all time
my dad went to school with him
like 38 i think
37
this a MIT course lec?
u at MIT?
ah I gotchu (means I understand)
lol
no I don't have cable
no it runs local
my goto response when someone asks me if I got something - I don't have cable
have fun learning
wait nvm im just gonna use customtkinter
its newer and is more powerful
NOW WAY THERES A GIRL IN HERE
I HAVENT TALKED TO A GIRL IN 14 YEARS
@fallow musk ARE YOU A GIRL?????
UMMMM
he must be young as hell
nah he js sounds rlly young
why be surprised about that?
taking the piss mate
@midnight agate more code evolution plots
(I'm a little bit surprised that matplotlib was even able to handle this)
@vocal basin These plots look interesting. Is it possible to refer to the jupyter NB/python code for this?
important tools used:
git
pathlib.Path.rglob for walking the files
collections.Counter for tracking differences between commits
matplotlib.stackplot for drawing the thing
Yes I am
@terse drift in here
voice-veryify
!voice
Can’t talk in voice chat? Check out #voice-verification to get access. The criteria for verifying are specified there.
@neon agate 👋
heyy
still not elegible to talk yet 😭
anyone of u guys good at debugging?
yeah, thats what i am talking abt
ah
i use pycharm
OOP
uhh, its a lot of files
prob like 8 files
and they are classes that depend on each other
yeah, exactly
nah, this is an assignment, so its starter code that i was given, so these imports are correct
yeah, makes sense
but the imports are right
yeah
exactly
yeah, ik
thats the problem
idk what the problem is 😭
so i wanted to use the debugger to see what exactly is happening
oh 😂
yeah
ah ok 😭
but i mean if i dont pass their tests, i wont pass the actual tests they run on it
so i wont get the grade i would like to achieve
yeah, makes sense
i wish i could stream
wdym by that
well anyways, u guys have a good night!
Sorry, can't grant that until you have voice privs
ah ok, makes sense
hope i am close enought to having privs 😭
@wind raptor why have .len() when there's already .size?
I added it before size
ah fair
in some sense, visualisation came before the code to generate it
i.e. I was trying to make this exact thing, and writing the code was quite simple
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 floppy disk icon in the top right, or by typing ctrl + S. After doing that, the URL should change. Copy the URL and post it here so others can see it.
yeah, she dumb af
@whole bear If youre gonna sit in here and complain and tell us to shut up, why are you even here in the first place?
yeah
Exactly
@whole bear "Stop talking about programming it's so boring" You must've forgot this server is for Python
when did I ask y'all to shut up?
are you dum? stop misquoting me
Nah im good
todayisnew
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 floppy disk icon in the top right, or by typing ctrl + S. After doing that, the URL should change. Copy the URL and post it here so others can see it.
thats not python
i can
but how does that matter?
the name of the algorithm or the ways to counter it?
timing attacks, given the if
wohoooooooooo
wohoooooooooo
depends on the 128 or 256 version
128/192/256, standard
yep
I think Rijndael defines larger possible keys, but those didn't make it into the standard
ok
> Related-key attacks can break AES-256 and AES-192 with complexities 2^99.5 and 2^176 in both time and data, respectively.
wait what, why is 256 with lower complexity
ok so what algo is it?
!e
KEY = bytes.fromhex('DC CD A2 67 D5 2A 0F 10 11 5A 9B 58 CA 05 06 77 B8 6D 92 81 03 9D C8 66 88 94 83 6D 06 FF 96 BD 6D 0B A5 9F DC D9 10 21 99 E6 19 0E B6 0A 9C 16 3D C5 8A 89 BB F0 5A E7 8B 09 4B 0B 8E 6B 15 D0 B7 08 EE 6E B1 D2 B5 BE 45 3F 09 2F 2F EC 85 18 B1 F8 65 86 86 35 D0 6E 30 F9 11 EC 05 62 5E DB 71 81 0F DE 06 DA 5B D0 F4 ED BC 91 6A D3 8C 37 2B 5D 3B 50 37 CD B5 E8 B6 CC C1 82 35 9B 4F 37 84 D6 3C D3 77 5B 54 0E F2 37 E7 41 9E 3E 30 A6 DE 8E E9 D6 1C 90 8E B8 81 01 74 6A 83 57 8E B5 80 BC D3 87 F3 8D 68 DD 85 6C B3 4F 6C 09 D7 E7 09 93 1D EA C2 1E 67 6E 9D 91 FA D2 02 56 FA DF C7 96 04 78 73 31 BB 5A 76 E1 DB 92 E9 65 64 A8 75 EC 60 1A CB 8D 7A 84 5F 8F 9D BC 9F C7 00 0D A3 FF 85 16 0D 0F 01 8D F9 1C 66 FE 50 2C 57 B5')
print(len(KEY))
@vocal basin :white_check_mark: Your 3.11 eval job has completed with return code 0.
240
weird
it clearly seems aes tbh, just see if u can find the box
not the entire key
pretty sure
yep
ah
if u can stream the debugging process that is
or the static analysis part
also try to see if u have the box
or u can just send me the binary and gimme a few mins
to analyse it for ya
havent done any re for long
yep sure
no worries, lol time to brush up my rusted skills
ghidra probs tbh, gotta modify the sleigh definitions if i have some free time to waste on the awful dev process of ghidra
yep
hello
one of them
missing pre-computed arrays for Galois field arithmetic
ah
just not in the code you sent
then, yes, given that, it does look close enough to AES
!rule 5 <-- just remember this
5. Do not provide or request help on projects that may violate terms of service, or that may be deemed inappropriate, malicious, or illegal.
if ToS says it's not fine, it's not fine
but idk what ToS says
did u decrypt the eboot.bin?
prxtool?
yep
i gotta download ghidra
i wish there was an idc or pyida plugin
for that
hmmm
lemme update my ghidra
2 min
australia
aes
256
lmao updated ghidra only to know the plugin supports upto ghidra 10.2.3
very sad
i can mute myself still speak
discord websockets sucks
very bad
ik
voice is like the one thing discord is good at
also the gateway is fairly accurate from my expirence
yk what @whole bear cant download ghidra rn ;-;
u r on ur own
just put the enc data and the key together and try python aes module to decrypt maybe?
use pycryptodomex or something
to test
also there is cipheyy online
to test ur data encryption
@dense ibex whats the job
we had somethinf extremely similar in my last job
i was Partner of the quarter twice in a row
and barista champion a week later 
@dense ibex our partner of the quarter wsa picked by our district manager
unmute me pls
!voice
Can’t talk in voice chat? Check out #voice-verification to get access. The criteria for verifying are specified there.
is it a drive thru starbs
yes
gg
i fucking hate that
@somber heath i did 
i got partner of the quarter twice ina row
no no it was favouritism
i applied myself the msot
and invested the most
i ws doing 40 hours while in school
hi @uncut meteor
Je ne parle Anglais
I don't speak whatever the fuck that is
*Francais
yeah that's what I thought
@midnight agate
no loops
||```py
from collections import Counter
from operator import itemgetter
class Solution:
def smallerNumbersThanCurrent(self, nums: List[int]) -> List[int]:
ix = sorted(Counter(nums).items())
indices = dict(map(reversed, enumerate(map(itemgetter(0), ix))))
accumulated = list(accumulate((map(itemgetter(1), ix)), initial=0))
return map(accumulated.getitem, map(indices.getitem, nums))
"what do you mean weird singleton?
all singletons are weird"
not severe enough
(at least for pinging the role)
Chessssh, or chessossh?
A voiceless postalveolar fricative is a type of consonantal sound used in some spoken languages. The International Phonetic Association uses the term voiceless postalveolar fricative only for the sound [ ʃ ], but it also describes the voiceless postalveolar non-sibilant fricative [ɹ̠̊˔], for which there are significant perceptual differences.
sh
@dense ibex
https://www.flitsmeister.com/
Use Flitsmeister together with over 2,6 million other drivers and eliminate frustrations in traffic.
Information about Johnson & Johnson’s Janssen COVID-19 Vaccine and how to store, handle, and administer it.
Jansenn pharmaceutical is part of Johnson and Johnson (baby products company), that could be one of the reasons why it was widely addressed as Johnson and Johnson vaccine across USA
anyone else get this? lol
traits in Rust -- classes in Haskell
@uncut meteor "just use function pointers"
(that's basically how OOP works in C)
void* -> void*
though void* -> void is good enough
!voice @molten widget
Can’t talk in voice chat? Check out #voice-verification to get access. The criteria for verifying are specified there.
@whole bear 👋
...
No worries. It happens a lot when people don't know why they can't unmute
Have a good one
pyright is going insane again
given that I can now aggregate on less than len(commits) colours, I may try to run this visualisation on some bigger project, I guess
(it's no longer quadratic in space usage with respect to commit count)
it might be a good idea to start compressing the thing horizontally too
I'm still not sure what happened to rustup;
I might be ordering commits incorrectly (and there may even be no correct way to order them at all)
🐑. Remi, who loves animals, goes to a sandwich shop and shows his respect for sheep missing.
http://www.facebook.com/gaillardremi
http://twitter.com/nqtv
@vocal basin I am new to programming, learning OOP. Could you please let me know how classes are related to "function pointers".
in some systems, implementations of methods for objects are based on function pointers
!e
def print_once(value):
print(value["name"])
def print_twice(value):
print(value["name"], value["name"])
apple = {"name": "apple", "print_function": print_once}
banana = {"name": "banana", "print_function": print_twice}
def print_value(value):
value["print_function"](value)
print_value(apple)
print_value(banana)
@vocal basin :white_check_mark: Your 3.11 eval job has completed with return code 0.
001 | apple
002 | banana banana
in C that would be a struct instead of a dictionary
with .name and .print_function syntax
.print_function would probably take in a pointer
and, depending on what version of C you're using, that pointer might have to be void * as to avoid recursive definition
another thing using a lot of function-pointer-based methods
one of the core ideas of OOP is to be able to have arbitrary behaviour for an object
usually that involves some sort of dynamic dispatch
for that dynamic dispatch to be possible, the program needs to know what code to execute
and function pointers point to that code
Thank you. I am trying to understand your explanation. There are two dictionaries, two UDF/user defined funcs (prints the key of dictionary)
But I don't follow the line value["print_function"](value) Value ["print_function"] is 2nd key. can you please explain the last part of (value)
value["print_function"] is known to be a function that takes value-like object as its input
actually, it can be simplified as to avoid recursion
(recursion in definition)
!e
def print_once(name):
print(name)
def print_twice(name):
print(name, name)
apple = {"name": "apple", "print_function": print_once}
banana = {"name": "banana", "print_function": print_twice}
def print_name(value):
value["print_function"](value["name"])
print_name(apple)
print_name(banana)
@vocal basin :white_check_mark: Your 3.11 eval job has completed with return code 0.
001 | apple
002 | banana banana
this one only passes in the name
this one is more difficult but it's what's more likely to be encountered in real code, as far as I know
it can be represented like this:
def print_value(value):
print_function = value["print_function"]
print_function(value)
print_function acts like a normal function even though we don't know which one it is exactly
Kiinda off topic question does anyone here understand java?
!e
def print_name_once(value):
print(value["name"])
def print_colour_twice(value):
print(value["colour"], value["colour"])
apple = {"name": "apple", "print_function": print_name_once}
banana = {"colour": "yellow", "print_function": print_colour_twice}
def print_value(value):
value["print_function"](value)
print_value(apple)
print_value(banana)
@vocal basin :white_check_mark: Your 3.11 eval job has completed with return code 0.
001 | apple
002 | yellow yellow
what's the question?
(I have some experience writing C#, so shouldn't be much different)
Ok so I made a chat filter for an assignment but it says n line 6 that "sc was never closed" but im confused because I don't know how to close that
you need to dispose it?
or call sc.close() at the end?
isn't there something like try-with?
This Java tutorial describes exceptions, basic input/output, concurrency, regular expressions, and the platform environment
Let me check it out
this will properly close the resource even if an exception occurs
I think I am able to understand it in a simple way like,
This lineA
value["print_function"](value["name"]) can be interpreted as lineB print_once(apple) LineB is just normal function call that I follow
how it gets "resolved", step by step:
print_value(apple)
apple["print_function"](apple)
print_name_once(apple)
print(apple["name"])
print("apple")
print_value(banana)
banana["print_function"](banana)
print_colour_twice(banana)
print(banana["colour"], banana["colour"])
print("yellow", "yellow")
["print_function"] allows abstracting away many things; for example, that one object only has "name" and another only has "colour"
I don't think I see it :/ should i try askiinig gpt?
can you send the code of main as text?
sure.
import java.util.ArrayList;
public class Uitvoerchatfilter {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
System.out.print("Voer wat in: ");
String input = sc.nextLine();
ChatFilter filter = new ChatFilter();
String output = filter.filter(input);
System.out.println("Je hebt ingevoerd: " + output);
}
}
class ChatFilter {
ArrayList<String> bannedWords;
public ChatFilter() {
bannedWords = new ArrayList<String>();
bannedWords.add("Kut");
bannedWords.add("Fuck");
bannedWords.add("Hoer");
bannedWords.add("Dog");
bannedWords.add("ongesteld");
}
public String filter(String input) {
for (String word : bannedWords) {
input = input.replaceAll("(?i)" + word, "removed");
}
return input;
}
}```
public class Uitvoerchatfilter {
public static void main(String[] args) {
try (Scanner sc = new Scanner(System.in)) {
System.out.print("Voer wat in: ");
String input = sc.nextLine();
ChatFilter filter = new ChatFilter();
String output = filter.filter(input);
System.out.println("Je hebt ingevoerd: " + output);
}
}
}
does this work?
@wind raptor logarithm of N! is equivalent to NlogN, iirc
which is used to prove that sorting algorithms are optimal
python very aggresively serialising data into json
In mathematics, Stirling's approximation (or Stirling's formula) is an approximation for factorials. It is a good approximation, leading to accurate results even for small values of
n
{\displaystyle n}
. It is named after James Stirling, though a related but less precise result was first stated by Abraha...
another function defined elsewhere?
' is mostly either derivative or just a different thing
I've seen a lot of maths notation when I was more properly taught algorithms;
but that's because of the places were maths-heavy
without h
I think
that is more applicable for continuous
I though about this too
but
n is confusing
n is usually for integers
!d heapq
Source code: Lib/heapq.py
This module provides an implementation of the heap queue algorithm, also known as the priority queue algorithm.
Heaps are binary trees for which every parent node has a value less than or equal to any of its children. This implementation uses arrays for which heap[k] <= heap[2*k+1] and heap[k] <= heap[2*k+2] for all k, counting elements from zero. For the sake of comparison, non-existing elements are considered to be infinite. The interesting property of a heap is that its smallest element is always the root, heap[0].
one of the implementations of priority queue structure, yes
@wind raptor there actually are some priority queue structures with better amortised asymptotics, compared to heaps
but they have a large constant factor which negates the advantages somewhat
insertion can be reduced to O(1) average
it's a forest
not just a tree
so, like, list of trees
dutchness identified
so I ran the code on cargo repository and this is the result
I definitely should fix sorting somehow
that gap is totally not fine
idk if I'm iterating over the right files
okay, commit responsible for the drop was found
@wind raptor I should've guesses by how descriptive the name is that it's the commit in question
@wind raptor do higher-order templates still work?
not functions
in (wrong) Rust syntax:
struct Example<T> {
field: T<i32>,
}
it did work in Aecor
at some point
@wind raptor can you show again what you wrote there?
it shouldn't be Foo<i32>
Foo<Bar> with Bar being a generic itself
struct Bar<T> {
x: T,
}
like this
and then
Foo<Bar>
@wind raptor just changing i32 to Bar should be okay
@minor raft
depends on what you learn the language for
if you want to do web+python, look into ASGI frameworks
Django, FastAPI, etc.
definitely not
i would want to do data analysis, pentesting, working with data
@wind raptor does it compile in this form?
okay, so it no longer works
oh, C++ seems to support something alike
On this channel, I post videos about programming and software design to help you take your coding skills to the next level. I'm an entrepreneur and a university lecturer in computer science, with more than 20 years of experience in software development and design. If you're a software developer and you want to improve your development skills, an...
Thank you for sharing advanced Python resource
!voice
Can’t talk in voice chat? Check out #voice-verification to get access. The criteria for verifying are specified there.
fixed
@minor raft it can be used for unethical stuff easily, that's why restricted
sure
(and for the original Aecor repo)
no oddities, seems like
the "oddities" are because we removed the original compiler in favour of self hosted
"the rest"
wait that's the one that deleted the code?
@vocal basin :white_check_mark: Your 3.11 eval job has completed with return code 0.
1 2 3
@rocky yew this?
gotta make chris make his commits less meme-y
`
\u0060 : GRAVE ACCENT - `
no oddities, seems like
Weird, there was a point there when i removed old C++ compiler in favour of new one too
x = function
y = function()
because I forgot to include .cpp files, obviously
will fix
x = function assigns the function object to a variable, while y = function() executes the function and assigns its return value to a variable.
!e
def function():
return 'hi'
x = function
print(x())
@minor raft :white_check_mark: Your 3.11 eval job has completed with return code 0.
hi
@whole bear :x: Your 3.11 eval job has completed with return code 1.
001 | Traceback (most recent call last):
002 | File "/home/main.py", line 1, in <module>
003 | help(type(print))
004 | ^^^^
005 | NameError: name 'help' is not defined
@rocky yew same in this case
what does the color represent?
commit the line was introduced in
added lines are put on top with the next colour
hmm
thanks!
python doesn't have a C-like notion of a function
closer to how function pointers work in C
I'd say closer to how it is in JavaScript
Java doesn't really have functions
and it's notion of methods as objects is weird
can you please elaborate on this w.r.to function in Python and in C (if possible with any small code examples) . as I am familiar with some extent in C
SOrry, I am not familiar with interfaces still. JUst trying to figure out functions mainly nad then understand deeper about classes/objects. I do know there is an entity called 'interface' in Python but not used it yet
got it
iirc, C handles "statically referenced" functions and functions pointers slightly differently
but it's not that much different
even in C you can just "assign a function to a variable"
but that variable needs to have a function pointer type
ooh understandable
what would you say is a purer (for a lack of better word) programing language, c or c++?
C, in all the ways
at least, because it's smaller
noted!!
C++ may be not as broken as it might sound if you just start listing all the orthogonal features it has
but it's still a mess
I am missing the point here. Alisa, can you please share what is this point about related to functions and objects
log of n^n is nlogn. log of n! is slightly less I think
and what are your thoughts on c#?
logarithms are same asymptotically
i have glasses so i cannot
lol
lmao @ Gi's github & youtube. Wtf?🤣
yes, it's less
because elements in the product are mostly less
(except for the last one)
Microsoft Java that got way better over time
("for legal reasons", better than it itself used to be, not necessarily better than Java)
"Simple Managed C"
hi
you are referring to N * N-1 * N-2..part of log N! = log (N * N-1 * N-2 ....) ?
N! is smaller than N^N for N>1 because:
N! = 1*2*3*...*N
N^N = N*N*N*...*N
same number of elements
but almost all of them (except last one) are smaller in the first one
Agreed! Thanks
sent that earlier
interesting in the sense that logarithms are close enough despite the functions themselves diverging
because that O(ln n) bit in the logarith becomes significant
(as it turns into *O(n))
Alisa, I follow the N! graph in the Stirling approx that you had shared, but still figuring out the other two graphs relation in the diagram
factorial
gamma function
Stirling's approximation
can't write
gamma function is like a generalisation of the factorial
!d math.gamma
math.gamma(x)```
Return the [Gamma function](https://en.wikipedia.org/wiki/Gamma_function) at *x*.
New in version 3.2.
Other than this and that log of N! And log N^N are asymptotically same, what are the other main points to look into from the 3graphs image that was shared?
!e
from math import gamma, factorial
print(factorial(10))
print(gamma(11))
from datetime import timedelta
print(timedelta(weeks=6).total_seconds())
@vocal basin :white_check_mark: Your 3.11 eval job has completed with return code 0.
001 | 3628800
002 | 3628800.0
003 | 3628800.0
@whole bear :white_check_mark: Your 3.11 eval job has completed with return code 0.
1.0000934600830078
I don't really understand the question
asymptotic similarity is important for proving the lower bound of time complexity for sorting algorithms
Thank you as the code always heps to understand better than theory. I am trying to follow the third part of timedelta function that you used
just a coincidence:
6 weeks is same as 10! seconds
Interesting! Wonder if other factorials have such coincidence with weeks or time 👀 Something to explore 🙂
1 2 3 4 5 6 7 8 9 10
2 3 4 5 6 7 8 3 3 10
3 4 5 2 3 10 3 8 7 6
60 60 24 7 6
@vocal basin It seems I have to read more about functions. I am afraid I didn't follow a couple of points that were mentioned earlier. Could you please share the main differences/points that I have to explore/understand w.r.to function handling in C and Python? I am fine with using func in simple python code and know the syntax, but further details I have to still grasp the concepts
Is the 2nd line related to factorial and time? First line notes that 3*3=9
yes, 9 needs to be split
this section has subsection "Callable types"
https://docs.python.org/3/reference/datamodel.html#the-standard-type-hierarchy
how C sees Python functions
https://docs.python.org/3/c-api/function.html
C functions
https://en.cppreference.com/w/c/language/functions
general information on pointers, including function pointers
https://en.cppreference.com/w/cpp/language/pointer
Thank you! I will refer to these links
those are quite in-depth, especially ones about Python
I have noticed, the python.org specs are in detail. In your opinion, for grasping what goes on behind functions in Python (& to a little extent in C): Do you recommend going through these links in detail first or is there any other resource you found helpful that could be referred to initially?
these are just basics of defining functions
I don't remember the tutorial containing anything about how call expressions are actually executed
https://docs.python.org/3/tutorial/controlflow.html#defining-functions
https://docs.python.org/3/tutorial/controlflow.html#more-on-defining-functions
python doesn't differentiate between functions and non-functions in terms of what gets called, until actually gets called
same is true for many other interpreted/dynamic languages
(something_callable)(argument)
!e
(1)(2)
@vocal basin :x: Your 3.11 eval job has completed with return code 1.
001 | /home/main.py:1: SyntaxWarning: 'int' object is not callable; perhaps you missed a comma?
002 | (1)(2)
003 | Traceback (most recent call last):
004 | File "/home/main.py", line 1, in <module>
005 | (1)(2)
006 | TypeError: 'int' object is not callable
notice how it's not a syntax/compilation/etc. error
same for calling methods of an object:
any method is an object itself
!e
number = 1
print(number.bit_length())
print(number.bit_length)
@vocal basin :white_check_mark: Your 3.11 eval job has completed with return code 0.
001 | 1
002 | <built-in method bit_length of int object at 0x7fd778fea2a8>
hello
yooo
!e
for i in range(50):
print("message number:", i)
@whole bear :white_check_mark: Your 3.11 eval job has completed with return code 0.
001 | message number: 0
002 | message number: 1
003 | message number: 2
004 | message number: 3
005 | message number: 4
006 | message number: 5
007 | message number: 6
008 | message number: 7
009 | message number: 8
010 | message number: 9
011 | message number: 10
... (truncated - too many lines)
Full output: https://paste.pythondiscord.com/alugamohag.txt?noredirect
Thanks. I follow the example that we can call anything: but it is not checked at syntax/compiler error. rather it is checked at execution time and we get a run time error. hope my understanding is correct
!e
1.bit_length()
@vivid jacinth :x: Your 3.11 eval job has completed with return code 1.
001 | File "/home/main.py", line 1
002 | 1.bit_length()
003 | ^
004 | SyntaxError: invalid decimal literal
!e
1 .bit_length()
(1).bit_length()
@vocal basin :warning: Your 3.11 eval job has completed with return code 0.
[No output]
I think Rust allows something similar
ok
@whole bear :white_check_mark: Your 3.11 eval job has completed with return code 0.
28
is this JS?
Rust
okay
@whole bear :white_check_mark: Your 3.11 eval job has completed with return code 0.
28
JS same as Python in this context
@vocal basin Thanks. Is there a reference for this concept to understand the conclusions of grouping here or is this something you have just done on your own
@whole bear :white_check_mark: Your 3.11 eval job has completed with return code 0.
49
!e
import pyfiglet
print(pyfiglet.figlet_format("H e l l o"))
@hallow pond :x: Your 3.11 eval job has completed with return code 1.
001 | Traceback (most recent call last):
002 | File "/home/main.py", line 1, in <module>
003 | import pyfiglet
004 | ModuleNotFoundError: No module named 'pyfiglet'
@whole bear :x: Your 3.11 eval job has completed with return code 1.
001 | Traceback (most recent call last):
002 | File "/home/main.py", line 1, in <module>
003 | import pip
004 | ModuleNotFoundError: No module named 'pip'
not sure if there's a canonical grouping for that example
!e
from subprocess import check_output
from sys import executable
print(check_output([executable, "-m", "pip", "list"], text=True))
@vocal basin :white_check_mark: Your 3.11 eval job has completed with return code 0.
001 | Package Version
002 | ----------------- ------------
003 | anyio 3.7.0
004 | arrow 1.2.3
005 | async-generator 1.10
006 | attrs 22.2.0
007 | beautifulsoup4 4.12.2
008 | contourpy 1.0.7
009 | cycler 0.11.0
010 | einspect 0.5.16
011 | fishhook 0.2.8.post10
... (truncated - too many lines)
Full output: https://paste.pythondiscord.com/abefiwapun.txt?noredirect
@vocal basin for the sorting algorithm implementation that you are working on, is it possible to follow it on your GitHub repo or something?
!e
from subprocess import check_output
from sys import executable
print(check_output(["cat", "/etc/passwd"], text=True))
@lavish rover :x: Your 3.11 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(check_output(["cat", "/etc/passwd"], text=True))
004 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
005 | File "/usr/local/lib/python3.11/subprocess.py", line 466, in check_output
006 | return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
007 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
008 | File "/usr/local/lib/python3.11/subprocess.py", line 548, in run
009 | with Popen(*popenargs, **kwargs) as process:
010 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^
011 | File "/usr/local/lib/python3.11/subprocess.py", line 1026, in __init__
... (truncated - too many lines)
Full output: https://paste.pythondiscord.com/inuxazayut.txt?noredirect
he did not chose gang life, gang life choose him @gentle flint 😛
cat not available I'd guess
time to check
yes
the thing I checked with last time?
touch, I think
Not sure for which sorting type you had shared it for but since yesterday there have been few sorting plots that you have shared. I am referring to those
isn't available either
this?
!e
print(open("/etc/passwd").read())
@lavish rover :x: Your 3.11 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(open("/etc/passwd").read())
004 | ^^^^^^^^^^^^^^^^^^^
005 | FileNotFoundError: [Errno 2] No such file or directory: '/etc/passwd'
sadge
that's unrelated to actual sorting, most of the time
Mustafa what happend to your pfp
is the code for the repo-plot online somewhere?
the "sorting" in question is rather commit ordering
any one knows a good problems website for beginners?
Yes, I am referring to these plots, ordering as you mentioned. Rather than sorting.
!e
from subprocess import check_output
from sys import executable
print(check_output(["/bin/cat", "/etc/passwd"], text=True))
@vivid jacinth :x: Your 3.11 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(check_output(["/bin/cat", "/etc/passwd"], text=True))
004 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
005 | File "/usr/local/lib/python3.11/subprocess.py", line 466, in check_output
006 | return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
007 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
008 | File "/usr/local/lib/python3.11/subprocess.py", line 548, in run
009 | with Popen(*popenargs, **kwargs) as process:
010 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^
011 | File "/usr/local/lib/python3.11/subprocess.py", line 1026, in __init__
... (truncated - too many lines)
Full output: https://paste.pythondiscord.com/fificocexi.txt?noredirect
!e
import os
os.system('/bin/cat /etc/passwd')
@vivid jacinth :warning: Your 3.11 eval job has completed with return code 0.
[No output]
!e
import os
print(os.system('/bin/cat /etc/passwd'))
@vivid jacinth :white_check_mark: Your 3.11 eval job has completed with return code 0.
32512
go to #bot-commands please if you want to try more stuff
do u guys have a project i can provide assistance on?
what sort of project are you looking for?
i need something for my resume
"contributions"
i would love to learn new stuff in the process too!!
provided as is;
readability, reliability and common sense not included
https://gist.github.com/afeistel/34731a4ecd2406233769731535fded51
https://gist.github.com/afeistel/25a69fa2243a4ef7d47d357442c88b75
https://gist.github.com/afeistel/46e4c3407491eb9a3a9dfac6a707d868
https://gist.github.com/afeistel/2f86039841955831a66aa1b40b6050a0
https://gist.github.com/afeistel/584b3b2f8e8b17454d11f4ff6b2b7524
what conversation did i walk into
why not just use a repository?
because the actual repo isn't public
That's all right. Thank you for sharing. I will refer to it (not sure how much I might understand though 😅)
and I'm too lazy to fork/create new repo/etc.
I think there is an overall polraization going on around the world pushing people twords more extremes.
I am orthodox and i didnt knew that
not sure how much programming experience you have, but a friend and I have been making a language you're welcome to join on
can we have private repo with our free github account as well? I thought all repo in github free account are public
@lavish rover 
!kindling
The Kindling projects page on Ned Batchelder's website contains a list of projects and ideas programmers can tackle to build their skills and knowledge.
@lavish rover what happend to your pfp you used to have like llama plushie
yes, limited in count (if they haven't lifted the restriction yet)
I'm not a pro but i almost hv a cs degree
nope
I can't talk yet 🤷♂️
get to the chopper
I'm actually not using GitHub private repos actively
I use self-hosted Gitea instead
makes sense
Whats that? I am not familiar with it and would like to see if I could use it as well
one of GitHub "clones"
so i would need a good understanding of c and rust to contribute ? @lavish rover
I used gittea for a while back in 2017 in a company that did not allow us to use github, it was a very pleasant experience.
We used the dockerized version and backed up the volumes for any disaster!
I think I've only interacted with two GitHub-like systems that can be self-hosted for free,
GitLab and Gitea
GitLab has CI/CD stuff
buzzword/buzzword
Gitlab is great but can be "bloated" if you just to KISS
Gitea had integration with systems like Drone before that even
C yes, but there's no rust in the project
That's amazing!
writing a compiler for subset of rust would be fun, especially when someone tells me to RIIR
"why rewrite it in rust when i can rewrite rust in it"
for beginners like myself , would you all suggest using Gitea, gitlab or any other? As all are new to m e, I have to start somewhere
RIIR -> RRII
someone should make a rust compiler in pure python just to fuck with the rust folks
For those working on OCEN, What's the best book/resource you recomend to read before starting to dive into developing your own language. If you had to pick only one what would it be?
I must say I don't follow some of the short forms used in this group 😭 riir rrii ?
lol idk I haven't read any books i kinda just started and figured stuff out
the whole Rust bootstrapping depends on a python script anyway
But you must be using something, like the docs for the core tools you are using to build the language.
it's like those memes about the whole system working only because of a single Perl script
I'm not using any tools, everything is done myself
except like GCC I guess, but I already knew C
the whole compiler is written in ocen
i love gofek
i used to put a sock over my mic when i made music, saved me loads of pop filters
@lavish rover where did you learn about parser and lexers for example? CompuSci background?
I did CS but didn't do any courses for them
I must say impressive!
it's just an input->output problem, started simple and just worked up
compušci sounds like some village name lol
lexing is basically just taking def foo(a,b): and converting it to ['def', 'foo', '(', 'a', ',', 'b', ')', ':']
parsing is a fancy way of saying store the info you care about into some data structure
when i first started i literally just set the goal for myself to be able to lex+parse+codegen for 1+1
then you say "okay how do i add multiplication", "other operations", "okay how would variables work?"
each step is not too bad
no programming language named "cen", can't make "objective cen" joke this time
but there's "Sen", sounds the same
close enough
@somber heath
enums in python have their own convention for special methods
_method_
!e
from enum import Enum, auto
class Aaa(str, Enum):
AAA = auto()
print([s for s in dir(Aaa.AAA) if s.startswith("_") and s.endswith("_")])
@vocal basin :white_check_mark: Your 3.11 eval job has completed with return code 0.
['__add__', '__class__', '__contains__', '__delattr__', '__dict__', '__dir__', '__doc__', '__eq__', '__format__', '__ge__', '__getattribute__', '__getitem__', '__getnewargs__', '__getstate__', '__gt__', '__hash__', '__init__', '__init_subclass__', '__iter__', '__le__', '__len__', '__lt__', '__mod__', '__module__', '__mul__', '__ne__', '__new__', '__objclass__', '__reduce__', '__reduce_ex__', '__repr__', '__rmod__', '__rmul__', '__setattr__', '__sizeof__', '__str__', '__subclasshook__', '__weakref__', '_generate_next_value_', '_member_map_', '_member_names_', '_member_type_', '_missing_', '_name_', '_new_member_', '_sort_order_', '_unhashable_values_', '_use_args_', '_value2member_map_', '_value_', '_value_repr_']
_value2member_map_
for now I'll just limit it
@trail tusk you can add time out for JWT, for example
you can't really reverse-engineer JWT, iirc
you can't change it
at least
that's the whole point
it's signed
the server verifies the signature of JWT each time it receives it
Yes I am aware about this thing
Yes I did, I usually store id and timestamp
that's structure of JWT itself, not payload
generally, you would probably use a library for that
should be good enough
sometimes session id may be preferred
so you can invalidate sessions
for example, if user loses access to the account
Somehow I leak this id, is there any way to reverse engineer and find the salt or whatever and guess this JWT for other "id"s
you can't "guess" the JWT
it's cryptographically secure
you'd have to spend way too much time
hmm I see
I meant private key
so, like, for example
if the user resets the password, that thing changes
yeah, seems like salt doesn't make much sense in this setting
though...
you can just have fields in the payload which are unique each time, and that already removes the need for salt
for example, timeout timestamp
* hypothetical need
yepps.. that's what I am doing rn
salt also can exist as a part of the signing protocol/algorithm/etc.
That was helpful, thanks @vocal basin @whole bear @midnight agate
I'd say inserting it manually is over-engineering, mostly
https://stackoverflow.com/questions/27301557/if-you-can-decode-jwt-how-are-they-secure
This did helped to clear confusion
I'd rather choose the JWT payload in such a way that even if user reads it, there's no security breach
yeah totally
user not adversary
I am just storing id, that is my database's primary key
@vocal basin Is auto () function here for automatic enumeration of the parameters into a enum data structure or is it something different?
yes, it automatically chooses values for enum variants
"Aaa.AAA" in the example
and Aaa.AAA._name_ returns just "AAA"
from elevenlabs import generate, play, set_api_key
set_api_key(********)
audio = generate(
text="Im your assistent",
voice="Bella"
)
play(audio, notebook=True)
raise PydanticUserError(
pydantic.errors.PydanticUserError: If you use @root_validator with pre=False (the default) you MUST specify skip_on_failure=True. Note that @root_validator is deprecated and should be replaced with @model_validator.
For further information visit https://errors.pydantic.dev/2.0/u/root-validator-pre-skip
Data validation using Python type hints
sounds like outdated API binding, tbh
and that binding probably has incorrectly specified dependency
unless you manually updated pydantic
maybe its this, i will try
uninstall pydantic
install pydantic 1.10
or just 1.whatever
this seems to expect at least 1.10
but it doesn't specify the upper bound (which is wrong)
https://github.com/elevenlabs/elevenlabs-python/blob/main/setup.py#L13
setup.py line 13
"pydantic>=1.10",```
congratulations on being early with this error
pydantic 2.0 released only two days ago
iirc, this
pip uninstall pydantic
pip install pydantic==1.10
omg
python -u "e:\Use\files\programing\Python projects\11labs.py"
<IPython.lib.display.Audio object>
worked
tysm
looks like it's built for ipython/jupyter
(as expected from setup.py)
ily
A helper struct for reverse ordering.
^ imo, doing something like this is a little bit cleaner, if the language allows it
@midnight agate how often do you encounter O(min(MlogN, M+N, NlogM)) time asymptotic?
merging two heaps/bsts/etc.
also saw that in leetcode (one of easy ones, iirc)
already discussed extensively
#764232549840846858 message
https://leetcode.com/problems/count-negative-numbers-in-a-sorted-matrix/
I've read no books on algorithms so far
might've only read individual chapters from some (mostly conference-associated ones)
((that's closer to journals in terms of how it's published, I guess?))
yes
for example, one containing original AVL publication
or no
not sure about the term
good afternoon
!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 floppy disk icon in the top right, or by typing ctrl + S. After doing that, the URL should change. Copy the URL and post it here so others can see it.
yes
!code
# Step 1: Import libraries
import pandas as pd
import numpy as np
import yfinance as yf
import matplotlib.pyplot as plt
# Step 2: Import the data
AAPL_data = yf.download(
"AAPL", start="2023-06-19", end="2023-06-23", interval="1m"
)
# Step 3: Convert data to a data frame
df = pd.DataFrame(AAPL_data)
# Step 4: Export the data frame to a CSV file
df.to_csv("AAPL_data2.csv", index=True)
comments seem off
New to this, my bad
I'm trying to get it to go by one minute rather than make it go all the way to the end of the market
If you look at the results, they show it goes to 4 oclock everytime
Can anyone help
you can use JetBrains Toolbox for easier installation
@lavish rover can you please repeat the point about tuples, did you say pedantic or something as it was not audible correctly
Oh okay. Got it
thanks
!stream 191793436976873473
✅ @whole bear can now stream until <t:1688337402:f>.
@wind raptor in ::resolve_scoped_identifier
in NSLookup case, if the lhs is a struct and is templated, we throw an error
actually, maybe we can put it in lookup _in_symbol
!resources
The Resources page on our website contains a list of hand-selected learning resources that we regularly recommend to both beginners and experts.
@lavish rover would my understanding be correct that for language development project you are currently working on, it is completely backend oriented, but no frontend component?
it's not really either backend or frontend
"backend" usually refers specifically to working on backend of web services
Yeah, usually databases and related things right
"is IndexedDB frontend or backend?"
I'm running the plot thing on Rust repo
2 years of commits left to index
Imo, any thing related to DB would be backend probably
I'm only including ~2% of all commits
Oh, I am not sure if i get what you are doing completely. But i understand it is related to indexing something!
python code is only around 8% of all compute time
May i know if Ocen is a tool?
Hey! I'm back for a few
"even if you turn on the power, it doesn't work"
⬆️ rust-analyzer
finite-field DH or elliptic curve DH?
@whole bear pow not xor
@whole bear it's not xor
there
in DH
DH uses power not xor
modulo some number
!e
a_secret = 3
b_secret = 5
g = 7
m = 13
a_public = pow(g, a_secret, m)
b_public = pow(g, b_secret, m)
ab = pow(a_public, b_secret, m)
ba = pow(b_public, a_secret, m)
print(ab)
print(ba)
@vocal basin :white_check_mark: Your 3.11 eval job has completed with return code 0.
001 | 5
002 | 5
!e
a_secret = 31
b_secret = 37
g = 13
m = 71
a_public = pow(g, a_secret, m)
b_public = pow(g, b_secret, m)
ab = pow(a_public, b_secret, m)
ba = pow(b_public, a_secret, m)
print(ab)
print(ba)
@vocal basin :white_check_mark: Your 3.11 eval job has completed with return code 0.
001 | 59
002 | 59
pydantic
reason why pow is not secure:
timing attacks
pow short-cuts and has non-constant time, as there's no way to specify what size numbers are limited to
also, this type of DH is inefficient, compared to ECDH
ECDH isn't really something that can be primitively demonstrated using !e
you pay for not having to learn Haskell be in cabal hell
I don't remember what Haskell compile times are, for smaller projects
I have experienced myself trying to compile something in purescript, it was extremely slow for whatever reason
