#off-topic-lounge-text
1 messages Β· Page 33 of 1
it's like this
if u have " strings => u MUST escape ", but you can use ' without escape
if u have ' strings => u MUST espace ', but u can use without " escape
!voice
Voice verification
Canβt talk in voice chat? Check out #voice-verification to get access. The criteria for verifying are specified there.
You gotta read the rules π±
What sza remix is that
To begin properly, you gotta setup...
Bye
!e while 1:
print("sus")
@candid quest :x: Your eval job has completed with return code 143 (SIGTERM).
001 | sus
002 | sus
003 | sus
004 | sus
005 | sus
006 | sus
007 | sus
008 | sus
009 | sus
010 | sus
011 | sus
... (truncated - too many lines)
Full output: too long to upload
!e Print "oof"
!e print("oof")
Anyone know where should I start?
I'm new to python
@late agate :white_check_mark: Your eval job has completed with return code 0.
hello world
U new too?
@late agate :white_check_mark: Your eval job has completed with return code 0.
oof
!e
X= int(input("2"))
@sonic violet :x: Your eval job has completed with return code 1.
001 | 2Traceback (most recent call last):
002 | File "<string>", line 1, in <module>
003 | EOFError: EOF when reading a line
Lmao
I joined this server to learn coding
Cause discord has pretty good community
Who?
Whose that?
https://www.programiz.com/python-programming/examples this website seems like a great start
This page contains examples of basic concepts of Python programming like loops, functions, native datatypes and so on.
!e
E=1.2
F=1.8
Sum=("E+f")
@sonic violet :warning: Your eval job has completed with return code 0.
[No output]
@sonic violet :x: Your eval job has completed with return code 1.
001 | Traceback (most recent call last):
002 | File "<string>", line 1, in <module>
003 | NameError: name 'e' is not defined
Is there any tutorials on this server?
@teal kettle :x: Your eval job has completed with return code 143 (SIGTERM).
001 | Sussybakka
002 | Sussybakka
003 | Sussybakka
004 | Sussybakka
005 | Sussybakka
006 | Sussybakka
007 | Sussybakka
008 | Sussybakka
009 | Sussybakka
010 | Sussybakka
011 | Sussybakka
... (truncated - too many lines)
Full output: too long to upload
!e while True:
pass
@primal bison :x: Your eval job has completed with return code 1.
001 | File "<string>", line 2
002 | pass
003 | ^
004 | IndentationError: expected an indented block after 'while' statement on line 1
!e
while True:
pass
@primal bison :warning: Your eval job timed out or ran out of memory.
[No output]
!e
for i in range(72):
print(i)
i += 1
@misty storm :white_check_mark: Your eval job has completed with return code 0.
001 | 0
002 | 1
003 | 2
004 | 3
005 | 4
006 | 5
007 | 6
008 | 7
009 | 8
010 | 9
011 | 10
... (truncated - too many lines)
Full output: https://paste.pythondiscord.com/umoqicidop.txt?noredirect
!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!*
@honest ocean :white_check_mark: Your eval job has completed with return code 0.
Sevo
!e 1st Number = input('1st Number : ')
2nd Number = input('2nd Number : ')
Total=float(1st Number)+float(2nd Number)
print("Total :{0} ".format(Total))
@honest ocean :x: Your eval job has completed with return code 1.
001 | File "<string>", line 1
002 | 1st Number = input('1st Number : ')
003 | ^
004 | SyntaxError: invalid decimal literal
huh
variable names cant have spaces and they can't start with numbers Β―_(γ)_/Β―
whoops, that was two hours ago but ok
and input wont work here i think
Hi!
cf pages supermacy
codewars restrict me from using itertools and regex somehow, maybe i should use another platform :/
def custom_input(requirement_type):
input_result = input(f"Input with the requirement of {requirement_type}: ")
if requirement_type == "letter":
valid = input_result.isalpha()
elif requirement_type == "number":
valid = input_result.isnumeric()
elif requirement_type == "letter_or_number_or_underscore":
formatted_input = input_result.replace('_', '')
valid = formatted_input.isalnum()
elif requirement_type == "email":
at_in = "@" in input_result
com_in = ".com" in input_result
valid = at_in and com_in
if not valid:
print(f"Requirement for input is not met: {requirement_type}") #
custom_input(requirement_type)
else:
print(input_result) # => what i just typed
return input_result # what it printed just before
result = custom_input("email")
print("Result: ", result) # => None
Yea, I hear you.
i will look atfer trying yself
This feels pretty optimal to me. Only thing might be to store the difference instead.
There might be another way. Parallel sort with indices. And then search for complement would be lienar.
Likely overengineering though.
@atomic phoenix what you doin
Not for multiple pairs. Just thinking a way to improve the algorithm.
@timber heart
import discord
import os
from discord.ext import commands
intents = discord.Intents.all()
client = commands.Bot(command_prefix = ';-;', intents=intents)
@client.command()
async def load(ctx, extension):
client.load_extension(f'cogs.{extension}')
@client.command()
async def unload(ctx, extension):
client.unload_extension(f'cogs.{extension}')
for filename in os.listdir("./cogs"):
if filename.endswith('.py'):
client.load_extension(f'cogs.{filename[:-3]}')
@client.event
async def on_ready():
await client.change_presence(status=discord.Status.dnd, activity=discord.Game('Getting developed'))
print("Yooo Bot is ready")
@commands.command()
@commands.has_permissions(manage_roles=True)
async def mute(self, ctx, member: discord.Member, *,reason=None):
guild= ctx.guild
mutedRole = discord.utils.get(guild.roles, name="Muted")
if not mutedRole:
mutedRole = await guild.create_role(name="Muted")
for channel in guild.channels:
await channel.set_permissions(mutedRole, speak=False, send_messages=False, read_message_history=True, read_messages=False)
await member.add_roles(mutedRole, reason=reason)
await ctx.send(f'Muted(member.mention) for reason(reason)')
await member.send(f'You were muted in the server {guild.name} for (reason)')
the bot doesnt mute tho when i do
;-;mute @member and it shows no errors also
if not valid:
print(f"Requirement for input is not met: {requirement_type}") #
input_result = custom_input(requirement_type)
else:
print(input_result) # => what i just typed
return input_result # what it printed just before
@timber heart
Instead of just calling custom_input, save its return
@honest pasture I would like to
why cant i remove the else
No need to do checking when having a valid input
i want to remove the print
you can
so
print does not affect (return) things
if not valid:
print(f"Requirement for input is not met: {requirement_type}") #
input_result = custom_input(requirement_type)
return input_result # what it printed just before**
yes i know
i just dont want to print
that was just to test
Is dictionary lookup O(n)?
ty
Ah, okay.
well it comes down to O(1) in the end but technically its O(the amount of collisions)
so ye its O(1) but it does get slower
It is expected to be take O(1)
expected in mathematical sense
In probability theory, the expected value (also called expectation, expectancy, mathematical expectation, mean, average, or first moment) is a generalization of the weighted average. Informally, the expected value is the arithmetic mean of a large number of independently selected outcomes of a random variable.
The expected value of a random var...
O(1) is some constant number of steops
not 1 step
When we have too many collisions, we just double the size of the table and rehash it
It is
ποΈ
ποΈ
I'll in 2 min
It is like list... you double the size
It is called amortized analysis
O(1)
No... it goes into build cost
Then even python list, append is not constant
If you play the game long enough, the cost will covered...
Some factor
In run time... it rebuilds
yeah
that's why i'm saying it amortized O(1)
I don't know... how python implemented it
That's why people use B-Trees and stuff in MySQL, instead of hash tables
Although, on average, hashtables are O(1)... BST give, log(n), everytime...
it is bad for real time systems
@agile portal a beginner wouldn't use math lib π
float("inf") ?
float inf is just standard spec of float
I already did this question, before...
class Solution:
def findPeakElement(self, nums: List[int]) -> int:
def recurse(l, r):
if (l == r):
return l
mid = (l + r) >> 1
if nums[mid + 1] < nums[mid]:
return recurse(l, mid)
return recurse(mid + 1, r)
return recurse(0, len(nums) - 1)
binary search...
I don't like doing recursive things with loops
It feels odd
I messed things up with while Truee loops
for loop is easu
while is not
and it is easy to prove things about recursive things and for loops... hard with while stuff
yeah...
now most langs... are like that
no
god!!
I use for loops, usually... but for loops are not that powerful... when I need more power, I use recursion...
i-1 < 0 is better...
Yeh
i just tried doing it as simply as possible
@primal bison you have background noise π
Againπ©
silicon @agile portal
what is?
do you mean the carbon thing?
the link preview is based on meta tags on the website
hey
@grand kettle https://github.com/yshui/picom
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
~/.config/picom/picom.conf
!e
print(type(2.0//1.0))
@honest pasture :white_check_mark: Your eval job has completed with return code 0.
<class 'float'>
@atomic phoenix π’ , Just realized, a number palindrome in base 10 is not in base 2... it depends on the base...
import math
def test(n):
if n < 0: return False
return f"{n:b}" == f"{n:b}"[::-1]
def digits(n):
if n == 0: return 1
return int(math.log2(n)) + 1
def solve(n):
if n < 0:
return False
bits = digits(n)
i = bits
while i > 0:
r = (n & (1 << i - 1)) >> i - 1
l = n & 1
if r != l:
return False
n = n >> 1
i -= 2
return True
for i in range(1000000):
if test(i) != solve(i):
print("not working!")
Palindrome in base 2.... Not the question... spent alot of time... thought worth sharing!! @atomic phoenix
May I critique your solution...
You are doing pow(10, ....) everytime in the loop
you could start with 1 and multiply 10
in someway...
there are bigger performance problems (python) ... since you are optimizing for minimum work... I thought that's unnecessary work... exponent is more expensive than multiplication by 10....
Both are constant time... but, by definition ... 10^5 = 10 * 10 * 10 * 10 * 10
There is may be shifting x in each iteration to get rid of the unit digit. Saves having to find low_order
Yooo
import time
def exp(x):
for i in range(x):
n = pow(10, i)
def my(x):
n = 1
for i in range(x):
n = n * 10
print("Maroloccio's Method")
start = time.time()
exp(10000)
end = time.time()
print(end - start)
print("Charan's Method")
start = time.time()
my(10000)
end = time.time()
print(end- start)
@atomic phoenix
QED
TBH, I don't know how to do it properly.. measuring runtime of of a function...
You know better way?
okay
I was about to... I'm searching for this thing, a friend shared... that might be helpful to you @atomic phoenix
hmm
I wonder if the accumulator function can be stateless.
Like, parse using only the next letter and value accumulated from the previous letters.
I don't get you... But I think I understand your point...
They are stateless in langs like haskell... since everything is immutable...
but in python... if you accumulate things in list... you can't pass around same list... you have to clone it... and that might be the most efficient...
In [2]: "abcdef abcdef".replace("cd", 'yes')
Out [2]: 'abyesef abyesef'
I didn't
Thought of something. Changing algorithm.
finished the roman to int < 3
what is the value of IM according to this? should it be 999?
I am confused about the rules - mine would fail if the above is true
but it passed the tests
is this leetcode oversimplifying the problem, or is it me not knowing how roman numerals would work?
I forgot how to read roman numbers tbh...
It probably isn't standard or something.
To write IM.
I think I have done it. Didn't make an account to test though!
Yea.
Nice!
GOD!!!! How did those people come up with such a system!!!
They were high when they did that!
@final grail you're the most inspiring man i know
Be back in a bit.
Floder is a fancy for loop, @timber heart
Functional way of doing things...
@atomic phoenix sushi is my cousin
and my solution
def roman_to_int(roman_number: str):
table = {'I': 1,
'V': 5,
'X': 10,
'L': 50,
'C': 100,
'D': 500,
'M': 1000}
roman_number = roman_number.replace("IV", "IIII")
roman_number = roman_number.replace("IX", "VIIII")
roman_number = roman_number.replace("XL", "XXXX")
roman_number = roman_number.replace("XC", "LXXXX")
roman_number = roman_number.replace("CD", "CCCC")
roman_number = roman_number.replace("CM", "DCCCC")
print(roman_number)
result_number = 0
for char in roman_number:
result_number += table[char]
return result_number
the first thing i can easily think of is probably to use a list comp rather than reduce as its more readable atleast to me in this case
Nice. That is similar to my first algorithm.
And then, I noticed that...
If you do XI which is 11, followed by V, which gives 14. You can do 11 + V - (XI % V)*2 = 14. With this, you do not need a pair.
I absolutely love it - from the tiny knowledge I have of FP - I think you have implemented a semigroup
or roughly
you said that
why not SHA-256
my solution was just repeatedly popping from a deque
but yours is much more elegant
I'd post the code but I lost the tab and am currently wasting my life playing a video game
Probably missed some edge cases.
Yea. Much more obvious what is going on in this one. More readable.
I really feel like the reducer is just as pleasant to read
I'd much rather encounter that in production
Yes
Don't agree with being more pleasant to read. I would prefer reducer in production though. Easier to... test.
iteration is very consistently a cause of problems
Getting infinite loops is scary!
I'll do it!..
you are. i know you are β€οΈ
SHA-256 is a checksum, not encryption
checksum != encryption
a checksum creates A FIXED LENGTH OUTPUT THAT IS THE SAME AS LONG AS THE INPUT IS THE SAME
Going to make dinner. Have fun!
thanks for your help man
also if u use SHA
use SHA-512
its longer thus harder to brute-force create a valid input
for passwords
if your database gets compromised
Cool π
from functools import reduce
class Solution:
def longestCommonPrefix(self, strs: List[str]) -> str:
def common(a, b):
if a == "" or b == "" or a[0] != b[0]:
return ""
return a[0] + common(a[1:], b[1:])
return reduce(common, strs, strs[0])
Ik, it's bad... strings are immutable... but we are doing it in functional way!!!!!!!
@atomic phoenix you were saying something... I didn't get you...
yeah
yeah π
@atomic phoenix check dms...
same kinda things...
okay let's go to next question
what do you say
functional way?
yeah
No
yep
yeah
let's go back to leetcode
okay
Does this check letter by letter for every word at the same time?
My intuition is that this would be slower that checking word by word.
Because cache. Like checking if books have identical words.
since state is involved...
Jumping between books to check the n-th letter is no fun.
But comparing just two books is easier.
Indeed it would be. One way to mitigate this is to split up the problem.
One thousand letters at a time. So a hybrid solution if you will.
Matching the solution to the likely input is part of software engineering!
Both would definitely be same, time complexity wise...
Yea. Going for a one-size-fit-all solution is sometimes impossible!
class Solution:
def isValid(self, s: str) -> bool:
stack = []
D = {
")" : "(",
"]" : "[",
"}" : "{"
}
for i in s:
if i not in D:
stack.append(i)
elif stack == [] or stack[-1] != D[i]:
return False
else:
stack.pop()
if stack == []:
return True
@atomic phoenix I can't see a elegant way to do it functionally... only way, I can see is to convert that explicit stack into implicit stack with recursion... but code will be messy...I don't see nice 4,5 line recursion here...
Do you see any?
yeah
I tried it... I didn't like it
@warm mango
@atomic phoenix where can I get those helper points, you always talk about! π
@dreamy sable then stop doing it...
I've recently learned python creator, left python because of that := operator!!!!!!
@timber heart
yes ?
It returns the assigned value too...
when you do normal assignment...
x = 10 doesn't return anything
x := 10 does
10
yeah
10
sometimes you also want to assign it...
I don't use it...
x = 10
if x:
works fine for me...
@atomic phoenix is there a good reason to use :=?
to flex
It can be anything...
because there are constant number of things
a list, a set, a tuple... it doesn't matter...
@timber heart it change... if you want to do it billion times...
@atomic phoenix why try statements...
in your solution
It's not about cheap... I don't like those try except!
yeah
@atomic phoenix what are you trying to create
old habbit!
type charlie it's working for me...
it showed up when you did charlie
reaper is hard...
@atomic phoenix
@atomic phoenix
all ListNodes are same..
@atomic phoenix
as far as I see...
create a class there...
class ListNode:
def init(self, val=0, next=None):
self.val = val
self.next = next
@atomic phoenix
since they are not providing any methods.... they are just providing constructor... it will work..
I got you... you can't test it...
you gotta write some function to make list into linkedlist...
whats going on
I did
?
???
ur name isn't valid ASCII
means wanna see my self live in the screen
where is the problem
bcz there is no problem
def convert(A):
head = ListNode()
tail = head
for i in A:
tail.next = ListNode(i)
tail = tail.next
return head.next
It takes a list and gives a linkedlist
use this to convert... @atomic phoenix in those tests...
you are doing some kinda assert equals right...
but leetcode input format is list right...
covert it...
leetcode input format...
input is linked list.... but for you it looks like list right...
It is cooler in haskell!!!!!!!! @atomic phoenix
return type is also ListNode ... you are appending here...
okay
is this is a leet-code/interview question ?
I did that for you
π , you are welcome!!!
@graceful gale can you get this message to him
hey @icy raven can u provide the link for this question π
I didn't implemented it as a method
you gotta make some changes...
I thought... when you pass in input you gonna change it...
in assert
just put self
okay...
all linked list are same....
and can you show me that again...
constructor...
yeah... when it is none... it's empty
Just use leetcode... maybe
anyone knows how to mod a exe file ?
@atomic phoenix There is better way to structure it... look at my code...
anyone ?? @atomic phoenix
Structure
You already did solve it....
Ah... okay...
Better way to structure is ....
instead of head = None
head = ListNode()
and return head.next
I think that's what you are looking for...
now you don't have to do alot of checking...
I used to do that... with alot of None checking... A friend showed me this trick...
No a dummy first node...
and return head.next
yeah...
so you don't have to check for head == None
default value is 0
look at construcutor
It passed all
When you do
head = ListNode()
you have next property
none don't have it
so you can add merged list to it and return head.next
head = ListNode()
tail = head
return head.next
yep...
I remember, you have ipad right... you can airplay it...
yeah
yeah
yep
yep..
No we clone it...
we just create a new node with that val
No...
With that tail.next = ListNode(l1.val)
yep
you can do this also.... Ig
we can carefully do some transactions..
that's trippy
yeah...
tail.next.next == None
argree
yeah.. you want to do it inplace
we can also like as you said...
it's not that different..
yeah...
yeah got it...
potrait is better
because, I'm on laptop
half is video and half is chat
yeah
yeah
you can still make a dummy to avoid... none checking... and do it inplace
return head.next
you only create 1 listnode...
since it is always sorted...
if one is none... just add other to ans
yep
yep
what app is it?
you gotta change the cover image, ig... logo is invisible
@atomic phoenix
yep
You don't have worry about both None
because you add only None to ans
yeah
I changed it to in place, it's alot faster
class Solution:
def mergeTwoLists(self, l1: Optional[ListNode], l2: Optional[ListNode]) -> Optional[ListNode]:
head = ListNode()
tail = head
while True:
if not l1:
tail.next = l2
break
if not l2:
tail.next = l1
break
if l1.val < l2.val:
tail.next = l1
l1 = l1.next
else:
tail.next = l2
l2 = l2.next
tail = tail.next
return head.next
agreed
you don't have to do it...
look at mine... it is already sorted list..
so you can add that pointer to end of ans
once l1 is empty... you know rest of l2 is sorted... you can just add it
to the end...
yep
what do you have list1, list2... when you have l1, l2
you don't need them...
ah,, match syntax
@atomic phoenix l1 = l1.next
not list1 = l1.next
tail.next = l1
l1 = l1.next
and in this order
coming things are l1, l2
open leetcode
you have to make choice... either l1, list1
in leetcode it is l1
oops, I might have changed it...
it is l1... too big... I changed it...
sorry my bad...
okay.. make everyting list1 now...
Yep...
I have...
But not in pyton
I used it in haskell
yep...
yep...
What line of code can I put in my IDE to simulate the leetcode "run code" button?
CTRL + '/' to comment out code in Leetcode.
done
yeah...
try without enumberate
class Solution:
def removeDuplicates(self, nums: List[int]) -> int:
index = 1
n = len(nums)
for i in range(1, n):
if nums[i] != nums[i - 1]:
nums[index] = nums[i]
index += 1
return index
yep
yeah...
I agree
@atomic phoenix don't use remove method π ...
I was kidding
No
class Solution:
def removeElement(self, nums: List[int], val: int) -> int:
idx = 0
for i in range(len(nums)):
if nums[i] != val:
nums[idx] = nums[i]
idx += 1
return idx
instead of v, use num
for i, num in enumerate(nums)
When I write code for real... not for leetcode.... I alway try to use plurals for list.. and singular for element
I already did this... code is shit... though...
But I'm proud of that solution...
yeah
okay...
who knows how to install lolcat on kali
In this fireside chat, MIT Schwarzman College of Computing Dean Daniel Huttenlocher and co-founder of Schmidt Futures and former Google CEO & Chairman Eric Schmidt talk with MIT EECS head and moderator Asu Ozdaglar about how AI is changing our relationship with knowledge and society β and what this technology means for us all.
@spark hatch
Hello, can someone help me with making snake game in Pyhon and with pgame?
Exactly where do you need help ?
I have opened a window, but I dont know how I need to make the snake etc.
Are you following some sort of tutorial / guide ?
I have already watched all of them
But they are each different. I'm not allowed to take over
Thats why I am looking for someone who knows about coding games in Python and with pygame
I assume you are new to this server , So if u need help regarding something specific you go to the available help channels and ask your question there , u will get professional help there
I did but no one is helping
Oh okey , I don't have much experience with Py-game , never used it i can only help with python
Thats okay I think
Its not really necessary to use pygame, just an extra
Can you help me?
Same I dont also have experience with Pygame just found out how to open a window with pygame
Yeah Sure
I know about Python like if statements, booleans, while loop for loop etc
But making a game, its something really different
Thank you
https://www.edureka.co/blog/snake-game-with-pygame/ This is a straightforward tutorial to make the snake game using pygame
@agile portal
sorry i am late but is this solution solves the previous problem
i don't have permisiion to speak in vc.
valid_input=False
while not valid_input:
foo=input("enter a valid number")
if(foo.isdigit()):
foo=int(foo)
valid_input=True
else:
print("pls enter a vlaid input")
@pine otter use nested loop
!e
print ("what are you doing right now??
")
@placid elm :x: Your eval job has completed with return code 1.
001 | File "<string>", line 1
002 | print ("what are you doing right now??
003 | ^
004 | SyntaxError: unterminated string literal (detected at line 1)
@placid elm :x: Your eval job has completed with return code 1.
001 | File "<string>", line 1
002 | the_world = ("what are you doing right now?
003 | ^
004 | SyntaxError: unterminated string literal (detected at line 1)
@placid elm :x: Your eval job has completed with return code 1.
001 | File "<string>", line 1
002 | the_world = (what are you doing right now?
003 | ^^^^^^^^
004 | SyntaxError: invalid syntax. Perhaps you forgot a comma?
print ("wassup")
!e
import pysimplegui
!e
from os import system as sys
sys("clear")
!e
from dataclasses import dataclass
@dataclass
class Quadrilateral:
a : int
b : int
def add(self):
return self.a + self.b
quadrilateral = Quadrilateral(1, 2)
print(quadrilateral.add())
i dunno maybe create replit project that everybody could code given 1 problem or smh
what is your expected output?

@primal monolithone, why i can't turn on my mic on vc?
what app do you use to code
visual studio i guess
#voice-verification meet the requirements
Hey @cunning portal!
You either uploaded a .txt file or entered a message that was too long. Please use our paste bin instead.
ohh, thx
y0utube
!resources
The Resources page on our website contains a list of hand-selected learning resources that we regularly recommend to both beginners and experts.
have you tried a for cycle on the list "numbers" to see if anyone of them is inside "remove_" list?
@agile portal which language of programme it is
the one i'm using rn is lua
ok
!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!*
!e print(βHiβ)
@mossy gull :x: Your eval job has completed with return code 1.
001 | File "<string>", line 1
002 | print(βHiβ)
003 | ^
004 | SyntaxError: invalid character 'β' (U+201C)
guys anyone knows django authentication ?
!e print(9193884748283482848838292920384382910493829492982944938934949283949* 9193884748283482848838292920384382910493829492982944938934949283949)
@mossy gull :white_check_mark: Your eval job has completed with return code 0.
84527516764719640784588304123742187110122475512042158083609737822326687820677932544226001359776080628034428024578918563880747829034601
!e while True: print(βHello World!β)
@mossy gull :x: Your eval job has completed with return code 1.
001 | File "<string>", line 1
002 | while True: print(βHello World!β)
003 | ^
004 | SyntaxError: invalid character 'β' (U+201C)
!e while True: print(9284829472859384729*91938294828)
FUCK YEAH
:incoming_envelope: :ok_hand: applied mute to @shut widget until <t:1648859483:f> (9 minutes and 59 seconds) (reason: duplicates rule: sent 4 duplicated messages in 10s).
!unmute 949246720099889163
:x: There's no active mute infraction for user @shut widget.
import discord
import os
import time
import discord.ext
from discord.utils import get
from discord.ext import commands, tasks
from discord.ext.commands import has_permissions, CheckFailure, check
client =
client = commands.Bot(command_prefix = '!'), discord.Client()
@client.event
async def on_ready():
print("bot online")
async def join_vc(ctx):
channel = client.get_channel(959704295903748137)
await channel.connect()
@client.command()
async def ping(ctx):
await ctx.send("pong!")
async def kick(ctx, member : discord.Member):
try:
await member.kick(reason=None)
await ctx.send("kicked "+member.mention)
except:
await ctx.send("bot does not have the kick members permission!")
client.run(os.getenv("token"))
!d import discord
import os
import time
import discord.ext
from discord.utils import get
from discord.ext import commands, tasks
from discord.ext.commands import has_permissions, CheckFailure, check
client =
client = commands.Bot(command_prefix = '!'), discord.Client()
@client.event
async def on_ready():
print("bot online")
async def join_vc(ctx):
channel = client.get_channel(959704295903748137)
await channel.connect()
@client.command()
async def ping(ctx):
await ctx.send("pong!")
async def kick(ctx, member : discord.Member):
try:
await member.kick(reason=None)
await ctx.send("kicked "+member.mention)
except:
await ctx.send("bot does not have the kick members permission!")
client.run(os.getenv("token"))
7.11. The import statement
import_stmt ::= "import" module ["as" identifier] ("," module ["as" identifier])*
| "from" relative_module "import" identifier ["as" identifier]
("," identifier ["as" identifier])*
| "from" relative_module "import" "(" identifier ["as" identifier]
("," identifier ["as" identifier])* [","] ")"
| "from" relative_module "import" "*"
module ::= (identifier ".")* identifier
relative_module ::= "."* module | "."+
```...
!r import discord
import os
import time
import discord.ext
from discord.utils import get
from discord.ext import commands, tasks
from discord.ext.commands import has_permissions, CheckFailure, check
client =
client = commands.Bot(command_prefix = '!'), discord.Client()
@client.event
async def on_ready():
print("bot online")
async def join_vc(ctx):
channel = client.get_channel(959704295903748137)
await channel.connect()
@client.command()
async def ping(ctx):
await ctx.send("pong!")
async def kick(ctx, member : discord.Member):
try:
await member.kick(reason=None)
await ctx.send("kicked "+member.mention)
except:
await ctx.send("bot does not have the kick members permission!")
client.run(os.getenv("token"))
!e print(βHello World!β)
@glacial quest :x: Your eval job has completed with return code 1.
001 | File "<string>", line 1
002 | print(βHello World!β)
003 | ^
004 | SyntaxError: invalid character 'β' (U+201C)
how to download visual studio
dunno
dgg to delete everything above cursor to start of file
is grey lines/green lines in python? // in C++ its backslash?
change #include to import? π
from Cpp to python?
Nice watch good night π
fatal: The current branch 2079 has no upstream branch.
To push the current branch and set the remote as upstream, use
git push --set-upstream origin 2079
We're a large, friendly community focused around the Python programming language. Our community is open to those who wish to learn the language, as well as those looking to help others.
!resources data science
Hey check these out @unborn sorrel
The Resources page on our website contains a list of hand-selected learning resources that we regularly recommend to both beginners and experts.
flask?
@plucky wind its a jd framework
2
I'm going to start a new project on a trading Binance bot, anyone wanna work together?
!e from tkinter import Tk, Button, Label, CENTER
will = 0
will_add = 1
will_price = 100
root = Tk()
root.title("Wills Code Window")
root.geometry("500x500")
root.resizable(False, False)
label2 = Label(text="Increase Unavailable", font=("Roboto", 20))
label2.place(x=245, y=190, anchor=CENTER)
def increase_avaible():
if will >= will_price:
label2.config(text="Increase Available")
def on_button():
global will
print("You Have Clicked "+str (will))
will += will_add
label1.config(text=f"Willies: {will}")
increase_avaible()
bclicker1 = Button(root, text="Click", width=15, height=5, command=on_button)
bclicker1.place(x=200, y=250, anchor=CENTER)
label1 = Label(text="Welcome To Wills Cookie Clicker", font=("Roboto", 20))
label1.place(x=245, y=150, anchor=CENTER)
def button_reset():
global will
global will_add
global will_price
print("You Have Reset Your Count: "+str (will))
will = 0
will_add = 0
will_price = 0
label1.config(text=f"Willies: {will}")
bclicker2 = Button(root, text="RESET", width=15, height=5, command=button_reset)
bclicker2.place(x=301, y=250, anchor=CENTER)
def button_mult():
global will_add
global will_price
global will
if will >= will_price:
will_add += 1
will -= will_price
will_price *= 2
label1.config(text=f"Willies: {will}")
label2.config(text="Increase Unavailable")
else:
print("Not enough Willies")
bclicker3 = Button(root, text="Increase Click By 2", width=15, height=5, command=button_mult)
bclicker3.place(x=247, y=335, anchor=CENTER)
root.mainloop()
!e from tkinter import Tk, Button, Label, CENTER
will = 0
will_add = 1
will_price = 100
root = Tk()
root.title("Wills Code Window")
root.geometry("500x500")
root.resizable(False, False)
label2 = Label(text="Increase Unavailable", font=("Roboto", 20))
label2.place(x=245, y=190, anchor=CENTER)
def increase_avaible():
if will >= will_price:
label2.config(text="Increase Available")
def on_button():
global will
print("You Have Clicked "+str (will))
will += will_add
label1.config(text=f"Willies: {will}")
increase_avaible()
bclicker1 = Button(root, text="Click", width=15, height=5, command=on_button)
bclicker1.place(x=200, y=250, anchor=CENTER)
label1 = Label(text="Welcome To Wills Cookie Clicker", font=("Roboto", 20))
label1.place(x=245, y=150, anchor=CENTER)
def button_reset():
global will
global will_add
global will_price
print("You Have Reset Your Count: "+str (will))
will = 0
will_add = 0
will_price = 0
label1.config(text=f"Willies: {will}")
bclicker2 = Button(root, text="RESET", width=15, height=5, command=button_reset)
bclicker2.place(x=301, y=250, anchor=CENTER)
def button_mult():
global will_add
global will_price
global will
if will >= will_price:
will_add += 1
will -= will_price
will_price *= 2
label1.config(text=f"Willies: {will}")
label2.config(text="Increase Unavailable")
else:
print("Not enough Willies")
bclicker3 = Button(root, text="Increase Click By 2", width=15, height=5, command=button_mult)
bclicker3.place(x=247, y=335, anchor=CENTER)
root.mainloop()
@primal bison :x: Your eval job has completed with return code 1.
001 | Traceback (most recent call last):
002 | File "<string>", line 1, in <module>
003 | File "/usr/local/lib/python3.10/tkinter/__init__.py", line 37, in <module>
004 | import _tkinter # If this fails your Python may not be configured for Tk
005 | ImportError: libtk8.6.so: cannot open shared object file: No such file or directory
!e print("123")
@primal bison :white_check_mark: Your eval job has completed with return code 0.
123
!e input("What: ")
@primal bison :x: Your eval job has completed with return code 1.
001 | What: Traceback (most recent call last):
002 | File "<string>", line 1, in <module>
003 | EOFError: EOF when reading a line
!e from tkinter import *
window = Tk()
window.mainloop()
@primal bison :x: Your eval job has completed with return code 1.
001 | Traceback (most recent call last):
002 | File "<string>", line 1, in <module>
003 | File "/usr/local/lib/python3.10/tkinter/__init__.py", line 37, in <module>
004 | import _tkinter # If this fails your Python may not be configured for Tk
005 | ImportError: libtk8.6.so: cannot open shared object file: No such file or directory
!e print(eval("1+1"))
@primal bison :white_check_mark: Your eval job has completed with return code 0.
2
!e from math import *
print(pi)
@primal bison :white_check_mark: Your eval job has completed with return code 0.
3.141592653589793
!e "5+5"
@primal bison :warning: Your eval job has completed with return code 0.
[No output]
!e 5+5
@primal bison :warning: Your eval job has completed with return code 0.
[No output]
!e print(e)
!e print('test')
@heavy crane :white_check_mark: Your eval job has completed with return code 0.
my discord bot is wet
!e print("Hello World")
ehhhh
I hear bzzz sound onnly
from your mic
no
its so noisy
haha
its so noisy
i hear your voice so discrupt
ed
I can't hear you
seriously
oh I see I can hear your laptop fan
can you use headphone
so its noisy
come top
ask them
damn
@dense flame yes
You can to active on this server
Follow the rules for voice channel
Sorry about that. If you can, enable "Noise Suppression powered by Krisp".
hi guys
I'll give you a free tip: Excel can not handle this much data
It sceams and begs for mercy
I don't think the ones they're dealing with are that large.... I hope
It's been our business services folks who are running into it
I actually need more than this
There are different versions of the API that provide different amounts of information about the objects, but Excel can't handle that much data.
I wrote a wrapper that downloads all records to SQLite, I need to bite the bullet and sit down and write the parser to pull the information I need
Want a new project to help with?
Or just yell at me to be productive
That'd probably work too
its okay π
wow nice
!e print("daddy")
@heavy topaz :white_check_mark: Your eval job has completed with return code 0.
daddy
!e print("python bot dumb")
@heavy topaz :white_check_mark: Your eval job has completed with return code 0.
python bot dumb
!e print("big chungus is awesome and cool")
@heavy topaz :white_check_mark: Your eval job has completed with return code 0.
big chungus is awesome and cool
!e print("Python World")
@lucid python :white_check_mark: Your eval job has completed with return code 0.
Python World
import lightbulb
import hikari
import random
bot = lightbulb.BotApp(token='', prefix = "!")
@bot.listen(hikari.StartedEvent)
async def on_started(event):
print("start")
bot
r1 = random.randint(1, 100)
print("Random number between 5 and 15 is % s" % (r1))
@bot.command
@lightbulb.command('kill', 'does what it says')
@lightbulb.implements(lightbulb.PrefixCommand)
async def kill(ctx: lightbulb.Context) -> None:
await ctx.respond("kills you")
bot
@bot.command
@lightbulb.command('gay', 'you gay?')
@lightbulb.implements(lightbulb.PrefixCommand)
async def gay(ctx: lightbulb.Context) -> None:
await ctx.respond("Your gay Percentage is % s" % (r1))
bot.run()
!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.
!e import random
def what_happens():
what_happen = random.randint(1, 9999999999)
return what_happen
while True:
print(str(what_happens()))
@primal bison :x: Your eval job has completed with return code 143 (SIGTERM).
001 | 9766713384
002 | 9613342695
003 | 7814648693
004 | 4943741273
005 | 5953353648
006 | 6405603180
007 | 6955136268
008 | 67430724
009 | 5542029079
010 | 4984812088
011 | 6749166230
... (truncated - too many lines)
Full output: too long to upload
!e import time
time.sleep(99)
print("hello")
@primal bison :warning: Your eval job timed out or ran out of memory.
[No output]
@primal bison :x: Your eval job has completed with return code 1.
001 | Traceback (most recent call last):
002 | File "<string>", line 1, in <module>
003 | EOFError: EOF when reading a line
?
!e test = input("test") print(test)
@somber musk :x: Your eval job has completed with return code 1.
001 | File "<string>", line 1
002 | test = input("test") print(test)
003 | ^^^^^
004 | SyntaxError: invalid syntax
!e test = input("test")
print(test)
@somber musk :x: Your eval job has completed with return code 1.
001 | testTraceback (most recent call last):
002 | File "<string>", line 1, in <module>
003 | EOFError: EOF when reading a line
!e question1 = int(input("What is 2 + 2?"))
print(question1)
!e print("hello world")
π
!e a = int(input("enter number"))
b = int(input("enter second number"))
print(a + b)
!e a = 1
b = 1
print(a + b)
@wet moth :white_check_mark: Your eval job has completed with return code 0.
2
@wet moth :white_check_mark: Your eval job has completed with return code 0.
67 factorial is 36471110918188685288249859096605464427167635314049524593701628500267962436943872000000000000000
!e import math
a = 676
print(f'{a} factorial is {math.factorial(a)}')
@wet moth :white_check_mark: Your eval job has completed with return code 0.
676 factorial is 18837076841338098831631946502133679752775271363224741858716345371407282033097292730599416302262171748290957921103528196591392861507500824518988967688966916359624032206860634966843747432148697259354246645925344268167298729165308169292992442577858071994436282885840244262495093411188499180250476616063782119317350321221953996342974132759357732916063868147989178924590001010919802612030853406469552341407597023997935813719227154968650674205424600650441415221431155463636095327647889367710873643701162210934115855409138653903155976150466598193389511941024933011950512858916153180139104828249829267481847294571715377527508363338986460670601841954327102737584352972996463528053047436577158048125906693505259934633302120198215660046590792966117499697913607746327891270580423426879310749381564190608843884467754576776063403169281282042637287141665723851293820932576516339136451526141061766024209927597359638049451157569613731215506279692713997850312017855345578024590455099507305768001826968
... (truncated - too long)
Full output: https://paste.pythondiscord.com/enuqeqahuh.txt?noredirect
!e print("u r cool")
@cobalt otter :white_check_mark: Your eval job has completed with return code 0.
u r cool
!e print('i'm dumb')
@cobalt otter :x: Your eval job has completed with return code 1.
001 | File "<string>", line 1
002 | print('i'm dumb')
003 | ^^^^
004 | SyntaxError: invalid syntax. Perhaps you forgot a comma?
it is incredible how this bot works
help π°
i wanted to wget a something in git bash and now my computer only does ding ding ding ding
!e
l = "good"
n = ["This is a good game!"]
n=" ".join(map(str,n))
n=n.split()
print(l in n)```
True
@subtle palm
Hi, how do I gain voice privileges for voice chats?
you have to have 50 messages in non bot chats
hello everyone I am a student and I desire to learn python but I am having a hard time finding resources to learn the well-known programming language so can you guys tell me how to learn python
@honest trench youtube has some full courses, i took pierrians course on udemy, cost me 15 bucks and it got me all the basics
@steady cairn :white_check_mark: Your eval job has completed with return code 0.
trying first time
how to get a hastin here for my code
!e print(βNVDA callsβ)
@worn vector :x: Your eval job has completed with return code 1.
001 | File "<string>", line 1
002 | print(βNVDA callsβ)
003 | ^
004 | SyntaxError: invalid character 'β' (U+201C)
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!*
!e
class Bot:
def boost(self, health, power):
health+=5
power+=5
print("Boost gained!\n")
if 1==1:
Bot.boost()
@tardy shard :x: Your eval job has completed with return code 1.
001 | Traceback (most recent call last):
002 | File "<string>", line 8, in <module>
003 | TypeError: Bot.boost() missing 3 required positional arguments: 'self', 'health', and 'power'
!e import math
a = 69
print(f'{a} factorial is {math.factorial(a)}')
@primal bison :white_check_mark: Your eval job has completed with return code 0.
69 factorial is 171122452428141311372468338881272839092270544893520369393648040923257279754140647424000000000000000
!e import math
a = 420
print(f'{a} factorial is {math.factorial(a)}')
@primal bison :white_check_mark: Your eval job has completed with return code 0.
420 factorial is 1179832395293178259148587778443982767423908163629667689799210969550884231351169347804766799500510294050388349696532084729374087533384204019322892961178819464698121263533012685335273004294789382652477324465427001701326230145911466316029644714371748823861128004214806081770714277374544632880180009063325310867611466814559562175609414340177417478580290981292661586700768075544788360242053436899439186009859147147653878644064667799709427693731208035920284052203131022083688425805265631534978481761954009800546844281261649619610291306374918025956972209823833523561696079181976208783662818235613615149296343931089295234402130043253489826928097199211074340929916161625854705227595565090740962113793308742649598603963747960941063835474664306971892700806057422478626083960243385932102946293048920279760860198799159782580284293120000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
@primal bison :white_check_mark: Your eval job has completed with return code 0.
51 factorial is 1551118753287382280224243016469303211063259720016986112000000000000
!e import math
a = 627
print(f'{a} factorial is {math.factorial(a)}')
@primal bison :white_check_mark: Your eval job has completed with return code 0.
627 factorial is 24092916381260180160497479539564348437845164030340370372757332871567051428575206652135303470288745326647105347735146512246489569644642583268394081935817852803872382699236808257195450053625854531614829292697834551216020071177044557613689682964303281564211084635940459614394854478977393073666976717360884720362039636353228931481642112416050337033849896820619466840256744804128201863695578234098333299881039593684354655943944526395407286731660928658434379813372447154804064541425910505908226484422688711389170885442592242737684103015371862381531176065702583946741024167129127734451191554175945713104848656724598174533938207224575149060013000012503929539093591648586076790646837982546485798443629815564910180792972316453927158577033777440544587736400543053422725341089708835893716001723030087010307181194281651509859555146285145255352321999682157130608939103356893525914061520140530341882431649547073393176255324135564497495730231181478463515094768728944441103163944883413938946664295496
... (truncated - too long)
Full output: https://paste.pythondiscord.com/oguregacij.txt?noredirect
!e print([i for i in range(10e15])
@primal bison :x: Your eval job has completed with return code 1.
001 | File "<string>", line 1
002 | print([i for i in range(10e15])
003 | ^
004 | SyntaxError: closing parenthesis ']' does not match opening parenthesis '('
!e print([i for i in range(10e15)])
@primal bison :x: Your eval job has completed with return code 1.
001 | Traceback (most recent call last):
002 | File "<string>", line 1, in <module>
003 | TypeError: 'float' object cannot be interpreted as an integer
!e print([i for i in range(10_000_000_000_000_000_000_000_000)])
@primal bison :warning: Your eval job timed out or ran out of memory.
[No output]
!e print([x for x in {'apple', 'orange' , banana'}])
@primal bison :x: Your eval job has completed with return code 1.
001 | File "<string>", line 1
002 | print([x for x in {'apple', 'orange' , banana'}])
003 | ^
004 | SyntaxError: unterminated string literal (detected at line 1)
!e print([x for x in {'apple', 'orange', 'banana'}])
@primal bison :white_check_mark: Your eval job has completed with return code 0.
['banana', 'orange', 'apple']
!e print("Hello world!")
@neat hound :white_check_mark: Your eval job has completed with return code 0.
Hello world!
@pearl ibex :white_check_mark: Your eval job has completed with return code 0.
Hello there
!e
import asyncio
import httpx
urls = ['https://en.wikipedia.org/wiki/Discord',
'fjkdsfs'
'https://en.wikipedia.org/wiki/Python']
async def get_page(url):
async with httpx.AsyncClient() as client:
resp = await client.get(url)
resp.raise_for_status()
return resp
async def main():
responses = await asyncio.gather(
*[get_page(url) for url in urls]
)
return responses
print(asyncio.run(main()))
!e print("gib")
@primal bison :white_check_mark: Your eval job has completed with return code 0.
gib
pro
!e from pynput.keyboard import Key, Controller
import pyautogui as pg
import time
varables
keyboard = Controller()
LoopTime = 5
#Mouse movent step 1
time.sleep(1)
pg.moveTo(x=525, y=880)
pg.rightClick(x=525, y=880)
time.sleep(1)
pg.moveTo(x=525, y=780)
pg.click(x=525, y=780)
time.sleep(1)
Press and release enter and type youtube.com
time.sleep(1)
keyboard.type('youtube.com')
time.sleep(1)
keyboard.press(Key.enter)
keyboard.release(Key.enter)
time to to the next phase of mouse movent
time.sleep(3)
pg.click(x=436, y=302)
time.sleep(4)
pg.click(x=1080, y=741)
time.sleep(3)
pg.click(x=436, y=302)
time.sleep(4)
pg.click(x=1080, y=741)
time.sleep(3)
pg.click(x=436, y=302)
time.sleep(4)
pg.click(x=1080, y=741)
time.sleep(3)
pg.click(x=436, y=302)
time.sleep(4)
pg.click(x=1080, y=741)
time.sleep(3)
pg.click(x=436, y=302)
time.sleep(4)
pg.click(x=1080, y=741)
time.sleep(3)
pg.click(x=436, y=302)
time.sleep(4)
pg.click(x=1080, y=741)
time.sleep(3)
pg.click(x=436, y=302)
time.sleep(4)
pg.click(x=1080, y=741)
time.sleep(3)
pg.click(x=436, y=302)
time.sleep(4)
pg.click(x=1080, y=741)
time.sleep(3)
pg.click(x=436, y=302)
time.sleep(4)
pg.click(x=1080, y=741)
time.sleep(3)
pg.click(x=436, y=302)
time.sleep(4)
pg.click(x=1080, y=741)
time.sleep(3)
pg.click(x=436, y=302)
time.sleep(4)
pg.click(x=1080, y=741)
time.sleep(3)
pg.click(x=436, y=302)
time.sleep(4)
pg.click(x=1080, y=741)
time.sleep(3)
pg.click(x=436, y=302)
time.sleep(4)
pg.click(x=1080, y=741)
time.sleep(3)
pg.click(x=436, y=302)
time.sleep(4)
pg.click(x=1080, y=741)
@primal bison :x: Your eval job has completed with return code 1.
001 | Traceback (most recent call last):
002 | File "<string>", line 1, in <module>
003 | ModuleNotFoundError: No module named 'pynput'
guys can you join my server if you use repl.it?
or if youre a pro at pro-gramming ;)
!e print("Cool")
@boreal seal :white_check_mark: Your eval job has completed with return code 0.
Cool
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!*
@primal bison :white_check_mark: Your eval job has completed with return code 0.
hx7
@primal bison :white_check_mark: Your eval job has completed with return code 0.
Cool
!e print("Cool")!e print("Cool")
@primal bison :x: Your eval job has completed with return code 1.
001 | File "<string>", line 1
002 | print("Cool")!e print("Cool")
003 | ^
004 | SyntaxError: invalid syntax
@primal bison :white_check_mark: Your eval job has completed with return code 0.
Cool
@primal bison You've already got a job running - please wait for it to finish!
:incoming_envelope: :ok_hand: applied mute to @primal bison until <t:1649865009:f> (9 minutes and 59 seconds) (reason: duplicates rule: sent 4 duplicated messages in 10s).
@primal bison :white_check_mark: Your eval job has completed with return code 0.
Cool
what r u coding? just curious cause im new to coding
idk how u guys can code for so long, ive been trying to code for 2hrs and my brain is fried
wicked
ill try it out, want to play tomb raider with pointy boobs
pycharm
@hasty jungle
i cant code shit though
@night oyster wait my fortnite skins wont get chicks
i think i actually figured out my code problem, my first one
@hasty jungle love jack
Emotive yet chill, this radio plays a hand-picked selection of relaxing instrumental tracks that help to improve focus and increase concentration. No prominent lyrics, minimal arrangement, catchy rhythms, and chunky basslines of future garage and chillstep make this mix an ideal background for work and study sessions. The futuristic atmosphere c...
@gloomy lily @hasty jungle
hi guys
hi
not with python
i am trying to use a visualisation tool
and i need large datasets/logs
and my pc is only 2 months old
So i need any kind of log file, auth log, wifi log etc
but i dont know where i can find these?
it needs to be large because i will be filtering things down, and i need that still to be large enough to plot
Can anyone give me ideas?
where can i find large log files to analyse?
@hasty jungle Lapinga
help guys
roses <33
@hasty jungle how are you? :D
@final grail hello
everything
so
let's sing a How You Remind Me
@calm bay let's do emulator
what are you guys doing?
how to make a log in page
what is this superscript
@gloomy lily lesgo
aight comin
how oft is happening live-coding?
It gave a me what would be the baby of python and rust for loops, seems weird ```rs
for i in range(0){
println!("Hello world!");
}
now just get it to define range(), easy
π©
just set your keybinds in vsc to emacs, ez
.xkcd 378
hey why can't i screen share?
You need to be a longer member.
hi
screenshare perms have nothing to do with how long you've been a member but are given when you ask a mod for them temporarily to make sure people don't screen share anything inappropriate or just unrelated to coding
im trying to change the regex of this so its diffent but it needs to do the same thing any ideas ?
@rare blade please don't post chainmail
!e print ("end_program")
!e
input_string = input("Insert your string:\n") letter_list = [] start_program = "" end_program_list = [] for i in input_string: if i not in letter_list: letter_list.append(i) start_program += f"{(letter_list.index(i) + 1) * ''} = '{i}'\n" end_program_list.append(f"{(letter_list.index(i) + 1) * ''}") end_program = f"print({' + '.join(end_program_list)})" print(start_program) print(end_program)
!e print ("Are You Ok?")
!e for i in range(0){
println!("Hello world!");
}
@primal bison :x: Your eval job has completed with return code 1.
001 | File "<string>", line 1
002 | for i in range(0){
003 | ^
004 | SyntaxError: expected ':'
anyone active to help?
just a small OS python file reading from txt and extracting data
def self():
print("hello guys")
self()
actix, axum, rocket, warp
Lo Jake π
@gleaming shadow https://github.com/davatorium/rofi
Maybe you're running out of memory?
i am feeling well
FNA is a reimplementation of the Microsoft XNA Game Studio 4.0 Refresh libraries.
i wish u guys a good night and sorry fore anoying u
// Your First Program
class HelloWorld {
public static void main(String[] args) {
System.out.println("Hello, World!");
}
}
Design Patterns in Java with Core Java design, Patterns, design, Creational Design, Abstract Factory Pattern, singleton design patterns, Adapter, Visitor Pattern, Template Pattern, Command Pattern, State Pattern, java etc.
get forked
jkjk
where can i ask for help?
π¦
hi
live coding?
Live coding channel and it does not allow to stream π
Allowing anyone to stream was how we had the streaming of pornography. Thus, steaming is now regulated.
What projects do we have at live coding?
SERIOUSLY?
So the story goes.
@primal bison d
Yo ninjas
Anyone here available to help a beginner out with live coding?
It's a bit hard to solve it just over text.. much rather screen share instead π’
fyi the live coding vc is for people to stream themselves coding, not for help
https://github.com/D4RKH0R1Z0N/RDP-SPLOIT Can someone look into the code? I made it myself its in bin folder of the repo
<@&267628507062992896> iam new on your server
<@&267628507062992896> i don't no about your server and your lectures
@green jungle
<@&267628507062992896> and iam new on python
Feel free to read the two messages in #welcome for info about the server.
And please, don't ping people for help.
Hey @echo owl!
You either uploaded a .txt file or entered a message that was too long. Please use our paste bin instead.
@primal bison hey , im just a beginner in python so i learnt till tkinter, so what do you reccomend me to do next cuz i rlly wanna learn algortihm and data structures for it so what library should i tinker with to learn about algortihm and Machine learning?
Good for me
as you wish
two-ples
according to siri, it's ta-ple
not... what you said
yeah
data type in the sense, they mean abstract data type, IG...
sequence adt, and dictionary adt
i guess
abstract data type
im muted not yet verified
sequence...
lists, linked lists...
@fresh sail will be there in 5, in a game with noodle
dicts... binary search trees, heaps, hashtables
yes!
in dictionary you ask questions like...
does it have that element, what's next in that order...
what you have opened can you give me a 5 sec introduction
sequence.... is just loop over, certain sequence of elements
those are const data
In computer science, an abstract data type (ADT) is a mathematical model for data types. An abstract data type is defined by its behavior (semantics) from the point of view of a user, of the data, specifically in terms of possible values, possible operations on data of this type, and the behavior of these operations. This mathematical model cont...
int, floats are some constant data types
constant space
I meant constant space
@fresh sail
nvm
I meant... ints and floats they take constant space... these dicts and all have arbitary size
Abstract data types is like... what the requirements of a data type
For example, integers are an ADT, defined as the values ..., β2, β1, 0, 1, 2, ..., and by the operations of addition, subtraction, multiplication, and division, together with greater than, less than, etc., which behave according to familiar mathematics (with care for integer division), independently of how the integers are represented by the computer. [a] Explicitly, "behavior" includes obeying various axioms (associativity and commutativity of addition, etc.), and preconditions on operations (cannot divide by zero). Typically integers are represented in a data structure as binary numbers, most often as two's complement, but might be binary-coded decimal or in ones' complement, but for most purposes the user can work with the abstraction rather than the concrete choice of representation, and can simply use the data as if the type were truly abstract.
An ADT consists not only of operations but also of a domain of values, and of constraints on the defined operations. An "interface" typically refers only to the operations, and perhaps some of the constraints on the operations, such as pre-conditions and post-conditions; but not to other constraints such as relations between the operations.
For example, an abstract stack, which is a last-in-first-out structure, could be defined by three operations: push, that inserts a data item onto the stack; pop, that removes a data item from it; and peek or top, that accesses a data item on top of the stack without removal. An abstract queue, which is a first-in-first-out structure, would also have three operations: enqueue, that inserts a data item into the queue; dequeue, that removes the first data item from it; and front, that accesses and serves the first data item in the queue. If these were the entire definitions, there would be no way of differentiating these two data types and their very different expected ordering behavior. Thus, a constraint is introduced that for a stack specifies that each pop always returns (and removes) the most recently pushed item that has not been popped yet, and for a queue (in contrast) specifies that pop operates on the least recently pushed item.
read this...
NO
abstract data type is like what are the requirements for the stack...
yes
and you can implement stack alot of ways...
Like with a array, with a linked list
yep
primitive data types
anything that takes constant space... they are usually called primitive
@fresh sail he meant console
ah... that's so ugly!!
for primitives the value changes
for complex data structures the two variables will continue with the same pointer
so basically this is similar to java collections pool
Object pool collection
try this with lists or dicts
their the same memory
they won't change but rather the content inside would if you modified them
and when you hash tuple... it's hashes values... not id @calm bay
I wonder how they implement it!
same identity implies equal value implies equal hash
id: does not change for an object ever
value: can change, but only if the object is mutable or contains references to mutable objects
hash: is computed from the value, so if the value changes, the hash may change
@fresh sail install the Python Preview extension in Vscode
It is verifiable... wait a sec
if i remember right its a pointer array with 13 % over allocation on average (it starts with 100 then 50% over allocation)
@calm bay I think.. it will just recompute the hash for all values
π€£
do ctrl + b and ctrl + +
when did we start lessons on here?
can you post the timetable, I am learning python rn
Tuesday Thursday 11am EST
tuesday + thursday 11 am -1 pm est
thanks
so if you have a list of string
example = ["a","b","c""D"]
print(example)
try this since commas are important
pretty sure their saying that a list can contain anything in it unlike java
not yet
Just here listening π
"WELCOME TO THE CHANNEL"... you are becoming an youtuber π
π€£
And it's particularly tricky because it's a runtime bug with no error.
hello cat
hello kitty

