#code-help-voice-text

5 messages Β· Page 3 of 1

main solar
#

no

#

i am not

#

i thought u

#

catch u guys later

burnt birch
#
python manage.py migrate --run-syncdb 
clear agate
frozen gull
azure condor
#

hii

calm fiber
#

cool automations going πŸ‘€

#

are you gonna implement an AI to play

knotty holly
#

Where did you post that @abstract oak ?

abstract oak
#

help pear

knotty holly
#

Sorry @abstract oak would you rather I send messages here or in #help-pear ?

#

Could you add this to the beginning of your code, and tell us what the output is? ```py
import os
print(os.getcwd())

#

Ctrl-C

#

Not Cmd

#

Oh, I can give you temporary screen-sharing permissions.

#

Would that help?

abstract oak
knotty holly
#

!stream 337812638551638016

keen onyxBOT
#

βœ… @abstract oak can now stream until <t:1629658233:f>.

knotty holly
#

exit() or quit()

#

A way around this would be to explicitly make the file paths relative to the module.

#

The key thing is that when you give a relative path to open, the path is relative to the current working directory, rather than the module.

somber bluff
#

hi guys

#

can i ask yuo about python?

tender hill
#
db = Postgres("postgres://vxwqrigmjcuyby.compute1.amazonaws.com:5432/drvmnv5cb9bof")
errant agate
#
ssh_server = sshtunnel.SSHTunnelForwarder(
            (config.ssh_server, 22),
            ssh_pkey=config.ssh_private_key,
            ssh_username=config.ssh_username,
            remote_bind_address=('127.0.0.1', 5432),
            local_bind_address=('0.0.0.0', 4444))
#

ssh -nNT -L 0.0.0.0:9000:127.0.0.1:5432 root@app.cool.co

ionic locust
#
errant agate
#

telsql

potent mantle
#

i have a doubt in nginx and flask. Anybody can help me?

median igloo
#

@worthy badger hi

#

@frank hollow hi

frank hollow
viscid valve
#

helo

keen onyxBOT
#

Hey @viscid valve!

Uh-oh! It looks like your message got zapped by our spam filter. We currently don't allow .txt attachments, so here are some tips to help you travel safely:

β€’ If you attempted to send a message longer than 2000 characters, try shortening your message to fit within the character limit or use a pasting service (see below)

β€’ If you tried to show someone your code, you can use codeblocks
(run !code-blocks in #bot-commands for more information) or use a pasting service like:

https://paste.pythondiscord.com

tender hill
#

@fiery bay do you need help?

fiery bay
#

YEs

tender hill
fiery bay
#

Dyanmic programming

#

Should i do it in the chestnut channel?

tender hill
#

can you shaer your code

#

nah do it here

fiery bay
#

alright

#
def fsum(tsum,num,memo={}):
    if tsum in memo:
        return memo[tsum]
    if tsum==0:
        return 1
    if tsum<0:
        return 0
    for n in num:
        rem= tsum-n
        remr= fsum(rem,num,memo)
        if tsum not in memo:
            memo[tsum]+= remr
        
    memo[tsum]=None
    return memo[tsum]
#

Yeah

#

Yes

#

I'm using the top down approach

#

Base case works fine.

#

I'm having problem in memoizing the code

tender hill
fiery bay
#

*memoizing yeah

tender hill
fiery bay
#

In dynamic rogramming

#

*programming

#

The 2 methods to solve a dp problem

#

Yeah

#

Alr8

#
def fsum(tsum,num,memo={}):
    sm=0
    if tsum==0:
        return 1
    if tsum<0:
        return 0
    for n in num:
        rem= tsum-n
        remr= fsum(rem,num,memo)
        sm+=remr
        
    return s
    
#

Like, this works fine but the problem arises in memoization.

#

tsum is total sum

#

In the first example, tsum is 3

#

I'm sorry

tender hill
fiery bay
#

2 is tsum, yeah and [1,2] is num

#

Expected behaviour would be that I get the number of ways to get tsum

#

But I'm getting a KeyError meaning that somehow, numbers arent getting stored in the dictionary.

#
---------------------------------------------------------------------------
KeyError                                  Traceback (most recent call last)
<ipython-input-50-6bc45dd79565> in <module>
----> 1 fsum(3,[1,2])

<ipython-input-49-5f540bed21d3> in fsum(tsum, num, memo)
      8     for n in num:
      9         rem= tsum-n
---> 10         remr= fsum(rem,num,memo)
     11         if tsum not in memo:
     12             memo[tsum]+= remr

<ipython-input-49-5f540bed21d3> in fsum(tsum, num, memo)
      8     for n in num:
      9         rem= tsum-n
---> 10         remr= fsum(rem,num,memo)
     11         if tsum not in memo:
     12             memo[tsum]+= remr

<ipython-input-49-5f540bed21d3> in fsum(tsum, num, memo)
     10         remr= fsum(rem,num,memo)
     11         if tsum not in memo:
---> 12             memo[tsum]+= remr
     13 
     14     memo[tsum]=None

KeyError: 1
tender hill
#
def fsum(tsum,num,memo={}):
    if tsum in memo:
        return memo[tsum]
    if tsum==0:
        return 1
    if tsum<0:
        return 0
    for n in num:
        rem= tsum-n
        remr= fsum(rem,num,memo)
        if tsum not in memo:
            memo[tsum]+= remr
    # maybe the problem is here you are assigning the key a None value
    memo[tsum]=None
    return memo[tsum]
fiery bay
#

Removing the 2nd last line?

tender hill
#
def fsum(tsum,num,memo={}):
    if tsum in memo:
        return memo[tsum]
    if tsum==0:
        return 1
    if tsum<0:
        return 0
    for n in num:
        rem= tsum-n
        remr= fsum(rem,num,memo)
        if tsum not in memo:
            try:
              memo[tsum]+= remr
            except KeyError:
              memo[tsum] = remr
    # maybe the problem is here you are assigning the key a None value
    memo[tsum]=None
    return memo[tsum]
fiery bay
#

num is the list of numbers

tender hill
#

example?

fiery bay
#

[1,2] from the question

#

Like we use [1,2] and then find the number of ways we get 3 by summing digits from [1,2]

#

I mean sort of yeah,

#

Like theres 3 ways we can get 3 by summing 1 and 2

#

I could explain you the code but I'm unfortunately supressed ;_;

#

Yeah, sure

#

No, I was trying to explain my code.

#

Like, I reduce numbers in num from tsum such that if a succession follows upto 0, that means that sequence is a valid way of making 3 using 1's and 2's. Here, tsum==0 and tsum<0 are base cases.

tender hill
#
from itertools import combinations

res = 0

num_of_stairs = 4
potential_options = []

for _ in range(num_of_stairs):
    potential_options.append(1)
    potential_options.append(2)

all_combs = []

for r in range(num_of_stairs+1):
    r_combs = combinations(potential_options, r)
    for comb in r_combs:
        if comb not in all_combs:
            all_combs.append(comb)

for comb in all_combs:
    if sum(comb) == num_of_stairs:
        res += 1

print(res)
fiery bay
#

ohk

#

yeah

#

mhm

#

yes

#

mhm

tender hill
#

!e

from itertools import combinations as comb
a = [1,2,3,4,5]
print("when r is 2", list(comb(a,2)))
print("when r is 3", list(comb(a,3)))
keen onyxBOT
#

@tender hill :white_check_mark: Your eval job has completed with return code 0.

001 | when r is 2 [(1, 2), (1, 3), (1, 4), (1, 5), (2, 3), (2, 4), (2, 5), (3, 4), (3, 5), (4, 5)]
002 | when r is 3 [(1, 2, 3), (1, 2, 4), (1, 2, 5), (1, 3, 4), (1, 3, 5), (1, 4, 5), (2, 3, 4), (2, 3, 5), (2, 4, 5), (3, 4, 5)]
fiery bay
#

Mhm yes

#

Can we get 1,2 when r is 3?

tender hill
#

we can 1,2 when r is 2

#

we can 1,1,2 when r is 3

fiery bay
#

Oh, so r is the amount of elements in the tuple, gotcha

fiery bay
#

gg.

#

I'll just go over the code again and I'll ping you if required, thanks πŸ™‚

tender hill
#

alright bye! :)

fiery bay
#

gg, bye

#

@clear agate I cant speak

#

Yea, he provided a solution using a diff approach

#

Meaning itll take longer in bigger numbers?

#

Yeah, it is taking longer.

#

Mhm

clear agate
#

In mathematics, a permutation of a set is, loosely speaking, an arrangement of its members into a sequence or linear order, or if the set is already ordered, a rearrangement of its elements. The word "permutation" also refers to the act or process of changing the linear order of an ordered set.Permutations differ from combinations, which are sel...

keen onyxBOT
#

Hey @main solar!

It looks like you tried to attach file type(s) that we do not allow (.pdf). We currently allow the following file types: .gif, .jpg, .jpeg, .mov, .mp4, .mpg, .png, .mp3, .wav, .ogg, .webm, .webp, .flac, .m4a.

Feel free to ask in #community-meta if you think this is a mistake.

whole glade
#

@cosmic bloom you need help? I see youre in code/help 0

whole glade
#

Hello

#

@hazy walrus what are you working on?

#

having issues with jet brains?

#

I am really close to being voice verified.

simple cipher
#

HUUUU hyperlemon

neon heron
#

hey @main solar do you have a mic?

main solar
#

yes

neon heron
#

can you hear me?

main solar
#

no

neon heron
#

you're muted

#

now you're unmuted

#

cannot hear you

main solar
#

can u hear me

neon heron
#

no

#

maybe check your input/output settings?

#

still can't hear you

cosmic ginkgo
#
[[f,r], [f1,r1]]```
manic moth
#

