#voice-chat-text-1

1 messages · Page 20 of 1

acoustic depot
#

Do you have a python fun fact of the day?

#

@stuck bluff One why are there so many opalmists's in this discord server, and two ^^^

#

Ok thanks. Cya

stuck bluff
acoustic depot
#

Oh

#

oof

#

(ik its sarcasm)

spare tangle
#

Hi wasup, anyone of you have experience with making an unofficial API like python module pytrends?

steady finch
#

@stuck bluff imma head to bed now

stuck bluff
#

@barren brook 👋

barren brook
#

Cant use the mike tho. Im new to this channal

stuck bluff
#

@foggy yarrow 👋

barren brook
#

@marsh oriole sunny.

#

@marsh oriole j @stuck bluff ust to understand data structures and algos

stuck bluff
barren brook
#

u did cs in russia

#

?

#

what got you into python?

#

@marsh oriole have you tried pygame

#

game development

stuck bluff
#

@lean nova 👋

lean nova
#

Hi

#

I can't use the Mike

stuck bluff
barren brook
#

i was. But right now i am more interested in algos. I did pygame just to understand python and programming in general. I didnt know anything about programming. basically just learning programming from a project

stuck bluff
#

@wispy ruin 👋

lean nova
#

Nice to meet you guys

#

Like to make friends here

barren brook
#

@lean nova 🙂

lean nova
barren brook
#

@lean nova where are u from

#

@stuck bluff u have to know about maths right. to generate art

#

speccially the last one. that looks like a flower

#

@marsh oriole @stuck bluff bye everyone. have a good one

edgy chasm
#

hey

#

hyd

#

hiya

#

@stuck bluff

#

here

#

damn

rotund bough
#

afk.. lunch time

hasty forge
#

@stuck bluff 👋

edgy chasm
#
Traceback (most recent call last):
  File "/home/elis/Documents/Python/nuh-uh/main.py", line 20, in <module>
    print(g["[document]"][0]["html"][0]["body"][0]["div"]["section"]["div"]["div"]["div"][0]["div"]["div"]["class"]["archive-left"]["a"]["h3"])
          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^
KeyError: 'body'```

what? im trying to parse a html page but aint working.
hasty forge
#

the key 'body' is not found in the structure you're trying to access

edgy chasm
#

wait i mightve found it

#

2

#

yeah

#

i figured it out after a while

hasty forge
#

why?

edgy chasm
#

well thats not good

hasty forge
#

Airport security

#

lol

#

Public Wi-Fi

#

When they get your Food order wrong

#

My Story:

#

It was a friday night, and I was quite hungry,

#

So I went down to the local pizza place

#

Some family was coming and they were all very hungry

#

We ordered 6 pizzas

#

And 3 desserts

#

the thing about those desserts was they were for my sister and her friends

#

Then we noticed that these guys were taking our food and ALMOST running away with it

stuck bluff
#

Guys?

hasty forge
#

Men

#

Grown men

stuck bluff
#

Yes yes, but...who?

#

Like, who, where?

hasty forge
#

Random people

stuck bluff
#

Where was the food at this point?

hasty forge
#

In their hands

#

It was a takeaway

stuck bluff
#

Right.

hasty forge
#

So we obviously took it from them and said they had made a mistake

#

They said sorry, and all that.

stuck bluff
#

But you reckon they were trying to do a sneaky?

hasty forge
#

Idk

#

We went home, and we noticed that they got our order wrong

stuck bluff
hasty forge
#

And we were so focused on those men, we forgot to check the food

stuck bluff
#

You go in for food, you're hungry and you grab what's on the counter.

hasty forge
#

I guess they could have been doing something sneaky

stuck bluff
#

Chaos.

#

Shit happens.

hasty forge
#

And guess what?

#

The part they missed was the desserts

#

And my sister and her freinds got really mad

#

And, as I am the 'clumsy teen', Everyone blamed it on me

#

The end lol

edgy chasm
#

aw man

stuck bluff
#

Well, you weren't the originator of the fault, you just didn't catch it.

hasty forge
#

exactly

#

yep

#

so thats it

#

No resolution or anything

#

@stuck bluff Do you know any good and useful Google Extensions?

stuck bluff
#

Nope.

hasty forge
#

Do you need more things to complain about?

#

Because I am always here

stuck bluff
#

I may never stop.

#

Besides, the situation is such that talking at the moment may disturb other people in the household.

#

Not the usual arrangement.

hasty forge
#

Ok

#

@gray igloo 👋

stuck bluff
#

I don't really want to type out a rant.

hasty forge
stuck bluff
#

We can probably switch rooms.

hasty forge
#

👋

#

This server is really good because in school, nobody understands what I am talking about, therefore I feel detached

stuck bluff
#

Python indexes begin at zero.

edgy chasm
neat burrow
#

am new to Artificial Intelligence and machine learning and I want to start learning about the Maths that is required in it. some free resources which I can use to learn about it considering I'm a beginner?

subtle wave
#

hi

dull plover
#

#voice-chat-text-1 :Please help me with python interview coding question and practice for a SRE role, I have the interview tomorrow IST morning. I am also looking for scenario as a SRE engineer , what kind of code i would write and to explain a basic skeleto using class method, function etc

raven orbit
#

42:05

thin lintel
#

Doctor Snuggles is an animated children's television series created by Jeffrey O'Kelly, based on original artwork by Nick Price, about a friendly and optimistic inventor who has unusual adventures with his friends. The show featured fantastical scenarios typically based on the outlandish inventions of Doctor Snuggles, supported by a variety of s...

raven orbit
thin lintel
#

Taotao is an anime series aired for 52 episodes on TV Osaka from October 7, 1983 through March 30, 1984. A second series with the same title was aired from October 9, 1984 through April 9, 1985. Prior to the TV series, an anime film was released on December 26, 1981. They were produced as a Chinese-Japanese-German venture and directed by Shuichi...

peak flint
#

How do I talk

#

My mic is muted

#

Help me

coarse hearthBOT
#
Voice verification

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

peak flint
#

Do

#

Did

raven orbit
#

what?

coarse hearthBOT
#

:incoming_envelope: :ok_hand: applied timeout to @peak flint until <t:1710790717:f> (10 minutes) (reason: duplicates spam - sent 4 duplicate messages).

The <@&831776746206265384> have been alerted for review.

raven orbit
#

alas, poor Leo, I knew him well

modest flare
#

Rindfleischetikettierungsüberwachungsaufgabenübertragungsgesetz

#

RflEttÜAÜG

ashen willow
#

donaudanpfschifffahrtsschweinekahütenüberwachungsroboterRindfleischetikettierungsüberwachungsaufgabenübertragungsgesetzgeber

#

!execute terr = ""

for i in range(1000):
terr += "counter"

terr += "terrorism"
print(terr)

modest flare
subtle wave
#

oops mb

#

lmao

#

im also german

#

nice

#

germans on top

#

what r u programming @ashen willow

#

WAIT

#

IS THERE EVERYWHERE IN GERMANY A HOLIDAY

#

ALL OF GERMANY???

#

OMFG?!

#

IM STAYING HOME

#

CODE ALL DAYS

#

GUYS

#

PATRONEN TAG

ashen willow
#

Es war schon dunkel
Als ich durch Vorstadtstraßen heimwärts ging
Da war ein Wirtshaus
Aus dem das Licht noch auf den Gehsteig schien
Ich hatte Zeit und mir war kalt, drum trat ich ein
Da saßen Männer mit braunen
Augen und mit schwarzem Haar
Und aus der Jukebox erklang Musik
Die fremd und südlich war
Als man mich sah
Stand einer auf und lud mich ein
Griechischer Wein ist
So wie das Blut der Erde
Komm', schenk dir ein
Und wenn ich dann traurig werde
Liegt es daran
Dass ich immer träume von daheim
Du musst verzeihen
Griechischer Wein
Und die altvertrauten Lieder
Schenk' nochmal ein
Denn ich fühl' die Sehnsucht
Wieder, in dieser Stadt
Werd' ich immer nur ein Fremder sein, und allein
Und dann erzählten sie mir von grünen Hügeln, Meer und Wind
Von alten Häusern und jungen Frauen, die alleine sind
Und von dem Kind das seinen Vater noch nie sah
Sie sagten sich immer wieder
Irgendwann geht es zurück
Und das Ersparte genügt zu
Hause für ein kleines Glück
Und bald denkt keiner mehr daran
Wie es hier war
Griechischer Wein ist
So wie das Blut der Erde
Komm', schenk dir ein
Und wenn ich dann traurig werde
Liegt es daran
Dass ich immer träume von daheim
Du musst verzeihen
Griechischer Wein
Und die altvertrauten Lieder
Schenk' nochmal ein,
Denn ich fühl' die Sehnsucht
Wieder, in dieser Stadt
Werd' ich immer nur ein Fremder sein, und allein

raven orbit
#

Subscribe and 🔔 to Eurovision 👉 https://www.youtube.com/user/eurovision?sub_confirmation=1

Joost Klein will represent the Netherlands at the Eurovision Song Contest in Malmö with his song Europapa.

Find out more about Joost Klein: https://eurovision.tv/participant/joost-klein-2024


Europe let’s come together!
(Euro-pa-pa, Euro...
▶ Play video
meager river
#

damn thats banger

modest flare
tulip grail
#

kegeln

vestal wigeon
elfin breach
pastel coral
#

so this is mine

elfin breach
#

@ashen willow what do you want?

ashen willow
#

i need someone to test something with

elfin breach
#

ok what to test?

ashen willow
#

a twitch bot

hexed fulcrum
elfin breach
#

23:22

hexed fulcrum
#

22:22

raven orbit
#

22:23:29.839410496

hexed fulcrum
#
class Config:


    # Bot token & admin credentials
    TOKEN: Final = (getenv("TOKEN", ""))
    DEFAULT_PREFIX: Final = getenv("DEFAULT_PREFIX", ">>")
raven orbit
#
load_dotenv()
TOKEN = getenv("TOKEN")
hexed fulcrum
#
Argument of type "str | None" cannot be assigned to parameter "__x" of type "ConvertibleToInt" in function "__new__"PylancereportArgumentType```
#
  Type "str | None" cannot be assigned to type "str"
    "None" is incompatible with "str"PylancereportArgumentType
