#voice-chat-text-0

1 messages Β· Page 995 of 1

pallid hazel
#

requirement of the task

sand fractal
amber raptor
#

What?

sand fractal
#

he said something

#

and u didn't reply

pallid hazel
#

lol

amber raptor
#

What are you? My manager

pallid hazel
#

a time i wish i could be in vc..

halcyon yew
#

you need decent internet speed for cloud gaming in my experience

#

which costs more

amber raptor
#

and hardware is getting cheaper enough to provide a great experience

halcyon yew
#

true

amber raptor
#

for 10 bucks/mth I can get Stadia

#

for 35 bucks, I can get XBox Series X and have crazy experiences

woeful salmon
#

gotta go now play Sea of thieves now πŸ™‚ was a nice podcast today

#

jk

halcyon yew
#

60-100 usd here month for 12mbps with home phone plan

woeful salmon
#

cya guys

amber raptor
rugged root
sweet lodge
#

Bicep is IaC

zenith radish
sweet lodge
#

Now hear me out: Python-as-a-shell

boreal spear
#

Hey guys,

I'm trying to get a .bat file to run and be able to use winpython and I've been trying to follow the below linked guides but it's not working for me. Can anyone help explain to me how I get get a .bat file to run and be able to use winpython?

https://stackoverflow.com/questions/31113114/make-an-batch-file-that-runs-commando-in-winpython-command-prompt

https://www.architectryan.com/2018/03/17/add-to-the-path-on-windows-10/

rugged root
#

Totally forgot WinPython was a thing

#

I can take a look in a moment

boreal spear
terse needle
rugged root
#

I think you were the one that told me about it, KJ

terse needle
#

yup

#

griff told me about it

trail mural
#

KJ Nice picture :3

pallid hazel
#

Hmm.. my internet is bundled with my Cable TV service, but I'm paying over 300$, for all the channels and 1gb/50mb

terse needle
rugged root
halcyon yew
amber raptor
#
Get-AzWebApp | where {$_.Tags -contains "LP" -or $_.Tags -contains "Hemlock"}```
sweet lodge
#

in

boreal spear
# rugged root So when you say it's not working, what's specifically going on

So I'm pretty sure that when I double click on my .bat file it's running in the ordinery terminal, rather than the Python terminal. The way to fix that that I could find in the stack answer is to add python to the path and so this should allow running the commands in the main windows terminal but I've tried doing that as described and it's not working for me

sweet lodge
amber raptor
#

!e python a = [1,2,3,4,5] if 1 in a: print('Hello')

wise cargoBOT
#

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

Hello
terse needle
#

!e

x = ['LP', 'Hemlock', 'foo', 'bar']

print('LP' in x or 'Hemlock' in x)
wise cargoBOT
#

@terse needle :white_check_mark: Your eval job has completed with return code 0.

True
boreal spear
rugged root
#

py -m venv venv possibly?

#

But I'm not sure

#

Actually hold on

terse needle
sand fractal
#

One of the dumbest things I have seen people do is not hash passwords

#

that is just dumb

rugged root
#

Can you try running that script from an already open cmd window?

boreal spear
tidal shard
#

venv\scripts\activate doesn't work?

sand fractal
#

since then if the files leak, the users password isn't leaked

sweet lodge
boreal spear
terse needle
sweet lodge
#

Ah

#

Got it

rugged root
#

Is it that you have to activate WinPython first? I'm curious what it ends up being, Shen

sand fractal
#

Like instead of

Name: "Lmaxplay"
Password: "MySecretPassword"
Name: "Lmaxplay"
Password: "c152246c91ef62f553d2109b68698b19f7dd83328374abc489920bf2e2e23510"
HashType: SHA256
#

it makes sense

#

since with the hash, u can't really, erm get the original password

sand fractal
#

my own password is private

#

and on google's servers

#

(actually I use 4 passwords)

terse needle
sand fractal
boreal spear
rugged root
#

Leaked leak detected

#

Let me poke around WinPython first

#

Can't remember

sweet lodge
#

You should get something like this:

PS C:\Users\BradleyReynolds> (Get-Command python).Path
C:\Users\BradleyReynolds\AppData\Local\Programs\Python\Python310\python.exe
#

Long live shebangs!

amber raptor
#
function Get-FirstRecurringChar
{
    <#
    .SYNOPSIS
    Finds first recurring character in string
    .DESCRIPTION
    Finds first recurring character in string and returns it
    .PARAMETER foo
    String to test
    .PARAMETER HumanOutput
    Will display more human friendly output, this will break piping and thus shouldn't be used in automation
    .EXAMPLE
    Get-FirstRecurringChar -foo asdfasdfasdf
    #>
    [CmdletBinding()]
    param (
        # Input String
        [Parameter(Mandatory=$true,ValueFromPipeline=$true,HelpMessage="Input String to Test")]
        [string]
        $foo,
        # Detailed Output
        [Parameter(Mandatory=$false,HelpMessage="Provides more Human Readable Output")]
        [switch]
        $HumanOutput
    )
    #ArrayList is faster then array when manipulating array
    [System.Collections.ArrayList]$test = @()
    foreach ($char in $foo.ToCharArray()){
        if ($test.Contains($char) -eq $true){
            $answer =  $char 
            break #We have match, break out of For loop
        } else {$test.Add($char) | Out-Null}
    }
    if ($null -eq $answer){
        throw "String does not have recurring character"
    }
    if ($HumanOutput){
        #Write Host because this Human Output but will break piping
        Write-Host "First reoccuring character is $($answer) in string:"
        Write-Host "$($foo)"
    } else {Write-Output $answer}
}```
boreal spear
#

cencored just to remove my company name:

rugged root
#

Is WinPython an installation or is it just a program that is run that lets you then run Python stuff?

sweet lodge
#

AKA - JavaDoc

boreal spear
sweet lodge
#

Try specifying the exact path and see if it can find it

zenith radish
boreal spear
sweet lodge
sweet lodge
zenith radish
boreal spear
zenith radish
#

It works fine

rugged root
candid panther
#

Alrighty, I'm gonna head out

boreal spear
candid panther
#

πŸ‘‹

rugged root
#

You'll likely have to put it in quotes

#

I think

sweet lodge
#

Quotes!

#

But Windows is stupid, so you''ll probably have to escape the spaces with backslashes instead

boreal spear
rugged root
#

The quotes were needed since the folder name had spaces in it

#

That's all that was

sand fractal
#

PowerShell is like if bash had babies with C#

#

@amber raptor

rugged root
#

The day has gone weirdly slowly

sweet lodge
sand fractal
#

linux top, windows bottom

#

this is powershell 7.2.2

boreal spear
rugged root
#

You're going to run into funky stuff with bat files in general

sweet lodge
boreal spear
sweet lodge
rugged root
#

Can I see the script you currently have?

#

Also what Shen said

#

Oh no

sweet lodge
#

Also - Do you have something against PowerShell?

rugged root
#

I just realized that I could have said "Also what She said"

sand fractal
#

I use powershell to automate boring shit

#

like C++ compilation

#

as node.js is just "WHY"

#

bash and zsh .sh is too annoying

#

but powershell

#

it works good

rugged root
#

I like fish

sweet lodge
#

Alright then

sand fractal
#

this is a build script for C++ made in powershell

#

its a good language for this kind of stuff

boreal spear
rugged root
#