would anyone be willing to hop in a call with me? I am trying to figure out pulling info from an api and i am very new to python

neon heron
#
import gibbs
seqs = sequence.readFastaFile(both_seqs, sym.DNA_Alphabet)
W = 8 # the width of the motif sought
g = gibbs.GibbsMotif(both_seqs, W)
q = g.discover(niter = 1000)
print('Consensus: ', end='')
for pos in q:
    print(pos.getmax(), end='')
print()
p = g.getBackground()
print('Background distribution:', p)
a = gibbs.getAlignment(seqs, q, p)
k = 0
for seq in seqs:
    #print("%s \t%s" % (seq.name, seq[a[k]:a[k]+W]))
    print("sequence.Sequence(\'%s\', name=\'%s\')," % (seq[a[k]:a[k]+W], seq.name))
    k += 1```
#
class GibbsMotif():
    """
    A class for discovering linear motifs in sequence data.
    Uses Gibb's sampling (Lawrence et al., Science 262:208-214 1993).

    Also see http://bayesweb.wadsworth.org/gibbs/content.html which has info
    on "site sampling", "motif sampling", "recursive sampling" and "centroid
    sampling". The first is implemented (roughly) below.
    """
    def __init__(self, seqs, length, alignment = None):
        """ Construct a "discovery" session by providing the sequences that will be used.
            seqs: sequences in which the motif is sought
            length: length of sought pattern (W)
            alignment: positions in each sequence for the initial alignment (use only if the alignment
            has been determined from a previous run).
            """
        self.seqs = seqs
        self.length = length # length of motif 1..W
        seqs = self.seqs
        self.alphabet = None
        k = 0
        for s in seqs:
            if self.alphabet != None and self.alphabet != s.alphabet:
                raise RuntimeError("Sequences invalid: different alphabets")
            self.alphabet = s.alphabet
            if alignment:
                if alignment[k] < 0 or alignment[k] >= len(s):
                    raise RuntimeError("Initial alignment invalid: does not match sequence " + s.name)
            k += 1```
#

``py

#
import sequence
def reverse_complement(sequence):
    # This function finds the reverse complement of any DNA sequences that call it. 
    complement = {'A': 'T', 'C': 'G', 'G': 'C', 'T': 'A'} 
    reverse_sequence = []
    #For loop that goes over every sequence in a file containing sequences, and calls the Reverse complement funtion.
    for item in sequence[::-1]:
        reverse_sequence.append(complement[item])
    return reverse_sequence

rv_comp = []
# empty list that will hold all of the reverse complement sequences.

#For loop that iterates over every sequence and finds the reverse complement. 
for seq in seqs:
    rverse_comp = reverse_complement(seq)
    rv_comp.append(rverse_comp)
    print("Forward")
    print(seq)
    print()
    print("Reverse")
    print("".join(rverse_comp))
    print()

both_seqs = Sequence(seq, rv_comp)```
keen onyxBOT
#

@main solar :x: Your eval job has completed with return code 1.

001 | Traceback (most recent call last):
002 |   File "<string>", line 31, in <module>
003 | NameError: name 'sequence' is not defined
neon heron
#

not now

#

1855

keen onyxBOT
#

@main solar :white_check_mark: Your eval job has completed with return code 0.

[['A', 'G', 'C', 'T'], ['A', 'G', 'C', 'T']]
neon heron
#

both_seqs = list(rv_comp += seqs)

#
both_seqs = Sequence(rv_comp, sym.DNA_alphabet)```
#

#both_seqs = Sequence(rv_comp, sym.DNA_alphabet)

#both_seqs = Sequence(seq, rv_comp)

#
import sequence
def reverse_complement(sequence):
    # This function finds the reverse complement of any DNA sequences that call it. 
    complement = {'A': 'T', 'C': 'G', 'G': 'C', 'T': 'A'} 
    reverse_sequence = []
    #For loop that goes over every sequence in a file containing sequences, and calls the Reverse complement funtion.
    for item in sequence[::-1]:
        reverse_sequence.append(complement[item])
    return reverse_sequence

rv_comp = []
# empty list that will hold all of the reverse complement sequences.

