#voice-chat-text-0
1 messages · Page 942 of 1
Was so hoping the bot was going to get you
weren't we all
you egged me on
yeah after you suggested it
mhm
Yeah just a smidge. I'm heading home, I'll try and poke my head in the crew server
and specifically suggested doing 7
@rugged root you should consider making @gentle flint an admin
Not how that works
send it by bird via envelope
S'all good! I figure I always ping you to come talk other places, least I can do is pop my head in here every once in a while to say hi.
Drive safe.
blackbirds dont need visa
tell that to Farage
Operation Achse (German: Fall Achse, lit. 'Case Axis'), originally called Operation Alaric (Unternehmen Alarich), was the codename for the German operation to forcibly disarm the Italian armed forces after Italy's armistice with the Allies on 3 September 1943. The Germans disarmed over a million Italian troops within a matter of days, annihilati...
There are a ton of active channels. Go join a conversation.
Message number 2
wow why am i muted?
i have been verified a while ago , but deleted my account and made a new one
!paste
Pasting large amounts of code
If your code is too long to fit in a codeblock in discord, you can paste your code here:
https://paste.pythondiscord.com/
After pasting your code, save it by clicking the floppy disk icon in the top right, or by typing ctrl + S. After doing that, the URL should change. Copy the URL and post it here so others can see it.
!e py for i in range(6): print(i) if i == 4: print("Break") break print("I don't run.") print("Bye")
@somber heath :white_check_mark: Your eval job has completed with return code 0.
001 | 0
002 | 1
003 | 2
004 | 3
005 | 4
006 | Break
007 | Bye
!e py for i in range(6): if i == 4: continue print(i)
@somber heath :white_check_mark: Your eval job has completed with return code 0.
001 | 0
002 | 1
003 | 2
004 | 3
005 | 5
!d dict
class dict(**kwarg)``````py
class dict(mapping, **kwarg)``````py
class dict(iterable, **kwarg)```
Return a new dictionary initialized from an optional positional argument and a possibly empty set of keyword arguments.
Dictionaries can be created by several means:
• Use a comma-separated list of `key: value` pairs within braces: `{'jack': 4098, 'sjoerd': 4127}` or `{4098: 'jack', 4127: 'sjoerd'}`
• Use a dict comprehension: `{}`, `{x: x ** 2 for x in range(10)}`
• Use the type constructor: `dict()`, `dict([('foo', 100), ('bar', 200)])`, `dict(foo=100, bar=200)`
!e py d = {"Apples": 7} print(d["Apples"]) d["Pears"] = 8 print(d)
@somber heath :white_check_mark: Your eval job has completed with return code 0.
001 | 7
002 | {'Apples': 7, 'Pears': 8}
!e py t = 1, 2, 3 #tuple print(t[0]) #Print the first (zeroth) element of t. (Subscription) t[0] = 5#Attempt to change the first element of t to 5. Computer says "no".
@somber heath :x: Your eval job has completed with return code 1.
001 | 1
002 | Traceback (most recent call last):
003 | File "<string>", line 3, in <module>
004 | TypeError: 'tuple' object does not support item assignment
HOWEVER.
!e py a = [1, 2, 3] #list b = a, 4, 5 #tuple print(b) b[0][0] = 6 print(a) print(b)
@somber heath :white_check_mark: Your eval job has completed with return code 0.
001 | ([1, 2, 3], 4, 5)
002 | [6, 2, 3]
003 | ([6, 2, 3], 4, 5)
I need hellpppp
OMG
Hello again, OpalMist
G'day mate
I thought u were bri ish before, and I lived in Aus for 3 yrs
I have no idea how to code this project
Basically it's pixelization
Taking the average color value
Is there any way we can go private call? Really need to get it done...
() "parentheses" A lot of contextural uses, such as calling functions and methods (__call__), but used in the construction of tuples among other uses.
[] "square brackets". Used in lists and to subscript objects/ dictionary key specification (__getitem__ and __setitem magic methods.)
{} "curly braces" Used in the construction of both sets and dictionaries. Also sees use within string formatting contexts.
So that was for someone else.
Got it
I use both
in VSCode
Modules
to import images
Yeah I believe so
Can we go private call?
Oh nvm, I can't use the modules
I need to use for loops and calculations
It is a school project and I am frustrated
Ah, 2, 50
2 is the dimension
Like after the pixelization,
The width and height is 2
Yeah, half done is bcz of the 50
Hmm?
Yeah,
So basically,
50 is 50% of the image
And it's from right to left
The other half remains undone
Bigger example,
pixelization(image, 10, 60)
Text?
Oh u mean the descriptions?
Yeah we need to forget abt that module
Manually
Yes, very hard
Oh thx
Sorry
Yeah I am
Yeah
Pretty much
But I need to program the calculations and stuff myself instead of importing
Yeah
mhm
Oh thank u so much
I will
!e py print(*range(0, 20, 2))
@somber heath :white_check_mark: Your eval job has completed with return code 0.
0 2 4 6 8 10 12 14 16 18
Not back. Just posting handy things as I go.
!e py pvs = [(1, 2, 3), (4, 5, 6), (7, 8,9)] print([*zip(*pvs)])
@somber heath :white_check_mark: Your eval job has completed with return code 0.
[(1, 4, 7), (2, 5, 8), (3, 6, 9)]
Or more regular loopy
!e py pvs = [(1, 2, 3), (4, 5, 6), (7, 8,9)] for channel in zip(*pvs): #zip((1, 2, 3), (4, 5, 6), (7, 8, 9)) print(channel)
@somber heath :white_check_mark: Your eval job has completed with return code 0.
001 | (1, 4, 7)
002 | (2, 5, 8)
003 | (3, 6, 9)
!e py deltas = [(0, 0), (0, 1), (1,0), (1, 1)] point = 50, 50 subgrids = [] for x in range(0, 4, 2): for y in range(0, 4, 2): subgrid = [] for x_delta, y_delta in deltas: p = x + x_delta, y + y_delta subgrid.append(p) subgrids.append(subgrid) print(subgrids)
@somber heath :white_check_mark: Your eval job has completed with return code 0.
[[(0, 0), (0, 1), (1, 0), (1, 1)], [(0, 2), (0, 3), (1, 2), (1, 3)], [(2, 0), (2, 1), (3, 0), (3, 1)], [(2, 2), (2, 3), (3, 2), (3, 3)]]
Ah, no, I was right. I was just dialing up the dimensions too much.
So anyway. There's your underlaying mechanic.
A way to average the channels, reds with reds, greens with greens, etc (zip) and a way to target each subset of pixels, deltas, above.
You'll still have to fill in some blanks.
You'll understand where by studying and understanding these examples.
Unless I've stuffed it up and I'm an idiot.
Which is also possible.
Hmmmm
Definitely pick up try and except if you haven't already.
Particularly with IndexError as the given exception for except.
Pixelisation achieved.
Meaning the concept of approach I've given is sound.
Hmmm...
As in good. Not noisy.
It's not too comprehensive to me so far...
Okay, so if you look at the for loops with the step parameters...
Yeah
@somber heath :white_check_mark: Your eval job has completed with return code 0.
0 2
You can, from this, do...
!e py deltas = [0, 1] for x in range(0, 4, 2): xs = [x+d for d in deltas] print(xs)
@somber heath :white_check_mark: Your eval job has completed with return code 0.
001 | [0, 1]
002 | [2, 3]
You essentially split up 1 2 3 4 into 1 2 3 4
This is a 1D example of the principle.
(I have no idea when will I no longer be suppressed)
Voice verification
Can’t talk in voice chat? Check out #voice-verification to get access. The criteria for verifying are specified there.
!e ```py
n = 2
deltas = []
for i in range(n):
deltas.append(i)
for x in range(0, 10, n):
xs = []
for delta in deltas:
xs.append(x+delta)
print(xs)```
@somber heath :white_check_mark: Your eval job has completed with return code 0.
001 | [0, 1]
002 | [2, 3]
003 | [4, 5]
004 | [6, 7]
005 | [8, 9]
!e ```py
n = 2
deltas = []
for i in range(n):
deltas.append(i)
for x in range(0, 10): #removed third parameter of range, the step, n
xs = []
for delta in deltas:
xs.append(x+delta)
print(xs)```
@somber heath :white_check_mark: Your eval job has completed with return code 0.
001 | [0, 1]
002 | [1, 2]
003 | [2, 3]
004 | [3, 4]
005 | [4, 5]
006 | [5, 6]
007 | [6, 7]
008 | [7, 8]
009 | [8, 9]
010 | [9, 10]
!e print(*range(0,10))
@somber heath :white_check_mark: Your eval job has completed with return code 0.
0 1 2 3 4 5 6 7 8 9
!e print(*range(0,10,2))
@somber heath :white_check_mark: Your eval job has completed with return code 0.
0 2 4 6 8
!e print(*range(10))
@somber heath :white_check_mark: Your eval job has completed with return code 0.
0 1 2 3 4 5 6 7 8 9
range takes one, two or three arguments. If given one only, that argument is stop. If given two arguments, the first is start and the second is stop. If three are given, the first is start, the second is stop and the third is step. Unless otherwise specified, start is assumed to be 0 and step is assumed to be 1.
range(stop)
range(start, stop)
range(start, stop, step)```
Thus, if you wish to use step, you must fulfil all three parameters.
If you wish to use start, you must fulfil at least two.
These start stop step names are just descriptive. They are not "named parameters", I can't feed them keyword arguments. For example, I cannot do something like
range(stop = 5)```
!e py range(10, step = 2)Alas, this fails.
@somber heath :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: range() takes no keyword arguments
!e py delta_width = 2 x_width = 10 groups = [] for x in range(0, x_width, delta_width): group = [] for delta in range(delta_width): group.append(x + delta) groups.append(group) print(groups)
@somber heath :white_check_mark: Your eval job has completed with return code 0.
[[0, 1], [2, 3], [4, 5], [6, 7], [8, 9]]
Keep in mind, this would be written differently were you slicing numpy arrays.
This is more a Pillow only way.
I append group to groups, here, for illustrative purposes.
But in practice, you could iterate over group (positions) at that stage, pull out and average the pixels (zip, sum, //, len), then plug that back into each pixel as per group.
Image.putpixel likes tuples or ints for colour values, though, so if you use a list to store that average colour, you may need to cast it to tuple, first.
Also, I see why they set the 50 to do the right hand of the image. You could do it with the left, but...
Something something range something something start. 😁
Oh I am back
But maybe u are off to some other stuff
Hmm?
...
for x in range(...):
for y in range(...):
...
for x_delta in range(...):
for y_delta in range(...):
...
...```
!zen
Beautiful is better than ugly.
Explicit is better than implicit.
Simple is better than complex.
Complex is better than complicated.
Flat is better than nested.
Sparse is better than dense.
Readability counts.
Special cases aren't special enough to break the rules.
Although practicality beats purity.
Errors should never pass silently.
Unless explicitly silenced.
In the face of ambiguity, refuse the temptation to guess.
There should be one-- and preferably only one --obvious way to do it.
Although that way may not be obvious at first unless you're Dutch.
Now is better than never.
Although never is often better than right now.
If the implementation is hard to explain, it's a bad idea.
If the implementation is easy to explain, it may be a good idea.
Namespaces are one honking great idea -- let's do more of those!
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.
def pixelization(image, square_size):
for col in range(0, len(image), square_size):
for row in range(0,len(image[0]), square_size):
for
.
image[row][col], upper left to bottom right
def pixelization(image, square_size):
for col in range(0, len(image), square_size):
for row in range(0,len(image[0]), square_size):
for
image[row][col]=
def pixelization(image, square_size):
for row in range(0, len(image), square_size):
for col in range(0,len(image[0]), square_size):
list=[]
for row_delta in range(square_size):
for col_delta in range(square_size):
image[row][col]=
def pixelization(image, square_size):
for row in range(0, len(image), square_size):
for col in range(0,len(image[0]), square_size):
colors=[]
for row_delta in range(square_size):
for col_delta in range(square_size):
colors[row][col]=
!e py v = 1, 2, 3 print(sum(v))
@somber heath :white_check_mark: Your eval job has completed with return code 0.
6
!voice
Voice verification
Can’t talk in voice chat? Check out #voice-verification to get access. The criteria for verifying are specified there.
ok pardon sir
drink some water
!d enumerate
enumerate(iterable, start=0)```
Return an enumerate object. *iterable* must be a sequence, an [iterator](https://docs.python.org/3/glossary.html#term-iterator), or some other object which supports iteration. The [`__next__()`](https://docs.python.org/3/library/stdtypes.html#iterator.__next__ "iterator.__next__") method of the iterator returned by [`enumerate()`](https://docs.python.org/3/library/functions.html#enumerate "enumerate") returns a tuple containing a count (from *start* which defaults to 0) and the values obtained from iterating over *iterable*.
```py
>>> seasons = ['Spring', 'Summer', 'Fall', 'Winter']
>>> list(enumerate(seasons))
[(0, 'Spring'), (1, 'Summer'), (2, 'Fall'), (3, 'Winter')]
>>> list(enumerate(seasons, start=1))
[(1, 'Spring'), (2, 'Summer'), (3, 'Fall'), (4, 'Winter')]
``` Equivalent to...
(r0, g0, b0)
(r1, g1, b1)
(r2, g2, b2)
zip \/
(r0, r1, r2), (g0, g1, g2), (b0, b1, b2)
sum \/
r0+ r1+ r2, g0 + g1 + g2, b0 + b1 + b2
/ len(colors) \/
new_red, new_green, new_blue```
def pixelization(image, square_size):
for row in range(0, len(image), square_size):
for col in range(0,len(image[0]), square_size):
colors=[]
for row_delta in range(square_size):
for col_delta in range(square_size):
zip(*colors)
!e py print(4, 5, 6) print([4, 5, 6]) print(*[4, 5, 6]) #Like the first
@somber heath :white_check_mark: Your eval job has completed with return code 0.
001 | 4 5 6
002 | [4, 5, 6]
003 | 4 5 6
(r0, r1, r2), (g0, g1, g2), (b0, b1, b2)
def pixelization(image, square_size):
for row in range(0, len(image), square_size):
for col in range(0,len(image[0]), square_size):
colors=[]
for row_delta in range(square_size):
for col_delta in range(square_size):
for values in zip(*colors):
sum(values)/len(colors)
def pixelization(image, square_size):
for row in range(0, len(image), square_size):
for col in range(0,len(image[0]), square_size):
colors=[]
for row_delta in range(square_size):
for col_delta in range(square_size):
colors.append(image[row+row_delta][col+col_delta])
image[y][x][c]
image[y][x][0]
def pixelization(image, square_size):
for row in range(0, len(image), square_size):
for col in range(0,len(image[0]), square_size):
colors=[]
for row_delta in range(square_size):
for col_delta in range(square_size):
colors.append(image[row+row_delta][col+col_delta])
final=[]
for values in zip(*colors):
final.append(sum(values)/len(colors))
@west lion #❓|how-to-get-help
@somber heath There's no need to argue with him, just mute him...
!e py a = [0, 1, 2] a[0] = 5 print(a) a[0] = 2 print(a)
@somber heath :white_check_mark: Your eval job has completed with return code 0.
001 | [5, 1, 2]
002 | [2, 1, 2]
!e py a = [5, 7, 9] print(a[0])
@somber heath :white_check_mark: Your eval job has completed with return code 0.
5
!e py a = ["abc", "def", "ghi"] print(a[0][2])
@somber heath :white_check_mark: Your eval job has completed with return code 0.
c
def pixelization(image, square_size):
for row in range(0, len(image), square_size):
for col in range(0,len(image[0]), square_size):
colors=[]
for row_delta in range(square_size):
for col_delta in range(square_size):
colors.append(image[row+row_delta][col+col_delta])
final=[]
for values in zip(*colors):
final.append(sum(values)/len(colors))
image[row+row_delta][col+col_delta]=
@somber heath you think you could help me in #help-kiwi ? I think its a pretty easy question, and if you could answer in text
Yes these are there :) @somber heath
anyone here good with flask? I have a simple and dumb question I can't get fix
👋
The embodiment of apathy
Who's stealing my job again?
[2021-12-08 14:51:38,240] ERROR in app: Exception on /shipping/shipments/1229930/post-to-bc [GET]
Traceback (most recent call last):
if shipments.tracking is None:
NameError: name 'shipments' is not defined
shipment not shipments
Started today by taking out production with a typo
Fair enough
Provided to YouTube by DistroKid
Yog-Sothoth · The Darkest of the Hillside Thickets
Great Old Ones
℗ 1845714 Records DK
Released on: 2020-04-27
Auto-generated by YouTube.
Cyäegha
Guys I have just few in lines python script that i am not able to fully grasp i wonder if someone can help me reading it
!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.
yes
i can't speak in channel , actually idk why
!voice
Voice verification
Can’t talk in voice chat? Check out #voice-verification to get access. The criteria for verifying are specified there.
will have to just paste in the code with like thispy
you want me to upload the script ?
alright
It looks like i can't voiceverify cuz i don't meet the put in criteria
but i'll just send the script here
!paste
Pasting large amounts of code
If your code is too long to fit in a codeblock in discord, you can paste your code here:
https://paste.pythondiscord.com/
After pasting your code, save it by clicking the floppy disk icon in the top right, or by typing ctrl + S. After doing that, the URL should change. Copy the URL and post it here so others can see it.
it's there
I can also upload to my pastebin if u want
yeah it is !
few lines aight !
I am an infosec guy who doesn't know that much python
so what do you wanna know about it ?
this line there that says
self.stream = codecs.getreader(charset)(open(_file, "rb"), errors="ignore")
i looked it up and it says it returns some object called streamreader
I learned about statistics from AoC
Oh. codecs, not codex.
codecs.getreader(charset)
(open(_file, "rb"), errors="ignore")
StreamReader(open(_file, "rb"), errors="ignore")
Reader
Sounds like Java
Could this not be done with open(_file, charset=charset)?
so the codecs returns the streamreader and then that operates on the file ?
and what does it do to the file ?
self.stream = codecs.getreader(charset)(open(_file, "rb"), errors="ignore")
this was earlier today
what is this syntax codecs.getreader ( ) ( )
so that open thing is a param to the streamreader
now I am a Displaced Programmer
commands["menu"]()
And the same question goes floating , what does the streamreader object do to the file ?
so a those are parameters for the function returned by the prev function
read() returns the wholefile
so what is this codec module ... just for encoding decoding files ?
Yeah i did but i am trying it in idle
The point of using codecs here is it to read the file as a steam of continuous chars ?
Correctly
And open () can't do that
it just returns a file object and then that's converted to a stream ?
stream just looks like a str variable
i am havuing aproblem with this code
!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.
for (_, _string) in self.is_printable(self.stream):
what that for loop is actually doing ?
import algo.config as config
import asyncio
import websockets as ws
ws_client = WebsocketClient(api_key=config.api_key, secret_key=config.secret_key)
async def main():
asyncio.create_task(
ws_client.connect()
)
await ws_client.subscribe(
events=["!ticker@arr"],
)
loop = asyncio.get_event_loop()
loop.create_task(main())
loop.run_forever()
loop.close()
i can get it to bring output in console
but i cant get it to store in a variable
what is the parenthesis following the for keyword
*store
in here i dont understand the ( _ , _string)
def get_stuff():
return (1, 2)
we don't care about what var get the values from 0 thru 2
but we just put the _ there for syntactical purposes
just like pass
when we have nothing to say
Can you walk me thru the func is_printable()
so if that char is in the set of printable chars
current_string = (offset, [char])
what do we do ?
whats happening here
its getting appended to the current string list
initially it's an empty list so the cond is false and else executes
and what the else does is it reassign the current_string and set it to a tuble
why is that ?
def is_printable(stream):
"""Checks if the stream is printable."""
offset = 0
current_string = []
for char in stream.read():
if char in string.printable:
if current_string:
current_string[1].append(char)
else:
current_string = (offset, [char])
else:
if current_string:
yield (current_string[0], "".join(current_string[1]))
current_string = []
offset += 1```
so if the char is printable it appends it to current string
if its not printable ...the yeild is like a return statement ....but as return ends the function yeild doesnt
but still i am getting the purpose of the nested if else for those printable or not if else
what does that do ?
it seems its just reassigning the list to a tuple again
why the char is in brackets
?
why a list of 1 char ?
i kind of like get something
this code written is so suspicious .....did i learn python wrong 😂
initially the cond is false so the cuurent_string var is set to a tuble
and then the cond is true from that point forward and all the printable chars get appended to that second elem of the tuple
which is the list
we are not adding to the tuple
to the list
wont the nested if statements be always true ....why even put a if statement then
its not changing ....a new tuple is getting declared i think everytime the statement runs
current_string = [offset, [char]]
overriding ?
if current_string:
yield (current_string[0], "".join(current_string[1]))
current_string = []
offset += 1
and what that part says ?
and what does yield returns ?
it returns the string
like offset doesnt matter in this function .....just an unecessary variable
if statements also useless ...wont it always be true
I will be back in just a minute
both nested ifs ....for intial if else
if current_string:
ohh
yield (current_string[0], "".join(current_string[1]))
in here joining the 1st element to 0th element of list which is empty ...why'
then current stream will always be empty ...we are resetting it to empty always
I am here
before entering the for loop its empty ...... so the curr_str gets filled with else statement with current_string = (offset, [char])
and then we are trying to append current_string[1].append(char)
Hello
I'm trying to develop a graph for a mini program I'm creating, but whenever there is an input after the graph creation the graph will crash
Can anyone help me with this?
can u help me with this
can i send a litle bit of code?
Well, why he is using yield instead of return ?
usually a return destroys what evv was created in response of the func call but that yield here means that obj will not go away with the env ?
Yeah i will
A Computer Science portal for geeks. It contains well written, well thought and well explained computer science and programming articles, quizzes and practice/competitive programming/company interview Questions.
take a look here
import numpy
import matplotlib.pyplot as plt
mydata = numpy.zeros([24, 2], int)
mydata[8, 0] = 1
mydata[8, 1] = 2
mydata[9, 0] = 3
mydata[9, 0] = 12
print(mydata)
plt.plot(mydata)
#input()
If you uncomment the input the graph crash. Can someone explain the reason why?
still says i am not eligible
alright
is pycharm safe and correct app to learn python ?
It is safe for sure
uncomment the input
I wouldn't say it's the best one to learn Python on, though
i m using pycharm
do you know what input() does ?
yes, just click run
input() is an inbuild function ...why are you using it in your code ?
cause it s un menu that recives options
thats just an code exemple
look here DTM ...theres an easy example here
nope wrong code ...input is and python function
do you want to input your own data ?
the input doesn t start
after you guys are done, do you guys contemplate matlab code as well?
and it opens the graph?
!e
import string
print(string.printable)
@rugged root :white_check_mark: Your eval job has completed with return code 0.
001 | 0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ!"#$%&'()*+,-./:;<=>?@[\]^_`{|}~
002 |
003 |
sure, but i can t put all my code in the console
i need the graph
for (_, _string) in self.is_printable(self.stream):
if not self.is_readable(_string, 0.8):
continue
if len(_string) < str_len:
continue
if _dict:
valid = False
raw_str = ""
for char in string.ascii_letters + string.digits:
raw_str += char
raw_str = raw_str.split()
for data in raw_str:
if len(data) < str_len:
continue
for dic in _dict:
if dic.check(data.lower()):
valid = True
if not valid:
continue
_string = _string.strip()
strings.append(_string)
return {"all" : strings, "urls" : list(filter(self.url_regex.search, strings)),
"ips" : list(filter(self.ip_regex.search, strings))}
plot.what?
once you've run the plot calculation you need to show it with plt.show()
doing this works fine
import numpy
import matplotlib.pyplot as plt
mydata = numpy.zeros([24, 2], int)
mydata[8, 0] = 1
mydata[8, 1] = 2
mydata[9, 0] = 3
mydata[9, 0] = 12
print(mydata)
plt.plot(mydata)
plt.show()
input()
yes, i can creat the graph, but when i have an input it crash
although you might need to run it from console, not sure if pycharm will show it
i ve tried that
well it wasn't in your code
sure, my bad
what if you try just running python filename from the console
instead of using pycharm run
i have lot of code, cant do that
whyever not
open up a cmd
cd into your directory
run python and your filename
watch it execute
like I did
your console in pycharm exits before taking input
i m lost
1 sec
which line does it do that on?
i said it seeing in here ...the process just finished
is qq your filename ?
@lusty ravine instead run file in python console can you just use the Run command with right click with green icon
I think that's what he's doing
look at the elif x=='6'
it works
but i don t want the return so...
like this it crash
can you show whats the name of the function in which you have your elif statment
no
but if i add the return it stays with the same prob
when you call a function it has to return something ....if it doesnt it will return none
so it wont display the graph
and exits
so you want me to return what?
plt.show() should still show graph though ..i got confused now
exactly hahaha
if i add plt.pause(amount of secounds) it doesn t crash till amount of secounds is up
but than it crash
what do you want your code to do actually without crashing
show the graph and keep the menu runing and waiting for an input
if i input the graph op
the other options do other things
https://codepen.io/kowlor/pen/ZYYQoy @molten pewter
Here is a true time scaled solar-system, which means that every objects have a time relative to an Earth year....
will have to look at the whole code ....and understand what you doing
<p style="color: blue">
And while you guys are doing all that, I'm going to be hanging out with this guy:
it s too big...I won't steal your time any longer...
Thanks a lot for the help, for real
first time i join a call here and it' s very welcoming
Thanks allot
hail CSS
Glory to Pony
PonyORM in this case
Because fuck trying to deal with SQLAlchemy
Or however you spell it
What's wrong with SQLAlchemy?
squelchemy
Virtually IMpossible.
Imagine being held at gunpoint (bear with me) by a literate animal, and the only hope of rescue is (BEAR WITH ME) tweeting a coded message
31002
65704
Ailuropoda melanoleuc
פרסטר
grour or 7U079?
Ailuropoda is the only extant genus in the ursid (bear) subfamily Ailuropodinae. It contains one living and three fossil species of panda.Only one species—Ailuropoda melanoleuca—currently exists; the other three species are prehistoric chronospecies. Despite its taxonomic classification as a carnivoran, the giant panda has a diet that is primari...
This fact sheet describes the causes, signs and symptoms, diagnosis, and treatment of Pediatric Autoimmune Neuropsychiatric Disorders Associated with Streptococcal Infections (PANDAS).
Vipera berus, the common European adder or common European viper, is a venomous snake that is extremely widespread and can be found throughout most of Western Europe and as far as East Asia.Known by a host of common names including common adder and common viper, adders have been the subject of much folklore in Britain and other European countrie...
you can only choose a binary title for this form
and it's from the council, too
hey
frederik
come join
You've done Reason/ReScript right?
Yeah
Kind of the same experience minus the JS-specific syntax, although tooling is a bit finnicky
LSP support is pretty great so VS Code should be just fine
Better or worse thus far compared to Reason?
Reason kind of irks me how it reinstalls the OCaml toolchain, I know it's cached but do I really have to?
in your butt
that's not very nice... lol
at the very bottom, last lines of your code, have this:
if __name__ == '__main__':
main()
I did worst mistake that a beginner could ,I tried python for competitive coding 🥲
are you laughing after reading this
wake up
whats time there
almost 6am
you changed the time 🤔🤔
i know, i wrote it incorrectly at first
ok iam about to sleep now
good nights then
403
Traceback (most recent call last):
File "vt.py", line 27, in <module>
jdata = response.json()
File "/usr/lib/python3/dist-packages/requests/models.py", line 897, in json
return complexjson.loads(self.text, **kwargs)
File "/usr/lib/python3/dist-packages/simplejson/init.py", line 518, in loads
return _default_decoder.decode(s)
File "/usr/lib/python3/dist-packages/simplejson/decoder.py", line 370, in decode
obj, end = self.raw_decode(s)
File "/usr/lib/python3/dist-packages/simplejson/decoder.py", line 400, in raw_decode
return self.scan_once(s, idx=_w(s, idx).end())
simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
It keeps giving this back
idk how to resolve it
here's the script
#!/bin/python3
import requests
import os
import hashlib
import pefile
import json
file = "/home/dtm/Desktop/malware-samples_password-is-infected/Darkshell/malware.exe"
pe = pefile.PE(file)
raw_data = pe.data
md5_obj = hashlib.md5()
md5_obj.update(raw_data)
md5_hash = md5_obj.hexdigest()
#print(f"{file} has an md5 hash of:{m5_hash}")
api_key = " 567cca3460e7d0a59152787cac5c78ae70ea8cc14d6ee33f424e77efe0732a05"
params = {"api_key":api_key,"resource":md5_hash,"allinfo":True}
headers = {"Accept-Encoding":"gzip, deflate","User-Agent":"vt.py "}
response = requests.get("https://www.virustotal.com/vtapi/v2/file/report",params=params,headers=headers)
print(response.status_code)
jdata = response.json()
Dutch prosecutors confirmed that a hacker guessed President Trump's Twitter password in October, although the company has not confirmed the hack.
do't puit that there
हिन्दुई
🌞 = 日
you teach her about radicals?
水中火
水
火
人
Learn Chinese with Arch Chinese
わ
た
し
あ
ア
雷ですよ
私の雷は大きですね
!voice
Voice verification
Can’t talk in voice chat? Check out #voice-verification to get access. The criteria for verifying are specified there.
numpy
@somber heath when you have a moment please come down to #751591688538947646, I need to test some mic settings
I'll be a while.
hi
Hi
brb I hear you
!ot @night chasm
Off-topic channels
There are three off-topic channels:
• #ot2-never-nester’s-nightmare
• #ot1-perplexing-regexing
• #ot0-psvm’s-eternal-disapproval
Their names change randomly every 24 hours, but you can always find them under the OFF-TOPIC/GENERAL category in the channel list.
Please read our off-topic etiquette before participating in conversations.
A crude ticket system for work
@velvet meadow
what's up guyszzzzzz....
Yooooo
how's the Christmas 🎉 are going on
Hmm ... why am I thinking of Cadalac (didn't learn how to spell it) or whatever that "rich middle class" car is
nya ?
nice choice tho,
Are you in the VC ?
We can still talk to him in here regardless
no just imagining cadalac
*knock knock!* "Die-a-gram!"
"Huh?"
"*Ack!*" *thunk*
Sorry for being blunt, but this is the text channel for #751591688538947646
so you can't listen either I guess?
I have.... so many questions but none of them are appropriate to ask
i can but certainly i am listening to something else
Yeeeep
32 deg F = 0 deg C
i will bein after sometime possibly . i am taking a workshop right now
IIRC, Kelvin is Celsius but shifted where 0 K is a higher C
Is it an old computer @rugged root ?
For....
i as always
Also brb
have an error
Possibly after I get back, have to do an IT thing at work
we have more mods ig
i have only 15 to 20 mins bruh!
why stuff breaks at bad moment
any django guy
Have you tried a help channel?
till rn nah
usually pretty good for getting a solid reply if you paste the relevant code and the error message
I'm not speaking as people are asleep irl in this house
06:48 / 6:48 AM .... over an hour till 8 AM so .... ugh ...
!stream 446207619837984777
✅ @stuck sky can now stream until <t:1639061728:f>.
windows classic theme go brrrrrr
dwm is still there
I see that and be like "uhhhhhh"
how do i automatically restart a python script when it gets an error
i am running it on pythonanywhere
on bash console
i think
I've seen this used to restart a script from within itself
os.execv(sys.argv[0], sys.argv)
they have an option like this but its paid premium stuff
i got this from google search
but i cant understand how it will work
its a personal code so i can get into bad practices
how bad is it
i know what type of error i get, its an error from api i am using
i think its for repeated requests
do you have a limiter in place so you aren't making too many requests at once?
you can use a queue
i am not crossing the limits as stated by api documentation
you can use a while loop and try/except/else to try until a success
while True:
try:
#code with possible error
except:
continue
else:
#the rest of the code
break
maybe throw a tiny sleep in there
i use micro for programming in python
Micro?
w3schools?
Yeah
micro is a terminal text editor
Slightly bigger than nano?
idk maybe
i'm working on a text adventure game written in python
Those are fun
def latestprice(symbol):
while True:
try:
raw = client.send("ticker", {"symbol": symbol})
raw_data = raw[1]
print("The current price is", (raw_data['lastPrice']))
return raw_data['lastPrice']
except:
continue
can put this in a function
boring period starts my internet is going to die
what does it do
print("Escape from The Ship!")
input("Enter a passcode to go back to a part of the game or type 's' to start a new game")
if input == "s":
``` here's what i've done so far
what is it , by the way just ask
Nah nah, it was more of a joke
nevermind, didn't see the return
its showing grayish on "break", does it mean error, i am using vs code
i tired vim once
i haven't tried emacs yet
they have their own language emacs lisp
🤦♂️
Best Vim cheatcode: !emacs<CR>
Well played
I didn't see your return, so you don't need the else: break
!stream 128363483828977664
✅ @woeful salmon can now stream until <t:1639063772:f>.
I would throw a little sleep in your except statement
@crystal fox
def latestprice(symbol):
while True:
try:
raw = client.send("ticker", {"symbol": symbol})
raw_data = raw[1]
print("The current price is", (raw_data['lastPrice']))
return raw_data['lastPrice']
except:
print("it showed an error, the script is sleeping for 1 min")
time.sleep(60)
print("script restarted")
continue
like this?
1 minute may be a little much if you needed it to excecute quickly
i was thinking like, 0.25 of a second
sleep is also blocking
so you probably don't want it non-functional for 60 seconds
wdym?
async def sleep()
your program cannot do anything while it's sleeping
it should be fine to just have a 0.25 sleep in there
4 per second shouldn't rate limit you but I don't know your api
I still hate bare excepts
Was a joke about a non blocking sleep
Traceback (most recent call last):
File "/home/ShinPie/wazirx-connector-python/ex.py", line 58, in <module>
price[price_check_round] = latestprice(coin_symbol)
File "/home/ShinPie/wazirx-connector-python/ex.py", line 20, in latestprice
print("The current price is", (raw_data['lastPrice']))
KeyError: 'lastPrice'
Spend more time working on the pipeline than the project itself
i always get this error
Bear excepts. If your code raises an exception, a bear breaks into your house and roars at you and eats all your food.
Then shits on the rug.
So many people today
noodle, you ever consider using discord folders.. just saw a glimpse of your channels.. just a suggestion
Hi everyone
Yo
except e:
... # FIXME: Handle this error
👀 i would probably do it 1 day
today just ain't it since i'm still on advent day 5 part 2
gotta catch up
xD
def latestprice(symbol):
while True:
try:
raw = client.send("ticker", {"symbol": symbol})
raw_data = raw[1]
print("The current price is", (raw_data['lastPrice']))
return raw_data['lastPrice']
except KeyError:
print("it showed an error, the script is sleeping for 1 min")
time.sleep(60)
print("script restarted")
continue
is the exception okay for this
???
What?
not
except Exception as e:
?
Is perfect
No
Exactly
Except all the things
Where do you people find those so quickly?
Beware the bare exception bear.
Copilot suggested the end of my comment
And then PyCharm corrected my grammar
Is this the future?
OverClocked ReMix is a video game music community with tons of fan-made ReMixes and information on video game music.
http://www.tomscott.com - "Two Drums and a Cymbal Fall off a Cliff - b'doom, tssh". That's the joke: but does it really give you that rimshot sting you hear in comedy? We investigate.
Uhm.. Is asus vivobook a good choice?
AI writes the code... and the documentation now too?
This is why I work in devops.
It's safe
..... for now
Take it with a grain of salt, but I'm reeeaaaallllllllly hesitant to suggest Asus prebuilts
The ones I've encountered have cooling issues out the wazoo
(What would you recommend then?)
Uhm yeah
dell idk
Dell is fine
I'd avoid the big like "gaming names", since you're pretty much paying for the brand
Alienware and the like
Unless you want that power specifically
i have a lenovo ideapad running kde neon
In hp which do you suggest
What kind of specs are you looking for/ what are you going to be using it for?
lenovo is good for linux
I will be programming
I'm not gonna game
Unity supports Linux?
Haaay~
Oh then really any spec should be fine. Probably want 8 gig ram minimum for sure....
Linux doesn't really look like anything
the desktop environments are what define how your os looks which you can easily switch out
Should I look for smthng else?
4GB here. Discord freezes every time I run tox -r...
my lenovo ideapad runs a intel cpu with integrated graphics with 4gb ram 😦
ubuntu has support for touchscreen
and a 54gb storage
Yeah that one look good
I'd like to take a moment to shill for remote development
GitHub Codespaces, https://vscode.dev , Cloud9, GitPod, etc
That's the one I forgot
Windows 64 bit wants at least 8
Both Windows 10 and Windows 7 have minimum RAM requirements, namely, 1GB for the 32-bit versions and 2GB for the 64-bit versions.
my laptop is from 2020 ad has 4gb ram
Oh didn't realize that, shen
4gb really hard for multi tasking
For sure
I have a hp 4gb rn
However you do want to keep in mind that even if you get a lower gig machine, you'll likely be able to upgrade it
Lies
No way Windows runs on 2GB
The only things you can upgrade are going to be storage and memory, but that can help you decide on a potentially cheaper machine that you know you can upgrade or will be upgrading
Like getting one with an HDD and pricing to see if it's cheaper to get that one and swapping it with an SSD or just buying one that comes with an SSD
If that makes sense
Yeah it does thanks
ABP
Always Be Pricing
BUT, I will say sometimes it's better to just get a solidly made pre-built
Like what I did with the HP I got
I knew I could trust it (been using HPs for work for years), and the price and specs were reasonable
Plus I've always wanted to try those 2 in 1 laptop/tablet jobbers
There might be some issues with warranty though, if you open up the machine.
Fair point
Although I feel like they are fairly lax about it when it comes to memory and storage, it is recommended to double check the warranty conditions
Mispelled it
(rest its soul)
Uhm what do you think of ryzen. I heard it's cheaper and not so behind from intel.
They're perfectly fine
Thanks then. Really appreciate your helps 
Wow, if I had a nickel for every time I [...], I'd have two nickels - which isn't a lot, but it's weird that it happened twice. - Dr. Heinz Doofenshmirtz
HP 14 FQ 1030ca*
AMD RYZEN 5 5500U
8GB RAM 512GB SSD
14.0'' FHD DISPLAY
FINGER PRINT WIN10
That time of the year to avoid supermarkets where Christmas music is non-stop...
This good right.
Can you remove the GPO?
Or if you disabled the internet, do you have to fix per computer manually?
Cool I'll go with thisthen
It's an honorary Christmas movie. Absolutely part of the club, but not designed to be.
You know your friend's Minecraft: Java Edition client has a memory leak when only they see this:
https://cdn.discordapp.com/attachments/833504790712418304/918343951801544814/Replay_2021-12-09_08-59-15.mp4
👾
What does 🚀 mean as an emoji response to a GitHub issue post?
Ah, okay. "Yay, progress!" I guess.
Don't let your manager know! Or you might automate your own job away!!
Ah. Amazing bus factor.
That was my first exposure to it all
Was it this thing @crystal fox ? https://www.computinghistory.org.uk/userdata/images/large/60/11/product-106011.jpg
Yeah I think we did like one lesson with this then never saw it again 😄
Also this program where you control traffic lights with flow control diagrams.
Ah right.
Wish computer science was an option when I was at school 
Yeap, pretty much 😑
it's an option in my school and next year im taking CS
I used to use steel pan practice to get out of classes 😄
👋
gonna work on python
Nice, you're in the right place!
having problem
What's the nice way to say "Please make sure you tell me why you need help when asking for help"?
Ah yeah, on the drop down menu where it says <No interpreter> you need to select an installed version of python. If there aren't any options, then I believe you may need to add Python to your Windows path variable?
Like, checking for XY problem?
i think it also shows that when nothing is set
oh yeah]
i just installyed python in the middle of pycharm
i think thats why the interpreter wasn't detected
it detected the older one
which i deleted
oh then probably just restart it
I have actually said that
But then, a few days later...
"I can in a moment, what's going on?"
Kek
the reminder expects you to travel through time to get to the meeting
He always has a picture of something or other
Basically
🤣
I only now got to know about disc golf
He sent me his wife's contact card, which included his picture for her
Do I need to remove that?
He took the picture
And saved it to his contact for her
And then sent it to me
I was lucky enough to be in the crowd just a few meters from James Conrad when he made his final official throw on day 5 of the Disc Golf World Championships at Fort Beunaventura Park in Ogden Utah.
Taken on a Google Pixel 5.
interesting
that's cool
Probably
Raw reactions + FollowFlight® of what is being called the greatest shot in disc golf history thrown by James Conrad at the 2021 PDGA Pro Disc Golf World Championships. For licensing inquiries contact discgolf@jomezpro.com ©2021 Jomez Productions, LLC.
Card: James Conrad, Kevin Jones, Calvin Heimburg, Paul McBeth
Tournament: 2021 PDGA Disc Golf...
Sorry, we went off on a few tangents
Did you figure out your thing?
Do you need help?
can't locate the interpreter
indeed
@sour owl If you want to talk to us it's better to do it in here. Typically if we're in the voice chat, we'll be watching the paired voice chat text channel
That way no one gets left out of the conversation
So, when you're editing a run configuration, you can only select from interpreters that you've already created
Ok thanks
What's up Everyone ?
In the bottom right corner, select the interpreter (it might say "<No interpreter>") and select "Interpreter settings..."
Oh shit
Oh, so you're still installing Python. 👍
You'll have to wait for it to finish
ok done
so i'll have to restart pycharm yes?
Yes
After this installation finishes
i set it but it's showing this
is it an issue?
this is the location i choose
what should i uninstall? @sweet lodge
No
So....
That "Start Menu" folder contains a shortcut to Python executable that it places in the Start Menu, not the executable itself
You can ignore that entire folder
PyCharm has already detected the location of the Python executable and has already set it up for you. You can see that Base Interpreter has already been filled in with the correct location of the Python executable.
You need to decide where you want PyCharm to setup the interpreter, and specific that the in Location field.
Generally, people place the interpreter inside their project, inside a folder called venv
For example, my project, bradworks is located here C:\Users\BradleyReynolds\programming\projects\darbia\bradworks, and I wanted to use the generic "venv" name, so I will set my Location to C:\Users\BradleyReynolds\programming\projects\darbia\bradworks\venv\
@crystal fox i found a match cya after it if you're still here
gl hf
A crude ticket system for work
I tested Twilio months and months ago, but we never ended up using them
I didn't know there was even billing information attached to the account
No problem, I'll just close the account
Can anyone help me understand this error message?
OMG TYSM IT WORKS
UR THE BEST :D
For today’s episode of War Stories, Ars Technica sat down with Naughty Dog Co-founder Andy Gavin to talk about the hurdles in bringing the original Crash Bandicoot to gamers around the world. When Andy and his partner Jason Rubin made the decision to bring the action platforming genre into three dimensions, it required living up to their company...
I've never seen that before
It's getting cut off, can you copy and paste the entire error?
sorry i can't read that it's not monospace
Look at this configuration
Chill with the all caps
It's setup to run main.py
i saw it
ohhh
i changed the name
i mean
i deleted it
;-;
fuck it
Yeah
So, if you change the name of the file, you'll have to update the run configuration to let it know that it now needs to look for a different file
If you copy the "Absolute path", you should be able to just paste the entire thing into your run configuration
Copy as reference can do GitHub URLs now?
I love PyCharm
Oh, and FYI, you can right click in a file and select "run", and it'll setup a run configuration for you
@rugged root - random question - do you use PyCharm?
I was mostly just curious what you liked to use
I'm just curious about the perspective from people that don't spend all day working in their IDE
@sweet lodge
👋
@crystal fox https://pypi.org/project/Eel/
@sweet lodge
BRB, a vendor called
alright
also, could you guys maybe take this somewhere else? this is for voice chat not for your own support problems
since neither of you are in voice....
just sayin'
Am in voice
just sayin'
