#voice-chat-text-0

1 messages Β· Page 72 of 1

lyric minnow
#

all good one of my best friends is from there so I was just wondering

sharp urchin
#

ohh nice

#

your asian?

#

if i may ask?.

lyric minnow
#

no

sharp urchin
#

ohk

lyric minnow
#

im not

#

Anyways I just wanted to say thanks for helping me out with my python.

#

Peace out guys

sharp urchin
#

yeh

#

later opal

gray tapir
#

Guys. Am I inaudible?

sharp urchin
#

yeh

frosty star
golden sonnet
#

πŸ™Œ

sharp urchin
#

hello

#

goin gud

#

(till now)

jolly radish
#

hey

sharp urchin
#

lol

somber heath
#

@whole bear πŸ‘‹

sharp urchin
#

ended b4 it started

#

:[

golden sonnet
#

hi opal

sharp urchin
#

@wanton spruce where you getting these questions from?

#

if you dont mind telling:]

#

ty

#

< 3

wanton spruce
sharp urchin
#

i only know few

#

like leetcode

#

and others

golden sonnet
#

i like codewars more than leetcode

sharp urchin
#

dont know much abt deez

#

:{

wanton spruce
#

im trying to do at least one of the puzzles a day to practice and apply

golden sonnet
#

leetcode works with classses more
code wars works with functions more

sharp urchin
#

i just wanna practice questions in order to improve my logic skills

golden sonnet
sharp urchin
#

harvard?

golden sonnet
#

yup

sharp urchin
#

ohk

#

cool

#

ty:}

sharp urchin
golden sonnet
#

1 sec

golden sonnet
#

this is the first one

#

they have 10

sharp urchin
#

ohk yeh got it

#

thanks will be looking at it in like 3-4 days

sharp urchin
golden sonnet
#

there are many sites

sharp urchin
#

@final agate in short so tht no one misuses it

#

in streaming

#

imma stream mario

golden sonnet
#

welcome to the league of legends

somber heath
#

@undone parcel πŸ‘‹

#

@timber warren πŸ‘‹

sharp urchin
#

i am not

#

have to see sum yt

#

:}

#

sorry didnt get you

#

come again please

#

@final agate

#

you can text here

golden sonnet
#

@somber heath can you give the link to your works you showed the other day?

final agate
#

import requests
import time
import telegram

Your Telegram bot's API key

API_KEY = '*****************'

The chat ID of the Telegram user or group you want to send the price to

CHAT_ID = '*******'

The URL for the CoinMarketCap API endpoint for Bitcoin

BTC_PRICE_API_URL = 'https://pro-api.coinmarketcap.com/v1/cryptocurrency/quotes/latest?symbol=BTC&convert=USD'

The header for the CoinMarketCap API request

HEADERS = {
'Accepts': 'application/json',
'X-CMC_Pro_API_Key': '1ccd4cff-17ca-459d-b2ea-1328bacc21a7',
}

Initialize the Telegram bot

bot = telegram.Bot(token=API_KEY)

Function to get the latest price of Bitcoin

def get_btc_price():
response = requests.get(BTC_PRICE_API_URL, headers=HEADERS)
data = response.json()
btc_price = data['data']['BTC']['quote']['USD']['price']
return btc_price

Function to send the latest price of Bitcoin to Telegram

def send_btc_price_to_telegram():
btc_price = get_btc_price()
message = f'The current price of Bitcoin (BTC) is ${btc_price:.2f}.'
bot.send_message(chat_id=CHAT_ID, text=message)

Send the price of Bitcoin to Telegram every hour

while True:
send_btc_price_to_telegram()
time.sleep(5)

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.

final agate
hoary olive
#

wazzup

golden sonnet
#
import requests
import time
import telegram

# Your Telegram bot's API key
API_KEY = '**'

# The chat ID of the Telegram user or group you want to send the price to
CHAT_ID = '**'

# The URL for the CoinMarketCap API endpoint for Bitcoin
BTC_PRICE_API_URL = 'https://pro-api.coinmarketcap.com/v1/cryptocurrency/quotes/latest?symbol=BTC&convert=USD'

# The header for the CoinMarketCap API request
HEADERS = {
    'Accepts': 'application/json',
    'X-CMC_Pro_API_Key': '1ccd4cff-17ca-459d-b2ea-1328bacc21a7',
}

# Initialize the Telegram bot
bot = telegram.Bot(token=API_KEY)

# Function to get the latest price of Bitcoin
def get_btc_price():
    response = requests.get(BTC_PRICE_API_URL, headers=HEADERS)
    data = response.json()
    btc_price = data['data']['BTC']['quote']['USD']['price']
    return btc_price

# Function to send the latest price of Bitcoin to Telegram
def send_btc_price_to_telegram():
    btc_price = get_btc_price()
    message = f'The current price of Bitcoin (BTC) is ${btc_price:.2f}.'
    bot.send_message(chat_id=CHAT_ID, text=message)

# Send the price of Bitcoin to Telegram every hour
while True:
    send_btc_price_to_telegram()
    time.sleep(5)
hoary olive
#

'X-CMC_Pro_API_Key': '1ccd4cff-17ca-459d-b2ea-1328bacc21a7',

#

you sure this isnt your own api key?

final agate
#

this is it

golden sonnet
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.

golden sonnet
#

add py

hoary olive
#

cruiser

sharp urchin
hoary olive
#

i think you leaked your api token

sharp urchin
hoary olive
#

ah

sharp urchin
#

its @final agate

final agate
#

all it's correct

sharp urchin
#

i just formatted it

final agate
#

`import requests
import time
import telegram

Your Telegram bot's API key

API_KEY = '5889611966:AAFPDSx1jGPO_rdJNtB_9iOQ_vwKSSfsEG0'

The chat ID of the Telegram user or group you want to send the price to

CHAT_ID = '1372325447'

The URL for the CoinMarketCap API endpoint for Bitcoin

BTC_PRICE_API_URL = 'https://pro-api.coinmarketcap.com/v1/cryptocurrency/quotes/latest?symbol=BTC&convert=USD'

The header for the CoinMarketCap API request

HEADERS = {
'Accepts': 'application/json',
'X-CMC_Pro_API_Key': '1ccd4cff-17ca-459d-b2ea-1328bacc21a7',
}

Initialize the Telegram bot

bot = telegram.Bot(token=API_KEY)

Function to get the latest price of Bitcoin

def get_btc_price():
response = requests.get(BTC_PRICE_API_URL, headers=HEADERS)
data = response.json()
btc_price = data['data']['BTC']['quote']['USD']['price']
return btc_price

Function to send the latest price of Bitcoin to Telegram

def send_btc_price_to_telegram():
btc_price = get_btc_price()
message = f'The current price of Bitcoin (BTC) is ${btc_price:.2f}.'
bot.send_message(chat_id=CHAT_ID, text=message)

Send the price of Bitcoin to Telegram every hour

while True:
send_btc_price_to_telegram()
time.sleep(5)
`

hoary olive
#

you donut

#

you leaked your api token

#

bruh

#

i love how your ignoring me

golden sonnet
hoary olive
#

no

#

im not crazy

golden sonnet
#

then what's the issue?

sharp urchin
#

how can we?

#

:{}

final agate
sharp urchin
#

am just kidding

golden sonnet
#

@final agate can you copy paste the error?

final agate
#

