#off-topic-lounge-text
1 messages · Page 36 of 1
want to move to chapter 7 on regex
is it you or is it me?
Yes.
Remove the space between the period.
Mr. Hemlock and Mr.Hemlock are typing
And Mr.Hemlock.
who will read = random.random(["Mr. Hemlock"])
and me
!e
from random import choice
hemlocks = ["Mr. Hemlock" for i in range(11)]
print(choice(hemlocks))
@leaden drift :white_check_mark: Your eval job has completed with return code 0.
Mr. Hemlock
Hemlocks, let's hear your callsigns
you are missing space between mr and hemlock
.
hello
I get that, and I wrote something relating to your title before that.
Seems liek you didn't see it.
hello @agile portal
Hello.
Hello.
@solemn marsh
@solemn marsh
it's spreading like covid
Questions, Mr. Hemlocks?
Miss Hemlock where
Because I am
I'm immune to the plague.
U are an outsider and disgrace to the society
me
me too
Mr. Hemlocks are
@upbeat mirage hello sir
Hello doctor
yep!
Mr.Hemlock did
Which one though?
now get a sentence and search it
That one
I'm just imagining if eivl joins and asks "WTF is going on?"
Mr.Hemlock is just doing his thing
@solemn marsh your mike is open 😛
mic
everything you say with that dp sounds like shouting
from next time type with ALL_CAPS
oh no
Also, Rule 4
I've no girlfriend, nor do I want any.
!rule 4
4. Use English to the best of your ability. Be polite if someone speaks English imperfectly.
!tvmute 936268272746250250 2w Please make sure that your mic is muted when you are not speaking or you are able to control the background noise. If this happens again after the mute expires, you will permanently lose voice speaking permissions.
:incoming_envelope: :ok_hand: applied voice mute to @solemn marsh until <t:1654188521:f> (13 days and 23 hours).
Dude, uncool.
Which hemlock?
You had multiple chances to fix it,
Please.
Begging will get you nowhere
You're still able to participate here
I couldn't realise it, sorry.
I was busy doing something else.
It takes half a second to press the mute button
clearly you can if you are typing
gay maybe?
or just some other stuff
he looks like an egg
sorry he doesnt looks like an egg
I was referring to you.
I think you failed to realize it.
what?
I don't use reply.
Well, don't use it so much.
ok but i wont call anyone an egg
Yeah, right.
except my brother
What a convincing statement.
I'm Indian and it's a pet name.
which part of india
I think you failed to realize it, that I was speaking Hindi when I was unmuted.
Delhi.
first put () around the re.compile(r'(\d\d\d-\d\d\d-\d\d\d\d)')
in telugu it means guddu
I have deafened myself
his name is Itsumi
in japanese
And, he's in this server?
nah my brother is too young for discord
I agree
trig is indeed cool
I am just bad at it
!e
import re
a = re.compile(r'(\d{3})-(\d{3}-\d{4})')
mo = a.search('My number is 415-555-4242.')
for i in mo.groups():
print(i)
@leaden drift :white_check_mark: Your eval job has completed with return code 0.
001 | 415
002 | 555-4242
!e
code
!eval <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.
We've done our best to make this sandboxed, but do let us know if you manage to find an issue with it!*
Now, I'll be beware of @buoyant kestrel when he's in a call.
or just don't unmute
if you don't have anything to say
Now, that's just illogical.
...
even if mr.hemlock is not here... someone will feel annoyed and call mods...
you could just turn on push to talk
Beware of almost every person, people who can’t control their mic will get crapped on, too many people to have screw ups.
Use Krisp if you have it, if not, then use push to talk
regex is great with web scraping
@agile portal you wish you were this awesome.
change it to tldr
i want to unmute in the live coding put it says i don't have permison
Voice verification
Can’t talk in voice chat? Check out #voice-verification to get access. The criteria for verifying are specified there.
👀 i was talking about the animals... rabbits i like them cuz they're cute
I saw what you did.
and you can have multiple optional
brb
Using these instead of chiles
🤔 well while i don't see anything too bad in being you i don't feel like that's too much of an improvement for me
sounds like just more stress
brb
Now, that's wise.
@fresh sailpassword validation to make sure password has a number, has special characters and is long enough
@buoyant kestrel Can you ask to zoom in?
btw regex is in your vscode you can do alt + r
?
where under run is it?
too many ha
re.complie() complies reg exp to what?
The Text
ctrl +
Oh, thanks 🙂
@calm bay
I would assume some sort of internal DFSA structure
that can match strings in linear time.
site?
hmm... why not just... re()
i think some regex will take exponential time to match
Exponential? No. You can match a regular expression of size m with a string of size n naively in n^2m time
you can be a bit smarter with some optimizations
but ideally, if you're doing a bunch of matches with a regex, you can just preprocess the regex to a DFSA
let me look up... I heard something like that in formal langs class
Non-greedy prints out the lowest value?
r'\d{3}-\d{3}-\d{4}'
exponential time by Finite Automata not by Turing machines
What's the function of - re.compile() ?
regular expressions are equivalent to finite state automata
a finite state automata can't do the actual matching
reg exp canbe recognized by finite automata
in finite time
It feels like we are learning a second language.
depends on what you mean by "finite automata"
every DFSA has an equivalent regex
any character but numbers
that's like saying a regex can recognize a regex
equivalent doesn't mean efficient...
non-deterministic and deterministic automata are both equivalent
I know they are equivalent... we are taking about time
efficiency in terms of what? number of steps to match? that's fixed, it's the number of characters in the string
have you never written a regex to match a regex to find a regex to find a regex?
you take one transition for every character in your string, and then you stop. the final state tells you accept/reject
why would there be a time complexity difference?
in NDFA you say try all decisions ...
@buoyant kestrel Please give an example of \w
an NDFA has an equivalent determinista FA
Anyone?
you should use regex101 with that and see realtime search
Game of Life is equivalent to Turing Machine... it doesn't mean it can do it efficiently
yes, but that's a false equivalence
for any finite automate the maximum number of steps is bounded by the size of the input string
Our definition of equivalence is both can recognize regex
it doesn't say anything about efficiency...
.* can be exponential... i forget the reason though
read about it a long time ago
turing machines are different because they have separate state. Length of input does not directly correlate with number of steps.
wait a sec
put ^ in front of the regex
this is literally a leetcode question, you can implement regex with . and * in n^2m time
I have implemented it
With | it can get a little more complicated
and in any case
NTM = DTM... but we can't build NTMs
even if matching a regex can be exponential
it's like that...
i don't get what your point here is
the time complexity is the same
DTM usually just have more states
NDFA = DFA in the sense... we can simulate NDFA with DFA
because you don't have the flexibility of non-deterministic transitions
nvm latex not workign here..
read one with 5 votes
sure mr hemlock
the accepted answer is quite literally what I am saying LOL
read computation part
@buoyant kestrel end of line*
cuz you can match multiple line endings too
with search
representation size is same...
but computation is 2^n
You have a fundamental misunderstanding of how DFAs work, this argument is not worth it
yep...
and when the characters are over, you stop, correct?
you do.
as soon as the string is done, the final state is accept or reject
that is a regex
not a DFSA
the DFSA would have 2 branches from the start node
You need to review how DFSAs work.
I know... how they work...
I've taught a theory of computation course for 2 years.
this is very much my wheelhouse.
non determinstic by definition does stuff non-deterministically...
which is expoential...
in states
but you can't actually have non-deterministic FSAs, those get converted to deterministic ones
you can do that conversion once, without any input string
that's what re.compile() does, in essence
when you actually match
that's against a deterministed FA
which is linear time
bruh
you keep giving me these links
I am asking you a simple quesion
we have a determinstic FA
and a string
yeah...
how many steps does it take
that is bounded by the length of the string
always.
you cannot take more transitions than characters
need to go for now 🙂 cya guys later
And yes, I have seen ^M for newline in the wild in the past month
let me open up some formal lanagues book
1 thing I have to make sure... in your defintion (N) represents regex or length of input string
we're talking about DFSAs, not the regex
can a regex be abused for code execution
length of the pattern
n is the length of the input string
as I may wanna implement it
okay
but not have yk, HAVE PEOPLE TAKE OVER MY BOT
our definitions differ here... I'm taking about pattern... I realized when you said "it stops when it at the end of the string"
to evaluate a pattern... NDFA need order of N states to size of pattern and 2^N states for size to pattern
Mustafa and Helium are having their own session over her.
Sure, DFAs require significantly more states than an equivalent NFA. But you specifically said runtime
maybe size of pattern doesn't makes sense... there is something similar to it...
campared to size of pattern...
size of original pattern is irrelevant to matching once you have converted it to the DFSA
let me look up there is some ordering to patterns
it will be slower to convert to the DFSA, but I'm explicitly not talking about the conversion process
to recognize a string first you need to convert
@icy raven why u got no profile pic
yes, but that's a one-time thing
you can do re.compile() once
if it take exp time to build your data structure... it is still exp time
and then match 100 billion strings
which makes it better from javascript
My voice is shot too
100 billion is still a constant... no matter how big it is... exp always crushes it...
???
You were deafened, but I was reading the book out loud
So I'm going to need a bit to rest my voice
this isn't #programming-memes, if you wanna share it so bad, https://www.reddit.com/r/programminghumor/
._.
also use the appropriate channels
!ot its better suited here
Off-topic channel: #ot2-never-nester’s-nightmare
Please read our off-topic etiquette before participating in conversations.
also its out-of-context
if it take exp time to build your data structure... it is still exp time my arugument is this
amortization to linear requires... exp runs
n^100 is still polynomial...
that's what I'm saying...
you can
amortization exp to linear = requires exp number of inputs
amortization doesn't work like that i'm saying.. sure in practice... n^100 is exp in real world...
let's have this decision tomorrow...
I'll write down the proper proof and send you..
wiki defintion?
okay nvm
Okay... I'm complete sure about this... even running takes exp time
when we convert NDFA to DFA each state is not a alphabet... rather element of Power Set of alphabet... so trasitions go from one subset of alphabets to another...
and there are 2^n subsets of alphabet
input is a sequence of subsets....
@calm bay
I'm sorry I'm too confused till now...
No, and I'm done with this.
okay... look it up
would you mind looking it up
how to convert DFA to NDFA
what is the input to it
check again
what is the input for that converted dfa
input is sequence of subsets
of alphabets
okay...
I'll do that...
okay input is still string... my bad input is still same... I read that wrong...
but the problem occurs going from one state to another... that is where it is exp...
i gotta go talk to you tomorrow... with PROOF!
I'm completely wrong about this one.... it is talking about states.... I got too confused today...
My argument falls back to this statement...
I'll do little amortization to prove it to you! it's been a while...
@calm bay
the amortization is on different axes. Number of runs is independent of size of regex
you can't do regular amortized analysis
the n is not the same
lengh of the string
~2^m to build, where m is the length of the regex (in reality much less, but some esoteric worst cases)
2^ states
you do not need an input string to build the dfsa
@jagged granite y u leave, I was going to ask a question
exactly
I'm running around a lot today
Was just seeing what was going on
How long is your question?
Bah, it can wait
there is where... we got differed and cracks in my knowledge started to show...
👍
If you feel like it you can type it, and I can read it while I'm working
I just can't have headphones in, etc, while I'm around the machinery
bot/exts/moderation/voice_gate.py line 244
async def on_voice_state_update(self, member: Member, before: VoiceState, after: VoiceState) -> None:```
I was little rusty and got confused between state and input string... I was wrong about my definitions... I gotta look back.. I thought I masted this stuff...
I completely agree your argument... but people say regex is exp to evaluate by dfa it involves "*" operation in a branching way... we measure with that because.. we don't know the size of the input, it is a arbitrary long... you see my argument now?
measuring constructing dfa makes more sense...
🤷♂️
not necessarily
matching a string with size n=10 is very different from matching with n=10000
you would expect the latter to be significantly slower
regardless of the input regex
and again
if you have a DFA
it takes exactly n steps
Hemlock, this is what you got going on
yep it takes n transition functions execution
it is exactly the length of the input string
regardless of the input regex / conversion time
so really, talking about the size of dfsa when matching is really irrelevant
okay would you agree with this... it might take exp time to find a substring that matches with the pattern?
subsequence...
that's assuming no optimizations or any sort of partial memoing
regex doesn't match subsequences, only substrings
okay let me think...
i don't know why you want it to be exponential time so bad lol
this is a nice experience though... nice to break down internal inconsistencies
I definitely heard exp time during reg languages... to just evaluate... can remember when...
if you're matching from an NFA, then yes
because you need to backtrack
if you're matching from a DFSA then it's linear
you don't have options
@calm bay Go to sleep
there's always just exactly one transition to take
Sleeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeep
NFA is definitely exp because decisions...
yes, but you were insisting they have about the same space
^
.
I got too confused today...
I stated correct... exp states... but made some incorrect defintions... thought about what they were impling... and went with it...
my bad
Bartnand Russell once said something like "Assume 4 = 5, I can prove your are the pope"
@calm bay thank you for being patient with me....
I was too annoying...
@buoyant kestrel you'd have to update all "bacon" dicts in the list before the "ham" update
egg = {}
for b in bacon:
egg.update(b)
ham.update(egg)
or something... @buoyant kestrel
keeping it simple
¯_(ツ)_/¯
kek
<python-version>3.8</python-version>
<dependencies>
<dependency>flask</dependency>
<dependency>requests</dependency>
<dependency>jinja</dependency>
</dependencies>
This could possibly be the best way to approach pip lol
Now do a helm chart in XML
I'm used to looking up in-line documentation in PyCharm with Ctrl+Q
imagine me* using PyCharm on Mac
..........................................................................................
imagine using PyCharm when you can use nano
rip
Notepad.exe
vim > nano
emacs is the language of the ancient wizards
I have tried emacs, and I didn't like it. I do know there are people who like it, and I respect that.
Why are you torturing yourself by making your own Discord API Python wrapper btw?
👀
aha
Generics 
Imagine:
T = typevar('T', 'Generic')
class MyFooList<T>:
def add(ele: T):
pass
or whatever
laughs in typescript
@buoyant kestrel
dict(
name = config["name"],
)
return dict(name=..., channel_id=...)
@buoyant kestrel
I wish we could do
x = {a: 1, b: 2, c: 3}
y = x.a
print(y) # 1
We can.
Yeah, in javascript
You can use namedtuple's if your data structure is static
!stream 658593980803448852
✅ @lunar skiff can now stream until <t:1652989035:f>.
99% of the time I have no idea what the structure is going in
working with REST APIs
-ish
ok the import is screwed... where's this from again missing an s 😂
there we go.. 🙃
!e
from collections import namedtuple
foo = namedtuple('my_foo', ['cake', 'luls'])
bar = foo(42, 'baz')
print(bar.cake) # 42
@shadow acorn :white_check_mark: Your eval job has completed with return code 0.
42
# Crazy Dict
class CrazyDict(dict):
def __init__(self, data):
self.data = data
def __getattr__(self, k):
return self.data[k]
def main():
player = CrazyDict({'name': 'Gomez'})
print(player.name)
if __name__ == '__main__':
main()
@upbeat mirage Wanna go to V1?
could u explain what you coding?
At 4am? No.
good
One month later... you become a teacher and go back to school.
No session today for Python?
Plus, I'm not listening to meet, so you can message me here.
Nice Job 🙂
@wise lake
In depth view into Microsoft Price to Book Value including historical data from 1986, charts and stats.
In depth view into Tesla Price to Book Value including historical data from 2010, charts and stats.
Python Enhancement Proposals (PEPs)
suggested in 2019, never added
@buoyant kestrel can you help me again?
Shoot
You forgot the input
oh yeah
Currently you're just trying to turn a string into an integer
thanks I'm brain afk lmao
https://www.worksinprogress.co/issue/why-innovation-prizes-fail/ a relatively interesting article
I will return, just have to take care of a tech thing
Oh boys, @buoyant kestrel is there. Better get out before he gives me permanent mute 🙂
Good to know there's no hard feelings about that
too lazy to do it
@calm bay Question for you: I've readjusted the argument options when running the script. Now, either a server name or guild template must be provided
Currently I have them as two separate optional arguments.
I just have the program error out if neither are provided
Is that the way to do it or is there another way to do a required either or situation?
Huh, newlines are stripped
Interesting
@honest pasture Just want to say again how appreciative I am about finding that. Makes my life quite a bit easier
no problem - glad I could help
My brain has shut down
lol
Learning process:
data = download(material)
notes = []
for functionality in data:
chunk = functionality.decompose_activity_flow()
extraction = chunk.extract_relationships()
notes.append(extraction)
.
Hello i need someone who can remote my laptop and learn me how to submit my submissions (Cs50 web)[paid]
cool... what makes it special...
cool...
you contributing to it?
nice
btw, both Turing Halting Problem, Godel's First Incompleteness Theorem, they all use cantor's Diagonalization argument... I couldn't find right words that day...
I asked people who understand it..
I still don't understand some part of godel's proof... but I do understand the general idea..
cardinality of set of all provable statements from axoims of our formal system is countable... and but there are uncountably statements that are unprovable are from axioms...
similarly... in halting problem... there are countably many algorithms to solve problems but uncountably many problems to solve...
!code
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.
# Database,py Module
def getNames(self,name,gender):
myConnection = pyodbc.connect(
)
cursor = myConnection.cursor()
cursor.execute("SELECT * FROM all_data WHERE Name=? AND Gender=?",(name,gender))
rows = cursor.fetchall()
for row in rows:
print(row)
myConnection.close()
# Main.py Module
def main():
theName = input("Enter a stupid name->")
theGender = input('Enter Gender -->')
lstName = Name.getNamesByNameGender(theName,theGender)
for n in lstName:
print(n.name,n.Gender)
main()
# Names.py module
class Name():
def __init__(self, name, gender, year, count):
self.__name = name
self.__gender = gender
self.__year = year
self.__count = count
@property
def Name(self):
return self.__name
@property
def Year(self):
return self.__year
@property
def Gender(self):
return self.__gender
@property
def Births(self):
return self.__count
@classmethod
def getNamesByNameGender(cls,theName,theGender):
thing = Database.getNames(theName,theGender)
for i in thing:
print(i)
In this Python Object-Oriented Tutorial, we will begin our series by learning how to create and use classes within Python. Classes allow us to logically group our data and functions in a way that is easy to reuse and also easy to build upon if need be. Let's get started.
Python OOP 1 - Classes and Instances - https://youtu.be/ZDa-Z5JzLYM
Python...
Hello! Please i need you to understand this course Image processing with numpy and pillow
print('Hello world!')
py print('Hello world!')
print('Hello world!')
print('Hello world!')
pip install discord
pip install httpx
Hellooo there Ive got some question of visual studio
how do I install numpy in visual studio don't know where to download 😢
@astral shale in the terminal pip install numpy or pip3 install numpy
if you don't have pip
- curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
- python get-pip.py
thanks ❤️
@astral shalefor installing stuff, there are these things you can make, they're called 'virtual environments', when you make them, they are placed in whichever directory you're in, and most likely, you can write to them...
while it's active, pip will install stuff into that virtual environment
(note, it's not really a good idea to install things with pip as Administrator, or as root)
@astral shalewhich operating system are you running?
hi... I'm not voice vverified... will be a couple days probably
who's that?
my second day here. let me try to find that. are you on channel zero?
Hi there
Découvrez cette application gratuite. Elle vous rémunère pour vos pas 🚶 https://sweatco.in/i/boomgamer58183295412
!voice
Voice verification
Can’t talk in voice chat? Check out #voice-verification to get access. The criteria for verifying are specified there.
yeah i guess have to chat to do that
I am good what about you
that's not python i guess
js i see
yeah python cool stuff
hahah
yeah I have 2-3, but currently I have my exams so had to stop for a while
so you work somewhere ?
yeah it is
that's cool that you do as hobby
Windows 😄
I am in college
fresher
opt for computer science
no option
it's a degree
include everything related to cs
yeah 1st year started
java and c++
i already did that in high school
@lapis turret hey buddy
what time is it at you country
i learned python form w3 school. It's good
am ?
yes
so it's sleep time
yeah mostly 1st
yeah he will sleep
where are you from
I am from India
wow Canada have to go there.
yeah
8:30
I have to go cause that's where my university is
in Canada
yeah I am back now for a month
it's online so
dosen't matter
*doesn't
hey, I'll have my breakfast and will be back 30 minutes.
all the best with your project
will be right back
bye !
Yes I will totally memorise you while I cry trying to learn python
@rancid cloak please don't troll the voice chats
No good
Making a list
hahaha it sounds so tragic
I got this assignment and it's where I need to input a bunch of domain names and make them into a list where I will select to find the IPV4 of it
but yk it's difficult
yeah storing them into the list
yes
sup sorry i cant speak but i would like to so i can ask some stuff
ty!
i am trying to get into coding and i don't know where to start you have any things for me to do
somewhat
my dad has a masters in computer science and says i should try to ask some people
oh and i use pycharm for your information
should i use something different
my dad uses java but i dont know what to start out with
and he also uses c++
and that is none
i know nothing about this and i mean nothing
what about ruby hehhe
well i want to start coding but i have no base line in this
hello world?
i should start out with hello world?
ohh my god i love you thank you
my dad wants me to make the computer say 1-10 in three lines of codes
thank you
thank you i do understand thank you
my dad wants me to make the computer say 1-10 in three lines of codes
how may i do that
not doing print
thank you i am going to show ma dad this
he has a masters in computer science
he is in cyber security
ok
i can understand that but why is this so hard
oh
oh ok
thanks for helping me
hope you have a good day
i took so many screen shots i have no more space lol
so i need to know that any thing is possible
holy crap
thats a lot of stuff
pretty
thank you
good day
@astral shaleok, I can't say much about windows requirements, it's been probably a decade since I ran windows... my last use of windows was to run some video game that needed a more expensive video card... it was then, that I gave up on games that need that kind of hardware, and with that went my need to run windows... linux only ever since, and it's been pretty good 🙂
the way python does this "unpacking" is pretty efficient, in that you don't have to write much to make it happen...
the term "unpacking" is a term that means the same thing... anywhere you would take all the pieces of an object and split them into separate variables, that's unpackaing
hi
thought I'd come check it out... looks like tomorrow is when I would get voice verified
would it be better if you had some sort of collection of players, but not keyed by name? (that way you could have two players of the same name, without overwriting?
(I know it took a lot of work to get it to where it is, I'm not suggesting you change it)
I guess the way they'd do the same thing in a database, is you'd have a numeric integer primary key
maybe see you all tomorrow... I fell asleep in chair two different times; I'm tired 🙂 nite all
its ten for me
they're making a dungeons n dragons thing, where they're making characters out of classes,, and storing them in one way or another
ohh cool
mindful dev is sharing his screen where he's doing the coding
welcome 🙂
i am trying to talk a lot so i can be voice verified
hehe
not that i am texting only for that though
yeah, I'm here 3 days tomorrow or the next day
I got my 50 lines, but still commenting and such
i got it
anyway have fun, in doing all this, they're showing different ways and tricks for classes and probably other things
I see
( so wanna buy a new computer XD)
still appreciate for your help ❤️
@astral shaleabout"I see, so wanna buy a new computer" well I dunno, that's up to you... maybe you can upgrade the one you have
@glass smelt Welcome
@buoyant kestrel hello
@onyx trench over here!
[project]
name = "auto_guild"
version = "1.0.1"
description = "Creates a Discord server based on a template you layout, making it an easy and quick way to flesh out a server to fit your needs."
authors = [
{ name = "Daniel J Brown", email = "browndj3@gmail.com" },
]
license-expression = "MIT"
dependencies = [
"requests>=2.27.1",
"pyyaml>=6.0",
"python-dotenv>=0.20.0"]
requires-python = ">=3.7"
readme = "README.md"
[project.urls]
Homepage = "https://github.com/MrHemlock/auto_guild"
Repository = "https://github.com/MrHemlock/auto_guild"
[project.scripts]
auto-guild = "auto_guild.__main__:run"
[tool]
[tool.pdm]
[build-system]
requires = ["pdm-pep517>=0.12.0"]
build-backend = "pdm.pep517.api"
@sand yew over here!
Hi. I'm suppressed so I can't enable my microphone
it's ok, you can type here if you need to ask questions.
Do you have a python environment set up?
Thank you 🙂
np
Python Enhancement Proposals (PEPs)
No. So what are we discussing about?

Well a sub-pattern could be any substring of the regex pattern that happens to also be a valid regex pattern.
😭
👋 Hemlock
@leaden drift You're missing all the fun
Were are here every Tuesday + Thursday 4pm UTC -6pm UTC
I think to master regex read regex python documentation
except ValueError:
@lime granite
Wilson on New Years Eve at Madison Square Garden. Schoeps Audio
I do remem,ber phish, I never really followed their music
@fresh sail I do not know that song.
Popped my Cherry on that 1 lol
How old is old?
i need moeny
money*
i have to go bye
What is this assignment about?
Pyip library handles all the possible from user input validations?
let's see if I have that
Quite a few of them
I don't think I have that, but I do have django design patterns and best practices
from flask import Flask, redirect
app = Flask(__name__)
new_url = 'http://amir.rachum.com'
@app.route('/')
def root():
return redirect(new_url, code=301)
@app.route('/index.html')
def anypage(page):
return redirect('{new_url}/{page}'.format(page=page, new_url=new_url),
code=301)
if __name__ == '__main__':
app.run(host='10.0.1.10', port=5000)```
so i have this code i would like o use redirect with virtual host so it redirects me to the main index.html
it is ok.
@lone bronzecan you hear us?
Can I watch you
yes
I have work
@empty wadi over here
py -m pip install pyinputplus
@unreal prairie https://automatetheboringstuff.com/2e/chapter8/
!code
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.
@unreal prairie try sudo apt install python3-pip
debian by default doesn't come with pip installed
4pm utc - 6pm utc
try running curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py && python3 get-pip.py --force-reinstall
this should reinstall pip properly for you then try installing pip3 install pyinputplus again
import pyinputplus as pyip
while True:
print("Enter your age: ")
age = input()
try:
age = int(age)
except:
print("Please use numeric digits. ")
continue
if age < 1:
print("Please use numeric digits.")
continue
break
print(f"Your age is {age}.")
Output should be
Enter your age:
37
Your age is 37.
Process finished with exit code 0
@unreal prairie
@smoky basin and @elfin aspen ask questions here...
@mellow epoch django has validators built in but there's also just simply taking in passwords, usernames, emails in user registration at all
like that's how websites show you how weak your password is
ok
import re
string = "Some text loren i do not know at 12:00 AM you shall know, at 01:00 PM you'll know next year shall be 1960"
timepattern = "\d+:\d+ [a-zA-Z]+"
time = re.findall(timepattern, string)
print(time)
result ['12:00 AM', '01:00 PM']
import re
string = "Some text loren i do not know at 12:00 AM you shall know, at 01:00 PM you'll know next year shall be 1960"
timepattern = "\d+:\d+ [a-zA-Z]+"
time = re.findall(timepattern, string)
yearpattern = "\d{4}"
year = re.findall(yearpattern, string)
print(year)
print(time)
Returns
['1960']
['12:00 AM', '01:00 PM']
like majority of the user base
!help stream
!stream <member> [duration]
Can also use: streaming
*Temporarily grant streaming permissions to a member for a given duration.
A unit of time should be appended to the duration. Units (∗case-sensitive):
y - years
m - months∗
w - weeks
d - days
h - hours
M - minutes∗
s - seconds
Alternatively, an ISO 8601 timestamp can be provided for the duration.*
!stream 455720889196216331 15M
✅ @trim pelican can now stream until <t:1653661130:f>.
!stream 713431503610183760 15y
✅ @primal bison can now stream until <t:2127045850:f>.
simp
Anyone up for codingame?
simp huge simp
touch grass
and?
🙂
Yo!
Wat
kalm down
guys can you please tag me or smth
imma work first
you did @primal bison
o/
lmao
trudat
hahahah
cancelledt
but we don't follow the same amendments tho
we are not from the same country.

