#ot2-the-original-pubsta

652 messages ยท Page 111 of 1

hoary marsh
#

i mean, generally any notes

digital bane
#

Mr Robot starts grounded then gets more fastastic (fantasy) as the episides progress while keeping the hacker techniques fairly grounded

jovial island
#

you could, but it is not necessary as long as you have a stable net connection

#

googling things seems better

hoary marsh
#

oh ok

jovial island
#

perhaps note down the specific tricks you use

#

like a specific function you use all the time

#

but not everything

#

for example, for me its this:

def displayhold():
  while True:
    pass
#

@hoary marsh

#

or things you know you will need often in the future but that are hard to find

hoary marsh
#

ok

#

i think that noting down every command from pandas library is a must for me than

jovial island
#

no need to

#

perhaps for the beginning

#

but if you use them that often you will memorise them sooner or later

hoary marsh
#

i am just learning it, idk if i will use it often or not

#

btw, thx for your help.

jovial island
tired imp
#

Can someone here help me with enabling SSH over USB with the Raspberry Pi Zero on Windows? I followed the normal instructions (add dtoverlay=dwc2 in config.txt, modules_load=dwc2,g_ether in cmdline.txt, touching SSH), yet I cannot SSH over raspberrypi.local. Interestingly, Windows detected it as a RNDIS/Ethernet device before concluding that the Zero was a USB Serial one...

frail bluff
#

wow

fallen current
#

@jovial island This is a Script that I made for Minecraft (I expect you know what Minecraft is). It generates sphere. But it gets insanely slow for large spheres

fallen current
#

Both hollow and solid

jade bolt
#

hm

jade bolt
#

is it possible for you to gen row by row ๐Ÿค”

jovial island
#

Does minecraft have a set-region command or something where you can give it a bounding box and it fills all the blocks?

#

Rather than you doing one by one manually

jade bolt
#

/fill possibly, but it's rect only iirc

fallen current
jade bolt
#

what if you carve the rect

fallen current
#

How

jade bolt
#

hang on, my math brain isnt responding

jovial island
fallen current
#

It just files a cube or cuboid

jovial island
#

Would def be faster to make the solid sphere out of cuboids

fallen current
#

No

#

I checked

jovial island
#

but the math for finding the optimal ones sounds tricky ๐Ÿ‘€

#

Making a 10x10x10 cuboid is the same speed at 1000 individual setblock commands?

fallen current
#

No

jade bolt
#

hang on, lemme make some carve algo. i suck at visualization

fallen current
jovial island
#

I'm sure that's possible, though again the math sounds daunting ducky_australia

#

But sounds like the fastest way

fallen current
jade bolt
#

reverse the for loop sounds very promising

fallen current
#

No

fallen current
jade bolt
#

like reverse all your math there

#

then you should get what should be air, right?

jovial island
#

fill the whole cube then remove the rounded corners (but I think you said you tried that)

fallen current
jade bolt
#

the for loop should have less to calculate now i think

fallen current
jovial island
#

Yeah, that's surprising. Only like 52% of the volume is the sphere

fallen current
#

So like there's no good way?

fallen current
jade bolt
fallen current
#

Then?

#

How do I get the whole sphere?

#

I can't just clone it

jade bolt
fallen current
#

Because there's limit to how many blocks you can clone

fallen current
jade bolt
#

hmm

#

i'll try writing one

#

not sure if it's even possible

#

does sound a fun project to do tho

digital bane
#

Take advantage of the fact the sphere is symmetrical

#

Imagine it being composed of circles of varying sizes along a common axis...

#

In top part the circles enlarge until it hits a maximum then it gradually diminishes

#

Drawing a circle is easy...and just shift along a third dimension then draw the next

digital bane
#

Mirror the elements in the circle to save compute...

#

Then mirror top and bottom

#

The bresenham line and circle algo are built in in many graphics packages

#

I have implemented these myself from scratch

fallen current
fallen current
digital bane
#

Same i have done it without

digital bane
fallen current
#

Huh

digital bane
#

Imagine a number line with 0 in center

fallen current
jovial island
#

while drawing on (x,y) you can also draw on (x+2r, y), (x, y+2r), (x+2r, y+2r)

#

so you draw a circle with the loop of a right slice.

digital bane
#

1 is mirror or -1

#

All pure python has line, circle and even 3d

#

Also shading lol

fallen current
fallen current
digital bane
#

Just showing it is possible

fallen current
#

What is possible?

#

Graphics?

digital bane
#

Doing what you want

fallen current
#

It generates sphere?

digital bane
#

Yes

fallen current
#

Oh

digital bane
#

Use the method with the slicing

#

Sample output

#

All pure Python no libs

fallen current
#

Wow

digital bane
#

I was bored by covid so i did this lol

fallen current
#

That's so nice

digital bane
#

Thanks

fallen current
#

Isn't that Sphere just a circle?

tribal tinsel
#

All spheres drawn on 2d will be circles. But see the shadows.

digital bane
fallen current
#

Oh

digital bane
#

The small one i used color computation to fake since faster

fallen current
#

Without lib

digital bane
#

The dodecahedron lol i pre computed the vertices and same for some other polyhedra

#

Also surfaces

#

Also hand coded the bit fonts lol

fallen current
#

Wow

#

Lot of work put into this

digital bane
#

Outputs to windows bmp

#

I hand coded that too

#

Support for mono, 16 color 256 color and RGB

#

Has image manipulation routines

jovial island
#

What's with the new logo

jade bolt
jovial island
#

Also, today, I and a friend were stuck in a computer lab without internet and we figured out the command to create a SQL user and give it privileges all on our own

fathom basin
#
  • when you're mentally advanced * jesus christ, if those are real renders in a linux kernel, thats just above senior developer at that point
digital bane
fathom basin
#

my jaw is dropped rn

#

you made the mandle brot set rendered in opengl, mf higher order being bro the hell

#

i took drawing a triangle an achivement

#

when it came to glsl i just gave up

#

that should be like a os setup or cpp buildsystem test

digital bane
#

Most of the operations are not even a sec all done in 11.5 sec but it was a lot of elements i had to profile

#

Same output as above

#

Only imports in test code BITMAPlib mine

#

Part where I draw 3D

#

Lol no open GL no DirectX

#

All CPU

#

I treat an in memory byte array as a virtual video buffer that is in bitmap format...i flush that to the file system to save...and do the reverse to load

#

I know the bitmap format and made several loaders for it in other langs

#

Can be faster if i use open gl lol

frail bluff
#

do you used bitmap as a challenge?

digital bane
#

I wanted the constraints

frail bluff
#

oh

digital bane
#

I did a math lib for it

#

A font lib

#

3d math

frail bluff
#

ok

frail bluff
digital bane
#

Even pixel plot routine lol

frail bluff
digital bane
#

Lol pixel plot to byte array buffer

fast ore
frail bluff
#

you use minecraft commands or programming?

fallen current
frail bluff
#

but i was thinking that mc bedrock is made in c++

#

well gr8 work!

fathom basin
fallen current
fast ore
#

No as in how you are manipulating minecraft

fallen current
#

You can

fast ore
#

Are you using the keyboard to execute a precomputed response?

fallen current
#

Minecraft gives tool to create scripts that run inside minecraft

fast ore
#

Oh

#

Thanks for telling me

#

Source?

#

I mean to the tools

fallen current
# fast ore Oh

This is the script that I am using to generate spheres in Minecraft.

import { world } from "mojang-minecraft";

