#voice-chat-text-0
1 messages · Page 1015 of 1
i'm suppressed from serveur idk why
okey thnx @somber heath
can u help me plz with module subprocess in python ?
i did dir
Path.glob(pattern)```
Glob the given relative *pattern* in the directory represented by this path,
yielding all matching files (of any kind):
```py
>>> sorted(Path('.').glob('*.py'))
[PosixPath('pathlib.py'), PosixPath('setup.py'), PosixPath('test_pathlib.py')]
>>> sorted(Path('.').glob('*/*.py'))
[PosixPath('docs/conf.py')]
```...
@wind raptor i cant talk
!voice
Voice verification
Can’t talk in voice chat? Check out #voice-verification to get access. The criteria for verifying are specified there.
@wind raptor can i talk to you in dm?
yea
Ok can you help me extract a specific data from a txt file
from a text
can you join vc in dm so i can let you know and screen share
i can pay you , i dont have any experience in python
man hate typing but what can i say
Hi! Sometimes, the helper tag is annoying, huh?
ok so
{
name ="prop_drink_champ",
label ="Full Champagne Glass",
price = 100
},
{
name ="prop_drink_champ2",
label ="Full Champagne Glass",
price = 100
},
{
name ="prop_drink_champ3",
label ="Full Champagne Glass",
price = 100
},
this is the data in the lua file , and its almost 5000 lines
i just want where is says name="prop_drink_cham", , i just want what is in " " after the name
so the result should look like
"prop_drink_cham",
"prop_drink_cham2",
"prop_drink_cham3",
@wind raptor
yea its lua
Everything is json, with enough regex!
Hey @weary sedge!
You either uploaded a .txt file or entered a message that was too long. Please use our paste bin instead.
so can you help
👍
!e
import re
text = """ {
name ="prop_drink_champ",
label ="Full Champagne Glass",
price = 100
},
{
name ="prop_drink_champ2",
label ="Full Champagne Glass",
price = 100
},
{
name ="prop_drink_champ3",
label ="Full Champagne Glass",
price = 100
},"""
matches = re.findall(r'name ="([^"]*)"', text)
print(matches)
@wind raptor :white_check_mark: Your eval job has completed with return code 0.
['prop_drink_champ', 'prop_drink_champ2', 'prop_drink_champ3']
can you make it output without the [ ] and the commands should be " instead of '
This just gives you a list of matches, you can do what you want with that list
Python displays strings with a single quote
It's just showing the strings in the list
If you want the double quotes, just put them in the brackets
!e
import re
text = """ {
name ="prop_drink_champ",
label ="Full Champagne Glass",
price = 100
},
{
name ="prop_drink_champ2",
label ="Full Champagne Glass",
price = 100
},
{
name ="prop_drink_champ3",
label ="Full Champagne Glass",
price = 100
},"""
matches = re.findall(r'name =("[^"]*")', text)
for match in matches:
print(match)
@wind raptor :white_check_mark: Your eval job has completed with return code 0.
001 | "prop_drink_champ"
002 | "prop_drink_champ2"
003 | "prop_drink_champ3"
!e
import re
text = """ {
name ="prop_peanut_bowl_01",
label ="Peanut Bowl",
price = 300
},
{
name ="prop_cs_bowl_01",
label ="Bowl",
price = 700
},
{
name ="prop_cs_bs_cup",
label ="Cup",
price = 250
},
{
name ="prop_fruit_stand_03",
label ="Fruit Stand 1",
price = 300
},
{
name ="prop_fruit_stand_02",
label ="Fruit Stand 2",
price = 300
},
{
name ="prop_fruit_stand_01",
label ="Fruit Stand 3",
price = 300
},
{
name ="prop_fruit_stand_03",
label ="Fruit Stand 4",
price = 300
},
{
name ="prop_fruit_stand_04",
label ="Fruit Stand 5",
price = 300
},
{
name ="p_ing_coffeecup_02",
label ="Coffee",
price = 100
},
{
name ="prop_cs_beer_box",
label ="Beer Box",
price = 100
},
{
name ="prop_beer_box_01",
label ="Beer Box 2",
price = 100
},
{
name ="beerrow_world",
label ="Beer 1",
price = 100
},
{
name ="prop_amb_beer_bottle",
label ="Beer 2",
price = 100
},
{
name ="prop_beer_blr",
label ="Beer 3",
price = 100
},
{
name ="prop_beer_logger",
label ="Beer 4",
price = 100
},"""
matches = re.findall(r'name ="([^"]*)"', text)
print(matches)
@weary sedge :white_check_mark: Your eval job has completed with return code 0.
['prop_peanut_bowl_01', 'prop_cs_bowl_01', 'prop_cs_bs_cup', 'prop_fruit_stand_03', 'prop_fruit_stand_02', 'prop_fruit_stand_01', 'prop_fruit_stand_03', 'prop_fruit_stand_04', 'p_ing_coffeecup_02', 'prop_cs_beer_box', 'prop_beer_box_01', 'beerrow_world', 'prop_amb_beer_bottle', 'prop_beer_blr', 'prop_beer_logger']
@wind raptor is there anyway possible i can do all the 5000 lines at one time?
open(file, mode='r', buffering=- 1, encoding=None, errors=None, newline=None, closefd=True, opener=None)```
Open *file* and return a corresponding [file object](https://docs.python.org/3/glossary.html#term-file-object). If the file cannot be opened, an [`OSError`](https://docs.python.org/3/library/exceptions.html#OSError "OSError") is raised. See [Reading and Writing Files](https://docs.python.org/3/tutorial/inputoutput.html#tut-files) for more examples of how to use this function.
*file* is a [path-like object](https://docs.python.org/3/glossary.html#term-path-like-object) giving the pathname (absolute or relative to the current working directory) of the file to be opened or an integer file descriptor of the file to be wrapped. (If a file descriptor is given, it is closed when the returned I/O object is closed unless *closefd* is set to `False`.)
hola everybody
Hey @weary sedge!
You either uploaded a .txt file or entered a message that was too long. Please use our paste bin instead.
@weary sedge :x: Your eval job has completed with return code 1.
001 | Traceback (most recent call last):
002 | File "<string>", line 3, in <module>
003 | TypeError: open() missing required argument 'file' (pos 1)
Hey @weary sedge!
You either uploaded a .txt file or entered a message that was too long. Please use our paste bin instead.
@weary sedge :x: Your eval job has completed with return code 1.
001 | Traceback (most recent call last):
002 | File "<string>", line 3, in <module>
003 | NameError: name 'file' is not defined. Did you mean: 'filter'?
emmm why no one chat
@weary sedge
hey man i really apprecite you putting me in the right direction but i gotta let you know i dont know code at all
i would really apprecite if you can run the file for me and send me the results , would be a lot helpfull since im in a hurry
If you want help learning I can help you learn, if you don't want to learn, I am not just doing it for you.
You can use the existing code I gave you and paste in all 5000 lines if you want a shortcut
!e py nums = 1, 2, 3, 4, 5, 6 i = 3 print(nums[:i]) print(nums[i:])
@somber heath :white_check_mark: Your eval job has completed with return code 0.
001 | (1, 2, 3)
002 | (4, 5, 6)
for x, y in enumerate(arr)
!e py things = "abc" for i, v in enumerate(things): print(i, v)
@somber heath :white_check_mark: Your eval job has completed with return code 0.
001 | 0 a
002 | 1 b
003 | 2 c
!e py things = "abc" for i in range(len(things)): print(i, things[i])You could do this, but if you ever see this pattern, it's where you're better off using enumerate, even if you're only after the values of i.
@somber heath :white_check_mark: Your eval job has completed with return code 0.
001 | 0 a
002 | 1 b
003 | 2 c
[:x]
!e py nums = 1, 2, 3 result = sum(nums) print(result)
@somber heath :white_check_mark: Your eval job has completed with return code 0.
6
!e py text = "abcdefg" for i, _ in enumerate(text, 1): print(text[:i])
@somber heath :white_check_mark: Your eval job has completed with return code 0.
001 | a
002 | ab
003 | abc
004 | abcd
005 | abcde
006 | abcdef
007 | abcdefg
==
if sum(arr[:x]) == sum(arr[x:]):
return x
else:
return -1```
for i, _ in enumerate(arr, 1):
what is the problem?
I don't think the comparison is right.
It currently compares 1 + 2 + 3 == 4 + 3 + 2 + 1 when given 1, 2 ,3 ,4 ,3, 2, 1.
The question wants index x to be skipped in the comparison.
no, arr[x+1:]
!e py text = "abcdefg" for i, _ in enumerate(text): print(text[:i], text[i:])
@somber heath :white_check_mark: Your eval job has completed with return code 0.
001 | abcdefg
002 | a bcdefg
003 | ab cdefg
004 | abc defg
005 | abcd efg
006 | abcde fg
007 | abcdef g
passed all
def find_even_index(arr):
for i in range(len(arr)):
if sum(arr[:i]) == sum(arr[i+1:]):
return i
return -1
but it is not efficient... time complexity is O(n^2)... we can do it manually and get it down to O(n)
it sum till before i
!e
A = [0, 1, 2, 3]
print(A[:2])
@signal sand :white_check_mark: Your eval job has completed with return code 0.
[0, 1]
it gives till index 2 but not 2
it makes sense because, we if we do A[:0] it gives empty container
!e
A = [0, 1, 2, 3]
print(A[:0])
@signal sand :white_check_mark: Your eval job has completed with return code 0.
[]
doesn't seem like the same continuity
@lyric moss :white_check_mark: Your eval job has completed with return code 0.
5
!e
A = [1, 1, 2, 3]
print(sum(A[:2]))
@lyric moss :white_check_mark: Your eval job has completed with return code 0.
[1, 1]
because A[:2]
gives
[1,1]
.
empty container
A[index : how many you want]
!d slice
class slice(stop)``````py
class slice(start, stop[, step])```
Return a [slice](https://docs.python.org/3/glossary.html#term-slice) object representing the set of indices specified by `range(start, stop, step)`. The *start* and *step* arguments default to `None`. Slice objects have read-only data attributes `start`, `stop`, and `step` which merely return the argument values (or their default). They have no other explicit functionality; however, they are used by NumPy and other third-party packages. Slice objects are also generated when extended indexing syntax is used. For example: `a[start:stop:step]` or `a[start:stop, i]`. See [`itertools.islice()`](https://docs.python.org/3/library/itertools.html#itertools.islice "itertools.islice") for an alternate version that returns an iterator.
!d range
class range(stop)``````py
class range(start, stop[, step])```
The arguments to the range constructor must be integers (either built-in [`int`](https://docs.python.org/3/library/functions.html#int "int") or any object that implements the [`__index__()`](https://docs.python.org/3/reference/datamodel.html#object.__index__ "object.__index__") special method). If the *step* argument is omitted, it defaults to `1`. If the *start* argument is omitted, it defaults to `0`. If *step* is zero, [`ValueError`](https://docs.python.org/3/library/exceptions.html#ValueError "ValueError") is raised.
For a positive *step*, the contents of a range `r` are determined by the formula `r[i] = start + step*i` where `i >= 0` and `r[i] < stop`.
For a negative *step*, the contents of the range are still determined by the formula `r[i] = start + step*i`, but the constraints are `i >= 0` and `r[i] > stop`.
when you say
A[0:2] = A[:2]
you are saying like I want 2 items starting from 0
but when im saying A[2:]
A[index : how many you want]
here you are saying
from index 2... give me all
including 2*
python nicely puts
A[2: len(A)]
for you
it is nice and consistent
wait a sec and think
A left-closed, right-open interval. Very wordy.
A[start with this index : give me this many items from that index]
when you say
A[:2]
python uses 0 as default value
A[0:2]
from index 2... give me all
that wouldn't imply that
How would you count from 1 to 3?
2
Doesn't work with the end index though...
A[:2] = A[0:2] from 0 give me 2 - 0 elements
A[2:] = A[2:len(A)] from 2 give me len(A) - 2 elements
it counts till 5, range(3, 6)
whoops
off by one errors are the most annoying type of errors
haha
off by one errors might be equivalent to halting problem... so, it's not even hard, it is impossible
halting problem is... general algorithm to detect infinite loops
off by one errors is... general algorithm to detect off by one errors! (my definitoin)
yeah... when they happen just try adding +1, -1 and so on
@lavish rover Hey can you help me?
What's up
Have you tried the help channels?
Yes.
Voice verification
Can’t talk in voice chat? Check out #voice-verification to get access. The criteria for verifying are specified there.
Can you un-deafen yourself? I'd prefer to talk than help you over chat considering you're in the voice channel
@lavish rover Ok.
So basically im trying to have all the hex codes print out on the label.
and basically i need to put some of the hex code converter function into another function
and make it all print out.
but small brain cant do that.
def rgb2hex(val):
"""
Takes tuple and converts to hex value.
"""
conversion = '#%02x%02x%02x' % val
return conversion
#analogous color theory
def analogous(val, d):
analogous_list = []
#set color wheel angle
d = d /360.0
#value has to be 0 <span id="mce_SELREST_start" style="overflow:hidden;line-height:0;"></span>< x 1 in order to convert to hls
r, g, b = map(lambda x: x/255.0, val)
#hls provides color in radial scale
h, l, s = colorsys.rgb_to_hls(r, g, b)
#rotate hue by d
h = [(h+d) % 1 for d in (-d, d)]
for nh in h:
new_rgb = list(map(lambda x: round(x * 255),colorsys.hls_to_rgb(nh, l, s)))
new_rgb = rgb2hex(new_rgb)
analogous_list.append(new_rgb)
print(analogous_list[0])
return analogous_list
Yes.
@lavish rover You understand it a lil.
Yes.
I have to change it to my own.
Or connect it.
into what im doing.
#choosing a color that then finds out the color theroy
def choose_color():
color_code = colorchooser.askcolor(title="Choose Color")
result.config(text="Matching: "+str(get_complementary(color_code[1]),(analogous(color_code[0]),)))
print(color_code)
print(get_complementary(color_code[1]))
#buttons
selectColor = tk.Button(frame, text="Select Color", command=choose_color)
selectColor.pack()
Top input
Buttom out put.
def analogous(val, d):
analogous_list = []
#set color wheel angle
d = d /360.0
#value has to be 0 <span id="mce_SELREST_start" style="overflow:hidden;line-height:0;"></span>< x 1 in order to convert to hls
r, g, b = map(lambda x: x/255.0, val)
#hls provides color in radial scale
h, l, s = colorsys.rgb_to_hls(r, g, b)
#rotate hue by d
h = [(h+d) % 1 for d in (-d, d)]
for nh in h:
new_rgb = list(map(lambda x: round(x * 255),colorsys.hls_to_rgb(nh, l, s)))
new_rgb = rgb2hex(new_rgb)
analogous_list.append(new_rgb)
print(analogous_list[0])
return analogous_list
Yes.
90%
90d
show me
what you mean
analogous(color_code[0], 250)
or do mod 360
py result.config(text="Matching: "+str(get_complementary(color_code[1]),(analogous(color_code[0], 90))))
Ok so calling it works
But now converting the rgb into hex
is what i need to do.
I want it to print out as a hex value
so #000000
!e
color = 250
hex = f"{color:x}"
print(hex)
@signal sand :white_check_mark: Your eval job has completed with return code 0.
fa
!e
val = [100, 0, 255]
r, g, b = val
print(f'#{r:02x}{g:02x}{b:02x}')
@lavish rover :white_check_mark: Your eval job has completed with return code 0.
#6400ff
So put that in?
so put in where?
I see.
Cause choose_color gives me all the values
So it give me the rgb
and hex.
def choose_color():
color_code = colorchooser.askcolor(title="Choose Color")
result.config(text="Matching: "+str(get_complementary(color_code[1]),(analogous(color_code[0], 90))))
print(color_code)
print(get_complementary(color_code[1]))
Of the color i choose.
Im trying to have it print out the functions equation
so the output for it.
so say if the rgb is 1, 1, 1 and it was ran through analogous.
it would give me something else
for the output.
but if i did it through complentary
it would give me a different output.
You get me?
@lavish rover
The error is that its not being converted into hex.
!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.
def choose_color():
color_code = colorchooser.askcolor(title="Choose Color")
result.config(text="Matching: "+str(get_complementary(color_code[1]),(analogous(color_code[0], 90))))
print(color_code)
print(get_complementary(color_code[1]))
so yeah i need to put it into the rgb2hex
and get rid of the old code right?
@lavish rover
brb
playing hangman with bot
how do i play sound?
disp_option = elcc_.central_info_db['diesel'][elcc_.central_info_db['diesel']['central']=='ANDES GENERACION 1']
max_pow = elcc_.central_info_db['diesel'][elcc_.central_info_db['diesel']['central']=='ANDES GENERACION 1']['max_p']
dispoption = elcc.central_infodb['diesel'][elcc.central_info_db['diesel']['central']=='ANDES GENERACION 1']
maxpow = elcc.central_infodb['diesel'][elcc.central_info_db['diesel']['central']=='ANDES GENERACION 1']['max_p']
dsip_option['disponib_id'].loc[0]
#[derive(Logos, Debug, Clone, PartialEq)]
pub enum LexerToken {
#[token(" ")]
Indent,
#[token(" ")]
Seperator,
#[token("\n")]
Newline,
#[token("<-|")]
BooleanGuard,
#[token("->")]
GuardOption,
#[token("<-")]
Assignment,
#[regex("\"[^\"]*\"", string)]
#[regex(r"-?\d+(\.\d+)?", |number| Token::Value(number.slice().parse().unwrap()))]
#[regex("'.'", |character| Token::Char(character.slice().chars().nth(1).unwrap()))]
Token(Token),
#[error]
Error,
}
the good ending
JOIN MY NEW DISCORD TO POST MEME IDEAS: https://discord.gg/vFW4ZRFcbM
from The Book of Boba Fett: The Tribes of Tatooine
#StarWars #RevengeoftheSith #TheBookOfBobaFett #meme
The Book of Boba Fett Chapter 2 S01E02
The Book of Boba Fett meme
the short history of nearly everything
?? I'm not even in voice chat right now
https://glittery-biscuit-b36843.netlify.app/
try saving the page as html then change the extension to jpg then render and have fun
gonna keep it as my tinder bio lmao
with my pic in the image
@mortal crystal https://en.wikipedia.org/wiki/Manning_Coles#Tommy_Hambledon
Manning Coles was the pseudonym of two British writers, Adelaide Frances Oke Manning (1891–1959) and Cyril Henry Coles (1899–1965), who wrote many spy thrillers from the early 1940s through the early 1960s. The fictional protagonist in 26 of their books was Thomas Elphinstone Hambledon, who works for a department of the Foreign Office, usually r...
yea ahahha
or would it be srpski
grammarly correct is srpski
aha
Could someone help me, please? 👴🏿
I need to parse info out of fully scrolled web page via requests module
I know that i have to send requests with some extra headers, however which one should i set and where can i get it?
Great
What are you guys talking about
Haven't unlocked my VC yet
I hope the server lift this restriction of 50 messages
because it is hard for someone to send a lot of messages before they actually speak if their purpose is to communicate through voice at the first place
great
The alternative is to have a lot of voice trolls coming in and screaming.
Python Discord is public and very prominent, being a partnered server.
Lots of people.
Because such people don't tend to be bred from patient stock, the wait time and the community involvement requirement has put a stop to that and puts everyone on an even footing in gaining access.
"Hey, want to take part in voice? Invest some time and effort in the community, first."
I don't like it in that it presents a barrier to legitimate participation in the voice channels, but given it's a negative that negates a far greater negative to the overall voice chat experience, it's better to have it than to not.
hi
https://imgur.com/gallery/SW5jfvJ @gentle flint
Pain
rip
please stop spaming these links around if you're not even in the VC
I've seen that one before
:hm_think:
Seek the Hidden Treasure of Life that sleeps in the Huge Ruin La-Mulana. The Archaeological Ruin Exploration Action Game is now on sale for Nintendo Switch, PS4(R) and Xbox One!!
Both really really really good games
A lot of people love it
Initial release date: 5 December 2018
new i see
when i was a flask dev
ppl told me to learn django
today itself i got a call n my hr was interested in asking exp in flask
n now some ppl r saying to learn FASTApi

A new Star Trek spinoff follows the adventures of Captain Jeff Bezos (Owen Wilson) and his brother (Luke Wilson).
Saturday Night Live. Stream now on Peacock: https://pck.tv/3uQxh4q
Subscribe to SNL: https://goo.gl/tUsXwM
Stream Current Full Episodes: http://www.nbc.com/saturday-night-live
WATCH PAST SNL SEASONS
Google Play - http://bit.ly/SNL...
#career-advice will likely have better answers
!d int
class int([x])``````py
class int(x, base=10)```
Return an integer object constructed from a number or string *x*, or return `0` if no arguments are given. If *x* defines `__int__()`, `int(x)` returns `x.__int__()`. If *x* defines `__index__()`, it returns `x.__index__()`. If *x* defines `__trunc__()`, it returns `x.__trunc__()`. For floating point numbers, this truncates towards zero.
!d format
format(value[, format_spec])```
Convert a *value* to a “formatted” representation, as controlled by *format\_spec*. The interpretation of *format\_spec* will depend on the type of the *value* argument; however, there is a standard formatting syntax that is used by most built-in types: [Format Specification Mini-Language](https://docs.python.org/3/library/string.html#formatspec).
The default *format\_spec* is an empty string which usually gives the same effect as calling [`str(value)`](https://docs.python.org/3/library/stdtypes.html#str "str").
A call to `format(value, format_spec)` is translated to `type(value).__format__(value, format_spec)` which bypasses the instance dictionary when searching for the value’s `__format__()` method. A [`TypeError`](https://docs.python.org/3/library/exceptions.html#TypeError "TypeError") exception is raised if the method search reaches [`object`](https://docs.python.org/3/library/functions.html#object "object") and the *format\_spec* is non-empty, or if either the *format\_spec* or the return value are not strings.
!e py a = "0b1101" b = "1101" print(int(a, 0)) print(int(b, 2))
@somber heath :white_check_mark: Your eval job has completed with return code 0.
001 | 13
002 | 13
!e py a = format(13, "b") print(a)
@somber heath :white_check_mark: Your eval job has completed with return code 0.
1101
!e py a = bin(13) print(a)
@somber heath :white_check_mark: Your eval job has completed with return code 0.
0b1101
base parameter of int given 0 interprets the given string based on its prefix. 0b for binary. 0x for hexadecimal, etc.
!e py a = f"{13:b}" print(a)
@somber heath :white_check_mark: Your eval job has completed with return code 0.
1101
Pleasure.
We are human.
Some things come with the territory.
!e py a = bin(13) print(a) print(a[2:])
@somber heath :white_check_mark: Your eval job has completed with return code 0.
001 | 0b1101
002 | 1101
!stream 336524160509411328
✅ @mild quartz can now stream until <t:1651503673:f>.
"Holler" always makes me think of Western pioneering movies.
Along with "golly".
Like Back to the Future III.
"You keep what youwu kill. ☺️ "
Karl Urban is a treasure.
how do i import ascii
You don't? I mean, there's the string module. What do you mean by importing ascii?
I need ascii in my test code import colorama
def main():
adress=input("Enter Your Bitcoin Adress")
print("OK.")
characters=string.ascii_lowercase+string.digits
for _ in range(10000)
print(Fore.RED + "> %s | 0.00000 BTC" % "".join(random.sample(characters, 32)))
time.sleep(0.5)
print(fore.GREEN + "> %s | 0.00031" % "".join.sample(characters, 32)))
time.sleep(0.5)
print(Fore.WHITE + "> Attempting to transfer to Your Wallet...)
input()
main()
!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.
so what do i do with that code?
What's the problem?
The Med-E-Lert XL Locking Automatic Pill Dispenser is a deluxe pill reminder and organizer, offering larger and deeper compartments over other standard models. In fact, this latest edition to the Med-E-Lert family offers 30% more capacity! In addition to holding more than ever before, the Med-E-L...
Every opening ( has to have an accompanying ) and vice versa.
it says you have an extra parenthesis at the end
try removing it
see what it does
excellent, your first error was fixed
now you have an error in a different line
These are strange
You haven't closed your string
so i put end at end?
a string in python looks like
"some random text goes here"
you need an opening and closing quote
can you help me with that?
import colorama
def main():
adress=input("Enter Your Bitcoin Adress")
print("OK.")
characters=string.ascii_lowercase+string.digits
for _ in range(10000)
print(Fore.RED + "> %s | 0.00000 BTC" % "".join(random.sample(characters, 32))
time.sleep(0.5)
print(Fore.GREEN + "> %s | 0.00031" % "".join.sample(characters, 32))
time.sleep(0.5)
print(Fore.WHITE + "> Attempting to transfer to Your Wallet...)
input()
main()
that is the code so how
this is how
how tf
one of your strings has an opening quote and not a closing quote
it has a quote at the start but not at the end, in other words
add a quote at the end
I'd use a different string formatting method. The % are a bit funky
The print(Fore.WHITE line is missing an ending quote
what is a ending quote?
"
oh
Ending as in you have an opening " but you need another one to close it
import colorama
def main():
adress=input("Enter Your Bitcoin Adress")
print("OK.")
characters=string.ascii_lowercase+string.digits
for _ in range(10000)
print(Fore.RED + "> %s | 0.00000 BTC" % "".join(random.sample(characters, 32))
time.sleep(0.5)
print(Fore.GREEN + "> %s | 0.00031" % "".join.sample(characters, 32))
time.sleep(0.5)
print(Fore.WHITE + "> Attempting to transfer to Your Wallet...")
input()
main()
hurrah, you fixed the quote problem
so this problem is because you need to put a : at the end of the line with the for in it
so
for _ in range(10000):
instead of
for _ in range(10000)
import colorama
def main():
adress=input("Enter Your Bitcoin Adress")
print("OK.")
characters=string.ascii_lowercase+string.digits
for _ in range(10000):
print(Fore.RED + "> %s | 0.00000 BTC" % "".join(random.sample(characters, 32))
time.sleep(0.5)
print(Fore.GREEN + "> %s | 0.00031" % "".join.sample(characters, 32))
time.sleep(0.5)
print(Fore.WHITE + "> Attempting to transfer to Your Wallet...")
input()
main()
can you format your code properly? this is very hard to read
!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.
Whyy
that way we can read the code better which makes it easier to help
import colorama
def main():
adress=input("Enter Your Bitcoin Adress")
print("OK.")
characters=string.ascii_lowercase+string.digits
for _ in range(10000):
print(Fore.RED + "> %s | 0.00000 BTC" % "".join(random.sample(characters, 32))
time.sleep(0.5)
print(Fore.GREEN + "> %s | 0.00031" % "".join.sample(characters, 32))
time.sleep(0.5)
print(Fore.WHITE + "> Attempting to transfer to Your Wallet...")
input()
main()```
hurrah
Heyyyyy
So what's going on is that anything under a for loop has to be indented to indicate that it's part of it
Same as how you have to indent things to indicate it's in the main function
You're learning
!indent
It's not a big deal
Indentation
Indentation is leading whitespace (spaces and tabs) at the beginning of a line of code. In the case of Python, they are used to determine the grouping of statements.
Spaces should be preferred over tabs. To be clear, this is in reference to the character itself, not the keys on a keyboard. Your editor/IDE should be configured to insert spaces when the TAB key is pressed. The amount of spaces should be a multiple of 4, except optionally in the case of continuation lines.
Example
def foo():
bar = 'baz' # indented one level
if bar == 'baz':
print('ham') # indented two levels
return bar # indented one level
The first line is not indented. The next two lines are indented to be inside of the function definition. They will only run when the function is called. The fourth line is indented to be inside the if statement, and will only run if the if statement evaluates to True. The fifth and last line is like the 2nd and 3rd and will always run when the function is called. It effectively closes the if statement above as no more lines can be inside the if statement below that line.
Indentation is used after:
1. Compound statements (eg. if, while, for, try, with, def, class, and their counterparts)
2. Continuation lines
More Info
1. Indentation style guide
2. Tabs or Spaces?
3. Official docs on indentation
so what does that mean
Are people who install Windows on computers called glaziers?
they turn the computers into glaciers
Take a look at the thing the bot showed:
def foo():
bar = 'baz' # indented one level
if bar == 'baz':
print('ham') # indented two levels
return bar # indented one level
See how you have everything indented (moved inward by 4 spaces) under the def foo():? And then again under the if bar == 'baz':
ummmmm
Haaaa.
We're having a voice convo, so sometimes what we say pertains to that. I wasn't haaing at you.
hee haa
I can help you try to understand it, but I won't do it for you. So just like how you have:
if bar == 'baz':
print('ham')
You would have:
for _ in range(5):
print('ham')
Same idea
If you see a : at the end of a line, chances are that you'll have to indent after it
def main():
adress=input("Enter Your Bitcoin Adress")
print("OK.")
characters=string.ascii_lowercase+string.digits
for _ in range(10000):
print(Fore.RED + "> %s | 0.00000 BTC" % "".join(random.sample(characters, 32))
time.sleep(0.5)
print(Fore.GREEN + "> %s | 0.00031" % "".join.sample(characters, 32))
time.sleep(0.5)
print(Fore.WHITE + "> Attempting to transfer to Your Wallet...")
input()
main()```
Like that?
Almost. You need to make sure that you indent everything you want looped.
So if you want everything from print(Fore.RED down to print(Fore.WHITE, you have to make sure all of that is indented under the for
def main():
adress=input("Enter Your Bitcoin Adress")
print("OK.")
characters=string.ascii_lowercase+string.digits
for _ in range(10000):
print(Fore.RED + "> %s | 0.00000 BTC" % "".join(random.sample(characters, 32))
time.sleep(0.5)
print(Fore.GREEN + "> %s | 0.00031" % "".join.sample(characters, 32))
time.sleep(0.5)
print(Fore.WHITE + "> Attempting to transfer to Your Wallet...")
input()
main()```
I haaaate that. Try doing CTRL + Shift + R
me?
@rugged root
still stuck
Hmm
Exit, clear cache, try again?
how to clear cache on browser
delete history?
Depends on the browser, but yes, where you'd do that, at least on Firefox.
So look at what the error is saying '(' was never closed, it's saying that you're missing a ) somewhere
@fallow basin Hold on, going to try swapping voice servers
def main():
adress=input("Enter Your Bitcoin Adress")
print("OK.")
characters=string.ascii_lowercase+string.digits
for _ in range(10000):
print(Fore.RED + "> %s | 0.00000 BTC" % "".join(random.sample(characters, 32))
time.sleep(0.5)
print(Fore.GREEN + "> %s | 0.00031" % "".join.sample(characters, 32))
time.sleep(0.5)
print(Fore.WHITE + "> Attempting to transfer to Your Wallet...")
input()
main()```
ok
Maybe now?
no
Hmm
but thanks guys
can't find it @rugged root
Sorry, it happens from time to time
imma try on diff browser
So just above where it says Syntax Error it'll show you the line that it's finding the issue.
Make sure you count the number of ( and see if you have an equal number of )
nc = 0
counter = [pc, nc]```
tf
!e
def append(bacon):
bacon.append(3)
print(bacon)
return bacon
ham = []
print(ham)
ham = append(ham)
print(ham)
@rugged root :white_check_mark: Your eval job has completed with return code 0.
001 | []
002 | [3]
003 | [3]
if pc, nc == 0, 0:
return []```First pass.
^
SyntaxError: invalid syntax```
My bad.
>>> c = ([0], 1, 2)
>>> c[0] += [69]
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: 'tuple' object does not support item assignment
>>> c
([0, 69], 1, 2)
>>>
pc = 0
nc = 0
for x in arr:
if x > 0:
pc += 1
elif x == 0:
pass
elif x < 0:
nc += x
return [pc, nc]
if ([pc, nc]) == (0, 0):
return []```
if (pc, nc) == (0, 0):
return []
return [pc, nc]
Cone text.

I don't use my bum to use my phone.
Except, maybe, for butt dials.
But then I don't generally keep my phone in my back pocket.
Which sounds euphemistic.
do you want a hint to the issue or just the issue upfront
Amateurbiotics.
Acid reflex.
somebody told me the issue and it created another issue that i cannot wrap my head around and then people stopped caring
oof
Wash it down with civet cat coffee.
do u have an idea??
based on this code (with the if/return fix) yes
@rugged root your comment about piss water flavour reminded me of this
https://en.wikipedia.org/wiki/Castoreum
Castoreum is a yellowish exudate from the castor sacs of mature beavers. Beavers use castoreum in combination with urine to scent mark their territory. Both beaver sexes have a pair of castor sacs and a pair of anal glands, located in two cavities under the skin between the pelvis and the base of the tail. The castor sacs are not true glands (e...
?
"Condition ourselves to lie to ourselves about liking it". I feel the same way about wine, though I prefer wine over beer.
i'd like to know please
Prefer sweet spirits over either.
Cider is good.
Quality whatever is better over crap whatever.
I've had good and bad beer, good and bad spirits, sweet and otherwise.
I had a hard lemonade that tasted like it would coming up.
according to the statement:
If the input is an empty array or is null, return an empty array.
the only case where you return[]is when the input is[]orNone
let's look at your condition:
if (pc, nc) == (0, 0):
return []
this is a similar, but slightly different condition
in the case that the input is [], pc and nc are indeed 0, hence correctly returning [].
but in the case that the input is something like [0, 0, 0], pc and nc are also 0. however, it's not empty, thus you should be returning [0, 0]
@lyric moss
that just brang me to the other issue i had prior
what's your code look like now
pc = 0
nc = 0
for x in arr:
if x > 0:
pc += 1
elif x == 0:
pass
elif x < 0:
nc += x
if (pc, nc) == (0, 0): return [0,0]
return [pc, nc]```
i had a if (pc, nc} == [0, 0]: return [] but that did nothing
so based on this, instead of checking that pc, nc == 0, 0, you could check the condition that they gave: arr == [] or arr == None
uhh can you send what your code looks like now
i just tested it (your code with the [], None case) and it's fine
pc = 0
nc = 0
for x in arr:
if x > 0:
pc += 1
elif x == 0:
pass
elif x < 0:
nc += x
return [pc, nc]
if not arr:
return []
if arr == None:
return []```
i feel like such a moron
for having 15 lines on a 8kyu
ah
meh, line count isn't indicative of how good the code is
case in point, the whole of #esoteric-python
it makes me have to scroll
which is annoying as hell
and this challenge is pedantic
on the verge of tears
anyway, here the issue is that once python sees a return, it returns and stops running the function
Eye plugs. Ear patches.
jesus christ
i am a fucking moron
you could shift the not arr and == None stuff to the top
stuff takes time, it's like learning a new language
this is the equivalent of my programming skills https://www.youtube.com/watch?v=yCjJyiqpAuU
Here’s a COUPON for 1 month FREE on the Super Simple app! ► https://supersimple.com/offer/?code=AQEGQ6GQ
Watch ALL the Super Simple Songs videos AD-FREE, plus games, storybooks and more!
Available for iOS, tvOS and Android devices (Amazon Fire/Kindle tablets excluded)
🎶Twinkle, twinkle, little star. How I wonder what you are. Up above the worl...
is binary important ?
@lavish rover
because they sais i must learn it
said*
do u know it ?
oh ty
so its trash ?
there's also things like different representations i suppose
def swapIntegers(A, index1, index2):
A[index1],A[index2] = A[index2],A[index1]
return A
if index1 > len(A) - 1 or index2 > len(A) - 1:
return -1
pass
if name == 'main':
# you can use this to test your code
print(swapIntegers([1, 2, 3, 4], 2, 3))
if you are dealing with low lever stuff, it is very important
eg 1s complement, 2s complement, X-excess, ...
can u explain ?
assembly, C
yes dealing with low stuff
though yea it's not all that important unless it's for a specific use
at hardware level, even in networking, you will need knowledge of binary
def lole_target(self, unit):
for filename in self.vre + self.conv:
if unit in self.central_info_db[filename]['central']:
self.central_info_db[filename] = self.central_info_db[filename].drop(self.central_info_db[filename][self.central_info_db[filename].central == unit].index)
print('yay')
!codeblock
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.
!codeblock
!codeblock
def lole_target(self, unit):
for filename in self.vre + self.conv:
if unit in self.central_info_db[filename]['central']:
self.central_info_db[filename] = self.central_info_db[filename].drop(self.central_info_db[filename][self.central_info_db[filename].central == unit].index)
print('yay')
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 lole_target(self, unit):
for filename in self.vre + self.conv:
if unit in self.central_info_db[filename]['central']:
self.central_info_db[filename] = self.central_info_db[filename].drop(self.central_info_db[filename][self.central_info_db[filename]['central'] == unit].index)
print('yay')
i've tried this one too 😦
!stream 670580567955472384
✅ @mortal crystal can now stream until <t:1651509706:f>.
!d collections.Counter
class collections.Counter([iterable-or-mapping])```
A [`Counter`](https://docs.python.org/3/library/collections.html#collections.Counter "collections.Counter") is a [`dict`](https://docs.python.org/3/library/stdtypes.html#dict "dict") subclass for counting hashable objects.
It is a collection where elements are stored as dictionary keys
and their counts are stored as dictionary values. Counts are allowed to be
any integer value including zero or negative counts. The [`Counter`](https://docs.python.org/3/library/collections.html#collections.Counter "collections.Counter")
class is similar to bags or multisets in other languages.
Elements are counted from an *iterable* or initialized from another
*mapping* (or counter)...
!e
from collections import Counter
ham = [1, 1, 4, 3, 4, 4, 6]
print(ham)
pork = Counter(ham)
print(pork)
@rugged root :white_check_mark: Your eval job has completed with return code 0.
001 | [1, 1, 4, 3, 4, 4, 6]
002 | Counter({4: 3, 1: 2, 3: 1, 6: 1})
How do i call each indiviual numbers amount?
print(pork[4])
from collections import Counter
def count_pairs(socks):
x = Counter(socks)
if name == "main":
# first, we split the input line on whitespace
# this problem can use a list of strings or integers
nums = input().split()
total = count_pairs(nums)
print(total)
For the upcoming winter vacation, you are trying to rearrange all your socks by pairing them. You have a basket of socks and you are trying to pair them by size. Two socks can only be paired if both of them have the same size. Given a list of integers as the sizes of the socks you have to count how many pairs you can make out of them.
Input: 10 9 10 9 10 9 10
Output: 3
Explanation: We can make two pairs of size 10 and one pair of size 9. So we can have 3 pairs in total. The last sock of size 9 cannot be paired, hence left unused.
Input: 5 6 7 8 9 10
Output: 0
Explanation: As every size is unique, we cannot make any pair.
Complete the count_pairs(socks) function below. It takes the list of sizes socks and should return the total number of pairs that can be made out of them.
@quasi condor You keep appearing and disappearing. You alright?
!e
from collections import Counter
ham = [1, 1, 4, 3, 4, 4, 6]
print(ham)
pork = Counter(ham)
print(pork)
number_of_pairs = 0
for value in pork.values():
number_of_pairs += value // 2
print(number_of_pairs)
@rugged root :white_check_mark: Your eval job has completed with return code 0.
001 | [1, 1, 4, 3, 4, 4, 6]
002 | Counter({4: 3, 1: 2, 3: 1, 6: 1})
003 | 2
!stream 963130774079553627
✅ @lapis hazel can now stream until <t:1651511087:f>.
dict.keys()
for key in pork:
.items()
for key, value in pork.items():
!e
from collections import Counter
ham = ['a', 'a', 'b', 'b', 'b', 'b', 'b', 'c', 'e', 'c']
print(ham)
pork = Counter(ham)
print(pork)
number_of_pairs = 0
for value in pork.values():
number_of_pairs += value // 2
print(number_of_pairs)
@rugged root :white_check_mark: Your eval job has completed with return code 0.
001 | ['a', 'a', 'b', 'b', 'b', 'b', 'b', 'c', 'e', 'c']
002 | Counter({'b': 5, 'a': 2, 'c': 2, 'e': 1})
003 | 4
from collections import Counter
def count_pairs(socks):
Amount = Counter(socks)
Start = 0
for value in Amount.values():
Start = Start + Amount // 2
return Start
if __name__ == "__main__":
# first, we split the input line on whitespace
# this problem can use a list of strings or integers
nums = input().split()
total = count_pairs(nums)
print(total)
Im joining so i can be productive lmao
What do you think about conducting the review before the results are known?
no humans = no probelms, releasing the nukes in 3...2...
I'm too much of a bleeding heart who isn't only thinking big picture
My concern ends up being we've seen what happens with corporations when they get a better tool. The lower class gets fucked
I don't see how it's unreasonable or pessimistic to think about it. If anything it's realistic.
People won't work on things that don't have a purpose
May I present to you, model trains
aesthetic purpose is purpose
personal joy from the train
personal motivation of finding things out
But it's not efficient for the overall purpose, right?
may I present to you, every pet project ever
I definitely don't agree with you and think strong social programs will be absolutely necessary
I think those are more the details I care about or want to know about it
I care about the human aspect more than anything
import pandas as pd
def cols_means(l):
# Create Column Names, literally like ['col1', 'col2', ...] depending on how many columns l has.
# Hint: need to iterate to populate a list similar to this ['col1', 'col2', ...]
# Create a dataframe using the given list (l) and the generated column names above
# return their (column-wise) means
return None # Change None
if __name__ == '__main__':
x = [[1,2,3],[4,5,6],[6,7,8],[8,9,10]]
print(cols_means(x))
[4.75,6.78,9.80]
@rugged root OMG I meant to write I definitely **DO agree with you hahaha, that there DOES need to be a strong response to support people displaced by ml
There was a leak in the boat. Nobody had yet noticed it, and nobody would for the next couple of hours. This was a problem since the boat was heading out to sea and while the leak was quite small at the moment, it would be much larger when it was ultimately discovered. John had planned it exactly this way.
"Can I get you anything else?" David asked. It was a question he asked a hundred times a day and he always received the same answer. It had become such an ingrained part of his daily routine that he had to step back and actively think when he heard the little girl's reply. Nobody had before answered the question the way that she did, and David didn't know how he should respond.
She glanced up into the sky to watch the clouds taking shape. First, she saw a dog. Next, it was an elephant. Finally, she saw a giant umbrella and at that moment the rain began to pour.
The song came from the bathroom belting over the sound of the shower's running water. It was the same way each day began since he could remember. It listened intently and concluded that the singing today was as terrible as it had ever been.
!voice @low portal
Voice verification
Can’t talk in voice chat? Check out #voice-verification to get access. The criteria for verifying are specified there.
Also 👋
That makes a lot more sense. And it's not that I disagree with you about the tech advancement stuff. I just think the human aspect is more interesting for some reason
!e py import os print(os.getcwd())
@somber heath :white_check_mark: Your eval job has completed with return code 0.
/snekbox
start_img = pg.image.load(fr'{os.path.dirname(os.path.abspath(file))}\tictactoe\images\start_img.png').convert_alpha()
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.
start_img = pg.image.load(fr'{os.path.dirname(os.path.abspath(file))}\tictactoe\images\start_img.png').convert_alpha()```
file = 'start_img.png'
a = os.path.dirname(os.path.abspath(file))
print(a)
C:\Users\Ayden\Downloads\game\tictactoe\images\start_img.png
C:\Users\Ayden\Downloads\game
File "C:\Users\Ayden\Downloads\game\tictactoe\game_code\main.py", line 335, in <module>
if __name__ == '__main__': main()
File "C:\Users\Ayden\Downloads\game\tictactoe\game_code\main.py", line 302, in main
start_img = pg.image.load(fr'{os.path.dirname(os.path.abspath(file))}\tictactoe\images\start_img.png').convert_alpha()
FileNotFoundError: No such file or directory.```
a = fr'...'
if os.path.exists(a):
print("yes")
else:
print("No")
a = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
b = os.path.join(a, "images", "start_img.png")
start_img = pg.image.load(b)
# once
import pathlib
images_path = pathlib.Path(__file__).parents[1] / "images"
# every time
start_img = pg.image.load(images_path / "start_img.png")
yesterday people were saying that the large language models are closed source, but here is meta releasing weights + code for their 175B param GPT3-equivalent LLM https://arxiv.org/abs/2205.01068
can someone help me debug a piece of code?
Hello. Claim a help channel: #❓|how-to-get-help
thx
@quasi sonnet Might be easier to type it
It's hard to hear you and you've got some weird static noise in your background
yea right
Using AND, OR and NOT gates (ICs)
or any others
what project can I make
Hmmm
In this video, I will show you how to replacement Sony Xperia XZ2 Compact battery.
Get Original Battery for Sony Xperia XZ2 Compact at: https://www.witrigs.com/oem-battery-replacement-for-sony-xperia-xz2-compact
Get Original Replacement Parts for Sony Xperia XZ2 Compact at: https://www.witrigs.com/replacement-parts-for-sony-xperia-xz2-compact
...
You could do.... Oh, you could make a clock. Like a binary one or something
I can use other gates aswell
Hmm
Right that is possible but I only took the course this semester
It might take some time I guess
But I'm not really sure about those kinds of projects. #microcontrollers should have all kinds of cool ideas
Hmm right will check it out
Yeah he was kind of a dick 😄
Who Steve Jobs ?
Hey LX
Shockley
There's Middlesex
There's Norfolk and Suffolk
It's "wooster"
We don't even say the 'shire' for that one.
¯_(ツ)_/¯
Well some people do
Worcestershire ( (listen) WUUS-tər-shər, -sheer; written abbreviation: Worcs) is a county in the West Midlands of England. The area that is now Worcestershire was absorbed into the unified Kingdom of England in 927, at which time it was constituted as a county (see History of Worcestershire). Over the centuries the county borders have been mod...
There's a campaign to "make Frome shit again" 😄
Basically locals are being priced out.
By "down from London"s
Ah new Boston Dynamics video: https://www.youtube.com/watch?v=6U-bI3On1Ww
Spot may have moves, but in the real world, the robot gets down and dirty, helping industrial teams keep their sites efficient and safe. Want to learn more about Spot? Discover Spot’s latest features: https://youtu.be/zIdyhGyXcUg
Register for our webinar to learn more about inspection capabilities: https://bosdyn.co/3warVCH
Want to learn more ...
Gotta go 👋
p
import pandas as pd
def cols_means(l):
# Create Column Names, literally like ['col1', 'col2', ...] depending on how many columns l has.
# Hint: need to iterate to populate a list similar to this ['col1', 'col2', ...]
# Create a dataframe using the given list (l) and the generated column names above
# return their (column-wise) means
return None # Change None
if name == 'main':
x = [[1,2,3],[4,5,6],[6,7,8],[8,9,10]]
print(cols_means(x))
!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.
import pandas as pd
def cols_means(l):
x = l.sum(l[0 + z]) / 2
z = z + 1
return
if name == 'main':
x = [[1,2,3],[4,5,6],[6,7,8],[8,9,10]]
print(cols_means(x))
import pandas as pd
def cols_means(l):
x = l.sum(l[0 + z]) / 2
z = z + 1
return
if __name__ == '__main__':
x = [[1,2,3],[4,5,6],[6,7,8],[8,9,10]]
print(cols_means(x))
import pandas as pd
def cols_means(l):
for numbers in l:
x = sum(l[0 + z]) / len(l[0 + z])
z = z + 1
return
if __name__ == '__main__':
x = [[1,2,3],[4,5,6],[6,7,8],[8,9,10]]
print(cols_means(x))
!e
def cols_means(l):
new_l = []
for item in l:
new_l.append(sum(item)/len(item))
return new_l
if __name__ == '__main__':
x = [[1,2,3],[4,5,6],[6,7,8],[8,9,10]]
print(cols_means(x))
@wind raptor :white_check_mark: Your eval job has completed with return code 0.
[2.0, 5.0, 7.0, 9.0]
import pandas as pd
def cols_means(l):
# Create Column Names, literally like ['col1', 'col2', ...] depending on how many columns l has.
# Hint: need to iterate to populate a list similar to this ['col1', 'col2', ...]
# Create a dataframe using the given list (l) and the generated column names above
# return their (column-wise) means
return None # Change None
if __name__ == '__main__':
x = [[1,2,3],[4,5,6],[6,7,8],[8,9,10]]
print(cols_means(x))
Solve short hands-on challenges to perfect your data manipulation skills.
!stream 670580567955472384
✅ @mortal crystal can now stream until <t:1651598555:f>.
New Delhi is entering day four of a massive landfill fire that is shrouding the northern part of the city in smoke, classifying the air quality as “very poor.” No deaths or injuries have been reported from the fire itself as firefighters are working to contain the flames during a brutal heat wave across India.
» Subscribe to NBC News: http://nb...
import pandas as pd
def cols_means(l):
l = pd.DataFrame([[1,2,3],[4,5,6],[6,7,8],[8,9,10], columns = ['col1', 'col2', 'col3', 'col4'])
z = l.mean()
return z
# Create Column Names, literally like ['col1', 'col2', ...] depending on how many columns l has.
# Hint: need to iterate to populate a list similar to this ['col1', 'col2', ...]
# Create a dataframe using the given list (l) and the generated column names above
# return their (column-wise) means
if __name__ == '__main__':
x = [[1,2,3],[4,5,6],[6,7,8],[8,9,10]]
print(cols_means(x))
from datetime import timedelta, date
class DateIterable:
def __init__(self, start_date, end_date):
# initilizing the start and end dates
self.start_date = start_date
self.end_date = end_date
self._present_day = start_date
def __iter__(self):
#returning __iter__ object
return self
def __next__(self):
#comparing present_day with end_date,
#if present_day greater then end_date stoping the iteration
if self._present_day >= self.end_date:
raise StopIteration
today = self._present_day
self._present_day += timedelta(days=1)
return today
if __name__ == '__main__':
for day in DateIterable(date(2020, 1, 1), date(2020, 1, 6)):
print(day)
@lavish rover restarting worked xD i'mma go now though
print("Area = {}".format(Shapes.Square.dimensions.area(a)))
from shapes import Shape
from shapes import Square
Installing Python and Pycharm in 4 minutes.
Download page: https://www.jetbrains.com/pycharm/download/#section=windows
🌟 Please leave a LIKE and SUBSCRIBE for more! 🌟
◾◾◾◾◾ Discord Server ◾◾◾◾◾
📢 Join: https://discord.com/invite/JERatQsfY8
◾◾◾◾◾ PyCharm Tutorials ◾◾◾◾◾
🐍 PyCharm Debug: https://youtu.be/76Lu6CfMuGg
💿 PyCharm Basics in 10 Mi...
This video will be about how to install numpy in Pycharm. This allows you to get started with NumPy in your Python codes. NumPy stands for numerical Python and will allow you work with matrices and large amounts of data much easier in Python!
This timeline is meant to help you better understand how to get started with NumPy in PyCharm:
0:00 Int...
https://github.com/abdulfadel/syntaxai
https://github.com/abdulfadel/syntaxai/releases/tag/v0.2.0-alpha
Syntax AI - Call Coding Documentation With Simple Commands - GitHub - abdulfadel/syntaxai: Syntax AI - Call Coding Documentation With Simple Commands
def list_sum(list1, list2):
for i in range(len(list))[::-1]:
return
if __name__=='__main__':
list1 = input().split()
list2 = input().split()
list1 = [int(num) for num in list1]
list2 = [int(num) for num in list2]
print(list_sum(list1, list2))
[123] [456] =[579]
Really trying to fix this issue if anyone knows how to overwrite everything in github
[0,0,1] + [9, 9, 9] is it [9,9,10] or [1,0,0,0]?
you can roll back to prev version or manually delete and commit again
so you just want to add the two indexes together
...
@signal sand
your question is not clear
and you are not putting that much effort into understanding... you are just looking for answer...
what do you want me to ask?
https://youtube.com/playlist?list=PLUl4u3cNGP63EdVPNLG3ToM6LaEUuStEY
@dark ice these are good
Instructor: Prof. Erik Demaine, Dr. Jason Ku, Prof. Justin Solomon View the complete course: https://ocw.mit.edu/6-006S20 YouTube Playlist: https://www.youtu...
@dark ice if they only care about your python and web dev skills... prioritize them... but in long term you need to learn all algorithms stuff...
memory management in python?
what year of college are you in @dark ice
last semester
going to finish this Summer
how to build big softwares stuff
if you put 40 hours... you will be better than most cs grads in 3 months
If you're still in the vc and helped me earlier... thanks! 🙂
Here are all songs from the game ABSOLUTE DRIFT.enjoy the music.
Absolute Drift was launched in 2015 on PC by Funselektor Labs.
2016 sparked a collaboration with FlippFly (Race The Sun) to develop & publish Absolute Drift: Zen Edition on PS4.
#ЭКСКЛЮЗИВ: ПРАВИЛЬНЫЙ #ПЕРЕВОД И ОЗВУЧКА НА РУССКОМ #NFS #CARBON:
https://www.youtube.com/watch?v=oD8R...
a delight for programming
@formal meteor@unborn storm@ripe lanternhello
I can't talk don't know why
quick question if you guy's don't mind
ok so basically
it's related to gui
no
like pyqt
tkinter etc
no it's all good even that I think is fine
like I wonder because basically I have a main gui
I know it hurts @unborn storm
but basically let's say I have main process
that is just a timer incrementing by 1 ok
!e py axiom = "A" rules = str.maketrans({"A": "AB", "B": "BBA"}) for _ in range(5): axiom = axiom.translate(rules) print(axiom)
@somber heath :white_check_mark: Your eval job has completed with return code 0.
001 | AB
002 | ABBBA
003 | ABBBABBABBAAB
004 | ABBBABBABBAABBBABBAABBBABBAABABBBA
005 | ABBBABBABBAABBBABBAABBBABBAABABBBABBABBAABBBABBAABABBBABBABBAABBBABBAABABBBAABBBABBABBAAB
FAIL: test003_candidateOverlapsTarget (__main__.TestCandidateOverlapsTarget)
----------------------------------------------------------------------
Traceback (most recent call last):
File "D:\CS-1410\cs1410_dna\test_candidateOverlapsTarget.py", line 41, in test003_candidateOverlapsTarget
self.assertEqual(expected, actual, message)
AssertionError: True != False : The last 1 characters of the target strand DO NOT overlap the first 1 characters of the candidate strand
I keep getting this error with my code and I cannnot figure out why
def candidateOverlapsTarget(target, candidate, overlap):
a = min(len(target)< len(candidate))
while a > 0:
if target[-a:] == candidate[:a]:
break
a -= 1
return a == overlap
would anyone be able to help?
Can you explain what's supposed to happen?
so think of the chrachters in a DNA Strand. The function is looking for other "DNA" strands that overlap or match
if they overlap it returns true
otherwise false
so if the parameter target was 'ABBBBA'
yes I saw that and was confused haha
confused because it seemed similar to what I am trying to figure out
they can be sequences any way I believe
does it make a different with my code?
Havent tried it yet so Id have to see
Overlap is int, yes? The span of overlap required?
Mm.
for the most part it works but the last strand fails for some reason
def candidateOverlapsTarget(target, candidate, overlap):
c = ''
for l in target:
if l in candidate and l not in c:
c += l
if len(c) == overlap:
return True
return False
```
been trying this and seems closer to resolve but yeah the last strand is an issue
AssertionError: True != False : The last 1 characters of the target strand DO NOT overlap the first 1 characters of the candidate strand
Are we just talking ends?
yes
Oh. Good. Easier.
seems like it yes
!voice
Voice verification
Can’t talk in voice chat? Check out #voice-verification to get access. The criteria for verifying are specified there.
@hardy karma I suspect you only really need an if and a few slices.
You look like you have one.
You might be missing the other for if it's overlapping with the target and candidate swapped.
I think you have more code than you need.
Unless you're testing not just endings for overlap.
how do you speak here ?
!voice
Voice verification
Can’t talk in voice chat? Check out #voice-verification to get access. The criteria for verifying are specified there.
thanks mate
!e ```py
class MyClass:
def function_or_method(self):
pass
mc = MyClass()
print(MyClass.function_or_method)
print(mc.function_or_method)```
@somber heath :white_check_mark: Your eval job has completed with return code 0.
001 | <function MyClass.function_or_method at 0x7fb80d7c8c10>
002 | <bound method MyClass.function_or_method of <__main__.MyClass object at 0x7fb80d7c1bd0>>
!e py my_list = [] my_list.append(my_list) print(my_list)
@somber heath :white_check_mark: Your eval job has completed with return code 0.
[[...]]
!e py a = [1, 2, 3] b = a print(a) print(b) b[0] = 4 print(b)
@somber heath :white_check_mark: Your eval job has completed with return code 0.
001 | [1, 2, 3]
002 | [1, 2, 3]
003 | [4, 2, 3]
!e py a = [1, 2, 3] b = a print(a) print(b) b[0] = 4 print(b) print(a)
@somber heath :white_check_mark: Your eval job has completed with return code 0.
001 | [1, 2, 3]
002 | [1, 2, 3]
003 | [4, 2, 3]
004 | [4, 2, 3]
!e ```py
a = ["a", "b", "c"]
b = "abc"
for each in a:
print(each)
print()
for each in b:
print(each)```
@somber heath :white_check_mark: Your eval job has completed with return code 0.
001 | a
002 | b
003 | c
004 |
005 | a
006 | b
007 | c
@ripe lantern :white_check_mark: Your eval job has completed with return code 0.
001 | attic
002 | button
003 | channel
004 |
005 | a
006 | t
007 | t
008 | i
009 | c
010 | b
011 | u
... (truncated - too many lines)
Full output: https://paste.pythondiscord.com/azimenapez.txt?noredirect
@ripe lantern :x: Your eval job has completed with return code 1.
001 | Traceback (most recent call last):
002 | File "<string>", line 1, in <module>
003 | RuntimeError: super(): no arguments
!e ```py
class Alpha:
def method(self):
print("Alpha")
def other_method(self):
print("Hello")
class Beta(Alpha):
def method(self):
print("Beta")
a = Alpha()
b = Beta()
a.method()
b.method()
a.other_method()
b.other_method()```
@somber heath :white_check_mark: Your eval job has completed with return code 0.
001 | Alpha
002 | Beta
003 | Hello
004 | Hello
!e ```py
class MyClass:
def init(self):
print(self)
mc = MyClass()
print(mc)```
@somber heath :white_check_mark: Your eval job has completed with return code 0.
001 | <__main__.MyClass object at 0x7ffaa1671480>
002 | <__main__.MyClass object at 0x7ffaa1671480>
!e ```py
class MyClass:
def init(self):
print(self)
a = MyClass()
print(a)
b = MyClass()
print(b)
@somber heath :white_check_mark: Your eval job has completed with return code 0.
001 | <__main__.MyClass object at 0x7f5209b11b70>
002 | <__main__.MyClass object at 0x7f5209b11b70>
003 | <__main__.MyClass object at 0x7f5209b11b10>
004 | <__main__.MyClass object at 0x7f5209b11b10>
@ripe lantern :white_check_mark: Your eval job has completed with return code 0.
001 | <__main__.MyClass object at 0x7fcdca6d9b70>
002 | <__main__.MyClass object at 0x7fcdca6d9b70>
003 | <__main__.MyClass object at 0x7fcdca6d9b10>
004 | <__main__.MyClass object at 0x7fcdca6d9b10>
005 | <__main__.MyClass object at 0x7fcdca6d9ae0>
!e ```py
class MyClass:
def get_self(self):
return self
mc = MyClass()
print(mc is mc.get_self())```
@somber heath :white_check_mark: Your eval job has completed with return code 0.
True
!e
a = [1, 2]
b = [1, 2]
print(a == b)
print(a is b)
@lavish rover :white_check_mark: Your eval job has completed with return code 0.
001 | True
002 | False
!e py a = [] b = [] c = a print(a == b) #True. The object pointed to by a is equal to the object pointed to by the variable b print(a is b) #False. But they are not the same list print(a is c) #True. The variable a points to the same list that the variable c points to.
@somber heath :white_check_mark: Your eval job has completed with return code 0.
001 | True
002 | False
003 | True
Identity vs equality.
!e "" is ""
@somber heath :white_check_mark: Your eval job has completed with return code 0.
<string>:1: SyntaxWarning: "is" with a literal. Did you mean "=="?
de-light-full
@ripe lantern :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 'chicken' is not defined
!e ```py
class Alpha:
def method(self):
print("Alpha")
class Beta(Alpha):
def method(self):
super().method()
b = Beta()
b.method()```
@somber heath :white_check_mark: Your eval job has completed with return code 0.
Alpha
@ripe lantern :white_check_mark: Your eval job has completed with return code 0.
True
Chicken (stylized as CHICKEN) is a programming language, specifically a compiler and interpreter which implement a dialect of the programming language Scheme, and which compiles Scheme source code to standard C. It is mostly R5RS compliant and offers many extensions to the standard. The newer R7RS standard is supported through an extension libra...
@somber heath For some reason I can't talk in this channel
!voice
Voice verification
Can’t talk in voice chat? Check out #voice-verification to get access. The criteria for verifying are specified there.
!user
Created: <t:1510259196:R>
Profile: @lavish rover
ID: 378279228002664454
Joined: <t:1604700419:R>
Roles: <@&267630620367257601>, <@&430492892331769857>, <@&764802720779337729>
Messages: 21,900
Activity blocks: 2,972
Total: 0
Active: 0

Hi
Yo
MIT OpenCourseWare is a web-based publication of virtually all MIT course content. OCW is open and available to the world and is a permanent MIT activity
Pie launcher.
😔
@humble pivot Are you on mobile or desktop?
desktop, but i joined the voice channel by mistake.
On mobile, tap open the thing that says you're connected and look for the red phone exit icon.
Ah, fair enough
found it, in the end.
It did not show , for some reason
Huh. Oh, well.
hey Hemlock
I would like to speak again =\
:\
its been so long
months
appeal
hmm
where
this DM?
oh
thanks
i will speak with him and pray god
he acccepts
my prays
xD
🤨
🤞
🥰
https://www.emojicode.org/ learn this and then copy paste output in english 🙂
Emojicode is a full-blown programming language consisting of emojis.
lol
😆 🤣
This makes me feel sadness.
what about pigeon-chet?
Balls
@whole bear For context, that's not the way to get unmuted. Also see the #voice-verification channel for information about our voice gate system
Brow knees.
Bro Knees
Yaas
@lavish rover EDM Music, ATM Machine
# in:
j = [1,
2,
3
]
# out:
j = [1, 2, 3]
# in:
def very_important_function(template: str, *variables, file: os.PathLike, engine: str, header: bool = True, debug: bool = False):
"""Applies `variables` to the `template` and writes to `file`."""
with open(file, 'w') as f:
...
# out:
def very_important_function(
template: str,
*variables,
file: os.PathLike,
engine: str,
header: bool = True,
debug: bool = False,
):
"""Applies `variables` to the `template` and writes to `file`."""
with open(file, "w") as f:
...
The Resources page on our website contains a list of hand-selected learning resources that we regularly recommend to both beginners and experts.
@rugged root Want to help me make a fraction calculator that outputs fractions when user chooses either subtraction addition multiplication so on forth? 😄
Not at the moment
🍰
Okay, no worries, but @rugged root Im gonna start it but if im stuck can you help me later on?
Depending on what I'm doing yeah. Trying to fix a database and then I've got afternoon deliveries
;-; oh...
;-;
Staff Sergeant Reckless (c. 1948 – May 13, 1968), a decorated war horse who held official rank in the United States military, was a mare of Mongolian horse breeding. Out of a race horse dam, she was purchased in October 1952 for $250 from a Korean stableboy at the Seoul racetrack who needed money to buy an artificial leg for his sister. Reckle...
PIN Number, LAN Area Network
i'd have preferred something like :
Zero... Bricks are not able to build anything
can you stop replying to ancient messages
!voice
Voice verification
Can’t talk in voice chat? Check out #voice-verification to get access. The criteria for verifying are specified there.
!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.
🤮
I am compiling Readthedocs locally using below conf.py and it works fine:
-- coding: utf-8 --
Configuration file for the Sphinx documentation builder.
This file does only contain a sel...
@somber heath what in the world is a hacky sack
@lavish rover the problem being addressed in that post is when the theme is being entirely ignored
This is not the case here
Ah well, I tried
instead, just one element in the theme is being ignored
Footbag?
readthedocs
I'm watching YouTube videos on how to make some from rice and balloons
local build
you can see the colour is different
but my theme css file sets it to rgb(255, 255, 255)
I'll be honest I know absolutely nothing about css or how to deal with it
k
Potassium to you too, my friend
that would be K
potassium, then
much better
The rubber would be good for grip and the rice would be good in the case of drops, making it less likely to roll. I can't say I like the idea in general, though, but that's more of an aesthetic thing.
I'll probably get some better ones if I get invested
Though I can see the balloons rupturing and spilling rice everywhere.
time to open a help channel
Fair enough
They are recommending 3-4 layers of balloons
This video had thought of it, the recommendation is to put the rice in a plastic bag and then wrap the balloons around it
Well, now I need to get balloons and rice, I'm no better off
https://workspace.google.com/intl/en_us/products/gmail/
^ there shorter link
Sorry, talking with our office manager about clearing out some old tech
Get it shipped off to recycling
Also, to old case manufacturers, fuck you for making it so that people had to screw the HDD directly onto the metal frame of the case
It's stupid
Just make it slide and click in
--END OF RANT--
Douglas Carl Engelbart (January 30, 1925 – July 2, 2013) was an engineer and inventor, and an early computer and Internet pioneer. He is best known for his work on founding the field of human–computer interaction, particularly while at his Augmentation Research Center Lab in SRI International, which resulted in creation of the computer mouse, an...
Elon Musk JUST REVEALED New Light Speed Engine with NASA! 🔔 Subscribe - https://bit.ly/3myAZOn NASA engineer David Burns has been doing just that. He claims to have developed an engine design that could hypothetically accelerate to 99 percent the speed of light without the need for propellant. On paper, it…
Eye tea.
"Have you seen my code? If so, let me know. I haven't been able to find it."
my one
Canon? Maybe that's the reason for the ball bearing in the other one.
"Solve this! **BOOM**"
XD
The Addiator is a mechanical add/subtract calculator, once made by Addiator Gesellschaft, Berlin. Variants of it were manufactured from 1920 until 1982. It is composed of sheet-metal sliders inside a metal envelope, manipulated by a stylus, with an innovative carry mechanism, doing subtract ten, carry one with a simple stylus movement. Some type...
It looks like a complicated radio.