c:\Users\Win10\Desktop\BOT.py:38: RuntimeWarning: coroutine 'Bot.send_message' was never awaited
bot.send_message(chat_id=CHAT_ID, text=message)
RuntimeWarning: Enable tracemalloc to get the object allocation traceback

hoary olive
#

await it?

golden sonnet
#
def send_btc_price_to_telegram():
    btc_price = get_btc_price()
    message = f'The current price of Bitcoin (BTC) is ${btc_price:.2f}.'
    bot.send_message(chat_id=CHAT_ID, text=message)

i think you need to work around here

#

but i've never done bots

hoary olive
#

await bot.send_message(chat_id=CHAT_ID, text=message)

#

possibly?

final agate
hoary olive
#

API_KEY = '5889611966:AAFPDSx1jGPO_rdJNtB_9iOQ_vwKSSfsEG0'

#

you even leaked your telegram API key

#

....

somber heath
#

@somber forge πŸ‘‹

golden sonnet
ancient lily
#

@somber heath hello

final agate
hoary olive
golden sonnet
#

bot is bot

hoary olive
#

telegram python sucks

golden sonnet
#

still bot

#

better to be asked in a chat that people do bots

final agate
#

how can i fixe this prb guys now ?

golden sonnet
hoary olive
#

Async And Routines are soo useful

golden sonnet
#

@somber heath can you give the link to your graphic work u showed the other day?

hoary olive
#

Opal, thats rendering not async

#

Thats sandbox rendering or smth

hoary olive
#

forgot the name .....

#

still rendering != anything to do with async

#

thats HTTP 2

#

it gets very specific , since HTTP 1 didnt used to support any ASync

#

HTTP 1.1 had support for pipelining

#

but HTTP 2 had multiplexing

#

HTTP 1.0 was just serial

#

so pipelining means

#

its async, but still ordered

#

they all get downloaded at the same time, but in order

#

multiplex means theres no order to it

somber heath
#

@celest pond πŸ‘‹

golden sonnet
#

imma get tea
anyone want a cup?

sharp urchin
#

then yes

golden sonnet
#

we have that as well

sharp urchin
#

i love them

golden sonnet
#

but this ones earl grey

sharp urchin
#

hmm

golden sonnet
sharp urchin
#

aight imma head out,catch yall later:}

golden sonnet
#

may python be with you

hoary olive
#

iranian?

golden sonnet
#

yeah

hoary olive
#

same lol

worthy token
#

what are we talking about today

golden sonnet
#

πŸ‘€

#

you didn't sound iranian the other day

#

congrats on good accent i guess

hoary olive
#

ye

#

i typed Ψ§Ω…ΫŒΨ± Ψ±ΨΆΨ§

worthy token
#

i am not iranian

hoary olive
#

thought you got it

golden sonnet
#

thought you know the alphabet

hoary olive
#

fair

golden sonnet
#

so you are in iran or just have the originality?

hoary olive
#

i am in iran

golden sonnet
#

hiπŸ‘‹

wanton spruce
#
# Write a Python program that accepts
# a list of integers and calculates
# the length and the fifth element.
# Return true if the length of the list
# is 8 and the fifth element occurs thrice in the said list.
wanton spruce
#
def list_len_fifth(list_nums):
    count = 0
    if len(list_nums) == 8:
        for i in list_nums:
            if i == list_nums[4]:
                count += 1
    if count == 3:
        print('True')

list_len_fifth([1,4,6,8,4,6,7,4])
#

ah ok

#

it's not returning any value

rare stream
wanton spruce
#

5th element of any list

somber heath
#

!e py letters = list('abbccc') print(letters) print(letters.count('b'))

wise cargoBOT
#

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

001 | ['a', 'b', 'b', 'c', 'c', 'c']
002 | 2
golden sonnet
somber heath
#

!e py print(False and False) print(False and True) print(True and False) print(True and True)

wise cargoBOT
#

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

001 | False
002 | False
003 | False
004 | True
sudden barn
wanton spruce
#

fulfill condition that there are at least 3 occurances of 5th element of the list

golden sonnet
rare stream
#

if it's at least, then you want to check if count >= 3

sudden barn
#

Nah. It's just =3.

golden sonnet
#

you should check the len of it

wanton spruce
#

well i stopped it at ==3 because anymore is not necessary to fulfill the condition

rare stream
#

What if its 4 or five times?

#

then return False?

golden sonnet
#

o sorry it's not alist

#

nvm

sudden barn
#
def list_len_fifth(list_nums : list[int]):
    count = 0
    if len(list_nums) == 8:
        for i in list_nums:
            if i == list_nums[4]:
                count += 1
    if count == 3:
        return True
    return False

print(list_len_fifth([1, 4, 6, 8, 4, 6, 7, 4]))
print(list_len_fifth([1, 6, 8, 4, 6, 7, 4]))

I dunno this works for me.

rare stream
#

But I would not use that solution....

#

you can just do this:

def list_len_fifth(list):
    if (len(list) == 8 and list.count(list[4]) == 3):
        return True
    return False
    
print(list_len_fifth([1, 2, 3]))
print(list_len_fifth([1,4,6,8,4,6,7,4]))
#

I forgot to equal the count to 3 lol

#

edited