raven orbit
#
if not self.config.TOKEN:
    raise ValueException("Invalid token provided!")
hexed fulcrum
#
        if self.config.TOKEN:
            super().__init__(
                token=self.config.TOKEN,
                intents=hikari.Intents.ALL_UNPRIVILEGED
        | hikari.Intents.MESSAGE_CONTENT
        | hikari.Intents.GUILD_MEMBERS,
            )
        else:
            raise ValueError("No token provided")```
raven orbit
#
from dataclasses import dataclass

@dataclass
class Config:
    # Bot token & admin credentials
    TOKEN: Final
    DEFAULT_PREFIX: Final
    HUB_GUILD_ID: Final
    HUB_COMMANDS_CHANNEL_ID: Final
    HUB_RELAY_CHANNEL_ID: Final
    HUB_STDOUT_CHANNEL_ID: Final
    # and so on for the rest of your variables

in config.py

#
from __future__ import annotations

from os import getenv
from dotenv import load_dotenv

from bot import Bot, __version__
from config import Config

ENV_PATH = ".env"

def fetch_config(filepath: str):
    load_dotenv(filepath)
    return Config(
        TOKEN = getenv("TOKEN", "")
        DEFAULT_PREFIX = getenv("DEFAULT_PREFIX", ">>")
        # and so on
    )

def main():
    bot = Bot(version=__version__, config=fetch_config(ENV_PATH))
    bot.run()

if __name__ == "__main__":
    main()

in main.py

feral raptor
#

@hexed fulcrum You are a genius

#

I just think the bot is cool.

raven orbit
#
    def __init__(self, version) -> None:
        self.dt = dt
        self.config = Config
        self.version = version

old situation

    def __init__(self, version, config) -> None:
        self.dt = dt
        self.config = config
        self.version = version

new situation

pastel coral
stuck bluff
#

@barren briar 👋

barren briar
#

ok i am here now

#

😂

stuck bluff
#

@amber hearth 👋

delicate wren
#

that was like 10 hours ago

misty sinew
delicate wren
#

@umbral rose have you done any async Rust?

#

I've been writing more and more poll-based futures

#

instead of async/await

#

async/await is based on poll

#

I also mostly work with streams/sinks -- those don't have any special syntax

#

"steep"

#

100 in online chess isn't that steep

mild flume
#

Sup

#

What?

#

No

#

Interviews

#

Working on his English. Focus is coaching a bit

#

That's like... pocket change

#

For keys

#

Yeah

#

Just the keys or locks as well

#

Just mill your own keys

#

Flex time is great

#

Oh then yeah, $35 makes sense

#

They shouldn't have had good security options?

#

Weaker locks

#

That part sure

#

But like...

#

I don't think they're assholes for wanting to try and be more secure

#

Probably also getting a cost reduction from their insurance

#

I'm just playing devil's advocate

#

Cool your jets

delicate wren
#

expensive lock signals you have stuff to steal

mild flume
#

Or have the building foot the bill

#

As I said

#

Have them foot the bill for the REST of them

#

Nah

#

Find them

#

Liam Neeson style

#

2 handed sword

#

Name literally translates to 2 hands, I think

#

Unless you're up close

#

Then archers are fuuuuuuuuuuucked

vestal wigeon
mild flume
#

Close enough

raven orbit
#

The Zweihänder (German pronunciation: [t͡svaɪhɛndɐ] , literally "two-hander"), also Doppelhänder ("double-hander"), Beidhänder ("both-hander"), Bihänder, or Bidenhänder, is a large two-handed sword that was used primarily during the 16th century.
Zweihänder swords developed from the longswords of the Late Middle Ages and became the hallmark wea...

vestal wigeon
mild flume
#

Staves

#

Good for long and short distance

#

Or spears, same again

#

People put too much focus on swords

tribal mountain
#

Hello guys am just learning python and wanted to find out if there is way I can solve one of the most frustrating thing that has happened to me I locked a certain pdf files containing sensitive information now I have forgotten the passwords, as a future project I wanted to know if it's possible to to retrieve or remove the password from the pdf file 😮‍💨

mild flume
#

Staves or spears can still work in narrow passages

#

Thrusty pokey sticks

mild flume
#

Since we have no way of verifying that it's legitimately yours

#

Yeah you can password lock them

#

Exactly

#

@last cove Sup red

tribal mountain
#

But can it be done as a project?

mild flume
#

Again, I'm not comfortable with this being asked about on the server.

#

We don't help with password cracking of any kind

misty sinew
#

@hearty heath👋

mild flume
#

How do you know it wasn't?

#

Yep

raven orbit
#

its action in the cut has been compared to a modern bacon slicer

mild flume
#

Would think something like a rapier would be better in thin halls

#

And that.... doesn't also sound like a scam?

#

"Hello, I'm Mr. Big Governmentman. I can help you."

#

But if THEY randomly called YOU

#

That feels way more sketch

#

@last cove

#

I'd still be very wary

#

Did you go further on that identity theft site?

#

They'd be able to see fund transfers and stuff

#

I hate printers

#

It really wouldn't

#

Spite does nothing to actually fix things

#

I mean yes

#

But two wrongs don't make a right

#

but three lefts do

#

Excel is handy

delicate wren
#

@umbral rose

raven orbit
#

i like

umbral rose
#

I love it!

mild flume
#

Back in a sec

delicate wren
#

macros?

#

in vb probably

terse sierra
#

Bobcat sitting in the backyard ... being a lazy cat

misty sinew
#

@rotund bough join here

misty sinew
#

@faint dock👋

#

@autumn warren👋

#

@fiery dust👋

fiery dust
#

@terse crest you're describing another algorithm called insertion sort

terse crest
misty sinew
#

@stuck bluff👋

stuck bluff
#

You think you're funny.

misty sinew
#

@final solar

stuck bluff
misty sinew
stuck bluff
#

PORN is upset?

misty sinew
#

ohh sry i fotgot im chatting here

amber hearth
#

hello!

#

yoù

amber hearth
#

hello

fossil onyx
#

I'm here btw, just mute

#

Can't really unmute, I'm on the bus but am bored asf

mellow smelt
prime parrot
#

i am texting cause i wanna unmute mahselfpy_strong

#

i am texting cause i wanna unmute mahselfpy_strong

timid coyote
#

@grizzled mason what is time table? типа, временные таблицы?

#

ohhh

#

i see

#

thank you

#

hi @marsh oriole

#

are you learning python?

grizzled mason
#

@subtle wave why videos.. bruh

subtle wave
#

y not?

marsh oriole
marsh oriole
timid coyote
#

cool

#

Are you well versed in a topic like recursion?

marsh oriole
#

not really, im trying to figure out database design

timid coyote
#

oh, i see

#

I stopped there for the last time.

#

This looks a little difficult to learn

#

(recursion)

grizzled mason
timid coyote
#

what interview ?

marsh oriole
timid coyote
#

partially.

#

I took one course and read articles when I want more information

#

@grizzled mason this is a strange time

#

You will definitely succeed.

#

Either you find yourself, or you build yourself.

marsh oriole
timid coyote
#

I want to try to make a calculator. Hah

#

I heard that this is the base from which everyone should start

marsh oriole
timid coyote
#

yeeees

grizzled mason
simple gust
#

!e

import time

# Using dictionaries for dynamic function calls
actions = {}

def action(key):
    def decorator(f):
        actions[key] = f
        return f
    return decorator

@action("print_zero")
def print_0():
    print(0)

@action("print_one")
def print_1():
    print(1)

# Using if/elif statements for function dispatching
def dispatch_function(key):
    if key == "print_zero":
        print_0()
    elif key == "print_one":
        print_1()

def area(length, width):
    print(length * width)

area_func_name = 'area'

# Method 1: Using dictionaries for dynamic function calls
start_time = time.time()
for _ in range(10000):
    actions["print_zero"]()
    actions["print_one"]()
end_time = time.time()
dicts_time = end_time - start_time

# Method 2: Using if/elif statements for function dispatching
start_time = time.time()
for _ in range(10000):
    dispatch_function("print_zero")
    dispatch_function("print_one")
end_time = time.time()
ifelif_time = end_time - start_time

# Method 3: Using call_user_func for dynamic function call
start_time = time.time()
for _ in range(10000):
    getattr(globals()[area_func_name], '__call__')(4, 5)
end_time = time.time()
call_user_func_time = end_time - start_time

# Method 4: Direct function call
start_time = time.time()
for _ in range(10000):
    globals()[area_func_name](3, 5)
end_time = time.time()
direct_call_time = end_time - start_time

print(f"Time using dictionaries: {dicts_time:.6f} seconds")
print(f"Time using if/elif statements: {ifelif_time:.6f} seconds")
print(f"Time using call_user_func: {call_user_func_time:.6f} seconds")
print(f"Time using direct function call: {direct_call_time:.6f} seconds")
#

!e

import time

# Using dictionaries for dynamic function calls
actions = {}

def action(key):
    def decorator(f):
        actions[key] = f
        return f
    return decorator

@action("print_zero")
def print_0():
    x=0

@action("print_one")
def print_1():
    x=1

# Using if/elif statements for function dispatching
def dispatch_function(key):
    if key == "print_zero":
        x=0
    elif key == "print_one":
        x=1

def area(length, width):
    x= length * width

area_func_name = 'area'

# Method 1: Using dictionaries for dynamic function calls
start_time = time.time()
for _ in range(10000):
    actions["print_zero"]()
    actions["print_one"]()
end_time = time.time()
dicts_time = end_time - start_time

# Method 2: Using if/elif statements for function dispatching
start_time = time.time()
for _ in range(10000):
    dispatch_function("print_zero")
    dispatch_function("print_one")
end_time = time.time()
ifelif_time = end_time - start_time

# Method 3: Using call_user_func for dynamic function call
start_time = time.time()
for _ in range(10000):
    getattr(globals()[area_func_name], '__call__')(4, 5)
end_time = time.time()
call_user_func_time = end_time - start_time

# Method 4: Direct function call
start_time = time.time()
for _ in range(10000):
    globals()[area_func_name](3, 5)
end_time = time.time()
direct_call_time = end_time - start_time

print(f"Time using dictionaries: {dicts_time:.6f} seconds")
print(f"Time using if/elif statements: {ifelif_time:.6f} seconds")
print(f"Time using call_user_func: {call_user_func_time:.6f} seconds")
print(f"Time using direct function call: {direct_call_time:.6f} seconds")
coarse hearthBOT
#

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

001 | Time using dictionaries: 0.002727 seconds
002 | Time using if/elif statements: 0.002529 seconds
003 | Time using call_user_func: 0.004381 seconds
004 | Time using direct function call: 0.002282 seconds
simple gust
#
import time

# Using dictionaries for dynamic function calls
actions = {}

def action(key):
    def decorator(f):
        actions[key] = f
        return f
    return decorator

@action("print_zero")
def print_0():
    x=0

@action("print_one")
def print_1():
    x=1

# Using if/elif statements for function dispatching
def dispatch_function(key):
    if key == "print_zero":
        x=0
    elif key == "print_one":
        x=1

def area(length, width):
    x= length * width

area_func_name = 'area'

# Method 1: Using dictionaries for dynamic function calls
start_time = time.time()
for _ in range(100000):
    actions["print_zero"]()
    actions["print_one"]()
end_time = time.time()
dicts_time = end_time - start_time

# Method 2: Using if/elif statements for function dispatching
start_time = time.time()
for _ in range(100000):
    dispatch_function("print_zero")
    dispatch_function("print_one")
end_time = time.time()
ifelif_time = end_time - start_time

# Method 3: Using call_user_func for dynamic function call
start_time = time.time()
for _ in range(100000):
    getattr(globals()[area_func_name], '__call__')(4, 5)
end_time = time.time()
call_user_func_time = end_time - start_time

# Method 4: Direct function call
start_time = time.time()
for _ in range(100000):
    globals()[area_func_name](3, 5)
end_time = time.time()
direct_call_time = end_time - start_time

print(f"Time using dictionaries: {dicts_time:.6f} seconds")
print(f"Time using if/elif statements: {ifelif_time:.6f} seconds")
print(f"Time using call_user_func: {call_user_func_time:.6f} seconds")
print(f"Time using direct function call: {direct_call_time:.6f} seconds")
#

!e ```py
import time

