#voice-chat-text-1

1 messages Β· Page 45 of 1

delicate wren
#

for getting AI to do JuniorEntry-level tasks, sure you can do that

sleek thunder
#

Yeah thats the point, it will save time in those kind of tasks

#

But it can also do complex

delicate wren
#

unless it's legacy codebase, in which anything is excused

sleek thunder
#

Umm you're right but like you have to create a class structure you can't reduce it

delicate wren
sleek thunder
#

AI can't be used well on legacy codebase you're right but on new creation apps or something you created from scratch it is helpful in those

#

For Legacy code base there is a option to train GPT although it's not very much affective with large codebase but it works

delicate wren
#

it's already bad (just as AI code), unmaintainable (just as AI code) and held together by tests and assumptions (just as AI code)

sleek thunder
#

But changes in Legacy codebase can affect things that one is not aware about and it will take much more time to do changes with ai and it doesn't make sense

#

So humans have to bother with legacy codebase

#

AI work only on a structured code well

delicate wren
#

AI is better than humans for finding simple patterns in convoluted code

#

also it can't say "this is too bad, I'm not doing it, it's your problem"

delicate wren
#

legacy implies humans working on it no longer know those details either

sleek thunder
#

Yeah but to do edits, human again have to go through that code

#

Or there must be proper documentation that ai can understand

delicate wren
#

if you see it's not isolated => reject that change

#

just like with any AI involvement, it's non-trivial

#

you still need to be able, from the context of the language not the codebase, check if something is isolated or not

#

messing with JS prototypes => definitely not isolated,
monkey patching in Python => definitely not isolated,
etc.

#

unfortunately AI is trained to be quite positive about those

sleek thunder
delicate wren
#

AI will very happily suggest extending JS prototype, I can tell that even without testing, just from how often I saw those suggested in SO answers

#

latter implying just how often that appears in the training data

sleek thunder
delicate wren
#

(messing with JS prototypes is an anti-pattern if not obvious)

mild flume
#

I mean... technically not an anti-pattern

delicate wren
#

doing anything non-immutable to prototypes is quite bad

rotund bough
#

js is all prototypes. everything else is just pretend /s

mild flume
#

You're not wrong

delicate wren
#

classes are fake

#

yes

mild flume
#

Classes are just syntactic sugar around prototypes

#

EVERYTHING IS A LIE

delicate wren
#

@mild flume "they're obviously talking about this company"

sleek thunder
delicate wren
#

prototypes in JS are responsible for sharing behaviour (methods) across objects

#

by providing a common "prototype" object they take that behaviour from

#

(if simplified)

#

yes, because you go through the chain each time

mild flume
#

Wait really? That feels inefficient

delicate wren
#

well, with some shortcutting I'd expect

mild flume
#

I'd hope

delicate wren
#

and you can monkey patch python

mild flume
#

I thought that was just during __init__

#

Or I guess __new__

sleek thunder
delicate wren
#

Lua does something similar too

#

there's a different way to do prototype-like inheritance, where you fill the new object with values from the original

#

copy, then extend

#

instead of keeping a reference

#

{...base, ...extra}

#

so that becomes a union/composition/whatever else

#

some JS code does that

mild flume
#

!stream 962128994814263316

coarse hearthBOT
#

βœ… @calm tusk can now stream until <t:1729700490:f>.

mild flume
#

Genuinely thought it was a snake with really long walrus tusks for a bit

#

I'm very tired

delicate wren
#

brb

sleek thunder
mild flume
#

brb = be right back

sleek thunder
#

Got it !

mild flume
#

@keen veldt Yo

#

!source

coarse hearthBOT
delicate wren
mild flume
#

Yo

#

@fading vine And yo to you as well

#

Yos for everyone

rotund bough
#

is that a fast food chain?

#

i'm eating πŸ‡ rn

#

they seem.. not organic

#

modified

#

no i mean the πŸ‡ i'm eating

mild flume
#

Are they blinking at you?

rotund bough
#

taste diff than previous year's ones

mild flume
#

Could just be a bad season

#

Or good

rotund bough
#

😦

#

this is some ninja level marketing of arby's goin on

oak badge
#

Work? What is this magic thing?

spring finch
#

!e ```py
print(1, 1)
print(2, 2)
print(3, 3)


```py
for i in range(1, 4):
  print(i, i)
def print_doubled(i):
  print(i, i)

for i in range(1, 4):
  print_doubled(i)
coarse hearthBOT
spring finch
#

@untold fern

#

!return

#

Whats' the thingy...

#

!return-gif

coarse hearthBOT
#
Print and return

Here's a handy animation demonstrating how print and return differ in behavior.

See also: /tag return

static swan
#

@untold fern it's arbitrary, they just chose [] for type hints

#

@untold fern in python it is only when you do int / float operation, it converts both to float

#

other than that no coersion

tranquil thistle
#

i would have never thought that return and print are anything alike

wide hemlock
#

Hi

#

How are you doing ?

urban venture
#

hi

#

i am nice

urban venture
#

how r u

hoary citrus
#

@tame leaf Hey!

tame leaf
#

are you both afk??

misty sinew
hazy garden
#

brb

hazy garden
#

@kind crescent

#

this chat

#
  1. Create a new virtual environment
#
  1. Activate it using the comman C:\> <venv>\Scripts\activate.bat <--cmd
kind crescent
#

File "<frozen runpy>", line 198, in run_module_as_main
File "<frozen runpy>", line 88, in run_code
File "C:\Users\floca\AppData\Local\Programs\Python\Python313\Scripts\yolo.exe_main
.py", line 4, in <module>
from yolo.script import cli
File "C:\Users\floca\AppData\Local\Programs\Python\Python313\Lib\site-packages\yolo\script.py", line 20, in <module>
from yolo import client
File "C:\Users\floca\AppData\Local\Programs\Python\Python313\Lib\site-packages\yolo\client.py", line 38, in <module>
import keyring
File "C:\Users\floca\AppData\Local\Programs\Python\Python313\Lib\site-packages\keyring_init
.py", line 6, in <module>
from .core import (set_keyring, get_keyring, set_password, get_password,
delete_password)
File "C:\Users\floca\AppData\Local\Programs\Python\Python313\Lib\site-packages\keyring\core.py", line 14, in <module>
from . import backend
File "C:\Users\floca\AppData\Local\Programs\Python\Python313\Lib\site-packages\keyring\backend.py", line 18, in <module>
from .util import properties
File "C:\Users\floca\AppData\Local\Programs\Python\Python313\Lib\site-packages\keyring\util\properties.py", line 1, in <module>
from collections import Callable
ImportError: cannot import name 'Callable' from 'collections' (C:\Users\floca\AppData\Local\Programs\Python\Python313\Lib\collections_init_.py)

pale pivot
#

!paste

coarse hearthBOT
#
Pasting large amounts of code

If your code is too long to fit in a codeblock in Discord, you can paste your code here:
https://paste.pythondiscord.com/

After pasting your code, save it by clicking the Paste! button in the bottom left, or by pressing CTRL + S. After doing that, you will be navigated to the new paste's page. Copy the URL and post it here so others can see it.

quasi widget
pale pivot
verbal jackal
#

do you guys have any idea how i can set up keyauth

#

it just keeps giving me errors

#

😭

stuck bluff
#

The Cambridge University Gilbert & Sullivan Society's β€˜The Pirates of Penzance’!!! Performed at The Minack Theatre, Porthcurno, Penzance 17th - 21st September 2018.

An apprentice to a band of pirates, Frederic has turned 21 and has chosen to leave piracy forever. As he says farewell to his former colleagues, who should appear but the beautiful ...

