#voice-chat-text-0
1 messages ยท Page 156 of 1
dolly
an organizational principle in which items which arrive first are the first to be processed and released, especially used in inventory accounting and computer science
a line of people or vehicles waiting for something
an orderly pile
Failed to get response.
Failed to get response.
LIFO
Look up LIFO in Wiktionary, the free dictionary. LIFO may refer to: FIFO and LIFO accounting, in accounting Stack (abstract data type), in computing,
Lifo (magazine)
LIFO (pronounced La-ee-fo) is a Greek weekly free-press/city guide published by DYO DEKA and distributed in selected spots in Athens and Thessaloniki.
!e
print("\n")
print(r"\n")
@vocal basin :white_check_mark: Your 3.11 eval job has completed with return code 0.
001 |
002 |
003 | \n
@whole bear :x: Your 3.11 eval job has completed with return code 1.
001 | File "/home/main.py", line 1
002 | print(r'\')
003 | ^
004 | SyntaxError: unterminated string literal (detected at line 1)
but not in this case
That they were an elephant in disguise!
@vocal basin :white_check_mark: Your 3.11 eval job has completed with return code 0.
\"
heya
i was reading a json file using rust and idk how to turn unicode to chars in rust
use std::fs::File;
use std::io::{self, Read};
fn main() -> io::Result<()> {
// Open the binary file
let mut f = File::open("./src/net/net.nnue")?;
// Read the contents of the file into a buffer
let mut buffer = Vec::new();
f.read_to_end(&mut buffer)?;
println!("{:?}", buffer);
Ok(())
}
is there like a chr() for rust?
String::chars
what is type of buffer?
wdym type of buffer? i read from a json file
I think you need this instead of reading bytes
https://doc.rust-lang.org/std/io/trait.Read.html#method.read_to_string
The Read trait allows for reading bytes from a source.
liquidate gradually
it's Vec<u8>, you're reading bytes
right
so is turning this into chars faster or doing the read std::io faster
read into String not into Vec<u8>
then use .chars() on the string
this
example from read_to_string docs:
use std::io;
use std::io::prelude::*;
use std::fs::File;
fn main() -> io::Result<()> {
let mut f = File::open("foo.txt")?;
let mut buffer = String::new();
f.read_to_string(&mut buffer)?;
Ok(())
}
here, buffer is String
@lunar haven ICE CREAMMM
"I'm not hurting myself."
@zenith radish You're fooling exactly one person.
then you can use buffer.chars() which iterates over chars
i had a chicken burger yesterday
say how about now if i want to read from a .bin file?
it is a JSON file or is it a binary file?
i have both
then handle them separately
yeah, i was thinking alternatively
are you not happy
IT WAS WITH KEPTCHUPP
They're videos of @zenith radish.
Mind you, I'd probably be worse, left to my own devices.
all jobs near me are hiring for seniors
how can i get 5 years of experience in a week
Food, piercings. Food, piercings. Hmmmm.
Shish kebabs
Release it?
Gofek, no.
Just find a tree outside somewhere, let it slide up into it, job done.
oops
@rugged root i sell phones
for a living
yes
for apple stuff
and if u want like basic but up to date shit
like none of the fancy stuff
get the iphone se
yeah thats uderstandable
Plome remains weird for me.
only selling point iphones have is that they have the worlds best security
Fair
on android u can get a virus from the app store
but iphone its physically impossible to get anything harmful
Not my usual concern
Famous last words.
One of the things I'm looking for is long term support
Like OS updates or what have you
Scares the heck out of you when you first hear it. The triple layer paradise of Thailand unveils its marvelous character in such details as jungle life. Better the tokay than the black mamba.
It is an oddity in counterpoise to nature, without merit or justice, being scorned at every turn as the hue and cry of lost souls. Who sent who is perhaps...
"You...ungh...you're a Python year old, if you think that's what all the big tech corporations are doing, what fucking drugs are you on?" An imagining.
Why are you roleplaying as me
It wasn't meant to be you.
I'm leaning toward the newer pixel phones
"Give me some." as addendum.
Since I have a Pixel 5 anyway
Now it's about you.
honestly do it, i sell exclusively iphones but Pixels are amazing
ive heard quite a few people actually enjoy it
like so far ive heard nothing
its battery is amazing and has 10 cores
MKBHD put out a video shitting on the Pixel for updates making them worse.
I know that was the case for 6
@lunar haven too much maths :((
how does the original question look like?
I guess E(x) is 1.5 or what
math.comb(n, k)```
Return the number of ways to choose *k* items from *n* items without repetition and without order.
Evaluates to `n! / (k! * (n - k)!)` when `k <= n` and evaluates to zero when `k > n`.
Also called the binomial coefficient because it is equivalent to the coefficient of k-th term in polynomial expansion of `(1 + x)โฟ`.
Raises [`TypeError`](https://docs.python.org/3/library/exceptions.html#TypeError "TypeError") if either of the arguments are not integers. Raises [`ValueError`](https://docs.python.org/3/library/exceptions.html#ValueError "ValueError") if either of the arguments are negative.
New in version 3.8.
@vocal basin :white_check_mark: Your 3.11 eval job has completed with return code 0.
{1, 6, 9, 12, 13}
@lunar haven :warning: Your 3.11 eval job has completed with return code 0.
[No output]
@lunar haven :white_check_mark: Your 3.11 eval job has completed with return code 0.
001 | [1, 6, 12, 13, 9]
002 | [3, 6, 12, 15]
003 |
004 | {12, 6}
005 | {1, 3, 6, 9, 12, 13, 15} 7
006 | {1, 13, 9} 3
u didn't call the func
number of permutations is just factorial
!e
from math import factorial
print(factorial(10))
@vocal basin :white_check_mark: Your 3.11 eval job has completed with return code 0.
3628800
!e
from datetime import timedelta
print(timedelta(weeks=6).total_seconds())
@vocal basin :white_check_mark: Your 3.11 eval job has completed with return code 0.
3628800.0
same number
@lunar haven :white_check_mark: Your 3.11 eval job has completed with return code 0.
E[X] = 1.5
no permissions
why this form specifically?
doesn't generalise
!e
print(sum([i for i in range(300)]) / 2)
@vocal basin :white_check_mark: Your 3.11 eval job has completed with return code 0.
22425.0
you can't have 22425 expected when you flip 300 coins
the way parameter is used is wrong
why this formula?
wher does it come from?
it's correct only by accident
!e
n = 3
print(n / 2)
@vocal basin :white_check_mark: Your 3.11 eval job has completed with return code 0.
1.5
.5 on each flip
it's just n/2, and n=3 in this case
E[Y] is 7
for one dice it's 3.5
ah
then, yes, need to compute
!e
from statistics import mean
print(mean(i * j for i in range(1, 7) for j in range(1, 7)))
@vocal basin :white_check_mark: Your 3.11 eval job has completed with return code 0.
12.25
@vocal basin :white_check_mark: Your 3.11 eval job has completed with return code 0.
12.25
Mean is just avg
because expected value of a product of independent values
When will india have regional discord pricing aaahahahhaha
Can't steal long from turkey
!e
from random import randint
from statistics import mean
print(mean(randint(1, 6) * randint(1, 6) for _ in range(100_000)))
@vocal basin :white_check_mark: Your 3.11 eval job has completed with return code 0.
12.20923
for some reason I thought it'd be closer to the accurate answer
!e
print("๐ฃ")
@cosmic lark :white_check_mark: Your 3.11 eval job has completed with return code 0.
๐ฃ
Good
!e
print(49/4)
@vocal basin :white_check_mark: Your 3.11 eval job has completed with return code 0.
12.25
average for one dice is (1+6)/2
which is 7/2
square of that is 49/4
@lunar haven this is where 49/4 comes from
!e
print("โ64 == 8 โ")
@cosmic lark :white_check_mark: Your 3.11 eval job has completed with return code 0.
โ64 == 8 โ
!e
print(64**0.5)
@cosmic lark :white_check_mark: Your 3.11 eval job has completed with return code 0.
8.0
UwU
(min+max)/2 for uniform distribution
also, you can sum all and divide
!e
print((1+2+3+4+5+6)/6)
@vocal basin :white_check_mark: Your 3.11 eval job has completed with return code 0.
3.5
@lunar haven :white_check_mark: Your 3.11 eval job has completed with return code 0.
001 | [1, 2, 3, 4, 5, 6, 2, 4, 6, 8, 10, 12, 3, 6, 9, 12, 15, 18, 4, 8, 12, 16, 20, 24, 5, 10, 15, 20, 25, 30, 6, 12, 18, 24, 30, 36]
002 | E[Y] = 12.25
this works both for real and and for discrete uniform distributions
!e
import matplotlib as mlp
print(mlp)
@cosmic lark :white_check_mark: Your 3.11 eval job has completed with return code 0.
<module 'matplotlib' from '/snekbox/user_base/lib/python3.11/site-packages/matplotlib/__init__.py'>
wohoo
this
to get 7/2
this works too
!e
from random import randint
from statistics import mean
print(mean(randint(1, 6) for _ in range(100_000)))
@vocal basin :white_check_mark: Your 3.11 eval job has completed with return code 0.
3.49387
average for one dice is 7/2
E[AB]=E[A]E[B]
for independent variables A and B
1 2 3 4 5 6
^ not average
^ average
3 is closer to 1 than to 6
it's a dice
there is no 0
1+6
2+5
3+4
middle of each pair is 7/2
@lunar haven this has nothing to do with two dices
only one dice
(1 + 2 + 3 + 4 + 5 + 6) / 6
(1 + 6 + 2 + 5 + 3 + 4) / 6
((1 + 6)/2 + (2 + 5)/2 + (3 + 4)/2) / 3
(7/2 + 7/2 + 7/2) / 3
7/2
@lunar haven :white_check_mark: Your 3.11 eval job has completed with return code 0.
001 | E[X] = 1.5
002 | E[Y] = 12.25
003 | E[X + Y] = 13.75
AโกB (mod C)
means
(A-B) mod C = 0
@lunar haven :warning: Your 3.11 eval job has completed with return code 0.
[No output]
@lunar haven :white_check_mark: Your 3.11 eval job has completed with return code 0.
001 | True
002 | False
003 | False
applying mod to both sides is equivalent to that, yes
same as
A mod C = B mod C
belong to the same equivalence class
(with the equivalence classes induced by (mod C))
(A-B)%C==0
@lunar haven :warning: Your 3.11 eval job has completed with return code 0.
[No output]
@lunar haven :white_check_mark: Your 3.11 eval job has completed with return code 0.
001 | True True
002 | False False
003 | False False
prove for 0 or 1
ur still working on thst same problem
prove that, if it's true for n, it's true for n+1
those two steps are enough to prove for all positive (or non-negative) integers
then start with 1
it generally works with any starting point
induction
this isn't the answer, it's only a definiton for induction
you can't really code that in Python, I think
but you can check values
in a certain way
!e
n1 = 426
n2 = n1 + 1
assert (n1 * (n1 + 1) // 2) ** 2 + n2 ** 3 == (n2 * (n2 + 1) // 2) ** 2
@vocal basin :warning: Your 3.11 eval job has completed with return code 0.
[No output]
@lunar haven :warning: Your 3.11 eval job has completed with return code 0.
[No output]
@lunar haven :white_check_mark: Your 3.11 eval job has completed with return code 0.
001 | 1 1
002 | 9 9
003 | 36 36
004 | 100 100
005 | 225 225
006 | 441 441
007 | 784 784
008 | 1296 1296
this:
assumes that answer for n1 matches the formula
gets, based on that assumption, answer for n2
verifies that answer for n2 matches the formula
repeat for all values of n1 starting from 1
you don't need to re-do the sum
you can accumulate it
this will bring python solution closer to induction
!e
current = 0
for n in range(1, 9):
current += n ** 3
print(current, (n * (n + 1) // 2) ** 2)
@vocal basin :white_check_mark: Your 3.11 eval job has completed with return code 0.
001 | 1 1
002 | 9 9
003 | 36 36
004 | 100 100
005 | 225 225
006 | 441 441
007 | 784 784
008 | 1296 1296
sum for n-1 at the start of an iteration
sum for n before print and at the end of an iteration -- current sum
!e
from itertools import accumulate
for n, current in enumerate(accumulate(i ** 3 for i in range(1, 9)), 1):
print(current, (n * (n + 1) // 2) ** 2)
@vocal basin :white_check_mark: Your 3.11 eval job has completed with return code 0.
001 | 1 1
002 | 9 9
003 | 36 36
004 | 100 100
005 | 225 225
006 | 441 441
007 | 784 784
008 | 1296 1296
!e
import numpy as np
n = np.arange(1, 9)
print((n ** 3).cumsum())
print((n*(n+1)//2)**2)
@vocal basin :white_check_mark: Your 3.11 eval job has completed with return code 0.
001 | [ 1 9 36 100 225 441 784 1296]
002 | [ 1 9 36 100 225 441 784 1296]
(illustration for earlier)
TeX
it's from 50 years ago
latekh
*45
I use self-hosted overleaf
no, you can't, because it's server-side
can't render TeX in browser yet
you'd need, like, 5GB of storage
and who know how much RAM in addition to that
@midnight agate
thing acquired
I'm listening to some sound and trying to figure out wth is even happening in it
Hi
no, it's not corrupted
hello
its going good
yea
do you guys have any resources on how to use python projects for security
what kind of security?
like back end soc work taking in data and encrypting within systems stuff like that
so, first thing to get out of the way:
it's probably better to avoid ever implementing any encryption algorithms in Python
(Python isn't the language they belong to)
does !resources have anything security-themed?
!resources
The Resources page on our website contains a list of hand-selected learning resources that we regularly recommend to both beginners and experts.
We're a large, friendly community focused around the Python programming language. Our community is open to those who wish to learn the language, as well as those looking to help others.
thanks what lang should i look into for stuff like that specifically in the google env
most of the encryption is done in C (and equivalents thereof)
but
encryption algorithms are often used in other languages (which use C extensions of some form)
and knowing how to use (not implement) encryption in those languages is important too
alright thank you and have a good evening
๐
conduct an interview in television, newspaper, and radio reporting
can but wouldn't
current += 1 if A[i - 1] < A[i] else 1 - current
though
that's twice
but in another place
so, not, can't really do that there, I guess
!stream 272071537475977217
โ @limpid sparrow can now stream until <t:1688089365:f>.
@midnight agate
hmm I am suppressed
!voice
Canโt talk in voice chat? Check out #voice-verification to get access. The criteria for verifying are specified there.
operator.parrot
operator.__parrot__
@wise cargo ๐ฆ
^ would this syntax be postfix unary operator?
or is mention acting as a decorator for the parrot?
!d decorator
A function returning another function, usually applied as a function transformation using the @wrapper syntax. Common examples for decorators are classmethod() and staticmethod().
The decorator syntax is merely syntactic sugar, the following two function definitions are semantically equivalent:
def f(arg):
...
f = staticmethod(f)
@staticmethod
def f(arg):
...
```...
would this be reverse Indonesian notation then?
||๐ต๐ฑ๐ฎ๐ฉ||
3.10? 3.9?
!d match
8.6. The match statement
New in version 3.10.
The match statement is used for pattern matching. Syntax:
match_stmt ::= 'match' subject_expr ":" NEWLINE INDENT case_block+ DEDENT
subject_expr ::= star_named_expression "," star_named_expressions?
| named_expression
case_block ::= 'case' patterns [guard] ":" block
```...
3.10
what even was added in 3.1
this too
actually, quite a lot of things
sounds funnier if cropped like this
@lunar haven :white_check_mark: Your 3.11 eval job has completed with return code 0.
2
@midnight agate
revisiting something from leetcode to celebrate the release of Python 3.1 from 14 years ago
||```py
from itertools import combinations_with_replacement
class Solution:
def subsets(self, nums: List[int]) -> List[List[int]]:
return set(map(tuple, map(set, combinations_with_replacement(nums, len(nums))))) | {()}
yes
a what
!d itertools.pairwise
itertools.pairwise(iterable)```
Return successive overlapping pairs taken from the input *iterable*.
The number of 2-tuples in the output iterator will be one fewer than the number of inputs. It will be empty if the input iterable has fewer than two values.
Roughly equivalent to:
```py
def pairwise(iterable):
# pairwise('ABCDEFG') --> AB BC CD DE EF FG
a, b = tee(iterable)
next(b, None)
return zip(a, b)
```...
@midnight agate I muted you because we were listening to music and ads from you lol. Let me know when you're back
TIL meet-in-the-middle works with A*
No worries
that was this
https://leetcode.com/problems/open-the-lock/description/
Can you solve this real interview question? Open the Lock - You have a lock in front of you with 4 circular wheels. Each wheel has 10 slots: '0', '1', '2', '3', '4', '5', '6', '7', '8', '9'. The wheels can rotate freely and wrap around: for example we can turn '9' to be '0', or '0' to be '9'. Each move consists of turning one wheel one slot.
Th...
!voice
Canโt talk in voice chat? Check out #voice-verification to get access. The criteria for verifying are specified there.
const TOKEN = process.env.TOKEN;
@whole bear
.env file should have
TOKEN = [YOUR TOKEN]
aleady do
!stream 1116606405516988427
โ @whole bear can now stream until <t:1688097767:f>.
I might've been wrong
though
I almost managed to fail writing meet-in-the-middle even without introducing A*
!stream 1116606405516988427
โ @whole bear can now stream until <t:1688099161:f>.
// Register command modules
client.registry
.registerDefaultTypes()
.registerGroups([
{ id: 'ping', name: 'Ping' },
])
.registerDefaultGroups()
.registerDefaultCommands()
.registerCommandsIn(path.join(__dirname, 'commands'));
@whole bear
const path = require('path');
class PingCog {
constructor(client) {
this.client = client;
}
handlePingCommand(message) {
const start = Date.now();
message.reply('Pinging...').then((sentMessage) => {
const latency = Date.now() - start;
sentMessage.edit(`Pong! Latency: ${latency}ms`);
});
}
init() {
this.client.on('message', (message) => {
if (message.content === 'ping') {
this.handlePingCommand(message);
}
});
}
}
module.exports = PingCog;
// Require the necessary discord.js classes
const { Client, Events, GatewayIntentBits } = require('discord.js');
const { token } = require('./config.json');
// Create a new client instance
const client = new Client({ intents: [GatewayIntentBits.Guilds] });
@lavish rover what's this .ae language?
webjesus did not hold back
oh nice
@whole bear can u not undo
I am trying to solve this but unable to do so. can someone help
def calculate_storage(filesize):
block_size = 4096
# Use floor division to calculate how many blocks are fully occupied
full_blocks = ___
# Use the modulo operator to check whether there's any remainder
partial_block_remainder = ___
# Depending on whether there's a remainder or not, return
# the total number of bytes required to allocate enough blocks
# to store your data.
if partial_block_remainder > 0:
return ___
return ___
print(calculate_storage(1)) # Should be 4096
print(calculate_storage(4096)) # Should be 4096
print(calculate_storage(4097)) # Should be 8192
print(calculate_storage(6000)) # Should be 8192
i did this but not getting the required output
def calculate_storage(filesize):
block_size = 4096
# Use floor division to calculate how many blocks are fully occupied
full_blocks = filesize // block_size
# Use the modulo operator to check whether there's any remainder
partial_block_remainder = filesize % block_size
# Depending on whether there's a remainder or not, return
# the total number of bytes required to allocate enough blocks
# to store your data.
if partial_block_remainder > 0:
return block_size * 2
return filesize
print(calculate_storage(1)) # Should be 4096
print(calculate_storage(4096)) # Should be 4096
print(calculate_storage(4097)) # Should be 8192
print(calculate_storage(6000)) # Should be 8192
no
somebody want to play chess ?
@ionic ferry Tauri?
i am making crossplatform apps with small build files and less resources
i've invited u
Heck yeah!
Yeah the file sizes are amazing
i joined
Yeah, you can do most of it in HTML, CSS and JS. The part that runs the app in Rust is only 10 lines
ikr
But if you wanted to do some backend stuff in the app, you can do it in rust
@wind raptor Yeah, i am learning as much as i do
everything is just an upgraded version of usenet
Check out https://donutoperator for more!
This is a fake radio ad that was from Vampire the Masquerade: Bloodlines
https://youtu.be/OC7AjhUzVpo
Radio commercial from "Vampire: The Masquerade - Bloodlines".
hello
Yo
@lucid blade they are most likely shooting their coffee shots and leaving them out to react with oxygen before serving
just tell them steam the milk first or pour the water before the shot
You mean like dedicated server hardware specifically?
We recreated Simon Lake's Argonaut Jr submarine, dove it for two weeks, and share the stories and lessons learned. See more at ArgonautJr.com
[ Sea Chest Foundation Store ]
https://www.seachestfoundation.org/shop/
[ Support Seeker ]
Patrons and Other Support: http://wp.me/P6ivyU-1wT
Buy Anything on Amazon and support Seeker when you use this ...
what up bois ๐ฟ
@analog quarry This one
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
Testing something on my end
@rugged root Awesome! Thanks!
A next-generation HTTP client for Python.
import asyncio
import shutil
import time
from pathlib import Path
import aiofiles
import httpx
OUT_DIR = Path("./pokemon")
if OUT_DIR.exists():
if input("delete existing `./pokemon` directory to start tests? yes/no ").lower() in "yes":
shutil.rmtree(OUT_DIR)
def download_and_save(client, pokemon_id: int) -> None:
r = client.get(f"https://pokeapi.co/api/v2/pokemon/{pokemon_id}")
r.raise_for_status()
with open(OUT_DIR / f"{pokemon_id}.json", mode='wb') as file:
file.write(r.content)
async def async_download_and_save(client: httpx.AsyncClient, pokemon_id: int) -> None:
r = await client.get(f"https://pokeapi.co/api/v2/pokemon/{pokemon_id}")
r.raise_for_status()
async with aiofiles.open(OUT_DIR / f"{pokemon_id}.json", mode='wb') as file:
await file.write(r.content)
async def main_sequential():
for pokemon_id in range(1, 152):
download_and_save(httpx, pokemon_id)
async def main_sequential_connection_pooling():
with httpx.Client() as client:
for pokemon_id in range(1, 152):
download_and_save(client, pokemon_id)
async def main_async_sequential():
async with httpx.AsyncClient() as client:
for pokemon_id in range(1, 152):
await async_download_and_save(client, pokemon_id)
async def main_concurrent():
async with httpx.AsyncClient() as client:
tasks = set()
for pokemon_id in range(1, 152):
download_task = asyncio.create_task(async_download_and_save(client, pokemon_id))
tasks.add(download_task)
await asyncio.gather(*tasks)
def _run(func, name):
OUT_DIR.mkdir()
start_time = time.perf_counter()
asyncio.run(func())
print(f"- {name:<35} {time.perf_counter() - start_time:.3} seconds")
shutil.rmtree(OUT_DIR)
time.sleep(5) # Rate limit
_run(main_sequential, "sequential")
_run(main_sequential_connection_pooling, "sequential (connection pooling)")
_run(main_async_sequential, "sequential (async)")
_run(main_concurrent, "concurrent")
- sequential 21.7 seconds
- sequential (connection pooling) 3.44 seconds
- sequential (async) 3.45 seconds
- concurrent 0.96 seconds
from abc import ABC
from dataclasses import dataclass
from functools import wraps
from typing import TypeVar, Callable
class Event(ABC): ...
@dataclass
class ClickEvent(Event):
x: int
y: int
@dataclass
class MoveEvent(Event):
vx: int
vy: int
TEvent = TypeVar("TEvent", bound=Event)
TEventHandler = Callable[[TEvent], None]
class EventHandler(ABC):
handlers: set["EventHandler"] = set()
def __new__(cls, *args, **kwargs) -> "EventHandler":
new_instance = super().__new__(cls)
cls.handlers.add(new_instance)
return new_instance
@classmethod
def send_event(cls, event: Event) -> None:
for handler in cls.handlers:
handler._on_event(event)
def _on_event(self, event: Event) -> None:
# get appropriate handlers by type definition then "SEND IT!"
...
def on_event(event_type: type[TEvent]) -> Callable[[TEventHandler], None]:
@wraps
def inner(f):
return f()
return inner
class ExampleManager(EventHandler):
def __init__(self, value: int):
self.value = value
@on_event
def on_click(self, click: ClickEvent) -> None:
print("click!!", self.value)
@on_event
def any_name(self, move: MoveEvent) -> None:
print("move!", self.value)
h1 = ExampleManager(5)
h2 = ExampleManager(10)
EventHandler.send_event(ClickEvent(1, 2))
EventHandler.send_event(MoveEvent(2, 3))
EventHandler.send_event(ClickEvent(4, 5))
client
import socket
s = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
s.connect("./temp")
s.send(b"Hello World")
server
import socket
s = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
s.bind("./temp")
while True:
s.listen(1)
conn, addr = s.accept()
print(conn.recv(1024))
conn.close()
@plush island What's up? What's your question?
@plush island Can you post your quesiton in here? I'm not always available. And you might want to use a pastebin since the output is so large: https://paste.pydis.com
@somber heath france?
why can't i speak in voice chat 0??
!voice
Canโt talk in voice chat? Check out #voice-verification to get access. The criteria for verifying are specified there.
@lilac notch Check out the #voice-verification channel, that'll tell you what you need to know about the voice gate
@rugged root thank you ๐
still confused about how to use it
this is what im trying to do
Read the article: https://medium.com/towards-artificial-intelligence/this-ai-removes-the-water-from-underwater-images-d277281bcd0f
The paper: https://openaccess.thecvf.com/content_CVPR_2019/papers/Akkaynak_Sea-Thru_A_Method_for_Removing_Water_From_Underwater_Images_CVPR_2019_paper.pdf
The project & datasets: http://csms.haifa.ac.il/profiles/tTre...
its for work.
whos this abt
Co-worker of his
ohh
if ai had to sort people there would be alot of people working in the shit room in star trek
That would be me
@amber raptor that shows good till like the last season
does anyone know where i can find something like this?
@rugged root what r u guys doing?
Grusch says he's going to testify in public hearings sometime in July
`As I walked by the dockside one evening so rare
To view the still waters and take the salt air
I heard an old fisherman singing this song
Oh take me away boys, my time is not long
Chorus (after each verse):
Dress me up in my oilskins and jumper
No more on the docks Iโll be seen
Just tell my old ship-mates Iโm taking a trip, mates
And Iโll see you someday in Fiddlersโ Green
Oh Fiddlersโ Green is a place Iโve heard tell
Where the fishermen go if they donโt go to Hell
Where the weather is fair and the dolphins do play
And the cold coast of Greenland is far, far away
Where the skyโs always clear and thereโs never a gale
Where the fish jump on board with a swish of their tail
Where you lie at your leisure, thereโs no work to do
And the skipperโs below making tea for the crew
When you get back in dock and the long trip is through
Thereโs pubs and thereโs clubs and thereโs lasses there too
Where the girls are all pretty and the beer is all free
And thereโs bottles of rum growing from every tree
Oh I donโt want a harp nor a halo, not me
Just give me a breeze and a good rolling sea
And Iโll play my old squeezebox as we sail along
With the wind in the rigging to sing me the song`
Utopia Series
Season 01
Trailer.
Created & Written by
Dennis Kelly
Produced by
Rebekah Wray-Rogers
Directed by
Marc Munden
2013
lol
๐
yey! party time ๐
wheres this
A mooncake (simplified Chinese: ๆ้ฅผ; traditional Chinese: ๆ้ค ) is a Chinese bakery product traditionally eaten during the Mid-Autumn Festival (ไธญ็ง็ฏ). The festival is about lunar appreciation and Moon watching, and mooncakes are regarded as a delicacy. Mooncakes are offered between friends or on family gatherings while celebrating the festival. The ...
Love that movie
Did you say Tears of The Kingdom? Zelda?
โ @topaz jackal can now stream until <t:1688147011:f>.
Okay
What we doing
Oh and it ash by the way
Kinda
All of them
Iโm new to python
Your good
I just know English
Python is another language
๐
@lunar haven burger?
like
fried
i like you
oh really
ill make sure not to talk abt food then
is it for a practice
yeah
Hey, I'm sorry I don't have permission to talk
!voice
Canโt talk in voice chat? Check out #voice-verification to get access. The criteria for verifying are specified there.
@lunar haven :x: Your 3.11 eval job has completed with return code 1.
001 | File "/home/main.py", line 15
002 | return p[i]
003 | ^^^^^^^^^^^
004 | SyntaxError: 'return' outside function
@lunar haven :white_check_mark: Your 3.11 eval job has completed with return code 0.
[1, 2, 3]
yes
weeeehaawww
same
@lunar haven
fix my script
aaa nah
kkkk
that's 4 k s u dumb
happy to help
it's interchangeable
sometimes u r npc and sometimes u r the protagonist
ur stream is freezed
I only see MIT OCW page
u r sharing ur browser Ig
got food ๐
@lunar haven :white_check_mark: Your 3.11 eval job has completed with return code 0.
[1, 2, 3]
how do I write in a code block
u could do email phishing
def is_permutation_sorted(p):
for sublist in p:
if sublist == sorted(sublist):
return sublist
return None
def main():
permutations = [[2, 3, 1], [1, 2, 3], [1, 3, 2], [2, 1, 3], [2, 3, 1], [3, 1, 2], [3, 2, 1]]
result = is_permutation_sorted(permutations)
if result is not None:
print(result)
else:
print("No sorted permutation found.")
if __name__ == "__main__":
main()
clearly im not the creator of bitcoin
shithouse nakedmute
@lunar haven :white_check_mark: Your 3.11 eval job has completed with return code 0.
[1, 2, 3]
I can't see ur text editor
only the OCW MIT INTRO TO ALGORITHMS COURSE
4 screens?
u 4 eyed
@lunar haven :white_check_mark: Your 3.11 eval job has completed with return code 0.
[1, 2, 3]
do you really need discrete mathematics for this course?
omegalul
k
how to get vc perms
Canโt talk in voice chat? Check out #voice-verification to get access. The criteria for verifying are specified there.
enabling my mic
yeah
!voice
Canโt talk in voice chat? Check out #voice-verification to get access. The criteria for verifying are specified there.
!voice
so there's this guy on discord giving me a program that has "cool" stuff to do. however im unsure if hes just trying to rat my pc. if ur down i can dm you the python code for the program and you can check if its safe?
'
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.

lil uzi vert
yse
what are you guys doing
i was doing clash of code
dont have vc perms
nice
until the problems became too cryptic and my knowledge of algos ran out
what are algos
nice
COC
what is going on
u go into a game with 9 people
no idea
and u all got a problem
u got 15 mins and the questions arent extremely long
they can be cryptic asf tho
I just figured out how to make return functions
pretty good progress if u just started!
Just learned functions yeah im assuming
go for it dude
like this I think ' def this_function(x):
u = x + 7
return u
y = this_function(5)
print(y)
wrap the code in `
three of them
its next to the "1" key
@whole bear :white_check_mark: Your 3.11 eval job has completed with return code 0.
12
Hey it works!
the return thing
?
Idk I just tried addinf function, but then I realized I can't and that it doesn't work, so I found another method
cus It's fun
adding numbers with a function
doesnt have to be for anything if it helps them understand
Idk what I should do
cus I dont know if, else and elif statements yet
give me an example of an if statement so I can understand it better
for what is it used
for
the if statements
imma get going for work but have a goodnight or afternoon or morning man @lunar haven
ok
can you like add a while true statement to it
nice
afk
`ape = int(input("Are you a monkey?:"))
if ape >= 69:
print("You are indeed an ape")` tried it myself
gonna try
`while True:
ape = int(input("Are you a monkey?:"))
if ape >= 69:
print("You are indeed an ape")
elif ape < 69:
print("Not a monkey")
else:
print("Existence is pain")`
ok
But I still dont know how to do these while true loops,
gonna look it up on yt
ok
so it woudln't stop
so if it already had an answear it's gonna ask me if I'm an ape again?
ok
nice
so I need to add brake at the end
ok
@whole bear :x: Your 3.11 eval job has completed with return code 1.
:warning: Note: input is not supported by the bot :warning:
001 | What is your age?Traceback (most recent call last):
002 | File "/home/main.py", line 2, in <module>
003 | age = input('What is your age?')
004 | ^^^^^^^^^^^^^^^^^^^^^^^^^^
005 | EOFError: EOF when reading a line
@whole bear :x: Your 3.11 eval job has completed with return code 1.
001 | Traceback (most recent call last):
002 | File "/home/main.py", line 1, in <module>
003 | while true: print('d')
004 | ^^^^
005 | NameError: name 'true' is not defined. Did you mean: 'True'?
@lunar haven :warning: Your 3.11 eval job has completed with return code 0.
[No output]
@lunar haven :white_check_mark: Your 3.11 eval job has completed with return code 0.
[2, 3, 4, 8, 9]
for what do you use float( , int( and str(
datatype
so if you want your height to be 193.4 you need to float("height is"+ number)
wait imma make an example
but if you only can show whole numbers and you want to show a decimal number do you need to use float on it
@whole bear :warning: Your 3.11 eval job has completed with return code 0.
[No output]
@whole bear :white_check_mark: Your 3.11 eval job has completed with return code 0.
2.0
@whole bear :white_check_mark: Your 3.11 eval job has completed with return code 0.
0.30000000000000004
I will be
@whole bear :white_check_mark: Your 3.11 eval job has completed with return code 0.
6.3
ok hold on
!e age = float(input("what is your age"))
print("you are"+ str(age) +"years old")
I meant height
oops
Creating a Python string with your variables using the + operator can be difficult to write and read. F-strings (format-strings) make it easy to insert values into a string. If you put an f in front of the first quote, you can then put Python expressions between curly braces in the string.
>>> snake = "pythons"
>>> number = 21
>>> f"There are {number * 2} {snake} on the plane."
"There are 42 pythons on the plane."
Note that even when you include an expression that isn't a string, like number * 2, Python will convert it to a string for you.
thank's
bro it's 1 am gonna go sleep soon
enough learning for today I think
thank's for the help cya
sup boys
u still streaming @lunar haven
u are the true definition of
eat sleep code repeat
Yo
@lunar haven :white_check_mark: Your 3.11 eval job has completed with return code 0.
[2, 3, 4, 8, 9]
sup
can u link me that site
i cant unmute yet lol
ty
@lunar haven u tryna learn DS and algos?
supsup
cant talk yet XD
yall know how to use pandas? im hard stuck on an assignment and need a push in the right direction
fk man
big stuck XD
ill hit you with scrn shot quick its literally the most stupid error -.-\
1st one my code
second top one my output
can anyone help me with python?
i got a question
def Myage():
return Myage
result = Myage
print(result)
so basically im a bit new but, im trying to try def and return
and im telling it to return myage and i said myage = 11 (i forgot to include that in my message)
!e
def Myage():
return Myage
result = Myage
print(result)
@vocal basin :white_check_mark: Your 3.11 eval job has completed with return code 0.
<function Myage at 0x7fde8e0f84a0>
yes
i want it to
repeat what i said
do u know
?
!e def Myage():
return Myage
result = Myage
print(result)
@elfin bone :white_check_mark: Your 3.11 eval job has completed with return code 0.
<function Myage at 0x7f836baa84a0>
what do you expect the code to do?
i want it to return the # 11
which is what myage stands for
!e Myage = 11
def Myage():
return Myage
result = Myage
print(result)
@elfin bone :white_check_mark: Your 3.11 eval job has completed with return code 0.
<function Myage at 0x7f47c3a8c680>
use different names for the variable and the function
can u show me the fixed version if u may
so i can see what it looks like
i started python like
2 days ago
!e
year = 2023
def get_year():
return year
print(get_year())
@vocal basin :white_check_mark: Your 3.11 eval job has completed with return code 0.
2023
def Myage():
age = input("Age? ")
print(age)
Myage()```
is that what u wanted?
oh i see ok
what does input ("age?" do
^
dont u only put str if ur combinining it into a string with something
oh
str objects can be, for example, converted into int if you want to use them as numbers later
ohh
ok wait
what does python help us with
i mean like
me being able to return an input of text
and asking it questions
can i actually make things
or does this help me
learn other languages
there's quite a lot of things python can do, besides just taking input and converting it
https://docs.python.org/3/tutorial/index.html
one such example of interaction with "external world" would be file operations
https://docs.python.org/3/tutorial/inputoutput.html#reading-and-writing-files
@vocal basin do you by any chance know anything about discord.py? trying to get this thing to work and it feels like im going in circles lol
is it about discord.ext.commands things?
(I mostly know only the core discord part of the package)
its about sending a message when the bot is kick from vc.... i put everything in #1124511097731428392
wait
def Myage():
age = input("11")
print("My age is: "+str(age()
Myage()
what am i missing?
!p def Myage():
age = input("11")
print("My age is: "+str(age()
Myage()
Converting to "int" failed for parameter "pep_number".
!pep <pep_number>
Can also use: get_pep, p
Fetches information about a PEP and sends it to the channel.
!e def Myage():
age = input("11")
print("My age is: "+str(age()
Myage()
@elfin bone :x: Your 3.11 eval job has completed with return code 1.
001 | File "/home/main.py", line 3
002 | print("My age is: "+str(age()
003 | ^
004 | SyntaxError: '(' was never closed
im trying to make it say
my age is: 11
def Myage():
age = input("11")
print("My age is: "+str(age()
Myage()
wait
huh
@vocal basin can u help
promise i wont annoy u again
def Myage():
age = input("11")
print("My age is: "+str(age()
Myage() < ----------------------------------- what does "myage" do?
if you're expecting the user to give you the number 11, then "11" shouldn't be present in the program
string inside input() is what gets displayed to the user just before taking input
call the function... basically tells it to do whatever is under def Myage():
hmmmmmm let me comprehend this
I suggest reading through this
functions are at section 4.7
i.e. there's quite a lot of things before functions
Python tutorial for beginners full course
#python #tutorial #beginners
โญ๏ธTime Stampsโญ๏ธ
#1 (00:00:00)โ Python tutorial for beginners ๐
#2 (00:05:57โ) variables โ
#3 (00;17;38โ) multiple assignment ๐
#4 (00:20:27โ) string methods ใฐ๏ธ
#5 (00:25:13โ) type cast ๐ฑ
#6 (00:30:14โ) user input โจ๏ธ
#7 (00:36:50โ) math functions ๐งฎ
#8 (00:40:58...
im watching this 12 hour video
for my learning
is that a good way
better to combine multiple ways of learning
ok thanks alisa
print("11") prints the number 11 in terminal... age = input("age? ") asks u what your age is and stores it as a variable
ok @rare tulip i swear one last question
!e def Myage():
age = input("Age? ")
print("My age is: "+int(age))
@elfin bone :warning: Your 3.11 eval job has completed with return code 0.
[No output]
yeah keep asking i dont mind
ok so the question is,
why doesn't it print
def Myage():
age = input("Age? ")
print("My age is: "+int(age))
ok so basically
im telling it to print
my age is: 11
where do i put 11
def Myage():
age = input("Age? ")
print("My age is: "+str(age))
!e py def Myage(): age = input("Age? ") print("My age is: " + str(age))
@rare tulip :warning: Your 3.11 eval job has completed with return code 0.
[No output]
one sec
oh
i got it
!e py def Myage(): age = input("Age? ") print("My age is: " + str(age)) Myage()
@rare tulip :x: Your 3.11 eval job has completed with return code 1.
:warning: Note: input is not supported by the bot :warning:
001 | Age? Traceback (most recent call last):
002 | File "/home/main.py", line 4, in <module>
003 | Myage()
004 | File "/home/main.py", line 2, in Myage
005 | age = input("Age? ")
006 | ^^^^^^^^^^^^^^
007 | EOFError: EOF when reading a line
huh
def Myage():
age = input("Age? ")
print("My age is: " + str(age))
Myage()```
it will ask u in terminal
because i want it to def and return
!e def Myage():
age = input("Age? ")
print("My age is: " + str(age))
Myage()
@elfin bone :x: Your 3.11 eval job has completed with return code 1.
:warning: Note: input is not supported by the bot :warning:
001 | Age? Traceback (most recent call last):
002 | File "/home/main.py", line 4, in <module>
003 | Myage()
004 | File "/home/main.py", line 2, in Myage
005 | age = input("Age? ")
006 | ^^^^^^^^^^^^^^
007 | EOFError: EOF when reading a line
watch i'll ss one sec
my result is: Age?
def Myage():
age = input("Age? ")
print("My age is: " + str(age))
Myage()
so pycharm is broken
so now when u run the code, in ther terminal click on "age?"
no
here i send some screenshots
u can type anything basically next to age
because its your input
and the code takes your input and outputs to the way u code it
def Myage():
age = input("Age? 11 ")
print("My age is: " + str(age))
Myage() ------------------------- can u show an example
i added 11
like can u modify it
so i can see
what ur referring to
sorry i am quite new
to python
i only did lua and i wasen't so good
so once u got this.. you dont touch this because its fine... whatever it outputs.. u can type next ot that output
see how im able to type next to what it printed
i am doing what ur doing and its returning age it's not even returning my age is
it's just returning "age"
i mean age?
it's returning age?
ohhhhhhhh
works now?
**print("My age is: " + (str(age))
^
SyntaxError: '(' was never closed
Process finished with exit code 1**
def Myage():
age = input("Age? ")
print("My age is: " + (str(age))
Myage()
remove the "(" infront of str
def Myage():
age = input("Age? ")
print("My age is: " + str(age))
Myage()```
screenshot ur code
nah youre fine
yeah no problem
๐
@rapid crown
have a good day sir/ma'am
im going to go work on blender now
u rock
thanks so much
yeah you to bro
nah its fine, everyone starts somewhere.. if i needed help i would want someone to help me
no problem, have a great rest of your day
u too sir
@lunar haven :white_check_mark: Your 3.11 eval job has completed with return code 0.
[1, 2, 3, 4, 5, 6, 7, 9]
hello guys
Hi
learning python)
now I trying split my project
sorry 1 sec
never did it before
you see I have import
but not working
I mean VS showing:
"bot_token" is not definedPylancereportUndefinedVariable
Blowing up my brain
fixed
Im idiot
bot = telebot.TeleBot(config.bot_token)
xD
what are you doing? @lunar haven
I see website
lectures
Good. You having fun?
What? My English not so good
Oh I got you
๐ฆ
sorry
Im Russian. Speak English little bit)
@lunar haven you hear me?
Sometime have same problem. Dont worry
Feel happy to speak with other language peoples!
Happy kid 27 y.o
I have my own discord channel named "Accidev one of the smartest peoples on Earth!" xD
Its joke ๐
hello
i cant speak
sorry
what re u doing
?
is the guy who was in Brooklyn 99
?
a serie
do you code for living ?
or hobby
i mean if its your work
you were the guy who is having a test or im wrong
?
@lunar haven
test of programing
o something
idk
maybe
i have to sleep
if you like office you are gonna like it too
im beginner in python some tips from you as a experts on subject
but you are experience
thanks
@lunar haven How to get video verification?
lol
lol=League of Legends
oh really
didn't know that
i got a friend who learned code by bootcamps and now he is manager
me too
lol
My first Eng joke
i prevent cyclic imports tho
The Titanic sank when it hit an iceberg
SS
Gofec you didnt understand my joke, I sent you example with titanic
pythonic sound close
@slender sierra
xD
True
False
not False == True
"False" == True