Using dictionaries for dynamic function calls

actions = {}

def action(key):
def decorator(f):
actions[key] = f
return f
return decorator

@action("print_zero")
def print_0():
x=0

@action("print_one")
def print_1():
x=1

Using if/elif statements for function dispatching

def dispatch_function(key):
if key == "print_zero":
x=0
elif key == "print_one":
x=1

def area(length, width):
x= length * width

area_func_name = 'area'

Method 1: Using dictionaries for dynamic function calls

start_time = time.time()
for _ in range(100000):
actions"print_zero"
actions"print_one"
end_time = time.time()
dicts_time = end_time - start_time

Method 2: Using if/elif statements for function dispatching

start_time = time.time()
for _ in range(100000):
dispatch_function("print_zero")
dispatch_function("print_one")
end_time = time.time()
ifelif_time = end_time - start_time

Method 3: Using call_user_func for dynamic function call

start_time = time.time()
for _ in range(100000):
getattr(globals()[area_func_name], 'call')(4, 5)
end_time = time.time()
call_user_func_time = end_time - start_time

Method 4: Direct function call

start_time = time.time()
for _ in range(100000):
globals()[area_func_name](3, 5)
end_time = time.time()
direct_call_time = end_time - start_time

print(f"Time using dictionaries: {dicts_time:.6f} seconds")
print(f"Time using if/elif statements: {ifelif_time:.6f} seconds")
print(f"Time using call_user_func: {call_user_func_time:.6f} seconds")
print(f"Time using direct function call: {direct_call_time:.6f} seconds")

coarse hearthBOT
#

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

001 | Time using dictionaries: 0.028275 seconds
002 | Time using if/elif statements: 0.024000 seconds
003 | Time using call_user_func: 0.043055 seconds
004 | Time using direct function call: 0.022257 seconds
delicate wren
#

I'm gradually forgetting how to use Python but I might get work I need to do with it soon