somber heath
#
def func(arg):
    return len(arg) == 8 and arg.count(arg[4]) == 3```
rare stream
golden sonnet
#

i believe you can use a list comprehension as well
it'll be longer but workable

wanton spruce
#
def list_len_fifth(arg):
    return len(arg) == 8 and arg.count(arg[4]) == 3
        
list_len_fifth([1,4,6,8,4,6,7,4])

so I plugged this into PyCharm and it returning no value at all

somber heath
#

@zenith garnet πŸ‘‹

#

@hazy saffron πŸ‘‹

golden sonnet
#

you mean like black?

vestal mason
#

camelCase

golden sonnet
#

snake case is more readable really

hoary olive
#

prefrence

vestal mason
#

snake_case

hoary olive
#

i prefer camelcase

uncut meteor
#

!pep 8

wise cargoBOT
#
**PEP 8 - Style Guide for Python Code**
Status

Active

Created

05-Jul-2001

Type

Process

somber heath
#

Naming Conventions.

golden sonnet
#

@vestal mason there are simple programs you can write to convert camel case to snake case and vice versa

wanton spruce
#

brb

golden sonnet
#

so this is rust?

somber heath
#

@ruby isle πŸ‘‹

jolly radish
#

I can't speak even after completing the eligibility requirements?

golden sonnet
#

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

simple anvil
#

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

simple anvil
#

!verify

uncut meteor
#

module Main where

import Data.Char
import Data.List
import System.IO
import Debug.Trace

data Instr = NoOp
           | AddX Int
           deriving Show


-- (XRegister, Cycle, SignalStrength)
type Env = (Int, Int, Int)


evalInstrs :: Env -> [Instr] -> Env
evalInstrs env instrs = foldl evalInstr env instrs

evalInstr :: Env -> Instr -> Env
evalInstr (reg, cyc, sig) (NoOp)
  | mod (cyc - 20) 40 == 0 = (reg, cyc + 1, sig + (reg * cyc))
  | otherwise              = (reg, cyc + 1, sig)

evalInstr (reg, cyc, sig) (AddX number)
  | mod (cyc - 20)     40 == 0 = (reg + number, cyc + 2, sig + (reg * cyc))
  | mod ((cyc+1) - 20) 40 == 0 = (reg + number, cyc + 2, sig + (reg * (cyc+1)))
  | otherwise                  = (reg + number, cyc + 2, sig) 


parseLines :: String -> [Instr]
parseLines s = map parseLine (lines s)

parseLine :: String -> Instr 
parseLine s | s == "noop"          = NoOp
            | (take 4 s) == "addx" = AddX (read (drop 4 s) :: Int)
            | otherwise            = NoOp


main :: IO ()
main = do
  contents <- getContents
  print (evalInstrs (1, 1, 0) (parseLines contents))
hoary olive
#

nice

#

i used to use haskell for xmonad

uncut meteor
#

!vban 921958681761947689

wise cargoBOT
#

:x: This command is not yet implemented. Maybe you meant to use voicemute?

uncut meteor
#

!voicemute 921958681761947689

wise cargoBOT
#

:incoming_envelope: :ok_hand: applied voice mute to @simple anvil permanently.

uncut meteor
#

!ban 921958681761947689 Trolling, spam leave joining

wise cargoBOT
#

:incoming_envelope: :ok_hand: applied ban to @simple anvil permanently.

hoary olive
#

bad troll

uncut meteor
#

!stream @whole bear

wise cargoBOT
#

βœ… @whole bear can now stream until <t:1675529821:f>.

velvet axle
#

how I deal with xss?

#

kotlin and sdk it's not official?

hoary olive
velvet axle
hoary olive
#

CSP, encoding data, filtering data, response headers

#

common ways

velvet axle
#

filtering data = filtering packets?

#

monitoring protocols?

hoary olive
hoary olive
velvet axle
#

what did you think of learning how a injection attack works for preventing?

hoary olive
#

what i mean when i say filter is

#

when you know your user is going to give you their email

velvet axle
#

about complexity it's what makes my mind goes brrrr

hoary olive
#

regex it , example: ^[\w-\.]+@([\w-]+\.)+[\w-]{2,4}$

velvet axle
#

because it can't be one person

hoary olive
#

theres no way an email address will have a semi colon in it

#

so just filter it out like that

velvet axle
#

like a http sql injection

hoary olive
#

SQL injection is a very complicated injection method. Its not hard to do it, Buts its hard to properly do it

#

but use PDO's

#

boom sql injection fixed

velvet axle
#

it's very cheap here

hoary olive
#

what language are you using?

#

Best to use the local entity package your language provides

velvet axle
#

I'm not using any language

#

at moment

hoary olive
#

ok

#

fair enough

velvet axle
#

so I have a paid VPN

#

but I discovered that they record everything

#

a extensive log

hoary olive
#

so?

velvet axle
#

so

hoary olive
#

query parameterization is the best way to protect against SQL injection

velvet axle
#

I don't use it anymore

hoary olive
#

yk most of the time

#

your hecker.exe wont go ahead and try SQL injection

#

they will just search around to find more useful info

velvet axle
#

I I have a file like that running right now

hoary olive
#

info possibly leading to logging in

#

they did that in our school

velvet axle
#

in my school they did that too

hoary olive
#

i had this guy get my email info from a screenshot of a chrome tab i sent him.... (i didnt intend to have it there, somehow he noticed it though)

velvet axle
#

I want to know where the attack came from

hoary olive
#

me

velvet axle
#

can't be

hoary olive
#

subjective

velvet axle
#

a lot of people did things like

#

make my wifi icon disappear and I ok

hoary olive
#

where they crazy?

#

who would spend their time to remove your wifi icon 🀣

velvet axle
#

it's a trick

hoary olive
#

were*

velvet axle
#

in linux distros

hoary olive
#

no

velvet axle
#

yes, and it happens through discord

hoary olive
#

finctional story but aight

#

gotta go now bye

velvet axle
#

it's not fictional

#

it's like fake wifi

#

I think they call evil twins

#

looks like it's from my own town

hoary olive
#

evil twins 🀣

velvet axle
#

xD

#

other stuff

#

how can manipulation of images be so fast

terse needle
#

!e

import dis

print(dis.dis("[1 for i in range(1, 1000)]"))
print(dis.dis("x = []\nfor i in range(1, 1000):\nx.append(1)"))
wise cargoBOT
#

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

001 |   0           0 RESUME                   0
002 | 
003 |   1           2 LOAD_CONST               0 (<code object <listcomp> at 0x7f3932bc0c60, file "<dis>", line 1>)
004 |               4 MAKE_FUNCTION            0
005 |               6 PUSH_NULL
006 |               8 LOAD_NAME                0 (range)
007 |              10 LOAD_CONST               1 (1)
008 |              12 LOAD_CONST               2 (1000)
009 |              14 PRECALL                  2
010 |              18 CALL                     2
011 |              28 GET_ITER
... (truncated - too many lines)

Full output: https://paste.pythondiscord.com/xekeyagubi.txt?noredirect

velvet axle
#

got it

hoary olive
#

soundboard is a keyboard that plays sounds in your mic

#

not anime voice creator

cosmic bison
#

Frederik, what are you currently working on rn?

#

truly one of the games of our time

#

@whole bear you can select the top half, right click. Somewhere there will be a "float" option

#

"Layer-> Float"

#

ew, co-pilot

stuck furnace
#

That one pixel ;-;

lavish rover
#

.

pallid hazel
#

well my day went to poop, tried to setup a vmhost1(vmftp) to vmhost2(vmftpclient) and borked my vmhost1(vm) connection.. i set everything back to default but no internet.. if I loose it im gonna be so pissed.

river thistle
#

hello

dull remnant
#

Ayo, does anyone understand args and kwargs well ?

#

Cause

#

I am trying to learn about them

golden sonnet
somber heath
#

"A variable is a named signpost/reference to a thing in memory. A variable is not the thing, itself. In this way, you can have more than one variable referring to the one same thing in memory." @trail meteor

somber heath
#

@glad crow πŸ‘‹

glad crow
#

Hello!

#

Well, I can't speak in this vc quite yet.

#

Although I've been in the server before

#

haha

wise cargoBOT
#

Voice verification

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

glad crow
#

!voiceverify

#

oof

#

wrong channel

#

so you program in python I assume 🀣

#

well its nice to meet an individual who shares similar interests

#

ha

#

ah i see

#

Do you maintain any projects?

#

well you actually draw it on the site

#

its super cool

#

Very similar

#

ah nice

#

I mainly work on applications and security

#

Whipper snippering?

#

sounds like a weed wacker

#

may just be your country lol

#

figured as much

#

I'm currently working on my anti-virus program now

#

I would have to agree, but I don't see Intel moving away from x86 any time soon

#

Ah me too

#

what distro

#

Nice

#

I use Fedora

#

Everything install w/ deepin desktop environment

#

right

#

dnf > apt in my opinion

#

just personal preference though

#

hang on I will return in a minute

#

a

#

alas

#

vsc is connected to discord

#

indeed

#

on my profile

#

Roblox code haha

#

I was just touching that up for one of my friends

#

i feel that downloading 40 gigs of virus signatures every time you want to run a virus scan is a bit excessive

#

indeed the antivirus just crashed vsc

#

due to the excessive amount of virus signatures being loaded into memory

#

do you prefer working on a desktop or laptop?

#

i can agree

#

Yeah. He's a youtuber that durability tests devices

#

then i can make an educated guess that it was not created by Apple

#

3310?

#

I would say that I wasnt alive to experience those days

#

a smart brick

#

patent pending

#

what kind of music do you all listen to in australia?

#

ah

#

PC Building Simulator Soundtrack

#

Ultimate Programmer Music

#

Have you played around with GhatGPT yet?

#

Its pretty incredible

#

lol

#

PC Troubleshooting 101

#

Ubuntu Problems 🀣

#

what game is it?

#

never heard of it

#

That was absurdly loud

fallen marten
#

pascal is the best programming language

glad crow
#

I was thinking about working on a .NET decompiler in python

#

not sure if itll turn out too well

glad crow
#

welp

#

ima head out

#

its pretty early in the morning here

#

so it was nice talking to you!

somber heath
#

@warped igloo πŸ‘‹

warped igloo
#

hello

warped igloo
somber heath
#

@remote stream πŸ‘‹

remote stream
wise cargoBOT
#

Voice verification

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

remote stream
#

ok

warped igloo
#

@somber heath what are you doing?

#

Image Ai is insane nowadays

#

Yea The voice Ai worrys me the most

#

I couldnt even tell it was fake with some of them

buoyant cradle
#

hi opal

warped igloo
#

We are in some scary times for technology

#

Deepfakes for Ai as well ive noticed

buoyant cradle
#

hi sploof

warped igloo
#

Hello libra

#

@somber heath what would you say is the most dangerous form of Ai we have at the moment?

buoyant cradle
#

I have a task for python. Can you guys look at it?

warped igloo
#

I sadly cant help as I'm very bad at python

buoyant cradle
#

opal I cant hear you

somber heath
#

Oh.

warped igloo
#

yea i can hear you

somber heath
#

How would you characterise what I sound like to you?

#

Quality, volume, etc.

buoyant cradle
#

i just check my audio on another applications; chrome and it works just fine.

somber heath
#

Interference.

#

Anyway. So what's up?

#

Python wise.

warped igloo
#

So more regulation and control is what you think should be happening in the Ai space atm

#

very true

#

I pray for the courts and systems having to deal with all that in the future

somber heath
#

@cyan swallow πŸ‘‹

cyan swallow
#

Why can't I speak?

warped igloo
#

I completely forgot Ai can teach other Ai

wise cargoBOT
#

Voice verification

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

cyan swallow
warped igloo
#

just forgot

cyan swallow
#

What are we speaking about Opal?

#

It is

#

True

buoyant cradle
#

ok opal i can hear you now

somber heath
#

@fresh patio πŸ‘‹

buoyant cradle
#

i had to adjust my settings

fresh patio
#

hii

warped igloo
#

Couldnt signatures be forged via Ai as well?

#

true

#

Ai movies at some point would be kinda cool

buoyant cradle
#

hey opal, you feel like making some code examples?

warped igloo
#

Might be better than half the netflix originals

buoyant cradle
#

The volume of a sphere is 4/3Ο€r3, where Ο€ has the value of "pi".
Write a function calledΒ print_volume (r)Β that takes an argument for the sphere's radius and prints the sphere's volume.
Call theΒ print_volumeΒ function three times with different values for radius.
Include all of the following:
The code for yourΒ print_volumeΒ function.
The inputs and outputs to three calls of yourΒ print_volume function

#

lol

somber heath
#

!d math.pi

wise cargoBOT
#

math.pi```
The mathematical constant *Ο€* = 3.141592…, to available precision.
buoyant cradle
#