β–Ά Play video
umbral rose
#

!stream 732291998274420828 1h

coarse hearthBOT
#

βœ… @quasi widget can now stream until <t:1730006155:f>.

stuck bluff
#

@fluid thicket @fickle sonnet πŸ‘‹

umbral rose
stuck bluff
#

@crystal osprey πŸ‘‹

#

@rotund spire πŸ‘‹

#

@jovial torrent πŸ‘‹

jovial torrent
#

hi

rotund spire
crystal osprey
#

!user

coarse hearthBOT
#

You are not allowed to use that command here. Please use the #bot-commands channel instead.

crystal osprey
#

I can't chat without permissions

verbal jackal
#

yellow

#

whats good

tranquil thistle
umbral rose
fair heron
#

@umbral rose https://bsky.app

Bluesky Social

Social media as it should be. Find your community among millions of users, unleash your creativity, and have some fun again.

sacred ice
#

Hello πŸ‘‹

#

I'm not able to speak .. how one can speak ,, it says suppressed ?

coarse hearthBOT
#
Voice verification

Can’t talk in voice chat? Check out #voice-verification to get access. The criteria for verifying are specified there.

stuck bluff
#

@elder wraith You cut out.

#

We don't hear you if you're talking.

#

We hear everyone else.

#

@fluid thicket πŸ‘‹

fluid thicket
#

Hi

#

i just learner

stuck bluff
#

Great!

fluid thicket
#

What are you guy building

stuck bluff
#

I don't have anything in the pipeline.

#

@short agate

#

πŸ‘‹

#

Pressed enter early so you get a big wave.

#

@lean garden πŸ‘‹

lean garden
#

hey

wary fable
#

...clarinerd and violin nerd in the same server, who's next?

stuck bluff
#

!e print(repr(object()))

coarse hearthBOT
wary fable
#

!e from future import print_fuction; print(str(object()))

coarse hearthBOT
wary fable
#

Good

#

I am very happy that that doesn't work

proper ridge
#

What's wrong with this?

class Foo:
    def __init__(self, a: int):
        self.a = a
        self.b = a + 1
    
foo = Foo(1)
new_foo = eval(repr(foo))
wary fable
#

speaking as someone who overrides __repr__() on every single class I write...my ocd is acting up just looking at that

proper ridge
wary fable
#

I find it more useful for logging and testing.

proper ridge
wary fable
#

Right now, I am doing a project where the tests are done in such a way that I have to override the repr for string and dict objects, because the tests fail if there are spaces between the objects in the string or dict repr.

stuck bluff
#

!e ```py
from dataclasses import dataclass

@dataclass
class Person:
name: str
age: int

instance = Person('Peter', 20)
print(instance)
print(repr(instance))```

coarse hearthBOT
wary fable
#

e.g.