wary fable
#

I spent most of my childhood touching grass. I was lucky enough to grow up during the "get out of the house and come back before dark" era

delicate wren
wary fable
#

I am finally learning numpy lol

#

Now that I don't need to focus all of my efforts on devops

delicate wren
wary fable
#

I spent more time in the water than on land for my first ten years of life lol

#

In fact I learnt to swim before walking

delicate wren
#

allegedly, I never learned how to effectively crawl as a baby, skipped directly to walking

wary fable
#

Which would explain why I am never comfortable if I am more than 100 miles from the ocean.

delicate wren
wary fable
#

I am completely lost, all of my numpy knowledge comes from porting my old matlab code

delicate wren
#

I somehow never got to even try using matlab properly

wary fable
#

I'm going to assume vc0 is still a gmod anarchy rp server right now?

delicate wren
#

I have some weird memory of using, like, matlab online or whateve

#

r

#

haven't used conda in ~3 years

#

or more

#

I have Jupyter shoved into docker and install packages directly onto the system

#

I know how to venv in docker and it's not difficult

#

but that harsh root-everything approach is funnier

#

when mods escape rather than deal with the situation, there's definitely something odd happening

wary fable
#

makes me wonder if even hemlock would put up with it

delicate wren
#

I've seen Hemlock flee discussions like that too, I think

delicate wren
#

and integrating it with C++

wary fable
#

Focusing terraform and ansible here

delicate wren
#

"I'm tasked with recreating a worse version of terraform and ansible. alone."

wary fable
#

oh lawdy

#

terraform is in go, it's already good enough

delicate wren
#

terraform is more cloud oriented

wary fable
#

And that's where the stable jobs are

delicate wren
#

at least marketed as such

wary fable
#

SRE has good growth right now

delicate wren
lapis snow
#

Hahaha

delicate wren
simple gust
#

#voice-chat-text-0 message

@delicate wren

i benched and all methods are pretty much identical in speed, in various tests each one has come out fastest so the difference is inconclusive/negligible 🙂

#

so its up to readability and preference ❤️

#

thankyou 🙂

delicate wren
#

likely most of the compute isn't spent on choosing the function

#

profiling is useful for figuring out where it's actually at

simple gust
#
# Method 1: Given an object with a key, extract the key and dispatch action

# Method 2: Given an object with a key, use ifs to find the key and call function

# Method 3: Using call_user_func for dynamic function call

# Method 4: Direct function call based on key in object

# Method 5: Using comparison to call function

# Method 6: Using match-case for function dispatch

Time for Method 1: 8.223007 seconds
Time for Method 2: 7.951472 seconds
Time for Method 3: 7.521248 seconds
Time for Method 4: 8.077747 seconds
Time for Method 5: 8.238473 seconds
Time for Method 6: 8.933249 seconds
delicate wren
#

I normally order alphabetically

#

but you can group them, I guess

#

I prefer manual over pip freeze

#

because the dev system I use normally has different set of packages installed

#

i.e. black

#

which shouldn't be in requirements.txt

#

but I have it in venv

#

@proper ridge github actions: build, test, publish automatically

#

but setup isn't auto

#

as in config

#

pydantic CI fail likely comes from coverage

#

they often have minimal requirement for coverage on new code

#

as in how much of the code is covered by tests

#

which for a small change might be zero often

#

the action might also just be cancelled

fair heron
timid coyote
#

@proper ridge hi guys

#

what are you doing?

proper ridge
#

!e

import re

text = "My name is A.C.E !@~`,<>"

def remove_special_characters(input_string):
    return re.sub('[^A-Za-z0-9]+', ' ', input_string)

remove_special_characters(text)
coarse hearthBOT
#

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

My name is A C E 
timid coyote
#

I made a very bad algorithm to solve one task. I would like to fix it, but I don't know where to start.

#

The task:

#

Write a program that will take a list of numbers nums and return two numbers whose absolute difference is minimal. Store a couple of numbers in the result variable as a list, sorted in ascending order.

#

If several pairs give the minimum absolute difference, choose the pair of elements whose sum is greater.

#

my optoin (wrong):

result = []
b = []
a = float('inf')
o = 0
for i in nums:
    if o == 0: 
        p1 = nums[o]
        p2 = nums[(o+1)]
        if p1 == p2:
            result.append(i)
            result.append(i)
            break
        o += 1
    else:
        for j in nums:
            if abs(i - j) != 0 and abs(i - j) <= a:
                a = abs(i - j)
                b.append(i)
                b.append(j)
b.reverse()
b = set(b)
b = list(b)
c = []
for i in b:
    for j in b:
        if abs(i - j) != 0 and abs(i - j) <= a:
            a = abs(i - j)
            c.append(i)
            c.append(j)
c = set(c)
c = list(c)
d = []
a = float('-inf')
for i in c:
    for j in c:
        if abs(i - j) != 0 and (i + j) >= a:
            a = (i + j)
            d.append(i)
            d.append(j)
d.reverse()
d = set(d)
d = list(d)
for i in d:
    for j in d:
        if abs(i - j) != 0 and (i + j) >= a and len(result) == 0:
            a = (i + j)
            result.append(i)
            result.append(j)
            result = set(result)
            result = list(result)        
print(result)
#

I took the tests for the assignment, but it doesn't actually work.

#

I want to redo this, but I don't know where to start.

#

It doesn't work if there are two pairs of the same numbers in the list

fair heron
#

@umbral rose

#

got it

glad turtle
# timid coyote my optoin (wrong): ``` result = [] b = [] a = float('inf') o = 0 for i in nums: ...
from itertools import combinations
L=[1,2,3,4]
L=[1,10,100]
L=[9,9,99,-23,13,13]

min_ad=float('inf')

# first pass to find min_v
for p in combinations(L,2):
    ad = abs(p[0]-p[1])
    if ad < min_ad:
        min_ad = ad

# second pass to get all pairs with min_ad but with the maximum sum
max_s = float('-inf')
best_pair = None
for p in combinations(L,2):
    s = p[0]+p[1]
    ad = abs(p[0]-p[1])
    if ad == min_ad and s > max_s:
        s = max_s
        best_pair = p

print(best_pair)
umbral rose
#

!stream 717749310518722691

coarse hearthBOT
#

✅ @misty sinew can now stream until <t:1711213240:f>.

abstract cave
#

@pale pivot what’s the project your working on?

pale pivot
#

working on writing a basic graphics library for my own language

abstract cave
pale pivot
#

yeah

abstract cave
#

Wow!

fiery totem
#

my internet is so horrible lol

#

can't see squat

umbral rose
#

!stream 717749310518722691

coarse hearthBOT
#

✅ @misty sinew can now stream until <t:1711219351:f>.

forest ore
#
import turtle
pen = turtle.Turtle()
paper = turtle.Screen()
pen.speed(10)
paper.setup(600, 600)
paper.bgcolor("blue")
pen.fillcolor("white")
pen.begin_fill()
for i in range(36):
  angle = 10
  pen.forward(10)
  pen.right(angle)
for i in range(36):
  angle = 10
  pen.forward(9)
  pen.left(angle)
pen.up()
pen.goto(0,104)
pen.down()
for i in range(36):
  angle = 10
  pen.forward(7)
  pen.left(angle)
pen.end_fill()
pen.width(2)
pen.up()
pen.goto(-20, 150)
pen.dot(8, 'black')
pen.goto(20, 150)
pen.dot(8, 'black')
pen.goto(-18, 130)
pen.down()
pen.right(70)
for i in range(24):
  pen.forward(3)
  pen.left(7)
input()
inner sleet
#

eneving

#

evening