#For loop that iterates over every sequence and finds the reverse complement. 
for seq in seqs:
    rverse_comp = reverse_complement(seq)
    rv_comp.append(rverse_comp)
    print("Forward")
    print(seq)
    print()
    print("Reverse")
    print("".join(rverse_comp))
    print()```
neon heron
#

<gibbs.GibbsMotif object at 0x000001AB7E49DE80>
<gibbs.GibbsMotif object at 0x000001AB7E3E1DC0>

neon heron
#

ACGT

#

^

neon heron
#

@main solar one last bit of help if you don't mind?

#

if you're busy no worries

#

nevermind I solved it!!

simple cipher
#

yaaaa

simple cipher
#

var canvas;
var backgroundImage, bgImg, car1_img, car2_img, track;
var database, gameState;
var form, player, playerCount;
var allPlayers, car1, car2;
var cars = [];

function preload() {
backgroundImage = loadImage("assets/background.png");
car1_img = loadImage("assets/car1.png");
car2_img = loadImage("assets/car2.png");
track = loadImage("assets/track.jpg");
}

function setup() {
canvas = createCanvas(windowWidth, windowHeight);
database = firebase.database();
game = new Game();
game.getState();
game.start();
}

function draw() {
background(backgroundImage);
if (playerCount === 2) {
game.update(1);
}

if (gameState === 1) {
game.play();
}
}

function windowResized() {
resizeCanvas(windowWidth, windowHeight);
}

tawdry umbra
#

Hi, so is anyone willing to help me with my problem?

#

This is the command...

#

which exists but instead, when I run it in an enterpreter, this shows up...

#

Anyone know how to resolve this issue?

#

Could I just use this?

#

file_object = open(β€œhome.py”)

main solar
faint hinge
#

!e

def greeting_decorator(function):
  def returned_function():
    print("I'm from the decorator!")
    function()
    print("We're now out of the original function and back in the decorator")
  return returned_function

@greeting_decorator
def say_hi():
  print("Hello!  This is from the say_hi function")

say_hi()
keen onyxBOT
#

@faint hinge :white_check_mark: Your eval job has completed with return code 0.

001 | I'm from the decorator!
002 | Hello!  This is from the say_hi function
003 | We're now out of the original function and back in the decorator
faint hinge
#

!e

def greeting_decorator(function):
  def returned_function():
    print("I'm from the decorator!")
    function()
    print("We're now out of the original function and back in the decorator")
  return returned_function

def say_hi():
  print("Hello!  This is from the say_hi function")

say_hi = greeting_decorator(say_hi)
say_hi()
keen onyxBOT
#

@faint hinge :white_check_mark: Your eval job has completed with return code 0.

001 | I'm from the decorator!
002 | Hello!  This is from the say_hi function
003 | We're now out of the original function and back in the decorator
spice thunder
tender hill
#

!paste

keen onyxBOT
#

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.pydis.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.

spice thunder
tender hill
spice thunder
tender hill
#

@pulsar basin

#

which libraries you have used

pulsar basin
#

in my bot's code?

tender hill
#

py3 filename.py

tender hill
#

a normal heroku file looks like this

pulsar basin
#

I'm on mac os btw

tender hill
#

you don't have requirements.txt and Procfile

pulsar basin
#

hmmmm

#

how can I fix that

tender hill
spice thunder
#

C:\Users\User\AppData\Local\Programs\Python\Python39\python.exe: can't open file 'C:\Users\User\VIKRAM_PRASAD_TP057977.py': [Errno 2] No such file or directory

tender hill
pulsar basin
#

lol it's probably a really basic question

#

but I don't really check my files all that often, since I have all my files and projects stored in pycharm

tender hill
spice thunder
tender hill
tender hill
pulsar basin
#

I'll just list them out for you

#

webbrowser, discord, asyncpraw, os, base64, time, random, logging, httpx

#

aiohttp, asyncio

#

and that's it

tender hill
#

now what you do is

spice thunder
tender hill
#

python3 -m pip freeze

pulsar basin
pulsar basin
#

okay

#

it returns a list of libs

tender hill
pulsar basin
#

should I cp that?

tender hill
keen onyxBOT
#

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.pydis.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.

tender hill
#

paste it here

tender hill
keen onyxBOT
#

Hey @pulsar basin!

Uh-oh! It looks like your message got zapped by our spam filter. We currently don't allow .txt attachments, so here are some tips to help you travel safely:

β€’ If you attempted to send a message longer than 2000 characters, try shortening your message to fit within the character limit or use a pasting service (see below)

β€’ If you tried to show someone your code, you can use codeblocks
(run !code-blocks in #bot-commands for more information) or use a pasting service like:

https://paste.pythondiscord.com

#

Hey @pulsar basin!

Uh-oh! It looks like your message got zapped by our spam filter. We currently don't allow .txt attachments, so here are some tips to help you travel safely:

β€’ If you attempted to send a message longer than 2000 characters, try shortening your message to fit within the character limit or use a pasting service (see below)

β€’ If you tried to show someone your code, you can use codeblocks
(run !code-blocks in #bot-commands for more information) or use a pasting service like:

https://paste.pythondiscord.com

tender hill
keen onyxBOT
#

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.pydis.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.

tender hill
keen onyxBOT
#

Hey @pulsar basin!

It looks like you tried to attach file type(s) that we do not allow (.html). We currently allow the following file types: .gif, .jpg, .jpeg, .mov, .mp4, .mpg, .png, .mp3, .wav, .ogg, .webm, .webp, .flac, .m4a.

Feel free to ask in #community-meta if you think this is a mistake.

pulsar basin
tender hill
#
discord==1.7.3
discord.py==1.7.3
asyncpraw==7.4.0
asyncprawcore==2.3.0
#
worker: python main.py
pulsar basin
tender hill
pulsar basin
tender hill
pulsar basin
knotty holly
#

!stream 867430190888386581 30M

keen onyxBOT
#

βœ… @pulsar basin can now stream until <t:1630011957:f>.

knotty holly
#

NP πŸ‘

tender hill
#

yea i can

#

@pulsar basin

#

can you show the build logs

#

yea

#

turn the pencil on

#

turn it on-off

#

no

#

just check if it comes online

#
@bot.event
async def on_ready():
    print("The bot is ready!")
#

add this code in your file

tawdry umbra
#

Thanks

cold lake
#

Hi, I need help with some coding that I'm having trouble with

tawny gulch
#

gatt

frozen gull
#

Oh lucky lucky

#

Bluenix you Dungeon Master

unkempt delta
#

πŸ˜…

frozen gull
#

And you fakin slef

#

hahha

unkempt delta
#

How am I supposed to pronounce your name?

frozen gull
#

simply Speedruner

#

And what are you doing

stark bane
#

I can’t talk yet

frozen gull
#

It's good

#

Well okay I went good luck

#

Goodbye

unkempt delta
#

πŸ‘‹

simple raptor
#

Hi, is the 2nd part of an AND condition executed if the 1st part returns true?

main solar
#

got some problems with functions and order of execution in a class anyone help

latent canyon
#

Hi I need some help troubleshooting my code

young laurel
#

does anybody knows about multi stage building in docker?

clear agate
#

my neighbours are playing music with large volume

#

@neon heron

#

i cant speak rn

#

there is noise

#

i dont think i can help you with this :/

#

i am not good at terminal stuff

tender hill
#

i am lagging

#

alright

tender hill
#

@white surge do you need help?

stable dagger
#

hello

#

i'm checking in if anyone needs help

fading phoenix
#
sudo add-apt-repository ppa:appimagelauncher-team/stable
sudo apt update
sudo apt install appimagelauncher
sturdy viper
#

!code

keen onyxBOT
#

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.

upper wave
#

anyone know a good places to learn Manichean learning?

cloud oyster
#

print("Welcome to My Program!")
name = input("Please Type your Name here: ")
print(f"Greetings {name}")
age = int(input("Please Enter your age")

for age in range(ages):
print("You have met the required Age.")
else:
print("You are no elegilbe")

junior abyss
#

what do you want to do here?

#

like whats the

#

objective

#

of the program

#

@cloud oyster

cloud oyster
#

tysm

junior abyss
#

oh ok

rancid roost
faint hinge
ancient ether
#

Hey I have created a program for generating certificate where I have used 2 fonts for the text. Now I want to run this program on cloud - on repl, but it's not allowing the font files, can someone help me?

faint hinge
#

Have you uploaded the font files to repl?

ancient ether
#

yes

faint hinge
#

What's the error it's tossing to you?

ancient ether
#

let me share you the screenshot

#

one min please

faint hinge
#

Take your time

ancient ether
#

@faint hinge

faint hinge
#

Mkay, one sec

ancient ether
#

in here I have uploaded the fonts and given the location of that fonts

faint hinge
#

So it's with how you're trying to access the file. replit's file system is a bit different

#

This should help

ancient ether
#

thank you, will look into it

#

got it @faint hinge thanks

faint hinge
#

Glad it helped!

ancient ether
#

also got an other error

#

I actually used smtplib to send a mail using python

#

but I'm getting this error

blissful bane
#

move the it into the fun

ancient ether
blissful bane
#

what are you building my friend @main solar

#

@main solar you got "randomcolors" function that does not have the code in it... move it as you have been told again into the func

faint hinge
# ancient ether

That's something being weird with your browser or api key or something funky.

#

Not sure on that

ancient ether
#

ok can you please tell me how to send a mail using python on repl

#

cause when I use smtp, I'm getting this error

blissful bane
#

ye

#

the functions before the main

exotic oriole
#

<@&831776746206265384> need to drop a line to ya.

knotty holly
#

Hello, how can we help you?

exotic oriole
#

hey ya LX ❀️

#

got someone using this discord trying to run CC scams on members

knotty holly
#

Could you send the details to @feral cipher please?

exotic oriole
#

sure thing

knotty holly
#

Thanks πŸ™‚

exotic oriole
#

You are most welcome. I might not be the best rule follower but thats just another level of hell na.

#

@knotty holly done and done. Good evening sudo su.

main solar
#

hi friends can you all teach me how to learn python ?

dense karma
#

Hi guys!
It’s like a while that I have started learning Python.
I have started with Coursera and it’s really useful but I don’t know how I can get my hands on more practices .
I mean there I have like one assignment each week but I want to do more and become really good at this.
Do you have any suggestions?

fading phoenix
fading phoenix
#

Suspicious emails: unclaimed insurance bonds, diamond-encrusted safe deposit boxes, close friends marooned in a foreign country. They pop up in our inboxes .

Suspicious emails: unclaimed insurance bonds, diamond-encrusted safe deposit boxes, close friends marooned in a foreign country. They pop up in our inboxes .

SEASON 2 OF SCAMALOT KICK...

β–Ά Play video
fading phoenix
main solar
fading phoenix
stark bane
#
@bot.command()
async def afk(ctx, reason=None):
    current_nick = ctx.author.nick
    await ctx.send(f"{ctx.author.mention} is afk: {reason} ")
    await ctx.author.edit(nick=f"[AFK] {ctx.author.name}")

    counter = 0
    while counter <= int(mins):
        counter += 1
        await asyncio.sleep(60)

        if counter == int(mins):
            await ctx.author.edit(nick=current_nick)
            await ctx.send(f"{ctx.author.mention} is no longer AFK")
            break
fading phoenix
#
if len(nick) > 6 and nick.lower().startswith('[afk] '):
    nick = nick[6:]
tender hill
#
@bot.command()
async def afk(ctx, reason=None):
    current_nick = ctx.author.nick
    await ctx.send(f"{ctx.author.mention} is afk: {reason} ")
    await ctx.author.edit(nick=f"[AFK] {ctx.author.name}")

    def check_s(author):
      def inner_check(message):
          return message.author == author
      return inner_check

    while True:
      try:
        _ = bot.wait_for('message', check=check_s, timeout=1)
      except Exception as e:
        pass
      else:
        await ctx.author.edit(nick=current_nick)
        await ctx.send(f"{ctx.author.mention} is no longer")
        break
fading phoenix
#
"[AFK] "
#
[AFK] Cuteness
#

@stark bane Sorry if I offended you

tender hill
#

@feral socket do you need help?

feral socket
#

can i get simple coding

cloud oyster
#

@fading phoenix

young mesa
#

a course

#

online

keen narwhal
#

Hey man

main solar
#

i need help with this:
Make a program that

  1. Kets two players to enter their details, which are then checked to ensure that they are

Registered players.

  1. Lets both players to roll two 6-sided dice.

  2. Calculates and outputs the points for each round and each player’s total score.

  3. Lets the players play 5 rounds.

  4. If both players have the same score after 5 rounds, allows each player to roll 1 die each until

someone wins.

  1. Outputs who has won at the end of the 5 rounds.

  2. Stores the winner’s score, and their name, in an external file.

  3. Displays the score and player name of the top 5 winning scores from the external file.

#

The rules are:

β€’ The points rolled on each player’s dice are added to their score.

β€’ If the total is an even number, an additional 10 points are added to their score.

β€’ If the total is an odd number, 5 points are subtracted from their score.

β€’ If they roll a double, they get to roll one extra die and get the number of points rolled added to

their score.

β€’ The score of a player cannot go below 0 at any point.

β€’ The person with the highest score at the end of the 5 rounds wins.

β€’ If both players have the same score at the end of the 5 rounds, they each roll 1 die and

whoever gets the highest score wins (this repeats until someone wins).

Only authorized players are allowed to play the game.

Where appropriate, input from the user should be validated.

fading phoenix
amber epoch
#

@lilac mist

#

Do you require assistance? πŸ™‚

#

I'll be around if you need anything. πŸ™‚

pine geyser
#

i would like to get some help pls

thick flower
#
[2, 1]
[3, 1]
[4, 1]
[5, 1]
[6, 1]
[7, 1]
[8, 1]
[9, 1]
[10, 1]
[11, 2]
[12, 2]
[13, 2]
[14, 2]
[15, 2]
[16, 2]
[17, 2]
[18, 2]
[19, 2]
[20, 2]
[21, 3]```
livid nacelle
#