ok

#

im learning already yea!

midnight granite
#

my voice is supressed! why?

wise cargoBOT
#

Voice verification

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

warped igloo
#

im back

somber heath
#

!e py v = 5 v = v ** 2 print(v)

wise cargoBOT
#

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

25
warped igloo
#

I need an Ai that teaches me coding or does it for me lol

somber heath
#

5 ^ 2

#

5 ** 2

buoyant cradle
#

ok

midnight granite
#

ah i need to wait for 3 days to be able to speak! that's a bummer!

somber heath
#

@odd junco πŸ‘‹

midnight granite
#

xD

warped igloo
#

People like that have too much spare time on their hands

buoyant cradle
#

sending you strong vibes opal

somber heath
#

/

#

!e py print(4 / 3)

wise cargoBOT
#

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

1.3333333333333333
stone viper
#

intro = input("Welcome to the mini calculator Made by Gaurav")
print(intro)
first = input("enter first number : ")
operator = input("enter operator (+,-,*,/,%): ")
second = input("enter second number : ")

first = int(first)
second = int(second)

if operator == "+":
print(first + second)
elif operator == "-":
print(first - second)
elif operator == "*":
print(first * second)
elif operator == "/":
print(first / second)
elif operator == "%":
print(first % second)
else:
print("Invalid Operation")

somber heath
#

A while loop may be useful.

#

As may try and except.

stone viper
#

yeahh

somber heath
#

!d operator

wise cargoBOT
#

Source code: Lib/operator.py

The operator module exports a set of efficient functions corresponding to the intrinsic operators of Python. For example, operator.add(x, y) is equivalent to the expression x+y. Many function names are those used for special methods, without the double underscores. For backward compatibility, many of these have a variant with the double underscores kept. The variants without the double underscores are preferred for clarity.

The functions fall into categories that perform object comparisons, logical operations, mathematical operations and sequence operations.

The object comparison functions are useful for all objects, and are named after the rich comparison operators they support:

buoyant cradle
#

does sending messages in here count towards my verification opal?

#

ok

#

great

#

thanks

warped igloo
#

hello duke

robust lichen
stone viper
#

alright

warped igloo
#

dang looking nice

somber heath
#

@stone viperDictionaries are also handy.

buoyant cradle
#

hey opal, can i see your code if you will be ok with it?

stone viper
#

@odd junco

robust lichen
#

@stone viper gonna refactor ze code πŸ˜‰

stone viper
#

bruh

robust lichen
#

lol

somber heath
#

def, parameters of functions, assignment =, power operator **, multiplication operator *, division operator /, return.

stone viper
#

intro = input("Welcome to the mini calculator Made by Gaurav")
print(intro)
first = input("enter first number : ")
operator = input("enter operator (+,-,*,/,%): ")
second = input("enter second number : ")

first = int(first)
second = int(second)

if operator == "+":
print(first + second)
elif operator == "-":
print(first - second)
elif operator == "*":
print(first * second)
elif operator == "/":
print(first / second)
elif operator == "%":
print(first % second)
else:
print("Invalid Operation")

#

@whole bear W

robust lichen
#

@stone viper give me one second

stone viper
buoyant cradle
#

im sending sad vibes opal

robust lichen
#

give me 4 minutes

#

i meant

#

maybe even less

buoyant cradle
#

yes sir

#

its hard if you don't have help helping you learn it

somber heath
#

@fluid helm πŸ‘‹

#

!e py v = 5 v = v / 2 print(v)

wise cargoBOT
#

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

2.5
fluid helm
#

Halo

somber heath
#

!e py v = 5 v /= 2 print(v)

wise cargoBOT
#

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

2.5
somber heath
#

Two ways of writing more or less the same thing.

stone viper
#
v = 5
v = v / 2
print(v)
buoyant cradle
#

yes sir duke

stone viper
#

....

robust lichen
#

pp

somber heath
#

!e py v = 5 v = v * v * v * v print(v)

wise cargoBOT
#

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

625
somber heath
#

!e py v = 5 v = v ** 4 print(v)

wise cargoBOT
#

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

625
somber heath
#

!e py v = 5 v **= 4 print(v)

