#voice-chat-text-0
1 messages Β· Page 250 of 1
scp "Z:\Software\OpenSpeedTest-Server_2.1.8_arm64.deb" root@192.168.26.1:
@sacred crag https://xkcd.com/927/
Gather, organize and mobilize yourselves with a convivial, ethical, and emancipating tool. https://joinmobilizon.org Discuss at https://riot.im/app/#/room/#Mobilizon:matrix.org
@stray barn π
i have many questions
1- when main file import modile file, how module file know the file name of main file
how?
like os module, its can give current work file whatever file imported os module
so how it do this, i need it
@final iris π
@lusty remnant π€
@whole bear π
@lusty remnant Did you leave the server?
@upper basin , you mayt want to read https://craftinginterpreters.com/introduction.html
@delicate lava π
Scientist have solved the mystery of how crested pigeons create an alarm without using their voice to prompt other birds to flee danger.
Researchers have long suspected that some pigeons raise an alarm using their wings. But new research from The Australian National University has for the first time discovered the crested pigeon uses a modified ...
Nathan Wiebe
@whole bear π
!e
a = (1, 2, 3)
b = (1, 2, 3)
print(a is b)
@upper basin :white_check_mark: Your 3.12 eval job has completed with return code 0.
True
!e py a = [] b = [] c = a print(a == b) print(a is b) print(a is c)
@somber heath :white_check_mark: Your 3.12 eval job has completed with return code 0.
001 | True
002 | False
003 | True
In-depth video about coding 3d graphics using ray marching.
Thanks for watching!
SDF tutorials by Inigo Quilez: https://iquilezles.org/
Shadertoy: https://shadertoy.com/
Business Email: cartersemrad@gmail.com
What seems to be the officer, problem?
I am only guilty of procrastination officer
Maybe GitHub shadowbans are for some subset of users, like users with even user IDs see them but those with odd user IDs don't?
I just forked and made a PR for him.
It works fine.
None of the fork, edit, or clone options do anything, and not all of them appear for me
@rich agate π
Thank you, i'll send in this channel
Online-Go.com is the best place to play the game of Go online. Our community supported site is friendly, easy to use, and free, so come join us and play some Go!
ok
Online-Go.com is the best place to play the game of Go online. Our community supported site is friendly, easy to use, and free, so come join us and play some Go!
Online-Go.com is the best place to play the game of Go online. Our community supported site is friendly, easy to use, and free, so come join us and play some Go!
Online-Go.com is the best place to play the game of Go online. Our community supported site is friendly, easy to use, and free, so come join us and play some Go!
Online-Go.com is the best place to play the game of Go online. Our community supported site is friendly, easy to use, and free, so come join us and play some Go!
Online-Go.com is the best place to play the game of Go online. Our community supported site is friendly, easy to use, and free, so come join us and play some Go!
why cant i verify
i dont get it
think you'll have to be here one more day, or few hours more. if i'm correct.
thx
You might be on the edge of the three day threshold.
Oh, right. Conversation had.
@crystal jasper π
Online-Go.com is the best place to play the game of Go online. Our community supported site is friendly, easy to use, and free, so come join us and play some Go!
Hazbin Hotel
gg
blue screen is an os error
Greetings @jade whale
Greetings @supple flax
!e
import numpy
print(isinstance(numpy.array, numpy.ndarray))
@upper basin :white_check_mark: Your 3.12 eval job has completed with return code 0.
False
!e
import numpy
a = np.array([[1, 2], [3, 4]])
b = np.ndarray([[1, 2], [3, 4]])
print(isinstance(a, b))
@upper basin :x: Your 3.12 eval job has completed with return code 1.
001 | Traceback (most recent call last):
002 | File "/home/main.py", line 3, in <module>
003 | a = np.array([[1, 2], [3, 4]])
004 | ^^
005 | NameError: name 'np' is not defined
!e
import numpy as np
a = np.array([[1, 2], [3, 4]])
b = np.ndarray([[1, 2], [3, 4]])
print(isinstance(a, b))
@upper basin :x: Your 3.12 eval job has completed with return code 1.
001 | Traceback (most recent call last):
002 | File "/home/main.py", line 4, in <module>
003 | b = np.ndarray([[1, 2], [3, 4]])
004 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
005 | TypeError: 'list' object cannot be interpreted as an integer
!e
import numpy as np
from typing import Any
a = list[int,]
b = list[int, Any]
print(a == b)
@upper basin :white_check_mark: Your 3.12 eval job has completed with return code 0.
False
!e
import numpy as np
from typing import Any
a = list[int, Any]
b = list[int, Any]
print(a == b)
@upper basin :white_check_mark: Your 3.12 eval job has completed with return code 0.
True
i cant talk sirrr