Hello

#

Are you a bot?

limpid mural
#

eyyyyyyy

#

yoooo bro

#

how can i talk?

#

@amber epoch are you a bot?

#

ty

olive gust
#

Understood

#

That policy makes sense

median sand
#

you need help @frank glacier ?

frank glacier
main solar
#

hi

#

I have been working on something for four fucking hours

#

@hazy walrus

hazy walrus
#

hi

main solar
#

I made a web scrapy

hazy walrus
#

I made a web scrapy once and it told me the fattest cat on a particular adoption website

main solar
#

so there is a lot of ways I have tried this

#

(WARNING THIS IS A RANDOM PIC FROM A BIG WEBSITE THAT THESE LINKS ARE MOST ARE NOT SAFE SO DO NOT RUN JUST LOOK)

#

@cosmic ginkgo same

#

where is a good website where I can share some of the code.

civic zephyr
#

hello

sick pike
#

hi

near wasp
#

hey

junior ember
#

Can someone help me with selenium im trying to get a text from a page without just getting //*[@id="PageContent"]/section/div/div/div/div/div/div[3]/button

barren girder
#

hi

white basalt
#

Hello

clear agate
#

@white basalt

white basalt
#

I can't talk

#

ok

#

I'm trying to learn python

#

and i'm stuck on a syntax error

barren girder
#

u have get voice verify

white basalt
#

wait a moment

#

yes

#

I'm trying to divide the total by 3

clear agate
#

average = total /3

white basalt
#

so no space between the slash and the 3?

#

It still comes back with an error

#

The tutorial wants me to use the 4th item in each list

#

ok

#

i know the indexing starts at 0

clear agate
#

total = (row_1[4] + row_2[4] + row_3[4])

white basalt
#

ohhhh

#

let me try that

#

or wait

barren girder
white basalt
#

wouldn't it be more efficient to just add the ratings together?

#

Now that they're turned into variables?

clear agate
white basalt
#

You're a genius

#

thank you so much

main solar
#

hello

junior sentinel
#

for i in range(10):
 name = input("bale onoma :")

print(megaliteroonoma)

i want to see the longest name

#

can someone help me?

main solar
#
maximum=0
for i in range(10):
 name = input("bale onoma :")
 temp=len(name)
 if temp>maximum:
     maximum=temp
     ans=name