export function sphere(x, y, z, r, block, blockData, hollow) {
  var blocks = 0; //initialising blocks for block count
  for(let i = -r; i <= r; i++) {
    for(let j = -r; j <= r; j++) {
      for(let k = -r; k <= r; k++) {
        if(!hollow, i * i + j * j + k * k <= r * r) {
          // we are using this formula to calculate the distance from the centre to a point in a 3D plane and check if it's smaller than or equal to radius
          world.getDimension("overworld").runCommand(`setblock ${i+x} ${j+y} ${k+z} ${block} ${blockData}`);
          blocks++;
        }
        else if (i * i + j * j + k * k === r * r) {
          world.getDimension("overworld").runCommand(`setblock ${i+x} ${j+y} ${k+z} ${block} ${blockData}`);
          blocks++;
        }
      }
    }
  }
  return blocks;
}```
fast ore
#

It is Javascript

fallen current
#

Yeah

dusky cliff
#

you dont need the k loop

digital bane
fallen current
#

Minecraft accepts JavaScript

dusky cliff
#

oh wait

#

you dont need the k loop if its hollow*

fathom basin
#

minecraft has an api?

fast ore
#

No python? :(

fallen current
dusky cliff
#

hm

fallen current
fallen current
fallen current
fathom basin
#
world.getDimension("overworld")

>>> โˆž
fallen current
#

What

fathom basin
#

wait so whats the output of your code @fallen current

fathom basin
#

sebastian lauge did a video about planets i think and he made a part where he teaches how to programmatically make a sphere out of triangles, if you have a square you can just use that context

#

let me find it

fallen current
#

Minecraft doesn't have triangles :(

fathom basin
#

okay

fallen current
#

Only cubes

fathom basin
#

so, you have an algorithm to make a sphere with coordinates

fallen current
#

Yes

fathom basin
#

why dont you append your x,y,z values every single new value calculated and then when you run your script you run the command in another 3 layer nested for loop

#

or did you do that already

fallen current
fathom basin
#

cos im thinking, if you're working from the center to outer, then there must be build up values

fathom basin
#

idk does js have memory control?

fallen current
fathom basin
#

so what im thinking is, you need 3 loops, 2 3-layerd and a singular for loop

#

you need to use the first 3 to calculate the values then append them to thier arrays

fallen current
#

Ok and how does that help reduce the execution time?

fathom basin
#

then you need the 2nd 3-layered for loop to read the values and setup your graphical "flip"

#

and then the 3rd for loop to render the flip

fallen current
#

Hmm

#

Oh

fathom basin
#

and by flip i mean, there is a display and a flip, the flip calculates and sets up a rendered screen, then the flip gets swapped with the display and the display is showing the flip and the flip is empty

#

by just rendering every block at a time you're stressing the cpu

fathom basin
#

its a pygame thing, 2d game concepts, but they work for 3d as well because 3d is just 2d with shading

#

but idk if the minecraft api can do that

#

like queue tasks, and also, you're using js, which i think is a single event loop lang, so you cant really do much about optimisation like you could with somthing like a java lib where you can allocate certain events to occur

fallen current
#

All that is done by the game

fathom basin
#

yeah but thats what's happening with your code

#

either you're code is fine and you're running mobile minecraft

#

or your script works

#

its either 2 mate

fallen current
fathom basin
#

yep, so you cant do anything beyond just placing the block

#

you can run a profiler and see which parts of the code take the most amount of memory

fallen current
#

Where?

fathom basin
#

idk, i dont fw javascript like that

fathom basin
#

Clinic.js HeapProfiler

fallen current
#

Ok I will check later

prime prawn
#

i see the logo changed

fathom basin
#

...

prime prawn
#

oh

fathom basin
prime prawn
#

ok

rocky nebula
#

3 yello guys (pfp)

zealous hazel
idle pelican
#

Neber tryed

sharp bronze
#

pog

idle pelican
#

Alexa

#

This channel id ded

jovial island
#

henlo

idle pelican
jovial island
jovial island
idle pelican
#

Finewbu

#

I have to go to school tmrw i think i need to sleep

jovial island
jovial island
idle pelican
#

..

#

I was learning geograpyy

#

H*

jovial island
#

btw, where you from

#

if you dont mind

idle pelican
#

India

jovial island
idle pelican
#

Ofc

#

And u?

jovial island
idle pelican
#

Cool

jovial island
#

maybe

idle pelican
#

Maybe???

jovial island
#

Yes!!!

idle pelican
#

Great

jovial island
#

indeed

idle pelican
#

Yes

jovial island
#

No

idle pelican
#

Its 10 45 pm here

#

My battery is 15%

jovial island
jovial island
idle pelican
#

Ye

jovial island
idle pelican
#

My os is in sleep mode lemon_sleepy lemon_sleepy

#

Woah 2 pings

idle pelican
#

U dont know this account secreat

#

Just telling u

#

The one thing

#

(This is alt)

#

ยฏ\_(ใƒ„)_/ยฏ

#

Not main id

#

Going to sleep meet u tmrw

zealous hazel
#

this is kind of random but i would love to cut the electricity of a 10th grade class and then stand at the door with lamps in a position to look like they were my eyes and then play freddy's music box

#

also zamn dead chat

#

no msgs for like 9 hours

hazy laurel
#

lights are out? that's sus

#

time to head to electrical

zealous hazel
#

lol amogus finally took over you

digital bane
#

You find it

hazy laurel
digital bane
hazy laurel
#

there they are

digital bane
#

That was a picture taken a few weeks ago when my mom was in the hospital with me....low sodium ...she ia ok nao

jovial island
#

Looks like you did a jeans reveal though

digital bane
#

Hard to remeber lol maybe

digital bane
digital bane
brazen jacinth
#

best delete those

#

it come over as offensive to some people

#

and no, shitposting isn't allowed

#

or meme dumping

#

learnt that the hard way

#

but im not going to be mini mod

jade bolt
#

an admin told you not to though

#

offtopic isn't for shitposting

#

*she

severe glacier
jade bolt
severe glacier
#

so a helper tricked me

slate leaf
#

*Redirected you out of python-general

brazen jacinth
carmine herald
brazen jacinth
#

there are weeb-grammers among us

carmine herald
#

honestly offending prudes and the anti-fun ppl like that is based ยฏ_(ใƒ„)_/ยฏ

open lion
#

how can i solve that under-root term in multiplication
?

#

ping(as many times you want ๐Ÿ˜† ) while answering!

tribal tinsel
#

Those are two roots, each with sum?

#

sqrt(a) * sqrt(b) = sqrt(a*b)

tribal tinsel
# open lion

Is that the whole task? Or was there something else before it?

dusky cliff
#

yeah idt you can transform that to anything clean

tribal tinsel
# open lion

I'd say you messed up earlier. The step at the top

dusky cliff
#

you can get a 4th degree polynomial by keeping the sqrt on one side and the rest on the other and then squaring

tribal tinsel
#

Instead of doing (sqrt(a) + sqrt(b))ยฒ=100, you should put the sqrts on different sides

dusky cliff
#

mm where would you go after that

tribal tinsel
#

Also square the whole thing but now we get rid of one sqrt :P

sqrt(a)+sqrt(b) = 10 (because sqrt >=0 so we know it won't be -10 on the right)
sqrt(a) = 10-sqrt(b)
a = (10-sqrt(b))^2
a = 100-20sqrt(b)+b
now let's put our a and b back there:
(x-y)^2+y^2+z^2 = 100-20sqrt((x+y)^2+y^2+z^2)+(x+y)^2+y^2+z^2
(x-y)^2-(x+y)^2 = 100-20sqrt(b) (I'm too lazy to write it)
-4xy = 100-20sqrt(b)
20sqrt(b) = 100+4xy

#

I wrote it on computer and copied on my phone XD

open lion
#

thanks guys for helping me! @tribal tinsel@dusky cliff

#

sorry for ping! ๐Ÿ˜“

tribal tinsel
#

Yep. We want to get rid of the sqrts, so we need to keep them single for squaring whole thing :3

dusky cliff
#

i like pings dw

tribal tinsel
#

I haven't did such tasks in a long time, it was fun

open lion
tribal tinsel
#

Don't worry

open lion
#

Oo

#

lol

#

i likes too

open lion
#

means can i do this?

dusky cliff
#

assuming a and b are positive, yes

open lion
#

no, this doesn't works

tribal tinsel
open lion
open lion
tribal tinsel
# open lion

This is only sqrt(5) calculated here for some reason, tho?

#

Blah, wrong thing XD

#

!e
print(50.5 * 60.5)
print(30**0.5)

clever salmonBOT
#

@tribal tinsel :white_check_mark: Your eval job has completed with return code 0.

001 | 5.477225575051661
002 | 5.477225575051661
open lion
#

hmm, yea i did use calculator again it's correct

open lion
tribal tinsel
#

x = x^(2/2) = (x^0.5)^2

#

Dammit, I'm reading discord too much. I first didn't notice my bus stop and now I went to wrong side of subway because when I lived here, I went north more often than south. + I normally go to other end of the station, so situation was just rotated from what I wanted XD

#

Hm, maybe I'll go eat something first XD

open lion
#

lol

#

i have a BEST solution for you

#

@tribal tinselhttps://play.google.com/store/apps/details?id=yash.naplarmuno
Use this or any of its alternatives. It will start ringing alarm when you reaches your set location.

Set geolocation based entry and exit alarms! ๐ŸŒโฐ

#

then use discord hassle free ๐Ÿ˜†

tribal tinsel
#

I'm in city centre and burker king has Thursday promo, I'm fine. I didn't eat a proper lunch anyway, only a small burrito for late breakfast XD

#

And normally I'm pretty good at navigating while being on my phone

#

But I'm tired today

#

We were to check out new office

open lion
#

btw thanks for helping me out in my doubt

tribal tinsel
#

It's bare for now, but the rooms are nice and we're gonna get what we want there :D we will have some beanbags in that corner

#

2 desks by the window, facing each other, and one for some future person

#

I will have my friend in next room

#

And kitchen nearby :3

open lion
#

room looking awesome btw

tribal tinsel
#

Too white XD

#

Everything is white with sometimes some grey

#

Kitchen

#

It's way bigger than what we have in the current office.

marsh horizon
jovial island
#

nice office

tribal tinsel
#

It's kinda weird how we got bigger. It's almost 3 years that I've been there. I went through one office remodelling to fit more desks, now we're moving offices...

jovial island
#

how does it feel like, moving offices?

visual slate
#

@fervent tinsel

import random,argparse

parser = argparse.ArgumentParser()
parser.add_argument('-m','--min',type=int,action='store',default=0.0)
parser.add_argument('-M','--max',type=int,action='store',default=100.0)
parser.add_argument('n',type=int,action='store',nargs='?',default=1)

args = parser.parse_args()
for _ in range(args.n):
    print(random.uniform(args.min, args.max))
``` might i suggest argparse for your previous q?
fervent tinsel
#