wise cargoBOT
#

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

625
buoyant cradle
#

i have a few people on my team right now

stone viper
#

!e

v = 69
v = v + v + v
print(v)
wise cargoBOT
#

@stone viper :white_check_mark: Your 3.11 eval job has completed with return code 0.

207
somber heath
#

!e ```py
def func(v):
print(v) #beware

func(5)```

wise cargoBOT
#

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

5
somber heath
#

!e ```py
def func():
v = 5
return v

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

wise cargoBOT
#

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

5
buoyant cradle
#

Im trying to get a third; opal

fluid helm
#

For backend developer which one do you guys think is better django or flask?

#

Okay tq

stone viper
#

!e

#so first we make an empty variable so we can put our result inside it

output = 0

# now we need to ask the user what numbers they want to work with, but since user might misclick and put in something other than a number
#we put a "while True" function, which will repeat the question forever

while True:

#"try" is a fuction we use when we expect something goes wrong, this will try what you want, and if it doesn't work, raises an exception
    try:
        #now we get numbers from user, and use the "float" methode to turn their input to actual numbers, because an input is always a str unless we make it otherwise
        num1 = float(input("Hello, What is your First Number? "))
        num2 = float(input("Your Second Number? "))
 #now we need to add a break, this will break the loop if user inputs numbers, so the loop doesn't go on forever
        break
    #if user puts the wrong kind of input, an exceptaion will be raised that will tell the user what they have done wrong
    except ValueError:
        print("number needs to be a number")

# now we make a function to get ask user what kind of operation they want to operate on those numbers
#the reason we don't do "try" and "except" here is because we cen't raise a value error, becuase we are not converting the input to numbers
def op():
    operation = input("Operation (+, -, *, /)?")
    if operation == "+":
        output=num1+num2
    elif operation == "-":
        output=num1-num2
    elif operation == "*":
        output=num1*num2
    elif operation == "/":
        output=num1/num2
    #if operation input is wrong:
    else:
        #tell the use what they have done wrong:
        print("wrong operation")
        #repeat the question of operation
        op()


#print the result
print (output)
wise cargoBOT
#

@stone viper :x: Your 3.11 eval job has completed with return code 1.

001 | Hello, What is your First Number? Traceback (most recent call last):
002 |   File "<string>", line 13, in <module>
003 | EOFError: EOF when reading a line
fluid helm
#

Why i can't turn on my 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.

buoyant cradle
#

hey opal, I should be at 50 messages soon

warped igloo
#

hey im back

#

whats going on?

buoyant cradle
#

ooh. so it has to be at one instance or something like that

#

?

#

lol

fluid helm
#

Wkwk

buoyant cradle
#

ooh ok

#

thanks

robust lichen
#

@stone viper

def get_number(prompt):
    while True:
        number = input(prompt)
        try:
            number = int(number)
            break
        except ValueError:
            print("Invalid input, please enter a valid number.")
    return number

def get_operator(prompt):
    while True:
        operator = input(prompt)
        if operator in ["+", "-", "", "/", "%"]:
            break
        else:
            print("Invalid operator, please enter a valid operator.")
    return operator

def calculator(firstNumber, operator, secondNumber):
    try:
        first = int(first)
        second = int(second)
    except ValueError:
        return "Invalid input, please enter a valid number."

    if operator == "+":
        return first + second
    elif operator == "-":
        return first - second
    elif operator == "":
        return first * second
    elif operator == "/":
        return first / second
    elif operator == "%":
        return first % second
    else:
        return "Invalid Operation"

print("Welcome to the mini calculator Made by Gaurav")
firstNumber = get_number("Enter first number: ")
operator = get_operator("Enter operator (+,-,,/,%): ")
secondNumber = get_number("Enter second number: ")

result = calculator(firstNumber, operator, secondNumber)
print(result)
warped igloo
#

@somber heath how long have you been coding for?

warped igloo
#

lol

robust lichen
fluid helm
warped igloo
#

Web development seems pretty cool

fluid helm
#

I'm in software engineering study program right now so we learn js and we should know that, but i don't know why, i don't really like javascript

#

Wkwkw

warped igloo
#

what is java use for? compared to javascript?

warped igloo
#

Dang learn something everyday

fluid helm
#

but chatGPT said java doesn't last long lol

fluid helm
#

Lol

warped igloo
#

Wonder if schools will ever use chat gpt

#

My teacher used to copy and paste from Ai for our work all the time

fluid helm
#

All of my friend use chatGPT and they get nothing

#

Include me

#

Lol

somber heath
fluid helm
#

@somber heath some i understand some i don't

warped igloo
#

so trying to stop it would just help it

#

it evolves too quick

buoyant cradle
#

hey sploof, how many days have you been trying to get voice going?

buoyant cradle
#

I remember seeing you here the first day i met opal

warped igloo
#

I think i said hi but that was it

#

I think in another year the Ai will finally get fingers and toes

buoyant cradle
#

brb guys. I think i can use voice now

warped igloo
#

Too well

fluid helm
#

We will war with AI

buoyant cradle
#

hey sploof just every now and then go to voice verification channel and type !voiceverify

warped igloo
#

thankfully we have will smith he was in I robot so we should be fine

buoyant cradle
#

lol sploof

#

idk either

somber heath
#

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

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.

somber heath
#

!e ```py
print('Hello, world.')
print('Goodbye'.)```

#

!e py print('Hello, world.') print('Goodbye.')

wise cargoBOT
#

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

001 | Hello, world.
002 | Goodbye.
sturdy terrace
#

@somber heath
HI, there!

#

Hello!

buoyant cradle
#

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

robust lichen
#

!e

print("Hello, World")
sturdy terrace
#

I still have that suppression over my head.

wise cargoBOT
#

@robust lichen :white_check_mark: Your 3.11 eval job has completed with return code 0.

Hello, World
#

Voice verification

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

robust lichen
somber heath
#

` vs '

#

~