print(ans)
β€Š```
main solar
junior sentinel
#

yes

junior sentinel
main solar
#

Welcome

hybrid slate
#

Have a nice day

#

too many f bomb

#

s

main solar
#

I can't join voice chat

#

WTF

#

Dude

hybrid slate
#

yes

#

bathing in cold water burns calories

#

for the reason u mentioned

dreamy locust
# main solar

you just have to uncollapse the voice category. you currently have it collapsed

hybrid slate
#

a maniac laughs

dreamy locust
#

you also can't join?

main solar
#

Yeah

hybrid slate
#

i think there is a limit for memebers to join

main solar
#

No im actually the same guy

#

L

#

I just changed my name and av

#

But nvm

#

How to??

hybrid slate
#

iddk

main solar
#

This sht fcked up

dreamy locust
main solar
#

Thxx

keen onyxBOT
#

Hey @hybrid slate!

It looks like you tried to attach file type(s) that we do not allow (.htm). We currently allow the following file types: .gif, .jpg, .jpeg, .mov, .mp4, .mpg, .png, .mp3, .wav, .ogg, .webm, .webp, .flac, .m4a.

Feel free to ask in #community-meta if you think this is a mistake.

tacit fern
#

@silk timber What do you need help with?

silk timber
#

I was just hanging out there to get away from discussion while I worked on a little code

#

But I'm also available if anyone needs any help, brb...

last pasture
#

im in need of some basical intro to python help. Is there anyone who could hop in a voice chat with me?

indigo vortex
#

can anyone help me with my tkinter music player in vc

#

its not working how i want and been stuck for a couple days now

brazen warren
#

Is anyone available to help with a python panda library issue?

main solar
#

someones echo sounds like a demon

#

I am new coding and I just want to learn hhow to code so I am prepared for next yr coding

#

hello

modern dust
#

Sure, what's up

main solar
#

I am new to coding and I am in your vc

modern dust
#

!resources

keen onyxBOT
#
Resources

The Resources page on our website contains a list of hand-selected learning resources that we regularly recommend to both beginners and experts.

main solar
#

I have tried but I had no clue where to go

#

so many people have told me to use that but I have no clue where to go

#

ok

modern dust
main solar
#

if it is game mod I am using that

#

yes that is helping thank you

modern dust
#

No problem!

main solar
#

also I am trying to get voice verifried

#

where is voice verification

shadow cliff
#

why cant i talk in the VC?

echo urchin
keen onyxBOT
#

Voice verification

Can’t talk in voice chat? Check out #voice-verification to get access. The criteria for verifying are specified there.

main solar
#

yo

#

i got some problem with my code

#

anyone wanna help

#

it about argparse, OOP and stuff like that

#

i wanna make a custom action

limber raven
#

i just joind

#

nice

#

ok

#

yes

#

akg

#

he left

#

ty

#

lerning

#

pygame

#

i use thonny

#

ive kinda made this

#

cant close it

#

i have no idea what is main

#

line 8

#

i have no idea i just watched totouralil

#

oh

#

i have stop button at the top of the screen

#

pygame weerd

modern dust
#
# import the pygame module, so you can use it
import pygame
 
# define a main function
def main():
     
    # initialize the pygame module
    pygame.init()
    # load and set the logo
    logo = pygame.image.load("logo32x32.png")
    pygame.display.set_icon(logo)
    pygame.display.set_caption("minimal program")
     
    # create a surface on screen that has the size of 240 x 180
    screen = pygame.display.set_mode((240,180))
     
    # define a variable to control the main loop
    running = True
     
    # main loop
    while running:
        # event handling, gets all event from the event queue
        for event in pygame.event.get():
            # only do something if the event is of type QUIT
            if event.type == pygame.QUIT:
                # change the value to False, to exit the main loop
                running = False
     
     
# run the main function only if this module is executed as the main script
# (if you import this as a module then nothing is executed)
if __name__=="__main__":
    # call the main function
    main()
limber raven
#

yea

#

i do not know func

modern dust
#
def say_hello():
    print("Hello")

say_hello()
say_hello()
#

!e

def say_hello():
    print("Hello")

say_hello()
say_hello()
keen onyxBOT
#

@modern dust :white_check_mark: Your eval job has completed with return code 0.

001 | Hello
002 | Hello
limber raven
#

code no work the long 1

#

ok i try

#

shure

modern dust
#

!e

#
def say_hello(num_of_times):
    for _ in range(num_of_times):
        print("Hello")

say_hello(5)
#

!e

def say_hello(num_of_times):
    for _ in range(num_of_times):
        print("Hello")

say_hello(5)
keen onyxBOT
#

@modern dust :white_check_mark: Your eval job has completed with return code 0.

001 | Hello
002 | Hello
003 | Hello
004 | Hello
005 | Hello
limber raven
#

ok

#

this is img

#

same dir

#

memes

#

i cant close it

#

ut o

#

yellow means frees

#

yea

#

im useing thoony

#

nn

#

!e

keen onyxBOT
#
Command Help

!eval [code]
Can also use: e

*Run Python code and get the results.

This command supports multiple lines of code, including code wrapped inside a formatted code
block. Code can be re-evaluated by editing the original message within 10 seconds and
clicking the reaction that subsequently appears.

We've done our best to make this sandboxed, but do let us know if you manage to find an
issue with it!*

limber raven
#

!e [print ("hi")]

keen onyxBOT
#

@limber raven :white_check_mark: Your eval job has completed with return code 0.

hi
limber raven
#

do u want to frend me

#

ok

#

thats purple

#

the backround

#

win 98

#

the tabs

#

i have unity

#

i dont have c inturpreter

#

yea

#

c#

#

yea

#

ik

#

ive seen it

#

or writer

#

oh

#

code is hard

#

basic is kinda hard

#

i have a rasperry pi to code on the go

#

what that

#

oh

#

my pc trash

#

i can bareley run roblox

#

10fps

#

yes

#

java is like c ive herd

#

oh

#

holy c

#

c# and c is holy c

#

something like that

#

ms basic

#

c64

#

10 print hi

#

no space between 10 and print

#

i need 2 more days

surreal moth
#

so uh

limber raven
#

hi catt

surreal moth
#

how do i know how many messages i sent

#

cant i just

#

yeah lol

#

what happens?

#

damn

#

well

#

I already got that requirement

limber raven
#

!e [print ("hello world")]

keen onyxBOT
#

@limber raven :white_check_mark: Your eval job has completed with return code 0.

hello world
surreal moth
#

only the 50 messages one

#

look at what i have created....

#

Monopoly.

#

A army.

#

I bought them for 0.03$

limber raven
#

how

surreal moth
#

selling them for 1$

#

each

#

Im going to be rich

limber raven
#

u like trariea

surreal moth
#

yes

limber raven
#

i do to

surreal moth
#

lol same I had like 5$

#

damn

limber raven
#

to leval 10

surreal moth
#

most people who buy and sell hats are flippers

#

i mean

limber raven
#

hi solim

surreal moth
#

If i manage to sell only 1 for 1$ (the lowest price)

#

then I make back profit

#

so I only need 1 helpless guy who wants a duck

#

Spiffing brit

limber raven
#

sells 1c item for 25 bucks

#

ok

surreal moth
#

oh oop

coral monolith
#

Is it possible for me to log into a website that uses google and scrape the data just using post/get requests and that sorta thing? I do not want to open a browser tab

cedar ember
#

Guys i had doubt regarding a python problem that i was solving online. Is this the right place to ask?

hollow tusk
#

Hi everyone I was wondering

#

What kind of function this got to be?

main solar
#

yo

#

anyone can help me at argparse

#

in code help

#

0

#

pls

hollow tusk
#

Hi

#

not yet permissed for the talk bro

#

@gilded fjord

gilded fjord
#

ok

blissful sandal
#

@tender hill can you help me with a python problem?

cosmic bloom
#

hi

young mesa
#

guys, how to delete the main repository on github?

cosmic bloom
#

m

odd lion
#

hello

pastel valley
#

guys

#

how can i equal my variable to something else when they are undefined

#

like this code

#

x = n || ""

shadow cliff
#

sup

#

aaron and opman

hybrid slate
#

hoi

mint wren
#

hello

main solar
#

hello

shadow cliff
#

hello

#

πŸ˜‚

main solar
#

hi

signal forge
#

Program to accept a string and count and display the number of words which are starting with a vowel

#

can someone help ?

wary adder
#

Can cythonize protect source code from reverse engineering

deep mirage
#

hi

#

help me code py discode

worldly sedge
#

ok

#

what is the issue ?

deep mirage
#

ok thk

maiden lodge
#

hello, can you help me: The code has bugs. Can you find them, correct them and pass the tests?
HELP BUGS

def fix_me(my_list):

if len(my_list) % 2:  # imperative code
    new_list = []
    for item in my_list:
        for element in item:
            new_list = new_list.append(element)
else:  # functional code
    new_list = [element for element in my_list for element in item]

return new_list.sort(reverse=True, key=lambda x: -x)

Arguments: [[3, 4], [2, 6]]

Departure:
Error Message: free variable 'item' referenced before assignment in enclosing scope, Error Type: NameError, Stack Trace: ['File "/var/task/879430_9203_fix_me.py", line 15, in lambda_handler \ n return fix_me ([[3 , 4], [2, 6]]) \ n ',' File "/var/task/879430_9203_fix_me.py", line 11, in fix_me \ n new_list = [element for element in my_list for element in item] \ n ',' File "/var/task/879430_9203_fix_me.py", line 11, in <listcomp> \ n new_list = [element for element in my_list for element in item] \ n ']

Expected output:
[6, 4, 3, 2]

tender hill
#

@dark copper from stpl001 import run

tender hill
#

Β―_(ツ)_/Β―

dark copper
#

coursera andrew ng

tender hill
dark copper
#

Highlighted Topics
02:52 [Talk: Stacked Capsule Autoencoders by Geoffrey Hinton]
36:04 [Talk: Self-Supervised Learning by Yann LeCun]
1:09:37 [Talk: Deep Learning for System 2 Processing by Yoshua Bengio]
1:41:06 [Panel Discussion]

Auto-chaptering powered by VideoKen (https://videoken.com/)
For indexed video, https://conftube.com/video/vim...

β–Ά Play video
#

Join the channel membership:
https://www.youtube.com/c/AIPursuit/join

Subscribe to the channel:
https://www.youtube.com/c/AIPursuit?sub_confirmation=1

Support and Donation:
Paypal β‡’ https://paypal.me/tayhengee
Patreon β‡’ https://www.patreon.com/hengee
BTC β‡’ bc1q2r7eymlf20576alvcmryn28tgrvxqw5r30cmpu
ETH β‡’ 0x58c4bD4244686F3b4e636EfeBD159258A5513...

β–Ά Play video
dark copper
#

AI Loss Landscape Visualization talk given by Javier Ideami at the Synthetic Intelligence Forum of Toronto on July 22, 2020.
In the first part of this talk, Javier explains the context, the why and the how of the visualizations of the Loss Landscape project. In the second part of the talk, Javier presents some of the visualizations of the projec...

β–Ά Play video
junior ember
#

So basically I need a key generator for my code so when someone purchases my product theyll download it open it up and they be prompted with a screen that says Enter - License key -
I'll have a discord bot that can generate these keys and remove them

#

Can anyone help me with this problem

#

?

shadow cliff
#

r u guys talking.. ?

hybrid slate
#

import turtle
import os
inte = turtle.Screen()
inte.title('blalal')
inte.bgcolor('black')
inte.setup(width = 800, height = 600)
inte.tracer

#square
square = turtle.Turtle()
square.shape('square')
square.color('purple')
square.speed(0)
square.shapesize(stretch_wid= 1, stretch_len = 1)
square.penup()
square.goto(-350,0)

#controls
def square_down():
y = square.ycor
y += 20
square.set(y)

def square_up():
y = square.ycor
y -= 20
square.set(y)

#keyboard controls
inte.listen()
inte.onkeypress(square_down, "s")
inte.onkeypress(square_down, "w")

Main game loop

while True:
inte.update()

#

what did i do wrong here?

#

cant figure out

strange plume
#

hi everyone , can someone tell me , how can i split this with keep wihtespaces
my
str

be
like

And i want split it like this -> ['my','str','\n','be','like']

thin pulsar
#

just do

#

string = string.replace('\n', '')

#

and then split it

main solar
#

@dark hinge

#

finally i got verified

dark hinge
#

nice

#

now sing a song plx

hardy lantern
#

Needing help if anyone is available

elfin olive
deft sand
shadow cliff
#

what class is this for

cold whale
#

Can someone help me understand why I'm not able to print/return this (I'm completely new to Python/coding in general)

main solar
#

hello help voice

#

voice 0

swift leaf
#

is it supposed to be scan0bject?

stoic kelp
#

<@&831776746206265384> can i get screen permission

sonic cipher
#

Could someone help me understand this thing?

#

In Jupyter or Co-lab
we can write the code in[4] like this for known just only type of num1. That so easy and not effect to each code.
In this case we know the type of num1 is int
Question 1 : This action what we call this?
Last lession i didn't make sure to call it debugging?

#

Question 2 : In pyCharm we can't do this (run just some code that isn't affect to each code)
But if we need to run, they will run from 1st line to the end like this picture

#

and if we code just
type(num1)
they'll not print anything back but need to code
print(type(num1))

If we have a lot of code before and don't need it run but we need to know the value of num1
How to make it easier like Jupyter notebook?

swift leaf
#

Traceback (most recent call last):
File "C:\Users\anime\AppData\Local\Citra\nightly-mingw\scripting\citrarng.py", line 2, in <module>
from PySide6.QtWidgets import QApplication
ModuleNotFoundError: No module named 'PySide6'

mossy magnet
#

You need to install the module first you can do that using "pip install PySide6"

onyx dove
#

from PySide6.QtWidgets import QApplication

frank glacier
#

im need do a homework but i dont know anything about it

#

c

#

:c

neon heron
#
# First create BedFile for genomic ranges of 1kb upstream promoter region of each transcript
marker_overlaps = []


# ---------------------- Write your code here 


marker_overlaps_bed = bed.BedFile(marker_overlaps)
try:
    for o in marker_overlaps_bed:
        print(o.name, o.chrom, o.chromStart, o.chromEnd)
except Exception as e:
    print(e)```
amber epoch
#

!e py a = set("ABCDEF") b = set("DEFGHI") c = a.intersection(b) print(c)

keen onyxBOT
#

@amber epoch :white_check_mark: Your eval job has completed with return code 0.

{'F', 'D', 'E'}
neon heron
#

i'll brb

#

sorry. someones voimitting

amber epoch
#

Fun for the whole family!

neon heron
#

@sly merlin hop in