Can you run this in an already open console window to see if it gives any errors or issues?

sand fractal
#

fuuuu

#

I pushed my macro key

rugged root
#

You did indeed

sand fractal
#

which says what I got on my clipboard

#

πŸ₯΄

rugged root
#

Maybe just mute your mic so that even if you do it won't go through?

halcyon yew
#

Why would you have a macro for that anyways?

sand fractal
#

(I shoud probably just disable the macro)

boreal spear
sand fractal
sweet lodge
#

I want to use PowerShell

#

Am Linux admin

rugged root
#

And now you can!

rugged root
#

I mean running the bat file itself

#

Drag and drop the file into the terminal window

sand fractal
#

ill help you through the process of installing powershell

#

(also add this to the top of ur files: ```ps
#!/usr/bin/env pwsh

#

this will make powershell run when you call it from bash

#

or zsh

#

using a shebang

sweet lodge
rugged root
sand fractal
#

don't use echo

#

use Write-Output

sweet lodge
#

Write-Line

#

Crap

#

Wait

rugged root
#

Those both work, don't they?

sweet lodge
#

Isn't it Write-Host?

sand fractal
#

no Write-Host is for subprocesses

rugged root
#

Ah, gotcha

sand fractal
#

but it still works on top-level code

sweet lodge
sand fractal
#

also look through Get-Alias

#

that will show u the aliases

rugged root
#

Open a completely fresh one where you're not already in a venv

sweet lodge
#

Did you just install a venv in a venv?

#

Does that work?

sand fractal
#

and it fucking broke

#

somehow it messed up enviroment variables

rugged root
#

And then just do what you did on the second line of that image

boreal spear
sweet lodge
rugged root
#

Huh

boreal spear
#

(I tried it twice to confirm)

rugged root
#

Let me think on that

amber raptor
#

Import MG Module

sand fractal
sand fractal
#

I made one which doesn't complain about missing imports and such

#

(since else I would HAVE TO SPECIFY EVERY PARAMETER)

amber raptor
amber raptor
sand fractal
#

without doing -Verbose:1

boreal spear
sweet lodge
sand fractal
amber raptor
sand fractal
sweet lodge
boreal spear
#

Thanks again guys, have a good night #RustIsTheFuture vs C or other low level programming languages πŸ˜›

sweet lodge
#

I hate case insensitivity.

sweet lodge
#

I hate the dashes too

#

I also hate the naming scheme

#
Connect-AzureAD
Connect-ExchangeOnline
Connect-MgGraph
#

It makes sense, I just think it's ugly

sand fractal
#

@quasi condor powershell runs on linux

amber raptor
quasi condor
sweet lodge
#

Just going to leave this here

#

M365's "Cloud Shell" is a shell that comes with the AzCLI preinstalled and authenticated
You get to choose between Bash and PowerShell

#

There is one thing I absolutely hate about PowerShell

#

MS is enforcing "Modern Auth", but their own PS modules don't support it

#

Actually - @amber raptor - is there a way to actually use these with basic auth disabled?

sweet lodge
#

At this point I'll just wait to learn these modules until they support Modern Auth

#

1.2?

#

We're already on 1.3

rugged root
#

Oh my dear god, it does exists

amber raptor
#

they use Google Workspace, pass

sweet lodge
#

So it uses Discord's webhook option to POST to Lambdas?

#

That's neat

amber raptor
#

I've written Python Azure Functions for Discord

#

How easy HTTP DIscord is why I see Discord turning off gateway for vast majority of bots

sweet lodge
#

I created two bots in Rust
One that uses a bot user, and one that uses the webhooks

I can't decide which one I like more, and I actually want to use

amber raptor
#

webhooks

#

it's so much more flexable

sweet lodge
celest mantle
sweet lodge
# sweet lodge Fair enough But I remember reading a documentation page that had a list of thing...

In many cases, you may still need a bot user. If you need to receive gateway events, or need to interact with other parts of our API (like fetching a guild, or a channel, or updating permissions on a user), those actions are all still tied to having a bot token. However, if you don't need any of those things, you never have to add a bot user to your application at all.

rugged root
#

Interesting

sweet lodge
#

updating permissions on a user
So... all moderation bots still require bot users?

rugged root
#

Possibly for now

sweet lodge
#

Forcing people to your new thing that you don't even fully support yet

sweet lodge
#

Ohhhhhh

amber raptor
sweet lodge
#

No

#

You thought the argument over shells was bad

#

Think about what the argument over [Linux] distributions would install

rugged root
#

If you put LP, Rabbit, and Charlie in a room, this is the shit that happens

#

This is why we can't have nice things

sweet lodge
rugged root
#

I just need to make time out corners at this point.

quasi condor
#

just move us to a different channel

sweet lodge
#

#AFK

quasi condor
sweet lodge
#

Dammit why can't I link voice channels?

rugged root
#

I can't go there because I have to babysit you turds

sweet lodge
#

Promote me to admin

#

I'll babysit

rugged root
#

Because when it actually IS getting intense, you throw a hissy fit and say no it's not in an additionally snippy tone, Charlie

#

It's not your call

#

It's mine

sand fractal
#

here is my powershell profile

#

how does it look?

sweet lodge
#

Dammit now I have to actually work
I'll be back

sand fractal
#

This shows how flexible powershell can be

sweet lodge
#

"When a Bash user tries PowerShell"

amber raptor
sweet lodge
sand fractal
sand fractal
#

@rugged root, I can put you to 101% and 99%, but not 100%, I can for every other user

celest mantle
rugged root
#

Weird

rugged root
#

That's interesting

celest mantle
rugged root
#

Still pretty neat

quasi condor
#

@rugged root 60 is common enough here for retirement

rugged root
#

I mean it's been in flux here

#

It might be higher now

quasi condor
#

often a fair chunk older for people who are workaholics

rugged root
#

Probably is, come to think of it

#

Or can't afford to retire

dawn loom
#

wait i just joined the call, so whats happening? Is there any like type of coding happening?

rugged root
#

Not at the moment, no

dawn loom
#

ok thank you

amber raptor
#

We never code

dawn loom
#

oh lol

rugged root
#

-sighs-

#

Yes

#

We do

amber raptor
dawn loom
#

im new to coding, so is there like any tips that you guys can give me?

rugged root
#

Hmmm....

rugged root
#

Well there's a couple standard ones, like always be willing to ask questions

sand fractal
#

I am coding powershell

dawn loom
#

i just joined a coding course like 8 weeks ago so im still on pyhthon basics...

woeful salmon
#

and i also sat for half an hour here teaching someone pygame before i think

#

nothing scheduled tho :x ppl teach if they feel like it

dawn loom
#

yeah i think i may need that because i volunteered on a to make a game competition school

zenith radish
#

here's my passport photo from 9 years ago

#

xdddddddddd

sand fractal
woeful salmon
#

i probably can't rn as 1:41 am rn and i'm about to go fall in my bed

woeful salmon
rugged root
#

We almost never hit that cap anyway

zenith radish
#

I used to look like a school shooter

woeful salmon
#

i wouldn't say that

zenith radish
#

All 10+ year old pics of me are school shooter wikipedia pics

rugged root
sweet lodge
zenith radish
rugged root
#

The fairest in the land, my dear

#

Kum'n'Go

woeful salmon
#

probably just a smile would already make it look better :x

zenith radish
#

I was a chubby kid with a face full of sadness lmao

woeful salmon
#

πŸ‘€ well atleast you weren't the 6 foot 16 year old with a beard in school where all kids your age are like 1-2 foot smaller than you

#

^ that's me

#

7 years ago

zenith radish
#

xddd

woeful salmon
zenith radish
#

yes lmao

woeful salmon
#

that is so much better

#

except for how obvious it is that you're doing a pose just for the pic it looks gr8 xD

#

anyways i'mma go sleep now

#

gnight

woeful salmon
rugged root
#

@zenith radish At the moment possibly

#

Probably

#

Why do you ask?

zenith radish
#

Just curious

sand fractal
#

what should I add to my powershell profile?

#

I already have colored output setup

rugged root
#

Fair. But yeah, the intensity of arguments and the heavily polarized opinions (like against windows just as an example) would likely be a strike against.

But having said that, I did obviously think that you do enough help by showing off different kinds of code and stuff to keep the video role. So I do have trust and appreciate what you do for us. Helper is just a different kind of requirement

sand fractal
#

could I maybe add more CMDLets (although this WILL break compatibility)

#

or add configuration support

#

so u can configure it

zenith radish
#

Fair fair, I will continue feeling like a special boy with my video role

sand fractal
#

like:

%green%PS%version% %blue%%user% %magenta%%path%> 
#

Also can I maybe stream powershell (just maybe)

covert lake
#

ITS FRIDAY

sweet lodge
#

No

tidal shard
sweet lodge
#

No more paper

tidal shard
#

lmaojk

sweet lodge
#

I use PDFs for source books

zenith radish
rugged root
amber raptor
#

Dibs

sand fractal
#

@amber raptor when did you leave the VC?

#

@terse needle please enable noise cancelling using this button

terse needle
sand fractal
#

I can hear the difference already

sand fractal
terse needle
#
factorial <-|
  ( $0 0 eq ) ( $0 1 eq ) or -> 1
  $0 ( $0 1 sub factorial ) mul

5 factorial
sweet lodge
#

It’ll be fine

#

I’ve only given my address out like twice

dense ibex
#

!user

wise cargoBOT
#

You are not allowed to use that command here. Please use the #bot-commands channel instead.

dense ibex
#

: (

zenith radish
sweet lodge
#

I started in 2017

#

So I actually have 5yoe now

zenith radish
terse needle
#

Avril Lavigne

#

@duck.com

sweet lodge
#

I have a .dev email

terse needle
#

jamesbutcher.dev

zenith radish
terse needle
sweet lodge
#

More impressive than most of ours if we’re honest

sturdy panther
#

It is up to you to highlight what to showcase in your CV. You can list your GitHub contributions on top, if you don't like your academic past.

terse needle
mild quartz
#

already made πŸ™‚

terse needle
mild quartz
#

i see

#

its essentially the same just inference on the other end

sturdy panther
#

Gotta have admin access either way.

#

Oh right. I wanted to try Pipewire for a while!

#

I had been avoiding it because I heard it has a lot of Bluetooth issues

sand fractal
#

I gotta configure it more though

frigid lion
#

why i can't see the stream

sturdy panther
#

Tea at night?!

zenith radish
signal sand
#

@quasi condor he wrote a nice book

#

I think the coolest computer science guy is Donald Knuth @quasi condor

quasi condor
signal sand
#

NO @terse needle

#

Alan Turing created Turning Machines....

#

Which is a model of computation we use...

#

He solved some important problems in Mathematics

quasi condor
signal sand
#

And a sad life

terse needle
#
signal sand
#

@zenith radish We call those investors, parents!

quasi condor
terse needle
#

I'd just like to interject for a moment. What you’re referring to as foot, is in fact, Human/foot, or as I’ve recently taken to calling it, Human plus foot. foot is not an organism unto itself, but rather another free component of a fully functioning Human system made useful by the human cells, tissues and organ system components comprising a full Human as defined by POSIX.
Many Humans run using a version of the foot system every day, without realizing it. Through a peculiar turn of events, the version of Human which is widely used today is often called Homo sapiens sapiens, and many of its users are not aware that it is basically the Human system, developed by the Human mother. There really is a foot, and these people are using it, but it is just a part of the system they use.
Human is the organism: the body part in the system that allocates the bodys resources to the other body parts that you run. The brain is an essential part of an Human, but useless by itself; it can only function in the context of a complete Human. Foot is normally used in combination with a human: the whole system is basically human with foot added, or human/foot. All the so-called β€œfoot” body parts are really distributions of human/foot.

quasi condor
zenith radish
signal sand
#

@zenith radish in safari you need to enable dev tools

#

you should call it Illuminati @zenith radish

noble copper
quasi condor
midnight finch
#

https://stackoverflow.com/questions/5283649/plot-smooth-line-with-pyplot this is the code on the stackoverflow.

from scipy.interpolate import make_interp_spline, BSpline

# 300 represents number of points to make between T.min and T.max
xnew = np.linspace(T.min(), T.max(), 300) 

spl = make_interp_spline(T, power, k=3)  # type: BSpline
power_smooth = spl(xnew)

plt.plot(xnew, power_smooth)
plt.show()
#
import scipy.signal
import numpy as np
import matplotlib.pyplot as plt
np.random.seed(1)

x = np.linspace(0,2*np.pi,100)
y = np.sin(x) + np.random.random(100) * 0.2
yhat = scipy.signal.savgol_filter(y, 51, 3) # window size 51, polynomial order 3

plt.plot(x,y)
plt.plot(x,yhat, color='red')
plt.show()
stoic jungle
#

YO!

#

IM GOOD HOW ARE YOY

#

im had to mank drinks

#

what brings you here

#

check out my site!

#

mhhm

#

must be some spam blocker

magic coyote
#

Yes.

wind raptor
#

!voice @elder knot

wise cargoBOT
#

Voice verification

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

elder knot
#

right on!

#

working on trying to use Python with GIS for municipal purpuses.

#

Global Information Systems

#

Municipal work

#

Assistant Director of Drinking Water

#

Using Data to help our system

midnight finch
#

@elder knot do you know how to smooth a line in python

elder knot
#

Yeah!

#

I know how to smooth a line in Fortran

#

lol

midnight finch
#

xD

#

one language is enough for me

elder knot
#

I used Javascript to enhance my Perl.

#

lol

midnight finch
#

this code chris helped with. it blurs image and calculates average pixel whitness from bottom of image to top along a vertical line.

however, another code i want to try is not blurring image and instead smoothing line


import cv2
import numpy as np
import matplotlib.pyplot as plt


# load image
img = cv2.imread(r'C:\Users\Guest_\Downloads\Screenshot 2022-03-18 154330.png')

# convert the image to grayscale
gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)

# smooth the image
blur = cv2.GaussianBlur(gray, (5, 5), 0)
for _ in range(10):
    blur = cv2.GaussianBlur(blur, (5, 5), 0)

# show the blurred image
plt.imshow(blur, cmap='gray')
plt.show()

# read each column of the image from left to right and save it to a list
cols = []
for i in range(blur.shape[1]):
    cols.append(blur[:, i])

# average every 3 columns
avg_cols = []
for i in range(0, len(cols), 1):
    avg_cols.append(np.mean(cols[i:i+5], axis=0))

# graph the average of each column (reversed)
plt.plot(avg_cols[80][::-1])
plt.show()
print (avg_cols[80][::-1])

#

found this on internet. for savgol filter to smooth line. but not sure how to plot my data instead of random data. like what to replace

import scipy.signal
import numpy as np
import matplotlib.pyplot as plt
np.random.seed(1)

x = np.linspace(0,2*np.pi,100)
y = np.sin(x) + np.random.random(100) * 0.2
yhat = scipy.signal.savgol_filter(y, 51, 3) # window size 51, polynomial order 3

plt.plot(x,y)
plt.plot(x,yhat, color='red')
plt.show()
elder knot
#

wow, that is like what I was working on in 2010 with flow fluorometry.

#

not only ultrasound, but also visual pixel coding.

#

i was trying to work on a code for visual blurring

#

I was working on microscopic optical images

midnight finch
#

ah thats cool!

amber gulch
#

in the channel

#

that it told me to go to

elder knot
#

"flow cytometry"

amber gulch
#

in the how to get help section

#

New to coding (3 days) Watching a tutorial for my first project so far hit a road block. what did I do wrong? (original video in other comments

#

import pygame
import time
from pygame.locals import*
#you have to import these to use them

def draw_block():
surface.fill((65, 105, 225))
surface.blit(block, (block_x, block_y))
pygame.display.flip()
#this code above starting with def was added latter in statrting up procces and helps the block png in the game move

if name== "First file":
pygame.init()
#it says to start pygame up i think in this file must put file name

surface = pygame.display.set_mode((1000,900))

above tells pygame to display a surface to that with and height a full screen is 1290,950 you must always put 2 () in everything

surface.fill ((65,105,225))
#tells pygame to fill display with color must be put before time or color might not show. this color is blue but search up a rgb color with google

block = pygame.image.load("small block.jpg").convert()
block_x = 100
block_y = 100
surface.blit(block,(block_x,block_y))
#top code is just a standard preset code to load a image...image mut be in first project folder, obviously the jpg is the custom you named
#the seccond is just to print the block////surface.blit(block,(0,0)) it was this code but it got deleted this code pints the block still but at the top right in orignal dimesions

pygame.display.flip()
#this is nessisary but I dont know what it ose it just works
##time.sleep(20) tells how long the window will be up for secconds in this case 20 seconds but we will use an event loop because we want to make it closeable

#go back and import pygame locals for stuff

running = True

#

running = True

while running:
for event in pygame.event.get():
if event.type == KEYDOWN:
if event.type == K_ESCAPE:
running = False

        if event.type == K_DOWN:
            block_y -= 10
            draw_block()
        if event.type == K_UP:
            block_y += 10
            draw_block()
        if event.type == K_LEFT:
            block_x -= 10
            draw_block()
        if event.type == K_RIGHT:
            block_x += 10
            draw_block()


    elif event.type ==QUIT:
        running = False
#

https://www.youtube.com/watch?v=8dfePlONtls&list=WL&index=2&t=1057s&ab_channel=freeCodeCamp.org
here is original video specifically need help with 19:19 to 20:00

In this Python / Pygame tutorial you will build a snake and apple game. This Python project for beginners is perfect for you to get exposure on how you can build an end-to-end Python project after learning the basics of Python.

✏️ Course created by Dhaval Patel from codebasics. Check out his channel: https://www.youtube.com/c/codebasics

πŸ’» Cod...

β–Ά Play video
#

I want it to move the block

wind raptor
#

!code

wise cargoBOT
#

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.

elder knot
#

haha, Up, Left, Right, Down

amber gulch
#

while running:
for event in pygame.event.get():
if event.type == KEYDOWN:
if event.type == K_ESCAPE:
running = False

        if event.type == K_DOWN:
            block_y -= 10
            draw_block()
        if event.type == K_UP:
            block_y += 10
            draw_block()
        if event.type == K_LEFT:
            block_x -= 10
            draw_block()
        if event.type == K_RIGHT:
            block_x += 10
            draw_block()
elder knot
#

Definition?

amber gulch
#

definition on what

#

?

#

it finishes and has no error message. the expected outcome is for the block to move like on the video but it dosent move on my screen

wind raptor
#

!paste

wise cargoBOT
#

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.

amber gulch
#

can you see it

#

my code almost is exactly like video but it dose nothing

#

what is it

#

oh he uped that in the video and it worked

#

oh

#

so use what again

#

thx

wind raptor
#
            if event.key == K_DOWN:
                block_y += 10
                draw_block()
            if event.key == K_UP:
                block_y -= 10
                draw_block()
            if event.key == K_LEFT:
                block_x -= 10
                draw_block()
            if event.key == K_RIGHT:
                block_x += 10
                draw_block()
amber gulch
#

thank you very much sir

#

i go now

#

I pated and it give error

#

pasted

#

are you there

#

line 74, in <module>
if event.key == K_DOWN:
AttributeError: 'Event' object has no attribute 'key'

#

?

#

pls help

wind raptor
#

It works for me

#

Not sure why it would be different

amber gulch
#

yes

#

pycharm

wind raptor
#
while running:
    for event in pygame.event.get():
        if event.type == KEYDOWN:
            if event.key == K_ESCAPE:
                running = False
            if event.key == K_DOWN:
                block_y += 10
                draw_block()
            if event.key == K_UP:
                block_y -= 10
                draw_block()
            if event.key == K_LEFT:
                block_x -= 10
                draw_block()
            if event.key == K_RIGHT:
                block_x += 10
                draw_block()
        elif event.type == QUIT:
            running = False
#

That's the entire block

amber gulch
#

that you created?

wind raptor
#

The only thing I changed was event.type to event.key

#

An event is:

<Event(768-KeyDown {'unicode': '', 'key': 1073741905, 'mod': 4096, 'scancode': 81, 'window': None})>
#

What does it say when you print out each event?

midnight finch
wind raptor
#

I have a key value in the dict

amber gulch
#

i pasted the whole thing it works but not stringy like in the video its ok though thanks

wind raptor
#

No problem

midnight finch
#
import scipy.signal
import numpy as np
import matplotlib.pyplot as plt
np.random.seed(1)

x = np.linspace(0,2*np.pi,100)
y = np.sin(x) + np.random.random(100) * 0.2
yhat = scipy.signal.savgol_filter(y, 51, 3) # window size 51, polynomial order 3

plt.plot(x,y)
plt.plot(x,yhat, color='red')
plt.show()

can i just copy x= and y= and what= into my other code

#

@wind raptor if i want to remove blur and just plot graph, does this code look right. althuogh there is one blur.shape in the code still so might be wrong

import cv2
import numpy as np
import matplotlib.pyplot as plt


# load image
img = cv2.imread(r'C:\Users\Guest_\Downloads\Screenshot 2022-03-18 154330.png')

# convert the image to grayscale
gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)

# smooth the image
#blur = cv2.GaussianBlur(gray, (5, 5), 0)
#for _ in range(10):
#    blur = cv2.GaussianBlur(blur, (5, 5), 0)

# show the blurred image
#plt.imshow(blur, cmap='gray')
#plt.show()

# read each column of the image from left to right and save it to a list
cols = []
for i in range(blur.shape[1]):
    cols.append(blur[:, i])

# average every 3 columns
avg_cols = []
for i in range(0, len(cols), 1):
    avg_cols.append(np.mean(cols[i:i+5], axis=0))

# graph the average of each column (reversed)
plt.plot(avg_cols[80][::-1])
plt.show()
print (avg_cols[80][::-1])
arctic ledge
#

var host = 'webcode.me';
var port = 80;

var socket = new net.Socket();

socket.connect(port, host, () => {

    socket.write("HEAD / HTTP/1.0\r\n");
    socket.write("Host: webcode.me\r\n");
    socket.write("User-Agent: Node.js HTTP client\r\n");
    socket.write("Accept: text/html\r\n");
    socket.write("Accept-Language: en-US\r\n");
    socket.write("Connection: close\r\n\r\n");
});

socket.on('data', (data) => {

    console.log(`${data}`);
    socket.destroy();
});```
signal sand
#

@midnight agate what are you doing?

#

@midnight agate I'm Charan btw.

deep wave
signal sand
#

@midnight agate This is why javascript sucks

#

JS Black Magic

#

I think it is pipe as in bash pipe operator @midnight agate

cold isle
#

hi guys

oblique mica
#

!voiceverify

tacit oasis
#

!voiceverify

whole bear
#

!voiceverify

sterile agate
#

!voiceverify

#

/voiceverify

woeful salmon
wise cargoBOT
#

Voice verification

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

whole bear
#

oh my god, i need to send 50 msgs to talk

#

lolo

woeful salmon
inland path
#

hahah, im here chillin just waiting to get the chance to chat in voice

#

kinda need some small tips with my assignment and guide me along but don't really know where to post and I don't wanna get banned either

magic coyote
#

We have a rule about helping with homework assignment

#

!rule 8

wise cargoBOT
#

8. Do not help with ongoing exams. When helping with homework, help people learn how to do the assignment without doing it for them.

magic coyote
#

So, people can guide, and explain. But can't just hand you the answers

inland path
#

Yeah, I saw the rules πŸ™‚

magic coyote
#

woah, someone actually read them πŸ˜„

inland path
#

I think that'll help me heaps in learning

#

I love that part

#

I can only use library math and random

magic coyote
#

You'd probably be better off in one of the help channels with this since you're not able to chat yet

earnest quartz
#

I can't message

inland path
#

yeah fair, I'll try post up to get help channel πŸ™‚

earnest quartz
#

print('what you fight you become #python')

sour imp
#

!e

print('what you fight you become #python')
wise cargoBOT
#

@sour imp :white_check_mark: Your eval job has completed with return code 0.

what you fight you become #python
sour imp
earnest quartz
#

iamshow

midnight finch
#

anyone know how to work out gradient of line in line graph in python

earnest quartz
#

I also do the data manipulation with python

#

I wanted to be data science person someday

midnight finch
#

#using py27

import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
from scipy.signal import savgol_filter, general_gaussian

#I think wl is reading column labelled X on spreadsheet and X is reading column named Y on spreadsheet.
data=pd.read_excel('C:\Users\Guest_\Downloads\exporting.xlsx')
wl=data['X'].values
X = data['Y'].values

#mess around with these numbers
w = 31
p = 4
X_smooth_1 = savgol_filter(X, w, polyorder = p, deriv=0)

#sawa code which used interval=... and then in plt.plot did plt.plot(wl[interval], X_smooth_1[interval], 'r', ...) but i couldnt get that to work not sure if its important
plt.figure(figsize=(9,6))
#interval = np.arange(0,200,1)
plt.plot(wl, X_smooth_1, 'r', label = 'Smoothing: w/p = 2.5')
plt.xlabel("X")
plt.ylabel("Whiteness")
plt.legend()
plt.show()

this is code

wise cargoBOT
#

Hey @midnight finch!

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

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

midnight finch
#

!pastebin

wise cargoBOT
#

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.

midnight finch
somber heath
#

!e py import numpy as np data = 1, 5, 6, 8, 2, 5 result = np.diff(data) print(result) result = np.mean(data) print(result)

wise cargoBOT
#

@somber heath :white_check_mark: Your eval job has completed with return code 0.

001 | [ 4  1  2 -6  3]
002 | 4.5
somber heath
#

!e py import numpy as np data = 1, 5, 6, 8, 2, 5 result = np.gradient(data) print(result)

wise cargoBOT
#

@somber heath :white_check_mark: Your eval job has completed with return code 0.

[ 4.   2.5  1.5 -2.  -1.5  3. ]
midnight finch
solid roost
#

I need help running this in GUI

#

Here

somber heath
#

@solid roost You're probably better off typing.

solid roost
#

i am writing

#

it

#

I am saying that when i run the pip install -r requirements.txt

#

it through this error

somber heath
#

@solid roost I wish I knew what to tell you.

solid roost
#

The same happens with!

pallid hazel
woeful salmon
#

"Howmuch python do you have under your belt" ~ @somber heath

solid roost
woeful salmon
#
with open("requirements.txt") as f:
    lines = []
    for line in f:
        if "@" in line:
            line, _* = line.partition("@")
    lines.append(line.strip())

with open("new_requirements.txt") as f:
    f.write("\n".join(lines))
solid roost
woeful salmon
#

@wind raptor

wind raptor
#

Wow, you are bored

woeful salmon
#

@whole bear its a routing issue with discord and alot of people in pakistan have it :x i have atleast 4 friends who have it

#

1-2 that don't live in their capital where it seems to be fine

#

:x

#

99% vpn should work

woeful salmon
solid roost
#

Haha lol

#

with vpn

#

it showing me this

#

I said that earning money is not easy!

woeful salmon
#

@wind raptor thinkmon should i stream myself learning yew (rust front end library that uses web assembly)?

#

cuz that's about all i can think of to do rn

wind raptor
#

That sounds pretty cool

#

Getting close to completing my web dev boot-camp πŸ™‚

woeful salmon
#

if you wanna

#

you learn 2 libraries (gatsby and react) for free and i can sit with you to teach you the basics of it too xD

wind raptor
#

Nice

woeful salmon
#

as i was already teaching furyo and helpmeslay πŸ™‚

wind raptor
#

Yeah, I'm down

woeful salmon
#

nice πŸ˜„

#

i'd message you either later today if you're still here when i get back or tommorow and we can get you teaching you react xD

wind raptor
#

Kk sounds good!

#

See ya later

#

I'll be in here for quite a bit

thorny lotus
#

cant see ur screen lel

sand zealot
#

I'm from Brazil

broken harbor
#

mael-bm

whole bear
#

@toxic niche

toxic niche
#

you know?

whole bear
#

physics?

toxic niche
#

yes

whole bear
#

i do a little, though lately i've been focusing mainly on math and cs

#

what's your phys problem?

#

@toxic niche

ivory stump
#

math.prod(map(int,num))

eternal bough
#

total = 1
for i in str(num):
total = total * int(i)

print(str(total))

ivory stump
#

4 -> 3
1 -> 0

#

indexes[i]

broken harbor
#

d c b a

#

d

#

c

#

b

#

a

halcyon yew
#

that teeth one is probably the only one I could solve

timid ruin
#

hello

#

you guys know joe

#

JOEEEEEE MAMA

wise cargoBOT
whole bear
midnight finch
#

hi

#

i have this image

#

histogram looks weird. says lots of white pixels but there are not any

#

my code

import cv2
from matplotlib import pyplot as plt


img = cv2.imread('C:\Users\guest\Dropbox\contrast_raw_flow2_long_noback_halved_peakcontrast.png', 0)

# find frequency of pixels in range 0-255
histr = cv2.calcHist([img], [0], None, [256], [0, 256])

# show the plotting graph of an image
plt.plot(histr)
plt.show()

#different way to show histogram
plt.hist(img.ravel(),256,[0,256])
plt.show()
#

can someone help

wind raptor
pallid hazel
#

anyone else find themselves needing to add what should be just a quick check to their code.. and write it up psuedo in a blank file.. then it takes a life of its own and cant be easily added to where you wanted it.. :(

#

honestly tho, i learned a lot doing it.. and I just start writing in my actual code now what Ive learned it should work.. just turned out to be no sauce in the copy pasta

midnight finch
#
import cv2
from matplotlib import pyplot as plt

src = cv2.imread('C:\Users\guest\Dropbox\contrast_raw_flow2_long_noback_halved_peakcontrast.png', cv2.IMREAD_UNCHANGED)

bgr = src[:,:,:3] # Channels 0..2
gray = cv2.cvtColor(bgr, cv2.COLOR_BGR2GRAY)

# Some sort of processing...

bgr = cv2.cvtColor(gray, cv2.COLOR_GRAY2BGR)
alpha = src[:,:,3] # Channel 3
result = np.dstack([bgr, alpha]) # Add the alpha channel

cv2.imwrite('51IgH_result.png', result)

# find frequency of pixels in range 0-255
histr = cv2.calcHist([result], [0], None, [256], [0, 256])

# show the plotting graph of an image
plt.plot(histr)
plt.show()

#different way to show histogram
plt.hist(result.ravel(),256,[0,256])
plt.show()
#

tried to add alpha channel so make image transparent

#

but histogram still picking up white

shut goblet
#
import random

count = 10

def click(prob_of_win = 3300):
    a = random.randint(0, 10000)
    if a < prob_of_win:
        return True 
    return False

while count > 0:
    click(prob_of_win = 3300)
    count -= 1
#

how do i export the result of that onto a google sheet?

midnight finch
#

Anyone used pycharm

#

How to see array result numbers

inland path
#

quick question regarding jupyter

#

I was given a template for an assignment, how do I import that template into jupyter

#

fixed it, dw

cunning lake
midnight finch
#

alpha = np.sum(na, axis=-1) > 36

#

anyone know what this means

#

import cv2
import numpy as np

# Load image as Numpy array in BGR order
na = cv2.imread(r'C:\Users\gg\Dropbox\peaksonovue_beats_screenshot.png')

# Make a True/False mask of pixels whose BGR values sum to more than zero
alpha = np.sum(na, axis=-1) > 36

# Convert True/False to 0/255 and change type to "uint8" to match "na"
alpha = np.uint8(alpha * 255)

# Stack new alpha layer with existing image to go from BGR to BGRA, i.e. 3 channels to 4 channels
res = np.dstack((na, alpha))

# Save result
cv2.imwrite('peaksonovue_beats_screenshot_noback.png', res)
cunning lake
#

"hangman" this is what i did

#

i copy it from Youtube

gentle flint
midnight finch
#

img1 = cv2.imread('Image.png', cv2.IMREAD_UNCHANGED)
b,g,r = (img1[300, 300])
print (r)
print (g)
print (b)

frigid lion
#

from pydrive.auth import GoogleAuth

#

from pydrive.drive import GoogleDrive

#

def Google_login():

#

g_login = GoogleAuth()

#

g_login.LoadCredentialsFile("credentials.json")

#

if g_login.credentials is None:

#

g_login.LocalWebserverAuth()

#

elif g_login.access_token_expired:

#

g_login.Refresh()

#

else:

#

g_login.Authorize()

#

g_login.SaveCredentialsFile("credentials.json")

#

g_login.LocalWebserverAuth()

#

drive = GoogleDrive(g_login)

#

return drive

inland path
#

anyone active that may be able to help?

#

help-bagel haha

pliant pulsar
#

@somber heath

#

hi

#

i cant speaak

#

my mic

#

sux

#

btw, i am trying to learn android development, with 0 java knowledge and 0 kotlin

#

should i go full kotlin or start a lil with java

#

ill take some time and do a little research

#

for the best

#

yea

#

can u tell me what's wrong in it

#

oopie

#

i forgot i am on python server

#

sorry, i was doing java

loud karma
#

πŸ‘‹

pliant pulsar
#

Which IDE do you use mostly for python opal

loud karma
#

i have a github education discord

#

idk if its the same one

#

oh nvm thats a hackathon template

#

e.e

frigid lion
#

@whole bear

#

test

wise cargoBOT
#

failmail :ok_hand: applied mute to @frigid lion until <t:1647748423:f> (9 minutes and 59 seconds) (reason: burst rule: sent 8 messages in 10s).

loud karma
#

πŸ˜”

#

shouldn't have spammed

#

outside

#

i think

#

its not voice ban, its mute

#

so

#

anyways,
[0 for _ in range(n)]
is there a better solution to generate a list with 0s

#

:)

somber heath
#

!e py n = 5 z = [0] * n print(z)

wise cargoBOT
#

@somber heath :white_check_mark: Your eval job has completed with return code 0.

[0, 0, 0, 0, 0]
loud karma
#

ooh

#

clever

#

:)

