#voice-chat-text-0
1 messages ยท Page 229 of 1
whereas that one is x86-64
it still needs to be open enough for air to circulate
brb
is 10.6K representing XP?
Experience
10.6K (L44)
you can also rebrand Level to something
(custom game level)
two main bots I maintain only support prefix commands
import math
def level_for_xp(xp, base=2, scaling_factor=50):
return int(math.log(xp / scaling_factor, base))
# Example usage:
xp_amount = 400
resulting_level = level_for_xp(xp_amount)
print(f"{xp_amount} XP corresponds to Level {resulting_level}")
2 might be a bit too high
I'd prefer something around 1.072 -- 10 levels for doubling
[Running] python -u "c:\Users\pc\Desktop\stock_price_prediction_application-master\app.py"
100 XP corresponds to Level 1
[Done] exited with code=0 in 0.066 seconds
[Running] python -u "c:\Users\pc\Desktop\stock_price_prediction_application-master\app.py"
300 XP corresponds to Level 2
[Done] exited with code=0 in 0.068 seconds
[Running] python -u "c:\Users\pc\Desktop\stock_price_prediction_application-master\app.py"
400 XP corresponds to Level 3
[Done] exited with code=0 in 0.067 seconds
!e
import math
def level_for_xp(xp, base=2, scaling_factor=50):
return int(math.log(xp / scaling_factor, base))
xp_amount = 40000000000000000000000000000000000
resulting_level = level_for_xp(xp_amount)
print(f"{xp_amount} XP corresponds to Level {resulting_level}")
@vocal basin :white_check_mark: Your 3.12 eval job has completed with return code 0.
40000000000000000000000000000000000 XP corresponds to Level 109
as far as I've seen, quadratic seems more widespread than exponential
Bit tinny
@vocal basin can you express that as math
TeX?
I have an intrrest in logrimic function for xp
base and scaling_factor just influence how the output gets transformed linearly
math.log(xp / scaling_factor, base)
math.log(xp / scaling_factor) / math.log(base)
(math.log(xp) - math.log(scaling_factor)) / math.log(base)
scaling_factor defines where 0 is in the source space
and base defines the scale
The logarithm is just like, the number of times you need to repeatedly divide a number by the base to get to 1.
how wide is !e output allowed to be?
ยฏ_(ใ)_/ยฏ
I have 160 in plotting code I have saved
!e
print(*("".join(" #"[abs(__import__('math').log(x/80+2)+y*.05)<.05]for x in range(-80,81))for y in range(-25, 5)),sep="\n")
@vocal basin :white_check_mark: Your 3.12 eval job has completed with return code 0.
001 |
002 |
003 |
004 | ############
005 | #######################
006 | ######################
... (truncated - too long, too many lines)
Full output: https://paste.pythondiscord.com/4H3DMUQZ7WPDNWXEFQMWJSZYS4
@vocal basin chess?
wait, responding for work
okay
here
!e
import math
def level_for_xp(xp, base=1.072, scaling_factor=50):
return int(math.log(xp / scaling_factor, base))
xp_amount = 10600
resulting_level = level_for_xp(xp_amount)
print(f"{xp_amount} XP corresponds to Level {resulting_level}")
@rapid chasm :white_check_mark: Your 3.12 eval job has completed with return code 0.
10600 XP corresponds to Level 77
base: output scaling
scaling_factor: input scaling
It might be easier to reason about: py int(factor * math.log10(xp)) math.log10(xp) is just the number of digits in xp.
!e
import math
def level_for_xp(xp, base=1.5, scaling_factor=50):
return int(math.log(xp / scaling_factor, base))
for x in range(100, 10000, 25):
xp_amount = x
resulting_level = level_for_xp(xp_amount)
print(f"{xp_amount} XP corresponds to Level {resulting_level}")
``
@mystic lily :x: Your 3.12 eval job has completed with return code 1.
001 | File "/home/main.py", line 1
002 | `
003 | ^
004 | SyntaxError: invalid syntax
what time control?
!e```
import math
def level_for_xp(xp, base=1.5, scaling_factor=50):
return int(math.log(xp / scaling_factor, base))
for x in range(100, 10000, 25):
xp_amount = x
resulting_level = level_for_xp(xp_amount)
print(f"{xp_amount} XP corresponds to Level {resulting_level}")
@mystic lily :white_check_mark: Your 3.12 eval job has completed with return code 0.
001 | 100 XP corresponds to Level 1
002 | 125 XP corresponds to Level 2
003 | 150 XP corresponds to Level 2
004 | 175 XP corresponds to Level 3
005 | 200 XP corresponds to Level 3
006 | 225 XP corresponds to Level 3
007 | 250 XP corresponds to Level 3
008 | 275 XP corresponds to Level 4
009 | 300 XP corresponds to Level 4
010 | 325 XP corresponds to Level 4
011 | 350 XP corresponds to Level 4
... (truncated - too many lines)
Full output: https://paste.pythondiscord.com/OIXGLTRVNMQDMBJSL6OYT4CZWQ
means
5|0? 1|0? 3|2?
!e
def level_for_xp(xp, base=1.1, scaling_factor=100):
return int(math.log(xp / scaling_factor, base))
for x in range(100, 10000, 15):
xp_amount = x
resulting_level = level_for_xp(xp_amount)
print(f"{xp_amount} XP corresponds to Level {resulting_level}")
@mystic lily :white_check_mark: Your 3.12 eval job has completed with return code 0.
001 | 100 XP corresponds to Level 0
002 | 115 XP corresponds to Level 1
003 | 130 XP corresponds to Level 2
004 | 145 XP corresponds to Level 3
005 | 160 XP corresponds to Level 4
006 | 175 XP corresponds to Level 5
007 | 190 XP corresponds to Level 6
008 | 205 XP corresponds to Level 7
009 | 220 XP corresponds to Level 8
010 | 235 XP corresponds to Level 8
011 | 250 XP corresponds to Level 9
... (truncated - too many lines)
Full output: https://paste.pythondiscord.com/2NQRZOGNO2MIRYQ2HJOKNWRKWE
5|0
Using log10, this is equivalent to roughly py int(5.68 * math.log10(xp) - 9.65) I.e. take the number of digits, multiply by 5.68, subtract 9.65, then round down.
Join the challenge or watch the game here.
one min
Just to try to give some intuition into the calculation ๐
xp_increase = random.randint(15, 20)
await collection.bulk_write([
UpdateMany(
{
"discord_id": {"$in": team_member_ids},
"last_activity": {"$lt": time_threshold}
},
{
"$set": {"last_activity": discord.utils.utcnow()},
"$inc": {"games_played": 1, "experience": xp_increase}
}
)
])
!stats
there are reasons to store
specifically if you decide to change the algorithm
so that levels don't get reset
print(level)
!e
def experience_to_level(experience):
# Define the base experience needed for the first level
base_exp = 100
# Calculate the level based on the experience
level = 0
while experience >= base_exp:
level += 1
experience -= base_exp
# Increase the base experience for the next level
base_exp *= 1.1
return level
experience = 25
level = experience_to_level(experience)
print(level)
@rapid chasm :white_check_mark: Your 3.12 eval job has completed with return code 0.
0
!e
def experience_to_level(experience):
# Define the base experience needed for the first level
base_exp = 50
# Calculate the level based on the experience
level = 0
while experience >= base_exp:
level += 1
experience -= base_exp
# Increase the base experience for the next level
base_exp *= 1.072
return level
experience = 100
level = experience_to_level(experience)
print(level)
!e
def experience_to_level(experience):
# Define the base experience needed for the first level
base_exp = 35
# Calculate the level based on the experience
level = 0
while experience >= base_exp:
level += 1
experience -= base_exp
# Increase the base experience for the next level
base_exp *= 1.072
return level
experience = 200
level = experience_to_level(experience)
print(level)
@rapid chasm :white_check_mark: Your 3.12 eval job has completed with return code 0.
4
it may also be a mix of quadratic and exponential
gg
@vocal basin finally figured it out
there is a special dunder method called __name__ for each cls object
doing something like this returns you and empty object with the same attributes as the class instance itself
def create_dummy_class(cls, **kwargs):
dummy = cls.__name__(cls)
print(dummy.__dict__) # will be initally empty dict
dummy.update(**kwargs) # from x10x4n solution
return dummy
the update function from @warm jackal
def update(self, **kwargs):
approved_attrs = set('id', 'foo', 'bar', 'baz') # Not 100% sure if I remember how to instantiate a set correctly
update_values = {
attr_name: attr_value,
for attr_name, attr_value
in **kwargs # Or `kwargs.items()`
if attr_name in approved_attrs
}
for name, value in update_values.items():
setattr(self, name, value)
hope this helps @vocal basin
!e
def experience_to_level(experience):
# Define the base experience needed for the first level
base_exp = 50
# Calculate the level based on the experience
level = 0
while experience >= base_exp:
level += 1
experience -= base_exp
# Increase the base experience for the next level
base_exp *= 1.072
return level
level = experience_to_level(600)
print(level)
@rapid chasm :white_check_mark: Your 3.12 eval job has completed with return code 0.
8
Elo rating is a logarithm of performance, in some sense
(difference corresponds to the logarithm of score ratio)
200 points is 1:2, iirc
(I might be way off on that)
((I was off on that))
* 120 points
in **kwargs seens unlikely to work
:O
yeap you are right
should be kwarg.items() works
I am Hemlock zombie
?
Wait that's STILL in early access?
yes and there's still nothing you can do in the game other than die
Kind of like real life
base_exp * level + 10 * level
@rapid chasm :white_check_mark: Your 3.12 eval job has completed with return code 0.
4
15-25 random for each game
gambling journey
are you on mobile UI?
it shows all without speaking priveleges as server muted
Huh I've seen you talk before though
also Bandstand is rendered with a text channel icon
it probably was before March
brb my windows explorer bugged out while i was in fullscreen in vm ๐ฆ gotta restart
what? i just rejoined
@rapid chasm did you say you own a warehouse? i'm a bit confused
Warehouse worker rather than owner
xD
yes ik opalmist
# Create a new Embed object
embed = discord.Embed(title=f"{summoner_name} #{tagline}'s stats", timestamp=datetime.datetime.now(), color=discord.Color.blue())
# Add the relevant information to the Embed object using the add_field method
embed.add_field(name="Level", value=f'{summoner_level}', inline=True)
embed.add_field(name="Solo/DuoQ", value=f'{tier_and_rank}', inline=True)
embed.add_field(name="Estimated Elo", value=f'{elo_rating}', inline=True)
if winrate:
embed.add_field(name="Win/Loss", value=f'{wins}/{losses}', inline=True)
embed.add_field(name="Win Rate", value=f'{winrate}%', inline=True)
embed.add_field(name="Experience", value=f'{experience} (L{level})', inline=True)```
\200b
embed.add_field(name="Server Stats", value=f'\200b', inline=false)
\u200B
embed.add_field(name="Server Stats", value='\u200b', inline=false) NameError: name 'false' is not defined
embed.add_field(name='\u200b', value='\u200b', inline=False)
# Add the relevant information to the Embed object using the add_field method
embed.add_field(name="Level", value=f'{summoner_level}', inline=True)
embed.add_field(name="Solo/DuoQ", value=f'{tier_and_rank}', inline=True)
embed.add_field(name="Estimated Elo", value=f'{elo_rating}', inline=True)
if winrate:
embed.add_field(name="Win/Loss", value=f'{wins}/{losses}', inline=True)
embed.add_field(name="Win Rate", value=f'{winrate}%', inline=True)
embed.add_field(name='\u200b', value='\u200b', inline=False)
embed.add_field(name="Server Stats", value=f'\u200b', inline=False)
embed.add_field(name="Level", value=f'{level}', inline=False)
embed.add_field(name="Experience", value=f'{experience}', inline=False)```
embed.add_field(name='\u200b', value='\u200b', inline=False)
embed.add_field(name="Server:", value=f'\u200b', inline=False)
embed.add_field(name="Level", value=f'{level}', inline=True)
embed.add_field(name="Experience", value=f'{experience}', inline=True)
!voice
Canโt talk in voice chat? Check out #voice-verification to get access. The criteria for verifying are specified there.
lmao
still working on embeds i see.
is there a way to see my progress on getting voice perms?
How's it coming along @rapid chasm
!voice
Canโt talk in voice chat? Check out #voice-verification to get access. The criteria for verifying are specified there.
If you do !user in #bot-commands, you can see your stats
thanks man
hey supp guys
im very new to programming and thought of learning python whats ur opinion?
also is cs50 worth it?
no opinion
It's a great first language in my opinion.
quack quack im dave
cs50 is a nice introduction yes but it does not focus on a single language and goes through a bunch so it might also help you decide whether you wanna start with a low level language like c or a high level langauge like python
There's a Python CS50 now
oh ๐ฎ
oh thanks mate
Cutey pootie
pootie?
u gotta be careful with them embeds, other wise might end up sending one that has a avatar like this 
The implication is that you're gassy
oh is it for beginners?
As in "Pootie tang" ?
I need help is anyone available in dms?
i still think the general one is good since it goes through both python and c
i think starting with either have their own benifits
starting with c comes with a more fundamental understanding of how your programs work but it takes alot more code to write more basic stuff so it can also feel boring at start
starting with python gives you a really fast start as the language itself is easy and safe, and it lets you build out programs with gui, etc with very little code and understanding of how the thing works so it can be great to keep you motivated early on
I hate how cs50 starts with scratch though ๐ฆ
#โ๏ฝhow-to-get-help @whole bear
hoe was right the first time ๐คฃ
is it neccesary to really start with scratch
i do agree that is a bit annoying but they are trying to make it a bit more visual for the viewer at the same time so i also understand why they did it
no not at all
That's an x from me dawg
this is why you never ask for opinions from devs
either ways its perfectly good to start with python and do the python cs50 that @wind raptor is talking about, but i do recommend later when you're proficient at python i recommend also learning a lower level language as it will give you a deeper understanding of how your programs work :3
oh i see ,do i really need to pay for the certificate
my college is teaching c so ithink it would be good to start with the og cs50
do you? i've only gone through cs50 to review the code for a friend who was about to do it so i never bothered to think about the certificate
Yeah, you do have to pay for it I think
But I wouldn't
It's not going to mean anything to an employer
i think having a harvard certificate in my portfolio is good
uhhhh is that safe to post here?
like they dont care?
it's an intro cert though, it doesn't really mean that you know the languages well
if you have a c course in collage then self-learning and making small projects will indeed give you a really good headstart vs most people in your batch
if you are interested in python though there's nothing wrong with learning another programming language specially with python being really useful for scripting and automating repetetive tasks on a computer as well
and the base concepts are the same in each language just the words / syntax for it is what defers
im not gonna make a mess by learning two languages at a time
I could be wrong, but I don't think CS50 holds a lot of weight.
I only put certs on my linkedIn anyways, not on my resume.
It's hard enough to keep it to one page
then since you're already doing a C course you can just learn C first ig
ok thats what im saying any good yt video for c?
@gentle flint https://sfml-dev.org/
@woeful salmon song made using AI voices - https://www.youtube.com/watch?v=Dipn2fsT1TQ
what a time to live in
heard my name?
Doing good
Zed
*render lib
I'd say chromebooks are less unlocked than windows/macs
Google sheets just work, thats it
Chromebooks are less usable than regular pcs
All in all chromebooks are a nightmare
@woeful salmon ever tried hyprland?
Oh, nah ๐
Oh, okay. I switched from i3 to hyprland recently myself
Cool
XD
hey do you guys know how to install pygame in VS code?
How do u think you would do it.
XD
If I'm allowed to say, the second one is a little out of place, no?
I mean the color selection
Yea
No no. Just the colors
Um
How about a lighter shade of grey?
Yes, the green is fine. Just replace the light green. Say #1A1A1A?
Yes, second one is better
Wait
OOH, my bad. In my head it sounded like light grey ๐
Yes, on it
#a7ab9f
Could you check that one? Not entirely sure about it though.
Um, I think the previous one was better.
The lightness here is perfect imo
No, the recent one.
Yes the one you just posted
I don't think so
How would your empty progress bar look?
Mostly bg with a tinge of the green?
Yes, that looks good too
Can you use the same colors from this one please?
you just have to draw pixels with decreasing brightness
and add a 1px bright line on top for highlight
@gilded rivet
did you just try to bribe me lol
help !== spoonfeed
forgive me ive been doing javascript
beautiful button ๐
@rugged root
https://www.youtube.com/watch?v=5wAlQf4WdiE
Willy Wonka & the Chocolate Factory movie clips: http://j.mp/2ihVyyo
BUY THE MOVIE: http://bit.ly/2hAlh58
Don't miss the HOTTEST NEW TRAILERS: http://bit.ly/1u2y6pr
CLIP DESCRIPTION:
Veruca (Julie Dawn Cole) breaks into song to let everyone know about her insatiable desires.
FILM DESCRIPTION:
Enigmatic candy manufacturer Willy Wonka (Gene Wild...
He means this, right @rapid chasm ?
A bit less than a dash
hey
Never forget
The speed at which application instructions are processed on a system is proportionate to the number of access operations required to obtain data outside of program-addressable memory.
lol
<small>nevermind...</small>
@gilded rivet Thank you 

- Have 50 messages in the server
- Have been in the server for 3 days
- Have messages from three different ten-minute blocks
I'll be back later, my brain is just failing
world domination via firefox
adult males wearing furry outfits
sorry guys
as/400
RPG is a high-level programming language for business applications, introduced in 1959 for the IBM 1401. It is most well known as the primary programming language of IBM's midrange computer product line, including the IBM i operating system. RPG has traditionally featured a number of distinctive concepts, such as the program cycle, and the colum...
f(x) = $x^3+(p+1)x^2-18x+q$
factors are (x-4) and (x-p)
question: show that $p^2+18p+q$
.latex f(x) = $x^3+(p+1)x^2-18x+q$
factors are (x-4) and (x-p)
question: show that $p^2+18p+q = 0$
.latex f(x) = $x^3+(p+1)x^2-18x+q$
factors are (x-4) and (x-p)
question: show that $p^2+18p+q = 0$
Inherited from GX2, the TEAMGROUP AX2 2.5โ SSD has features of low power consumption, high-speed transfer, etc. The SLC Caching technology makes the read/write speed of AX2 4 times faster than traditional hard drives. In addition, the Wear-Leveling and ECC can enhance reliability and prolong serv...
.latex f(x) = $x^3+(p+1)x^2-18x+q$
factors are (x-4) and (x+p)
question: show that $p^2+18p+q = 0$
class Role:
def __init__(self, name):
self.name = name
def __str__(self):
return self.name
class Roles:
def __init__(self, src, aux, des):
self.src = Role(src)
self.aux = Role(aux)
self.des = Role(des)
def swap(x, y):
x.name, y.name = y.name, x.name
def print_step(step, src, des):
print(f"\t\t\t Step {step}: Move from {src} to {des}")
class Solution:
def __init__(self, units, src = 'A', aux = 'B', des = 'B'):
self.units = units
self.roles = Roles(src, aux, des)
def solve(self):
roles = self.roles
units = self.units
src, aux, des = roles.src, roles.aux, roles.des
case = 0
binary = 0
height = units
for step in range(1, 2 ** units):
case %= 4
if case == 0:
self.top(height)
print_step(step, src, des)
swap(aux, des)
binary += 1
if case == 1:
print_step(step, src, des)
swap(src, aux)
if case == 2:
self.top(1)
print_step(step, src, des)
def top(self, height):
roles = self.roles
src = roles.src
aux = roles.aux
des = roles.des
i = height
while (i >= 1):
print("Destination is: ", des)
print(f"Towers ({src}, {des}, {aux})")
swap(aux, des)
i -= 1
swap(aux, des)
!paste
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 Paste! button in the bottom left, or by pressing CTRL + S. After doing that, you will be navigated to the new paste's page. Copy the URL and post it here so others can see it.
Destination is: B
Towers (A, B, B)
Destination is: B
Towers (A, B, B)
Destination is: B
Towers (A, B, B)
Step 1: Move from A to B
Step 2: Move from A to B
Destination is: B
Towers (B, B, A)
Step 3: Move from B to B
Step 4: Move from B to B
Destination is: B
Towers (A, B, B)
Destination is: B
Towers (A, B, B)
Destination is: B
Towers (A, B, B)
Step 5: Move from A to B
Step 6: Move from A to B
Destination is: B
Towers (B, B, A)
Step 7: Move from B to B
this
evening
Beware of the scammers
You using Django Haven?
MADE IN HEIGHTS - Forgiveness
โฌ FAVOURITES ON SPOTIFY โฌ
โฅ http://mrsuicidesheep.com/favourites
This is one of the best songs I have heard this year!
Download their new album.. http://bit.ly/1FAfQHb
MADE IN HEIGHTS
https://soundcloud.com/madeinheights
http://madeinheights.com
https://www.facebook.com/MADEINHEIGHTS
https://twitter.com/madeinh...
@bronze kernel ๐
Django ( JANG-goh; sometimes stylized as django) is a free and open-source, Python-based web framework that follows the modelโtemplateโviews (MTV) architectural pattern. It is maintained by the Django Software Foundation (DSF), an independent organization established in the US as a 501(c)(3) non-profit.
Django's primary goal is to ease the creat...
@kindred marsh ๐
๐
distributed django
##result =(vector16 + vector32) % math.floor(3.14159 ** 5) / (X) <<< whats this?
!e
print(int(3.14159 ** 5))
@vocal basin :white_check_mark: Your 3.12 eval job has completed with return code 0.
306
thank you
math.floor(3.14159 ** 5) should always be 306
idk for everything else
/ (X) part is weird
isn't it just dividing the result operation by x if x is a scalar?
yes but
- mixing
%and/ - extra parentheses
- capital letter sugests it's a constant
so in other words, would this make more sense?
result = (vector16 + vector32) % math.floor(3.14159 ** 5) / X
right.
X = np.random.rand(100, 10)
bitwise precedence is hard
and the output is in range [0,306/X)
how is the accuracy measured?
but i broke the code alongthe way with no git commits :\
one of the lines i deleted had that function
"C:/Program Files/JetBrains/PyCharm 2023.1.3/plugins/python/helpers/pydev/pydevconsole.py" --mode=client --host=127.0.0.1 --port=58831
import sys; print('Python %s on %s' % (sys.version, sys.platform))
sys.path.extend(['C:\Users\username\PycharmProjects\scientificProject'])
PyDev console: starting.
Python 3.10.13 | packaged by Anaconda, Inc. | (main, Sep 11 2023, 13:24:38) [MSC v.1916 64 bit (AMD64)] on win32
runfile('C:\Users\user\PycharmProjects\scientificProject\main.py', wdir='C:\Users\user\PycharmProjects\scientificProject')
Accuracy: 0.40
๐ฆ
40% there but it was getting better
@whole bear @whole bear ๐
0.40 is worse than random
though, maybe not
the comment in code is incorrect
if it was, as the comment states, 0 or 1, then 50% would be like random
for [0;2], 33% might be the random result
@woven bough ๐
ah
hey buddy ๐
nvm, numpy's randint is not like random's randint
am i doing any good?
!d numpy.random.randint
random.randint(low, high=None, size=None, dtype=int)```
Return random integers from *low* (inclusive) to *high* (exclusive).
Return random integers from the โdiscrete uniformโ distribution of the specified dtype in the โhalf-openโ interval [*low*, *high*). If *high* is None (the default), then results are from [0, *low*).
Note
New code should use the [`integers`](https://numpy.org/devdocs/reference/random/generated/numpy.random.Generator.integers.html#numpy.random.Generator.integers) method of a [`Generator`](https://numpy.org/devdocs/reference/random/generator.html#numpy.random.Generator) instance instead; please see the [Quick start](https://numpy.org/devdocs/reference/random/index.html#random-quick-start).
!d random.randint
random.randint(a, b)```
Return a random integer *N* such that `a <= N <= b`. Alias for `randrange(a, b+1)`.
[low,high) and [a,b]
@gentle goblet ๐
I doubt the way X and Y are generated would allow to achieve accuracy any significantly higher than 50%
there is no inherent correlation
and predicting random values is somewhat hard
!e
from random import randrange
from statistics import mean
print(mean(randrange(2) for _ in range(20)))
@vocal basin :white_check_mark: Your 3.12 eval job has completed with return code 0.
0.5
what you're getting is basically this
i see
X = np.random.rand(100, 10)
Y = X.sum(axis=1) > 5
(the program might achieve better accuracy with this as input)
just to check that it works at all
a = {1: 2, -2: 3}; b = a.keys(); print(b[0])
what will print?
Have you tried running the code?
The result may be variable depending on the Python version.
Yeah, itโs a mystery without running code
it is
since some version, keys have fixed order
But are they indexable?
well, that part will fail always
@worthy canopy @abstract gyro @hushed flume ๐
When I said variable, I meant as to the specific wording.
Because they've been changing that up.
it will give error in output. bcz dict does not support indexing
list(a.keys()) should be [1, -2]
(in latest versions, dict behaves mostly like OrderedDict)
It's not about the dict.
but you could convert it to a list right?
Yes.
he just ask what will be print. in order to correct that we just make it as list.
a = {1: 2, -2: 3}
b = list(a.keys())
print(b[0])
!e py a = {1: 2, -2: 3} b = a.keys() print(type(b)) print(b[0])My point.
@somber heath :x: Your 3.12 eval job has completed with return code 1.
001 | <class 'dict_keys'>
002 | Traceback (most recent call last):
003 | File "/home/main.py", line 4, in <module>
004 | print(b[0])
005 | ~^^^
006 | TypeError: 'dict_keys' object is not subscriptable
error bcz you are just checking type of the variable. to correct that you need to convert in list,tuple
Well aware.
x[1].append(2)
print(x)
what will be the output?
time to add even more confusion
Wut?
??
||[[1], [1]]||, I think (||because both elements are the same list||)
(2 not 1)
yeah was about to say
yes now correct
print(int("เงชเญจ")) requires too much knowledge to predict the output
because ||[[]] * 2 || || would make a list, that includes 2 references, to that same list ||
!e
print(f"{'':0เงชเญจ}")
@vocal basin :white_check_mark: Your 3.12 eval job has completed with return code 0.
000000000000000000000000000000000000000000
where else could non-ascii decimals be allowed?
@opal mantle ๐
!e
print(f"{'':{'':1<เงชเญจ}}")
@vocal 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 1, in <module>
003 | print(f"{'':{'':1<เงชเญจ}}")
004 | ^^^^^^^^^^^^^^
005 | ValueError: Too many decimal digits in format string
first time seeing this specific error
to long i guess for the specifier.
it's trying to pad it to the length of 10**42//9
@edgy saffron ๐
here เงชเญจ is unicode?
!e
print(int("เงชเญจ"))
@vocal basin :white_check_mark: Your 3.12 eval job has completed with return code 0.
42
thanks
because Python allows any decimal character to be used there, not only 0123456789
can you elaborate this
!charinfo เงชเญจ
\u09ea : BENGALI DIGIT FOUR - เงช
\u0b68 : ORIYA DIGIT TWO - เญจ
\u09ea\u0b68
ok i get it
@vocal basin do you know what is bengali and oriya?
iirc, two Indian languages
yes
(for Bengali I knew that, but wasn't sure about Oriya)
both are indian language
both are used in different different states of India
out of those I also recognise Gujarati and Telugu
(as names)
great
result = (lambda x: x + 1)(4) if (lambda x: x * 0)(2) else (lambda x: x * 3)(4)
print(result%2==1)
anyone ?
this whole time I have been reading articles on the web unaware you tagged me apologize for the lack in responses i didn't get any notifications until the voice chat pulled me in. with all due respect im new and grazing on the knowladge before i say anything i only know html and java from high school, with that howdy and i shut up now>
i wanna read a bunch of ips with the following pattern from regex
pattern = re.compile(r'(\d+\.\d+\.\d+\.\d+) - \[(.*?)\] "GET /projects/260 HTTP/1.1" (\d+) (\d+)')
the problem is in the first field am still reading invalid ips
<IP Address> - [<date>] "GET /projects/260 HTTP/1.1" <status code> <file size>
ips begining with larger values other than 255
777.62.69.251 - [2017-02-05 23:30:52.087970] "GET /projects/260 HTTP/1.1" 404 400
i think i have a problem with my first group but i have no idea of how i am supposed to capture ips within the range of 1-255.
it seem the pattern is right
!e
import re
log_entry = "777.62.69.251 - [2017-02-05 23:30:52.087970] \"GET /projects/260 HTTP/1.1\" 404 400"
match_pattern = re.compile(r'(\d+\.\d+\.\d+\.\d+) - \[(.*?)\] "GET /projects/260 HTTP/1.1" (\d+) (\d+)')
match = match_pattern.match(log_entry)
if match:
ip_address = match.group(1)
timestamp = match.group(2)
status_code = match.group(3)
response_size = match.group(4)
print(f"IP Address: {ip_address}")
print(f"Timestamp: {timestamp}")
print(f"Status Code: {status_code}")
print(f"Response Size: {response_size}")
else:
print("No match found.")
@modern yacht :white_check_mark: Your 3.12 eval job has completed with return code 0.
001 | IP Address: 777.62.69.251
002 | Timestamp: 2017-02-05 23:30:52.087970
003 | Status Code: 404
004 | Response Size: 400
001 | IP Address: 777.62.69.251 that's a wrong ip address
# this pattern help you for fetch correct ip
re.compile(r'^(25[0-5]|2[0-4]\d|1\d\d|[1-9]\d?|0)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]\d?|0)){3}$)
@modern yacht
use [1-255] instead of [\d+]
just to absorb knowledge for now then maybe later figure what my first task in learning is also adhd
!e
import re
log_entry = "777.62.69.251 - [2017-02-05 23:30:52.087970] \"GET /projects/260 HTTP/1.1\" 404 400"
# this pattern help you for fetch correct ip
match_pattern = re.compile(r'(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}) - \[(.*?)\] "GET /projects/260 HTTP/1.1" (\d+) (\d+)')
match = match_pattern.match(log_entry)
if match:
ip_address = match.group(1)
timestamp = match.group(2)
status_code = match.group(3)
response_size = match.group(4)
print(f"IP Address: {ip_address}")
print(f"Timestamp: {timestamp}")
print(f"Status Code: {status_code}")
print(f"Response Size: {response_size}")
else:
print("No match found.")
@modern yacht :x: Your 3.12 eval job has completed with return code 1.
001 | Traceback (most recent call last):
002 | File "/home/main.py", line 6, in <module>
003 | match_pattern = re.compile(r'^(25[0-5]|2[0-4]\d|1\d\d|[1-9]\d?|0)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]\d?|0)){3}$)')
004 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
005 | File "/lang/python/default/lib/python3.12/re/__init__.py", line 228, in compile
006 | return _compile(pattern, flags)
007 | ^^^^^^^^^^^^^^^^^^^^^^^^
008 | File "/lang/python/default/lib/python3.12/re/__init__.py", line 307, in _compile
009 | p = _compiler.compile(pattern, flags)
010 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
011 | File "/lang/python/default/lib/python3.12/re/_compiler.py", line 743, in compile
... (truncated - too many lines)
Full output: https://paste.pythondiscord.com/VWGWHIYN67WXMLPGZ3ZQ7OVWN4
!d re.escape
re.escape(pattern)```
Escape special characters in *pattern*. This is useful if you want to match an arbitrary literal string that may have regular expression metacharacters in it. For example...
r'(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})'
correction:
([1-2][0-5][0-5])
!e
import re
log_entry = "777.62.69.251 - [2017-02-05 23:30:52.087970] \"GET /projects/260 HTTP/1.1\" 404 400"
# this pattern help you for fetch correct ip
match_pattern = re.compile(r'(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}) - \[(.*?)\] "GET /projects/260 HTTP/1.1" (\d+) (\d+)')
match = match_pattern.match(log_entry)
if match:
ip_address = match.group(1)
timestamp = match.group(2)
status_code = match.group(3)
response_size = match.group(4)
print(f"IP Address: {ip_address}")
print(f"Timestamp: {timestamp}")
print(f"Status Code: {status_code}")
print(f"Response Size: {response_size}")
else:
print("No match found.")
portabellas ? jk
so to go from 0.0.0.0 to 255.255.255.255 would need
([0-2][0-5][0-5])\.([][][])\.([][][])...and so on
still the 777 invalid
import re
log_entry = '777.62.69.251 - [2017-02-05 23:30:52.087970] "GET /projects/260 HTTP/1.1" 404 400'
# Define the regular expression pattern for IPv4 address
ipv4_pattern = re.compile(r'\b(25[0-5]|2[0-4]\d|1\d\d|[1-9]\d?|0)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]\d?|0)){3}\b')
# Extract the IP address from the log entry
ip_match = re.search(ipv4_pattern, log_entry)
if ip_match:
ip_address = ip_match.group()
# Check if each part of the IP address is between 0 and 255
is_valid_ip = all(0 <= int(octet) <= 255 for octet in ip_address.split('.'))
if is_valid_ip:
print(f'Found valid IP address: {ip_address}')
print(f'Complete log entry: {log_entry}')
else:
print(f'Invalid IP address: {ip_address}')
else:
print('No valid IP address found in the log entry.')
!e
import re
log_entry = '777.62.69.251 - [2017-02-05 23:30:52.087970] "GET /projects/260 HTTP/1.1" 404 400'
Define the regular expression pattern for IPv4 address
ipv4_pattern = re.compile(r'\b(25[0-5]|2[0-4]\d|1\d\d|[1-9]\d?|0)(.(25[0-5]|2[0-4]\d|1\d\d|[1-9]\d?|0)){3}\b')
Extract the IP address from the log entry
ip_match = re.search(ipv4_pattern, log_entry)
if ip_match:
ip_address = ip_match.group()
# Check if each part of the IP address is between 0 and 255
is_valid_ip = all(0 <= int(octet) <= 255 for octet in ip_address.split('.'))
if is_valid_ip:
print(f'Found valid IP address: {ip_address}')
print(f'Complete log entry: {log_entry}')
else:
print(f'Invalid IP address: {ip_address}')
else:
print('No valid IP address found in the log entry.')
@kindred marsh :white_check_mark: Your 3.12 eval job has completed with return code 0.
No valid IP address found in the log entry.
!e
import re
log_entry = '77.62.69.251 - [2017-02-05 23:30:52.087970] "GET /projects/260 HTTP/1.1" 404 400'
Define the regular expression pattern for IPv4 address
ipv4_pattern = re.compile(r'\b(25[0-5]|2[0-4]\d|1\d\d|[1-9]\d?|0)(.(25[0-5]|2[0-4]\d|1\d\d|[1-9]\d?|0)){3}\b')
Extract the IP address from the log entry
ip_match = re.search(ipv4_pattern, log_entry)
if ip_match:
ip_address = ip_match.group()
# Check if each part of the IP address is between 0 and 255
is_valid_ip = all(0 <= int(octet) <= 255 for octet in ip_address.split('.'))
if is_valid_ip:
print(f'Found valid IP address: {ip_address}')
print(f'Complete log entry: {log_entry}')
else:
print(f'Invalid IP address: {ip_address}')
else:
print('No valid IP address found in the log entry.')
@kindred marsh :white_check_mark: Your 3.12 eval job has completed with return code 0.
001 | Found valid IP address: 77.62.69.251
002 | Complete log entry: 77.62.69.251 - [2017-02-05 23:30:52.087970] "GET /projects/260 HTTP/1.1" 404 400
Sorry gents, new to the server so can't talk apparently
right here with you
hah lol
yup lol
import re
log_entry = '77.62.69.251 - [2017-02-05 23:30:52.087970] "GET /projects/260 HTTP/1.1" 404 400'
# Define the regular expression pattern for IPv4 address
ipv4_pattern = re.compile(r'\b(25[0-5]|2[0-4]\d|1\d\d|[1-9]\d?|0)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]\d?|0)){3}\b')
# Extract the IP address from the log entry
ip_match = re.search(ipv4_pattern, log_entry)
if ip_match:
ip_address = ip_match.group()
# Check if each part of the IP address is between 0 and 255
is_valid_ip = all(0 <= int(octet) <= 255 for octet in ip_address.split('.'))
if is_valid_ip:
match_pattern = re.compile(r'(\d+\.\d+\.\d+\.\d+) - \[(.*?)\] "GET /projects/260 HTTP/1.1" (\d+) (\d+)')
match = match_pattern.match(log_entry)
ip_address = match.group(1)
timestamp = match.group(2)
status_code = match.group(3)
response_size = match.group(4)
print(f"IP Address: {ip_address}")
print(f"Timestamp: {timestamp}")
print(f"Status Code: {status_code}")
print(f"Response Size: {response_size}")
else:
print(f'Invalid IP address: {ip_address}')
else:
print('No valid IP address found in the log entry.')
@modern yacht check this
@mystic lily ^
bypassing i cloud locks but just hardqare wise as for coding no i am relearning
the most i have done was hello world lol and software exploits in the past
yup
i can do it on all devices made 2017 or older
its the 2018 forward that's the fun challenge
direction on where to start in learning path wise
im green as can be when it comes to py i have 2 versions downloaded
little bit
i studied html and java in high but its been 10 years since
gotchya
10 line projects and what was the second wa amking notes lol
A fun way to learn some of the more mid range ideas is to use codewars, they have some fun puzzels that get you brain working.
and thank you
I would send a link but not sure if I am allowed to so.
lol
you are checking twice, first for the ip pattern. Pretty cool how you searched for the ipv4 patter in the log entry.
nice you even did a split on so you can be able to explicitly check for each value of the ip passed
finally pass it to the original pattern again.
This is pretty cool thanks @kindred marsh
Aight, https://www.codewars.com/
i am about to start playing with esp32 stuff my it mentor is hooked and is getting me interested in them as well
thank you'
On an unrelated note, is anyone doing advent of code this year?
yes you are right, we can do in one pattern also but i need little bit time to do that. so, i just did this
Also i need to check for the status codes value also
you can do same like ip validation
# Create a new Embed object
embed = discord.Embed(title=f"", timestamp=datetime.datetime.now(), color=discord.Color.blue())
embed.set_author(name=f"{summoner_name} #{tagline}", icon_url=user.display_avatar.url)
# Add the relevant information to the Embed object using the add_field method
embed.add_field(name="General Information", value=f'Summoner Level: {summoner_level}\nEstimated Elo: {elo_rating}', inline=False)
# Prepare the "Ranked Stats" field
ranked_stats = f'Solo/DuoQ: {tier_and_rank}'
# Conditionally add the "Wins", "Losses", and "Win Rate"
if winrate:
ranked_stats += f'\nWins: {wins}'
ranked_stats += f'\nLosses: {losses}'
ranked_stats += f'\nWin Rate: {winrate}%'
# Add the "Ranked Stats" field to the Embed object
embed.add_field(name="Ranked Stats", value=ranked_stats, inline=False)
embed.add_field(name="Custom Stats",
value=f'Games Played: {games_played}\nXP: {experience}\nLevel: {level}\n{progress_bar}',inline=False)
import re
log_entry = '777.62.69.251 - [2017-02-05 23:30:52.087970] "GET /projects/260 HTTP/1.1" 404 400'
# Define the regular expression pattern for the entire log entry
combined_pattern = re.compile(r'(?:(25[0-5]|2[0-4]\d|1\d\d|[1-9]\d?|0)(?:\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]\d?|0)){3}) - \[(.*?)\] "GET /projects/260 HTTP/1.1" (\d+) (\d+)')
# Match the entire log entry
match = combined_pattern.match(log_entry)
if match:
ip_address = match.group(1)
# Check if each part of the IP address is between 0 and 255
is_valid_ip = all(0 <= int(octet) <= 255 for octet in ip_address.split('.'))
if is_valid_ip:
timestamp = match.group(3)
status_code = match.group(4)
response_size = match.group(5)
print(f"IP Address: {ip_address}")
print(f"Timestamp: {timestamp}")
print(f"Status Code: {status_code}")
print(f"Response Size: {response_size}")
else:
print(f'Invalid IP address: {ip_address}')
else:
print('No valid IP address found in the log entry.')
@modern yacht you can try this
{current_day} at {time}
vs
month/date/year at {time}
joining vc in discord makes all audio mono
bluetooth sucks
@rapid chasm you could use images for more aesthetics
yea a sec
the entire card is an image
it's listed in !kindling, so safe to send
!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.
better
You're good.
im back had to mute my self for a minute
question for voice verification do i have to meet all or one of the listed
All.
lol im one my self but mostly in games
only where it counts telling new people alt f4 for lots of money small stuff
off topic is irc dead or do you guys know
i used to hope in anon chat rooms back in the day for fun never could get hex chat to be noce like it used to be
hardest vc
aaahahhahqahhahahhahaha
what
!paste
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 Paste! button in the bottom left, or by pressing CTRL + S. After doing that, you will be navigated to the new paste's page. Copy the URL and post it here so others can see it.
@stoic cloud
https://pastecode.io/s/bpo1sm2x - the code doesent fully work but just on the structure or naming or other stuff
its suppose to be a notetaking app for now
Hey @eager thorn
Morning.
get the embed, looking the way u wanted?
Yeah pretty much
good deal.
@eager thorn
sweet
@junior heron #voice-verification
!voice
Canโt talk in voice chat? Check out #voice-verification to get access. The criteria for verifying are specified there.
@junior heron Talk in here so you can get your messages up, too
hi
!pypi auto-py-to-exe
What's the program you're trying to hide from view?
keyboard sound effect
malware.exe
Now I want to figure out if I can use strikethroughs in passwords on Windows
I shudder to think
I shudder for more than just thinking
Although spaces in passwords are super nice
Granted doesn't help a whole heck of a lot when it comes to dictionary attacks
But always good to pump up your char numbers
Being able to pwn the csvs is a nice trick though
People are lazy enough that it'll still work for a while
I wonder if I should put a tab char in there too just to screw with the folks using tsv as a workaround
ยฏ_(ใ)_/ยฏ
ยฏ\( " - __ -)/ยฏ
ยฏ_(ใ)_/ยฏ
ยฏ_(ใ)_/ยฏ
Kind of looks like it has buck teeth
f = open("D:\Programming\h.txt","w")
f.write("Hii \n I'mare creating a new file")
f.close()
i don't know why i'm getting FileNotFoundError: error. i'm using python 3.10.5
earlier didn't get this error but now it is coming.
can anyone help me out why it is coming now
Yeah, it only triggers on first word
Can you give the error and traceback?
with open(r"D:\Programming\h.txt", "w") as file:
file.write("Hii\nI'm creating a new file")
i did this already still same error coming
Can you give the error and traceback then? Is it pointing to a specific line?
Traceback (most recent call last):
File "d:\Programming\try.py", line 39, in <module>
with open(r"D:\Programming\h.txt", "w") as file:
FileNotFoundError: [Errno 2] No such file or directory: 'D:\\Programming\\h.txt'
Da fuq?
And you do have a d drive, right?
... yes you do
It's right there
Hemlock, seriously
yes
yes i did
And that worked?
same error coming
nope
Okay that's weird...
yes. haha i don't know why it is coming.
Wait, idea
from pathlib import Path
file_path = Path(r"D:\Programming\h.txt")
with open(file_path, "w") as file:
file.write("Trying to see if this writes, yo")
No idea if that'll make a difference
Although it's sounding more and more like a permissions issue
But that feels weird as well
yeah this will work.
same error
Can you make a new file on the c drive?
ok wait i try
Because my gut is telling me it's a permissions issue now
If THAT doesn't work
Then try opening a terminal as admin
Is your D drive plugged in?
Seeing if that makes a difference
Whatโs the food called @gentle flint?
yes
The script they're running is on the d drive
hey can i stream
Oh 
โ @whole bear can now stream until <t:1702404549:f>.
thank you
same error coming
Try running as admin then
It's not case sensitive right?
Correct. NTFS isn't case sensitive
For the path
soy fried rice
Wait are you doing all of these from the built in terminal in VS Code?
Try opening a new terminal window like PowerShell or something
okay wait
still same error
i don't why this error coming even i did everything right
Yeah, it's weird
And can you open up a PowerShell terminal as admin?
Then try once again. After that it'll honestly be me recommending rebooting the machine, as dumb as that sounds
yes
textuer pack
okay i will try this one also
and the command is called gal
as opposed to man
i have
wait
has_command() {
command -v "$1" &> /dev/null
}
get_command_pip() {
if has_command pip3.11; then
PIP=pip3.11
elif has_command pip311; then
PIP=pip311
elif has_command pip3; then
PIP=pip3
elif has_command pip; then
PIP=pip
else
get_command_python
if ! test -z "$PYTHON"; then
PIP="$PYTHON -m pip"
fi
fi
if ! test -z "$PIP"; then
set +e
$PIP install --break-system-packages &> /dev/null
if test "$?" -eq 1; then
PIP_INSTALL="$PIP install --break-system-packages"
else
PIP_INSTALL="$PIP install"
fi
set -e
echo "PIP_INSTALL=$PIP" >> log.out
echo "PIP=$PIP" >> log.out
fi
}
get_command_python() {
if has_command python3.11; then
PYTHON=python3.11
elif has_command python311; then
PYTHON=python311
elif has_command python3; then
PYTHON=python3
elif has_command python; then
PYTHON=python
elif has_command py3.11; then
PYTHON=py3.11
elif has_command py311; then
PYTHON=py311
elif has_command py3; then
PYTHON=py3
elif has_command py; then
PYTHON=py
fi
}```
still giving error
had to do this to make a portable installer script
Thinking
please. because i never get error like this before not even understood why it is coming.
I know, still thinking
don't use the run button
Can you open up the python shell/repl thing?
Try and see if you can open files that you specifically know exist that way
Or make files that way
Does excel have a QUERY function like google docs sheets?
powerquery, powershell, powerbi, powerpoint, powertools
who is in charge of naming projects in microsoft and what is their obsession with "power"
jquery
sorry i can't get it
websocket server or client?
Like in PowerShell or cmd, type in py and it'll bring up the repl
hey guys how do I install a module in vs studio
I can not figure this out
Module to Python?
Or how do you mean
so im looking in windows settings to see how a modal looks like
because im trying to make my ui look like it
so i click the forget button on my wifi
Yeah it says this when I try to install a library
pip : The term 'pip' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try
again.
yeah im unsure where to install through like terminal
py -m pip install <package_name_here>
If you're on Windows, that'll install it to your latest Python version
thank you
I have the basics and am trying to code something I could use to learn and couldn't even figure that out ๐ฆ
Those amounts feel weirdly specific
they probably get increased %-wise every few years w/ inflation
Fair point, didn't think of that
i'm kind of a little surprised that intuit is in canada
i tried but still same
Oh yeah, they have a free tier here that covers most people
Probably easier for them to support other places, honestly
Potentially less bullshit
does the average canadian use turbotax to file their taxes every year?
Oh wait, sorry, it's H&R block that has the free one
is it not one of those countries where payroll/gov't just does it for you?
is it because i installed 3.12 earlier? and i switch to 3.10?
Muh FCC petition docket: https://www.fcc.gov/ecfs/search/docket-detail/RM-11954
Federal Communication Commission Electronic Comment Filing System
Shouldn't....
Maybe uninstall your Python versions and reinstall the one you specifically need for right now
See if it's just some weird thing that way
Dude I hate this code highlighting
yes i'm also thinking to do this.
btw thankyou so much for giving me your time @rugged root
@rugged root share ur super script?
Faster performance, added interactive visuals and easier-to-read graphics expand this graphing calculator's classroom-proven ability to support inquiry and discovery. Built-in, Computer Algebra System (CAS) engine enables students to perform symbolic as well as numeric calculations. Integrated ma...
Keep running into an issue where when we're getting the financial statements, we're sometimes getting dupe names (Accounting CS makes me mad)
Just going to fix the file name manually
Just annoyed that I have to because of the dumb downloading
Yeah but you can't use that website as a self defense weapon
I do not like error handling in VBA
It feels so messy
I do not like this, the coder would say,
Handling errors in VBA, it ruins my day.
With 'On Error Resume Next,' I can't see,
Where the problem lies, it's a mystery to me.
don't believe everything he says @rugged root
i live "across the pond" from dubai
Yes, but this was the only good part.
bbl, got to do some stuff at home
not sure, I just joined
@whole bear dualingo probably will introduce it sooner or later: https://blog.duolingo.com/duolingo-max/
duolingo is a steaming pile of shit
why so?
(not that I wouldn't sell out and code for them)
Why do you think it is shit?
but so many people are using it? Why do you think people dont learn like this?
look up stephen krashen
a dog xD
be a D O double G
to me it is crazy how many people in the USA get addicted to drugs because of pain medication
I am using chatGPT and I KNOW i am getting dumber xD
I would raTher learn the 30 things but I agree, for example with grammar correction I am now becoming illiteral
But what if NeuraLink comes and we dont need to learn anymore xD
why is my code printing out the email 2x
Which high level have you reached @terse garden
ah I see thanks ๐
Can I make a controversial comment @terse garden xD?
I think "reaching the top" and "using it to learn" are different things @terse garden
ChatGPT invites you to be superficial
but you CAN definitely use it for learning as well but it is easy to abuse
At least you can in biochemistry xD there are like hundreds and thousands of unnecesasry results
@terse garden in computer science there are also a lot of mediocre publications
@whole bear I have studied biochemistry and biotech and I feel you xD
I worked in ML and there are papers were they literally have "just" changed some hyperparameters
BUT unfortunetly ...I CANT SPEAK xD so I have to right messages
I need a counter to see when my 50 messages are reached
do you know Alan Watts @whole bear ?
not really
he's not studied in academic philosophy
ah sadge, he is a philosohper but ye I guess not very studyable I guess. But I love his work
But it has less to do with Logic what he says so I guess thats why it is not really thought
Did you try to match email addresses with matches = re.findall(r'\b[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Z|a-z]{2,}\b', line) and using a set to avoid duplicates?
I finished learning
League is nice`? You are a mad man sir
Lies , lies, lies @whole bear nobody enjoys this game
5years
hmm they could be confusing addiction with enjoyment. that does happen with videogames
@junior marsh
it is like: "Losing: feel pain, Winning : feel nothing
### Code here ###
noun = input(" Noun: ")
verb = input("Verb:")
noun2 = input(" Noun: ")
noun3 = input(" Noun: ")
verb2 = input("Verb:")
noun4 = input(" Noun: ")
madlibs = (f'Hey welcome to my {noun}. Today we will be {verb} an experience about {noun2}. The important thing is to '
f'try and make the {noun3} last longer than the {noun4}, and make sure you are {verb2} aswell.')
print(madlibs) ###
@terse garden sorry, gtg, we can talk about this later. interesting topic
CODE HERE
noun = input(" Noun: ")
verb = input("Verb:")
noun2 = input(" Noun: ")
noun3 = input(" Noun: ")
verb2 = input("Verb:")
noun4 = input(" Noun: ")
madlibs = (f'Hey welcome to my {noun}. Today we will be {verb} an experience about {noun2}. The important thing is to '
f'try and make the {noun3} last longer than the {noun4}, and make sure you are {verb2} aswell.')
print(madlibs)
Have you used chatGPT to learn @junior marsh
no it is pretty good but only if you already know the language because sometimes you need to correct things.
So you are good with just learning the language first and then try it out . However it helps if you are blocked and maybe just overlooking some syntax because it will find it
so basically you just ask:
"What is wrong with the following code:
...."
and it will find out
ok
inputs = []
while len(inputs) < 6:
user_input = input(f"Enter input {len(inputs) + 1}: ")
if user_input:
inputs.append(user_input)
else:
print("Please enter a value.")
noun, verb, noun2, noun3, verb2, noun4 = inputs
madlibs = (f'Hey welcome to my {noun}. Today we will be {verb} an experience about {noun2}. The important thing is to '
f'try and make the {noun3} last longer than the {noun4}, and make sure you are {verb2} aswell.')
print(madlibs)```
!e py for letter in 'abc': print(letter)
@somber heath :white_check_mark: Your 3.12 eval job has completed with return code 0.
001 | a
002 | b
003 | c
!e py for iv in enumerate('abc'): print(iv)
@somber heath :white_check_mark: Your 3.12 eval job has completed with return code 0.
001 | (0, 'a')
002 | (1, 'b')
003 | (2, 'c')
!e py a, b = 1, 2 print(a) print(b)
@somber heath :white_check_mark: Your 3.12 eval job has completed with return code 0.
001 | 1
002 | 2
slightly refactored stuff from #code-help-voice-text
from itertools import pairwise
def missing_number(values): # I would put `-> str` here but discord hates it
for prev, next_ in pairwise(values):
expected = prev + 1
if expected != next_:
return f"Your missing number is {expected}"
return "No missing number"
print(missing_number(map(int, input().split(","))))
!e py for a, b in ((1, 2), (3, 4), (5, 6)): print(a) print(b)
@somber heath :white_check_mark: Your 3.12 eval job has completed with return code 0.
001 | 1
002 | 2
003 | 3
004 | 4
005 | 5
006 | 6
prev, next_ is syntax sugar for (prev, next_), in some sense
!e py for i, v in enumerate('abc'): print(i, v)
@somber heath :white_check_mark: Your 3.12 eval job has completed with return code 0.
001 | 0 a
002 | 1 b
003 | 2 c
!e
(a, b) = (1, 2)
@vocal basin :warning: Your 3.12 eval job has completed with return code 0.
[No output]
@vocal basin :white_check_mark: Your 3.12 eval job has completed with return code 0.
001 | 1
002 | 2
003 | (1, 2)
() are usually omitted in patterns
!e py a, (b, c) = 1, (2, 3) print(a) print(b) print(c)
@somber heath :white_check_mark: Your 3.12 eval job has completed with return code 0.
001 | 1
002 | 2
003 | 3
!e
a, (b, c) = 1, (2, 3)
print(a, b, c)
(a, b), c = (1, 2), 3
print(a, b, c)
a, b, c = 1, 2, 3
print(a, b, c)
@vocal basin :white_check_mark: Your 3.12 eval job has completed with return code 0.
001 | 1 2 3
002 | 1 2 3
003 | 1 2 3
nested patterns are rare, but they appear sometimes when you combine things like enumerate and pairwise
!e
from itertools import pairwise
values = ['a', 'b', 'c']
for i, (p, q) in enumerate(pairwise(values)):
print(i, p, q)
for (i, p), (j, q) in pairwise(enumerate(values)):
print(i, p, j, q)
@vocal basin :white_check_mark: Your 3.12 eval job has completed with return code 0.
001 | 0 a b
002 | 1 b c
003 | 0 a 1 b
004 | 1 b 2 c
!e py import random print(random.randint(1, 6))
@somber heath :white_check_mark: Your 3.12 eval job has completed with return code 0.
2
!e py from random import randint print(randint(1, 6))
@somber heath :white_check_mark: Your 3.12 eval job has completed with return code 0.
6
!e py from random import randint as fart print(fart(1, 6))
@somber heath :white_check_mark: Your 3.12 eval job has completed with return code 0.
6
there is a functional difference, but it's about partially initialised modules, somewhat too advanced even for me
(you will encounter that when you write your own modules and run into circular import errors)
!e py letters = 'abcd' numbers = '1234' symbols = '@#ยฃ_' for letter, number, symbol in zip(letters, numbers, symbols): print(letter, number, symbol)
@somber heath :white_check_mark: Your 3.12 eval job has completed with return code 0.
001 | a 1 @
002 | b 2 #
003 | c 3 ยฃ
004 | d 4 _
for just checking if all are same: all(starmap(eq, pairwise(values)))
for max(0, length-1) of longest single-valued prefix: sum(takewhile(bool, starmap(eq, pairwise(values))))
!e py for i, v in enumerate('abc', start=50): print(i, v)
@somber heath :white_check_mark: Your 3.12 eval job has completed with return code 0.
001 | 50 a
002 | 51 b
003 | 52 c
I wonder if ChatGPT can produce stuff like this
@hollow jewel ๐
I guess it might produce things of that sort if asked to first solve it in Lisp and then translate
๐
Yo
Morning guys
Then your up 100k
Is being up 100k not enough?!?
Yea but 100k is more than most people ever see lol
It's a small project if you can make 100k off the project and move on and start working on the next lol
I'll through 100$ in lol
throw*
What are you writing it in?
Could you take an existing stock alert bot and use it for what you are wanting to do?
I don't have permissions to talk
what why?
Hey it worked lol
@rapid chasm the more people know how it works, the worse it works, generally
if you want it fast, you can also go with Rust
(both for computation and IO)
and without pain of C
it's like C but with type system similar to Haskell
statically compiled
(not interpreted)
also has no garbage collection
l8r
python Firstwebsite/manage.py startapp main
byee
!voice
Canโt talk in voice chat? Check out #voice-verification to get access. The criteria for verifying are specified there.
Yes, I need to write 50 messages.
It is very long and tedious to deal with this topic
@bronze cargo ๐
Hello @somber heath
@somber heath
@mystic lily
I want to have a mic access on this voice chat @rugged root
please help me
!voice ๐
Canโt talk in voice chat? Check out #voice-verification to get access. The criteria for verifying are specified there.
Gotta do shred, back in a bit
@celest stream ๐
@somber heath
@foggy osprey ๐
hi
!stream 120274865973493761
โ @trim night can now stream until <t:1702481047:f>.
Sorry, brb one sec
@vocal basin hey
!e
print((1+5**.5)/2)
@vocal basin :white_check_mark: Your 3.12 eval job has completed with return code 0.
1.618033988749895
I guess not this phi
wave function in non-Euclidean space?
where does it appear?
what subfield of maths/physics?
i.e. why have a notion of wave function in a non-Euclidean space?
(the purpose)
just start a new terminal
if you selected the interpreter, it will be activated
!e ```py
def wave():
print('๐')
wave()```
@somber heath :white_check_mark: Your 3.12 eval job has completed with return code 0.
๐
at first, verify that it's not in a venv yet
(it might be already activated)
./.venv/Scripts/activate
sometimes VSC activates venvs without setting PS1
prefix
or whatever it is the name of that variable
> opens a directory called "bomb"
> "do you trust the authors of this folder?"
it auto-activates venv for me and does set the prefix
lmfao bomb
but
I've seen it do it without a prefix, mostly in Dev Containers
it's "bomb" because I was testing whether multiprocessing might accidentally lead to a fork bomb
results of that test were indecisive
ooo i love me a fork bomb looks like a load of emojis
but i lost the file , a typical response
sorta like a dog ate my home work
Special Thanks to: Brickyard VFX, Teresa Richards, Brian White, and Laurel Durkan.
it will only do that if you have your venv selected as the interpreter for the workspace
and it is shell aware i think so if you use gitbash or a container's shell which runs bash it will leave the .ps1 out as the bash script has no extension and is supposed to be sourced not run
sometimes it's very dumb and pastes the activation command on docker logs
๐ฎ no clue i tend to develop on my pc and only test and deploy on docker if needed
when it's inside docker, it works fine but without a prefix
i should write it down im using barebone metal with a ubuntun install
wait prefix? i thought you meant suffix
half tempted to install globally lmfao
outside docker, it's only activating with a command for me
(venv) prefix
oh that ๐ฎ
isn't it to the left of everything?
you can disable that
there's an environment variable you can use to disable that if you want
yeah, I know how to disable it
hi
I think VSC in some context understands what it actually needs to change to activate venv
and bypasses running the script