Honestly this might be too advanced for me for now, I have alot to learn ๐Ÿ˜…

visual slate
#

might look like a lot, but i made this from reading the docs for a few mins, +1 stackoverflow search for the nargs without having used it before

#

its got reasonably friendly documentation

fervent tinsel
#

I'll read more about this and play around with argparse... thank you for the help

zinc temple
#

@median spire yeah its the ratio of the diameter to the circumference, but its also the ratio from the area of a square to the area of a circle. Its also found in other places too, like in radians and such

median spire
#

๐Ÿ˜ณ

#

i didnt know that

im only just now learning about the area of a circle n stuff (in school, at least, because i already knew it lol)

zinc temple
#

I think it was first found in the ratio of the diameter to the circumference tho

radiant socket
zinc temple
#

Yeah. If you have a unit square (1 wide and 1 high), its area is 1. A circle with a radius of 1 has an area of pi * 1*1, which is just pi

radiant socket
#

uh what about a 2x2 square

median spire
#

lmao

radiant socket
#

and a circle with radius 2

zinc temple
#

Thatโ€™d be proportional to a circle w a radius of 2 i believe

radiant socket
#

sure ig ยฏ_(ใƒ„)_/ยฏ

median spire
#

m

digital bane
#

Lol panic driven dev....ah been there

median spire
#

๐Ÿ’€

zealous hazel
#

can anyone recommend me some really really based songs?

jade bolt
zealous hazel
#

more

#

i use that on my social credit grinding sessions already

jade bolt
#

gongchan zhuyi hao

#

literal trans: communism is good

zealous hazel
#

thx

jade bolt
#

socialism is good

zealous hazel
#

oh pok

ripe shadow
#

attention people
Im in need of finding a song I legit dont remember the exact tune or lyrics but
i heard it around 2014 it was a englihs song, this guy had a "rough" type of voice.
i jsut cant rmemeber what it was called something like gumball or rumball or something like that
Can someone help m e find it

pseudo creek
ripe shadow
#

ye we found it

#

Eliahu Pietruszka escaped from Poland at the beginning of the second world war thinking his entire family had perished. But two weeks ago he discovered that a younger brother had also survived and that his brother's son, 66-year-old Alexandre, was flying from Russia to see him.
Subscribe to Guardian News on YouTube โ–บ http://bit.ly/guardianwires...

โ–ถ Play video
#

oh no

#

i was bout to cry

craggy bridge
#

@jade bolt were u typing smthn?
was in a hurry so closed it-

jade bolt
craggy bridge
#

oh

fallen current
#

On my laptop:

#

On Android:

#

Oh wait typo

shrewd lance
#
int main() {
    cout << "yeet" << endl;
} 
#

Interesting

#

I get highlighting for py, but not cpp

hazy laurel
#

on mobile? or

shrewd lance
hazy laurel
#

I don't think I've had highlighting for anything on mobile

shrewd lance
#

I've tried a bunch of lang prefixes on this block of code and the only one that worked was py

#

huh