(not pasting the whole code, that'll be silly. just the part that has to do with my task at hand)

proper ridge
#

You'd think this is what default repr does.

#

YOU'D being the emphasis.

wary fable
#

I also had to do this:

class CustomDict(dict[str, BencodedValue]):
    """
    This class inherits from Python's built-in `dict` but modifies the `__repr__` method
    to produce a string without spaces after commas, so that dict outputs will pass the
    codecrafters tests. This also adds a method to sort the dictionary by its keys in
    ascending order.

    Examples:
    >>> cd = CustomDict({})
    >>> cd
    {}
    >>> cd = CustomDict({"hello": 52, "foo": "bar"})
    >>> cd
    {'foo':'bar','hello':52}
    """

    def __repr__(self) -> str:
        """
        Returns the string representation of the CustomDict without spaces after commas.

        For string items, single quotes are used around both keys and values. Numeric
        values retain their default string representation. The output is sorted by key
        in ascending order, ensuring consistency in the representation.

        Returns:
            str: The customized string representation of the dictionary.
        """
        items = [f"{repr(k)}:{repr(v)}" for k, v in self.sort_keys().items()]
        return f'{{{",".join(items)}}}'

    def sort_keys(self) -> dict[str, BencodedValue]:
        """
        Sorts the dictionary by its keys in ascending order.

        This method ensures that the key-value pairs are consistently represented
        in a sorted manner when calling the `__repr__` method.

        Returns:
            dict: A new dictionary with the same key-value pairs as the original,
            but sorted by key.
        """
        return dict(sorted(self.items(), key=lambda item: item[0]))

where Bencoded Value is defined with type BencodedValue = int | str | "CustomList" | "CustomDict"

Yes, it's a recursive type.

fair heron
stuck bluff
#

!e py eval = ... del eval print(eval)

coarse hearthBOT
mild flume
#

!e

eval = ...
print(eval)
coarse hearthBOT
mild flume
#

!e

type
coarse hearthBOT
wary fable
#

!d itertools.takewhile

coarse hearthBOT
#

itertools.takewhile(predicate, iterable)```
Make an iterator that returns elements from the *iterable* as long as the *predicate* is true. Roughly equivalent to:

```py
def takewhile(predicate, iterable):
    # takewhile(lambda x: x<5, [1,4,6,3,8]) β†’ 1 4
    for x in iterable:
        if not predicate(x):
            break
        yield x
```  Note, the element that first fails the predicate condition is consumed from the input iterator and there is no way to access it. This could be an issue if an application wants to further consume the input iterator after *takewhile* has been run to exhaustion. To work around this problem, consider using [more\-iterools before\_and\_after()](https://more-itertools.readthedocs.io/en/stable/api.html#more_itertools.before_and_after) instead.
wary fable
#

Why yes I will use modern features just to force coworkers to update their python version.

mild flume
wary fable
mild flume
proper ridge
mild flume
proper ridge
#

On a cold and gray Chicago mornin'
Another little baby child is born
In the plateau
IN THE PLATEAUUU

mild flume
proper ridge
elder wraith
#

I look at region by culture

#

Geography is boring

proper ridge
elder wraith
#

American Nations: A History of the Eleven Rival Regional Cultures of North America is an American non-fiction book written by Colin Woodard and published in 2011. Woodard proposes a framework for examining American history and current events based on a view of the country as a federation of eleven nations, each defined by a shared culture establ...

mild flume
hoary citrus
#

Hello everyoneπŸ‘‹

proper ridge
#

pi-thon.

hoary citrus
#

@umbral rose πŸ‘‹

mild flume
proper ridge
#

!pypi shutils

coarse hearthBOT
mild flume
visual crypt
#

hey

#

I need to send messgaes

#

hey how to get nmuted?

proper ridge
#

Kindly have a look at that.

#

In the meantime, do you have a question?

#

@serene quail

#

!rule 5

coarse hearthBOT
#

5. Do not provide or request help on projects that may violate terms of service, or that may be deemed inappropriate, malicious, or illegal.

proper ridge
#

All of your questions violate rule 5.

visual crypt
#

what is illegal about that?

proper ridge
hearty heath
#

Hey there

proper ridge
#

Hello LX.

hearty heath
proper ridge
#

I have gold fish memory.

mild flume
#

This is correct

#

Both statements

proper ridge
#

Yes.

#

Pydad knows me well.

serene quail
#

Wut

visual crypt
#

is copilot better that automatic vs code prediction?

#

I thought that gen llms are bad at math

#

are you from us?

proper ridge
#

brb

proper ridge
elder wraith
#

People with title of DevOps COULD have following jobs: Build/Release Engineer, Sysadmin, SRE (Does Ops stuff with code), Dev Janitor

proper ridge
elder wraith
#

Sometimes, I refuse to get involved in CI at all

proper ridge
elder wraith
#

When someone says "I'm a DevOps Engineer" that could be 4 titles in one or just rebranding of existing job

delicate wren
#

I've completely missed what the "problem statement" was so idk

#

so google calendar

true valley
delicate wren
#

"enterprise" doesn't imply accomplishing anything either

#

(speaking of meaningless words alongside "business")

delicate wren
#

estimates suggest it'll take ~7 hours to finish the game I'm currently playing

#

Noctuary; so far 44 hours in-game

#

a lot of text

#

I've made a python script to calculate how to distribute skill points

#

(so that no extra points are left)

#

points per level is different for each of the six skills

#

except for two which are same

#
[
    [1500,2500,4000,5000,7000,10000],
    [1500,2500,4000,5000,7000,10000],
    [1000,1500,3000,5000,6000,7000],
    [1000,1500,4000,5000,7000,10000],
    [500,1000,2000,3000,5000,6000],
    [500,2000,3000,4000,5000,6000],
]
#

points cost per level

#

levels[skill][level]

#
total = [list(accumulate(level, initial=0)) for level in levels]
#

!d itertools.accumulate

coarse hearthBOT
#

itertools.accumulate(iterable[, function, *, initial=None])```
Make an iterator that returns accumulated sums or accumulated results from other binary functions.

The *function* defaults to addition. The *function* should accept two arguments, an accumulated total and a value from the *iterable*.

If an *initial* value is provided, the accumulation will start with that value and the output will have one more element than the input iterable.

Roughly equivalent to:
delicate wren
#

total cost to get to a certain level

#

!e

from itertools import accumulate, product
levels = [
    [1500,2500,4000,5000,7000,10000],
    [1500,2500,4000,5000,7000,10000],
    [1000,1500,3000,5000,6000,7000],
    [1000,1500,4000,5000,7000,10000],
    [500,1000,2000,3000,5000,6000],
    [500,2000,3000,4000,5000,6000],
]
total = [list(accumulate(level, initial=0)) for level in levels]
target = 118000
result = [ix for ix in product(*(range(7) for _ in range(6))) if sum(a[b] for a,b in zip(total,ix,strict=True))==target]
print(result)
coarse hearthBOT
# delicate wren !e ```py from itertools import accumulate, product levels = [ [1500,2500,400...

:white_check_mark: Your 3.12 eval job has completed with return code 0.

[(2, 6, 6, 6, 5, 6), (2, 6, 6, 6, 6, 5), (3, 5, 6, 6, 6, 6), (3, 6, 6, 5, 6, 6), (4, 6, 6, 6, 6, 3), (5, 3, 6, 6, 6, 6), (5, 5, 6, 6, 5, 5), (5, 6, 5, 6, 6, 3), (5, 6, 6, 3, 6, 6), (5, 6, 6, 5, 5, 5), (5, 6, 6, 6, 2, 5), (5, 6, 6, 6, 4, 4), (6, 2, 6, 6, 5, 6), (6, 2, 6, 6, 6, 5), (6, 3, 6, 5, 6, 6), (6, 4, 6, 6, 6, 3), (6, 5, 5, 6, 6, 3), (6, 5, 6, 3, 6, 6), (6, 5, 6, 5, 5, 5), (6, 5, 6, 6, 2, 5), (6, 5, 6, 6, 4, 4), (6, 6, 2, 6, 4, 6), (6, 6, 2, 6, 6, 4), (6, 6, 3, 6, 3, 6), (6, 6, 5, 5, 6, 3), (6, 6, 5, 6, 3, 4), (6, 6, 6, 2, 5, 6), (6, 6, 6, 2, 6, 5), (6, 6, 6, 4, 6, 3), (6, 6, 6, 5, 2, 5), (6, 6, 6, 5, 4, 4), (6, 6, 6, 6, 1, 3), (6, 6, 6, 6, 3, 2)]
delicate wren
#

those are all the options that fit the total

#

each tuple has levels per each skill

#

from 0 to 6 inclusive

#

yes

#

yes

#

should've written it in Prolog

#

!pypi datalog

coarse hearthBOT
#

Python library to interface with PicoLog ADC hardware

Released on <t:1547904649:D>.

delicate wren
#

huh

#

that doesn't look right

#

this is definitely not what I meant

#

datalog

#

implemented in Rust

#

used for the Rust compiler

delicate wren
#

the game did warn me there's going to be a boss battle but it told nothing about there being two of them

delicate wren
#

... or three

proper ridge
delicate wren
delicate wren
#

first, second and fourth skills are prioritised (those are HP, damage and speed)

#

so that leaves

[(6, 6, 4, 6, 5, 5), (6, 6, 5, 6, 6, 2), (6, 6, 6, 6, 3, 4)]
#

hp, damage, revive speed, speed, initial boost charge (out of 10), regen efficiency

#

can heal thrice per stage

#

(everything else healing-related is spoilers so won't say)

#

I'm still not sure if these are derived from skill levels or from actual performance in-game

#

okay, the experiment of resetting confirmed they're derived from skill levels

proper ridge
#

!pypi pytest

coarse hearthBOT
#

pytest: simple powerful testing with Python

Released on <t:1725965535:D>.

fair heron
#

@cerulean prairie here

cerulean prairie
proper ridge
#

!e

from typing import Any


def window(length: int, offset: int, vals: list[Any]) -> list[list[Any]]:
    # CHECK LATER
    if length == 0:
        return []
    if len(vals) <= length:
        return [vals]

    new_windows: list[list[Any]] = []

    for i in range(0, len(vals) - length + 1, offset):
        new_windows.append(vals[i:i+length])

    return new_windows

window(2, 1, [1, 2, 3, 4, 5, 6])
coarse hearthBOT
cerulean prairie
hearty heath
#

Oh, you're doing codewars problems?

umbral rose
#

!stream 165536887103029249

coarse hearthBOT
#

βœ… @cerulean prairie can now stream until <t:1730296624:f>.

cerulean prairie
#

yes πŸ˜„

hearty heath
#

I love programming puzzles πŸ˜„

hearty heath
#

Cya Chris

umbral rose
#

I'll be back if my class is boring

hearty heath
#

Yea I wouldn't hard-code a solution.

#

It will work for the example test cases, but it might not work when you submit your solution.

#

Yo

#

Yep, am watching

#

Mhm

#

@cerulean prairie You'll need to construct a new list containing that many empty lists.

scarlet cedar
hearty heath
#

So you'll need to create a new empty list, then in a loop append one-by-one empty lists to that list (as many as you need).

#

πŸ‘

#

Actually, @cerulean prairie, you might be able to deal with the empty list case without treating it as a special case. With just the part at the end, what does your function do? I mean just the part: ```py
new_window = []
for i in range(0, len(list) - length + 1, offset):
new_window.append(list[i:i+length])
return new_window

#

Often the special cases in problems like this are chosen to be consistent with the general case (if the problem is well-written).

#

!e ```py
def window(length, offset, list):
new_window = []
for i in range(0, len(list) - length + 1, offset):
new_window.append(list[i:i+length])
return new_window

print(window(0, 1, ['a', 'b', 'c', 'd']))

coarse hearthBOT
hearty heath
#

Seems like it should just work Β―_(ツ)_/Β―

#

Mebe

#

πŸ˜„

#

That problem was a little tricky

#

Hey that's me @cerulean prairie

#

So this is potentially how you would do it in a more "pythonic" way.

#

This will work on iterables, which are a more general class of objects than lists.

#

An iterable is anything you can loop over with a for loop.

#

Yeah, I like to experiment a bit with different solutions πŸ€·β€β™‚οΈ

#

That one's kind of ugly in my opinion.

#

It uses a list comprehension, which you might not have encountered yet.

#

Oh right.

#

Yeah that's probably a matter of just using them judiciously.

#

Β―_(ツ)_/Β―

#

I'm learning R at the moment, so I'm probably going to do some exercises on that today.

midnight dagger
#

hello

hearty heath
#

I've got to go now though. I'll probably be back later πŸ‘‹

midnight dagger
#

i wanna to ask something about selenium navigation command

cerulean prairie
mild flume
#

from string import ascii_lowercase

#

!doc str.index

coarse hearthBOT
#

str.index(sub[, start[, end]])```
Like [`find()`](https://docs.python.org/3/library/stdtypes.html#str.find), but raise [`ValueError`](https://docs.python.org/3/library/exceptions.html#ValueError) when the substring is not found.
mild flume
#

!e

print("ham".index("m"))
coarse hearthBOT
mild flume
#

!stream 165536887103029249 30M

coarse hearthBOT
#

βœ… @cerulean prairie can now stream until <t:1730301521:f>.

mild flume
#

@cerulean prairie They're going to want you to print() the output in a specific way

#

Actually I don't know if they want a print or a returned string

#

So there's a few things you can do here

#

Have you learned about string formatting?

#

!e

ham = 5
print("This is using the format method: {}".format(ham))
print(f"This is using f-strings: {ham}")
print("This is using older C style formatting: %d" % ham)
print("This is using concatenation: " + str(ham))
coarse hearthBOT
mild flume
#

I typically recommend the f-string style

#

f-strings are dope

#

@cerulean prairie Lets migrate to Live-Coding

terse sierra
#

do most sites , create a block so its hard to webscrape ? @hazy garden

hazy garden
terse sierra
#

what about a small local website ( learn basic website stuff ) then scrape that ? , that way can learn how a server behaves when being scraped ? Im from Canada

#

Dont you have a rather hi spec laptop ? lots of memory @midnight dagger

midnight dagger
#

yeah man

terse sierra
#

so can you model a small website , then be able to monitor server behavior then scrape it , 3 things to model

#

@midnight dagger

#

if scraping a uni website , how to organize all the PDF papers into a new searchable database

terse sierra
#

well when webscraping , many sites have a bit of AI or statistical monitoring so there site is not overwhelmed , because a scrape could potentially be seen as DOS attack or other

#

you want to do DATA ANALYTICS ? @midnight dagger

terse sierra
#

hmm Ham Radio people often want a simple dashboard of data from different sites , geographical , ionisphere stuff , bla bla ... then have it display in simple quick way@

mild flume
#

Pork Radio

hazy garden
terse sierra
#

ohhh gonna look that up

hazy garden
#

D3js

pale pivot
#

@prisma yew what happened?

digital kettle
#

sometimes my mic can be glitchy

#

yea

#

idk what to do so i'll just go through my projects folder and see what I have to show off

#

I found a project that's folder is just called ranked coding

#

ohhh I remember

#

basically like leak code

#

it gives you something to code and you code it

stuck bluff
#

@sand dirge πŸ‘‹

digital kettle
#

i litterally just have to make a function to merge 2 list and i am struggling 😭

#

idk that's what's hard 😭

stuck bluff
#

@mortal nacelleπŸ‘‹

mortal nacelle
#

Hi

digital kettle
#

oh wait nwm it just wanted to return list1 + list2

#

next one just wans me to find the max of a list of numbers

mortal nacelle
#

#import csv module and call open(), reader()
#solution accepts input identifying name of CSV file (i.e., "input1.csv")
#solution outputs each row of CSV file contents as a dictionary of elements
import csv

filename = input()

with open(filename) as csvfile:
reader = csv.reader(csvfile)

for row in reader:
    row_dict = {}
    for i in range(0, len(row), 2):
        
        key = row[i].strip()
        value = row[i + 1].strip()
        row_dict[key] = value
    
    print(row_dict) i dont understand how this works lol
digital kettle
#

I am struggling this is what I got rn
def find_max(d): maxi = None for i in d: if maxi == None: maxi = i else: if i > d: d = i return maxi

mortal nacelle
#

hey idk why i dont have permission to talk in the calll

stuck bluff
#

!voice

coarse hearthBOT
#
Voice verification

Can’t talk in voice chat? Check out #voice-verification to get access. The criteria for verifying are specified there.

mortal nacelle
#

thabk you i just need to send more messages

#

im doing an intro to python class and i feel so behind

#

Literally its so much LOLL

#

its more ab the loop in general i dont understand why its incrementing by 2 in the for loop then why im doing i+1

#

i wish there was a module or function that does this automaticly lol

#

thanks for your help add me as a friend please i have to go

#

Thanks man!

digital kettle
#

?

#

ok

#

I just been playing thaat game I made

#

there's not really a lot of questions

#

only 14 questions

#

ima add more

#

more like a puzzle

#

here's one of the questions

#

{
"Write a function called 'reverse_string' that reverses a string.": ["reverse_string", ["hello", "olleh"]],

#

yea there's other more harder ones

#

I don't really know what I should add

#

yk what that's what ai's for

#

what would be something hard to do?

#

oh god

#

it's getting into sorting algos

#

I have herd of merge sort but don't have a clue what it is

stuck bluff
#
Create a program that calculates the meaning of life: Use a fancy algorithm that divides your age by your shoe size to get the answer, which is obviously 42.
Design a dating app for cats: The app matches cats based on their favorite napping spots and whether they prefer laser pointers or string.
Build a calculator that only adds: Forget subtraction, multiplication, and divisionβ€”just have a button that says β€œAdd more!” to everything.
Develop a game that has no rules: Your character just runs into walls forever. Winning means you never stop playing.
Write a script that generates random error messages: Users will always be entertained when they receive messages like, β€œError 404: Your life is a mess.”
Make a code editor that only accepts gibberish: Forget proper syntax and grammar. If it looks good, it is good!
Create an app to rename all files to "Nope": Why bother with meaningful names? Just be consistent with β€œNope” for everything.
Develop a website that solely displays β€œUnder Construction”: Make it a work of art, complete with blinking GIFs and background music from the 90s.
Build a social media platform for inanimate objects: Let your forks and spoons connect with other kitchen utensils and share their thoughts on food.
Code a virtual pet rock simulator: Make sure it requires daily feeding, walking, and vet visits, even though it’s just a rock sitting on the screen.
digital kettle
#

😭 😭 😭

stuck bluff
#

I may have appended "wrong answers only" to the prompt.

digital kettle
#

XD

stuck bluff
#

@cold galleon πŸ‘‹

#

!voice

coarse hearthBOT
#
Voice verification

Can’t talk in voice chat? Check out #voice-verification to get access. The criteria for verifying are specified there.

digital kettle
#

@burnt raven πŸ‘‹πŸΏ

cold galleon
#

Hello

digital kettle
#

hi @queen karma

queen karma
#

@digital kettle hi man

digital kettle
#

what u doin

digital kettle
#

yea

#

@gritty tiger

#

hello?

#

I can hear you talk but my mic doesn't work

digital kettle
#

@runic warren hi

#

good

#

my mic doesn't work

radiant sapphire
#

@rotund bough hello ?

rotund bough
#

helo

stuck bluff
#

@strong kite πŸ‘‹

#

!voice

coarse hearthBOT
#
Voice verification

Can’t talk in voice chat? Check out #voice-verification to get access. The criteria for verifying are specified there.

strong kite
#

yep gotta send few messages

fair heron
#

@stuck bluff

strong kite
#

@fair heron show

fair heron
strong kite
fair heron
strong kite
#

idk maybe share screen if possible

fair heron
strong kite
#

what u just talked abt?

stuck bluff
#

@mild kelp πŸ‘‹

#

@lyric furnace πŸ‘‹

strong kite
#

@stuck bluff yep

#

I'm now like 26 messages away

fair heron
#

doubt

strong kite
#

still gotta figure out the 10 minutes block kinda activities

hazy garden
#

good evening everyone

fair heron
#

hi

lyric furnace
#

thanks notice me

fair heron
#

no

lyric furnace
#

good evening

fair heron
#

hi

strong kite
#

@stuck bluff how did you find out about python python

fair heron
#

mistakes were made?

strong kite
#

and what use case you had for it?

stuck bluff
#

@shell kite πŸ‘‹

shell kite
#

Hi

fair heron
#

hi

lyric furnace
#

hello the advance company

strong kite
#

@stuck bluff what ur elo?

#

ahh

#

I mostly dislike chess cause of openings

lyric furnace
#

Compatitive for what

shell kite
#

Sorry could I know what is this call is about?

lyric furnace
#

chess

shell kite
#

alright

lyric furnace
#

!zino

shell kite
#

is it possible to get feedback on a certain website?

strong kite
#

?

lyric furnace
#

oh, I just considered it is a bot command ,but it is notπŸ˜€

strong kite
#

lol

shell kite
#

yes

fair heron
#

where

#

site where

shell kite
#

?

fair heron
#

site link or it don't exist

shell kite
#

it was made by me quite a while ago and I made a couple of modifications after

fair heron
#

not centered

strong kite
#

lol

fair heron
strong kite
#

@stuck bluff from where are you reading this 😭

fair heron
#

@shell kite

fair heron
#

I think you can fix it

#

also I used to use HTML5up

stuck bluff
#

@slim lotus πŸ‘‹

lyric furnace
#

hello ntsai

#

!user

coarse hearthBOT
#

You are not allowed to use that command here. Please use the #bot-commands channel instead.

fair heron
#

!user

coarse hearthBOT
#

You are not allowed to use that command here. Please use the #bot-commands channel instead.

lyric furnace
#

Evil baby

strong kite
#

yummy

stuck bluff
#

@faint wharf πŸ‘‹

faint wharf
#

Hello there

shell kite
#

Thanks fellas I need to go now hope y'all have a nice day

lyric furnace
#

have a nice day

fair heron
#

nice day

strong kite
#

noo Opal left

elder wraith
#

πŸ¦…

misty sinew
#

Hi πŸ¦…

#

πŸ§“ Joe biden : poor kid as just as bright and talented as white kid

#

Former Vice-President and 2020 presidential candidate Joe Biden was quick to correct himself during a speech in Des Moines, Iowa on Thursday after he said poor kids "are just as bright and just as talented as white kids."

Biden was speaking about opportunity in education at the time of the gaffe.

Apparently realizing he'd made a mistake, Bide...

β–Ά Play video
#

@modern ore Wdym you ain't getting a job?

#

So its your problem that you are incompetent

#

No offence

#

Where you apply?

#

I mean from where you want to work

#

Ig maybe there are no job in your area

#

Oh

#

Have they shared the reason behind rejection?

#

Hmm

#

Damn

#

@modern ore America πŸ¦…

#

@modern ore I hope you had some saving left, else you might be domed

#

@modern ore You must mention that you are gay on resume and apply for opening only for gay

#

πŸ˜†

#

@rotund bough What the hell you are typing for so long

rotund bough
#

are constructor necessary in python?

mild flume
#

No

rotund bough
#

!e

class Trump:
    def winning(self):
        print("So much winning!")
    def hands(self):
        print("I have the best hands! You won't believe it. My hands are the best hands")
    def brain(self):
        print("I have the best brain. My brain is the best brain you will ever see")
trump = Trump()
trump.winning()
trump.hands()
coarse hearthBOT
mild flume
#

Well.... __init__ isn't required

#

__new__ is, but it does that for you

misty sinew
mild flume
#

Because she already feels the love?

misty sinew
#

Russian accent is just terrifying

mild flume
misty sinew
mild flume
#

It's so amazing

misty sinew
#

I envy that little guy

mild flume
misty sinew
#

after inflation pizza :

fair heron
misty sinew
fair heron
#

it's pizza

misty sinew
#

What!?

#

How could that be pizza?

#

OH

#

Pizza is american

#

@modern ore Have you tried walk in interview ?

#

Damn your luck is bad for real

#

I hope you may get job asap

misty sinew
# rotund bough !e ```py class Trump: def winning(self): print("So much winning!") ...

!e

class Trump:
    def rule_one(self):
        print("Do anything to win")
    def rule_two(self):
        print("Fight for recognition")
    def rule_three(self):
        print("Fight till death")
    def rule_four(self):
        print("Sell fantasy to people")
    def rule_five(self):
        print("Deny everything, pretend you never lost")
    def rule_six(self):
        print("Rule are meant to broken as long as you can bare consequence")

trump = Trump()
methods = [trump.rule_one, trump.rule_two, trump.rule_three, trump.rule_four, trump.rule_five, trump.rule_six]

for method in methods:
    method() 

coarse hearthBOT
mild flume
#

@hazy garden What program is that?

hazy garden
#

the one in which I have the color pallete

#

the pages are open in Firefox though

mild flume
#

Gotcha

hazy garden
#

dev tools are enabled, so I can see different screen sizes

raven orbit
#

the last pickle

misty sinew
#

!e

import numpy as np


X = np.array([[0, 0], [0, 1], [1, 0], [1, 1]])
y = np.array([[0], [1], [1], [0]])


class SimpleNN:
    def __init__(self):
        self.W1 = np.random.rand(2, 2) - 0.5
        self.b1 = np.random.rand(1, 2) - 0.5
        self.W2 = np.random.rand(2, 1) - 0.5
        self.b2 = np.random.rand(1, 1) - 0.5

    def sigmoid(self, x):
        return 1 / (1 + np.exp(-x))

    def sigmoid_derivative(self, x):
        return x * (1 - x)

    def forward(self, X):
        self.Z1 = X.dot(self.W1) + self.b1
        self.A1 = self.sigmoid(self.Z1)
        self.Z2 = self.A1.dot(self.W2) + self.b2
        return self.sigmoid(self.Z2)

    def backward(self, X, y, output, learning_rate=0.1):
        dZ2 = (output - y) * self.sigmoid_derivative(output)
        dW2 = self.A1.T.dot(dZ2)
        db2 = np.sum(dZ2, axis=0, keepdims=True)
        dZ1 = dZ2.dot(self.W2.T) * self.sigmoid_derivative(self.A1)
        dW1 = X.T.dot(dZ1)
        db1 = np.sum(dZ1, axis=0)

        # Update weights and biases
        self.W1 -= learning_rate * dW1
        self.b1 -= learning_rate * db1
        self.W2 -= learning_rate * dW2
        self.b2 -= learning_rate * db2

    def train(self, X, y, epochs=10000):
        for epoch in range(epochs):
            output = self.forward(X)
            self.backward(X, y, output)
            if epoch % 1000 == 0:
                loss = np.mean((y - output) ** 2)
                print(f"Epoch {epoch}, Loss: {loss:.4f}")


nn = SimpleNN()
nn.train(X, y)
print("Predictions after training:", nn.forward(X).round())

coarse hearthBOT
# misty sinew !e ``` import numpy as np X = np.array([[0, 0], [0, 1], [1, 0], [1, 1]]) y = n...

:white_check_mark: Your 3.12 eval job has completed with return code 0.

001 | Epoch 0, Loss: 0.2611
002 | Epoch 1000, Loss: 0.2500
003 | Epoch 2000, Loss: 0.2500
004 | Epoch 3000, Loss: 0.2500
005 | Epoch 4000, Loss: 0.2499
006 | Epoch 5000, Loss: 0.2498
007 | Epoch 6000, Loss: 0.2487
008 | Epoch 7000, Loss: 0.2365
009 | Epoch 8000, Loss: 0.1816
010 | Epoch 9000, Loss: 0.0716
... (truncated - too many lines)

Full output: https://paste.pythondiscord.com/QU4BXEV473GHWUO7K7UAZRWTVM

misty sinew
#

Why opium?

#

X-ray is bad, at large scale it can be mis managed and it had to be regulated

hazy garden
#

brb, gotta eat dinner

#

take care people πŸ™‚

rotund bough
#

!e

class Trump:
    def __init__(self):
        data = {
            "name": "DJ Trump",
            "winning": "So much winning!",
            "hands": "My hands are the best hands!",
            "on_powder": "COVFEFE!",
        }
        self.data = data
        self.deny = "Fake News!"

    def say(self, attr):
        return self.data.get(attr) if attr in self.data else self.deny

trump = Trump()
print(trump.say("name"))
print(trump.say("on_powder"))
print(trump.say("in_press"))
coarse hearthBOT
visual crypt
#

dj trump

#

what is oliveassembly?

hazy garden
#

the name of my site

visual crypt
#

!e

coarse hearthBOT
#
Missing required argument

code

visual crypt
#

!e
print("trump")

coarse hearthBOT
visual crypt
#

!e
import numpy

coarse hearthBOT
stuck bluff
#

@dusky flax πŸ‘‹

fair heron
#

Why is your name @dusky flax

dusky flax
fair heron
dusky flax
#

My name is Max

fair heron
#

hi max

dusky flax
misty sinew
#

Can I say n word?

dusky flax
#

Ok I take it this is not the server for me

misty sinew
#

N word is new format

#

Nigro is n word?

dusky flax
#

Yh bye

misty sinew
#

its my surname

dusky flax
#

Why does Discord have to be so weird???

misty sinew
#

World itself is weird

#

it is my surname

#

There is famous guy named dan nigro you can search

#

Its quite common

#

I'm not black but my surname literally means black πŸ˜•

#

Oh thats interesting

#

bye

stuck bluff
#

@wooden marlin πŸ‘‹

proper folio
#

@radiant sapphire hi

average basic minecraft wallpaper when i was a kid lmao

change it to somethin more minimalist

stuck bluff
#

!e py my_dict = {'key a': 'value a', 'key b': 'value b', 'key c': 'value c'} print(my_dict.keys()) print(my_dict.values()) print(my_dict.items())

coarse hearthBOT
radiant sapphire
proper folio
radiant sapphire
fair heron
proper folio
#

when using .items, why is only gonna be dict_items([('key a', 'value a'), ('key b', 'value b'), ('key c', 'value c')])
even tho at the start is already in like this: my_dict = {'key a': 'value a', 'key b': 'value b', 'key c': 'value c'}

stuck bluff
#
var = 123```
#

!e py var = 'Hello, world.' print(globals())

coarse hearthBOT
# stuck bluff !e ```py var = 'Hello, world.' print(globals())```

:white_check_mark: Your 3.12 eval job has completed with return code 0.

{'__name__': '__main__', '__doc__': None, '__package__': None, '__loader__': <_frozen_importlib_external.SourceFileLoader object at 0x7f8699dacd70>, '__spec__': None, '__annotations__': {}, '__builtins__': <module 'builtins' (built-in)>, '__file__': '/home/main.py', '__cached__': None, 'var': 'Hello, world.'}
stuck bluff
#

!e py globals()['var'] = 'Hello, world.' print(var)

coarse hearthBOT
stuck bluff
#

@visual flax πŸ‘‹

#

!d dict

coarse hearthBOT
#

class dict(**kwargs)``````py

class dict(mapping, **kwargs)``````py

class dict(iterable, **kwargs)```
Return a new dictionary initialized from an optional positional argument and a possibly empty set of keyword arguments.

Dictionaries can be created by several means:

β€’ Use a comma\-separated list of `key: value` pairs within braces: `{'jack': 4098, 'sjoerd': 4127}` or `{4098: 'jack', 4127: 'sjoerd'}`

β€’ Use a dict comprehension: `{}`, `{x: x ** 2 for x in range(10)}`

β€’ Use the type constructor: `dict()`, `dict([('foo', 100), ('bar', 200)])`, `dict(foo=100, bar=200)`
visual flax
#

im not speaking good eng

#

am cybersec consultant

stuck bluff
#

!e py my_dict = {'Apples': 1, 'Pears': 5} my_dict['Oranges'] = 10 print(my_dict) popped = my_dict.pop('Apples') print(my_dict) print(popped) my_dict['Pears'] = 20 print(my_dict)

coarse hearthBOT
stuck bluff
#

@wary beacon πŸ‘‹

wary beacon
#

hi

strong kite
#

hi @stuck bluff

#

still need to send few more messages to verify

echo widget
#

hello

#

i cant talk

#

@gritty tiger

#

im here

#

i really dont know

#

what

#

to do

#

what is happening

#

someone is screaming like a cartoon charecter

#

dont

#

talk

#

behind

#

his

#

back

#

its

#

bad

strong kite
#

I read @rotund bough as mommy leaks

echo widget
#

really

#

why

strong kite
#

memory

echo widget
#

im gonna call you zoni

#

what is 1+2

strong kite
echo widget
lyric furnace
#

Solutions

#

three different notes

#

nodes

true valley
lyric furnace
#

can python run on esp32

pulsar anchor
#

not entirely python though

lyric furnace
#

micropython

#

is there pip

pulsar anchor
#

I'd expect Python proper to depend on the existence of some operation system to run

lyric furnace
#

hello noodlereaper

lyric furnace
misty sinew
#

Hello anyon here wanna play chess against me?

#

If you won, I would give you 20 bucks and if I won you have to do the same for me

#

@cold trellis I'm sorry but what you were talking about

pulsar anchor
misty sinew
#

10 minute rapid

#

@serene quail You can use your android device to test your app

cold trellis
misty sinew
#

@serene quail what exactly you wanna do?

cold trellis
#

there's nothing official

misty sinew
#

Its hard to understand what he intends to do

elder wraith
delicate wren
#

I do some level of microservices even when I do stuff on my own, but that's just to get "while X is restarting, Y may still work normally"

#

and, since recently, there sometimes are reasons to have a giant part of the application have all its traffic shoved through a proxy, while the rest isn't

#

so it's just easier to put it as a separate process

misty sinew
#

anyone can helo me

delicate wren
#

help with what?

misty sinew
#

a game

#

ooh

delicate wren
#

@gritty tiger you can do DNS challenge

#

... and Discord crashed

#

am back

delicate wren
#

woohoo reg.ru API got broken again

#

(speaking of DNS challenges)

delicate wren
#

@raven orbit not free for long

delicate wren
#

way before I started using it, there was a breaking change of banning GET requests

#

and now no more passing arguments in query params

#

form data only

olive echo
#

sry cant talk rn

raven orbit
delicate wren
#

I don't remember the whole context anymore

cursive cloud
proper folio
#

im gonna mute, till it finish @stuck bluff . i have urgent questions about my .csv

#

or is there anyone that understand data manipulation with phyton. i can ask with?

proper folio
#

Visualize score distribution

plt.figure(figsize=(10, 6))
sns.countplot(x='score', data=data, palette='viridis')
plt.title('Distribution of Review Scores')
plt.xlabel('Score')
plt.ylabel('Count')
plt.show()

#

.py:3: FutureWarning:

Passing palette without assigning hue is deprecated and will be removed in v0.14.0. Assign the x variable to hue and set legend=False for the same effect.

sns.countplot(x='score', data=data, palette='viridis')

#

what is dis error or wut? codes run well

proper ridge
#

!code

coarse hearthBOT
#
Formatting code on Discord

Here's how to format Python code on Discord:

```py
print('Hello world!')
```

These are backticks, not quotes. Check this out if you can't find the backtick key.

For long code samples, you can use our pastebin.

proper folio
misty sinew
#

What page?

stuck bluff
#

@mystic spruce πŸ‘‹

mystic spruce
#

hi

#

im suppressed

stuck bluff
#

!voice

coarse hearthBOT
#
Voice verification

Can’t talk in voice chat? Check out #voice-verification to get access. The criteria for verifying are specified there.

mystic spruce
#

!voice

misty sinew
#

I have been muted for months

#

Action taken against me

stuck bluff
#

@misty sinew πŸ‘‹

misty sinew
#

I asked them: How could I euthanize myself legally and got muted

proper ridge
#

!rule 2

coarse hearthBOT
misty sinew
#

My bad, I deserve mute

tame leaf
#

You should look into antidepressants tho

stuck bluff
#

@clear sage Down here

clear sage
#

oh

#

i am debating between https://www.weatherapi.com/docs/ and https://openweathermap.org/api

currently using openweathermaps but have heard about inaccuracy issues

clear sage
#

lol

#

(β•―Β°β–‘Β°)β•―οΈ΅ ┻━┻

stuck bluff
#

@tired inlet πŸ‘‹

tired inlet
#

@stuck bluff hi

#

@stuck bluff how i can use if

proper ridge
tired inlet
#

i cant see anything

stuck bluff
#
if condition:
    'Exactly one if'
elif some_other_condition:
    'Zero or more elifs'
else:
    'Zero or one else.'```In this order. The first condition to be satisfied has its accompanying codeblock run.
#

!e py print('A') if True: print('B') print('C')

coarse hearthBOT
tired inlet
#

but

#

i use if and else

#

he always use the if

proper ridge
#

You can do:

  • IF
  • IF-ELSE
  • IF-ELIF-ELSE
  • IF-ELIF
stuck bluff
#

@plucky dome πŸ‘‹

clear sage
#

if condition: expression elif condition: expression else: expression

#

the standard structure for if, elif, and else

proper ridge
#

When you do just IF, if the statement is not truthy, then it'll just proceed to the rest of your code. When you do IF-ELSE, you will run either IF block or ELSE block, so it doesn't just ignore the IF-ELSE block. When you do IF-ELIF-ELSE then you have some additional conditions (additional IFs you want) using ELIFs. You can have multiple ELIFs.
If you use IF-ELIF, then same as IF only, it will first check if the condition(s) are met, and if not the whole clause is ignored.

tired inlet
#

i use
name = (input('whats your name?'))
if name == smile or sad:
print ('BLABLA')
else:
print(' hello and welcome')

is that right?

proper ridge
coarse hearthBOT
tired inlet
#

it works in IDLE Python

proper ridge
#

FYI,

if name == "smile" or name == "sad"

is the same as

if name in ["smile", "sad"]
tired inlet
#

hmmm

#

im now under stand

proper ridge
#

Use code style please.

#

!code

coarse hearthBOT
#
Formatting code on Discord

Here's how to format Python code on Discord:

```py
print('Hello world!')
```

These are backticks, not quotes. Check this out if you can't find the backtick key.

For long code samples, you can use our pastebin.

tired inlet
#

i dont know how

#

ohh

#

i well try

misty sinew
#

hey guys
I have a problem with Selenium
I want to scroll the page down but i dont know how

proper ridge
#

Not quote marks.

#

`

#

And py, not python.

misty sinew
#

@proper ridge can u help me

tired inlet
#

'''py
print ('hello world')
'''

proper ridge
clear sage
#
z = 3
if z % 2 == 0:
    print("z is divisible by 2")
elif z % 3 == 0:
    print("z is divisible by 3")
else:
    print("z is neither divisible by 2 nor by 3")
#

thanks

#

that's what i eanted to send

proper ridge
#

If you want to run this now, just put !e before the snippet.

#

!e

z = 3
if z % 2 == 0:
    print("z is divisible by 2")
elif z % 3 == 0:
    print("z is divisible by 3")
else:
    print("z is neither divisible by 2 nor by 3")
coarse hearthBOT
tired inlet
#

!code

coarse hearthBOT
#
Formatting code on Discord

Here's how to format Python code on Discord:

```py
print('Hello world!')
```

These are backticks, not quotes. Check this out if you can't find the backtick key.

For long code samples, you can use our pastebin.

tired inlet
#
print ('hello')
#

i got it

proper ridge
#

Just gorgeous like you.

clear sage
#

still a really pretty gem

#

@proper ridge what sauce would u have with fries?

#

oh

#

i would mix sauces

#

mayo, ketchup, and some spicy sauce

#

amazing combo

stuck bluff
#

@fresh bramble πŸ‘‹

clear sage
stuck bluff
#
clear sage
plucky dome
#

it takes so long to send 50 texts

#

i am on 23

#

does it count if you send a text after a text?

proper ridge
#

!e

vals = [1, 2, 3, 4]

for i in range(len(vals)):
    print(vals[i])

for val in vals:
    print(val)
coarse hearthBOT
proper ridge
#

@clear sage

#

!e

vals = [1, 2, 3, 4]

# Prints the pairs, aka 12 then 23 then 34
for a, b in zip(vals[0:-1], vals[1:]):
    print(a, b)

# Prints index `i` and value `val`
for i, val in enumerate(vals):
    print(i, val)
coarse hearthBOT
plucky dome
#

what is that?

stuck bluff
#

!e py for ab in zip('abc', '123'): print(ab)

coarse hearthBOT
stuck bluff
#

!e py for a, b in zip('abc', '123'): print(f'{a} and {b}')

coarse hearthBOT
stuck bluff
#

!e py for iv in enumerate('abc'): print(iv)

coarse hearthBOT
stuck bluff
#

!e py for i, v in enumerate('abc'): print(i, v)

coarse hearthBOT
plucky dome
#

thats cool

proper ridge
#

It's a sequence.

#

That's why you can do len() and __slice__ and __iter__.

stuck bluff
#

!e py a, b, c = [1, 2, 3] print(a) print(b) print(c)

coarse hearthBOT
stuck bluff
#

!e py for a, b, c in [(1, 2, 3), (4, 5, 6), (7, 8, 9)]: print(f'{a=}, {b=}, {c=}')

coarse hearthBOT
plucky dome
#

i don't really understand this but it looks cool

stuck bluff
#

!e py a = [] b = [[], a, a] print(b) a.append('abc') print(b)

coarse hearthBOT
plucky dome
#

20 more texts to go

pulsar anchor
#

!e

a = ['_']
b = [[], a, a.copy()]
print(b)
a.append('abc')
print(b)
coarse hearthBOT
pulsar anchor
#

!e

a = ['_']
b = [[], a, a.copy()]
print(b)
b.copy()[0].append('abc')
print(a)
print(b)
coarse hearthBOT
stuck bluff
#

!e py a = [] b = [] c = a print(a == b) print(a is b) print(a is c)

coarse hearthBOT
plucky dome
#

so close

radiant sapphire
pulsar anchor
#

my eyes feel way worse with light on

stuck bluff
#

!e py a = [] my_list = [a for _ in range(5)] print(my_list) a.append(123) print(my_list)

coarse hearthBOT
proper ridge
#

!e

a = [2, 3, 1, 1]
b = list(set(a))
print(b)
coarse hearthBOT
stuck bluff
#

!e ```py
def func(values):
seen = set()
result = []
for value in values:
if value not in seen:
result.append(value)
seen.add(value)
return result

print(func([2, 3, 1, 1]))```

coarse hearthBOT
plucky dome
#

do yall know how to fix packet loss?

proper ridge
#
[{'gate': 'H', 'qubit_indices': 0},
 {'gate': 'CX', 'control_index': 0, 'target_index': 1}]
#

I need to record the indices in the exact order you see there.

plucky dome
#

i did that i have a 200 mb download

#

and a 5 up

fair heron
#

!e

a = [2, 3, 1, 1]
seen = set()
result = []

for item in a:
    if item not in seen:
        seen.add(item)
        result.append(item)

print(result)
coarse hearthBOT
fair heron
#

!e

from collections import OrderedDict

a = [2, 3, 1, 1]
result = list(OrderedDict.fromkeys(a))

print(result)
coarse hearthBOT
plucky dome
#

i have 9 more texts i have to send

clear sage
#

nice

plucky dome
#

i am at 47

pulsar anchor
#

!d collections.OrderedDict

coarse hearthBOT
#

class collections.OrderedDict([items])```
Return an instance of a [`dict`](https://docs.python.org/3/library/stdtypes.html#dict) subclass that has methods specialized for rearranging dictionary order.

Added in version 3\.1\.
pulsar anchor
#

!d collections.OrderedDict.move_to_end

plucky dome
#

50

coarse hearthBOT
#

move_to_end(key, last=True)```
Move an existing *key* to either end of an ordered dictionary. The item is moved to the right end if *last* is true (the default) or to the beginning if *last* is false. Raises [`KeyError`](https://docs.python.org/3/library/exceptions.html#KeyError) if the *key* does not exist:

```py
>>> d = OrderedDict.fromkeys('abcde')
>>> d.move_to_end('b')
>>> ''.join(d)
'acdeb'
>>> d.move_to_end('b', last=False)
>>> ''.join(d)
'bacde'
```   Added in version 3\.2\.
pulsar anchor
#

so that's why it's still not deprecated

#

ah, and also the equality

#

, and reversed iteration

#

a total of four things in addition to orderedness

#

imagine being able to have a wide voice range, couldn't be me

stuck bluff
#

@little oracle πŸ‘‹

pulsar anchor
#

@clear sage Fireship is by Jedd Delaney, and freeCodeCamp is by Quincy Larson

#

so not the same people

#

just happens to have similar logos

clear sage
#

i see

pulsar anchor
#

router often is both a DHCP client and a DHCP server

#

latter you can configure

#

(specifically, you need to set DHCP static rules/whatever, not just temporary assign it)

#

@stuck bluff ICMP blocking is something Docker has to deal with too

#

TCP and UDP are simple to deal with

#

everything else -- less so

#

you can get code done when you work 12 hours a day

#

but you absolutely cannot learn this way

#

at least not systematically

#

excessive rewatching/rereading is only okay if it's entertaining I think

pulsar anchor
#

@plucky dome pre-fork library got abandoned

#

it's basically dead now

plucky dome
#

.

pulsar anchor
#

the one you mentioned as broken, from which you had to switch to the new one

plucky dome
#

oh

pulsar anchor
#

environment variable

#

then .env file in docker compose

plucky dome
#

?

proper ridge
#

!kindling

coarse hearthBOT
#
Kindling Projects

The Kindling projects page on Ned Batchelder's website contains a list of projects and ideas programmers can tackle to build their skills and knowledge.

plucky dome
#

!kindling

stuck bluff
#

@limber gale @jolly perch πŸ‘‹

#

!resources

coarse hearthBOT
#
Resources

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

fair heron
lime citrus
opal crane
#

Can someone who is good in tech knows about node.js bot hosting dm me ? I need help in some matter

fair heron
lime citrus
# fair heron

that is how it is supposed to look. What is missing?

pulsar anchor
# fair heron

do you have something that forces dark theme on websites?
it could be making background darker than it should be

#

thus the image borders stand out

fair heron
#

ah, I understood incorrectly, I expected it to be similar to the other pages

pulsar anchor
#

it intersects the letters

pulsar anchor
#

but normally it's same colour

lime citrus
#

I see, thanks.

#

hmm, on my mac in dark mode, firefox or chrome, the color is correct. idk what Dark Reader is doing.

fair heron
#

making it dark lol

lime citrus
lime citrus
stuck bluff
#

@stark charm πŸ‘‹

untold fern
tame leaf
untold fern
stuck bluff
#

@long dawn πŸ‘‹

radiant sapphire
#

@stuck bluff hello

#

?

#

@stuck bluff are you mute or something else i cant hear you

misty sinew
#
public class HelloWorld {
    public static void main(String[] args) {
        System.out.println("Hello, World!");
    }
}```
delicate wren
#

at least the grammar is correct lol

#

thus not violating the Oracle copyright

hallow trail
#

seks

stuck bluff
#

!e py import numpy as np arr = np.array([4, 3, 2, 2, 1]) _, idx = np.unique(arr, return_index=True) arr = arr[np.sort(idx)] print(arr)

coarse hearthBOT
stuck bluff
#

@proper ridge Apparently pandas' unique preserves order?

#

!d pandas.unique

coarse hearthBOT
#

pandas.unique(values)```
Return unique values based on a hash table.

Uniques are returned in order of appearance. This does NOT sort.

Significantly faster than numpy.unique for long enough sequences. Includes NA values.
stuck bluff
#

and is faster

fair heron
stuck bluff
#

@frail shadow πŸ‘‹

#

@spice scroll πŸ‘‹

stuck bluff
#

@inner charm πŸ‘‹

#

@brazen swift πŸ‘‹

brazen swift
#

Yo what's up?

misty sinew
#

I wonder how big India or China's GDP have to be to have per capita similar to that of USA?

#

@tame leaf Why you sound like you had weed?

tame leaf
#

I wish i was high tho

stuck bluff
#

@near galleon πŸ‘‹

stuck bluff
#

@silver timber πŸ‘‹

#

@misty sinew πŸ‘‹

misty sinew
stuck bluff
#

!voice

coarse hearthBOT
#
Voice verification

Can’t talk in voice chat? Check out #voice-verification to get access. The criteria for verifying are specified there.

misty sinew
#

i did

#

it doesn't worek

#

yes

#

british

#

okay

#

denmakr

#

damn i wish i could speak

normal turtle
#

@stuck bluff

stuck bluff
#

Hmmmmm?

normal turtle
#

are you familiar with ML

stuck bluff
#

Aware of it. Not versed in implementing it.

normal turtle
#

ohk do you know how can i encode a column with 1000 unique values

stuck bluff
#

What are the parameters of these unique values.

#

@grave swan πŸ‘‹

#

!voice

coarse hearthBOT
#
Voice verification

Can’t talk in voice chat? Check out #voice-verification to get access. The criteria for verifying are specified there.

stuck bluff
#

@scarlet plinth πŸ‘‹

#

@tepid kayak πŸ‘‹

tepid kayak
#

hi guys

tepid kayak