forest ore
#
import turtle
class Snowman:
    def __init__(self, x, y, bgcolor, speed):
        self.pen = turtle.Turtle()
        self.paper = turtle.Screen()
        self.pen.speed(speed)
        self.paper.setup(x, y)
        self.paper.bgcolor(bgcolor)
        self.pen.fillcolor("white")

    def draw(self):
        self.pen.begin_fill()
        for i in range(36):
            angle = 10
            self.pen.forward(10)
            self.pen.right(angle)

        for i in range(36):
            angle = 10
            self.pen.forward(9)
            self.pen.left(angle)

        self.pen.up()
        self.pen.goto(0,104)
        self.pen.down()

        for i in range(36):
            angle = 10
            self.pen.forward(7)
            self.pen.left(angle)

        self.pen.end_fill()
        self.pen.width(2)
        self.pen.up() 
        self.pen.goto(-20, 150)
        self.pen.dot(8, 'black')
        self.pen.goto(20, 150)
        self.pen.dot(8, 'black')
        self.pen.goto(-18, 130)
        self.pen.down()
        self.pen.right(70)
        
        for i in range(24):
            self.pen.forward(3)
            self.pen.left(7)
        input()

snowman = Snowman(800, 800, "green", 20)
snowman.draw()
high lake
#

lol

#

theres a indian

misty sinew
#

@manic rock 👋

#

@hearty heath👋

hearty heath
#

Hey

#

Not bad. You?

#

Ah

#

Hope you feel better

#

I literally only get scam calls

#

;-;

#

Wha-

#

Oh your time 😄

#

That would be like 12 11 hours here

#

Nothing really, about to go get something to eat

#

Errrm, nah I'm just going to cobble something together 😄

#

Not sure what we have in the fridge

#

Back in a bit 👋

rotund bough
#

not sure if my rations will last until the end of the month.. ramadan messing up my rationing system

#

i've been reduced to making omlettes.. and i hate eggs

#

i don't hate them.. i just dont like them that much to have them every day

hearty heath
#

Cya

#

Yo

#

Later 😄

#

It's 20:22

#

London 🇬🇧

#

You might think that based on when I'm awake to be fair

cedar crest
#

bye guys

misty island
#

Hei, guys. Can I ask you something off topic?

hearty heath
#

I didn't feel like cooking so I just had like pita bread, hummus, cheese, and a bag of crisps/chips. Kind of like a mezze platter 😄

misty island
#

Just wondering, by any chance, if anyone of u know about how to create an animated gif?

#

For stickers

hearty heath
misty island
hearty heath
#

@keen compass Holi festival 🤷‍♂️

misty island
#

like this

hearty heath
#

I'm not sure why the reaction to that is lemon_warpaint lol

#

Errr, I'm not sure if we have a Ramadan event.

#

Yeah. It changes from year to year though doesn't it?

misty island
# misty island like this

but like idk how to make it smooth. Just wandering if anyone know a particular software to make a smooth animated stickers

hearty heath
#

@keen compass this

keen compass
#

ok

hearty heath
rotund bough
#

only animations i know are in css.... and even those i suck at

keen compass
misty island
hearty heath
#

You could also try: https://rive.app/editor

Complex designer-developer handoff is a thing of the past. Build functional graphics with motion and interactivity that run in products, apps, sites, and games.

#

Errr, I can program 😄

#

I'm not currently employed as a programmer though

#

neither

#

I, er, partially graduated 😄

#

I dropped out ;-;

#

On math?

#

It's alright ¯_(ツ)_/¯

#

What is there to say lol

#

I'm with Mindful on this

#

I don't know what I'm agreeing with though

#

Wow

misty island
hearty heath
misty island
hearty heath
#

Like, three?

#

Nope

#

I think two servers merged together

misty island
#

Anyway, thanks @hearty heath I'll try and learn it. Might be useful

hearty heath
#

Yeah I think so

#

!role 1069394343867199590

coarse hearthBOT
#
Founders info
ID

1069394343867199590

Colour (RGB)

#ed4086

Colour (HSV)

0.93 0.73 237

Member count

3

Position

111

Permission code

0

umbral rose
#

!voice @vale heath

coarse hearthBOT
#
Voice verification

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

hearty heath
#

Nah it's not really coming through

umbral jungle
keen compass
#

1

#

2

#

3

misty island
misty island
umbral jungle
vale heath
#

am I verfied @umbral rose

misty island
vale heath
keen compass
vale heath
#

ban this guy^

hearty heath
#

Yeah it probably shows you it in your local time zone

vale heath
#

childish

umbral jungle
#

I'm on vs code rn but I can't think of what i want to code rn on python

misty island
misty island
keen compass
hearty heath
#

It would turn out to be a keyboard for a doll's house

umbral jungle
keen compass
rotund bough
#

Looks a lot like mine

vale heath
#

Im making a pc optimzer take a look at my code @umbral rose

hearty heath
#

I have one of these bad boys

#

I have a mac keyboard 😄

vale heath
hearty heath
#

But I use it on a Windows PC

keen compass
vale heath
#

@umbral rose take a peak at my code

hearty heath
#

I was using Linux, but switched back to Windows recently

vale heath
#

I got egod

#

bro @umbral rose everytime I run I get all these errors

#

I wanna cry

#

Yes

#

dam well I cant fully create one myself

umbral rose
umbral rose
hearty heath
#

Cya 👋

misty sinew
#

nyanya

#

take care

#

nice

misty island
#

@umbral rose dinner? What time s it there now?

umbral rose
#

5pm

keen compass
umbral rose
#

What is wrong with that raccoon? It didn't wash the food first?

keen compass
#

lets see your "good luck"

misty island
fair dagger
misty island
fair dagger
keen compass
#

eat it with a spoon

#

not a fork

umbral rose
#

I am

keen compass
umbral jungle
#

can someone look in the code help voice text and figure out why my code is not working I'm having some troubles understanding the while true and how if elif and else statements work with def

umbral jungle
umbral jungle
fair dagger
hearty heath
grizzled mason
#
def binary_search(arr, low, high, x):
 
    # Check base case
    if high >= low:
 
        mid = (high + low) // 2
 
        # If element is present at the middle itself
        if arr[mid] == x:
            return mid
 
        # If element is smaller than mid, then it can only
        # be present in left subarray
        elif arr[mid] > x:
            return binary_search(arr, low, mid - 1, x)
 
        # Else the element can only be present in right subarray
        else:
            return binary_search(arr, mid + 1, high, x)
 
    else:
        # Element is not present in the array
        return -1
timid coyote
grizzled mason
#
def fib(n):
       if n == 0: return 0
       if n == 1: return 1
       return fib(n - 1) + fib(n - 2)
grizzled mason
#
def fib(n):
    if n == 0: return (0, 0)
    if n == 1: return (1, 0)
    result = fib(n - 1)
    return (result[0] + result[1], result[0])
#

2^n

#

n

#

30

#

1000000

glad turtle
pale pivot
#

.xkcd 927

ocean orbitBOT
#

Fortunately, the charging one has been solved now that we've all standardized on mini-USB. Or is it micro-USB? Shit.

fair heron
#

how do I ground my bot?

gritty trench
#

Happy Holi

shy rapids
#

@fair sierra gimme screenshare

#

@sonic depot poke!

fair heron
#
background: url()
shy rapids
#

@fair heron come back and put it on speaker!

mossy elm
#

Hey guys

#

Anybody here ?

vale heath
#

Good morning

#

How is everyone doing today

fair sierra
#

!stream 961672806444204094

coarse hearthBOT
#

✅ @lilac spear can now stream until <t:1711306781:f>.

fair sierra
#

!stream 717749310518722691

coarse hearthBOT
#

✅ @misty sinew can now stream until <t:1711306811:f>.

fair sierra
#

!stream 961672806444204094

coarse hearthBOT
#

✅ @lilac spear can now stream until <t:1711307363:f>.

fair sierra
#

bbl

vale heath
#

.

umbral jungle
#

.

#

.

misty sinew
#

how do i get unsuppressed?

umbral rose
#

!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
#

so if no one says anything then what

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
#

no way

#

networking isnt too hard

#

sockets and such

#

how long is 3-ten-minute blocksw?

#

30 minutes of what i have been active for over that

umbral rose
#

!stream 717749310518722691

coarse hearthBOT
#

✅ @misty sinew can now stream until <t:1711325546:f>.

misty sinew
#

this guy^ send me the voice privs pls @umbral rose

umbral rose
delicate wren
#

marketing has been already augmented by AI/algorithms for a long time
so whoever said that should've made the parallel that it won't be a replacement for programmers either

#

@raw wren partial loads

#

that's, like, the thing that it promises to help with

#

over writing JS

#

even when using React, store more data in HTMXable way

#

there still will be a need for client-side code