obseeneetey
👋
freedom of speech is not absolute.
but you can actually call someone stupid
that's basically an opinion
!unstream 713431503610183760
❌ This member doesn't have video permissions to remove!
@primal bison's stream has been suspended!
hahahaha
@rocky charm super secure
lmao
can someone refresh me what do you call this code x[:-1]
@coarse hollow you wrote this
Ah right.
It's return the array except n
Im workin
maybe next time?
lol
@coarse hollow a[start:end]
python is weird. but syntactically functional
nah
does someone know how to custom a function
.help
Hey
hey
Hi
Hello
"Spam" is a Monty Python sketch, first televised in 1970 and written by Terry Jones and Michael Palin. In the sketch, two customers are lowered by wires into a greasy spoon café and try to order a breakfast from a menu that includes Spam in almost every dish, much to the consternation of one of the customers. As the waitress recites the Spam-fil...
@worthy shore you can talk to us here.
@worthy shore Check out the #voice-verification channel
That'll tell you what you need to know
i mean my mic dont work on my coputor
Ah, that makes more sense
Apologies
wait the browser can be heard while sharing whole screen?
I wanna be able to do that kekw
ohh Stereo Mix?
Issue with Stereo Mix was that even Discord voices are relayed back
VoiceMeeter Potato, the Ultimate Virtual Audio Mixer for Windows
for mixing input devices
like chmod +x ./script.py would make it executable
Seems like the voice verification bot is outputting nothingness .-.
it prolly only checks the files and not the dirs
Carry on
with open("file") as file:
dump = file.read()
file = open("file")
dump = file.read()
file.close()
👀 file.read().splitlines()
How to use DU command in python?
?? 😮 du is a unix utility not a python function as far as i know
I think he means by using subprocesses or os.popen
Yes
server@server-VirtualBox:~/Desktop/backupdestination/2022/05/30$ du
204 ./client1
4 ./client2
212 .
size = subprocess.check_output(['du', path]).split()[0].decode('utf-8')
print("Directory size: ",size )
The output i am getting for this is 212
How can i loop and print 204,4,212?
shutil.disk_usage(path)```
Return disk usage statistics about the given path as a [named tuple](https://docs.python.org/3/glossary.html#term-named-tuple) with the attributes *total*, *used* and *free*, which are the amount of total, used and free space, in bytes. *path* may be a file or a directory.
New in version 3.3.
Changed in version 3.8: On Windows, *path* can now be a file or directory.
[Availability](https://docs.python.org/3/library/intro.html#availability): Unix, Windows.
look if you can use this instead ^
this would work on both windows and mac and won't require starting a shell session for it
Theoretical ecology is the scientific discipline devoted to the study of ecological systems using theoretical methods such as simple conceptual models, mathematical models, computational simulations, and advanced data analysis. Effective models improve understanding of the natural world by revealing how the dynamics of species populations are of...
The Flynn effect is the substantial and long-sustained increase in both fluid and crystallized intelligence test scores that were measured in many parts of the world over the 20th century. When intelligence quotient (IQ) tests are initially standardized using a sample of test-takers, by convention the average of the test results is set to 100 an...
Ecological-evolutionary theory (EET) is a sociological theory of sociocultural evolution that attempts to explain the origin and changes of society and culture. Key elements focus on the importance of natural environment and technological change. EET has been described as a theory of social stratification, as it analyzes how stratification has c...
one sec
I want to read this now
plz unmute me
plzzzzzzzzzzzzzzzzzz unmute me
you fuckeres
fuck you
unmute me
UNMUTE
what
👍
🤣 🤣 bro chill out
uh hi?
cargo fmt
I've found a really cool way to make pure python executables (.exe) for windows!
- python executable zipapps: https://youtu.be/HfL2s2JySos
- shebang explanation: https://youtu.be/g3VxRdtlMoE
playlist: https://www.youtube.com/playlist?list=PLWBKAf81pmOaP9naRiNAqug6EBnkPakvY
==========
twitch: https://twitch.tv/anthonywritescode
dicsord: https...
He's so stoked to help you make a native application
^ this lets you do it without any library
Ok thnks I will check this out
nooo use the thing hemlock sent
the think i linked is going to be super inconvenient
its just an interested hack i wanted to share
ohk
@void torrent https://www.youtube.com/watch?v=xezYYBL7nk0&t
Russell Keith-Magee
http://2017.pycon-au.org/schedule/presentation/45/
#pyconau
This talk was given at PyCon Australia 2017 which was held from 3-8 August, 2017 in Melbourne, Victoria.
PyCon Australia is the national conference for users of the Python Programming Language. In August 2017, we're returning to Melbourne, bringing together stude...
You can use their cookie cutter to start, watch the video for more information.
By this will I be enable to to share with others like a application
yes
and if python or that modules not installed in his system will it work?
yes, that's the whole point.
ohk thnks for this