#
print("This is the only one I'm aware of that works") ```
hazy laurel
#

oh huh, it's the same for me

#

your phone is like giant but yes

#

unless that's a tablet

#

tbh I forget tablets even exist

jade bolt
#

๐Ÿคค

hazy laurel
#

๐Ÿคจ

jade bolt
#

๐Ÿ’Š๐Ÿ’Š๐Ÿ’Š

#

but they are round tablets

hazy laurel
#

we call those capsules

jade bolt
digital bane
digital bane
jade bolt
#

or deez

jade bolt
jade bolt
digital bane
#

Those are tablets or pills

jade bolt
#

ys

hazy laurel
#

meowing

median blade
hazy laurel
jade bolt
digital bane
#

Still taking them pills for a fungal infection

digital bane
jade bolt
hazy laurel
#

hate pills

digital bane
#

Same

hazy laurel
#

I'll go the rest of the day feeling like there's something stuck in my throat

jade bolt
#

keep hydrated btw

digital bane
civic wharf
#

how do you swallow

civic wharf
hazy laurel
#

true asf

digital bane
carmine herald
#

well yeah but what you gonna do its the only way i can get my omega 3 in im terrified of my brain dying before the rest of me fails thats just a miserable life and i dont live in a country where they'd let me off the hook

digital bane
carmine herald
#

they suck but i cant just have fish every other day or whatever

#

i dont like fish that much

digital bane
#

Unless it is Tuna

carmine herald
#

large predator fish has too much mercury so thats also not an option

digital bane
#

Yeah why I dont eat to much of those too

carmine herald
#

well with some luck ill make it to 80 lucid enough just with those shitty oil pills

versed wigeon
shrewd lance
shrewd lance
digital bane
jovial island
#

pls tell me im not only person who codes on phone over pc

#

i only use pc when scrsping ect lmao

remote widget
#

BTW anyone here uses a local crypto wallet? ๐Ÿ‘€

jovial island
#

yes

#

i use exodus

remote widget
#

Oh damn

#

I installed the same one just today haha

#

A friend of mine told to try it out once

jovial island
#

its good one

remote widget
#

I really like the UI tbh

jovial island
remote widget
#

Tho idk what else to do with it as long as he doesn't send me some test crypto ๐Ÿคฃ

jovial island
remote widget
#

18 below?

jovial island
#

age

remote widget
#

Ooh then for me haha

jovial island
#

most wallets need 18+

remote widget
#

let's see

#

O

remote widget
#

???

jovial island
#

exodus doesnt allow test

remote widget
#

No test as in

#

He sends me some crypto haha

#

Like, costing a dollar or two, to see how it all works

jovial island
remote widget
#

Yups

jovial island
#

i make btc selling stuff

remote widget
#

So now i need to see how to buy crypto with amazon pay haha

jovial island
#

tiktok usernames like 3L

remote widget
#

Cool!

jovial island
#

ye

#

its nice side hustle

remote widget
#

Okay so how to deposit money into exodus now

jovial island
#

you send from another wallet

#

or use coinbase

remote widget
#

;-; I cannot buy directly?

jovial island
#

no

#

since its unnder 18

remote widget
#

And coinbase is also under 18?

jovial island
#

no

remote widget
#

so I need to be above 18 to buy crypto, huh

jovial island
#

yes

#

or else ask a parent

remote widget
#

Ouch rip

digital bane
remote widget
#

Seems like my Amazon Pay money is gonna get wasted sitting there haha

jovial island
digital bane
jovial island
#

But phone is easy to type etc

#

Then for scraping part I go on pc

remote widget
#

@jovial island u ever heard of bitpay?

jovial island
remote widget
#

Ah okay

#

Was just seeing how to convert crypto to money I can use irl haha

digital ledge
#

What is the difference between incoming-outgoing traffic and inbound and outbound traffic?

slow prairie
#

Can someone help

#

me

civic wharf
civic wharf
frail rapids
mental idol
#

How do I prepopulate something to use in a %%timeit with IPython? (or can it?)

In [5]: %%timeit -r 5 -n 100000
   ...: d = {1: 1}
   ...: try:
   ...:   c = d[2]
   ...: except KeyError:
   ...:   c = 0
   ...:

I want d to be {n: n for n in range(100_000)} but don't want to time that piece. Disclaimer: First time playing with IPython.

#

oh, setup goes on the first line like the cli.

#

i lurn

#

Sweet

In [9]: %%timeit -r 5 -n 100000 d = {n: n for n in range(100_000)}
   ...: c = d.get(-1, 0)
   ...:
   ...:
40.9 ns ยฑ 2.84 ns per loop (mean ยฑ std. dev. of 5 runs, 100,000 loops each)

In [10]: %%timeit -r 5 -n 100000 d = {n: n for n in range(100_000)}
    ...: try:
    ...:   d[-1]
    ...: except KeyError:
    ...:   c = 0
    ...:
    ...:
184 ns ยฑ 0.638 ns per loop (mean ยฑ std. dev. of 5 runs, 100,000 loops each)

I feel advanced.

woven stag
#

yeah nicky I hate to say it but your pronouns are great at finding trolls ๐Ÿ˜‚

tribal tinsel
tribal tinsel
woven stag
#

like I've lost count of how many times a somewhat-inconsiderate member of pygen has completely given a reason to leave the server like that lol

tribal tinsel
#

Half the hive, swarmed on the ground. Zoom in if you're not scared of bees (there's a reason I'm spoilering those messages XD)

#

Queen ๐Ÿ‘‘
And a bunch of other bees on a honeycomb

hollow heart
hollow heart
tribal tinsel
# hollow heart hmm how come they're on the ground?

Swarming is when bees start producing a new queen (many possible reasons - weak queen, too little space...) and old one feels she won't be able to combat the new one, so she leaves with half the bees. They leave with food for a few days and sit somewhere usually nearby (nearbee?), usually some tree or bush... Here they just chose thick grass. They sit in such place until the scouting bees find a suitable place.
That's how it works. How to catch a swarm is another story. We had some theoretical knowledge about catching swarms on trees and stuff but not on ground... So we just brought an empty hive next to them and gave them a plank to get to it XD waaaay later I learned that swarming bees don't sting and some people manually move them, looking for queen in the meantime (they follow the queen, so moving her to the new place - be it a hive or a box for moving - basically means you got them all)

tribal tinsel
hollow heart
#

oh interesting

#

definitely never saw someone just have a bee perched on their hand lol

dim root
steel eagle
#

they're the only stinging insect I will be near and not be afraid of

#

they really don't want to attack anything

#

that being said they are quite stupid

#

I have had one fly into me, get scared, and sting me from it

unreal sigil
#

I've seen plenty of videos online of people moving swarms by just shaking them out of a tree and luring them into a box, they don't even get stung cause the bees don't really care

#

Bees are good, wasps on the other hand are less fun

hazy laurel
#

I've seen people just straight up scooping up bees without smoke or anything

unreal sigil
#

yeah

#

They're pretty harmless

hazy laurel
#

I could never. Catch me out here with one of those giant hazmat suits

unreal sigil
#

The only times I've been stung by bees is me accidentally stepping on them and getting pierced

jovial island
#

I must have said it here before

hazy laurel
#

I don't think I've ever been stung, but I'd be very sad imagining that a poor bee out there is dying because it was scared of me

jovial island
hazy laurel
#

I don't think bees have moments ๐Ÿ‘€

#

AFAIK all the bees you end up seeing are the females

jovial island
#

huh

dusky cliff
#

might have been lesbeeans

eternal elk
#

hello

river kelp
#

hello

edgy apex
#

dead chat

river kelp
#

just joined here and i almost got banned lmao

edgy apex
#

nevermind not dead chat

river kelp
#

was in wrong channel

edgy apex
river kelp
edgy apex
#

๐Ÿ˜‚ it sok

#

most discord servers don't have this rule anyway

river kelp
#

ah i was talking shop and didnt even realize

#

someone other than me share a recent python script you wrote from scratch!

#

i will to ofc

edgy apex
#

lol sure

#

hold on

river kelp
#

ima choose randomly

edgy apex
#

this was my first project in python

river kelp
#

my github has my real name so im gonna just give you the script if I can

edgy apex
#

o sure

clever salmonBOT
river kelp
#

F

edgy apex
#

F

#

well i guess just use that

#

it's just hastebin

river kelp
edgy apex
#

o

#

info

#

that's nice

#

but that's... a lot of comments ngl

river kelp
#

i need comments to go back and understand what I wrote when I am not great at a language

edgy apex
#

I guess so

river kelp
#

ive written like 100 JS bookmarklets lmao for some reason

edgy apex
#

but don't you think

#prints IP address   
print("Your Internal IP Address is: " + IPAddr)

is a bit useless

#

it shows that it's printing something

river kelp
#

hey i didnt say it was good ๐Ÿ˜„

edgy apex
#

๐Ÿ˜‚ lol

river kelp
#

add this as a bookmark in a browser, i love this one a lot

#

javascript: var travoltaWTF = document.getElementById('travoltaWTF'); if(travoltaWTF){ document.getElementById('travoltaWTF').remove(); } else { var travolta = document.createElement('img'); travolta.setAttribute('id', 'travoltaWTF'); travolta.src='https://i.imgur.com/Yc0G92s.gif';travolta.alt='WTF!'; travolta.style.position='fixed'; travolta.style.left='25%';travolta.style.bottom='0%';travolta.style.zIndex='10000'; document.body.appendChild(travolta); }

hazy laurel
#

what the

river kelp
#

it puts john travolta walking across your screen lel

#

yo i have a super fire mostly original .bashrc if anyone wants a copy

river kelp
#

powershell*

edgy apex
#

your bash console

river kelp
#

my bash console?

edgy apex
#

i meant like the prompt ps1

#

you know?

hazy laurel
#

imagine not using zsh

river kelp
#

i do but i dont like switching and am much better at bash

edgy apex
#

but i just wanna see his ps1 on bash

river kelp
#

what does ps1 mean

hazy laurel
river kelp
#

well each has a slight syntax difference

hazy laurel
hazy laurel
#

you're likely to use bash anyways

#

and also the difference is typically negligible, you want to be POSIX-compliant regardless

river kelp
#

nobody says we have to write in any lang ๐Ÿ™‚

#

i was offering my .bashrc file if thats what you want ill dm it

#

at least the version on my github

hazy laurel
river kelp
#

yeah but i wrote some cool custom functions and some decent aliases tho is my point

#

@hazy laurel

#

i like this server, got a free nitro without getting scammed (have reported like 5 of their sites and got them taken down) for some reason lol i might boost is there any incentive

hazy laurel
#

just a blue role lol

river kelp
#

meh it was free, why not

#

my server has enough rn

#

done

hazy laurel
#

now you've got a colored role \๐Ÿ˜ฉ

river kelp
#

can i change the color

hazy laurel
#

nah

river kelp
#

purple or dark blue

#

meh nbd

hazy laurel
#

I think this server is running low on role colors or something

river kelp
hazy laurel
#

eh not really but semantic coloring

nimble ivy
hazy laurel
#

PS1 is just a colloquial name for the original Play Station AFAIK

carmine herald
#

i remember that one lol they made so many compromises with gameplay and loading times for better graphics and mp3 what a time to game

river kelp
fluid plank
#

go to the ocean, drink some saltwater

digital bane
wheat rock
#

Nacl moment

river kelp
#

yo someone curl -X GET this website, the source is WILD

echo fern
#

mm, don't think I will

river kelp
#

ill do it for you then

#
$ curl -X GET https://aem1k.com/void/


<script   >/๏พ โ€Œโ€Œโ€Œโ€Œ/[   ๏พ โ€Œโ€Œโ€Œโ€Œ=""],๏พ โ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œ='"',๏พ โ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œ=   ๏พ โ€Œโ€Œโ€Œโ€Œ==๏พ โ€Œโ€Œโ€Œโ€Œ,๏พ โ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œ=๏พ โ€Œโ€Œโ€Œโ€Œ==  ๏พ โ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œ,๏พ โ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œ=๏พ โ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œ+๏พ โ€Œโ€Œโ€Œโ€Œ,๏พ โ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œ=๏พ โ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œ+
 ๏พ โ€Œโ€Œโ€Œโ€Œ,๏พ โ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œ=+๏พ โ€Œโ€Œโ€Œโ€Œ,๏พ โ€Œ=+๏พ โ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œ,  ๏พ โ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œ={},  ๏พ โ€Œโ€Œ=๏พ โ€Œ+๏พ โ€Œ,๏พ โ€Œโ€Œโ€Œ=๏พ โ€Œโ€Œ+๏พ โ€Œ,๏พ โ€Œโ€Œโ€Œโ€Œโ€Œ=๏พ โ€Œโ€Œ+๏พ โ€Œโ€Œโ€Œ,๏พ โ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œ=๏พ โ€Œโ€Œโ€Œโ€Œ+๏พ โ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œ,๏พ โ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œ=  ๏พ โ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œ.๏พ โ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œ+๏พ โ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œ,๏พ โ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œ=๏พ โ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œ[๏พ โ€Œ]  ,๏พ โ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œ=๏พ โ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œ[๏พ โ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œ],๏พ โ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œ=๏พ โ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œ[๏พ โ€Œ]
  ,๏พ โ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œ=๏พ โ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œ[๏พ โ€Œโ€Œโ€Œโ€Œโ€Œ],๏พ โ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œ=๏พ โ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œ[ ๏พ โ€Œโ€Œ],๏พ โ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œ=๏พ โ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œ[  ๏พ โ€Œ],๏พ โ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œ=๏พ โ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œ[๏พ โ€Œโ€Œโ€Œ],๏พ โ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œ=๏พ โ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œ[๏พ โ€Œโ€Œโ€Œ],๏พ โ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œ=๏พ โ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œ[๏พ โ€Œ]  ,๏พ โ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œ="\\"  +")(",๏พ โ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œ=๏พ โ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œ[๏พ โ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œ],
   ๏พ โ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œ=๏พ โ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œ[๏พ โ€Œโ€Œ],๏พ โ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œ=๏พ โ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œ[๏พ โ€Œ],๏พ โ€Œโ€Œโ€Œโ€Œโ€Œโ€Œ=๏พ โ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œ+๏พ โ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œ+  ๏พ โ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œ+๏พ โ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œ+๏พ โ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œ+๏พ โ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œ+" ",๏พ โ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œ=๏พ โ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œ+๏พ โ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œ+๏พ โ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œ+๏พ โ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œ+  ๏พ โ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œ+๏พ โ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œ+๏พ โ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œ+๏พ โ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œ+๏พ โ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œ+๏พ โ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œ+  ๏พ โ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œ,๏พ โ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œ=๏พ โ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œ[๏พ โ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œ][๏พ โ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œ],๏พ โ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œ(๏พ โ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œ(๏พ โ€Œโ€Œโ€Œโ€Œโ€Œโ€Œ+๏พ โ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œ+๏พ โ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œ(
    ๏พ โ€Œโ€Œโ€Œโ€Œโ€Œโ€Œ+๏พ โ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œ(๏พ โ€Œโ€Œโ€Œโ€Œโ€Œโ€Œ+๏พ โ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œ+๏พ โ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œ+๏พ โ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œ+๏พ โ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œ+๏พ โ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œ+๏พ โ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œ+๏พ โ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œ+  (๏พ โ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œ=๏พ โ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œ+๏พ โ€Œ+(๏พ โ€Œโ€Œโ€Œ+๏พ โ€Œโ€Œโ€Œ)+๏พ โ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œ)+๏พ โ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œ+๏พ โ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œ+๏พ โ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œ+  ๏พ โ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œ+๏พ โ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œ+๏พ โ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œ+๏พ โ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œ+๏พ โ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œ+๏พ โ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œ+  "'๓ …ฅ๓ …ถ๓ …ก'"+๏พ โ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œ+"."+๏พ โ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œ+๏พ โ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œ+
     ๏พ โ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œ+๏พ โ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œ+๏พ โ€Œ+๏พ โ€Œโ€Œโ€Œโ€Œโ€Œ+(๏พ โ€Œโ€Œ+๏พ โ€Œโ€Œ)+๏พ โ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œ+  ๏พ โ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œ+๏พ โ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œ+๏พ โ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œ+"/"+๏พ โ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œ+".{"+  ((๏พ โ€Œโ€Œโ€Œ+๏พ โ€Œโ€Œโ€Œโ€Œโ€Œ))+  "}/"+๏พ โ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œ+๏พ โ€Œ+(๏พ โ€Œโ€Œ+๏พ โ€Œโ€Œ)+(
      ๏พ โ€Œโ€Œโ€Œโ€Œโ€Œ+๏พ โ€Œโ€Œ)+",'"+   "'"+๏พ โ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œ+๏พ โ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œ+๏พ โ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œ)())(   )+๏พ โ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€Œ)())  ()</script>
#

just one script with random symbols

echo fern
#

ah yes, jsfuck

river kelp
#

besides, curl cant harm you anyway for viewing the source

#

if you downloading something maybe

#

woah

#
$ curl -X GET http://aem1k.com/0/
<body onload=eval(eval('"'+escape("๏ฟฝ๏ฟฝ๏ฟฝ").replace(/..(.)..(.)/g,'\\x$1$2')+'"'))>
#

is that the same @echo fern

craggy bridge
#

@sweet oyster thanks!

river kelp
#

someone add this to their .bashrc and youll thank me later

#
google() {
    search=""
    echo "Googling: $@"
    for term in $@; do
        search="$search%20$term"
    done
    xdg-open "http://www.google.com/search?q=$search"
}
#

usage from CLI: google <TERM>

fluid plank
#

this otn is funny. for some weird reason, i find this funny, not because of kat. but i can relate

river kelp
austere oak
#

With ArrayDeque in Java, why canโ€™t you access elements by index if the underlying structure is an array?

#

You can do this with Stack but not with ArrayDeque

austere oak
#

Why does it let you index LinkedList which is O(n), but you canโ€™t index ArrayDeque which would be O(1)?

hollow heart
#

!tban 938851074574536747 1w told you you'd be removed if you continued

clever salmonBOT
#

:incoming_envelope: :ok_hand: applied ban to @ancient dragon until <t:1645894867:f> (6 days and 23 hours).

radiant socket
#

and ArrayDeque doesn't

austere oak
#

Why couldnโ€™t they just make ArrayDeque implement List too?

radiant socket
#

oracle dumb ยฏ_(ใƒ„)_/ยฏ

civic wharf
#

pretty much how I feel if I ever try to search through sources on Developer Tools

mental idol
#

Me: I'mma program now!
turns on music, turns down lights, lifts desk to standing position, prepares...
Partner: Here's dinner sets down loaded plate of nachos
Me: ...
Me: I'mma program tomorrow!

radiant socket
#

cute!

hollow heart
#

very

fluid plank
languid osprey
mental idol
hazy laurel
#

idk if that's even a stereotype

#

it's... a meme? idk what that is

digital bane
#

The easiest way to tell a Real Programmer from the crowd is by the programming language he (or she) uses. Real Programmers use FORTRAN. Quiche Eaters use PASCAL. Nicklaus Wirth, the designer of PASCAL, was once asked,ย "How do you pronounce your name?". He repliedย "You can either call me by name, pronouncing it 'Veert', or call me by value, 'Worth'."ย One can tell immediately from this comment that Nicklaus Wirth is a Quiche Eater. The only parameter passing mechanism endorsed by Real Programmers is call-by-value-return, as implemented in the IBM/370 FORTRAN G and H compilers. Real programmers don't need abstract concepts to get their jobs done: they are perfectly happy with a keypunch, a FORTRAN IV compiler, and a beer.

Real Programmers do List Processing in FORTRAN.

Real Programmers do String Manipulation in FORTRAN.

Real Programmers do Accounting (if they do it at all) in FORTRAN.

Real Programmers do Artificial Intelligence programs in FORTRAN.

If you can't do it in FORTRAN, do it in assembly language. If you can't do it in assembly language, it isn't worth doing.

languid osprey
mental idol
#

Could be my anxiety attacks plaguing me today or that I'm just a grumpy jerk. I know it's supposed to be a joke. Feels silly to me.

digital bane
#

More lol

#

Generally, the Real Programmer plays the same way he works -- with computers. He is constantly amazed that his employer actually pays him to do what he would be doing for fun anyway, although he is careful not to express this opinion out loud. Occasionally, the Real Programmer does step out of the office for a breath of fresh air and a beer or two. Some tips on recognizing real programmers away from the computer room:

At a party, the Real Programmers are the ones in the corner talking about operating system security and how to get around it.

At a football game, the Real Programmer is the one comparing the plays against his simulations printed on 11 by 14 fanfold paper.

At the beach, the Real Programmer is the one drawing flowcharts in the sand.

A Real Programmer goes to a disco to watch the light show.

At a funeral, the Real Programmer is the one sayingย "Poor George. And he almost had the sort routine working before the coronary."

In a grocery store, the Real Programmer is the one who insists on running the cans past the laser checkout scanner himself, because he never could trust keypunch operators to get it right the first time.

mental idol
#

The nachos were, btw, amazing and now I'm going to take a nap.

radiant socket
#

๐Ÿ‘Œ

radiant socket
#

that's 20 hours old lemon_eyes

hazy laurel
#

knees

jade bolt
#

butts /j

robust bloom
#

nostrils

carmine herald
hazy laurel
#

Speaking of Fortran, see the most recent pin in this channel \๐Ÿ˜ด

digital bane
#

I have seen C versions of this lemme search

carmine herald
#

wait what i could've sworn that happened earlier this morning, just without punch cards

fluid plank
radiant socket
#

my life is a meme ๐Ÿ˜ญ

carmine herald
#

who would want to do that anyway fuck fortran

#

ยฏ_(ใƒ„)_/ยฏ

hazy laurel
#

get in line

digital bane
#

Lol im still single

#

Cant find the c version lol

#

Lol the msogyny

#

I dont endorse it

radiant socket
#

i endorse it

jade bolt
#

real programmers dont program

hollow heart
radiant socket
#

funne

hollow heart
#

tbh i don't see the misogyny much but if i did i wouldn't appreciate you joke endorsing it

radiant socket
#

oh, i didn't see that misogyny message, i just saw the "Real programmers ..."

digital bane
hollow heart
#

this is some questionable content

#

mind just not posting it and not linking it?

digital bane
#

Lol the definition of a real programmer..
Changes with time

radiant socket
#

that's actually not that bad

hollow heart
#

i saw mental midget

digital bane
hollow heart
#

so you won't delete it?

digital bane
#

Ok

digital bane
hollow heart
#

most of it was fine

#

but as a moderator i'm gonna high key question the mean-spiritedness of it all

digital bane
#

A college prof actually shared that in class lol

#

Why i know about it

jade bolt
#

what if real programmers are fake

hazy laurel
#

then they're not real programmers

jade bolt
#

but they're real programmers

hazy laurel
#

k tired of this "real programmers" thing already

#

lmfao

dusky cliff
#

i bet real programmers wouldnt be tired of it

digital bane
dusky cliff
#

they're a subset of real programmers too

hazy laurel
#

imaginary programmers

digital bane
#

GOD is REAL (unless declared INTEGER).

jade bolt
digital bane
#

Quaternion Programmer then lol

#

Useful for 3D

mental idol
#
from cardmaker.model.constants import COLORS
from cardmaker.model.constants import FONTSIZE
from cardmaker.model.constants import FONTTYPES
from cardmaker.model.constants import HORIZONTALALIGNMENT
from cardmaker.model.constants import WEIGHT
from cardmaker.model.constants import T_COLORS
from cardmaker.model.constants import T_FONTSIZE
from cardmaker.model.constants import T_FONTTYPES
from cardmaker.model.constants import T_HORIZONTALALIGNMENT
from cardmaker.model.constants import T_WEIGHT

hep, too many options!

jade bolt
#

wait, i just noticed i'm renamed

#

weird

mental idol
#
@pytest.mark.parametrize(
    ("attr", "value", "expected"),
    (
        ("color", "default", "default"),
        ("color", None, None),
        ("color", "invalid", None),
        ("fontType", "default", "default"),
        ("fontType", None, None),
        ("fontType", "invalid", None),
        ("horizontalAlignment", "left", "left"),
        ("horizontalAlignment", None, None),
        ("horizontalAlignment", "invalid", None),
        ("isSubtle", False, False),
        ("isSubtle", None, None),
        ("isSubtle", "invalid", True),
        ("maxLines", 1, 1),
        ("maxLines", None, None),
        ("maxLines", "invalid", None),
        ("size", "default", "default"),
        ("size", None, None),
        ("size", "invalid", None),
        ("weight", "default", "default"),
        ("weight", None, None),
        ("weight", "invalid", None),
    ),
)

It continues to grow...

dusky cliff
#
from cardmaker.model.constants import (
    COLORS,
    FONTSIZE,
    ...
)

ducky_blurp

jade bolt
dusky cliff
#

lol

mental idol
#

My linters disagree with this idea.

median blade
dusky cliff
#

๐Ÿฅˆ

median blade
mental idol
#

If true, allow text to wrap. Otherwise, text is clipped.
I love the fact that this flag is optional and defaults to false. Display your message with this object, we'll clip most of it by default.

mental idol
#

This is smexy though. Look at that future annotations. (still looks weird to me)

@dataclasses.dataclass
class TextBlock:
    type: str = "TextBlock"
    text: str = ""
    color: str | None = None
    fontType: str | None = None
    horizontalAlignment: str | None = None
    isSubtle: bool | None = None
    maxLines: int | None = None
    size: str | None = None
    weight: str | None = None
    wrap: bool | None = None
#

Not quite as immediately readable to my eyes as Optional[str]

dusky cliff
#

that's a lotta nullables

#

camelCase lemon_eyes

#

papa 8 is coming 4 u

mental idol
dusky cliff
#

hm

hazy laurel
#

cursed

#

I probably would've used a dictionary here

mental idol
#
    def __repr__(self) -> str:
        # Remove all None values
        cleaned = {k: v for k, v in dataclasses.asdict(self).items() if v is not None}
        return json.dumps(cleaned)

It is, basically, a dict. One with setters.

carmine herald
#

college profs sometimes like to pretend everyone is in with their antics -_-

digital bane
mental idol
#

5 failed, 44 passed in 0.10s Close to done. This is the largest of the three needed models. Darn nap really delayed me!

#
45 passed in 0.12s
Name    Stmts   Miss Branch BrPart  Cover   Missing
---------------------------------------------------
---------------------------------------------------
TOTAL     122      0     20      0   100%

8 files skipped due to complete coverage.

There we go. Momentum. Now for sleep.

#

Next model is ez. Not even listed in the docs and just need width and entities[].mention.

"msteams": {
    "width": "Full",
    "entities": [
        {
            "type": "mention",
            "text": "<at>Preocts</at>",
            "mentioned": {
                "id": "[UID or Email here]",
                "name": "Preocts"
            }
        }
    ]
}
#

Maybe a FactSet and Action.OpenUrl to wrap it up. Toss it into a builder abstract, toss a http.client send in, bob's your uncle, and presto: mildly automated messages into teams with no need to register/build/maintain a bot.

deft yarrow
#

what is a string

river kelp
#

a noun

#

and a defined set of continuous text in python

light fractal
#

Hi, I was wondering if someone could offer a good recommendation of language to use. I want to make a website that stores posts, articles published, pictures etc and have full freedom with design elements. Reactjs and firebase a good combination to use?

grim beacon
#

@crimson cobalt

crimson cobalt
grim beacon
#

sup

crimson cobalt
#

can i know what you are doing with python

grim beacon
#

i used to make discord bots and do backend web dev with python, but now i have transitioned to more of a C#/Rust dev

#

i stil do python but not in major projects

crimson cobalt
#

and how did you started

vague plover
#

how long have you been programming moai?

grim beacon
#

i rlly started focusing on programming in 2020

crimson cobalt
grim beacon
#

well

vague plover
#

your profile says you're 14... if that's still true, I'm very impressed

grim beacon
#

i didn't do much with programming beforfe 2020. i just was introduced to scratch

jovial island
#

Hi

clever salmonBOT
#
Resources

The Resources page on our website contains a list of hand-selected learning resources that we regularly recommend to both beginners and experts.

grim beacon
#

and after learning scratch, i legit stopped until 2018 and checked out html/css

#

i learned scratch around 2015

#

so i was 5

crimson cobalt
#

how introduced you into coding

grim beacon
#

and between 2018-2020 i did very minimal coding

#

until i found python in 2020

jovial island
grim beacon
jovial island
crimson cobalt
jovial island
#

I only started python like 3-4 month ago

crimson cobalt
#

but it's fun though

grim beacon
#

it is

crimson cobalt
#

where you are heading to

jovial island
jovial island
grim beacon
jovial island
long vortex
#

๐Ÿ—ฟ

grim beacon
#

๐Ÿ—ฟ

jovial island
#

Stop

crimson cobalt
#

@long vortex ares you can not bully us begineer ๐Ÿฅฒ

long vortex
#

though, you better admit you are a beginner rather than trying to act like you are advanced

grim beacon
#

he isn't doh

haughty lion
#

@radiant socket

radiant socket
#

ok

haughty lion
#

can i share my c++ code?

radiant socket
#

only if you want help

haughty lion
#

i meant, do you know c++?

radiant socket
#

a bit

haughty lion
#
class Solution {
public:
    ListNode* mergeTwoLists(ListNode* list1, ListNode* list2) {
        ListNode* head = nullptr;
        ListNode* temp1 = list1; ListNode* temp2 = list2;
        ListNode* temp; ListNode* prev;
        
        if(list1 == nullptr)
        {
            head = list2;
            return head;
        }
        else if(list2 == nullptr)
        {
            head = list1;
            return head;
        }
        else
        {
            while(temp1 != nullptr && temp2 != nullptr)
            {
                if(temp1->val < temp2->val)
                {
                    temp = temp1;
                    temp1 = temp1->next;
                }
                else
                {
                    temp = temp2;
                    temp2 = temp2->next;
                }
                if(head == nullptr)
                {
                    head = temp;
                }
                else
                {
                    prev->next = temp;
                }
                prev = temp;
            }
            if(temp1 != nullptr)
            {
                temp->next = temp1;
            }
            else if (temp2 != nullptr)
            {
                temp->next = temp2;
            }
            return head;
        }
    }
};
#

this was the first case

#
class Solution {
public:
    ListNode* mergeTwoLists(ListNode* list1, ListNode* list2) {
        ListNode* head = nullptr;
        ListNode* temp1 = list1; ListNode* temp2 = list2;
        ListNode* temp; ListNode* prev;
        
        if(list1 == nullptr)
        {
            head = list2;
        }
        else if(list2 == nullptr)
        {
            head = list1;
        }
        else
        {
            while(temp1 != nullptr && temp2 != nullptr)
            {
                if(temp1->val < temp2->val)
                {
                    temp = temp1;
                    temp1 = temp1->next;
                }
                else
                {
                    temp = temp2;
                    temp2 = temp2->next;
                }
                if(head == nullptr)
                {
                    head = temp;
                }
                else
                {
                    prev->next = temp;
                }
                prev = temp;
            }
            if(temp1 != nullptr)
            {
                temp->next = temp1;
            }
            else if (temp2 != nullptr)
            {
                temp->next = temp2;
            }
        }
        return head;
    }
};
#

this is the second case

median holly
#

Allman bracket style is so hard to read IMO

radiant socket
#

yeah that's terrible

#

anyways

haughty lion
#

to each his own

#

ยฏ_(ใƒ„)_/ยฏ

radiant socket
#

i'm pretty sure leetcode just has a bunch of variability in their measuring thing, which probably accounts for the differences

haughty lion
#

so its a leetcode specific thing?

radiant socket
#

that's my first guess ยฏ_(ใƒ„)_/ยฏ

peak snow
#

I know this isn't about python but how can I run 2 different tasks with different versions of discord.py? I have a bot for discord.py 2.0 and one for discord.py 1.7
I want to run both on one server. Can any1 help?

haughty lion
#

i ask cuz there was a pretty huge difference in terms of competitor's times

radiant socket
#

also, are those pieces of code different?

median holly
#

yes they are

radiant socket
#

oh, there's 2 returns different, i see

median holly
#

notice the return

haughty lion
#

yes

radiant socket
#

yeah, i'd try just submitting both of them again

haughty lion
#

nvm, leetcode's just messed up beyond logic

#

i submitted the exact same code again, and it took 15 ms

radiant socket
#

yeah

remote widget
#

Okay then, ig. You are your own master ๐Ÿคท

hazy laurel
#

that was terrible

nova ember
#

Hey! That was great

remote widget
fluid plank
#

u dont use git :<

mental idol
median blade
#

brug

mental idol
#

It has a view attributes.

#

I knew I was off the deep end with the test count before even starting on a client module. 66 passed in 0.09s

mental idol
#
1 failed, 69 passed in 0.12s

lemon_happy Overshot greatness.

hazy laurel
#

obligatory "nice"

mental idol
#

Glorious

    def __repr__(self) -> str:
        return json.dumps(self.asdict)

    @property
    def render(self) -> str:
        """Render object as serialized string. All None values are removed"""
        return str(self)

    @property
    def asdict(self) -> dict[str, Any]:
        """All None values are removed from output"""
        return {k: v for k, v in dataclasses.asdict(self).items() if v is not None}

They are so interconnected it makes me giggle.

hazy laurel
mental idol
#

Not particularly. It's meant to be used as the payload of a web call so no need to be readable.

hazy laurel
#

I would've thought having a readable repr to be handy

#

just in case you ever need to debug or something

#

well... actually I'm a bit confused lol

#

if you were using the asdict as a payload, wouldn't you prefer that it's a dict? (instead of a string)

mental idol
#

asdict is for other object to assemble larger payloads together. Actually pithink as I was putting together one of the clients, the render property held little value at all. Maybe I will toss an indent into it.

#

Sounds reasonable.

hazy laurel
#

some of it seems a little weird, tbh lol

#

I feel like you'd just overwrite __dict__ and then you can do whatever outside of this class

mental idol
#

What do you mean?

clever salmonBOT
#

src/cardmaker/webhookcard.py line 13

class WebhookCard:```
hazy laurel
#

