#voice-chat-text-0
1 messages · Page 153 of 1
speaking of cloud hosting
this article looks a little weird
https://en.wikipedia.org/wiki/Cloud-computing_comparison
The following is a comparison of cloud-computing software and providers.
where I live, battery lasting for a second is good enough
so here it's power surge rather than power cut, I guess?
Thx i try
like, looking at this I wouldn't guess these two links are related to Ubuntu specifically
I almost understand why this columns are picked
the list doesn't include many cloud platforms that don't operate in US
I think Locations means data center locations
"List of [known ]bugs[ so far]"
I think the only two options I have for cloud are Yandex and Mail.ru
first being slowly consumed by the second
(and the second one being state-affiliated)
can't you access aws?
or gcp
I have an account
but I can't pay for anything
ah ok
AWS is probably the only one outside the country I have any chance of using
vpn will work?
error message is a non-repeating gif
https://www.hetzner.com/_resources/themes/hetzner/images/error/404error.gif
and paypal
okk
services that provide virtual cards are region-restricted to US, mostly
(requires providing actual proof to those services)
ok :/
* VK not Mail.ru
seems to be same cost
How about Alibaba cloud?
maybe I should read this first
very fun when ToS starts with "you actually agree to follow a dozen of other agreements which we won't specify here"
!code
if Alibaba leaks your password, you're responsible
2.4 Alibaba Cloud may suspend or terminate all or part of the free Alibaba Cloud Services at any time in its sole discretion. Alibaba Cloud reserves the right to charge for any and all Alibaba Cloud Services or any feature or functionality of the Alibaba Cloud Services at any time in its sole discretion.
The availability to you of any service level credits under any SLAs is conditional upon your full and timely compliance with the Terms. If in our discretion we pay to you any service level credits under any SLA, no further or other claims shall lie against us in respect of any claims or matters arising under any such SLA.
them refunding you a minimal amount is enough to silence you from complaining about anything
be responsible for your End Users use
thankfully, it's checked by default
don't know how they can get away with such terms
they're not a government, they're a private corporation
private corporation owned by a government
yes, but they're required to obey local laws

haha
that means the card number was used already or used in a transaction involving their company that did not go through
no, that means the card is Russian
or just the region
owwww
and they don't support whatever the hell the china-russia new payment system is
russia getting sanctioned?
The SWIFT ban against some Russian banks is one of the 2022 sanctions against Russia imposed by the European Union and other western countries, aimed at weakening the country's economy to end its invasion of Ukraine by hindering Russian access to the SWIFT financial transaction processing system.
An international interlinked alternative messagin...
the list provided there isn't the complete, I think
though, anyway SWIFT ban isn't the only restriction
many payment processors stopped transactions even before that
didn't do anything but it's already complaining
(I managed to skip adding a card for now)
this one might actually be worth something
"most of the time spent walking"
sounds like ArmA
whaa
million
well, yes, the CCP will have access to everything, but still
Check out HEIST PODCAST - Every week we cover a famous heist from history!
https://www.heistpodcast.com - https://plinkhq.com/i/1329231773
- Jukin Media Verified *
Find this video and others like it by visiting https://www.jukinmedia.com/licensing/view/949510
For licensing / permission to use, please email licensing(at)jukinmedia(dot)com.
@midnight agate I haven't tried solving anything from #revival-of-code yet
time successfully wasted manually colouring this thing
I don't remember doing it before
but I might've just forgotten
link for what?
well, for 4.5 years most of my interactions with automatic code testing/checking tools (contest-style) were with ejudge (as part of the education process)
from ejudge GitHub repository
but
but
doesnt I first put
idk why it's false, yes
every letter in the hashmap?
this
so even if the word was aaa
you diiscard it
i will put aaa in hashmap
isnt it like popping?
how does your algorithm work with s="aa", t="aa"?
@vocal basin give me brother
no, it will only put "a" once
why is that?
give what?
set() stores unique elements
ohh
!e
s = set()
s.add(1)
s.add(1)
print(s)
@vocal basin :white_check_mark: Your 3.11 eval job has completed with return code 0.
{1}
i dont usually work with python so I dont really now how hasmaps work
what you're probably looking for is Counter
ohh okk
!d collections.Counter
so whats the alternative?
class collections.Counter([iterable-or-mapping])```
A [`Counter`](https://docs.python.org/3/library/collections.html#collections.Counter "collections.Counter") is a [`dict`](https://docs.python.org/3/library/stdtypes.html#dict "dict") subclass for counting [hashable](https://docs.python.org/3/glossary.html#term-hashable) objects. It is a collection where elements are stored as dictionary keys and their counts are stored as dictionary values. Counts are allowed to be any integer value including zero or negative counts. The [`Counter`](https://docs.python.org/3/library/collections.html#collections.Counter "collections.Counter") class is similar to bags or multisets in other languages.
Elements are counted from an *iterable* or initialized from another *mapping* (or counter):
```py
>>> c = Counter() # a new, empty counter
>>> c = Counter('gallahad') # a new counter from an iterable
>>> c = Counter({'red': 4, 'blue': 2}) # a new counter from a mapping
>>> c = Counter(cats=4, dogs=8) # a new counter from keyword args
@vocal basin i just want same voice chat
does like python have
stack ?
or like an array where I can insert elements dynamically
and remove them whenever I want to ?
list
class Solution:
def isAnagram(self, s: str, t: str) -> bool:
hashmap = list()
counter = 0
if len(s) != len(t):
return False
for n in s:
hashmap.add(n)
for j in t:
if j in hashmap:
hashmap.pop(j)
else:
return False
return True
!e
example_list = []
example_list.append(1)
example_list.append(1)
example_list.append(2)
example_list.append(1)
print(example_list)
this will work?
@vocal basin :white_check_mark: Your 3.11 eval job has completed with return code 0.
[1, 1, 2, 1]
append instead of add
remove instead of pop
pop for lists does something different compared to sets
!e
fruits = ["apple", "banana", "cherry"]
fruits.pop(1)
print(fruits)
fruits = ["apple", "banana", "cherry"]
fruits.remove("banana")
print(fruits)
@vocal basin :white_check_mark: Your 3.11 eval job has completed with return code 0.
001 | ['apple', 'cherry']
002 | ['apple', 'cherry']
yup yup got it
do you recommend
I learn like this?
trail and error?
or do I watch like a
course or something to learn python syntax first ?
ohh nice so u can either pass the index or the string itself
pretty cool
leetcode isn't exactly the best thing to learn from if it's the only thing you use;
same for almost any approach;
I think it's more efficient to both do trial-end-error learning and systematic learning