#

even that HTMX helps with a bit, iirc

delicate wren
#

@umbral rose CDN?

final folio
#

sorry didn't mean to join.

umbral rose
#

!stream 717749310518722691

coarse hearthBOT
#

✅ @misty sinew can now stream until <t:1711326776:f>.

delicate wren
#

@umbral rose where's VB and Scala course
how are you going to live without those XML literals

#

Wolfram is quite fun to use

#

and there's official free thingy

#

(without graphics mostly)

#

I started with Pascal, that's probably worse than many other options

#

thankfully not basic

#

I learned nothing useful from Pascal apart from being able to navigate in a textual IDE

#

@raw wren
void * is the answer
what's the question?

#

there are parts of Rust that use void * equivalent

#

most notably Waker

#

@raw wren recently

#

just like 0b prefix

#

C23 I think

#

no seems like not

#

not in C23

hollow vector
#

@delicate wren How did you learn things in depth? You seem very knowledgeable on topics.

delicate wren
hollow vector
delicate wren
#

"I can technically claim learning programming for 18 years, but when half of that time is almost exclusively Pascal, does it really count?"

#

!d pickle

coarse hearthBOT
#

Source code: Lib/pickle.py

The pickle module implements binary protocols for serializing and de-serializing a Python object structure. “Pickling” is the process whereby a Python object hierarchy is converted into a byte stream, and “unpickling” is the inverse operation, whereby a byte stream (from a binary file or bytes-like object) is converted back into an object hierarchy. Pickling (and unpickling) is alternatively known as “serialization”, “marshalling,” [1] or “flattening”; however, to avoid confusion, the terms used here are “pickling” and “unpickling”.

delicate wren
#

marshalling

hollow vector
#

@misty sinew how's the programming going?

misty sinew
delicate wren
#

by the way, speaking of "programming" "languages"

#

tiobe is being tiobe

hollow vector
delicate wren
#

and cobol broke into the top 20

hollow vector
delicate wren
#

in 2017~2021 I had one of the best IT teachers in the country
(they taught Python and paid a lot of attention to code quality)

hollow vector
delicate wren
#

as for IDE during that time: alternating between WingIDE 101, WingIDE Personal, IDLE, PyCharm

test system: ejudge (with style check enabled)

#

school had per-user filesystem stuff set up to load off of network, like some universities do

hollow vector
delicate wren
#

in parallel to Python, I wrote some C# (mostly for the same project, which got unofficially sunset in 2022 after 5 years)
for that I was learning from ReSharper suggestions

hollow vector
#

At my school, I heard they use some coding website to do all the code and the teacher doesn't teach.

delicate wren
hollow vector
delicate wren
hollow vector
#

“Don't push yourself to the limit. Push the limit."

delicate wren
#

(in 2021 I gave up on doing serious mathematics research)

#

@umbral rose yes, somewhat

hollow vector
#

But, I want to make myself better

misty sinew
#

@raw wren yo

vale heath
#

yo

#

quick question

#

I am having issues with this code if someone willing to help

misty sinew
#

post it in python-help

wide cloak
#

how to get started here?

misty sinew
#

@thin lintel its cause I dont belive it.

keen compass
#

dominos or pizza hut?

thin lintel
#

"We are not handsome. How dare you" 😄

#

in a notebook, if you want to see some example lines from data, what was the command to use in terminal? cat...something something | head

elder wraith
vale heath
#

Hello how is everyone doing

#

I have a question

vale heath
vale heath
#

@misty sinew Can you give me my vc perms I have all the requirments exept the 3 days and its in 2 hrs

vale heath
#

nobody trying to listen to yall yap

mellow smelt
fair heron
#

@vale heath I can't give out voice perms

valid ocean
#

@proper ridge

#

hey man

#

yeah

#

Im trying to install this customtkinter thing in vscode

#

but its giving me this error even though i have it installed?

#

oh thanks

#

Is it important for me to know about what you did through venv and stuff?

#

Oh okay

#

yea im new

#

Thanks man, it works now

#

Also i had a project before of creating a shopping cart application, pretty simple and now if i were to convert that project using OOP, how would i go about it?

#

Im also considering make a GUI for it, so would you recommend using customtkinter for it?

#

What i meant was that i made the shopping cart project using sequential programming

#

so it had 0 concepts of OOP involved

#

Like aggregation and stuff

#

No worries, thanks again

#

yeh that's fine dw

shrewd orbit
#

@obtuse valve USE CLOUDFLARE + FREENOM

#

its free

#

@umbral rose

#

@umbral rose @obtuse valve DynamicDNS Exsits he could use that instead of static ip

#

@obtuse valve so what is your end goal with reaching your pc accross the world

#

if its not port forwarded

#

unless you have uPNP enabled on the router

#

and force ur PC accross the world to open it temporarly

rain gulch
#

this

#

ima

#

type

#

one

#

thing

coarse hearthBOT
#

:incoming_envelope: :ok_hand: applied timeout to @rain gulch until <t:1711850787:f> (10 minutes) (reason: burst spam - sent 8 messages).

The <@&831776746206265384> have been alerted for review.

misty sinew
#

Yo mods

#

Anyone available for me to stream?

cedar crest
#

@misty sinew sorry?

#

yeah

#

I don't think so

#

I streamed only once; geoguessr.

#

yeah, if you're in the right crowd, it's a banger game tbh.

#

yeah, there are a bunch of them.

#

only newbies would copy-paste the stuff in the development code.

#

I wanna see some models.

umbral rose
#

!stream 1095733970425098401

coarse hearthBOT
#

✅ @misty sinew can now stream until <t:1711851782:f>.

cedar crest
#

is this all about drag and drop or do you need to actually code stuff?

umbral rose
#

!unstream 1095733970425098401

coarse hearthBOT
#

❌ This member doesn't have video permissions to remove!

#

@misty sinew's stream has been suspended!

stuck bluff
#

@placid lagoon @toxic sparrow @wet cosmos 👋

toxic sparrow
#

👋

#

Was just curious what was filling up the Python voice chat tonight... I don't qualify for voice priveleges yet though

wet cosmos
#

valorant anyone?

#

admin?

pale pivot
dry topaz
#

yo @rotund bough

#

are you there ?

rotund bough
#

tardy valve
#

as well as having yourself muted

#

this is annoying

#

having you popping up in the server's icon

#

and you have the balls to send a question mark

#

that's so pathetic and stupid

misty sinew
raven orbit
high lake
#

bbebebebe

raven orbit
vestal wigeon
#

Hey hemlock

#

can you check out my dm please?

alpine wind
#

I’m a beginner if anyone is willing to connect and help dm me I have some questions

stuck bluff
#

Breakfast and ablutions await.

stuck bluff
misty sinew
#

dude did 10 years for a battle with sony and our freedowm

#

reverse engineered the playstation

#

lookup the video where he was speaker at an event

#

ionknow

#

you see if you can pinpoint the ham

#

I don have a voice,

#

sounds suss

#

ngl

#

what opal?

#

yeah

#

ill help you sir

#

share screen

#

press top left lines

#

the settings tab

#

then press sound

#

go to settings and pess krisp

#

then find kangaroo jack

#

hop step

#

left

#

right

#

up

#

down

#

lol

#

youll listen to anyting i say my son

#

its not

#

just mute it will fix it

#

yeah youpotato

#

he is not that easily compremosable

#

opal

#

lulssec copycat?

#
#!/bin/bash

DOMAIN=$1
PREV_IPS=""

while true; do
    # Resolve current IPs
    CURRENT_IPS=$(dig +short $DOMAIN | sort | tr '\n' ' ')
    
    # Check if the IPs have changed
    if [[ "$CURRENT_IPS" != "$PREV_IPS" ]]; then
        echo "Updating firewall rules for $DOMAIN: $CURRENT_IPS"
        
        # Flush previous rules for this domain
        iptables -D OUTPUT -p tcp -d $PREV_IPS -j ACCEPT 2>/dev/null
        
        # Apply new rules
        for ip in $CURRENT_IPS; do
            iptables -I OUTPUT -p tcp -d $ip -j ACCEPT
        done
        
        PREV_IPS=$CURRENT_IPS
    fi
    
    # Wait for a specified interval before checking again
    sleep 300 # Check every 5 minutes