#

golf time

#

lol

#

🧠

somber heath
#

!e py import numpy as np n = 5 z = np.zeros(n) print(z)

wise cargoBOT
#

@somber heath :white_check_mark: Your eval job has completed with return code 0.

[0. 0. 0. 0. 0.]
loud karma
#

πŸŽ‰

#
import pip
pip.main(["install", "-U", "numpy"])
import numpy as np
n = 5
z = np.zeros(n)
print(z)
#

!e
import pip

wise cargoBOT
#

@loud karma :x: Your eval job has completed with return code 1.

001 | Traceback (most recent call last):
002 |   File "<string>", line 1, in <module>
003 | ModuleNotFoundError: No module named 'pip'
loud karma
#

sad

#

they deleted it

#

!d pip

wise cargoBOT
#
pip

%pip```
Run the pip package manager within the current kernel.
loud karma
#

yay

#

sadge

#

to install random external module >:)

#

doesnt have internet :(

#

too bad

frigid lion
#

for i in range(50):

#

print(f"msg n :{i}")

loud karma
#

scary security stuff

frigid lion
#

@whole beari heard you but it was late

#

i can't see who's talking

#

yeah

#

thanks

#

Opal

#

what does voice infraction mean?

wind raptor
#

Brb

frigid lion
#

i had passed the voice criteria

#

so i want the send 50 msg to get verified

#

but things gone wrong

#

that's bad

#

!good

loud karma
#

spamming is bad :)

frigid lion
#

yeah now i know it

loud karma
#

Β―_(ツ)_/Β―

whole bear
#

hi hi hi hi hi hi hi hi hi hi hi hi hi hi hi hi hi hi hi hi hi hi hi hi hi hi hi hi hi hi hi hi hi hi hi hi hi hi hi

wise cargoBOT
#

:incoming_envelope: :ok_hand: applied mute to @whole bear until <t:1647749655:f> (9 minutes and 59 seconds) (reason: duplicates rule: sent 4 duplicated messages in 10s).

frigid lion
#

wait

#

hhhhh

somber heath
#

!e py import numpy as np v = np.array([True, False]) v = True ^ v print(v)

wise cargoBOT
#

@somber heath :white_check_mark: Your eval job has completed with return code 0.

[False  True]
loud karma
#

woah

#

lmao

somber heath
#

!e py import numpy as np v = np.array([1, 0]) v = 1 - v print(v)

wise cargoBOT
#

@somber heath :white_check_mark: Your eval job has completed with return code 0.

[0 1]
frigid lion
#

!e

wise cargoBOT
#
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!*

frigid lion
#

!e [print("test")]

wise cargoBOT
#

@frigid lion :white_check_mark: Your eval job has completed with return code 0.

test
somber heath
#

!e py vs = [1, 0] vs = [1 - v for v in vs] print(vs)

wise cargoBOT
#

@somber heath :white_check_mark: Your eval job has completed with return code 0.

[0, 1]
frigid lion
#

!e lst = [i for i in range(3)]

wise cargoBOT
#

@frigid lion :warning: Your eval job has completed with return code 0.

[No output]
frigid lion
#

!e lst = [i for i in range(3)]

wise cargoBOT
#

@frigid lion :warning: Your eval job has completed with return code 0.

[No output]
frigid lion
#

yeah

somber heath
#

!e py vs = "0110" trans = str.maketrans({"0":"1", "1":"0"}) vs = vs.translate(trans) print(vs)

wise cargoBOT
#

@somber heath :white_check_mark: Your eval job has completed with return code 0.

1001
somber heath
#

!e py trans = str.maketrans("01", "10") vs = "1001" vs = vs.translate(trans) print(vs)

wise cargoBOT
#

@somber heath :white_check_mark: Your eval job has completed with return code 0.

0110
loud karma
frigid lion
#

whats the solution for this

loud karma
#

:)

#

patience

frigid lion
#

import time

#

time.sleep(5000000)

loud karma
#

me, but i'm currently struggling

#

arcade supermacy

somber heath
#

!e ```py
rules = str.maketrans({"F": "F[-F][+F]"})
axiom = "F"