something closer to systematic learning would be this
https://docs.python.org/3/tutorial/
okkk thansk ❤️
@vocal basin wtf
#include <stdio.h>// Usage: find k (<=n) roots of polynomial f such that deg f=n; Input: n c_0 c_1 ... c_n | c_i: double
#include <math.h>// Output: roots:k x:x_1 f:f(x_1) x:x_2 f:f(x_2) ... x:x_k f:f(x_k) | x, f: double | roots are ordered
#include <float.h>// non-descenging. Note that roots can be repeated due to divisibility of f by (x-root)^k where k > 1!
#define P(o)if(B o T){for(u i=2048;i;--i){d m=(b+t)/2;*((d*[]){&b,&t})[0 o a(n,c,m)]=m;}return b;}// (c) timotheyca 2020
typedef double d;typedef unsigned short u;d a(u n,d*c,d x){d r=0;for(u i=n;i;--i)r=(r+c[i])*x;return r+c[0];}d s(u n,d*c
,d b,d t){d B=a(n,c,b);d T=a(n,c,t);P(<=)P(>=)return NAN;}u h(u n,d*c,d*g,u*r){while(n&&!c[n])g[--n]=NAN;if(n==0)return-
0;for(u i=1;i<=n;++i)c[i]*=i;h(n-1,c+1,g+1,r);for(u i=1;i<=n;++i)c[i]/=i;g[0]=-DBL_MAX;u j=0;for(u i=0;i<*r+1;++i){d t=i
<*r?g[i+1]:DBL_MAX;d B=a(n,c,g[i]);d T=a(n,c,t);if(B<=0&&0<=T||B>=0&&0>=T)g[j++]=s(n,c,g[i],t);}for(u i=j;i<n;++i)g[i]=-
NAN;*r=j;return 0;}int main(){u n;scanf("%hd",&n);d c[n+1];for(u i=0;i<n+1;++i)scanf("%lf",c+i);d g[n];u r;h(n,c// stuff
,g,&r);printf("roots:%d\n",r);for(u i=0;i<r;++i){printf("x:%f\nf:%f\n",g[i],a(n,c,g[i]));}return 0;}// cmake C 99 x86_64```
so, as with other tutorials, interleave reading the thing and trying things for yourself
it used to work
I may try to run it now
this is criminal
ah, I can't
Clion expired
and I don't remember how to buiild it because I'm dumb
the fact that it uses derivatives instead of complex maths is more criminal
does it just look for turing point or points of inflection?
@vocal basinplease accept my friend request
2 6 -5 1
did you even send it?
x^2-5x+6
roots: 2, 3
you have friend requests turned off
I might
I see
@vocal basin friend request failed
-0 != 0 🤢