robust lichen
#
    __  __                                _        ___   __       _  _   __ 
   F  \/  ]     ____   _    _            /.\      F _ ", FJ      FJ  L] / J 
  J |\__/| L   F __ J J |  | L ______   //_\\    J `-' |J  L    J |  | LLFJ 
  | |`--'| |  | |--| |J J  F L|______| / ___ \   |  __/F|  |    J J  F LJ  L
  F L    J J  F L__J JJ\ \/ /FL______J/ L___J \  F |__/ F  J    J\ \/ /FJ  L
 J__L    J__LJ\______/F\\__//        J__L   J__LJ__|   J____L    \\__// J__L
 |__L    J__| J______F  \__/         |__L   J__||__L   |____|     \__/  |__|
                                                                            
buoyant cradle
#

!epy print("Hello guys and girls!")

wise cargoBOT
#

@buoyant cradle :white_check_mark: Your 3.11 eval job has completed with return code 0.

Hello guys and girls!
robust lichen
#
β–ˆβ–ˆβ–ˆβ•—   β–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ•—   β–ˆβ–ˆβ•—       β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ•—    β–ˆβ–ˆβ•—   β–ˆβ–ˆβ•— β–ˆβ–ˆβ•—
β–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ•‘   β–ˆβ–ˆβ•‘      β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ•‘    β–ˆβ–ˆβ•‘   β–ˆβ–ˆβ•‘β–ˆβ–ˆβ–ˆβ•‘
β–ˆβ–ˆβ•”β–ˆβ–ˆβ–ˆβ–ˆβ•”β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘   β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘   β–ˆβ–ˆβ•‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•β–ˆβ–ˆβ•‘    β–ˆβ–ˆβ•‘   β–ˆβ–ˆβ•‘β•šβ–ˆβ–ˆβ•‘
β–ˆβ–ˆβ•‘β•šβ–ˆβ–ˆβ•”β•β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘   β–ˆβ–ˆβ•‘β•šβ–ˆβ–ˆβ•— β–ˆβ–ˆβ•”β•β•šβ•β•β•β•β•β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β•β• β–ˆβ–ˆβ•‘    β•šβ–ˆβ–ˆβ•— β–ˆβ–ˆβ•”β• β–ˆβ–ˆβ•‘
β–ˆβ–ˆβ•‘ β•šβ•β• β–ˆβ–ˆβ•‘β•šβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β• β•šβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•       β–ˆβ–ˆβ•‘  β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘     β–ˆβ–ˆβ•‘     β•šβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•  β–ˆβ–ˆβ•‘
β•šβ•β•     β•šβ•β• β•šβ•β•β•β•β•β•   β•šβ•β•β•β•        β•šβ•β•  β•šβ•β•β•šβ•β•     β•šβ•β•      β•šβ•β•β•β•   β•šβ•β•
sturdy terrace
#

!e
print("Hello Guys!")

wise cargoBOT
#

@sturdy terrace :white_check_mark: Your 3.11 eval job has completed with return code 0.

Hello Guys!
somber heath
#

β–‘β–’β–“β–ˆ

sturdy terrace
#

@buoyant cradle
I am sorry, are you talking to me mister?

#

ohh! Carry on.

warped igloo
#

hello

#

Whats that song again I have forgotten

buoyant cradle
#

!e ```py
print('Hello World')
print('Good Morning!')

wise cargoBOT
#

@buoyant cradle :white_check_mark: Your 3.11 eval job has completed with return code 0.

001 | Hello World
002 | Good Morning!
somber heath
#

So I can write things like this to highlight things.

#