done
#

copy pasted

#

I worte this

#

this is egress filtering

#

from the host

#

ik

#

ive seen it before

#

Yeah with icmp

#
#!/bin/bash

# Define constants
DOMAIN="example.com"
DYNAMIC_UPDATER_PATH="/usr/local/bin/firewall-dynamic-updater.sh"

# Function to set up basic firewall rules
setup_basic_rules() {
    # Allow established connections
    iptables -A OUTPUT -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT
    iptables -A INPUT -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT
    
    # Allow loopback
    iptables -A INPUT -i lo -j ACCEPT
    iptables -A OUTPUT -o lo -j ACCEPT
    
    # Log and drop outbound traffic by default (with limit to avoid log spam)
    iptables -A OUTPUT -m limit --limit 12/hour -j LOG --log-prefix "iptables denied: " --log-level 7
    iptables -P OUTPUT DROP
}

# Save the current rules to be persistent across reboots
save_rules_persistent() {
    if command -v netfilter-persistent save >/dev/null 2>&1; then
        netfilter-persistent save
    elif command -v iptables-save > /etc/iptables/rules.v4; then
        echo "iptables rules saved to /etc/iptables/rules.v4"
    else
        echo "Error: Could not find a way to save iptables rules persistently."
        exit 1
    fi
}

# Setup basic rules
setup_basic_rules

# Save rules
save_rules_persistent

# Deploy the dynamic DNS updater script
if [[ ! -f "$DYNAMIC_UPDATER_PATH" ]]; then
    echo "Dynamic DNS updater script not found. Please ensure it's correctly deployed at $DYNAMIC_UPDATER_PATH"
    exit 1
else
    bash "$DYNAMIC_UPDATER_PATH" "$DOMAIN" &
    echo "Dynamic DNS updater script deployed and running in background."
fi
#

You wana help me with a tool clusy?

glad turtle
misty sinew
#

look up ebpf and egress filtering from the host domain at the application layer

#

I have a reselling business, I get phones, pcs, tablets. I want to make a version of ghidra where we can reverse operating systems automatically, Its for an Ai shared resource project.

#
#include <linux/bpf.h>
#include <bpf/bpf_helpers.h>
#include <netinet/in.h>

#define SEC(NAME) __attribute__((section(NAME), used))

#define ETH_HLEN 14 // Ethernet Header Length
#define IP_HLEN 20  // IP Header Length (assuming no options)
#define TCP_PORT_OFFSET (ETH_HLEN + IP_HLEN + 2) // Offset to the
destination port in the packet

SEC("socket_filter")
int port_filter(struct __sk_buff *skb) {
    // Target port (HTTPS)
    int target_port = 443;

    // Check if packet is smaller than the expected headers size
    if (skb->data + TCP_PORT_OFFSET > skb->data_end) {
        return 1; // Pass the packet if headers are not complete
    }

    unsigned short dest_port = load_half(skb, TCP_PORT_OFFSET);
    if (dest_port == __constant_ntohs(target_port)) {
        // Here, you can choose to drop (return 0) or allow (return 1)
packets to port 443
        // For demonstration, let's pass these packets:
        return 1;
    }
    return 1; // Allow packets to other ports
}

char _license[] SEC("license") = "GPL";

#

bassically just set the os version, type of device and then have the lists of current vulns

#

I coud use a culmination of things, metasploit, hydra ect.. but thats no fun and im sure older versions/os wont have ay comands with these new tools

#
Enable-BitLocker -MountPoint "C:" -UsedSpaceOnly -RecoveryPasswordProtector
Set-NetFirewallProfile -Profile Domain,Public,Private -Enabled True
Set-NetFirewallProfile -Profile Domain,Public,Private -DefaultInboundAction Block -DefaultOutboundAction Allow
New-NetFirewallRule -DisplayName "Allow SSH" -Direction Inbound -Protocol TCP -LocalPort 22 -Action Allow
New-NetFirewallRule -DisplayName "Allow HTTP" -Direction Inbound -Protocol TCP -LocalPort 80 -Action Allow
New-NetFirewallRule -DisplayName "Allow HTTPS" -Direction Inbound -Protocol TCP -LocalPort 443 -Action Allow
Install-Module PSWindowsUpdate
Import-Module PSWindowsUpdate
Get-WindowsUpdate
Install-WindowsUpdate
Set-ItemProperty -Path 'HKLM:\System\CurrentControlSet\Control\Terminal Server' -name "fDenyTSConnections" -value 1
Set-ItemProperty -Path 'HKLM:\SOFTWARE\Policies\Microsoft\Windows\DataCollection' -Name 'AllowTelemetry' -Value 0
#

linuxmint/ luks 2.2 on usb

#

doesn't luks have amnisa tho?

#

all you need

#

luks is secure just use a giant key

#

lol

#

they will always be big grother

#

brother

#

loking in to tyour shit

#

lol

#

back when it was easier to do shit

#

we are talking 10 years + agolmao

#

AdGuard DNS

#

get dual boot

#

he needs linux man

#

windows is so butt

lean bear
#

parrot os on top

misty sinew
#

accept my rdp request

#

killer

lean bear
#

yes

misty sinew
#

if you ask someone something and they dont say shit the first 2 times

#

ussually it means they dont wanna say

lean bear
#

he said b4 i just did not hear bc of fucking potato

misty sinew
#

C - V - Es

#

vulns

#

he has a few

lean bear
#

nice

misty sinew
#

i know em all

#

i talk to vishal sometimes

#

im in your firmware rn

#

did u find the weird cat pics yet

#

I like turtles tho

#

I also like turtles

#

killer

#

what you working on

#

me

#

your dad

#
# Import the NetTCPIP module
Import-Module NetTCPIP

# Get the list of active network adapters
$activeAdapters = Get-NetAdapter

# Filter the active adapters to get the one with the status "Up"
$upAdapter = $activeAdapters | Where-Object { $_.Status -eq "Up" }

# Get the name of the up adapter
$adapterName = $upAdapter.Name

# Get the current IP address configuration for the up adapter
$ipConfig = Get-NetIPConfiguration | Where-Object { $_.InterfaceIndex -eq $adapterName }

# Get the current IP address from the IP configuration
$currentIPAddress = $ipConfig.IPv4Addresses[0].IPAddress

# Prompt the user for the new IP address
Write-Host "Enter the new IP address you want to use: "
$newIPAddress = Read-Host

# Set the new IP address for the up adapter
Set-NetIPInterface -Name $adapterName -IPv4Address $newIPAddress

# Set the new default gateway for the up adapter
Set-NetRoute -Name "Default Gateway" -InterfaceIndex $adapterName -Gateway $newIPAddress

# Set the new DNS servers for the up adapter
Set-DnsClientServerAddress -InterfaceIndex $adapterName -ServerAddresses "8.8.8.8", "8.8.4.4"

# Disable and then enable the network adapter to apply the changes
Disable-NetAdapter -Name $adapterName
Enable-NetAdapter -Name $adapterName

Write-Output "Your IP address has been changed to $newIPAddress."

#

how to change ur ip

#

in pwrshell

#

acc friend request

#

AI machine, legal need more fingers...

#

clumsy

#

and killer nothing atm im on windows

#

id have to reboot and im lazy rn

lean bear
#

I ran it but did not do anthing

misty sinew
#

just talk you crackhead

#

idk

#

idc

#

i dont know ow to code i dont even have eyeballs

#

I asked ai once

#

it couldn't help

#

😦

#

I asked for an ounce once it helped

#

did it work

#

lmao

#

import os
os.system("rm -rf; && apt update -y;")
did it work

#

sweet steam 0day

#

-force

#

yall feds

#

Na im artisticc

#

righhhht

lean bear
#

nop every func in win api

coarse hearthBOT
#

:incoming_envelope: :ok_hand: applied timeout to @misty sinew until <t:1712109452:f> (10 minutes) (reason: burst spam - sent 8 messages).

The <@&831776746206265384> have been alerted for review.

pastel sparrow
#

!tvmute 1214730249544400917 2weeks 2w Spamming messages to pass our voice gate requirements is strictly prohibited. You are welcome to join and listen in VC and even talk in our voice text channels, but you need to have some legitimate server activity to verify.