for _ in range(5):
axiom = axiom.translate(rules)

print(axiom)```

wise cargoBOT
#

@somber heath :white_check_mark: Your eval job has completed with return code 0.

F[-F][+F][-F[-F][+F]][+F[-F][+F]][-F[-F][+F][-F[-F][+F]][+F[-F][+F]]][+F[-F][+F][-F[-F][+F]][+F[-F][+F]]][-F[-F][+F][-F[-F][+F]][+F[-F][+F]][-F[-F][+F][-F[-F][+F]][+F[-F][+F]]][+F[-F][+F][-F[-F][+F]][+F[-F][+F]]]][+F[-F][+F][-F[-F][+F]][+F[-F][+F]][-F[-F][+F][-F[-F][+F]][+F[-F][+F]]][+F[-F][+F][-F[-F][+F]][+F[-F][+F]]]][-F[-F][+F][-F[-F][+F]][+F[-F][+F]][-F[-F][+F][-F[-F][+F]][+F[-F][+F]]][+F[-F][+F][-F[-F][+F]][+F[-F][+F]]][-F[-F][+F][-F[-F][+F]][+F[-F][+F]][-F[-F][+F][-F[-F][+F]][+F[-F][+F]]][+F[-F][+F][-F[-F][+F]][+F[-F][+F]]]][+F[-F][+F][-F[-F][+F]][+F[-F][+F]][-F[-F][+F][-F[-F][+F]][+F[-F][+F]]][+F[-F][+F][-F[-F][+F]][+F[-F][+F]]]]][+F[-F][+F][-F[-F][+F]][+F[-F][+F]][-F[-F][+F][-F[-F][+F]][+F[-F][+F]]][+F[-F][+F][-F[-F][+F]][+F[-F][+F]]][-F[-F][+F][-F[-F][+F]][+F[-F][+F]][-F[-F][+F][-F[-F][+F]][+F[-F][+F]]][+F[-F][+F][-F[-F][+F]][+F[-F][+F]]]][+F[-F][+F][-F[-F][+F]][+F[-F][+F]][-F[-F][+F][-F[-F][+F]][+F[-F][+F]]][+F[-F][+F][-F[-F][+F]][+F[-F][+F]]]]]
loud karma
#

looks real

somber heath
#

L-systems

spring turtle
dark sable
#

nums = [2,7,11,15]

#

for i in nums:

#

for x in nums:

cedar briar
#

```py
print('Hello, world.')
```

dark sable
#
nums = [2,7,11,15]
for i in nums:
         for x in nums:

#

i + x == 9

#

i.index()
x.index()

#
target = 9
nums = [2,7,11,15]
for i in nums:
         for x in nums:
            if  i + x == 9:
                print(nums.index(i))
                print(nums.index(x))
sour imp
#
target = 9
nums = [2,7,11,15]
for i in nums:
  for x in nums:
    if  i + x == 9:
      print(nums.index(i))
      print(nums.index(x))
dark sable
#

Input: nums = [3,2,4], target = 6
Output: [1,2]

#

Input: nums = [3,3], target = 6
Output: [0,1]

cedar briar
#
test = ([3, 4, 3], 6)
dark sable
undone idol
#

Hi big guy! @whole bear

broken harbor
#

password

whole bear
#

print("ok")

#

!e

wise cargoBOT
#
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!*

whole bear
#

print("ok")

#

!eval print("ok")

wise cargoBOT
#

@whole bear :white_check_mark: Your eval job has completed with return code 0.

ok
whole bear
#

!eval print("I am gae")

wise cargoBOT
#

@whole bear :white_check_mark: Your eval job has completed with return code 0.

I am gae
summer ocean
#

πŸŽ‰

lavish heart
#

hi

cunning lake
#

!e print ('[] == []')

wise cargoBOT
#

@cunning lake :white_check_mark: Your eval job has completed with return code 0.

[] == []
cunning lake
#

!e print ('j == q')

wise cargoBOT
#

@cunning lake :white_check_mark: Your eval job has completed with return code 0.

j == q
cunning lake
#

!e ('j == q')

wise cargoBOT
#

@cunning lake :warning: Your eval job has completed with return code 0.

[No output]
cunning lake
#

!e print('j' is 'g')

woeful salmon
#

@wind raptor question: what does this bar object evaluate to

const foo = 20;
const bar = {
    [foo]: "bar",
    foo: "bar"
}
#
const foo = false;
foo ??= "hello"
console.log();
sand fractal
#

hi @whole bear

whole bear
#

Hi @sand fractal

sand fractal
#

I need ideas for themes

covert lake
#

Quick question how do I download an image into a specific folder

loud karma
woeful salmon
#

<t:1647780061:F>

loud karma
#

download it and move to the location you desire (not the best but works)

wind raptor
#

Using python?

covert lake
#

no but I need it for a Python project

loud karma
#

hm

wind raptor
#

Why not just download and move it like daphuq said?

woeful salmon
covert lake
#

It's what I'm doing, thanks for the advice.

loud karma
#

uh you can probably mark a timestamp, then say it's my 12:00pm

#

Β―_(ツ)_/Β―

wind raptor
#

Event(nothing) <t:1647781200:R>

loud karma
#

nice singing

sand fractal
#

So I am naming all my versions of PowerShell Additions after greek gods

#

version 1.1 excluded

#

so version 1.2+ is Dionysus

#

(also since their names are cool)

#

version 1.1 was called Thermos

molten pewter
sand fractal
#

since I couldn't think of a better name

loud karma
#

πŸ‘€

#

time to come to india

sand fractal
#

So my PowerShell looks like Bash

#

this is cursed

#

this is even more cursed

wind raptor
#

I'm loving git-bash after switching over to it.

woeful salmon
#

like less or head or grep or find or td or sort

#

i just have my powershell alias the git versions of the ones i use often xD ^

wind raptor
#

I'm using ls, du, touch I don't know much more lol

#

@woeful salmon

woeful salmon
wind raptor
#

I know of rm also

#

Rm -rf

woeful salmon
#

no i meant like grep -rn it basically recursively greps for a pattern in all the files in your folder

#

and gives you the file name and line number where i found it

wind raptor
#

Grep as a verb is not useful because I don't know what it does haha

woeful salmon
#

ah its global regular expression print

#

i think that's the full form

wind raptor
#

Ahhh

woeful salmon
#

its basically used to search for regex patterns in files

wind raptor
#

That's awesome

#

And powerful

woeful salmon
#

yeah though by default it uses base regex which doesn't have alot of things we use with python for example

wind raptor
#

Aww

woeful salmon
#

you can do grep -P for perl like regex which is similar to python's

#

or grep -E for extended regex which is kinda like in between

wind raptor
#

I hate that regex isn't universal

woeful salmon
#

ye ^^ its kinda a pain

woeful salmon
#

less basically opens your file in your terminal but unlike cat it also allows you to scroll through it with arrow keys or vim binds and search through it as well

wind raptor
#

Bee?

woeful salmon
#

sort just sorts the lines you're printing
uniq only gets you unique lines from what you're printing

wind raptor
#

Is head the first 5 or 10 lines?

woeful salmon
#

i mean print is not really the right word cuz you can just pipe that output into another command

woeful salmon
wind raptor
#

Is there a tail?

woeful salmon
#

you can do head -5 to get first 5 lines for example

#

and tail -5 to get last 5

wind raptor
#

Easy to remember from pandas

#

I wish git-bash had man

#

--help isn't as great

woeful salmon
#

there is also wc you can use to get word count or line count for of another command's output or of a command

woeful salmon
#

there is >w> for example

#

you wanna see howmany times a word occurs in a file

#

pipe output from grep into wc

#

and you can find out

rugged tundra
#

China has a new rule for the country’s hundreds of millions of young gamers: No online videogames during the school week, and one hour a day on Fridays, weekends and public holidays.

summer ocean
pallid hazel
#

their game companys will suffer, and will psuedo lead the ability to circumvent the rules until they can offer a narative that is less damning

wind raptor
#
13.2% of China’s minors play games for over two hours a day on weekdays, amounting to tens of millions of children. A recent survey of 4,000 video gamers over the age of 18 in eight countries showed that Chinese gamers played more hours of video games per week than any other country. Chinese gamers played an average of 12.4 hours per week, exceeding the U.S. average of 7.7 hours per week and the global average of 8.5 hours per week

source numbers from Limelight Networks Market Research for games 2021 - https://img03.en25.com/Web/LLNW/{46b8ee89-c7f0-46b7-a5b3-0976ef1a3253}_2021-MR_SOOG_8.5x11_V06.pdf

rugged tundra
sand fractal
#

my custom powershell profile

#

(YES ITS CALLED A PROFILE, IDK WHY)

#

@broken harbor you wanna switch to windows terminal

#

or do u want it to look like me?

#

*mine

#

@broken harbor

#

like the fancy coloring in my prompt, do you mean that @broken harbor?

#

like the fancy coloring in my prompt, do you mean that @broken harbor? RESPOND

#

lets try voicemod

#

I can't stream

#

oop

sand fractal
#

@rugged tundra did you mute me?

#

Ok I can increase the pitch

whole bear
#

Why did you ping me

whole bear
thick swan
#
def clippy(t):
    try:
        return(t)
    except Fire:
        return ("This is fine")
    except Meltdown:
        return ("Thisssissssfffffinne")
#
class Fire(Exception):
    pass
    
class Explosion(Exception):
    pass  
    
class Meltdown(Exception):
    pass 
    
class Missing(Exception):
    pass

#your solution here
# class ...

# def clippy...
def clippy(t):
    try:
        return(t)
    except Fire:
        return (This is fine)
    except Meltdown:
        return (Thisssissssfffffinne)
#
def throwFire():
    raise Fire
def throwMeltdown():
    raise Meltdown
clippy(lambda : throwFire()), "This is fine")
clippy(lambda : throwMeltdown()), "Thisssissssfffffinne")
mild quartz
#

return "Thisisfine"

thick swan
#
def clippy(t):
    try:
        t()
    except Fire:
        return "This is fine"
    except Meltdown:
        return "Thisssissssfffffinne"
rustic mantle
#

Could you write the name of the book please?

thick swan
rugged tundra
#

(graph algorithm coding problem + basic ML questions)

obtuse finch
#

Agreed. It's not up to you

#

I can't speak on voice channels yet hahaha

rugged tundra
#

!voice

wise cargoBOT
#

Voice verification

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

obtuse finch
#

It's nice listening to you guys tho

#

Yea I need 50 chats

rugged tundra
trail mural
#

Hi EVERYONE

amber raptor
rugged tundra
trail mural
summer ocean
#

that escalated quickly πŸ˜‚

#

@zenith radish Can't you just get a study visa to do a master's degree from us and then apply for jobs , i've heard it's much easier πŸ™‚

#

i use protonmail πŸ™‚

formal meteor
#

yay protonmail!

summer ocean
#

the redirects ? to http then to https ?

rugged tundra
formal meteor
#

is DNS outside the scope of HTTP?

amber raptor
formal meteor
#

So is it appropriate to talk about DNS when asked this question about what happens when you load microsoft.com?

formal meteor
#

I would say that it's outside the scope. I might makea throwaway statement like, assuming the IP is in the client's cache.

amber raptor
#

Like the plane slowly crashing is better then plane flying along then πŸ’₯

amber raptor
formal meteor
#

Cuz, "requests" are done to domains, or urls, not IP's, right?

amber raptor
#

in a sane world, yes

formal meteor
#

Yeah, I wish I better understood, the technical definition of "request"...

pallid hazel
#

@midnight agate u need a helper coin?

amber raptor
#

Time to program on Linux, that should make everyone happy

formal meteor
#

I think it was too verbose from the start.

amber raptor
formal meteor
#

Thanks, Rabbit. In my interviews as the interviewee, like, it feels like I'm tripping over my words... But if you guys aren't turned off by that, maybe I won't worry as much.

#

I might have forgetten about the intermediate language. I heard that such a thing exists.... but I kinda was never shown like what exactly that looks like.

#

I like it, "depending on the architecture, the memory allocation might be different."

#

lol, describe the network stack.

#

BIG question. πŸ™‚

#

yes. I'm crying in sympathy.

#

Sure. What you do is you have commands. And what you do is combine them in different sequence to accomplish different goals. πŸ™‚

#

Very carefully πŸ™‚

#

"store and retrieve data" " according to a schema. " PIMP

#

py, mute your mic when you're not speaking.

#

7

#

7.5

wise cargoBOT
#

:incoming_envelope: :ok_hand: applied mute to @whole bear until <t:1647807844:f> (9 minutes and 59 seconds) (reason: burst rule: sent 8 messages in 10s).

formal meteor
#

abstraction that's the magic work

#

*word

magic coyote
sweet lodge
amber raptor
#

Put in slash commands so you users can find them