#
esc_atac = bed.BedFile('GSM2579550_ESC_ATAC_peak.bed')
hCO_atac = bed.BedFile('GSM2579552_hCO_day72_ATAC_peak.bed')```
#

'PAX6', 'NEUROG2', 'TBR1', 'BCL11B', 'SLC32A1', 'GAD1', 'GAD2',
'GFAP', 'GLUD1', 'SLC17A7', 'SLC17A6']

#
# First create BedFile for genomic ranges of 1kb upstream promoter region of each transcript
marker_overlaps = ['PAX6', 'NEUROG2', 'TBR1', 'BCL11B', 'SLC32A1', 'GAD1', 'GAD2', 
           'GFAP', 'GLUD1', 'SLC17A7', 'SLC17A6']


# ---------------------- Write your code here 
 

marker_overlaps_bed = bed.BedFile(marker_overlaps)
try:
    for o in marker_overlaps_bed:
        print(o.name, o.chrom, o.chromStart, o.chromEnd)
except Exception as e:
    print(e)```
#
# First create BedFile for genomic ranges of 1kb upstream promoter region of each transcript
marker_overlaps = ['PAX6', 'NEUROG2', 'TBR1', 'BCL11B', 'SLC32A1', 'GAD1', 'GAD2', 
           'GFAP', 'GLUD1', 'SLC17A7', 'SLC17A6']


# ---------------------- Write your code here 
 

marker_overlaps_bed = bed.BedFile(marker_overlaps)
try:
    for o in marker_overlaps_bed:
        print(o)
        #print(o.name, o.chrom, o.chromStart, o.chromEnd)
#except Exception as e:
   #print(e)```
#

#print(e)
^
SyntaxError: unexpected EOF while parsing

#
     7 
      8 
----> 9 marker_overlaps_bed = bed.BedFile(marker_overlaps)
     10 try:
     11     for o in marker_overlaps_bed:

~\Desktop\Practical0\binfpy-master\bed.py in __init__(self, entries, format)
    234             for entry in entries:
    235                 # check if the chromosome has been seen before
--> 236                 tree = self.chroms.get(entry.chrom)
    237                 if not tree:
    238                     tree = ival.IntervalTree()

AttributeError: 'str' object has no attribute 'chrom'```
sly merlin
#

was taking a break

neon heron
#

no worries

faint hinge
#

!stream 808399722108813333

keen onyxBOT
#

βœ… @swift leaf can now stream until <t:1632164168:f>.

faint hinge
#

py -m pip install pyside6

knotty holly
#

πŸ‘€

#

misusing my mod powers

unkempt delta
#

Lol LX wtf is this abouuuusee

knotty holly
zealous cosmos
#

lol fomo

round berry
#

Hi can someone help me understand this

#

arr = [1, 2, 3, 4, 5, 6]
for i in range(1, 6):
arr[i - 1] = arr[i]
for i in range(0, 6):
print(arr[i], end = " ")

main solar
#

I guess the answer would be 23456

deep nest
#

sup

#

yeah

#

can someone help me understand something about the code

#

i'm still new to python

deep nest
#

any of the helpers here to assist me ?

faint hinge
#

What's your question?

deep nest
#

it's more of someone explain it better to me okay

#

phone = input ("phone:")
numbers= {
"1": "one",
"2": "two",
"3":"three",
"4": "four"
}
output = ""
for ch in phone:
output +=numbers.get(ch)
print (output)

#

why did we add the output and made it an empty string at first

#

and why did we made the output += to numbers

#

bty i'm watching this guy

faint hinge
#

Oh okay right

#

@deep nest We do this so that we can concatenate (smoosh strings together) right away

#

Effectively we're doing output = output + numbers.get(ch)

#

If we didn't define output as an empty string ahead of time, it'd error out

deep nest
#

ooh

#

i get it now

#

thanks man

faint hinge
#

Any time!

deep nest
#

can u tell me of good tips or sources to better understand python
i'm new and i should mention that i'm not a native speaker

faint hinge
#

!resources We actually have a ton of resources on our website. For new folks, we typically suggest "Automate the Boring Stuff" and "A Byte of Python". Sadly we don't really have any resources in languages other than English. We've also got listings for different courses if that's more your thing, as well as other YouTube channels that have excellent tutorials

keen onyxBOT
#
Resources

The Resources page on our website contains a list of hand-selected learning resources that we regularly recommend to both beginners and experts.

woven halo
#

hola @quaint maple

thin token
#

hey i need help with my setup.py, im in code/help 0 rn...

#

anyone?

unkempt delta
#

Sharing my screen if you want to see @celest ice

celest ice
#

yes thankyou

#

Apprecieate it

unkempt delta
azure condor
#

hey

#

@unkempt delta any reason why im not able to join the vc?

unkempt delta
#

You can now because some left

azure condor
#

not able to 😦

#

now i did nvm

#

is it my internet or is someone's voice lagging?

unkempt delta
#

@mossy magnet "Allow multiple anagram games to be used at once"

#
Polish anagram command for multiple channels

* Updated docstrings
* Allowed command to be used in multiple channels
* Create a class for anagram game instances
* Lay groundwork for threads
#

@mossy magnet this is what I typed

sharp burrow
#

i need ideas

cloud skiff
#
import matplotlib
import numpy as np
from random import randint
import matplotlib.pyplot as plt  # use abbreviation
import random
import math


# Define different functions for each operation
def xsquared(x):
    return x ** 2


def xsquared_half(x):
    return x ** (x + 0.5)


def sinus(x):
    return math.sin(x)


def trigon(x):
    return math.tan(math.cos(math.sin(x)))


def sinus_x_squared(x): ###?
    math.sin(x ** 2)


# Definition of monte carlo operation
def montecarlo(func, x1, y1, x2, y2):
    # Define the rectangle for integration
    # rectangle = (x2 - x1) * (y2 - y1)

    coordinates_list = []
    list_random_x_value = []
    list_random_y_value = []

    # Generate random points in the rectangle
    for i in range(0, 100):
        random_x_value = random.uniform(x1, x2)
        random_y_value = random.uniform(y1, y2)
        list_random_x_value.append(random_x_value)
        list_random_y_value.append(random_y_value)
        # coordinates = [random_x_value, random_y_value]
        # coordinates_list.append(coordinates)
        # print(coordinates_list)

    list_x_values_graph = []
    list_y_values_graph = []


    #Formula for creating the function and defining the x and y values of the function
    for values in np.arange(x1, x2, 0.01):
        list_x_values_graph.append(values)
        y_values = func(values)
        list_y_values_graph.append(y_values)

    # plot every value and every value has a different x coordinate
    # find the corresponding x value in the list with the y value





    plt.plot(list_x_values_graph, list_y_values_graph, "r-", list_random_x_value, list_random_y_value, "go")
    plt.show()


montecarlo(sinus, 0, -6, 3.14, 6)```
faint hinge
#

Hokay, so

keen onyxBOT
#

Hey @cloud skiff!

Uh-oh! It looks like your message got zapped by our spam filter. We currently don't allow .txt attachments, so here are some tips to help you travel safely:

β€’ If you attempted to send a message longer than 2000 characters, try shortening your message to fit within the character limit or use a pasting service (see below)