This uses single `

robust lichen
#

Getting good responses πŸ˜„

  {
    title: 'Tango One',
    href: '/movie/watch-tango-one-7898',
    image: 'https://img.flixhq.to/xxrz/250x400/379/c6/5f/c65f7d5d25c4f52a4e8424edc9b9fc57/c65f7d5d25c4f52a4e8424edc9b9fc57.jpg',
    type: 'Movie',
    description: '\n' +
      '        Three officers are assigned to go undercover and join a mission to capture Den Donovan.\n' +
      '    ',
    releaseDate: '2018-03-02',
    genres: [ 'Crime', 'Drama', 'Thriller' ],
    casts: [
      'Vincent Regan',
      'Sophie Colquhoun',
      'Richie Campbell',
      'Enrique Arce',
      'Christopher Ellison'
    ],
    duration: '112 min'
  },
  {
    title: 'One Chance',
    href: '/movie/watch-one-chance-9510',
    image: 'https://img.flixhq.to/xxrz/250x400/379/6a/dd/6add6a322f6fda5e856c11dbdc1d51e8/6add6a322f6fda5e856c11dbdc1d51e8.jpg',
    type: 'Movie',
    description: '\n' +
      '        This film follows the remarkable and inspirational true story of Paul Potts, a shy, bullied shop assistant by day and an amateur opera singer by night.\n' +
      '    ',
    releaseDate: '2013-09-09',
    genres: [ 'Drama', 'Comedy', 'Music' ],
    casts: [
      'James Corden',
      'Alexandra Roach',
      'Julie Walters',
      'Colm Meaney',
      'Jemima Rooper'
    ],
    duration: '103 min'
  },
somber heath
#

!e py import math print(math.pi)

wise cargoBOT
#

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

3.141592653589793
sturdy terrace
#

!e

import tensorflow as tf
import numpy as np
import matplotlib.pyplot as plt

print(tf.version)

wise cargoBOT
#

@sturdy terrace :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 | ModuleNotFoundError: No module named 'tensorflow'
somber heath
#

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

sturdy terrace
#

You can not do tensorflow here!

#

Have a great time guys. I need to go. Catch you later.

somber heath
#

@versed bane πŸ‘‹

#

bbl

fluid helm
#

@robust lichen why you learn python? do you wanna learn python for web development or ml or something?

robust lichen
#

i dont use python as much.

#

i use rust

fluid helm
#

oh okay

robust lichen
#
// Hello World! program
namespace HelloWorld
{
    class Hello {         
        static void Main(string[] args)
        {
            System.Console.WriteLine("Hello World!");
        }
    }
}
#
print("hello world")
fluid helm
#

even for print "hello world" c# still quite hard lol

sharp urchin
#

hello sir

#

binary is ez asf

#

01010100101110001010101

hoary olive
#

lvl?

#

level in coding???

#

brah

sharp urchin
#

lmao

#

here

#

all i hear is 'yeh yeh'

#

:{

hoary olive
#

lmfao

sharp urchin
#

'yeh yeh'

#

he is not

#

very

#

yes

#

it does matters

#

jump off:{}

#

these "gen z" problems nowadays

#

"i dont know"

#

i mean i do

#

but not gen z "stuff"

hoary olive
#

how does it bother you?

sharp urchin
#

when smoll kids just "idk"

hoary olive
#

you are free to leave then

#

aight big man

sharp urchin
#

nvmm

#

:}

hoary olive
#

proof?

#

seems you lackin bringing age

#

although you dont dare to come up n talk

buoyant cradle
#

Part 1
The volume of a sphere is 4/3Ο€r3, where Ο€ has the value of "pi".
Write a function calledΒ print_volume (r)Β that takes an argument for the sphere's radius and prints the sphere's volume.
Call theΒ print_volumeΒ function three times with different values for radius.
Include all of the following:
The code for yourΒ print_volumeΒ function.
The inputs and outputs to three calls of yourΒ print_volume function

sharp urchin
#

what?

#

tfs tht?

robust lichen
#

pp = poopoo

sharp urchin
#

ohh those memes you mean?

robust lichen
#

no its too late

#

:/

sharp urchin
#

i dont speak:{

#

:{

#

'yeh yeh' keeps coming at me

#

😫 .

hoary olive
#

talk big man

sharp urchin
#

m an introvert

#

agree with the smoll kid @hoary olive

#

i dont know

#

"other"

#

kekw

robust lichen
sharp urchin
#

old enough

#

what is this smoll bro?

#

a tinder or sum?

hoary olive
#

what

#

smoll bro?

sharp urchin
#

ducky_gopnik .

#

yeh yeh

somber heath
#

Sweeney Todd.

vocal basin
#

npm?

somber heath
#

@sly yarrow πŸ‘‹

vocal basin
#

github projects have README.md by default, iirc

#

@grim fable

somber heath
#

@grim fable

grim fable
vocal basin
#

that part

#
git clone https://github.com/zeyanthecoder/Teron-AI.git
cd Teron-AI
npm install
npm start
grim fable
#

i want install it on vs code

vocal basin
#

@willow lynx
you've already aggregated the data, right?

grim fable
vocal basin
# grim fable vs code?

node version manager
node, that you get from nvm, will be available globally, including VSC

willow lynx
#

No I amm still stuck in joining. The df

vocal basin
willow lynx
#

I am joinin incorrectly everytime

#

Been doing it since morning

#

I am fed up

vocal basin
#

I'd expect whatever you use for aggregation to allow that

vocal basin
#

I actually don't know which one I have installed

vocal basin
#

they have installers on release/tags page

keen lark
#

I achieved status x-fighter

somber heath
#

@flat locust πŸ‘‹

flat locust
#

Hi

#

OpalMist

#

can you guide me on why am I suppressed with audio in the voice chat

#

I joined the chat but was unable to speak in it

#

@somber heath

prime crag
#

hey

flat locust
#

hi

prime crag
#

please sombody help me

flat locust
#

for what bro

wise cargoBOT
#

Voice verification

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

prime crag
#

i cant install moudles in python who knows where is the problem

somber heath
#

-m

prime crag
somber heath
#

The instructions for install are given within the linked site.

prime crag
#

oh i should test it wait a moment

#

js is not easy

#

who knows brain fuck

#

do you?

flat locust
#

i don't know him bro XD

#

how many languages do you guys know ?

#

enough to get by

#

oh that's cool

#

For me I know C, C++ , Python, CSS, Java

prime crag
flat locust
#

oh that's good

vocal basin
prime crag
flat locust
#

do you use Django ? @sour imp

prime crag
flat locust
uncut meteor
#

Java is a more abstract and easier for comprehension

#

imo

flat locust
#

I am having myself to learn Java and somewhat trying to be good in CSS to make good looking websites from scratch which for sure is difficult if you do it from scratch

prime crag
#

what about ceh

flat locust
prime crag
#

pedophilia

prime crag
somber heath
#

Did you look at the website?

#

The instructions are there.

prime crag
#

@somber heath

#

error again

#

what

#

oh okay

#

aahhahhahhhhhhhhh

#

opal

#

um i dont know

#

ohhhh you right

#

okay

#

just a minute

#

um

#

opal

#

from here?

somber heath
#

I guess.

prime crag
tidal shard
prime crag
#

@somber heath thank you opalπŸ–οΈ

sharp urchin
tidal shard
river thistle
#

hello

wind raptor
#

Octodad: Dadliest Catch is about destruction, deception, and fatherhood. The player controls Octodad, a dapper octopus masquerading as a human, as he goes about daily life.

Octodad: Dadliest Catch is set to release on PS4 in 2014 and is being made by an independent studio in Chicago , Young Horses.

Find out more about Octodad on our site: ht...

β–Ά Play video
prime crag
#

so what you sayπŸ˜‚
25kb/s

somber heath
#

If observing things heats them up, how many people would it take staring at a pot of water to make it boil?

#

Chicken slappers be like, "We've got this."

#

Emo matter.

sharp urchin
#

lol

somber heath
#

Locks itself in its room. Says we don't understand it.

sharp urchin
#

i joined and the first thing i get to hear is this

#

nice m not always late

#

:}

#

nahh

wind raptor
#

g2g for a bit. I'll be back later

sharp urchin
#

its black

#

cuz there is no light

hoary olive
#

hello opal

#

no

#

there are two primary atoms or what ever in our eyes

#

one for colors
one for light

#

i presume if theres a ton of light you see black aswell

hoary olive
#

sunspots look black

#

but its white

sharp urchin
#

nasa

#

kekw

#

the org says it all

hoary olive
#

opal reminds me of something πŸ˜‰

somber heath
hoary olive
#

The best way to learn how fish swim in microgravity is to take them into space and watch what happens

sharp urchin
hoary olive
#

Nasa logic

#

The best way to learn how the human reacts to no oxygen is to take them into space and watch what happens ! brilliant

#

I dont know why nasa decided sending a cat to space would be a good idea, as it cannot do anything

#

poor dude

somber heath
#

@hushed gazelle πŸ‘‹

#

@ionic pollen πŸ‘‹

#

@grim atlas πŸ‘‹

sharp urchin
#

lmao

gentle flint
cosmic bison
#

Im gonna switch back to linux and I'll brb

somber heath
cosmic bison
#

How do I screenshare?

cosmic bison
#
define main() {
    board = [[false; 10]; 10]; // create a 10x10 array of bools
    new_board = board;
    board[2][1] = true;
    board[3][1] = true;
    board[4][1] = true;
    println("Generation: 0");
    draw_board(&board);
    iters = 5;
    for i in 0..iters {
        for x in 0..10 {
            for y in 0..10 {
                neighbors = check_neighbors(&board, x, y);
                new_board[x][y] = board[x][y];
                if board[x][y] {
                    if neighbors != 2 and neighbors != 3 {
                        new_board[x][y] = false;
                    }
                } else if neighbors==3{
                    new_board[x][y] = true;
                }
            }
        }
        print("Generation: ");
        println(i+1);
        board = new_board;
        draw_board(&board);
    }

}

define check_row_neighbors(board: &bool[10], y: i32) -> i32 {
    neighbors: i32 = board[y];
    if y>0 {
        neighbors+=board[y-1];
    }
    if y<9 {
        neighbors+=board[y+1];
    }
    return neighbors;
}

define check_neighbors(board: &bool[10][10], x: i32, y:i32) -> i32 {
    neighbors = 0;
    if x>0 {
        neighbors += check_row_neighbors(&board[x-1], y);
    }
    
    neighbors += check_row_neighbors(&board[x], y) - board[x][y];

    if x<9 {
        neighbors += check_row_neighbors(&board[x+1], y);
    }

    return neighbors;
}

define draw_row(row: &bool[10]) {
    for i in 0..10 {
        if row[i] {
            print("β–“β–“");
        }else {
            print("β–‘β–‘");
        }
    }
    println("");
}

define draw_board(board: &bool[10][10]) {
    for i in 0..10 {
        draw_row(&board[i]);
    }

    println("\n\n\n");
}
glad crow
#

hello

lucid blade
#

@glad crow yo

#

πŸ™‚

glad crow
#

wsp

lucid blade
#

CHILLIN

#

woah caps

#

n drinking coffee

glad crow
#

@lucid blade why do you sound like Captain Price?

whole bear
#

most people in the vc dont have permission to speak

gray mango
#

i want talk

glad crow
whole bear
#

@glad crow i must have 50 posts to speak

glad crow
#

@terse needle what distro is that?

terse needle
glad crow
#

nice

whole bear
#

looks like arch linux

terse needle
glad crow
#

Fedora ftw

#

Fedora Everything + Deepin Desktop

whole bear
#

hes asking what is the purpose of a lambda calculus interpreter

lucid blade
#

i miss crunchbang 😦

#

it was my favourite

#

but i hear someone has made a similar os / continued the project

glad crow
#

guys i need help

#

i need a javascript script which is not beutified

#

to test my software

#

Either

#

"ps1", "py", "js", "html", "css", "vbs"

#

are supported

#

extensions

#

Hello again mr @somber heath

#

i am making the best programmer snack

#

dino nuggies

uncut meteor
#

cup of tea*

graceful magnet
#

You can get some sample code by pressing CTRL + SHIFT + I on your browser there you can find the js code of the website

glad crow
#

1337 H4CK3R

cosmic bison
#

Griff, could i be able to screenshare?

uncut meteor
#

for 15mins, you can

#

!stream @cosmic bison

wise cargoBOT
#

βœ… @cosmic bison can now stream until <t:1675624615:f>.

glad crow
#

the bin

#

lol

#

bruh

#

TypeError: write() argument must be str, not bytes

#

imagine

lucid blade
#

str(arg)

glad crow
#

fair enough

glad crow
lucid blade
#

yes πŸ™‚

somber heath
#

You can drop the []

glad crow
#

That ultimately what i did

somber heath
#

You could also use map instead, but it's not as pythonic.

glad crow
#

Does anyone in the vc mind reading over my code to check for any optimizations?

#
import os
import re
import bs4
import jsbeautifier
import autopep8
import cssutils
import argparse

def beautify_powershell(code):
    code = code.strip()
    code = code.replace("\r\n", "\n")
    code = code.replace("\n", "\r\n")
    code = "\r\n".join([line.strip() for line in code.split("\r\n")])
    return code

def beautify_python(code):
    return autopep8.fix_code(code)

def beautify_javascript(code):
    return jsbeautifier.beautify(code)

def beautify_html(code):
    soup = bs4.BeautifulSoup(code, "html.parser")
    return soup.prettify()

def beautify_css(code):
    return cssutils.parseString(code).cssText.decode('utf-8')

def beautify_vbscript(code):
    code = re.sub(r'(\s)\s+', '\\1', code)
    code = re.sub(r'(\n){2,}', '\\1\\1', code)
    return code

def beautify_code(code, language):
    if language == "ps1":
        return beautify_powershell(code)
    elif language == "py":
        return beautify_python(code)
    elif language == "js":
        return beautify_javascript(code)
    elif language == "html":
        return beautify_html(code)
    elif language == "css":
        return beautify_css(code)
    elif language == "vbs":
        return beautify_vbscript(code)
    else:
        return code

def main():
    parser = argparse.ArgumentParser(description='Beautify code in a file.')
    parser.add_argument('file_name', type=str, help='Name of the file to beautify')
    args = parser.parse_args()

    file_name = args.file_name
    ext = file_name.rsplit(".", 1)[-1]
    if ext not in ["ps1", "py", "js", "html", "css", "vbs"]:
        print("Unsupported file type.")
        return

    with open(file_name, "r") as f:
        code = f.read()

    beautified_code = beautify_code(code, ext)

    modified_file_name = file_name.replace(".", "_modified.")
    with open(modified_file_name, "w") as f:
        f.write(beautified_code)

    print(f"Code beautified successfully. New file: {modified_file_name}")

if __name__ == "__main__":
    main()```