lol I think I've misunderstood how __dict__ works this entire time

#

probably not appropriate here, then

dusky cliff
#

__dict__ stores the attributes basically

mental idol
hazy laurel
dusky cliff
#

mm no

hazy laurel
#

which would have been consistent with similar dunders, but... alas, I guess I can't expect the stdl to be consistent

dusky cliff
#

well, there arent any dunders like __list__ or __tuple__ either
theres just one __iter__ which all of them will call

hazy laurel
#

fair enough

#

I wonder if implementing __iter__ here would be appropriate

#

meh, I'm sure it's fine how it is

mental idol
#

We'll see. sometime mid-this week I hope to start a story that is working with these cards.

#

at work, that is.

hazy laurel
#

also ngl I feel like using properties here is a bit strange

mental idol
#

The real neat thing is, if I've done this correctly, none of this requires any auth or registering with Teams as all. All I need is a webhook connector's URL to drop the paylaod into and done.

hazy laurel
#

like... it works, but I think I would've expected Foo.asdict to be callable

mental idol
hazy laurel
#

idk, there's like an intuitive sense based off of the semantics that you can tell it should do something more than just act as a getter, if that makes sense

dusky cliff
#

hah guess what this returns dict(["ho", "fo"])

hazy laurel
#

well

#

is it gonna be h: o, f: o