when the polynomial is of odd order, it binary-searches it to find a root
when the polynomial is of even order, it finds roots of the derivative, then binary-searches each monotonic interval (between roots)
like gradient decent?
not really
the more adequate solution is closer to gradient descent, I think
(the one that uses fundamental theorem of algebra)
but that requires complex maths
oh yeah
@vocal basin timotheyca
not today then ¯_(ツ)_/¯
I saw an explanation of that and it went right over my head
I roughly remember the constructive proof but couldn't be bothered actually translating into code
@vocal basin brother add me on your discord friend list
oh, wait, it's not a constructive proof
like, there is too much layers of abstraction to make it into one
used the fact absolute value of a polynomial can always be reduced if it's not 0
(when dealing with complex values)
I'm so glad i'm not taking maths further than highschool level
after proving that, the rest is "trivial"
sorry for that
@vocal basinmy English is weak
@lunar haven have u finished the tkinter thing
Visualization and "audibilization" of 15 Sorting Algorithms in 6 Minutes.
Sorts random shuffles of integers, with both speed and the number of items adapted to each algorithm's complexity.
The algorithms are: selection sort, insertion sort, quick sort, merge sort, heap sort, radix sort (LSD), radix sort (MSD), std::sort (intro sort), std::stable...
what the current DB looks like:
this is long term storage
another challenge?
may i ask why u wanna learn tkinter so much
like its a cool library but
im pretty sure it doesnt have any practical use
i mean i think
ohhh thats so cool
getting an answer to this question takes at most 7 clicks
and the answer is "sometimes"
I don't
this is the NN
but then
to run the code
you'll need the other files
this is GitHub
yoo
wassup
sry i dont have perm hahahaha
can you pls short explain what is this about, like the code
oooh
ok ok
idk, u tell me sir
sounds fun
yes ?
hi
hi
hi
just watching
i dont use it .d
cuz school groups
yes its original one
🤔
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.
yea
i don't want to talk
Can’t talk in voice chat? Check out #voice-verification to get access. The criteria for verifying are specified there.
Your input was invalid: command is a required argument that is missing.
Usage:```
.timed <command>
The command you are trying to time doesn't exist. Use .help for a list of commands.
is there a way to get verified faster?
Business Enquires: AuditingBritain@gmail.com
Yo! AB Here!
Auditing Britain's goal is to both educate and entertain by expressing the right to film matters of public interest .
ⵣ
minecraft is caling me
^ this guy is good
hi
We find interesting places and try to find out more about them.
Links to all my gear and much more here - https://linktr.ee/djaudits
Email - djaudits@gmail.com
is a private call?
idk
you can use it if you want
so many pepole are joining
@rapid crown
bye
see you later
Is there no mod that can verify me loL
i am not leaving actually
do you want to be friends
i have a channel
yes
how do you no
@wind raptor can you verify me early ?
Hey @lavish rover
ok
One sec, mic isn't working
i have 4 now
oh wow lol
i created mine
accunt
Zhaxxy
you are a big fan
my channel
i have 4
how did you get all of those cats
no urs
you lied it is okay
yes
am i the best
i like it
it is so cool
you have 2 channels
40 19 64
oh
sing a song like this 401964
my mom likes my vidios
i love this song
did you know in 1988 my mom almost died
srry
hey guys
hi
where is the lua server
this is indeed quite pointless
what the heck mman
i know my dad's password on his phone
my dad is napping
i have his number
okie
my dad will get angry
at me
and kill me
i am a cat
thx
i am going to share my screen
okie
like my video
okie bye
peace
can you not ping me for no reason
yes of course i love spongebob
what are you talking about?
@craggy linden do you like SpongeBob?
Nope
despite me telling Alibaba not to call me, they did it anyway
although
the checkmark was rather "do not advertise to me over the phone"
they were just asking whether or not I'm having trouble registering the account
If you would like to set up one of these free consultations, reply to this email directly, to schedule a meeting as convenient.
sounds like they just have people hired who have too much free time in the schedule
(I finally decided to read through emails)
use pentesting to convince people to pay for consulting
learning how to google is more important than learning not to google
@prisma pier https://javascript.info
there is also Svelte in addition to the most popular three
express is for back-end
C -> C++ -> Java -> C#
next.js is for back-end + front end
Deno is really appealing to me now
Both start with Ru?
@rugged root no, not memory leaks
Rust considers memory leaks safe
strictly safe
Box::leak is a safe method
memory safety is about UB not memory leaks
Gotcha
well u can always fuck it up if u are writing unsafe rust (specifically for drivers)
send methods or site that mentions em
"memory safety doesn't guarantee your program is free of bugs"
Box::leak
lets see
"the problem with Mojo is it doesn't exist"
"This Box can then be dropped which will properly destroy T and release the allocated memory."
and from_raw is unsafe
to properly drop it, you'll have to use unsafe
but not for leaking it
time for a v8 buffer overflow and a quick sbx escape to get js running on "your pc" instead of ur browser
looks okay
@orchid mauve https://javascript.info
from itertools import filterfalse
from math import isqrt
class Solution:
def constructRectangle(self, area: int) -> List[int]:
height = next(filterfalse(area.__mod__, range(isqrt(area), 0, -1)))
return area // height, height
javascript is javascript till it enters the microsoft's engine
they call it jscript ig
just talking in the context of the vc
@obsidian dragon you can achieve the same with div and CSS
same
You still want to learn the basics of JS proper, as TS still builds off of that
but pre/etc. are probably better
i mean till browsers drive away from js totally ig there is always a reason to learn it
TS just adds typechecking to a "generated" js
context
#voice-chat-text-1 message
Sort of. There's extra stuff
Ah, fair enough
no not fairenuf
py-script needs pyoxide which is bloat
unlike builtin js
updating PIP may break something
because of breaking changes
- pyscript has severe security problems
For pip? I've never had or heard of that
even their website example has severe security vulns
like XSS
when its safe sure
but for now not
That tracks
i would surely moveon once the browser implements builtin python support
waiting for JS to return to its original Scheme syntax
some stuff gets removed over time
things might depend on those parts
https://pip.pypa.io/en/stable/news/
Mint?
https://en.wikipedia.org/wiki/Binary_search_algorithm there was Leet code thing happening the other day and i thought of this to speed up the program to 99.7?
In computer science, binary search, also known as half-interval search, logarithmic search, or binary chop, is a search algorithm that finds the position of a target value within a sorted array. Binary search compares the target value to the middle element of the array. If they are not equal, the half in which the target cannot lie is eliminated...
uwubuntu?
u mean uwuntu
uwu lol
seems like yes, UwUntu
which program? which task?
99.7 of what?
i figured that would interest you, sorry gofek was doing something with ... hold on ill look
x300 speedup or top .3% time result?
that was just a guess something to do with quiker running the most people, character strings?
in Python, you can't really speed it up x300 because of test system restrictions
whereas for top .3% time, there are probably already people who are doing the same thing, so statistically unlikely; if the problem is popular enough
lower bound is around 30ms, upper bound is around 5000ms
The WordPress rich content management system can utilize plugins, widgets, and themes.
I guess it can?
self-hosting something like overleaf is nightmare too
In computer science, fractional cascading is a technique to speed up a sequence of binary searches for the same value in a sequence of related data structures. The first binary search in the sequence takes a logarithmic amount of time, as is standard for binary searches, but successive searches in the sequence are faster. The original version of...
@rugged root
What I do?
@rugged root
In computer science, binary search, also known as half-interval search, logarithmic search, or binary chop, is a search algorithm that finds the position of a target value within a sorted array. Binary search compares the target value to the middle element of the array. If they are not equal, the half in which the target cannot lie is eliminated...
What's up?
too complex unless you have enough data
<details>
<summary>
<span>Index</span>
<span>Timestamp</span> |
<span>Category</span>
<br><span>Project</span>
</summary>
<pre>
hello, <a>this</a> is an example
<span>code</span>
</pre>
</details>
@rugged root
check
123
147
159
Wait, for each one of these posts, are you putting it in by hand?
yes
PROJECT = "#DDDDDD";
VANITY = "#DD7034";
DISCORD = "#7289DA";
LOGBOOK = "#888888";
STARDRIVE = "#E5B723";
PCFIXIT = "#9A698C";
function recolor(y, i, c) {
console.log("coloring " + y + " " + c);
var z = document.querySelectorAll("details");
z[i].querySelector("summary").style.backgroundColor = c;
z[i].style.borderColor = c;
}
function loop() {
let x = document.querySelectorAll("details > summary > span:nth-child(5)");
var i;
var color;
for (i = 0; i < x.length; i++) {
y = x[i].innerText;
y == "Project" ? c = PROJECT :
y == "Vanity" ? c = VANITY :
y == "Discord" ? c = DISCORD :
y == "Logbook" ? c = LOGBOOK :
y == "Star Drive" ? c = STARDRIVE :
y == "PC FIxIT" ? c = PCFIXIT:
c = "#111111";
recolor(y, i, c);
}
}
loop();
looks like it can be a dictionary lookup?
what's that bro
active engagement with the stream
dictionary[y] ?? "#111111"
const colours = {
"Project": "#DDDDDD",
"Vanity": "#DD7034",
"Discord": "#7289DA",
"Logbook": "#888888",
"Star Drive": "#E5B723",
"PC FIxIT": "#9A698C"
};
can't you deploy with builds/actions?
to compile the thing even in GitHub pages
is that a twitch overlay?
I'd expect it doesn't
@rugged root
I Promise to never stream anything inapropriate and mainly stream in #764232549840846858 and I soully take responsebility for everything on my screen
you can have a temporary database during actions
no less than 3 spelling mistakes
I think you can even store the result
but I'm not sure
there is a storage limit for actions
but I don't know what exactly it means, other than temporary storage
thing
@rugged root it can just be stored as a file near the index.html
stewie griffin
easily queriable, as it's the same domain
you can store Markdown/JSON/whatever
fetch it
and then render it
I was writing a tiny website to display statistics of how much sponsored content a Youtube creator has over time when I noticed that I often write a small tool as a website that queries some data from a database and then displays it in a graph, a table, or similar. But if you want to use a
wait
thats not safe
You can sanitize
is writing even possible there? I wouldn't expect so
There's always a way
hmm
eh
you would need to have server-side code for that
client controls the JS site
client side js , ez just put a web proxy and boom
!d itertools.tee
itertools.tee(iterable, n=2)```
Return *n* independent iterators from a single iterable.
The following Python code helps explain what *tee* does (although the actual implementation is more complex and uses only a single underlying FIFO queue):
@maiden quiver How goes it
@rugged root all good how are you?
Not too shabby. Just shabby enough
@rugged root got you, just here to listen in.
checking my Rust code base for places where it can panic
most of it seems to be in test code
also trying to simplify the import structure so I don't need wildcard imports
or maybe I choose wildcard imports are good enough because I control the code which is getting imported
- it's statically compiled, so less ways to fail
yes, it does have them
statically compiled languages deal with it a little bit better
some people openly advocate for using them in, for example, Java
and, also, like
C#
where it's a normal thing
I almost don't remember ever seeing someone import a single class instead of the whole namespace in C#
Wonder if it properly prunes off the things it doesn't need
well, yes, because it's static
XHTML is the one that's a separate language
apparently, strict structure didn't go well with HTML nature
@peak nacelle server or peer-to-peer?
@orchid mauve are you running it behind a proxy?
@peak nacelle SSL?
Cloudflare fucks over users quite a lot
but it protects the site owners very well
@rugged root can i simplify (a==1) pr (b==1) to ((a or b)==1)
not in Python
u sure ??
!e
print((2 or 3) == 1)
@vocal basin :white_check_mark: Your 3.11 eval job has completed with return code 0.
False
@vocal basin :white_check_mark: Your 3.11 eval job has completed with return code 0.
False
it seems to be working
this
oh
@vocal basin :white_check_mark: Your 3.11 eval job has completed with return code 0.
2
oh so it takes the value that is different than 0 cause 0 == False
what amazon acquisition?
(I heard Discord not Twitch, so that's why asking)
!past
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.
x or y is equivalent to x if x else y
mostly
bool(x) for x that is int is equivalent to x!=0
alright thank u
@pure gust Is it possible to request for a time slot where I can use the Live Coding room to teach some Python or Django concept (maybe for an hour)? [Obviously after I get voice verified]
wrong hemlock
your first message was yesterday and it was already pushing about getting streaming for python tutorials
why the eagerness?
@gentle flint Just trying to ask @rugged root directly because it looked like he was online. If it is a clear No, then I'll just shut up about this.
Since it looks like I need to justify my silence. It's just that I have been more of a lurker, but realised that I will have to participate if I plan to get more involved. So I am not a bot, I know I have not messaged a lot before this. But plan to participate more going forward.
the government wants companies to Provide "Quantum-Resistant" Keys for future issues.. so the way it is now, people are storing encrypted data for future use of a quantum computer...
what?
how dose a programmer rectify an encryption to be "quantum-resistant" when the way quantum works is identifying every possible combination. this SEEMS unresonable.
resistant to known quantum algorithms so far
even if the quantum computer can process all possible states, getting a coherent result out of it is still difficult
what about semi-coherent?
define semi-coherent.
there's enough info to rectify data into "Something" mathematics can "fill in" gaps.
much like a CD gettting scratched
noise
you can't get more information by post-processing
maths isn't magic
if the computer outputs basically nothing, you can't "fill in the gaps"
@vocal basin no, however nothing can be state of mind lol
operator.xor(a, b)``````py
operator.__xor__(a, b)```
Return the bitwise exclusive or of *a* and *b*.
... if you have enough terabytes of a secure key
@whole bear do you know the original video of the cat?
I'm not against the idea. Did you have a particular lesson plan or something in mind?
i am back
wtf
map = {}
'x str' = '-5000'
'y str' = '-5000'
'x' = -5000
'y' = -5000
'xy' = 'x str' +,+'y str'
map = map +'xy'
while 'x','y' != 5001,5001:
'x' = 'x' + 1
'y' = 'y' + 1
'x str' = 'x'.str()
'y str' = 'y'.str()
THIS is a facinating learning experience of quantum computers incase anyone is interested
A quantum computer in the next decade could crack the encryption our society relies on using Shor's Algorithm. Head to https://brilliant.org/veritasium to start your free 30-day trial, and the first 200 people get 20% off an annual premium subscription.
▀▀▀
A huge thank you to those who helped us understand this complex field and ensure we told...
.sins
Thank you @rugged root I had a few:
- Building something simple in Django, maybe something from https://nedbatchelder.com/text/kindling.html or from https://github.com/karan/Projects
- I work extensively with Scrapy so I could teach that very well too. Building a simple Web scraper (there are test sites to use for such purposes so that we do not disrupt actual ones)
New programmers often need small projects to work on as they hone their skills. This is a list of project ideas that beginners can tackle.
.wondertwins
Form of super cool balls of steam!
Your input was invalid: Your message must have content or you must reply to a message.
Usage:```
.uwu [text=None]
@whole bear
there is audiorelay
but it's proprietary
okie
@ebon mist is map supposed to be a dict?
@ebon mist awesome look at the video what your trying to do
Papers We Love Conf 2022
https://pwlconf.org/2022/deirdre-connolly/
Transcript: https://pwlconf.org/2022/transcripts/Papers_We_Love_Deirdre_Connolly.txt
Deirdre Connolly / Zcash Foundation
Isogeny-based cryptography went from a curiosity to a serious post-quantum contender arguably because of this paper from Costello, Longa, and Naehrig from...
the way chunks are stored is closer to a dictionary than to a list anyway
can someone sub to my channel
I'm falling to your knowledge
limited for correctness reasons rather than structure reasons
xy_map = []
for x in range(-5000, 1):
ymap = []
for y in range(-5000, 1):
ymap.append((x, y))
xy_map.append(ymap)
Will this work @ebon mist ?
there are also R-Trees
try it
ok
this is actually approaching GIS
I'd suggest not bothering with writing a data structure yourself, at least at first
(and using something like rtree package instead)
pharmarchism
wait, how many points this is?
sounds like
a lot
25M?
Can you give a short example of the output you are looking for?
what will the keys of the dict be?
time to integrate SQL into numpy
Yes. But that is what @ebon mist was looking for, or atleast what I understood of it at the time.
{'0.0':{state}}
What do you mean exactly, you can already import and run queries no?
that is what's called a "joke" referencing the context in VC
So this is;
{
'x.y': {'some-string that is a state representation'}
}
???
yes
@vocal basin Yo
"so far"
!e
from pprint import pprint
from random import randint
d = {}
for _ in range(10):
d[(randint(-5000, 5000), randint(-5000, 5000))] = None
pprint(d)
@vocal basin :white_check_mark: Your 3.11 eval job has completed with return code 0.
001 | {(-4635, 3422): None,
002 | (-650, -3149): None,
003 | (-552, -4059): None,
004 | (-71, 3257): None,
005 | (15, 4800): None,
006 | (925, -2757): None,
007 | (984, 326): None,
008 | (2119, 158): None,
009 | (2155, 4996): None,
010 | (2873, 418): None}
!e
import rtree
@vocal basin :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 rtree
004 | ModuleNotFoundError: No module named 'rtree'
depends a lot on whether you need it all filled in as the world expands
xy_map = {}
for x in range(-5000, 1):
for y in range(-5000, 1):
xy_map[str(x) + '.' + str(y)] = "State-here"
@ebon mist
I think tuples are easier to manipulate
Fair
all the string conversion can be done during ser/deser
@ebon mist probably wants to do this only once for some sort of level generation. But yes this can obviously be optimized further
True
They seem to be talking about it in the Voice Chat 0 voice channel
Yes, you just need to dump the xy_map to JSON
Add:
import json
...
jstr = json.dumps(xy_map)
with open("mapjson.json", "w") as f:
f.write(jstr)
K thanks 👍
anyone knows bs4 here?
I can help. Please don't ask to ask, just add your query in full and people can leave their responses when they see it.
i want to scrape youtube links from this
https://www.youtube.com/@PW-Foundation/videos
Physics Wallah Foundation provides the best quality educational content for 10th and 9th grade students, targeting board or school exams in 2024
We provide with exclusive learning content for Mathematics, Physics, Chemistry, Biology, Social Studies, and English with top-notch, experienced faculties from all over India
Here at PW, we cater to...
of first 5 videos
GeoTIFF is a public domain metadata standard which allows georeferencing information to be embedded within a TIFF file. The potential additional information includes map projection, coordinate systems, ellipsoids, datums, and everything else necessary to establish the exact spatial reference for the file. The GeoTIFF format is fully compliant w...
It reminds me of the Magic Eye source depthmaps.
wait
Cool
1 sec
!ytdl
Per Python Discord's Rule 5, we are unable to assist with questions related to youtube-dl, pytube, or other YouTube video downloaders, as their usage violates YouTube's Terms of Service.
For reference, this usage is covered by the following clauses in YouTube's TOS, as of 2021-03-17:
The following restrictions apply to your use of the Service. You are not allowed to:
1. access, reproduce, download, distribute, transmit, broadcast, display, sell, license, alter, modify or otherwise use any part of the Service or any Content except: (a) as specifically permitted by the Service; (b) with prior written permission from YouTube and, if applicable, the respective rights holders; or (c) as permitted by applicable law;
3. access the Service using any automated means (such as robots, botnets or scrapers) except: (a) in the case of public search engines, in accordance with YouTube’s robots.txt file; (b) with YouTube’s prior written permission; or (c) as permitted by applicable law;
9. use the Service to view or listen to Content other than for personal, non-commercial use (for example, you may not publicly screen videos or stream music from the Service)
We don't give support for this
@dapper mist i want to scrape the href in the youtube
its mine assignement
here is the attempt
Again, we don't assist with scraping YouTube here
It's fine, now you know
Noted @rugged root I was just pointing to a better solution since I do not think what he is trying to do is possible with BS4.
Newb, the bot embed message should tell you
$ /bin/python3 /home/pappycat/Desktop/code/project-peacock-rpg/0.00.05/main.py
Traceback (most recent call last):
File "/home/pappycat/Desktop/code/project-peacock-rpg/0.00.05/main.py", line 4, in <module>
xy_map[str(x) + '.' + str(y)] = None
TypeError: list indices must be integers or slices, not str
try xy_map = {}
@terse needle is right - I edited the original
xy_map = {}
And then you get to know that everything is an object in Python 😛
does position of the function determine which one is executed before the other or does the order of which one is called first determine it
Why would the order/position matter? Functions only work when called right? Or did you mean something else and I am missing the context?
like lets say I def funcA and func B and then call funcA() and then call funcB()
I assumed that funcA would do it's thing first
but in my code funcB executed before
You probably have funcA calling funcB or something of this sort. Could you paste your code here?
Is it multiple files or is it one file with lots of code?
it's about 146 lines
can you use pastebin.com , paste the code there and then share the link here?
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.
Cool, looking at it now.
I am trying to reset the thing but it resets before even creating the x mark
Which functions are we alking about now?
which is not what Inteded
let me explain how to it works
so currPos takes in the postion where I clicked
and checks which grid it is with a lot of if statements
and where it is it creates an x image
or o
with a variable name "a" holding how many moves
if a >4 it calls check()
check sees if it's 1 of the 8 conditions and prints player 1 wins or player 2 wins
and then I want to reset
the problem is reset for some reason is called before drawing the last X or O
it's hard to explain the problem run the code
@ebon mist can you paste your error here?
So it looks like the reset() method is being called because your remaining conditions in yoru check() are not working correctly or succesfully
I don't think I will be running the code sorry.
But I'd advise trying to refactor the code by removing the global variables, they can cause a lot of confusion or overlap or unexpected behaviour. That could be one cause of the issue.
you can write to a file directly with json.dump
or, if you're using dumps, you can abstract away the with-open-write using Path("mapjson.json").write_text(jstr)
Cool, was not aware of writing with dump
import json
xy_map = {}
for x in range(50,1):
for y in range(50,1):
for x in range(-50,1):
for y in range(50,1):
for x in range(50,1):
for y in range(-50,1):
for x in range(-50,1):
for y in range(-50,1):
xy_map[f"{x}.{y}"] = None
print(xy_map)
jstr = json.dumps(xy_map)
with open("mapjson.json", "w") as f:
f.write(jstr)
?
No
I FIXED IT
I mean the best thing to do is to try
I just needed to update
wise words master Hemlock
@dapper mist it seems that the function did work but it just wouldn't show what happened until it finished
why is 'mapjson.json' blank??
@ebon mist any errors show up? did you search for the file? maybe it is created in a different place?
i dided
OK. Can you replace xy_map[f"{x}.{y}"] = None with xy_map[f"{x}.{y}"] = 'hello'
i got it ```py
import json
xy_map = {}
for x in range(-50, 51):
for y in range(-50, 51):
xy_map[f"{x}.{y}"] = None
print(xy_map)
jstr = json.dumps(xy_map)
with open("mapjson.json", "w") as f:
f.write(jstr)
and it worked!!
is ```py
((a==b==c==d)!="")
no
you are checking if they are all equal and if the boolean result of that is not equal to ""
damn it
all(item != "" for item in [a, b, c, d])
all([a, b, c, d])
... assuming those are strings
it might work if you remove parentheses
but that's not the most clean way to check that all are non-empty
though
it needs them to be equal
so it won't work for "a","b","c","d", for example
!e
print("a"=="a"!="")
print("a"==""!="")
print(""=="a"!="")
print("a"=="b"!="")
@vocal basin :white_check_mark: Your 3.11 eval job has completed with return code 0.
001 | True
002 | False
003 | False
004 | False
oh, wait, I put the cross the wrong way
corrected version
or like this
.
Alisa, I unable to talk in serer
Has your privacy been previously violated or something?
And in fairness, that's any public forum
i'm at work and I can't be my regular online self.
Goooootcha
I thought you meant no privacy because it would be in this VC
I'm with ya now
is bigger code better than smaller code ? aka does size matter ?
usually the opposite
but it always depends on the context
the larger the code, the higher the "cost"
"cost" not as asset, but as a liability
lol
@lunar haven yourself
haha
finally used your name properly
indeed
keep the love going
nani
love is an unstoppable force
what do u think would represent an immovable object
what's the cooldown time to speak in voice
@lunar haven just had a ketchup burger
it was trash
like going to a bakery
too much bread is too much
it feels too healthy
i quit starbs
ohh yeah
food pyramid is western propaganda
ur eating too many burgers
eating burgers no bread jus keptchup
ngl i dont drink water
i jus drink juice
new and improved
how much pure water do u drink
i threw starbucks under the bus
yo
i whistleblew
i'm trying to get voice to work
W
voice is suppressed for me, presumably because i just rejoined the discord
i dunno why i left
lol
wazzup?
finds the bus 🤣
its very serious
I believe u
i took the hands of god
blumewique
replaced it with buns, pickles, cheese and a burger
brb
bloom in wick
gotcha
had to think of a username
i like the word bloom a lot
and then thought of a random thing
bloom in wick
yea
like the tip though
where did gofek come from
a generator?
i love gofek
gofek yourself
practice for interview or just leetcoding 4 fun?
brb
yeap
< 3
is it?
ahh yeah aha
I should start working my leet code skills too
U working already?
Noice, I'm might start with that too
Those are the hardest ones right? (DP)
ahh gotcha
yh
i would do leetcode but i can never comprehend the questions
idk what it is but i just cant comprehend
you gotta practice bruh
true true
gotta start somewhere I guess
yeah
ive been using codechef
which is leetcode but for stupid people#
I used to go on binarysearch.com but it died #RIP
any thing is good to stimulate brain
you killed it
maybe, I was to good 4 that
or maybe you learned something you musn't have learned
NOT YET
thus it was struck by the hammer of banishment for violation of the law of the universe
so you should always use what you learned from dead sites to achieve greatness and honor their sacrefice
gofek died
A lot if, I don't unterstand anything
Hey
for me one confuses the other, but I understood what you are saying
Undertand*
ps. My english is not good, but i'm trying rs
HI
@lunar haven you tagged me 🙂
@lunar haven i'm not seying your screen, can you restart the transmission please
now yes
thanks
Ok, I just saw it now, sorry
Yep
what time is it? in their places in the case
This time
6:75
Damn
Sorry
6:57
I am from brazil, here this is only like rs or lol
here is 8pm
🙂

you all are from america?
I don't think so
I wanna go someday to visit, one day...
Well, to see other culture too
Ops
No no, I marked for mistake
The Brazilians who go there talk a lot about it
My English is very bad? If you don't understand something, just let me know and I'll try to fix it, like on time
Noo
It's really far
Yep
Brazil! Hello
oi (Hello)
tururu
Sabe português? Tudo bem e você? (Do you know portuguese? fine and you?)
rs
@whole bear idn if this is correct, but is a estimated data
Its not my intention
But yes
Que legal!! (how cool)
Se quiser conversar alguma hora para aprender algo só me chamar! (If you want to talk sometime only for learning something, just chat me)
Wow, I not see that :-0
Eu traduzo por conta do nosso amigo inglês entender mais ou menos o que está acontecendo (I translate because of our english friend)
I like too, in brazil we love pizza
only for you know, yes
I see here
Ohhh, now I understand that part, thanks
I don't like it
It's strange, but I prefer java, if I not use python, of course
ima dude
lo
i came to ask for help
What do you need?
Hello
help with my discord bot
i coded it setup everything. but i can't run it
show the message error please
i wish i could screenshare
We need to be in here like 3 days to liberate that ye?
Your python version is ok with that?
im on the recent one
But some libraries don't have the suport from the recent
dms?
I like food
We're all different

Hi!
Not avalible for voice)
Im sorry not so good in english. You want coffe ans shower? Got you right?
😄
I speak only russian learning english
How long you learning python?
Have good time! 🙂
Ahah
What
hello
im just joining for fun
its fine to ping me
i setup something earlier and it delets it self if it goes out of the file it was created
for whatever reason
i copyed it but then it dissapeares
so i have to turn it into a zip then unzip it somewhere else
for it not to self destruct
yea
nah i use software for zipping but
i can create somethign to destory eardrums with python
pydub
i sent it to you
its good for exploding eardrums
i dont know if i can
oh here
yea
i mean its not horrible
oh it is
i forgot im at 27 percent volume






