#voice-chat-text-0
1 messages ยท Page 215 of 1
โ @whole bear can now stream until <t:1699848760:f>.
What's the question?
its ok no one can help unless i screenshare
its like 300 lines of code
and its in c++ and i know this is a python discord
i was just asking to see if i got lucky
if osmeone could help
its a g++ thing idk how to use g++ cus i just started but its ok dont sweat it g
what is g++..?
@glacial geode ๐
!voice ๐
Canโt talk in voice chat? Check out #voice-verification to get access. The criteria for verifying are specified there.
Rip for now
@warped jacinth
@somber roost ๐
Hi!
hey opal :D
hi hi :)
no hello for me...? :(
I said hi when you joined. I was talking about the music in my head.
"Yum yum Bumblebee, Bumblebee Tuna..."
oh sorri
๐
:hi:
how you doin'?
good thanks
i'm a titan
Hi Titan im djay
ok you didn't get the aot refrence
no apple โ
Note: As of 2023, the compiler is no longer functional due to the DreamBerd language being too advanced for the current state of AI.
no. Can only handle 300 max
@green fable ๐
Because that is what an int range is
i think it comes from 2 bits being used for memory stuff. I don't remember the exact reason but they are being used for something else
and then there's this also
https://hackage.haskell.org/package/base-4.19.0.0/docs/GHC-Integer.html
python, javascript, java, clojure, rust, c, cpp, c#, v lang, golang, lua, php, julia
python, js, java (&processing), rust, cpp, c#, perl
does OCaml support anything equivalent to Rust's GATs? (or to Haskell's higher-order class thing allowing for Functors/Monads/etc.)
iirc, ML and its direct-ish derivatives on their own don't go that far into type system
GAT -> generic associated type ?
my limited understanding about it In Rust :
associated type -> inner type declared in a struct or trait type
generics -> abstract some parameters in function or class, it can be used by specifying other concrete types
OCaml , new language to me ๐
yes
I don't remember what the Haskell equivalent is called
the basic thing there is just classes of type functions
or generic types, or type constructors, or whatever they're called
Maybe T
^^^^^ this part can be generic'd over and have interfaces defined for it
and then there was 1 unmute
"we're in 1990s, ajax isn't a thing yet"
someone free me from css :
just use another dialect of css, so you suffer from something else
i've been writting style for days ๐ญ
scss and others
anyone done code syntax highlighting with django tinymce?
I didnโt
As in implemented it myself?
"Trusted WYSIWYG editor"
yeah it's weird
but other editors suck
i wish wagtail wasn't so weird
i'd use that instead
but i just can't get what is happening in there
@rugged root
editor on the site, for users to use
so that they don't have to figure out how Markdown works
also easier to add image to it
Ohhhhh
if i can get the plugin to work ๐
I don't like using wysiwyg editors myself, but I'd expect a "median" person to prefer them
@obsidian dragon https://github.com/MSPaintIDE/MSPaintIDE
the real visual programming
scroll diagonally
I set vertical lines in VSC to see when it approaches the limit
three lines for Markdown because yes
86, 99, 100
to only use 100th character for \
and 86 is for code samples, because mdbook
๐ฎ
(since it's line continuation with no meaning in the output)
yep i got it
i have mine at 80 and 120 but really only care about the 80 one
i let prettier / black / gofmt / etc handle it for me
keeping lines 80 or smaller
Camcorder โโโโโโโโโโโโโโโโโโโ$228.00 - https://www.amazon.com/dp/B00R5LH9HO
Memory card for camcorderโโโโโ $9.99 - https://www.amazon.com/dp/B010Q588D4
Tripodโโโโโโโโโโโโโโโโโโโโโโโโ$36.99 - https://www.amazon.com/gp/product/B0B56CBRZY
Portable audio recorderโโโโโโโโโ$169.99 - https://www.amazon.com/gp/product/B07WRDLNQZ
Memory card for recorderโโโโโโ $13.74 - https://www.amazon.com/gp/product/B005LFT3QG/
otherwise continuing the line might require moving the last word to the next line
aaaaa aaaaa|
|
aaaaa\ |
aaaaa |
for markdown, there's markdownlint
seems to be the main md formatter/linter for VSC now
or at least the one that the extension marketplace promotes
dot net
each time it opens a broken .net non-url
so you need to pronounce h t t p s colon slash slash w w w each time
write clean functions
and messy data structures
"this is a method not a function, so we're okay with having it 50'000 line long"
> "let's recreate a pyramid"
> *proceeds with making MMM 2*
for everything browser-side I normally just read MDN
"not to be confused with MSDN or else you end up learning ASP.NET"
@rugged root
"now... before now we were just lying"
"we made our food even healthier! did we claim earlier it's as healthy as it can be? absolutely yes!"
food situation here gets to the point where fast food is genuinely one of the healthies options
at least for meat
derivative of acceleration? (or second derivative)
second derivative is snap
"everything written by this pen is defined to be grammatically correct"
so no spelling issues
This just feels like a weird graphic
his soul is being pulled out of his mouth into the device
sipping the sound
a nice cup of joe (literally)
hawt
โ!voiceverifyโ
didn't, like, pubg have that issue?
despite it being multiplayer
official response
https://store.steampowered.com/news/app/578080/view/4580680095902946229
Hey everyone, Recently, the community has raised an issue where, in several games including PUBG, the firing rate of weapons was being affected by the frames per second of a playerโs PC. Today, we wanted to take a moment to talk about the cause of this issue and what weโre doing to help alleviate it in PUBG. The current implementation of shootin...
monogame (engine), I think, is locked at 60 fps
it might have separate Draw and Update cycles
interleaved not one-to-one
so even before renaming to pubgbg
that naming failure is even listed here
https://en.wikipedia.org/wiki/RAS_syndrome
RAS syndrome (where "RAS" stands for "redundant acronym syndrome", making the phrase "RAS syndrome" autological) is the redundant use of one or more of the words that make up an acronym in conjunction with the abbreviated form. This means, in effect, repeating one or more words from the acronym. Three common examples are "PIN number"/"VIN number...
and then there's Spain with permanent summer time and summer summer time
@dry jasper yes, a different person
they left
What is this pop filter
It's so cute
only real ogs got it
You'd be breathing right into its face
But look at cute smile
what's this for?
It was what I thought we'd need for recording training sessions. But they just weren't good at explaining what they needed
developers?
Accountants
o
I'm Administrative Support at an accounting firm, but my primary duty has been IT
What did they end up needing?
Webcam and https://www.amazon.com/dp/B0899S421T/
Because they didn't explain what they wanted properly or kept changing what they wanted
Love that for you
Meh, it what it is
I mean, that's IT
Exactly
lol
Hell it's anything
"my printer stopped working"
"I forgot my login for Outlook"
"my screen freezes when I have 1,000,000 tabs open"
lol IT is for the patient
More like "Quickbooks is misbehaving again" or "Lacerte is misbehaving again" or other program
"printer is behaving as usual. then what's the problem? it's usually broken"
I've said it before, I'll say it again. Printers are sentient and they hate us
in a war between firmware and humanity, printers joined the firmware's side
What is rtc connecting mean?
discord being broken, or network being broken
usually resolves by waiting
And sometimes it just refuses to work
Is it because I am using a vpn?
Possible
Yep that was the problem
I don't remember playing anything in the last ~11 days apart from minesweeper
currently looking through different illumos distribution
(I'm having weird ideas again)
!d os.fsync
os.fsync(fd)```
Force write of file with filedescriptor *fd* to disk. On Unix, this calls the native `fsync()` function; on Windows, the MS `_commit()` function.
If youโre starting with a buffered Python [file object](https://docs.python.org/3/glossary.html#term-file-object) *f*, first do `f.flush()`, and then do `os.fsync(f.fileno())`, to ensure that all internal buffers associated with *f* are written to disk.
[Availability](https://docs.python.org/3/library/intro.html#availability): Unix, Windows.
first, this, or equivalent
to make sure it actually writes
second, plain text file might not be enough
because it can crash mid-write and corrupt
usually it would allocate, then write, so you should be able to catch such errors
(i.e. if it contains "\0", something is probably wrong)
using some lightweight database might be good enough
I've made a plain text DB once (log-based) but it required auxiliary files to track its state (in case of a crash)
do you keep the copy of the data in memory?
a very cursed solution could be to load everything that's not sent yet into a message queue (like rabbitmq)
and then take things out of it using a separate process
rabbitmq allows persistent queues
it would also help with tracking which files failed, which need to be retried, etc.
Back later
idk how hard AMQP is to interact with in Python
the commonly used Rust binding (lapin) is very different from pika
pika actually tries to represent the two-way RPC model, whereas lapin abstracts it away
this should also be easily scalable
just by starting more worker processes
the protocol that rabbitmq implements
iMatix participated in the creation of AMQP,
then they decided that it's too complex and created ZeroMQ
No, ZeroMQ was created by they wanted messaging system that doesn't involve having seperate broker
that too
it's also why beanstalkd was invented, someone wanted less overhead RabbitMQ
any comments on asyncio thingy
well using tkinter ( gui loop ) but need to branch off run text to speech uninteruppted and also pyserial stuff
click button -- send token byte message out pyserial
but also receive message - full duplex
do tts library/pyserial provide an async API?
so if a remote sensor senses water sends byte message and the gui loop thing will say - water detected
good question --- was tinkin async was the solution or maybe thread
if they don't provide an async API, it will involve threading/multiprocessing anyway
so they most likely were clever enough to include it
it might provide a callback API which is almost good enough to integrate directly with asyncio
no idea how to do that but sounds good as a lead
for creating threads from async:
asyncio.to_thread
for scheduling tasks from threads:
asyncio.run_coroutine_threadsafe
if you're doing many concurrent tasks, than, yes, pick pyserial-asyncio
it will do the heavy lifting for me ?
scheduling mostly
async and thread for other stuff kinda
hopefully, it will be able to run multiple tasks with few threads
at least it should if it uses epoll or something similar
a branch off from the gui loop and pyserial i want to check a clock ( scheduled events )
check event time but dont get bogged down in loop or any other process
the general pattern would be to have a separate thread with an event loop that would actually handle the events
and the main tkinter thread would just send messages to it (using asyncio.Queue+asyncio.run_coroutine_threadsafe)
making notes...
thanks for that - i will study through each component you mentioned - im a clunky coder , not pythonic , my code seems to run eventually but needs improvement
flashbacks to buying that sata power cable
(but that was aliexpress not amazon)
@dusk raven algorithms or data queries?
as far as I know, deterministic algorithms for such problems often fail because of how hard they are in general case
relying on data being "realistic" can make it an easier problem in specific cases
that's where stochastic procedures provide perfect or almost perfect results frequently enough
usb 0
so, heuristic to accelerate the search? (by not stumbling around the same point for too long)
this is the first time I ever see google suggest only one "topic question"
I will look into it later (right now doing Rust work)
@earnest crag does bank's ToS allow that?
Did the taliban break the twitter TOS?
if you're sending/receiving payments, use APIs of the corresponding bank/payment processor
ยฏ_(ใ)_/ยฏ
what is it bottlenecking on?
CPU? GPU? RAM?
100% of one core or of the whole system?
pytorch cuda
are you able to achieve higher FPS with lower resolution?
it won't work on AMD/Intel GPUs
CUDA seems to be supported basically everything
https://developer.nvidia.com/cuda-gpus
that's just the link of supported nvidia cards
one of solutions described an hour ago
this is supposed to abstract threading away
depends on the library you're using
normally everything goes into a single thread
when resonding to events:
tkinter thread AI thread
| |
\ |
| receives event |
| sends it to the queue \
|---------------------------------->| receives an event
| returns | processes it
/ |
|<-----------------------------------| sends the response back
| /
| |
and for repeated long-running tasks it would just be a thread controlling the tkinter widgets
widget
iirc, tkinter is thread-safe so you can just share widgets between threads
as in it won't explode and crash
Gotcha
I remember doing this folder icon stuff in Windows XP but didn't really use it afterwards
VSC+Pylance should be enough to catch most such errors
PyCharm shows errors too
default Python extension
then there's Rust with its Error type in every other module
(all those error types are different and incompatible)
but it's idiomatic
last time I actively looked for project ideas was probably in 2020
and now I have a job that's interesting enough that I don't really need that much stuff outside of it
(well, "job" in quotes, rather, since it's contract only)
we have blockchain voting deployed in our city despite that voting being faked anyway
like
it might even be technologically correct in its foundation
PvPvE coding
20 humans and 180 bots join the same IDE workspace
only one might be left standing
replit has "debug with AI"
it's bad, but it exists
it might be bad because I don't pay for it
online code ide
I managed to make it solve this
https://parrrate.github.io/exercises/exercises/get_functions.html
by repeatedly saying "you're not allowed to use this"
I remember having a laptop with a touch screen
I still have but it's broken-ish
9 years ago
get a bigger pocket
typewriter
less tech, more noise
I think it's one of the most important courses in uni
like, very hard to find online in a systematic form but you're just fed that information
(OS course)
My OS course pr much taught me most of the relevant shit to get into my low-level job
I had something remotely reminiscent of "I don't want to deal with it" a couple of times at work
but getting over it is kind of easy if approached right
mirros
"Shortest Remaining Time First"
even in asyncio usecases
when you have to fit tasks onto something
like
even discord bots
how tf do i build vs code from source

literally this link
you have better luck calling Oracle that
but still even they have open source
yea
... even if much of it was just what they couldn't close
run main
thanks
if you close the first one, second will stay running, I'd expect
overleaf can be self-hosted
(don't do it unless you're ready for pain)
LaTeX in Docker is pain
if you don't want to make an account
https://github.com/overleaf/overleaf/wiki/Quick-Start-Guide
failed and proud
is 1.9 GPA in Germany good or bad
"if you like Venn diagrams, here's a simple explanation"
failing something this simple -- not so good
(as in need for job)
now reading this (in web archive since the link is either dead or unavailable locally)
http://www.imatix.com/articles:whats-wrong-with-amqp/
50 projects that are too useless to list
if you can't at least name/tag/describe it, it's irrelevant
that was just three bubbles that accidentally overlapped
^ would be a generous excuse
little evil
@rugged root and templates?
the rightmost one's name sounds suspicious
(powerpoint)
"Polished resume"
what does it even mean for a template
A lot but messaging systems are used because alternative is worse
Like SMTP sucks as well but replacement is worse
hi
yeah, now that I finally use message queues, everything just works
amqp is pain to understand at first, but it's more from getting it misrepresented earlier
Python doesn't have a plotting system
matplotlib is a standalone library
numpy doesn't ship with plotting capabilities
import matplotlib.pyplot as plt
import numpy as np
# and use any tutorial, it's likely good enough
also matplotlib docs are relatively easy to understand
i hate it when im using i3wm and im using tabbed mode and then my discord goes to commit die
the company chose rabbitmq before I joined,
so it's not as possible to move to beanstalkd now (since no one will change anything obviously nor abstract it away)
also today at school i got the option to go into this programming class and i was literally better than the teacher (totally not to brag btw)
better in what way?
more skilled in programming
but to be fair he hadnt coded in like 10 years
@flint hill send code samples so it's easier to understand
measured how?
i corrected him and predicted his next actions
many teachers don't seem to be that good at actually coding itself
import matplotlib.pyplot as plt
X, Y = ...
plt.plot(X, Y)
X = ...
y = ...
plt.plot(X, Y)
is the question about difference between those two?
"two-layer dictionary" being this?
dict[Key, dict[Key, Value]]
for most applications, this is equivalent
dict[tuple[Key, Key], Value]
for me?
you can create an adapter class
no
both ways
easier to do for read adapters (views)
(from a template)
I somehow don't like the adjectives used
i named my visual studio code distribution "visual studio BALLS"
because im so grown up (totally)
also my english teacher has this poster that says "i like cooking my family and my pets. use commas, dont be a psycho" and i thought it was kinda KINDA funny
plotting functions are quite lenient in what they accept
who tf is getting pinged
most of the times I use a debugger it's accidental
not a class
identifier (variable)
it's like Meta
no way #python-discussion is muted
It's happened before.
Just been a little while
The last time I remember it happening for a substantial time was the Lemon everyone incident.
@turbid sandal rerember me?
australian internet
@turbid sandal im actually learning it too for my workplacement
the openai
@uneven reef Yo
I need cereal
hey, I'm not really in the mood to talk today
Login to your Chess.com account, and start enjoying all the chess games, videos, and puzzles that are waiting for you! If you have any issues while logging into your account, do not worry. You can recover your password, or drop us a message and we will gladly help.
People do that.
@visual mango wyd?
chillin
what goals do you have in life
jk
i'm actually asking myself that q on a daily
Word
!voice @shrewd gate ๐๐
Canโt talk in voice chat? Check out #voice-verification to get access. The criteria for verifying are specified there.
Wrong one. One room down.
My title
cute
I too enjoy lengthy conversations about centering divs
anyone in here call themselves a 10x dev?
saw an INFx developer the other day..
automated infinitely many devs jobs
like if one guy could launch 1 website in a day
10x could launch 10
infx could launch as many as you want
dude was hooked in
Interests? women
and anything that gets that
programming, music
Fish in a Birdcage
Crab in a bucket
Like 50 messages to verify voice speaking that's wired guys
and 2 week bans when attempting to circumvent
It's not all that hard. Just chat with us
Like i wanted to be typing i was not gonna join in the VC
Whoever does something wrong ban him/her
No worries.
Well, if you try to circumvent the rules, then you have to deal with a longer time
ยฏ_(ใ)_/ยฏ
so much oppression going on in this place ๐ญ
If that's what you want to call it
the waterfall tears speak for themselves ๐ญ
i like the tears
They do
Struggle?
Watching who struggle?
Are you struggling?
You're far from banned. A 14-day voice mute is the normal repercussion to circumventing the voice gate. If you feel that the infraction was inappropriate or unwarranted, you are free to message the @rapid crown bot and appeal the infraction with the rest of the staff.
It seems I am voice banned. English isn't my strong point, but ban is defined as anything officially prohibited\
@sage grove when does your voice ban expire?
It's a voice mute
heat death of universe
i dont negotiate with terrorists or talk to cops
๐คฃ
the locus of points equally far away from a center point
I would wonder if that definition captures the connectedness of the circle
and if center point is well-defined
given an infinite space
if we can't well-define a center point.. what can we do..
if you have 2 legs and you take away one how can you walk
you can limp
1/inf
hellooo
orrrr put it all online
the more they know the more you make
I got my city out there
When I was a young lad
sir
cough
cough
eveeeeeryone
I dont know anyone
i just woke up
@wet scroll Salmon master race
took a look at mirror and my eyes were red as hecc
yes sir
what
friends.
i leave ports open on my computer to catch clowns
Infinite
Im a hot women with open dms lookin to date a 6ft fire lizard like urslef
no i would never
troll
a
friend
๐
spamming? I would never circumvent
yes I am mindful devs good dog
bark
he likes that
espescially when I meow for him
@wind raptor meow
what does the python programming language need?
@whole bear what would u add
I think it needs more sex appeal.
More sex
more tanks
and jets
we need more of those
more jets more grenades
more firearms
more sex
Is it not?
you'd be very surprised.....
how much python is used for
and honestly we need more sex appeal imo
just a thought bro
and the world needs more tanks
and defense spending
๐
and more moderators
there should be a python-nsfw channel given it is OSS
um why
sir
explain your brain
its a channel
1/40
prolly not
well yeah, nsfw channels have a warning before u enter
Godot has one
hey man
ascii type beat
O O
butter robot meme, but chess
alpha beta pruning algorithm has left the chat
i am bored
Mindful devs actions really just screams mindfullness and developer to me ya'know
he is best mod
yesh
bet, its a really fucking awesome big silly sentence thaat goes on way too long
wat about my ytpmv
idk i dont hear anythn
this is gachi
@whole bear charizard nooo
;-;
;-;-;--;
chrazrad
;-;;-;-;--;-;;-;--;;-
bro just turned on lawyer
best drug to code on?
adderall?
caffeine?
rot90 never heard of thaat one
by chraxrad
im like Notch levels of jaded
I personally have mastered the ability to do unbounded amounts of work while also doing absolutely no work at all.
Is this a good clothing brand? https://www.carhartt.com/
@wind raptor @desert wolf @elder knot ^^
Never heard of it
is there an actual difference "workwear" and regular clothing? visually seems not so different
#dev-nsfw
varies from brand to brand, thicker
I have invented a lemon.
legit
I have a trig function that makes a lemon.
ok god
import numpy as np
from matplotlib import pyplot as plt
def unit_vector(d):
r = np.radians(d)
arr = np.empty(r.shape, complex)
arr.real, arr.imag = np.sin(r), np.cos(r)
return arr
tsd = np.linspace(0, 360, 1000, endpoint=False)
tsr = np.radians(tsd)
arr = (-np.abs(np.cos(tsr)) / 2) + 1
arr = arr * unit_vector(tsd)
plt.scatter(arr.real, arr.imag)
plt.show()```
@wind raptor
cute
water is fairly good
!e
import numpy as np
from matplotlib import pyplot as plt
def unit_vector(d):
r = np.radians(d)
arr = np.empty(r.shape, complex)
arr.real, arr.imag = np.sin(r), np.cos(r)
return arr
tsd = np.linspace(0, 360, 1000, endpoint=False)
tsr = np.radians(tsd)
arr = (-np.abs(np.cos(tsr)) / 2) + 1
arr = arr * unit_vector(tsd)
plt.scatter(arr.real, arr.imag)
plt.savefig("save.png")
@wind raptor :white_check_mark: Your 3.12 eval job has completed with return code 0.
This is not a valid func
Sign up to my patreon and not only will you help make these videos possible but if it's before 10 December you will also get a triangle-equation xmas card! http://patreon.com/standupmaths
This video was inspired by an email from Sinhran Callahan and based largely on this MathPages post (but I've re-done and changed a bunch of the equations). ht...
Thanks to Jane Street for supporting this video. Check out their open roles, programs and events: https://www.janestreet.com/join-jane-street/
Here is the original "Is there an equation for a triangle?" video. https://www.youtube.com/watch?v=4K-Jx914NcQ (I'm taking suggestions for what Part III should be named. Comment below.)
And thanks to ev...
@desert wolf :white_check_mark: Your 3.12 eval job has completed with return code 0.
I wonder how much poking it takes to get the beast to wake up
!e
with open("foo.txt", "wb") as f: f.write(b"-"*1000)
@lavish rover :white_check_mark: Your 3.12 eval job has completed with return code 0.
foo.txt
https://paste.pythondiscord.com/SKODRFKCENLLNBB7NVVCG2AYEU
๐
well if you dance in front of their screens
!e
with open("foo.png", "wb") as f: f.write(b"-"*1000)
@lavish rover :white_check_mark: Your 3.12 eval job has completed with return code 0.
!e
import numpy as np
from matplotlib import pyplot as plt
def rar(n):
x, y = [0], [0]
angle = 45
for i in range(n):
new_x = (x[-1] + np.cos(np.radians(angle)))
new_y = (y[-1] + np.sin(np.radians(angle)))
x.append(new_x)
y.append(new_y)
angle -= 90
return x, y
n = 10
x, y = rar(n)
plt.plot(x, y, marker='o', linestyle='-', color='b')
plt.title(f'rar (Iterations: {n})')
plt.savefig("rar.png")
@desert wolf :white_check_mark: Your 3.12 eval job has completed with return code 0.
!e
import matplotlib.pyplot as plt
import numpy as np
import matplotlib.animation as animation
fig, ax = plt.subplots()
ax.set_xlim([0, 10])
scat = ax.scatter(1, 0)
x = np.linspace(0, 5)
def animate(i):
scat.set_offsets((x[i], 0))
return scat,
ani = animation.FuncAnimation(fig, animate, repeat=True,
frames=len(x) - 1, interval=50)
# To save the animation using Pillow as a gif
writer = animation.PillowWriter(fps=15,
metadata=dict(artist='Me'),
bitrate=1800)
ani.save('scatter.gif', writer=writer)
@lavish rover :warning: Your 3.12 eval job timed out or ran out of memory.
[No output]
!e
import matplotlib.pyplot as plt
import numpy as np
import matplotlib.animation as animation
fig, ax = plt.subplots()
ax.set_xlim([0, 10])
scat = ax.scatter(1, 0)
x = np.linspace(0, 5)
def animate(i):
scat.set_offsets((x[i], 0))
return scat,
ani = animation.FuncAnimation(fig, animate, repeat=True,
frames=len(x) - 1, interval=50)
# To save the animation using Pillow as a gif
writer = animation.PillowWriter(fps=15,
metadata=dict(artist='Me'),
bitrate=1800)
ani.save('scatter.gif', writer=writer)
@lavish rover :warning: Your 3.12 eval job timed out or ran out of memory.
[No output]
!e
from PIL import Image, ImageDraw
images = []
width = 200
center = width // 2
color_1 = (0, 0, 0)
color_2 = (255, 255, 255)
max_radius = int(center * 1.5)
step = 8
for i in range(0, max_radius, step):
im = Image.new('RGB', (width, width), color_1)
draw = ImageDraw.Draw(im)
draw.ellipse((center - i, center - i, center + i, center + i), fill=color_2)
images.append(im)
for i in range(0, max_radius, step):
im = Image.new('RGB', (width, width), color_2)
draw = ImageDraw.Draw(im)
draw.ellipse((center - i, center - i, center + i, center + i), fill=color_1)
images.append(im)
images[0].save('pillow_imagedraw.gif',
save_all=True, append_images=images[1:], optimize=False, duration=40, loop=0)
@lavish rover :white_check_mark: Your 3.12 eval job has completed with return code 0.
!e
from __future__ import division
from PIL import Image, ImageDraw
from cmath import phase
from sys import maxsize
from math import log10
import colorsys
dim = (4096, 4096)
bits = 8
cmax = (1<<bits)-1
cfac = 255/cmax
img = Image.new('RGB', dim)
draw = ImageDraw.Draw(img)
xstart = -2
ystart = -2
xd = 4 / dim[0]
yd = 4 / dim[1]
tol = 1e-6
a = [[], [], [], [], []]
for x in range(dim[0]):
for y in range(dim[1]):
z = d = complex(xstart + x*xd, ystart + y*yd)
c = 0.0
l = 1
while abs(l-z) > tol and abs(z) > tol:
l = z
z -= (z**5-1)/(5*z**4)
c += 1.0
if z == 0: c = maxsize
p = int(phase(z))
if abs(l-z) > 0.0:
c += log10(abs(l-z)) / 6
a[p] += (c, x, y),
for i in range(5):
a[i].sort(reverse = False)
pnum = [len(a[i]) for i in range(5)]
ptot = dim[0]*dim[1]
bounds = []
lbound = 0
for i in range(4):
nbound = lbound + pnum[i]/ptot
bounds += nbound,
lbound = nbound
t = [[], [], [], [], []]
for i in range(ptot-1, -1, -1):
r = (i>>bits*2)*cfac
g = (cmax&i>>bits)*cfac
b = (cmax&i)*cfac
(h, s, v) = colorsys.rgb_to_hsv(r, g, b)
h = (h+0.1)%1
if h < bounds[0] and len(t[0]) < pnum[0]: p=0
elif h < bounds[1] and len(t[1]) < pnum[1]: p=1
elif h < bounds[2] and len(t[2]) < pnum[2]: p=2
elif h < bounds[3] and len(t[3]) < pnum[3]: p=3
else: p=4
t[p] += (int(r), int(g), int(b)),
for i in range(5):
t[i].sort(key = lambda c: c[0]*2126 + c[1]*7152 + c[2]*722, reverse = True)
r = [0, 0, 0, 0, 0]
for p in range(5):
for c,x,y in a[p]:
draw.point((x,y), t[p][r[p]])
r[p] += 1
img.save("out.png")```
@sage grove :warning: Your 3.12 eval job timed out or ran out of memory.
[No output]
!e
from PIL import Image, ImageDraw
def generate_julia_set(width, height, zoom, x_offset, y_offset, max_iter):
image = Image.new('RGB', (width, height), color=(0, 0, 0))
draw = ImageDraw.Draw(image)
for x in range(width):
for y in range(height):
zx, zy = x / zoom - x_offset, y / zoom - y_offset
c = complex(-0.7, 0.27015)
color = julia(zx, zy, c, max_iter)
draw.point([x, y], fill=color)
return image
def julia(zx, zy, c, max_iter):
for i in range(max_iter):
if abs(complex(zx, zy)) > 2.0:
return (i % 8 * 32, i % 16 * 16, i % 32 * 8)
zx, zy = zx * zx - zy * zy + c.real, 2.0 * zx * zy + c.imag
return (0, 0, 0)
width = 400
height = 400
zoom = 100
x_offset = 2.0
y_offset = 1.5
max_iter = 100
julia_image = generate_julia_set(width, height, zoom, x_offset, y_offset, max_iter)
julia_image.save('julia_set.png')
@desert wolf :white_check_mark: Your 3.12 eval job has completed with return code 0.
!e
import numpy as np
from matplotlib import pyplot as plt
def unit_vector(d):
r = np.radians(d)
return np.cos(r) + 1j * np.sin(r)
angles_deg = [0, 120, 240]
vertices = [unit_vector(d) for d in angles_deg]
vertices.append(vertices[0])
real_parts = [v.real for v in vertices]
imag_parts = [v.imag for v in vertices]
plt.figure()
plt.plot(real_parts, imag_parts, 'b-') # Draw the triangle
plt.scatter(real_parts, imag_parts) # Mark the vertices
plt.gca().set_aspect('equal', adjustable='box')
plt.title("Equilateral Triangle")
plt.grid(True)
plt.savefig("triangle.png")
@wind raptor :white_check_mark: Your 3.12 eval job has completed with return code 0.
what is it he wants?
!e
from PIL import Image, ImageDraw
def generate_julia_set_frame(width, height, zoom, x_offset, y_offset, max_iter, frame):
image = Image.new('RGB', (width, height), color=(0, 0, 0))
draw = ImageDraw.Draw(image)
for x in range(width):
for y in range(height):
zx, zy = x / zoom - x_offset, y / zoom - y_offset
c = complex(-0.7, 0.27015)
color = julia(zx, zy, c, max_iter + frame)
draw.point([x, y], fill=color)
return image
def julia(zx, zy, c, max_iter):
for i in range(max_iter):
if abs(complex(zx, zy)) > 2.0:
return (i % 8 * 32, i % 16 * 16, i % 32 * 8)
zx, zy = zx * zx - zy * zy + c.real, 2.0 * zx * zy + c.imag
return (0, 0, 0)
width = 200
height = 200
zoom = 50
x_offset = 2.0
y_offset = 1.5
max_iter = 10
num_frames = 15
frames = []
for frame in range(num_frames):
julia_frame = generate_julia_set_frame(width, height, zoom, x_offset, y_offset, max_iter, frame)
frames.append(julia_frame)
frames[0].save('julia_set.gif', save_all=True, append_images=frames[1:], optimize=False, duration=10, loop=0)
@desert wolf :white_check_mark: Your 3.12 eval job has completed with return code 0.
@desert wolf :white_check_mark: Your 3.12 eval job has completed with return code 0.
!e
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import axes3d
from numpy import sin, cos, pi, outer, ones, size, linspace
# Define x, y, z lists for sphere
a = linspace(0, 2 * pi)
b = linspace(0, pi)
x = 10 * outer(cos(a), sin(b))
y = 10 * outer(sin(a), sin(b))
z = 10 * outer(ones(size(a)), cos(b))
# The amount of frames in the animation
frames = 26
# Generate each frame
for n in range(frames):
fig = plt.figure(figsize=(10, 10))
ax = fig.add_subplot(111, projection='3d')
ax.plot_surface(x, y, z, color=('b'))
ax.set_xticks([])
ax.set_yticks([])
ax.set_zticks([])
ax.set_xlim(-8,8)
ax.set_xlim(-8,8)
ax.set_xlim(-8,8)
plt.savefig(f"{n}.png")
plt.close()
# Add 1 to the x so the sphere moves right by 1
x += 1
# Use pillow to save all frames as an animation in a gif file
from PIL import Image
images = [Image.open(f"{n}.png") for n in range(frames)]
images[0].save('ball.gif', save_all=True, append_images=images[1:], duration=100, loop=0)```
@sage grove :warning: Your 3.12 eval job timed out or ran out of memory.
[No output]
!e
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import axes3d
from numpy import sin, cos, pi, outer, ones, size, linspace
# Define x, y, z lists for sphere
a = linspace(0, 2 * pi)
b = linspace(0, pi)
x = 10 * outer(cos(a), sin(b))
y = 10 * outer(sin(a), sin(b))
z = 10 * outer(ones(size(a)), cos(b))
# The amount of frames in the animation
frames = 16
# Generate each frame
for n in range(frames):
fig = plt.figure(figsize=(10, 10))
ax = fig.add_subplot(111, projection='3d')
ax.plot_surface(x, y, z, color=('b'))
ax.set_xticks([])
ax.set_yticks([])
ax.set_zticks([])
ax.set_xlim(-8,8)
ax.set_xlim(-8,8)
ax.set_xlim(-8,8)
plt.savefig(f"{n}.png")
plt.close()
# Add 1 to the x so the sphere moves right by 1
x += 1
# Use pillow to save all frames as an animation in a gif file
from PIL import Image
images = [Image.open(f"{n}.png") for n in range(frames)]
images[0].save('ball.gif', save_all=True, append_images=images[1:], duration=100, loop=0)```
@sage grove :warning: Your 3.12 eval job timed out or ran out of memory.
[No output]
!e
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import axes3d
from numpy import sin, cos, pi, outer, ones, size, linspace
# Define x, y, z lists for sphere
a = linspace(0, 2 * pi)
b = linspace(0, pi)
x = 10 * outer(cos(a), sin(b))
y = 10 * outer(sin(a), sin(b))
z = 10 * outer(ones(size(a)), cos(b))
# The amount of frames in the animation
frames = 16
# Generate each frame
for n in range(frames):
fig = plt.figure(figsize=(5, 5))
ax = fig.add_subplot(111, projection='3d')
ax.plot_surface(x, y, z, color=('b'))
ax.set_xticks([])
ax.set_yticks([])
ax.set_zticks([])
ax.set_xlim(-8,8)
ax.set_xlim(-8,8)
ax.set_xlim(-8,8)
plt.savefig(f"{n}.png")
plt.close()
# Add 1 to the x so the sphere moves right by 1
x += 1
# Use pillow to save all frames as an animation in a gif file
from PIL import Image
images = [Image.open(f"{n}.png") for n in range(frames)]
images[0].save('ball.gif', save_all=True, append_images=images[1:], duration=50, loop=0)```
@sage grove :warning: Your 3.12 eval job timed out or ran out of memory.
[No output]
@sage grove :warning: Your 3.12 eval job timed out or ran out of memory.
[No output]
!e
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import axes3d
from numpy import sin, cos, pi, outer, ones, size, linspace
# Define x, y, z lists for sphere
a = linspace(0, 2 * pi)
b = linspace(0, pi)
x = 10 * outer(cos(a), sin(b))
y = 10 * outer(sin(a), sin(b))
z = 10 * outer(ones(size(a)), cos(b))
# The amount of frames in the animation
frames = 8
# Generate each frame
for n in range(frames):
fig = plt.figure(figsize=(5, 5))
ax = fig.add_subplot(111, projection='3d')
ax.plot_surface(x, y, z, color=('b'))
ax.set_xticks([])
ax.set_yticks([])
ax.set_zticks([])
ax.set_xlim(-8,8)
ax.set_xlim(-8,8)
ax.set_xlim(-8,8)
plt.savefig(f"{n}.png")
plt.close()
# Add 1 to the x so the sphere moves right by 1
x += 1
# Use pillow to save all frames as an animation in a gif file
from PIL import Image
images = [Image.open(f"{n}.png") for n in range(frames)]
images[0].save('ball.gif', save_all=True, append_images=images[1:], duration=20, loop=0)```
@sage grove :warning: Your 3.12 eval job timed out or ran out of memory.
[No output]
@sage grove :warning: Your 3.12 eval job timed out or ran out of memory.
[No output]
I want a function which, when given a heading from 0-360 out from 0, 0, gives me the magnitude at which that heading would intersect the perimeter of an equilateral triangle also centered on 0, 0.
Such that, given an evenly spaced and sufficient sample of values from 0-360, the perimeter of a triangle could be plotted and readily recognised as a triangle
The vertices of the triangle would be all magnitude of 1.
Sure, I can help you with that. Here is a Python function that takes a heading in degrees and returns the magnitude at which that heading would intersect the perimeter of an equilateral triangle centered at (0, 0):
import math
def magnitude_at_heading(heading: float) -> float:
"""
Given a heading from 0-360 out from 0, 0, returns the magnitude at which that heading would intersect the perimeter of an equilateral triangle also centered on 0, 0.
"""
# Convert heading to radians
heading_rad = math.radians(heading)
# Calculate the length of one side of the equilateral triangle
side_length = 2 / math.sqrt(3)
# Calculate the x and y coordinates of the point where the heading intersects the perimeter of the triangle
x = side_length * math.cos(heading_rad)
y = side_length * math.sin(heading_rad)
# Calculate the magnitude of the point
magnitude = math.sqrt(x ** 2 + y ** 2)
return magnitude
You can use this function to calculate the magnitude at any heading from 0-360. For example, magnitude_at_heading(0) would return 2/3, which is the magnitude of the point where the triangle intersects the x-axis.
To plot the perimeter of an equilateral triangle, you can use the matplotlib library. Here is an example of how you can use this function to plot the perimeter of an equilateral triangle:
import matplotlib.pyplot as plt
import numpy as np
# Generate a list of headings from 0-360
headings = np.linspace(0, 360, 361)
# Calculate the magnitudes at each heading
magnitudes = [magnitude_at_heading(h) for h in headings]
# Plot the perimeter of the equilateral triangle
plt.polar(np.radians(headings), magnitudes)
plt.show()
This will generate a polar plot of the perimeter of an equilateral triangle. The triangle will be centered at the origin, and the magnitudes will be plotted along the radial axis. The plot should be recognizable as a triangle when the headings are evenly spaced and sufficient in number.
didn't read what you wrote, but bing chat did
I considered this approach. It isn't how I want to do it.
what would you change?
A great many things.
I know the shape of the wave I have to duplicate.
I just have to fiddle.
I also don't want to be slapped with AI.
!stream 945547192372953138
โ @ember knot can now stream until <t:1699933448:f>.
hi @wind raptor
s-lang
@somber heath hello Sir, how do I share my screen?
Streaming permissions may be granted by voice regular moderator level users and above at their discretion.
understood
Convention is to ask when you see them in the voice chat.
should i ping them directly to ask them for permissions?
@hollow haven hey can I get streaming perms pls?
@dim abyss which Rust server are you going to?
hmm, I've been there a few times, it seemed like rush-hour all the time
hello opal
:P
anyways
i just made a music
for some reason
wanna take a listen to it?
uhh
wdym?
@slender sierra ๐
@somber heath hi๐
@somber heath no its not
hi
hi
or generally when submitting a form instead of doing ajax magic
I saw you before on this server why aren't you voice verified? :D
hola
@somber heath python intapetar problem.!
Hm?
Sir give some python tutorial design cod
hii
@lilac carbon ๐
@late cloud ๐
Yoww
You're much younger than me atleast lol
ur younger than me wtf
hehehe
๐
pink marshmallows>>
I did not get a permission for unmute my voice
what grade/year are you in?
me?
!voice
Canโt talk in voice chat? Check out #voice-verification to get access. The criteria for verifying are specified there.
yeah\
rip
i do suppose so
im in uni
1st year
some asian country
v boring life
good
u sound like u would own a cat
u*
hahaha
see
ezpz
ooo
cats r cool
my mom wont lemme get one cuz she thinks theyll scratch up the couches
wait are u a student @empty crown
ohh
oh right right
im leaving guys gotta study :( BYEEE!!!!!!!!!!
Have a good dayyyyyyyyyy
!!
i love legos
i lost most of mine doe
anyway bye fr now
@somber heath sorry sir
seeyaaa
@manic merlin aggretsuko banner
what ?
the banner in ur profile
is from a show called aggretsuko
anyway i should rly go now biee!
Catch you later
It is neat
!voice
Canโt talk in voice chat? Check out #voice-verification to get access. The criteria for verifying are specified there.
@rugged root sir your profile picture sos
sos?
funny
๐๏ธ
I'll be right back
ok sir

@manic merlin you should be able to verify yourself
voice veryfy not work
You're doing !voiceverify in the #voice-verification channel?
!resources A Byte of Python
The Resources page on our website contains a list of hand-selected learning resources that we regularly recommend to both beginners and experts.
5. Do not provide or request help on projects that may violate terms of service, or that may be deemed inappropriate, malicious, or illegal.
@manic merlin I didn't understand your question
@brittle nebula yo
You should not be using a user token for anything
there is a user token acquired through app auth
(I've only ever used that for oauth2 on websites and getting basic user info like avatar url to show there)
If it's oauth you shouldn't be handling it directly should you?
normally, yes, there'd be libraries around it
but you still need to then use the token somehow
(that token normally expires in ~7 days, as far as I've seen)
@manic merlin I'm having a really hard time understanding you
What is dlts mean?
Secure connection thingy
trying not to get sick xd
I don't have vpn on
managed to minimize the sore throat with lozenges
Did not
Let me try something
(the "ignore this" is "bot", a totally separate concept)
Yeah
One sec, trying something
That fix it?
If not, the only other thing I can think of off the top of my head is just reboot your computer
I have so many Allen wrenches
So very many
So many of the exact same size...
did you mean: allen key

@rugged root
im so mad i hate coding
What's got you stuck?
!src solved
Make the help post this command was called in dormant.
@mental sparrow Send it here.
@maiden finch
How to leave this voice chat?
Idk
I obviously joined by acident.
I forgot to say send this earlier but this was a massive eye-opener for me http://www.rossbencina.com/code/real-time-audio-programming-101-time-waits-for-nothing
Yarp
yarp
Hello mr hemlock and luna
Nice picture.
Sup Jed
My TransUnion credit score is looking pretty good
coding classes about ai here when
sounds like something that doesnt need ai
- send anime pic
- scan anime pic character
- identify character and get its series genres
- select other anime with same genres and rating from myanimelist
- output the result
chat gpt failed me so much i gave up on it :,> it gives a skeliton code gotta work with it but never NEVER TRUST ITS OUTPUT 100%
stackoveflow gives proper codes solution that work tho ;-; bcz real ppl answers
Sometimes. But it may not work or be appropriate for what you actually need
And it takes experience and practice to identify that
But if you're talking about a ship or a boat, it's typically a she
i failed that class xd
ya'll just want us non english ppl to die TVT frustrated language class failure sounds
btw yo guys i got a problem cant find solution
What's the problem?
problem after i press enter
Do py if you're on windows
it works after that
BUT WHY THESE COME
i checked these files there are no error in there
And double check to make sure Python didn't get installed on the Microsoft Store
Only get it from https://python.org
i just installed it wuith micro soft and then... if type pythpn3 its all good, but pythpn gives these issues
sooo many typos-
however even with all these tracebacks all codes work perfectly fine afterwards
i installed it today, before i didnt have the microsof one
after these problems were happening already
ykwhat i'll just reinstall...
ugh its such a headache
Yeeeeaaah
Any time you're on Windows, install it directly from python.org, and use py instead of python to run things
And don't add Python to the PATH
wait would i need to readd the path too? ;-;
I hear ya
k fine
OOO IM DOING AI STUFF TOO CURRENTLY (not really, just put in a gpt key to messanger bot)
If I could, I would write Rust at work
But the audio programming ecosystem is in C++
rewrite the ecosystem in Rust
@earnest crag https://www.youtube.com/watch?v=q2SGW2VgwAM
python object oriented programming OOP tutorial example explained
#python #objects #OOP
#------------------------------------------------------------------
from car import Car
car_1 = Car("Chevy","Corvette",2021,"blue")
car_2 = Car("Ford","Mustang",2022,"red")
car_1.drive()
car_2.stop()
#------------------------------------------------------...
10 min
don't dare me to because you know I would

@swift valley pure why you doing AI
It's my job
AI-based audio plugins
thought your job is that thing you told me in DM that I'm not supposed to say here
the thing with the browser and such
We've transitioned beyond that
That was a year ago
aw
what happened to the stuff from Apo11o Program and whatnot
๐