dusky cliff
#

yep

mental idol
#

Hmm.. .asdict or .asdict()

dusky cliff
#

i generally call mine to_dict()

hazy laurel
#

yeah, I'd do to_dict()

mental idol
#

Have to say, thinking about it I do trip in pathlibs when .parent is a property but .resolve() is a method.

hazy laurel
#

just because I feel like generally function/method names should be verbs

dusky cliff
#

but dataclasses calls it asdict() so theres that

hazy laurel
#

hmm I wonder if there's a semantic naming guide out there somewhere

mental idol
hazy laurel
#

Should all (or most) function/method names be verbs?

dusky cliff
#

makes sense to me

mental idol
#

verb'ed methods is a strong semantic.

dusky cliff
#

def do_main(): lemon_eyes

mental idol
#

set_, get_, fetch_, add_, save_, isolate_

hazy laurel
#

def run(): \๐Ÿ˜ฉ

mental idol
#

Gonna sleep on it (hopefully) but this was a good chatter. I appreciate it!

hazy laurel
#

so then... how about "Function/method names should typically be verbs/actions"

#

is there a fancy grammar word for actions

mental idol
#

verbs.

dusky cliff
#

isnt that just verbs

hazy laurel
#

um...

#

give me a moment

dusky cliff
#

:loading_cat:

hazy laurel
#

okay so then what was I thinking of

dusky cliff
#

what about functions that returns bools

mental idol
#

Boilerplate is cool

dusky cliff
#

def is_valid(x):

hazy laurel
#

def validate(x): \๐Ÿฅด

mental idol
#

is is my goto for anything bool checks.

dusky cliff
#

hmm validate doesnt sound bad pithink

mental idol
#

Look at how fast Mac is now!! I wonder if they flipped it over to the new arm processors.

#

Those used to be the slowest tests.

dusky cliff
#

damn

dusky cliff
#

like

#

are they all VPSs or something like that

#

or just VMs

mental idol
#
Current runner version: '2.287.1'
Operating System
  macOS
  11.6.3
  20G415

I don't know how to read that :derp:

hazy laurel
#

probably KVMs on one system

mental idol
# dusky cliff how do these work

It's all github actions so GitHub just spins up a docker container for the environment. Runs the actions in the config, then nukes it.