ok
hi
do you know a good and easy to work with asgi server in python?
i was trying make a framework for practice , so any recommened server to use to serve my app? like uvicorn, hypercorn, etc?
kk
btw are you a app dev?
!e
import numpy as np
from collections.abc import Iterable
print(isinstance(np.array([1, 2, 3]), Iterable))
@upper basin :white_check_mark: Your 3.12 eval job has completed with return code 0.
True
def X(self,
qubit_indices: int | list[int]) -> None:
""" Apply a Pauli-X gate to the circuit.
Parameters
----------
`qubit_indices` (int | list[int]):
The index of the qubit(s) to apply the gate to.
"""
# Create a Pauli X gate
x = X
# Check if the qubit_indices is a list
if isinstance(qubit_indices, list):
# If it is, apply the X gate to each qubit in the list
for index in qubit_indices:
self.circuit.append(x(self.qr[index]))
else:
# If it's not a list, apply the X gate to the single qubit
self.circuit.append(x(self.qr[qubit_indices]))
# Add the gate to the log
self.circuit_log.append({'gate': 'X', 'qubit_indices': qubit_indices})
No no
it's fine
Have a look at the if isinstance(qubit_indices, list):
I want it to work for even when it is passed a numpy array
Well I want iterable
I don't want to specify a lot of types and union all of them
Yes
all iterable
No I wouldn't pass it a string
it will always be a container of ints
the indices I mean
@tranquil coral π
I initially had it as Iterables, but then changed to list, and I think I forgot that sometimes I am passing a numpy array.
So now it fails.
Ok, thanks for info π
!e
import numpy as np
from collections.abc import Iterable
print(isinstance(np.array([1, 2, 3]), Iterable[int]))
@upper basin :x: Your 3.12 eval job has completed with return code 1.
001 | Traceback (most recent call last):
002 | File "/home/main.py", line 4, in <module>
003 | print(isinstance(np.array([1, 2, 3]), Iterable[int]))
004 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
005 | TypeError: isinstance() argument 2 cannot be a parameterized generic
Well to be fair to my feelings, it's a lot to keep track of.
If I am to be both aware of the type exactly, but also make sure it works for a lot of different types, and also make sure I don't make a ton of types, and at the end have it be correct and readible, it's a bit tricky.
Especially when I have a ton of classes.
That's why I was asking how to have such a generic iterable interface, I would have then just used that for ANY iterable I faced, numpy array, and lists alike.
Well I can narrow it down to np.array and list.
Is it stupid to want to have sth integrated for these two?
@silk helm π
I think at the end I'll have to make a class called typing.py and have all of these there, and just import from there and make my life easier.
!d collections.abc
New in version 3.3: Formerly, this module was part of the collections module.
Source code: Lib/_collections_abc.py
This module provides abstract base classes that can be used to test whether a class provides a particular interface; for example, whether it is hashable or whether it is a mapping.
An issubclass() or isinstance() test for an interface works in one of three ways.
- A newly written class can inherit directly from one of the abstract base classes. The class must supply the required abstract methods. The remaining mixin methods come from inheritance and can be overridden if desired. Other methods may be added as needed:
I was using collections.abc. However, the guys told me to use list since that is more generic, but apparently not.
Like I was told me list and MutableSequence go hand in hand. I think either I misunderstood, or maybe I conveyed what I wanted badly.
.
!d numbers
Source code: Lib/numbers.py
The numbers module (PEP 3141) defines a hierarchy of numeric abstract base classes which progressively define more operations. None of the types defined in this module are intended to be instantiated.
network issue.. sometimes happens with me too bc of the slow laggy network
speak in a slower tempo
!e py from numbers import Integral import numpy as np print(isinstance(np.uint8(123), Integral))
@somber heath :white_check_mark: Your 3.12 eval job has completed with return code 0.
True
@scenic egret π
?
@jagged lagoon π
can you guys help me whit a code ?
I'm writing code for a discord bot that's inside a kind of game but I ran into a problem in that after writing the code it doesn't give me an error and going to DS to test the bot when you select the This option gives the problem that this interaction failed
ok thanks
!d abc
Source code: Lib/abc.py
This module provides the infrastructure for defining abstract base classes (ABCs) in Python, as outlined in PEP 3119; see the PEP for why this was added to Python. (See also PEP 3141 and the numbers module regarding a type hierarchy for numbers based on ABCs.)
The collections module has some concrete classes that derive from ABCs; these can, of course, be further derived. In addition, the collections.abc submodule has some ABCs that can be used to test whether a class or instance provides a particular interface, for example, if it is hashable or if it is a mapping.
This module provides the metaclass ABCMeta for defining ABCs and a helper class ABC to alternatively define ABCs through inheritance:
@green heath @tough galleon π
Well, nothing, now.
I was waving to say hi.
Given you joined the voice chat when I was in.
ok
@somber heath farewell sir! Pardon for missing you when you left, I look forward to enjoying your lovely company tomorrow.
Hopefully with a better microphone quality.
/tmp/_MEIleLojg/127.0.0.1/127.0.0.1.xml
Traceback (most recent call last):
File "main.py", line 7, in <module>
File "threaderf11.py", line 179, in main
File "threaderf11.py", line 40, in Parse_nmap
FileNotFoundError: [Errno 2] No such file or directory: '/tmp/_MEIleLojg/127.0.0.1/127.0.0.1.xml'
[76565] Failed to execute script 'main' due to unhandled exception!
mfw i cannot say anything cause i got banned and therefore have been here for less than 3 days π
literally 1984
Check the voice verification channel
This source code is protected under international copyright law. All rights
reserved and protected by the copyright holders.
This file is confidential and only available to authorized individuals with the
permission of the copyright holders. If you encounter this file and do not have
permission, please contact the copyright holders and delete this file.
debugger
@gentle flint @peak depot @final sparrow can yall give me a package name for an optimization package that tells you what is the best way to go from a point A to point B usng combinatorial models.
Go nuts.
If you can add in a Q somewhere for quantum, it'd be cool hehehe.
You taking out a bullet or sth?
lol no
hehe
this was yesterday
Nice
was cleaning pocketknife
I weirdly both love and hate knives
but it looked weird
i just love them
wrap your wrists in kevlar or smth
Hehe
i've got a nice couple of hunting knives.. damascus steel.. brittle high carbon content
constantly need oiling
My name's Alec Steele and here you'll find near-daily videos documenting the process of building some awesome projects here in the shop. As a blacksmith, most of the projects start as lumps of steel, or stacks of different alloys for making damascus, that I forge out into blades, sculpture, art or tools before taking the project to the machining...
@scenic egretπ
π
!voice
Canβt talk in voice chat? Check out #voice-verification to get access. The criteria for verifying are specified there.
i am working on a discord bot code like 10 hours and i t dont work
def containsNumber(value) -> list[int]:
""" Checks if value contains a number and
returns a list of numbers in the value.
Parameters
----------
`value` (str):
The string to check.
Returns
-------
`num_list` (List[int]):
The list of numbers in the value.
"""
# Find the numbers from the string
num_list = [int(char) - 1 for char in value if char.isdigit()]
# Return the list of numbers
return num_list
@ivory stump It's the weekend can you give me stream perms?
Gambare Gambare
ggdsagds
hi
yes
i always do this
but im not spamming
im just gonna go talk to people in general channel for a bit
Yo
helooo
Wanna chess?
hmmm maybe
why is there a - 1 in there?
ye
i hvae 48 messages
2 more
okay there :3
Are you voice verified?
nop
.
cheers boys
cheer boys
Canβt talk in voice chat? Check out #voice-verification to get access. The criteria for verifying are specified there.
@stray girder π
that is not python
Pappy
How far are you into Python
wdym by novice?
@peak nacelle
Oh, I see
What are you working on?
well
try using a while loop for your first 2 lines
can you copy your code in chat
@worldly needle π
@whole bear Good man, you?
how far into your journey are you?
Maybe I can help
what's up?
@clever tree π
Hey I was just trying to see wht ur talking abt. I couldn't talk due to permission issues
@whole bear
@stark river Hey!
@stark river Im like 35 messages away from vc
How are you though
@brittle mural π
Hellooo
@somber heath Hello
How are you
@whole bear Hi
Im doing well
Studying
yourself?
whats your project?
Oh hahahaha
That is me
I was doing catering that day
discord bot dashboard using django for the website
interesting
can you show me how it works
loll thanks
@whole bear Hey bro
did you get some rest?
Good hahahaha
I can't stand chest
chess*
what rating are you?
xD
ahh okay okay
@maiden breach π
If you're wondering why you can't talk, be sure to check out the #voice-verification channel. π
ok thanks
@mayorc200ππ»4
win 3.11 is 31 years old
os/2 is 37 years old
javascript programmers are commenting in the HN thread above. they believe they can port everything from that win 3.11 machine to ubuntu probably.
dang i think i have nothing to do
i guess thats why i am here
no theres nothing interesting to do
i mean i do breathing every day
i guess i can just stay here
imma go
see ya
@elder tartan π
Hello
again..
thanks for that link btw it was really helpful.
I understand, It was a link for a youtuber that shows how to code in python from step 1.
Hi super. I am just having a problem with your audio.
very low.
Yes a lot better.
yes
are you using filter right now for checking?
and then .exists()?
it's old doc
idk if new has it
I guess it's different in 2.0
(not really sure if it's same thing)
I don't have a DB to test it on right now
maybe same as numpy's notion of scalar?
(i.e. interpreting something as scalar as opposed to composite of many values)
(updated version of that)
https://docs.sqlalchemy.org/en/20/core/selectable.html#sqlalchemy.sql.expression.Select.exists
it seems like there'd be a need to extract a value from it anyway (with next or whatever; probably better to use something that extracts exactly one)
Greetings Alisa!
@app.post("/users/", response_model=schemas.User)
async def create_user(user: schemas.UserCreate, db: Session = Depends(get_db)):
db_user = db.query(models.User).where(models.User.username == user.username).first()
if db_user:
raise exc.Error(status.HTTP_409_CONFLICT, "Username already exists.")
db_user = db.query(models.User).where(models.User.email == user.email).first()
if db_user:
raise exc.Error(status.HTTP_409_CONFLICT, "Email already exists.")
db_user = crud.create_user(db, username=user.username, password=user.password, email=user.email, first_name=user.first_name, last_name=user.last_name)
return db_user
for select-exist instead of first/fetchone:
https://docs.sqlalchemy.org/en/20/core/connections.html#sqlalchemy.engine.Result.one
for exists and scalar_one, it would be true/false or 1/0, I'd expect
is there any canonical ID apart from username/email?
@app.post("/users/", response_model=schemas.User)
async def create_user(user: schemas.UserCreate, db: Session = Depends(get_db)):
if db.query(models.User).where(models.User.username == user.username).one_or_none():
raise exc.Error(status.HTTP_409_CONFLICT, "Username already exists.")
if db.query(models.User).where(models.User.email == user.email).one_or_none():
raise exc.Error(status.HTTP_409_CONFLICT, "Email already exists.")
return crud.create_user(db, **user.model_dump())
class User(Base):
__tablename__ = "user"
id = Column(Integer, primary_key=True)
username = Column(String, unique=True)
email = Column(String, unique=True)
sqlite+aiosqlite:///
where does the error cross sqlalchemy bounds?
(deepest non-sqlalchemy code)
yeah, create_all would be expected to fail too for async
query is legacy
@verbal zenith what does the warning say?
"the right way to look up what HTTP status codes mean"
https://http.cat/409
@verbal zenith removing imports is PyCharm thing not ruff, I think
at least that's PyCharm default
on reformatting
I guess that's what ruff might be mimicking
@whole bear @idle grove π
Hi, Opal.
@whole bear π
π
@crude anchor π
It's the stream.
It attracts people or the dude streaming it is important to them?
Like... A teacher...
People like to watch streams.
@rich sundial π
Maybe the psychological impact of the design of the LIVE indicator convinces people they find streams exciting.
Seems like.
I got test task after a job interview.
It seems huge tho for a test task.
I spent 2 days doing it. :\
Although a big part of it was me being dumb.
If something seems hard, you're probably doing it the wrong way.
I spent about 5 hours trying to figure out why service can't handle more than 1000 request per second.
Only to realise that I can't do 1000 request per second because of some internet limitation. :\
I feel stupid now.
Or sth is just hard.
Yes.
authentication+authorisation?
No I don't have.
I just get the user by JWT-Token.
And check it from there.
But my service was kinda small.
I haven't made any many-role-authorisation apps so far
I'd normally just look at what other services/tools do
Can't you just make columns in database like "is_admin"?
And make them bool.
Seems a very stupid way tho.
mimicking discord's role model may be okay-ish
Well. I haven't worked with anything like that.
So gonna leave it till say something dumb.
:D
@spiral shell π
hello
how can the token get stolen? (what's the threat model?)
criteria for stealing a token would normally be same as stealing password
yeah misspelled
If they can steal Token, why password is more secure?
You can also consider storing the JWT token in Cookie.
At least that's what I did. But it was a year ago and I didn't know much.
keeping track of sessions (to some level) may be worth considering anyway if you're considering security at all
so that way users can invalidate specific sessions
jwt might still store some session-only data
with server-side part just being
id
description
time to expire
Ok. Guys. Gonna go. :D
Bye.
refresh just before expiry
(or very soon, in opposite)
for oauth2 it may be:
if 7 days is max and remaining time drops below 6, refresh
I don't remember what the official-ish guideline for this is
yes, to keep consistent offline-time-to-logout
if you're doing refreshing on your own infrastructure and not calling to some other remote service,
there's also an option to always refresh
this always refreshes, iirc
https://docs.rs/tide/latest/tide/sessions/index.html
API documentation for the Rust sessions mod in crate tide.
brb
back
earlier-to-expire tokens should give no more access than latest ones
so it shouldn't matter
no, don't keep track of jwt expiration itself
as far as I understand, there should be an id inside it that persists -- that thing identifies a session
and that id is what correlates to whatever server-side session info there is
it ends up with timer in three places
cookie expiry
signed expiry inside jwt
expiry in db
jwt is signed
and stored inside a cookie
yes, a hint for the browser
it doesn't send expired ones
(normally deletes it once the time comes)
you'd probably be correlating session id to user id anyway;
though I guess that can be moved client-side (because this data is signed)
this, for example, has different strategies for storing session data
with an option to choose between cookie storage (almost jwt) and server-side
"you can also just delete the user"
!d os.urandom
os.urandom(size, /)```
Return a bytestring of *size* random bytes suitable for cryptographic use.
This function returns random bytes from an OS-specific randomness source. The returned data should be unpredictable enough for cryptographic applications, though its exact quality depends on the OS implementation.
On Linux, if the `getrandom()` syscall is available, it is used in blocking mode: block until the system urandom entropy pool is initialized (128 bits of entropy are collected by the kernel). See the [**PEP 524**](https://peps.python.org/pep-0524/) for the rationale. On Linux, the [`getrandom()`](https://docs.python.org/3/library/os.html#os.getrandom) function can be used to get random bytes in non-blocking mode (using the [`GRND_NONBLOCK`](https://docs.python.org/3/library/os.html#os.GRND_NONBLOCK) flag) or to poll until the system urandom entropy pool is initialized.
!e
from os import urandom
print(urandom(16).hex())
@vocal basin :white_check_mark: Your 3.12 eval job has completed with return code 0.
5f1041d80836e088d3578f0a8fcf7ad2
I think db-stored ones should have a bit longer timeout
like a minute longer
(I forgot why I though that, like, 20 minutes ago, I don't remember)
without deleting, it probably won't crash and burn but it will still waste space
if you need full audit, you might have to store them indefinitely
(user interactions are likely to outweigh storage taken up by sessions)
I don't remember if I did
huh TIL linkedin doesn't SEO descriptions as hard as it does headline
(I tried to look up the name)
"Alisa Feistel" specifically
I think I had it mentioned there in the description as, like, an alias
it's banned regionally
I need to open tor and go through, like, three auth things to access it each time
Secrets would also work no?
secrets is a wrapper around urandom
!e
import secrets
print(secrets.token_hex(16))
@reef agate :white_check_mark: Your 3.12 eval job has completed with return code 0.
9cd2d4d22684c96730d234fdacb806a0
or, like, wrapper around the same thing as urandom is
__all__ = ['choice', 'randbelow', 'randbits', 'SystemRandom',
'token_bytes', 'token_hex', 'token_urlsafe',
'compare_digest',
]
For whoever asked.
Not sure.
!e
import secrets
print(vars(secrets).get("__all__"))
@verbal zenith :white_check_mark: Your 3.12 eval job has completed with return code 0.
['choice', 'randbelow', 'randbits', 'SystemRandom', 'token_bytes', 'token_hex', 'token_urlsafe', 'compare_digest']
thing I made with that session library
https://youtu.be/nY8ZLaQYAog
Same.
it's suppossed to be pvp
PVP?
with premoves
it's turn-based
session there makes sure it syncs across tabs
and devices, if discord auth is used
sync of game state
yes, websockets
- event-sourcing
Makes sense.
almost all the state client sees, can be rebuilt from replaying server-to-client events
π
@upper basin sup
Greetings
You are deafened, therefore I don't imagine you can hear me.
Regardless, greetings!
anyone down for some lethal company?
hello?
hello
@tall frost π
hey i cant speak
in call
just tryna learn how to code better
as i can barely code
!resources
You have been on the server for less than 3 days.
You have sent less than 50 messages.
You have been active for fewer than 3 ten-minute blocks.
The Resources page on our website contains a list of hand-selected learning resources that we regularly recommend to both beginners and experts.
π«‘
@prime burrow π
Hi @somber heath
@somber heath would you know how to code something that sends a message to a discord webhook
import json
import webhook
print('Webhook')
message = input('what do you want to send? ')
print(message)
webhook = input('Enter Webhook ')
response = requests.post('webhook' + message)```
this is what i used
idk if i did it wrong or not
import requests
import json
import webhook
print('Webhook')
message = input('what do you want to send? ')
print(message)
webhook = input('Enter Webhook ')
response = requests.post('webhook' + message)
do u know how?
@obsidian dragon
no
figured it out lol
neat
@whole bear π
Opal??
@whole bear π
Lol
Web isn't my thing.
The ad that started the "NOT HAPPY JAN" phrase around Australia. The employer was clearly not happy that Jan forgot to submit the company's ad for the yellow pages.
!kindling
The Kindling projects page on Ned Batchelder's website contains a list of projects and ideas programmers can tackle to build their skills and knowledge.
@shy reef π
Yeah
@turbid kiln π
hi
@chilly rampart π
What's the name that you chose?
I haven't chosen this, and other people have used this combination of letters. QuIQ
I'm done. I'm gonna send the repo in a moment.
You can see how it looks, and maybe that'll help?
Go nuts hehehe
Quantum IQ
IQ as in knowledge
As in "the" knowledge.
The knowledge taxi drivers have in their head to get from P to Q as efficiently as possible.
and it also sounds like "quick"
I like it!
Check out package demo in notebooks.
You'll get a feel for how it is used.
@fresh patio π
To use the package though you need a D-Wave API token.
The user would need to create an account and then use his/her own token.
I have mine there, so you can just use that.
I'm thinking of creating a sneaky scraper that makes an account, verifies it using a temp generated email, and then sends the API token.
Basically generates a token if you don't have one.
I'm gonna try to do that this week.
hi
Morning @wind raptor β
How's it going?
eh ya know, tryna figure out breakfast atm.
guys can you help me this , why do i see such text instead of image when i serve static png file? it works fine for txt file
def serve_static(self, route: str):
with open(self.static[route.replace("/static", "")], "rb") as file:
return file.read()
so i need to return original text instead of bytes?
i thought browser will decode it
Doesn't seem like it does
i see this when i do in "r" mode
UnicodeDecodeError: 'charmap' codec can't decode byte 0x8d in position 111: character maps to <undefined>
its confusing
Maybe you need to specify the encoding
in headers?
hmm, actually you are receiving a file from a user, right?
Did you set the content type header?
the bytes way should work actually if you set it to image/png
i sent text/html mistakely
Ahh, that'll do it
btw is there any library for getting suitable headers for all formats?
How does it look like your work day is gonna go this morning @wind raptor
Good. Just doing some data science projects
MOUSE WORKIN ?
sorry caps
ghidra
SELECT * FROM c WHERE c.type = 'test' AND c.test.other = 1 # This is fine
SELECT * FROM c WHERE c.type = 'test' AND c.test.'1234' = 4 # Nope
SELECT * FROM c WHERE c.type = 'test' AND c.test.1234 = 4 # Nope Again
SELECT * FROM c WHERE c.type = 'test' AND c.test['1234'] = 4 # I LIED, LOLZ MAYBE WORKS``` Your drunk CosmosDB, go home
i mean it kinda makes sense tho as strings cannot be variable names and numbers cannot be variable names
think its pretty similar in almost any language
SPELIS
charizard?
whats up
well if you like programming you spend alot of time programming vs teachers who spend way more time preparing for classes, teaching students, marking tests, trying to keep up with ever evolving programming languages that they have to teach, try to figure out ways to explain things easier to students (which for the major part have no interest in programming and don't understand how to make a variable at the end of first year)
okay but like he doesnt know what an f string is
f-strings are like 2 year old now? so not too old he probably doesn't regularly read release docs for all languages or read through newly written python code all the time so i can understand how it'd be hard or he might've simply thought its not that important considering we already have the % operator overloading way of formatting strings and the format method (which is still pretty useful sometimes btw)
its not great but it is understandable
yeah thats fair
the best way to learn programming even if you have a teacher who's really passionate about programming and keeps up with everything latest is still to self learn and then goto the teacher for doubts and clearning concepts you don't understand i think
ofc it completely differs based based on the person learning but most people i know who are really good did it that way
Few teachers are passionate about programming. If they were, they would be in private sector making a ton more.
yeah the point was that regardless of if they are or not passionate, self learning is still a way more efficient way of learning and doing it while you have a teacher to goto for doubts or concepts you don't understand from just reading text online is really beneficial
its also why this server is so great because it allows people to find that teacher even if its temporarily in the help channels for python
Gotta go for a bit. Cheers all π
cheers
@visual hinge π
hey guys
Check my bio out
but this goes for every subject
good mathematicians aren't teachers, they're researchers doing more interesting stuff
sometimes they're professors, which is why university education is generally dramatically better quality than high school
good historians become lecturers or write books, they don't teach a bunch of kids
π
hy @high token
Cans someone please help with this - https://discord.com/channels/267624335836053506/1201630771992084533
how r u
I can't hear anyone
from my mom
maybe you want fix my code?
Want is a strong word. But I'll take a look
It looks like super library specific stuff specific
Whats not working?
12 second
What?
@meager sleet π
outlook has neutered itself in what it can do so hard
it's actually so stupid
π
little sneak peak for this weeks project π
How did the date go?
heavenly
Will there be a second one?
Hiππ½
Bro that was at 11am
yea.. just saw the msg
@indigo dragon π
hi
!voice
Canβt talk in voice chat? Check out #voice-verification to get access. The criteria for verifying are specified there.
it not leting me talk π¦
You need 50 messages
No spamming
Also type in full sentences
@calm mesa π
all good just checking out the server
well I just trying to make a new line useing \n but for some reason its not working, sorry I just started
!code
so use triple ''' and I wont be spaming?
Oh thats sick
print('Hello')
ok so I have alot of pysdo code so but im trying to fix this
Pseudocode.
print('this many' \n number)```
!e py number = '13' print('this many\n' + number)
@somber heath :white_check_mark: Your 3.12 eval job has completed with return code 0.
001 | this many
002 | 13
oh ok, but why does the \n work? wont it be printed?
String concatenation. Using the + operator to create a string that is a joining of multiple strings.
kinda
!e py a = '\n' b = len(a) print(b)
@somber heath :white_check_mark: Your 3.12 eval job has completed with return code 0.
1
@somber heath :white_check_mark: Your 3.12 eval job has completed with return code 0.
True
Good night opal
''' multiline/docstring.
ok, that makes alot more understanable
Bye ian and stay out of trouble
!e py print('\\')
@somber heath :white_check_mark: Your 3.12 eval job has completed with return code 0.
\
!e py print(r'\')This might fail.
@somber heath :x: Your 3.12 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)
Good night Charizard
!e py print(r'\n')
@somber heath :white_check_mark: Your 3.12 eval job has completed with return code 0.
\n
!e py 'abc' + 123
@somber heath :x: Your 3.12 eval job has completed with return code 1.
001 | Traceback (most recent call last):
002 | File "/home/main.py", line 1, in <module>
003 | 'abc' + 123
004 | ~~~~~~^~~~~
005 | TypeError: can only concatenate str (not "int") to str
!e py print('abc' + str(123))
@somber heath :white_check_mark: Your 3.12 eval job has completed with return code 0.
abc123
!e py name = 'Peter' age = 16 print('Hello, ' + name + '. You are ' + str(age) + ' years old.') print(f'Hello, {name}. You are {age} years old.')
@somber heath :white_check_mark: Your 3.12 eval job has completed with return code 0.
001 | Hello, Peter. You are 16 years old.
002 | Hello, Peter. You are 16 years old.
!e py name = 'Peter' age = 16 print('Hello {}. You are {} years old.'.format(name, age)) print('You are {a} years old, {n}. {a} is mere moments to an immortal.'.format(a=age, n=name))
@somber heath :white_check_mark: Your 3.12 eval job has completed with return code 0.
001 | Hello Peter. You are 16 years old.
002 | You are 16 years old, Peter. 16 is mere moments to an immortal.
!d str.format
str.format(*args, **kwargs)```
Perform a string formatting operation. The string on which this method is called can contain literal text or replacement fields delimited by braces `{}`. Each replacement field contains either the numeric index of a positional argument, or the name of a keyword argument. Returns a copy of the string where each replacement field is replaced with the string value of the corresponding argument.
```py
>>> "The sum of 1 + 2 is {0}".format(1+2)
'The sum of 1 + 2 is 3'
``` See [Format String Syntax](https://docs.python.org/3/library/string.html#formatstrings) for a description of the various formatting options that can be specified in format strings.
!f-string
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.
Use this where possible. It's nice.
@north dagger π
Aye, Opal.
Intelligent search from Bing makes it easier to quickly find what youβre looking for and rewards you.
Do biological rules even apply in comics?
dealer's choice
I've only seen a few of the movies too.
Gotta make progress on protecting the Earth and it's species.
That's interesting.
It's all about the different geography. The mountains, valleys and rivers. Different looking places around the world.
Bees follow the fibonacci sequence don't they?
The Golden Ratio is news to me.
Oh, I've seen it before. It is "a ratio between two numbers that equals approximately 1.618"
!e print((1 + 5 ** .5) / 2)
@somber heath :white_check_mark: Your 3.12 eval job has completed with return code 0.
1.618033988749895
:1
What is ** in ((1 + 5** .5) / 2)?
That makes sense. Reguardless of the ratio between a and b, they both add up to a + b
# pyproject.toml
[build-system]
requires = ["setuptools>=61.0.0", "wheel"]
build-backend = "setuptools.build_meta"
[project]
name = "realpython-reader"
version = "1.0.0"
description = "Read the latest Real Python tutorials"
readme = "README.md"
authors = [{ name = "Real Python", email = "info@realpython.com" }]
license = { file = "LICENSE" }
classifiers = [
"License :: OSI Approved :: MIT License",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
]
keywords = ["feed", "reader", "tutorial"]
dependencies = [
"feedparser >= 5.2.0",
"html2text",
'tomli; python_version < "3.11"',
]
requires-python = ">=3.9"
[project.optional-dependencies]
dev = ["black", "bumpver", "isort", "pip-tools", "pytest"]
[project.urls]
Homepage = "https://github.com/realpython/reader"
[project.scripts]
realpython = "reader.__main__:main"
I'm heading out for the night, you guys have a good one.
@rugged root I published the quantum random number generator package!
Try it out and let me know what you think!
i think the last output of the package_demo file is umm interesting
Which one?
me personally thought it was funny but
hi
@scarlet edge π
Opall
dm?
!code
fix pls
@scarlet edge Tell me what it is you need help with.
guys is it fine if i guess header content-type using mime-types lib as it checks using file ext instead of content?

Multiplayer?
look simple
You want to do wallhacking?
!rule 5
5. Do not provide or request help on projects that may violate terms of service, or that may be deemed inappropriate, malicious, or illegal.
this not rat
So I wanted to check the code for the presence of a rat
@whole bear π
but I can't run it
hello there
error in 8 line
he means ESP
Camping is part of the game mechanic.
@scarlet edge why cheat
why?
Make a custom game, and kick people if they stay in the same spot without moving.
Like COD
lol people still play COD?
big fan of it too
It's fun for a few hours
lol XD
Then it gets boring, then it gets annoying.
not sure why ppl wanted a new version of mw when BO2 was the best COD game
the spawns are still dog shit as always
Well MW reboot was supposed to be focused on campaign, but they got greedy.
BO2 and mw2 was probably the best two.
Isn't this a cycle?
you're still asking for the same thing which no one is gonna help with.
!rule 5
5. Do not provide or request help on projects that may violate terms of service, or that may be deemed inappropriate, malicious, or illegal.
Ask in a CS2 discord.
This is considered cheating, which CS2 discord may be fine with, but in Python discord it is prohibited.
Apologies.
If you want to learn, do modding instead.
pip install qoin
IBM Composer
!e py import random for _ in range(5): random.seed(123) choices = random.choices(range(5), k=10) print(choices)
@somber heath :white_check_mark: Your 3.12 eval job has completed with return code 0.
001 | [0, 0, 2, 0, 4, 0, 2, 1, 4, 0]
002 | [0, 0, 2, 0, 4, 0, 2, 1, 4, 0]
003 | [0, 0, 2, 0, 4, 0, 2, 1, 4, 0]
004 | [0, 0, 2, 0, 4, 0, 2, 1, 4, 0]
005 | [0, 0, 2, 0, 4, 0, 2, 1, 4, 0]
!e py import random for _ in range(5): choices = random.choices(range(5), k=10) print(choices)
@somber heath :white_check_mark: Your 3.12 eval job has completed with return code 0.
001 | [0, 3, 0, 2, 4, 2, 0, 3, 0, 1]
002 | [0, 3, 2, 3, 3, 0, 2, 1, 4, 3]
003 | [0, 3, 3, 2, 1, 0, 3, 2, 4, 1]
004 | [1, 0, 2, 4, 2, 2, 0, 0, 3, 1]
005 | [3, 1, 0, 2, 0, 0, 0, 4, 3, 3]
The seed, by default, is based on the time when stuff gets initialised.
In physics, a hidden-variable theory is a deterministic physical model which seeks to explain the probabilistic nature of quantum mechanics by introducing additional (possibly inaccessible) variables.
Indeterminacy of the state of a system previous to measurement is assumed to be a part of the mathematical formulation of quantum mechanics; moreo...
@somber heath hi
Universe 0 : 0000011111
Universe 1 : 0000011111
Universe 0 : 0100101101
Universe 1 : 0011010110
@grim gorge π
FeynmanHibbs book
"Don't call me Shirley" - Richard Feynman
Star my repo
echo /__pycache__ >> .gitignore
I'm working on my offline speech transcription program (with GUI).
to the beginning in terms of, you know, the progression of the tune. And so if you give it an ending, that resolves that loop. I like that. Is there a quantum relationship here, possibly? Your mom was so fat, she plays pool with the planets.
@rugged rootyes they ware talki9ng about quantams
The mom one?
Majestic
I know the window is unclean.. I did clean it before winter but the rain and dirt got it...
@rare trellis dm
@native berry π
π
Um @rugged root Can you read my bio?
Cool
Read the hidden things
#career-advice @azure pagoda
Everybody, let Hemlock breath
@mystic thicket π
Microsoft just fired 1600 people...
Are they alive?
π
Wtf?
You said they were fired
They're not made of pottery.
this is a sample from my transcription speech to text program I am writing in Python. So this was some chatting going on while the channel was live a while ago.
Oh sick
It uses CUDA cores AND threading. So I can stack up a dozen mp3, mp4, wav files, etc. and it automatically transcribes them and dumps a .txt file in the same place as the audio file.
this is the gui running.
@somber heath The semantic kernel, after boot, can now behave relatively autonomously for some tasks.
@lucid blade Let's not forget that fruit picking turns out to be the hardest to automate human skill.
gotta run. Bye for now!
babye
If farmers had trouble getting workers to pick all their fruit, they could hit up gay bars and make an event of it. Fruits Picking Fruits.
Bye everyone
Sentimental analysis of restaurant review@mr.hemlock
I've never messed with that before
Ur ideas if any
You're full robot, sorry
Oopps do you have any other idea
"alone nugget"
Still doing sentimental analysis or possibly something else?
Yes if any easy one u have?
thats me
!kindling
The Kindling projects page on Ned Batchelder's website contains a list of projects and ideas programmers can tackle to build their skills and knowledge.
couldnt be me
I would not smash that escape room
thats easy as an introverted person
shell prompt at bottom concept
Yes
My mic is not working
woking
Hello everyone π€
helo
Please can I know more about this group
:)
I was looking for a game developer
Check the Careers -option
@peak depot don't die
Lets all be alone nuggets together, to become a happy meal
but then we're just nuggets
Nuggets in a box
Hey do u have any other idea to include in sentimental anlaysis of restaurant reviews any feature. @rugged root it should be unique
Can we extend to something more
!e
primary = "adc"
secondary = "fill"
valid_roles = ['top', 'jungle', 'mid', 'adc', 'support']
if primary == secondary or (primary not in valid_roles and secondary not in valid_roles):
print("NOT OKAY")
else:
print("OKAY")
@rapid chasm :white_check_mark: Your 3.12 eval job has completed with return code 0.
OKAY
!e
code
!e primary = "adc"
secondary = "fill"
valid_roles = ['top', 'jungle', 'mid', 'adc', 'support']
if primary not in valid_roles or secondary not in valid_roles:
print("NOT OKAY")
elif primary == secondary:
print("NOT OKAY")
else:
print("OKAY")
@minor sage :white_check_mark: Your 3.12 eval job has completed with return code 0.
NOT OKAY
!e
primary = "adc"
secondary = "fill"
valid_roles = ['top', 'jungle', 'mid', 'adc', 'support']
if primary == secondary or primary not in valid_roles and secondary not in valid_roles:
print("NOT OKAY")
else:
print("OKAY")
@rapid chasm :white_check_mark: Your 3.12 eval job has completed with return code 0.
OKAY
if primary == secondary or (primary not in valid_roles and secondary not in valid_roles):
!e
primary = "adc"
secondary = "fill"
valid_roles = ['top', 'jungle', 'mid', 'adc', 'support']
if primary == secondary or (primary not in valid_roles or secondary not in valid_roles):
print("NOT OKAY")
else:
print("OKAY")
@minor sage :white_check_mark: Your 3.12 eval job has completed with return code 0.
NOT OKAY
!e
primary = "adc"
secondary = "fill"
valid_roles = ['top', 'jungle', 'mid', 'adc', 'support']
if primary == secondary or (primary not in valid_roles or secondary not in valid_roles):
print("NOT OKAY")
else:
print("OKAY")
@rapid chasm :white_check_mark: Your 3.12 eval job has completed with return code 0.
NOT OKAY
!e
primary = "fill"
secondary = "fill"
valid_roles = ['top', 'jungle', 'mid', 'adc', 'support']
if primary == secondary or (primary not in valid_roles or secondary not in valid_roles):
print("NOT OKAY")
else:
print("OKAY")
@rapid chasm
@rapid chasm :white_check_mark: Your 3.12 eval job has completed with return code 0.
NOT OKAY
!resources
The Resources page on our website contains a list of hand-selected learning resources that we regularly recommend to both beginners and experts.
@whole bear
@somber heath pls help broo
damn, how is ti?
this got me dead lol
@dim palm π
hey
i have to be in the server for like 3 days and send 50 messges :0
yeap i will
so what are u up 2
oh
are u a programmer
tell me about urself\
oh noice
alright
@latent atlas π
@dusky plank π
@thick cobalt π
@dapper root π
@ripe ibex π
These little flying foxes are new arrivals to the Australian Bat Clinic after an extreme heat event separated them from their mothers.
Learn more about the bat clinic here:
www.australianbatclinic.com.au
https://www.facebook.com/pages/Australian-Bat-Clinic-Wildlife-Trauma-Centre/242483795809816
MY GEAR
Camera: https://goo.gl/ZYs3PD
First Le...
You thought that bats were dangerous killer animals. Well, not this one at least. This is a gigantic fruit bat that we met up in the mountains of Bali Indonesia. This Indonesian guy has this bat as a pet that he rescued as a baby and has kept it with him for many years.
π Letβs connect on Instagram https://instagram.com/olestories
βοΈ To See My ...