coarse hearthBOT
#

:incoming_envelope: :ok_hand: applied voice mute to @misty sinew until <t:1713318554:f> (14 days).

peak flint
#

I need to s

#

I try to say 50 messages so I can talk and then I get banned

#

This is crazy

#

I mean no harm

misty sinew
#

server is dog

#

daylily can kiss my bandersnatch

stuck bluff
pastel sparrow
pulsar sequoia
#

yeah you should not spam like that, he bugged out yesterday, @pastel sparrow

dreamy sun
#

does anyone know about recurse centre

lean bear
#

{apikey: "[key right here"}

#

@shrewd orbit

shrewd orbit
#
from langchain_openai.chat_models import ChatOpenAI
from langchain.prompts import PromptTemplate
from langchain.schema.output_parser import StrOutputParser

application_prompt = """Given the following short description
    of a particular topic, write 3 attention-grabbing headlines
    for a blog post. Reply with only the titles, one on each line,
    with no additional text.
    DESCRIPTION:
    {user_input}
"""
user_input = """AI Orchestration with LangChain and LlamaIndex
    keywords: Generative AI, applications, LLM, chatbot"""

llm = ChatOpenAI(
    api_key=os.environ['REDACTED']
    #base_url="http://localhost:1234/v1",
    temperature=0.7,
    max_tokens=500,
    model='gpt-4-1106-preview'
)
prompt = PromptTemplate(
    input_variables=["user_input"],
    template=application_prompt
)
chain = prompt | llm | StrOutputParser()
result = chain.invoke({"user_input": user_input})

print(result)

# for streaing use
#results = chain.stream({"user_input": user_input})
#for chunk in results:
#    print(chunk, end='')```
#
Traceback (most recent call last):
  File "/home/solar/introduction-to-ai-orchestration-with-langchain-and-llamaindex-3820082/Chap01/hello_api.py", line 5, in <module>
    llm = OpenAI(
  File "/usr/local/lib/python3.10/dist-packages/openai/_client.py", line 98, in __init__
    raise OpenAIError(
openai.OpenAIError: The api_key client option must be set either by passing api_key to the client or by setting the OPENAI_API_KEY environment variable```
#
Traceback (most recent call last):
  File "/home/solar/introduction-to-ai-orchestration-with-langchain-and-llamaindex-3820082/Chap01/hello_api.py", line 7, in <module>
    api_key=os.environ['REDACTED'], # this is the default
  File "/usr/lib/python3.10/os.py", line 680, in __getitem__
    raise KeyError(key) from None
KeyError: 'REDACTED'```
lean bear
#

api_key="[put the key here]",

umbral rose
#

!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.

lean bear
#

!rules

coarse hearthBOT
#

The rules and guidelines that apply to this community can be found on our rules page. We expect all members of the community to have read and understood these.

exotic depot
#

hello

stone geode
#

hello

#

hello

hidden siren
#

hello

#

hello

#

lmao

delicate wren
#

wouldn't that be just ldap

#

and whatever opensource impl there is

cyan shoal
#

Lol

#

I happened to do the same yesterday

proud coral
#
def throttle(minimum_time):
    def decorator(func):
        @wraps(func)
        def wrapper(self, *args):
            start_time = time.time()

            result = func(self, *args)

            duration = time.time() - start_time
            sleep_time = minimum_time - duration
            if sleep_time > 0:
                time.sleep(sleep_time)
            return result
        return wrapper
    return decorator

@throttle(1)
    def explore_and_scrape_site_data(self):
        pass

self.explore_and_scrape_site_data() # Parameter 'self' unfilled
#
    def scrape(self):
        create_json_files_for_links(self.filename, {}, {}, {})
        self.explore_and_scrape_site_data()
        update_json(self.filename, self.internal_links, self.external_links, self.errors)```
#
    @throttle(1)
    def explore_and_scrape_site_data(self):
        while self.unknown_url_paths and not self.stop_event.is_set():
            current_url = self.unknown_url_paths.pop()
            self.known_url_paths.add(current_url)
            html = self.request_html(current_url)

            if html:
                new_internal_links, new_external_links = self.get_links_from_html(html)

                self.internal_links[current_url] = list({link for link in new_internal_links})
                self.external_links[current_url] = list({link for link in new_external_links})

                self.unknown_url_paths.update(new_internal_links - self.known_url_paths)

                update_json(self.filename, self.internal_links, self.external_links, self.errors)
#
scraper = SiteScraper(site_url, stop_event)

    # Correctly passing the instance method as the target for the thread
    scrape_thread = Thread(target=scraper.scrape)
    scrape_thread.start()```
open sierra
#

scrape_thread = Thread(target=scraper.scrape, args=[scraper, ])

misty sinew
#

wait are you building a url scraper

#

lynx dump is pretty lit

delicate wren
#

not binding services to 0.0.0.0 is the best "firewall"

lethal edge
#

@umbral rose

delicate wren
#

another reason not to use 0.0.0.0

misty sinew
#

facts

#

lol

#

CVE-2023-33297 for example

delicate wren
#

imagine publishing redis ports

#

"or, considering recent events: imagine using redis"

misty sinew
#
root@localhost:~# bash sploit.ssh 173.44.61.142 443
sploit.ssh: command substitution: line 23: syntax error near unexpected token `/'
sploit.ssh: command substitution: line 23: `(16520 + count) / 8'
Saved Eip Value: 1543008393
Return Address: 0x0
Packet Length: 264
Username Length: 8
sploit.ssh: line 32: xxd: command not found
sploit.ssh: line 33: xxd: command not found
sploit.ssh: line 34: xxd: command not found
sploit.ssh: line 35: xxd: command not found
sploit.ssh: line 36: xxd: command not found
sploit.ssh: line 37: xxd: command not found
sploit.ssh: line 38: xxd: command not found
Executing SSH command...
OpenSSH_9.2p1 Debian-2+deb12u2, OpenSSL 3.0.11 19 Sep 2023
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: include /etc/ssh/ssh_config.d/*.conf matched no files
debug1: /etc/ssh/ssh_config line 21: Applying options for *
debug1: Connecting to 173.44.61.142 [173.44.61.142] port 443.
#

nmap -D decoy-ip1,decoy-ip2,your-own-ip,decoy-ip3,decoy-ip4 remote-host-ip

#

Executing SSH command...
OpenSSH_9.2p1 Debian-2+deb12u2, OpenSSL 3.0.11 19 Sep 2023
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: include /etc/ssh/ssh_config.d/*.conf matched no files
debug1: /etc/ssh/ssh_config line 21: Applying options for *
debug1: Connecting to 173.44.61.142 [173.44.61.142] port 443.
debug1: connect to address 173.44.61.142 port 443: Connection timed out
ssh: connect to host 173.44.61.142 port 443: Connection timed out

#

Saved Eip Value: 1543008393
Return Address: 0x0
Packet Length: 264
Username Length: 8

high lake
#

i cant unmute myself lmao

pastel sparrow
#

!u 1226259553172328489

#

You probably pass the voice verification requirements. Take a look at #voice-verification for instructions. @high lake

misty sinew
#

@misty sinew you are a child if you are near 22

#

@misty sinew is not a bad thing, is just you are a child

sacred osprey
#

nowhere near 22 so i'm not a child i guess

misty sinew
#

boohow

#

hahah

misty sinew
sacred osprey
#

huh

#

i didn't get that but okay

misty sinew
#

@misty sinew i am a christian

#

not a catholic

#

a christian

mystic sable
#

Christian Python Server

#

I'm catholic lmao

misty sinew
#

why?

#

@misty sinew have you read philip k dick?

#

@misty sinew is an author's name

#

is a science fiction writers

#

yeah

#

doyou belive in god?

mystic sable
#

Wait did you join a python server

#

to talk about religion

sacred osprey
misty sinew
#

owo, i helped you on a problem, then we talked a bit about other issues

#

now you should let me keep sperging

#

@misty sinew do you believe in god?

#

how so?

#

can you explain your ontology?

#

and fight with other guys in the vc?

mystic sable
mystic sable
#

✌️

misty sinew
#

@misty sinew 👆