β€’ If you tried to show someone your code, you can use codeblocks
(run !code-blocks in #bot-commands for more information) or use a pasting service like:

https://paste.pythondiscord.com

#

Hey @cloud skiff!

Uh-oh! It looks like your message got zapped by our spam filter. We currently don't allow .txt attachments, so here are some tips to help you travel safely:

β€’ If you attempted to send a message longer than 2000 characters, try shortening your message to fit within the character limit or use a pasting service (see below)

β€’ If you tried to show someone your code, you can use codeblocks
(run !code-blocks in #bot-commands for more information) or use a pasting service like:

https://paste.pythondiscord.com

glad gyro
#

Can anyone please help me getting the href of first google search results ?

#

using selenium

main solar
#

Yea sure

#

The href of google search results is like really easy I can explain you real quick

misty marten
#

if anyone has some free time, i could use some assistance

main solar
#

How can I talk?

#

in voic

#

e

dark minnow
#

@faint hinge hey man. you know me, WorldWake

#

wanna do the voice?

#

@faint hinge I need a bit of Help. I need somebody to help me !voiceverify and i've only been here for like 30 minutes -- instead of 3 days

indigo vortex
#

can anyone help me with my tkinter music player? im stuck as im not very experienced

silk timber
#

@indigo vortex

#

post what you need help with here

proven crest
keen onyxBOT
#

Voice verification

Can’t talk in voice chat? Check out #voice-verification to get access. The criteria for verifying are specified there.

silent furnace
#

!voice

keen onyxBOT
#

Voice verification

Can’t talk in voice chat? Check out #voice-verification to get access. The criteria for verifying are specified there.

neat otter
#

!voiceverify

#

!voice

keen onyxBOT
#

Voice verification

Can’t talk in voice chat? Check out #voice-verification to get access. The criteria for verifying are specified there.

proven crest
stable scarab
#

hell world

proven crest
#

@pallid pivot there is a channel missing

pallid pivot
#

You cannot see the channel once you ar verified

proven crest
little badger
# proven crest then this is use less info

it's a little confusing bc users that are already voice verified like we are won't see the link to the voice verification channel. but users that aren't will see the channel and the link in the embed will work

cedar ember
#

Can anyone help me with this?

#

I installed opencv and still its like this

charred arrow
#

python doesn't know where to import it from

#

do something like : from .... import cv2

snow wolf
#

hi

proven crest
#

now it makes senselemon_happy

neon heron
#

@sly merlin you're muted

sly merlin
#
means = {key: np.mean(value) for key, value in your_dictionary.items()}
#
def get_min(x):
    return min(your_dict[x]) if len(x) == 0 else math.inf
min_num = min(your_dict, key = get_min)
rugged dock
#

@somber cobalt do you need help

somber cobalt
#

yes

#

im muted

rugged dock
#

ok

somber cobalt
#

idk why

rugged dock
#

well what is your problem

rugged dock
somber cobalt
#

i'm trying to import an image to my code (on vscode)

rugged dock
#

ok

somber cobalt
#

when u have an image in the same folder as your code, you just have to type the name right

rugged dock
#

yes

somber cobalt
#

but it doesn't autocomplete

#

or anything

#

it just doesn't get it

rugged dock
#

it shouldn't because its should be a string

#

the filename input is always a string

somber cobalt
#

Photo = PhotoImage(file="foto.jpg")

#

i know

#

that's the line

rugged dock
#

what module are you using

somber cobalt
#

from tkinter import *
from tkinter.constants import ACTIVE

rugged dock
#

vscode wont autocomplete strings

somber cobalt
#

Oh

#

I get it

#

Is there anything I can do to change that?

rugged dock
#

i dont think so

somber cobalt
#

Well

#

Thank u

rugged dock
#

np

somber cobalt
#

hey @rugged dock

rugged dock
#

Yea?

somber cobalt
#

i still cannot put the image

#

idk why

rugged dock
#

I don’t use tkinter so I can’t help you there

somber cobalt
#

i mean it's like a general thing

#

i've never had it easy with the image thing

main solar
#

I want to print the elements of an array in a single line without brackets and commas. whats the best way? anyone?

worldly rune
#

hi

coral heath
#

im a french kid of 13 and i coding python about 6 month do you have some tuto for be better ?

rugged dock
#

@clear gulch u need help?

clear gulch
rugged dock
#

with what

clear gulch
# rugged dock with what

To put it simply im building a embed command that sets color of banner by key word !BTO. But I want to allow the user to customize the description by typing in discord and not code. Im aware of discord.Client.wait_for just having trouble implementing it

rugged dock
#

i dont make discord bots but send this in #discord-bots to get help from people who do

clear gulch
rugged dock
#

oh

clear gulch
rugged dock
clear gulch
rugged dock
#

then send it

muted sandal
#

@Opal

#

Opal

#

@amber epoch

#

e! ```{import re
import long_responses as long
def get_response (user_input).

def message_probability(user_message, recognised_words, single_response)
message_certainty = 0
has_required_words = True

for word in user_message:
if word in recognised_words:
message_certainty = 1

percentage = float(message_certainty) / flowt(len(recognised_words))

split_response = re.split(r"\s+|[,;?!.-]\s*", user_input.lower()) response = check_all_messages(split_messages)
return response

if has_required_words or single_
return int(percentage+100)
else:
return 0

def check_all_messages(message):
highest_prob_list = {}

def response(bot_response,list_of_words, Single_response=false, required_words[]):
nonlocal highest_prob_list
highest_prob_list [bot_response] = message_probability(message, list_of_words, single_response, required_words)

#Response--------------------------------------------------
response("Hello!"["Hello", "hi", "sup","yoo", "hey","heyo"], signle_response= True)
response("I/'m doing fine,and you?",["how", "are", "doing"], required word=["how"])

best_match = max(highest_prob_list, key=highest_prob_list.get)
print(highest_prob_list)

return best_match

#Testing the response system
while True:
print "Bot: "+ get response(input("You: ")```

#

How to fix this code

amber epoch
#

!code

keen onyxBOT
#

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.

muted sandal
#

I can’t hear you

#

Pls say that again

#

Worked

amber epoch
#

!e ```
print("Hello, world")
```

muted sandal
#

I hope I could share you my screen

#

It would be much easier

#

@amber epoch

#

Oh

#

I get it

#

e! ```{import re
import long_responses as long
def get_response (user_input).

def message_probability(user_message, recognised_words, single_response)
message_certainty = 0
has_required_words = True

for word in user_message:
if word in recognised_words:
message_certainty = 1

percentage = float(message_certainty) / flowt(len(recognised_words))

split_response = re.split(r"\s+|[,;?!.-]\s*", user_input.lower()) response = check_all_messages(split_messages)
return response

if has_required_words or single_
return int(percentage+100)
else:
return 0

def check_all_messages(message):
highest_prob_list = {}

def response(bot_response,list_of_words, Single_response=false, required_words[]):
nonlocal highest_prob_list
highest_prob_list [bot_response] = message_probability(message, list_of_words, single_response, required_words)

#Response--------------------------------------------------
response("Hello!"["Hello", "hi", "sup","yoo", "hey","heyo"], signle_response= True)
response("I/'m doing fine,and you?",["how", "are", "doing"], required word=["how"])

best_match = max(highest_prob_list, key=highest_prob_list.get)
print(highest_prob_list)

return best_match

#Testing the response system
while True:
print "Bot: "+ get response(input("You: ")```

#

!e ```
print("Hello, world")
```

#

Why not wokr

#

Opal

#

Can you pls give an try with my code

amber epoch
#

!e py print("Hello, world.")

keen onyxBOT
#

@amber epoch :white_check_mark: Your eval job has completed with return code 0.

Hello, world.
muted sandal
#

Let me try

#

e! ```{import re
import long_responses as long
def get_response (user_input).

def message_probability(user_message, recognised_words, single_response)
message_certainty = 0
has_required_words = True

for word in user_message:
if word in recognised_words:
message_certainty = 1

percentage = float(message_certainty) / flowt(len(recognised_words))

split_response = re.split(r"\s+|[,;?!.-]\s*", user_input.lower()) response = check_all_messages(split_messages)
return response

if has_required_words or single_
return int(percentage+100)
else:
return 0

def check_all_messages(message):
highest_prob_list = {}

def response(bot_response,list_of_words, Single_response=false, required_words[]):
nonlocal highest_prob_list
highest_prob_list [bot_response] = message_probability(message, list_of_words, single_response, required_words)

#Response--------------------------------------------------
response("Hello!"["Hello", "hi", "sup","yoo", "hey","heyo"], signle_response= True)
response("I/'m doing fine,and you?",["how", "are", "doing"], required word=["how"])

best_match = max(highest_prob_list, key=highest_prob_list.get)
print(highest_prob_list)

return best_match

#Testing the response system
while True:
print "Bot: "+ get response(input("You: ")```

#

What I am doing worng

#

Why your audio is so low

#

I am new

#

I am building a; chat bot as you can see

#

@amber epoch

#

I want to verified soon

amber epoch
#
{import re
import long_responses as long
def get_response (user_input).

def message_probability(user_message, recognised_words, single_response)   
message_certainty = 0
has_required_words = True

   for word in user_message:
   if word  in recognised_words:
     message_certainty = 1       
   
   percentage = float(message_certainty) / flowt(len(recognised_words))
   
   
   split_response = re.split(r"\s+|[,;?!.-]\s*", user_input.lower()) response = check_all_messages(split_messages)
   return response




if has_required_words or single_
    return int(percentage+100)
else:
    return 0


def check_all_messages(message):
    highest_prob_list = {}

def response(bot_response,list_of_words, Single_response=false, required_words[]): 
nonlocal highest_prob_list
highest_prob_list [bot_response] = message_probability(message, list_of_words, single_response, required_words)

#Response--------------------------------------------------
response("Hello!"["Hello", "hi", "sup","yoo", "hey","heyo"], signle_response= True)
response("I/'m doing fine,and you?",["how", "are", "doing"], required word=["how"])





best_match = max(highest_prob_list, key=highest_prob_list.get)
print(highest_prob_list)

return best_match

#Testing the response system
while True:
    print "Bot: "+ get response(input("You: ")```
muted sandal
#

Let me try

amber epoch
#
def func():
    ...```
muted sandal
#
{import re
import long_responses as long
def get_response (user_input).

def message_probability(user_message, recognised_words, single_response)   
message_certainty = 0
has_required_words = True

   for word in user_message:
   if word  in recognised_words:
     message_certainty = 1       
   
   percentage = float(message_certainty) / flowt(len(recognised_words))
   
   
   split_response = re.split(r"\s+|[,;?!.-]\s*", user_input.lower()) response = check_all_messages(split_messages)
   return response




if has_required_words or single_
    return int(percentage+100)
else:
    return 0


def check_all_messages(message):
    highest_prob_list = {}

def response(bot_response,list_of_words, Single_response=false, required_words[]): 
nonlocal highest_prob_list
highest_prob_list [bot_response] = message_probability(message, list_of_words, single_response, required_words)

#Response--------------------------------------------------
response("Hello!"["Hello", "hi", "sup","yoo", "hey","heyo"], signle_response= True)
response("I/'m doing fine,and you?",["how", "are", "doing"], required word=["how"])





best_match = max(highest_prob_list, key=highest_prob_list.get)
print(highest_prob_list)

return best_match

#Testing the response system
while True:
    print "Bot: "+ get response(input("You: ")```
#

!e```py
{import re
import long_responses as long
def get_response (user_input).

def message_probability(user_message, recognised_words, single_response)
message_certainty = 0
has_required_words = True

for word in user_message:
if word in recognised_words:
message_certainty = 1

percentage = float(message_certainty) / flowt(len(recognised_words))

split_response = re.split(r"\s+|[,;?!.-]\s*", user_input.lower()) response = check_all_messages(split_messages)
return response

if has_required_words or single_
return int(percentage+100)
else:
return 0

def check_all_messages(message):
highest_prob_list = {}

def response(bot_response,list_of_words, Single_response=false, required_words[]):
nonlocal highest_prob_list
highest_prob_list [bot_response] = message_probability(message, list_of_words, single_response, required_words)

#Response--------------------------------------------------
response("Hello!"["Hello", "hi", "sup","yoo", "hey","heyo"], signle_response= True)
response("I/'m doing fine,and you?",["how", "are", "doing"], required word=["how"])

best_match = max(highest_prob_list, key=highest_prob_list.get)
print(highest_prob_list)

return best_match

#Testing the response system
while True:
print "Bot: "+ get response(input("You: ")```

#
{import re
import long_responses as long
def get_response (user_input).

def message_probability(user_message, recognised_words, single_response)   
message_certainty = 0
has_required_words = True

   for word in user_message:
   if word  in recognised_words:
     message_certainty = 1       
   
   percentage = float(message_certainty) / flowt(len(recognised_words))
   
   
   split_response = re.split(r"\s+|[,;?!.-]\s*", user_input.lower()) response = check_all_messages(split_messages)
   return response




if has_required_words or single_
    return int(percentage+100)
else:
    return 0


def check_all_messages(message):
    highest_prob_list = {}

def response(bot_response,list_of_words, Single_response=false, required_words[]): 
nonlocal highest_prob_list
highest_prob_list [bot_response] = message_probability(message, list_of_words, single_response, required_words)

#Response--------------------------------------------------
response("Hello!"["Hello", "hi", "sup","yoo", "hey","heyo"], signle_response= True)
response("I/'m doing fine,and you?",["how", "are", "doing"], required word=["how"])





best_match = max(highest_prob_list, key=highest_prob_list.get)
print(highest_prob_list)

return best_match

#Testing the response system
while True:
    print "Bot: "+ get response(input("You: ")```
#

Why not work

#

I Got to go

#

Cya later

#

Sorry for wasting your Precious time!

amber epoch
#

We'll get you sorted out. πŸ™‚

muted sandal
#

I don’t know why

amber epoch
#

It might be you?

muted sandal
#

If I get voice verified I will be happy

amber epoch
#

Others seem to hear me fine.

muted sandal
#

Nevermind

#

But still facing tons of problems

#

Epic

#

I want show you my code badly

#

But there no source

main solar
#

Can i get help here?

#

python related

agile wind
#

@main solar Refrain from attempting to ping @everyone or @here. It's very inconsiderate.

upper wave
#

yo

#

hello

#

could someone try give me a hand with my loop

upper wave
#

heyy

#

could one of you guys help he out

sly merlin
#

cp ~/Downloads/<file-name> <file-name>

#

~

sly merlin
#

PATH

sly merlin
#

grep "JAVA_HOME" *

upper wave
#
import datetime
import pandas as pd
from binance.client import Client

daysneeded = 150


binance_api_key = 'key'
binance_api_secret = 'key'
client = Client(api_key=binance_api_key, api_secret=binance_api_secret)
global epoch

symbols = ['ETHUSDT', 'BTCUSDT', 'XRPUSDT']

org_columns = ['open',
               'high', 'low', 'close', 'volume', 'close_time', 'quote_av',
               'trades', 'tb_base_av', 'tb_quote_av', 'ignore']

fromdate = str(datetime.datetime.now() - datetime.timedelta(days=daysneeded))
todate = str(datetime.datetime.now())

fromdate = fromdate.split()
fromdate = fromdate[0].split("-")
fromdate = (fromdate[2]+','+fromdate[1]+','+fromdate[0])

todate = todate.split()
todate = todate[0].split("-")
todate = (todate[2]+','+todate[1]+','+todate[0])
for i in range(len(symbols)):
    try:
        klines = client.get_historical_klines(
            (symbols[i]), Client.KLINE_INTERVAL_1DAY, fromdate, todate )
        klines_len = len(klines)
        if klines_len == 0:
            print('Failed to download data for ', (symbols[i]))
        new_columns = [item + '_' + (symbols[i]) for item in org_columns]
        new_columns.insert(0, 'timestamp')
        DF = pd.DataFrame(klines,
                          columns=new_columns)
        DF['timestamp'] = pd.to_datetime(DF['timestamp'], unit='ms')
        DF.set_index('timestamp', inplace=True)
        print(len(DF))
        DF.to_csv(symbols[i])
        print('Downloaded data for ', (symbols[i]))
    except:
        print('*** Invaled symbol:', (symbols[i]), '! ***')
cedar torrent
#

could somehone help me with .write()

#

basically creating a new file and writing in it, whiting the python program

stiff spindle
#

@cedar torrent Im sorta new but i think you do a open() function then a .write() with the same variable

#

file1 = open("myfile.txt", "w") # write mode
file1.write("Tomorrow \n")

#

Writing to file

with open("myfile.txt", "w") as file1:
# Writing data to a file
file1.write("Hello \n")
file1.writelines(L)

muted sandal
#

How to fix this

main solar
#

are you doing math here

upper wave
#
DF.to_csv(r'C:\\Users\\Johnd\Desktop\\test!!!!\\data\\', symbols[i])
amber epoch
#

!d pandas.DataFrame.to_csv

keen onyxBOT
#
DataFrame.to_csv(path_or_buf=None, sep=',', na_rep='', float_format=None, columns=None, header=True, index=True, index_label=None, mode='w', encoding=None, compression='infer', ...)```
Write object to a comma-separated values (csv) file.
fringe flax
#

You don't have a filename in this path

sly merlin
#

wait are you sure its not just the fact it ends with a \?

#

@amber epoch

amber epoch
#

Oh maybe.

sly merlin
fringe flax
#

Should be fine if it ends with two?

#

Needs a filename, doesn't it?

sly merlin
#

even with raw it can't end with a \

fringe flax
#

What is symbols[i]?

sly merlin
junior sentinel
#
num1 = int(input("Enter a number : "))
bale = input("bale prajh +,-,*,/")
num2 = int(input("Enter second number : "))
apotelesma = 0

if bale = ("+") :
    apotelesma = num1 + num2
elif bale = ("-") :
    apotelesma = num1 - num2
elif bale = ("*")
    apotelesma = num1 * num2
else :
apotelesma = num1 / num2
#

what did i do wrong

gloomy patio
#
def cov_naive(X):
    """Compute the sample covariance for a dataset by iterating over the dataset.
    
    Args:
        X: `ndarray` of shape (N, D) representing the dataset. N 
        is the size of the dataset and D is the dimensionality of the dataset.
    Returns:
        ndarray: ndarray with shape (D, D), the sample covariance of the dataset `X`.
    """
    # YOUR CODE HERE
    ### Uncomment and edit the code below
      N, D = X.shape
#     ### Edit the code below to compute the covariance matrix by iterating over the dataset.
      covariance = np.zeros((D, D))
#     ### Update covariance
      
            
        
      
#     ###
#     return covariance
```  Can someone help me to write covariance of a matrix algo by changing above code
carmine vault
#

pls guys how can i do voice verification

main solar
#

()

#

r.status_code

#

r.status_code()

novel trench
#

@main solar are you printing status_code?

#

print(r.status_code)

main solar
#

Thank you

#

OMG

novel trench
#

In the Python REPL, it'll give you the status code, but if you run it through a script it won't print anything

#

@main solar Are the headers being passed to get?

main solar
#

@novel trench i love your profile picture

#

headers = {"User-Agent":"TTECA/0.1/LizzieTheWitch"}

novel trench
#

I meant

requests.get("<url-here>", headers={"User-Agent":"TTECA/0.1/LizzieTheWitch"})
#

Just setting headers like that won't do anything

main solar
#

no

fiery basin
#

Guys, Who will help with the problem, you need to solve it mathematically and tell it analytically. I will show the condition?

finite grove
misty ibex
indigo vortex
mild rapids
#

i am doing my project in repl
so when i import google trans it auto installs the version 2.4.0
but i need 3.1.0a0
now when i do pip install googletrans == 3.1.0a0
it works well
but after a while when it refreshes it self the import causes a auto installation of version 2.4.0
so import googletrans gets unrecognized
and the whole code stops working

#

?

#

any helps?

outer tiger
#

Hi

bright karma
#

hello

rich depot
#

hi i need help learning python