#

thats more code than i thought

somber heath
#

if elif chains can often be refactored into a dictionary.

lavish rover
#

dict of function pointers seems... eh, maybe just a match statement?

somber heath
#

Another thing is a lot of your functions are just calling one function, anyway.

#

I get why you've done this, but it does make for what amounts to an unnecessary intermediary complexity.

glad crow
#

do

#

i do *

#

@somber heath so instead of this:

    if language == "ps1":
        return beautify_powershell(code)
    elif language == "py":
        return beautify_python(code)
    elif language == "js":
        return beautify_javascript(code)
    elif language == "html":
        return beautify_html(code)
    elif language == "css":
        return beautify_css(code)
    elif language == "vbs":
        return beautify_vbscript(code)
    else:
        return code

we could do this?

    functions = {
    "ps1": beautify_powershell,
    "py": beautify_python,
    "js": beautify_javascript,
    "html": beautify_html,
    "css": beautify_css,
    "vbs": beautify_css
    }
    if language in functions.keys():
        return functions[language](code)
    else:
        return code
amber raptor
#

Meh, it's DevOps scripts, rock on!

somber heath
glad crow
#

ah

glad crow
# somber heath Also look into dict.get.

so like this?

    functions = {
    "ps1": beautify_powershell,
    "py": beautify_python,
    "js": beautify_javascript,
    "html": beautify_html,
    "css": beautify_css,
    "vbs": beautify_css
    }
    if language in functions.keys():
        return functions.get(language)(code)
    else:
        return code
#

or would that not work

somber heath
#

Chew on dict.get.

#

!e py data = {'a': 'A'} a = data.get('a', 'Hello, world.') b = data.get('b', 'Hello, world.') print(a) print(b)

golden sonnet
#

hiπŸ™Œ

glad crow
#

ah ok

wise cargoBOT
#

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

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

I may be stupid.

#

I may not be.

glad crow
#

indeed it is either one or the other

somber heath
#

I should have slept hours ago.

golden sonnet
#

staying up late are we?

glad crow
#

its 3 pm

#

m8

whole bear
#

i need some help anyone here

#

any one good in python pls come the room

river thistle
#
\Programs\Python\Python311\Lib\encodings\cp1252.py", line 19, in encode
    return codecs.charmap_encode(input,self.errors,encoding_table)[0]
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
UnicodeEncodeError: 'charmap' codec can't encode character '\u200e' in position 11: character maps to <undefined>"
#

I am trying to save data in .csv file and getting this error

#

any soln for this

gentle flint
#

@river thistle

river thistle
#

Thankyou I figured it

somber heath
#

@scenic stratus πŸ‘‹

scenic stratus
#

1

#

3

#

5

#

7

#

9

#

88 128 152 172 190 208

#

@somber heath im going to work on what you told me to.thanks

strong arch
#
Input Text -> Generator -> Encoder -> Output Embeddings
somber heath
#

@whole cairn πŸ‘‹

whole cairn
#

hey man

#

getting really frustrated here hyahaha

#

mind helping out

#

?

somber heath
strong arch
whole cairn
strong arch
velvet tartan
somber heath
#

Or...?

#

What are you after?

whole cairn
somber heath
#

I would say you don't need try/except and unless you're writing unit tests or giving a demonstration, assert is to be avoided.

#

!e py a = 5 b = 4, 5, 6 c = a in b print(c)

wise cargoBOT
#

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

True
somber heath
#

!e py print(not True) print(not False)

wise cargoBOT
#

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

001 | False
002 | True
whole cairn
#

now im getting this

wise cargoBOT
#

Hey @whole bear!

It looks like you tried to attach file type(s) that we do not allow (.pdf). We currently allow the following file types: .gif, .jpg, .jpeg, .mov, .mp4, .mpg, .png, .mp3, .wav, .ogg, .webm, .webp, .flac, .m4a, .csv, .json.

Feel free to ask in #community-meta if you think this is a mistake.

somber heath
whole cairn
#

where is that, ive been staring at this thin so long im numb and cant ntoice

somber heath
#

In a string.

whole cairn
#

if you are talking about result this is what i get

somber heath
#

...

#

Two error messages...okay...

#

What does the terminal show?

#

Put the space back in.

whole cairn
#

it shows im doing right lol

#

ill show

somber heath
whole cairn
#

lol this stupid bot grader

somber heath
#

Yeah.

#

I'm not sure what the deal is, there.

#

Have you covered sys.stdin?

#

I'm not suggesting you use it, but I'm wondering if there's something where it's getting crabby with the user input reflecting out as stdout which would be weird and I'm grasping at straws here.

#

Some courses insist on sys.stdin vs input.

cyan oak
#

Hello everyone, I need helping regarding the Pylint extension in Vscode and enabling the same. It seems thar Jedi is also presentable with Pylint however I would like to disable Jedi ( if possible ) and to get β€œpossible fixes β€œ from Pylint

somber heath
#

Oh.

#

Return vs print.

#

I'm an idiot.

#

@whole cairn

whole cairn
#

lol no i think i figured it out

#

lol

#

there is more than one error print statement because of the potential plurality of the statement itself

#

1 vs 2