#ot1-perplexing-regexing

1 messages · Page 46 of 1

distant hazel
#

if this is going to devolve into a pissing match the conversation is over and mutes will ensue

thick ore
#

dnf

clever blade
#

source for what? that video games are addictive ? lol..

simple schooner
#

It is. I told you I do not train for strength 🤷🏽‍♂️

placid warren
royal lakeBOT
#

✅ silenced current channel for 10 minute(s).

distant hazel
#

new topic, favorite cookies

tranquil orchid
#

I made some bussin thick choc chip cookies recently

distant hazel
#

!unsilence

royal lakeBOT
#

✅ unsilenced current channel.

thick ore
#

oreos

#

oreos are cookies right

placid warren
#

nutella biscuit

distant hazel
#

white macadamia

tranquil orchid
young shoal
#

wrong answer

placid warren
clever blade
distant hazel
#

!mute 304627882075095041

royal lakeBOT
#

:incoming_envelope: :ok_hand: applied timeout to @clever blade until <t:1690726801:f> (1 hour).

tranquil orchid
#

I should make them again, maybe I'll do a white choc macadamia version

distant hazel
#

!mute 241962659505766402

royal lakeBOT
#

:incoming_envelope: :ok_hand: applied timeout to @round pendant until <t:1690726866:f> (1 hour).

drowsy rose
#

brownies are inherently superior

tranquil orchid
#

I like ice cream with brownie chunks

distant hazel
#

but are they cookies?

drowsy rose
#

no

#

good point

tranquil orchid
#

My workplace has a caramel brownie flavoured ice cream

#

So good

tulip falcon
#

Cookie is just a shape

#

Make a brownie cookie

tranquil orchid
#

cookie is a state of mind

tulip falcon
#

Truthy

tulip falcon
#

Meat cheese cookie

young shoal
#

cookies overall aren't that great tbh

high haven
#

jk some peeps consider that blasphemous

young shoal
high haven
#

see?

tulip falcon
drowsy rose
#

i want like a piping hot brownie thats melted on the inside

tulip falcon
#

Let's go to chili's then!

drowsy rose
#

cookie-brownied-general

#

dessert general

#

someone make that an otn pls

#

we need more desserts in general

young shoal
#

ok but

#

edge, center, or corner

tulip falcon
#

Corner gang

drowsy rose
#

corner obv

thick ore
#

edge

drowsy rose
#

at least not corner

#

but what is wrong with you

#

respectfully ofc

thick ore
#

nothing

tulip falcon
#

Maybe they like Microsoft Edge a lot

thick ore
#

i am asserting dominance

thick ore
#

i love microsoft products

#

except for azure

#

fuck azure

tulip falcon
#

Yeee Microsoft is the greatest!!!!

high haven
#

we have to use azure for a thing

#

def not excited since everyone only knows aws

drowsy rose
#

lol

jaunty wraith
thick ore
#

be careful

jaunty wraith
#

I accept this kind of telemetry

high verge
#

for a good price too

#

problem is, you get tired of them pretty fast, and then you're just sitting there contemplating why did you buy 12 cookies when you only ate two

worldly grail
ebon plinth
#

need some help with HTML, should I ask here?

robust zephyr
#

sure

ebon plinth
#

okay, one sec

#

need to re-run the project. It's actually Django but it's not a Django issue

#

Think I screwed up something with my styling

#

Followed off w3schools and changed it to my liking. 4th card should be in the next column

#
 <div class="column">
            <div class="card_2">
              <h3>Value</h3>
              <p>Value</p>
              <p><a href="Value">Some text</a></p>
            </div>
          </div>
.column {
    float: left;
    width: 30%;
    padding: 0 10px;
}

.row {margin: 0 -5px;}

.row:after {
    content: "";
    display: table;
    clear: both
}

@media screen and (max-width: 600px){
    .column {
        width: 75%;
        display: block;
        margin-bottom: 20px;
    }
}

.card_2 {
    box-shadow: 0 4px 8px 0 rgba(0,0,0,0.2);
    transition: 0.3s;
    border-radius: 5px;
    margin: 0 0 15px 35%;
    width: 60%;
    background: white;
    display: inline-block;
    padding: 16px;
    text-align: center;
    font-size: 25px;
}
#

is it a problem with any of this?

yikes, that's long

#

maybe I should do text message insted

#

wait, is that because I need to create another column for each row?

#

...oops?

high verge
#

MDN >>>>> 🔝

ebon plinth
#

ahh, MDN

high verge
#

they provide blatantly misleading examples

#

all they really care about is being #1 in the google searches

robust zephyr
high verge
#

bookmarking that one

#

thank you doggo

ebon plinth
#

hmmm

#

that looks promising

#

I want to list things and have it look like cards, and being able ot adjust to different window or screen sizes is also a must. That one checks all the boxes it seems

robust zephyr
#

yes

ebon plinth
#

I use Django to put that data out and etc

#

can't just edit the page and upload, that won't work very well

robust zephyr
#

oh yeah that uses React too. not sure you are using that

ebon plinth
#

not using react, no

#

is it bad practice to rely on libraries and stuff like that all the time? I've heard it is. I'm also kinda trying to relearn by writing most things from scratch

#

learning as I go

#

saves time, yes, but...

tardy rain
#

for CSS?

#

every browser supports flexbox nowadays, its like relying on a builtin or stdlib in python

ebon plinth
tardy rain
#

it depends

#

im not reinventing the wheel at work ever

ebon plinth
#

like jQuery in JS

tardy rain
#

but i might want to implement something myself to learn it

#

im not sure why you would use jquery regardless

ebon plinth
#

I'm not but that was one example

tardy rain
#

you could implement a virtual dom react-style and see how it works

#

but youre not doing that for anything that matters

#

much smarter people than you or I are on it

ebon plinth
#

yeah

tranquil iron
#

you should just use css grid and flexbox together for sweet and easy layouts

tardy rain
#

no use table layouts instead for absolutely no reason

#

thats what corporations do

#

enterprise development, stuff everything in tables

tranquil iron
#

perhaps that is what they do. but that is not what they should do. as I said, they should use css grid + flexbox

tardy rain
#

I think our html templates predate flex and grid

#

for some reason UI, the team im on, is the last one to migrate to anything modern

tranquil iron
#

then consider this an opportunity to re-implement them and increase department headcount

tardy rain
#

which is wild imho, cause its the easiest to upgrade

tranquil iron
#

all in the name of efficiency, of course

tardy rain
#

cant do that

#

all changes need to be part of a jira ticket and nothing gets created unless the client wants it

#

as per company policy, feelsgood to work in a big corp

tranquil iron
#

so say that "multiple clients" wanted it

tardy rain
#

there's a bajillion layers of liaisons and project managers between any client and myself

tranquil iron
#

that makes it even better

rough sapphire
#

@thick ore microsoft simp :sotrue:

thick ore
#

😃👍

#

microsoft FTW

ionic moth
#

ayo my note almost feels like π

young shoal
#

it has a 3 and a 4 in it ?

ionic moth
#

yeah

#

actually should be pi/10

#

oh wait got the wrong screen

#

was supposed to be 0.314 etc

molten nexus
#

how do i stream in the vcs

signal scroll
molten nexus
#

how

#

do i open a ticket

#

where do i open a ticket

signal scroll
#

Ask for permission with the modmail

molten nexus
#

i must be blinder than a blind man because i cant find the modmail area

ionic moth
#

@polar knoll

#

there ya go

ebon plinth
#

so I did Flexboxes for my stuff. Still learnign but everything is pretty much the way I want it. Except... my button and my text...

#

why is the button noticably off-center?

#
<div id="container_1">
  <div>
    <a href="../"><button class="button" id="home_btn">Go to homepage</button></a>
    <h1 style="color: white;">My list of stuff:</h1>
            </div>
</div>```
#

well that looks odd due to the intends but whatever

#

freakin copy paste

#
#container_1 {
    height: 100px;
    display: flex;
    justify-content: center;
}
.button {
    background-color: #0B6AFF;
    border: none;
    color: white;
    padding: 18px 20px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 16px;
    margin-top: 5px;
    margin-bottom: 5px;
    cursor: pointer;
}```
#

oh, speaking of which I think I need to change my margin stuff but

#

margin is now just margin: 5px;

#

oh, and also height: 100px; shouldn't be there

copy pasted that from somewhere in my file...

#

so that's gone now too

naive igloo
#

can your windows package manager do this?

#

yes i am running rn without a kernel (installed)

#

i shouldnt reboot tho

livid gate
#

i'm not 1337 enough to know what packages you are removing. 😛

naive igloo
#

(with zen modifiactions)

livid gate
naive igloo
#

just linux package is pure* linux kernel

livid gate
#

i wonder if my deb box has linux or linux-zen

naive igloo
#

you can update entire system here, and you dont need to look for few tens minutes at "Updating your PC..."

naive igloo
livid gate
#

hey i'm not saying that there are no advantages to linux PMs over mac PMs and windows PMs. i'm just saying linux only snobs are being disingenous or malinformed when they continue to push the line that windows has none.

naive igloo
livid gate
#

i need to boot it up. i had it turned off because the last couple weeks have been especially hot so running 3 computers was a bit much. 😛

naive igloo
#

windows actually got 3 PMs iirc?

livid gate
#

3? choco, winget, ??

naive igloo
#

snoop?

livid gate
#

i dunno snoop

naive igloo
#

i dont remember how its called

#

*scoop

livid gate
#

scoop apparently

#

ahh you found it too. 😛

#

oh oops. i accidentally switched wo my mac not to my linux machine for a second there. 😛

#

neofetch you said. aye?

naive igloo
#

yep

#

it should be installed

livid gate
naive igloo
#

uhh

#

then you gotta install it :b

livid gate
#

yes, i'm a nerd who uses os girls to distinguish which os is loaded on the kvm.

#

and yeah i'm installing it. was just showing you it wasn't

lethal glacier
livid gate
#

i'm guessing kernel...so since it doesn't have that word you had i'm guessing it's vanhilla?

livid gate
naive igloo
#

another way

#

is to look at what package you got installed

#

linux or linux-zen

#

just try uninstalling one or the other

#

it shouldn't let you uninstall kernel due to dependencies tho

livid gate
#

apt list isn't the command for that is it?

naive igloo
#

idk

#

i am just pacman user

#

not apt :b

#

so proposed that

livid gate
#

um...do i not have a kernel?

#

what distro uses pacman? i was thinking that was an arch thing but recently saw something else mentioned for arch.

naive igloo
livid gate
naive igloo
#

i understood lol

livid gate
#

neofetch is pretty cool...ooo i just realized the logo is distro specific. does neofetch have all the logos?

naive igloo
#

no

#

i think

#

whatever distro packages neofetch, sets according logo in it

#

you can change that logo if you want to

graceful basin
#

the logos are hardcoded in the neofetch source.

livid gate
#

woah... your kernel is newer than mine. i mean yeah i'm using debian. but someone was complaining at me recently that bookworm was bleeding edge for debian.

naive igloo
#

ie there is not debian 22.04 (no versions)

#

it is just arch, all the time

livid gate
#

i'm kinda tempted to try out that vanhilla os that is like all the distros in one.

wicked haven
#

I'm on 5.15.0-78-generic lol

naive igloo
#

oh wow

wicked haven
#

mm yes security vulnerabilities

naive igloo
#

tasty-tasty

livid gate
naive igloo
wicked haven
naive igloo
#

depending in what enviroment i suppose

#

on servers - perhaps
on personal - eh

livid gate
#

yeah i dunno how old different kernels are.

#

and in linux i can only do one screen so my multitasking is severely limited.

wicked haven
#

my server is apparently on 6.1.31

livid gate
#

in neofetch is the little pallet at the bottom your terminal colorscheme?

livid gate
#

is it lame that i now kinda want new terminal windows to open up to neofetch(and something similar on my mac and win machines)?

livid gate
#

yeah i'm a nerd...

#

...mac just says "UNIX" instead of having an apple logo.

rough sapphire
#

i suddenly want to make a linux distro

graceful basin
#

go for it

abstract marlin
#

gotta love router based adblock

tardy rain
#

opinions on

if cond:
  return X

return None

vs

return x if cond else None
#

i personally dont like using ternaries if one of the ops is None

tulip falcon
#

Former is slightly nicer I suppose since it looks like implicit return

naive igloo
#

people already said that to me

thick ore
naive igloo
#

why everybody asks for that font

thick ore
#

its a good font

#

👍

earnest mica
#

That looks like dream

#

downloads it now

abstract marlin
#

it looks like the minecraft chat font

earnest mica
#

Kinda

#

Ah, I like pyenv for my Mac...

#

With iTerm2...

#

And it seems VSCode does not support that font..

abstract marlin
#

i like fira code

naive igloo
#

this one is not

abstract marlin
#

behold, fira code

naive igloo
#

i should prob switch to nvim one day

earnest mica
#

Really? nvim? You should be using emacs.

#

killall nvim

naive igloo
#
nvim: no process found
carmine niche
earnest mica
#

Really? emacs? You should be using nvim.

#

lmao

carmine niche
#

use helix and transcend

abstract marlin
carmine niche
#

love-hate relationship with VSC

naive igloo
#

i mean it is OK

#

but... pycharm is a lot better does job at static checking

#

and code suggestion

carmine niche
#

python is horrible in general, i avoid it whenever possible

naive igloo
#

to rust

thick ore
#

we should all switch to C# smh

#

C# is the best

naive igloo
thick ore
naive igloo
#

yes

#

but literally 99.9% libs are windows-only

thick ore
#

dude .net core got released liike 6 years ago

thick ore
#

like

naive igloo
#

but

#

nvm

earnest mica
#

Man I wanna macos compatibility

#

And C#?

naive igloo
#

NO!

earnest mica
#

Light mode in macOS be like: stack_eye

thick ore
#

why do so many people think .net is windows-only?

earnest mica
#

It is not

#

It supports other operating systems as well

#

I'm just concerned that C# is tied to the Windows environment

carmine niche
#

i don't like how old it is

thick ore
#

😭🙏

naive igloo
#

only 14 years old

#

for comparison C is 50 years old

thick ore
#

rust is older than me 🙏🔥

naive igloo
#

tho not by much

abstract marlin
naive igloo
#

i am older than windows 7 >:)

#

ah wait

#

rust is 16 years old

#

*18

#

**19

#

***17

naive igloo
#

@thick ore rust is not 14yo, it is 17yo

thick ore
#

oh cool

naive igloo
#

still older than you i suppose

carmine niche
livid gate
#

do you know where the logos are stored?

royal lakeBOT
#

neofetch line 5524

get_distro_ascii() {```
livid gate
#

wow they got a ton.

jade needle
#

Does anyone have the python discord paste bin link that I can share code ?

royal lakeBOT
#
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 Paste! button in the bottom left, or by pressing CTRL + S. After doing that, you will be navigated to the new paste's page. Copy the URL and post it here so others can see it.

spare oriole
minor moon
#

how do people feel about usage statistics and such in open-source python libraries

  • opt-in v. opt-out (thinking about golang)
  • transparency and privacy (obv. anonymized)
  • how to get value from stats w/o asking for too much
robust zephyr
#

seems like Rustc is getting a lot of positive attention for its approach

#

my personal opinion is that usage stats/telemetry should be opt-in but in practice that seems to be rare

naive igloo
wraith hound
wraith hound
#

cargo doesn't either

naive igloo
#

ok then idk what they meant

#

rustc is just a compiler why would it even need a telemetry ._.

robust zephyr
wraith hound
#

owo esteban proposal?

reef goblet
livid gate
high verge
# livid gate yeah i'm a nerd...

a few things:

  • awesome wallpaper.
  • uptime: 13 days

  • i have never heard of that processor before. as a ryzen 7 shouldnt it be 7700x?
  • is the memory calculated as free/max or as used/max? i find it weird how it says 89% used
#

wow my cpu is underclocked af

#

wth samsung

livid gate
#

memory must be free/max

#

and yeah it willusually be around 90% usage. i keep alot of chrome and sublime tabs.

#

oh wow there's even android neofetch. 😛

#

also ty about the wallpaper. i've got one like that for max, win, and lin.

livid gate
#

basically the breakdown is first digit is generation, second digit 1-4(3),5-6(5),7-9(7) tells if it's entry, midtear, highgrade. dunno if the other two numbers mean anything and then the letter at the end is bonus.

earnest mica
#

Neofetch for you, Linux

livid gate
#

andrew you got one of those M1 things?

grave cove
#

one of the terminals of all time

young shoal
#

🥴

high verge
#

why do mac users post their neofetch output as if it were any different from the others

livid gate
#

also if you check the backscroll i posted my windows and linux newfetches too.

dire totem
#

usually mechanics

#

my aim is good

#

but i believe the main reason is cus i main reyna and jett as a bronze player

earnest mica
#

that looks like the default terminal not iTerm

#

BRuH

earnest mica
spare oriole
livid gate
livid gate
# earnest mica Bc the processors are better for compiling C++ code

he was saying neofetch is kind of pointless on mac since each year's model is identical. they don't have different GPUs, or CPUs, and rarely even different ram and storage. the things neofetch is intended to show off. however as i stated mine actually shows off that they aren't all identical since i'm rocking a 2011 mac mini that lost support in 2016.

livid gate
# spare oriole

well i mean a xeon is a server grade processor innit? and you have double the ram i have. being paired witha xeon it's probably ecc too.. so only your gpu is worse than mine.

livid gate
earnest mica
thick ore
#

lmaoooooooo the biology course outline is wild

#

like

#

the only electron configuration i know is package.json

abstract marlin
stark oasis
#

in the middle of our house our house

#

have you ever heard of this lang? https://en.wikipedia.org/wiki/Malbolge

Malbolge () is a public domain esoteric programming language invented by Ben Olmstead in 1998, named after the eighth circle of hell in Dante's Inferno, the Malebolge. It was specifically designed to be almost impossible to use, via a counter-intuitive 'crazy operation', base-three arithmetic, and self-altering code. It builds on the difficulty ...

lethal glacier
#

Can we play roblax

vital brook
#

So I've been programming for a while, but I dont really have anything to show for it. I feel like my github has barely anything interesting, and I'm never interested in doing like the basic calculator projects, but also the advice I keep hearing is to come up with something original/really unique but I havent been able to think of anything, so I feel my progress has largely stagnated for a while, do you have any advice on how to overcome this?

robust zephyr
vital brook
robust zephyr
#

a few rules that help me:

  • you don't have to "finish" anything
  • work on what is fun to you in the moment
  • it's okay to commit broken code
  • any progress is better than no progress
vital brook
tardy rain
#

There has to be a special place in help for those that create makefiles to call docker-compose

tardy rain
#

dont @ me

young shoal
#

someone i know creates "Make.ps1"s

naive igloo
placid warren
#

@uneven briar

uneven briar
uneven briar
#

I smol want OAuth experience

#

if its working or not...Google OAuth

placid warren
#

im pretty sure im not going to try OAuth

uneven briar
placid warren
#

overall it looks good, some streched images on the login page but other than that everything is good, privacy should be improved

placid warren
#

yea, i wont

#

for obvious privacy concerns

uneven briar
#

is the site really that bad looking?

#

as in sneaky looking?

placid warren
#

it's not about the site

#

you don't have a ToS page

#

so i don't know how my data will be treated

uneven briar
#

...it is present...in the registration section...

#

terms and conditions...in a nice txt file

placid warren
#

how are passwords stored internally?

uneven briar
#

double hashed

#

once on the frontend and once on the backend with sha512

placid warren
#

good.

uneven briar
placid warren
#

the encryption on the backend looks a little bit useless

uneven briar
#

so it will look like this

uneven briar
placid warren
#

are you using a file?

#

oh hell nah

uneven briar
solid elbow
#

lol, I've never seen this offtopic name before.

young shoal
#

deitydork

young shoal
eternal depot
small burrow
#

do the offtopic names change>

solid elbow
#

yep, daily. There's a list that's rotated through

young shoal
#

don't we have a...

#

!otname

#

!off-topic-name

royal lakeBOT
jovial oriole
#

@deitydork

#

Why does the speeling of deity feel wrong

heady hamlet
#

What deitydork

earnest mica
#
class Main  {
  public static void main(String[] args){System.out.println("hello world")}
}
earnest mica
#

main(String[] args)

naive igloo
drowsy rose
#

deitydork lmao

heady hamlet
#

Whats deitydork

#

Dirty dog?

proven ermine
#

Yeah, new feature

#

Doesn’t make me any more likely to use it but still pretty nice

#

Although I think it might allow it without the class?

naive igloo
#

i actually just noticed

#

i wrote println!

#

rust overtakes me

#

fixed.

thick ore
#

why does the game have to tell me this

#

and it's public too

#

across the whole server

gritty zinc
#

public shaming

thick ore
#

100 hours isnt even that much

#

.

#

is it?

naive igloo
#

or is it not a row?

thick ore
#

not in a row

naive igloo
#

oh

#

then it is really nothing

#

i got on space engineers ~150 hours?

#

and i wouldnt say i played a lot of them

heady hamlet
#

have u listened to

#

"don hug me im scared"?

naive igloo
#

nope

heady hamlet
#

u should listen to it

vital brook
#

!off-topic-name

royal lakeBOT
vital brook
#

is it automated? probably but thats pretty cool actually

heady hamlet
#

Itll make channwl glhave name like thst

#

Sadly list channels is mod only

dapper dew
#

The names are changed automatically

vital brook
#

^thats pretty dope

dapper dew
#

But the actual names are created by mods +

#

!src otn

royal lakeBOT
#
Command: otname

Add or list items from the off-topic channel name rotation.

Source Code
vital brook
#

how long is the list by now?

dapper dew
#

One sec

heady hamlet
dapper dew
#

1767 names

vital brook
#

thats a lot actually

wispy sundial
#

@fierce bramble

#

the image

fierce bramble
#

ah

#

that text is very hard for OCR to see

#

it's all differnt sizes and colours

wispy sundial
#

oh you wanted processed

#

this image is cut 4 different parts from it and i have it process gimme me a sec

fierce bramble
#

very good

wispy sundial
fierce bramble
#

i have one massive tip for you my friend

#

scale all incomeing text to the OCR to make sure that the characters are 21 pixels tall

wispy sundial
#

how do i make them 21 pixels tho im scaling the image also wont that do it?

#
# Scaling parameters
            scale_percent = 300 # percent of original size
            width = int(cropped_img.shape[1] * scale_percent / 100)
            height = int(cropped_img.shape[0] * scale_percent / 100)
            dim = (width, height)

            # Resize image
            resized = cv2.resize(cropped_img, dim, interpolation = cv2.INTER_CUBIC)
fierce bramble
fierce bramble
wispy sundial
#

i know i can dilate, erode, add borders, remove noise but not sure if any those will benefit me more or just make it worse. My usual problem is that ocr sometimes just cant detect the space between words

fierce bramble
#

just try scaling them down to like 25%

wispy sundial
#

i heard it has to be 300dpi and i hear its 3000pixels by 3000pixels

fierce bramble
#

well i've never heard that, i looked at a study that had a graph, and 21 pixels tall was peak accuracy for pytesseract

wispy sundial
#

i try to check the text size first

#

@fierce bramble i cant figure it out how to get text size, is it really posible?

fierce bramble
wispy sundial
#

thanks

azure tapir
#

ocr on your own machine?

#

cant you just peek at the memory?

wispy sundial
#

i dont understand what you mean by that but the images a scraped from game

azure tapir
#

i mean you should be able to read the memory directly, and get way more information than whats visible

wispy sundial
#

i still dont understand

azure tapir
#

hook into the games text renderer and just read what its writing, skip the ocr part?

#

or read literally any other data

#

im no expert and its tricky stuff, but cool to know

wispy sundial
#

its multipayer game and i do not own it

#

its like 3rd party helper tool

#

not malicious

azure tapir
#

hmm, idunno if the owners of the game would agree

wispy sundial
#

well there is a tool already that takes data from the game itself and they dont care, and if they care when i take data from image at least i have a good experiencie

#

i know that actual data is 100% accuracy

#

for the future il never try ocr again cuz its hell to make it work

wispy sundial
#

@fierce bramble when i zoom in i can see a lot of those pixels around the text and i think it can be problem too

wispy sundial
#

dont worry

fierce bramble
# wispy sundial <@260369324567560192> i cant figure it out how to get text size, is it really po...

for reference, here is my function:

def ocr(loimage, ltol = 185.62976795499998, lerode = 4.3):
    image = clean_image(loimage, ltol, lerode)
    data = pytesseract.image_to_data(image, config=f'--psm 6 --oem 1', output_type='data.frame')# --tessedit_char_whitelist {char_whitelist}')
    rows = []
    for i in range(len(data)):
        row = data.iloc[i]
        rows.append(row)

    heights = []
    for i in rows:
        h = int(i['height'])
        heights.append(h)

    text_height = most_common_number(heights)

    scaled_image = scale_image(image, text_height)

    data = pytesseract.image_to_string(scaled_image, config=f'--psm 6 --oem 1')#, output_type='data.frame')  # --tessedit_char_whitelist {char_whitelist}')

    return data
#
def scale_image(image, float_value):
    width, height = image.size
    scale_factor = 30 / float_value
    new_width = int(round(width * scale_factor))
    new_height = int(round(height * scale_factor))
    return image.resize((new_width, new_height))
#

also make sure your text is black on white background, i see you already have this but just in case.

wispy sundial
fierce bramble
wispy sundial
#

i run into issues where i dont get a space sometimes

fierce bramble
#

yes i believe that is due to overscaled text

wispy sundial
#

i scaled it a lot lower

fierce bramble
#

use that scale image function

#

and give it the text height

#

it will scale it correctly

wispy sundial
#

so float value is 21?

fierce bramble
#

no

#

float value is just whatever height the text happens to be

#

that function scales it to 30 pixels tall

#

anything around 21-30 is fine

#

also

#
def most_common_number(numbers):
    return Counter(numbers).most_common(1)[0][0]
#

if you needed it lol

wispy sundial
#

what does it do?

fierce bramble
#

returns the most common number from the heights

#

since the heights vary alot, you just want the most common one

wispy sundial
#

btw so how i check the text size since i have to give it to scale it

wispy sundial
#

so these numbers as the arguments should i change em?

fierce bramble
#

what numbers?

wispy sundial
#

in there

def ocr(loimage, ltol = 185.62976795499998, lerode = 4.3):
fierce bramble
#

that's just for the cleaning, you've already done the cleaning, you can skip that

wispy sundial
#

ok so these commemnted out line has any significance if i use em like white list char?

#

@fierce bramble

#

what is counter?

fierce bramble
fierce bramble
#

anyway i'm going to bed

#

it's 5:30 am

wispy sundial
#

yea i did all that

#

am pithink

#

its 10:25 pm

#

what a time difference 😂

#

thanks

solemn tulip
#

theistictwerp

naive igloo
azure tapir
young shoal
#

it's not even a thing

earnest mica
#

Yeah

spare oriole
#

!d collections.Counter

royal lakeBOT
#

class collections.Counter([iterable-or-mapping])```
A [`Counter`](https://docs.python.org/3/library/collections.html#collections.Counter "collections.Counter") is a [`dict`](https://docs.python.org/3/library/stdtypes.html#dict "dict") subclass for counting [hashable](https://docs.python.org/3/glossary.html#term-hashable) objects. It is a collection where elements are stored as dictionary keys and their counts are stored as dictionary values. Counts are allowed to be any integer value including zero or negative counts. The [`Counter`](https://docs.python.org/3/library/collections.html#collections.Counter "collections.Counter") class is similar to bags or multisets in other languages.

Elements are counted from an *iterable* or initialized from another *mapping* (or counter):

```py
>>> c = Counter()                           # a new, empty counter
>>> c = Counter('gallahad')                 # a new counter from an iterable
>>> c = Counter({'red': 4, 'blue': 2})      # a new counter from a mapping
>>> c = Counter(cats=4, dogs=8)             # a new counter from keyword args
naive igloo
royal lakeBOT
#

:incoming_envelope: :ok_hand: applied timeout to @fierce bramble until <t:1691129421:f> (10 minutes) (reason: mentions spam - sent 6 mentions).

The <@&831776746206265384> have been alerted for review.

fierce bramble
#

thanks mods

earnest mica
#

I am currently using light mode.

#

The 💡 💡ing your eyes with 🔥

molten nexus
#

we do a little trolling

knotty cloak
#

Hey, any data engineers here?
I have 1 year experience as a data analyst and I am trying to break into data engineering.
I know python, sql, hadoop, spark and azure(adf, databricks) and aslo basics of airflow.
Is this enough to land a job?

knotty cloak
#

OKay, thanks!

rough sapphire
#

hey guys im kind of sad right now, im a good student and all my grades were A
but there are one professor who is a irresponsible, in 3 months just went 4 times to attend classes and i recive my grade today and it was a C
and sad, because my friends told me just ignore that, but in my last examn i got a 100/100 and i hand all my grades on time

#

i dont know what to do in this moment

#

i texted to the professor but she doesnt text me back

high verge
#

dont talk to the professor, talk to your counselor instead

spare oriole
#

or the head of your program

thick ore
#

throw hands

high verge
#

the chad way

thick ore
#

the only way

dusky tiger
#

There is a heavy thunderstorm outside right now 4 me

#

and in a 5x5km area round my house 25 thunderbolts hit

#

in my town and a city nearby, the main roads were hit by them bolts

barren creek
#

god...just changed router, i had port forwarding setup before for my mc acc server, but this new router somehow has worse software and i cant manage to set it up, anyone willin to call and help?

heady hamlet
#

🎮 ❌
📚 ✅

tulip falcon
#

🥴

grave cove
tulip falcon
heady hamlet
#

🎮 ❌
📚 ✅

thick ore
#
INSERT INTO guilds (guild_id, confession_channel_id)
    VALUES ($1, $2)
    ON CONFLICT (guild_id) DO UPDATE

why does this give me a syntax error

#

postgres btw

#

oh nvm a SET was required after

heady hamlet
tardy rain
foggy jungle
#

!help

cobalt remnant
#

That feeling when you open a help thread, see a glaring mistake, but you can't fix it because the op closed the thread

#

I was probably wrong anyway

abstract marlin
tardy rain
cobalt remnant
#

I'm lucky my Dev team is the wild west

wispy sundial
#

This is how i prepare the image for ocr

# Image path
image_file = "im_bw4.jpg"

# Laoded imgae
img = cv2.imread(image_file)

# Inverted image (not needed for 4.0? fact check it)
inverted_image = cv2.bitwise_not(img)

# Gray scaled image
gray_scaled_image = grayscale(inverted_image)

# Binaryse the image (make it black and white)
thresh, im_bw = cv2.threshold(gray_scaled_image,  128, 255, cv2.THRESH_BINARY)

ocr = get_tesseract_data(dilated_image)

This is the result i get
CRIDmg +15%
ATK +23%
SPD +6
Accuracy +11%

This is what i want
CRI Dmg +15%
ATK +23%
SPD +6
Accuracy +11%

The results are very good but i have no clue why only the text on first line never the space between CRI and DMG occurs. I tried erode, dilate nothing helped

Im showing the preprocess image im using for ocr

#

The gap is clearly there

#

If anybody got clue please help. Else my other option is to remove all spaces and prepare text myself

gritty zinc
wispy sundial
#

thank you but this thing didnt helped

high haven
#

@jaunty wraith quick make up a word

jaunty wraith
#

blarg

high haven
#

well the otn says so

jaunty wraith
#

right, blarg is now a word

wispy sundial
#

dont want to say anything but you guys are weird 😂

acoustic moss
#

thats such a blarg thing to say

naive igloo
#

i can make up words too

#

...otyra

#

betern

#

macupallo

#

jervunero (tho doesnt seem as englishy?)

#

abynios

#

torveas

carmine apex
#

here's yer made up word:
spaceginner
🙂

high haven
#

sorry none of your made up words count

#

only moyen

#

since he has the power

#

of the otn

faint portal
#

whois moyen

naive igloo
grave cove
foggy jungle
#

/whois moyen

faint portal
#

oh man, the IRC days...

foggy jungle
#

cooldoge How to out the old people: make an IRC reference. Bash.org is still regular reading for me.

gritty zinc
#

wow, i haven't thought of bash.org in years

foggy jungle
gritty zinc
#

hmm, doesn't load for me

foggy jungle
#

it was http only the last time I checked.

#

truly a relic of a bygone era

#

ah no it seems to be down again, you're correct.

#

Shame.

#

<erno> hm. I've lost a machine.. literally _lost_. it responds to ping, it works completely, I just can't figure out where in my apartment it is.
Ahh that's the good stuff.

gritty zinc
#

their top200 is still the same as when I was 12 😔

foggy jungle
#

You're 25

#

I don't actually know but for giggles I figured I'd throw it out there in the off chance that I was correct.

gritty zinc
#

for infosec reasons i will not comment

vale raven
#

Granted it was in AWS, not a tiny apartment, but I can relate

grave cove
#

aws moment

vale raven
#

@grave cove did you hear?

grave cove
grave cove
#

unfortunately yes

#

today is a sad day

vale raven
#

Time to use PyCharm like real devs

grave cove
#

nah

#

how else am i supposed to feel superior

thick ore
grave cove
#

i think it wants to revert the first commit

#

i might be mistaken though

thick ore
#

maybe it wants to revert reverting the first commit?

foggy jungle
#

Me accidentally pushing to main instead of my branch.

#

REVERT REVERT REVERT REVERT REVERT REVERT

grave cove
#

rem is the kinda guy to force push to main

thick ore
#

revert is not a real word anymore

foggy jungle
#

I have never force pushed to main.

grave cove
#

you should

#

it would be funny

thick ore
#

git push --force

#

come on... just once

#

imagine the thrill....

grave cove
#

force pushing is handy to fix bad commit messages and stuff

#

but only on your own branch

grave cove
#

sure, git push force after amend

thick osprey
foggy jungle
#

I am my own worst enemy.

thick ore
#

imo force pushing is fine if you're on your own

thick osprey
#

If only...

foggy jungle
#

Would be cool if such a feature existed.

#

Truly, GH should consider adding a thing.

thick osprey
#

Someone should PR that to GH.

foggy jungle
#

I PR'd my first Python related... thing ducky_sphere

thick ore
#

rem contributed to github?

foggy jungle
#

Tis a joyous day. It did absolutely nothing to fix many of the issues, but lazily fixed a single instance of it occuring.

thick ore
#

at least you have something to put on your resume

foggy jungle
#

wym I made a website, I can throw full stack developer on there now right? That's how that works.

thick ore
#

probably

thick osprey
#

"full stack" pishposh. DevOps Developer

thick ore
#

server mainframe... and client.. full stack!

foggy jungle
thick osprey
#

Oh, Devops Engineer! A Dengineer if you will.

foggy jungle
#

Devinops.

#

Opsinev.

#

Yeah no Dengineer works better.

thick ore
#

how about "the kubernetes guy"

young shoal
#

well. you wouldn't revert first

#

you want those commits still dontcha

foggy jungle
#

No, it's self flagellation

#

It's actually the source of my yeeted git files from the other week.

#

I needed to be punished for using Hugo and not a real framework.

thick ore
#

why not

#

smh

#

it's go

foggy jungle
foggy jungle
thick osprey
#

But let me have it explained to me again why commit history is important for job applications. :|

foggy jungle
#

is it important for job applications?

#

I wouldn't think so-- I feel like anyone worth their weight would recognize that it's easily overinflated.

thick osprey
#

According to the last scout I was unfortunately enough to interact with. :)

foggy jungle
#

eugh.

thick osprey
#

Them: That's a lot of holes in your history, what's the story behind them?

foggy jungle
#

Explain the gaps in your resume... and the gaps in your commit history.

#

"Well ya see, I don't get paid to commit to my own repos."

thick osprey
#

Gaps in my resume are easy. Memorize this one:
Them: Can you explain the gaps in your employment?
Me: No. I'm under NDA.

spare oriole
#

"you don't have the neccesary security clearance to view my commits"

foggy jungle
thick osprey
#

I forgots, I can reacts here.

foggy jungle
#

These are truly effective commits.

thick osprey
foggy jungle
#

Hello Ruff, I missed you.

#

turns off rule

thick osprey
#

ruff? Not touched it.

foggy jungle
#

It has a warning for non-declarative docstrings.

#

Honestly, fairly good. I enjoy it. I've made it a part of my general workflow. Enabling all rules is asking for trouble though.

thick osprey
#

I just use the tools ruff shoved into one box. Wasn't a fan of TV + DVD combos either.

foggy jungle
#

heh.

thick osprey
#

"propensity" ... heck, you had the Scrabble dictionary open didn't you?

foggy jungle
#

To preface this before I begin, I have absolutely no idea if other tools (aside from Cmake/make I guess) do this but...
I've recently been using npm to do a lot of the logic behind things like npm run dev npm serve etc.
And it has made me kinda' lean towards trying to implement a similar structure to my pyproject files with poetry.

foggy jungle
#

I was educated to appreciate big words, but not educated enough to know what they mean.
"Haha they use long word, they must be smort."

thick osprey
#

I like the word. It's a good word.

#

I'll never forget the day I used the word "robust" at work and immediately got asked, by my manager, "Robust? That's a rather big word isn't it?"

#

I don't miss working for that donkey.

foggy jungle
#

I got flak for "digress" once.

#

But I'm pretty sure I used the word acquiesce when rephrasing the sentence and they didn't seem to mind it. Language is weird.

#

I think we should go back to grunts.

thick osprey
#

You spell better than I do, that's for sure.

#

The internal method os_exit() will still
cause us to lose our dictionary, but this shouldn't happen in regular use.

I would have a field day with you in an office. Oh my goodness the lack of definitiveness!

#

You've done government work, haven't you?

foggy jungle
#

About 8 years of it amegablobsweats

thick osprey
#

More options than my hedge fund in this wording. /tease

foggy jungle
#

I need to revisit this project with some new and exciting ideas at some point. system audit events are really cool. meow_sip

thick osprey
#

Now that's the fun stuff.

foggy jungle
#

I'm a little project paralyzed lately. A lot of really cool project ideas that require pretty tedious setup and testing environments, and that saps a lot of the energy away from... actually writing the code.

#

I've been meaning to learn Ansible as well, but... setting up an environment to actually effectively test Ansible playbooks is annoying.

thick osprey
#

Automate the testing environment.

foggy jungle
#

Not a terrible idea. I'm still getting my head around the idea of writing tests.

#

I can explain unit/integration testing reasonably succinctly. Writing them is another story entirely.

thick osprey
#

Lissen. If you keep focusing on automating all the things you need to focus on the things you need to focus on.... someone else will write the tests. :3c

foggy jungle
#

But then I don't learn pepehands

#

There's so many things out there to know. Brain is not big enough for it all.

thick osprey
royal lakeBOT
#

tests/watcheremitter_test.py lines 257 to 262

def test_to_oneagent_early_exit(mock_config_false: MagicMock) -> None:
    emitter = WatcherEmitter(mock_config_false)
    with patch.object(emitter, "_emit_lines") as mock_emit:
        emitter.to_oneagent(["empty"])

    assert mock_emit.call_count == 0```
carmine apex
thick osprey
#

I'm just a simple egg who sometimes plays a writer. You expect me to know what I'm typing?

carmine apex
#

that would be nice, yes

thick osprey
#

I'll work on it.

#

In the meantime I'm going to eat dinner and pretent I understand what I wrote down for myself before I fell asleep last night.

G a fallen god on the battle that consumed the land. Trapped by the spell that created that shared dream

Bladed Wing, a forgotten name for the Raven Queen

pithink Okay... this made a lot of sense to past me but they have failed to provide now me with any context for future me to work with.

foggy jungle
#

If you continue this pattern of jotting notes as you nod off, perhaps you can craft a story with a plot line that you don’t know.

thick osprey
#

One of my many notebooks lives next to my bed with a pen physically attached for just that purpose.

#

Basically:

stark oasis
solemn tulip
#

I've gotten better at writing comprehensive tests for some recent stuff, and it has saved me so much mess when refactoring

#

parametrized tests my beloved

stark oasis
#

I regularly have the thought, "If I was good at writing tests this problem wouldn't be back again," but I just fix it and move on. Idk if i will ever learn tbh

solemn tulip
#

"here are curated sets of prefixes, content text and suffixes, test all combinations"

crystal spruce
#

a main reason I'm often too lazy to write tests is because I have to go through stuff by hand a lot first

naive igloo
thick ore
#

dynamically generated tests 🥴

naive igloo
#

that they generate valid tests

thick ore
#

dynamically generate the tests for the dynamic generation of tests

#

easy

stark oasis
#

I would be down to take a course entirely on writing tests, like... the class is, "We have this finished project. It breaks everytime we update it. Our job is to write tests." I would take that class.

tulip falcon
#

Yes we need an entire semester dedicated to PyTest

#

By time you finish school you have learned the basics of python

#

And make it not cost $200,000

#

and less studying, more partying

#

You mean we have to pay and work our ass off?

#

No you pay me

young shoal
stark oasis
#

idk, it's something Ive tried to do, and I just feel like I don't know what to test. When I finish writing tests, I feel like, "Wow I just spent an inordinate amount of time wrtiing that and idek if that was worth doing. Did I test something that even needed to be tested?" Like I said above, the only time writing tests makes sense to me is if I see a bug that Ive fixed multiple times keep coming back.

#

Then it makes sense.

#

I feel like if I could watch someone's YouTube video where they spell out the TDD mentality would maybe help me to grasp how to write good tests that are worth writing.

#

idk

#

Ive basically never walked away from writing a test feeling like anything was accomplished.

#

It feels like I spent too long jumping through hoops that possibly didn't even need jumping through

lament cairn
#

arent there like

#

books and other very good guides

#

on testing

solemn tulip
#

same test cases augmented with a bunch of half-evil prefixes/suffixes

crystal spruce
#

so you do still have to do it by hand?

young shoal
#

automated tests do take some effort to set up at first, but the benefit is that you don't have to manually run them ever again

crystal spruce
#

fair

#

i've done a bit with pytest but nothing substantial

#

so still a bit new to writing tests

young shoal
#

testing is goated

crystal spruce
#

the repo i've been doing the most stuff on is one where i do stuff when i have time

#

which is like once every weekend

#

so it's hard to justify spending the time on writing tests

#

but i am trying

solemn tulip
crystal spruce
#

oh that's a smart way of doing it

heady hamlet
#

i think rust server can be as friendly as this server

naive igloo
stark oasis
# lament cairn arent there like

maybe I should read a book on it. Reading a book on OOP is what made me finally understand that when I was new. Maybe a book would be good.

#

I feel like understanding the concept and benefit of writing tests doesn't necessarily equate to writing good tests, and I think you can be a pretty experienced programmer that never took the time to get good at writing tests.

reef goblet
heady hamlet
#

I dont think in this world there is a person moar friendly than Edd

reef goblet
#

Shenanigans!

#

Hes so friendly

heady hamlet
#

Um pick who to put on the gap

heady hamlet
reef goblet
#

My fav 3 helpers here are shenanigans, robin, and gorian

fathom musk
heady hamlet
#

my fav is public static void ,opalmist, rem , thuriastic , unalivejoy

#

Nou

#

Edd is the best of em

fathom musk
#

Damn, no ned.

heady hamlet
foggy jungle
# grave cove what about me

With the pfp's and the 'R' names, people regularly confuse me with you. Wouldn't surprise me if you were the intended individual in that list.

heady hamlet
#

Oh no

grave cove
#

Based

reef goblet
#

I love you rem as well

grave cove
#

I didn't even see that

reef goblet
#

Aboo is an OG

heady hamlet
#

Huh

#

True

#

Aboo is good

reef goblet
#

And so is ionite

#

I love all the helpers

fathom musk
heady hamlet
jovial oriole
distant palm
#

Hi, is there anyone who knows Javascript and is aware how to use it in web browser games?

grave cove
#

I am also a very nice person

spare oriole
ionic moth
#

what the fawk is going on

#

networking scary me doesn't understand

foggy jungle
ionic moth
#

what is going on

#

that isn't normal is it

#

why is it appending that .in-addr.arpa thing

foggy jungle
#

It's a reverse lookup. You're trying to resolve the host google.com

ionic moth
#

mh

grave cove
ionic moth
#

idk how this works but the .in-addr.arpa wasn't there yesterday

ionic moth
foggy jungle
#

Did you reset your DNS or host files?
Also, coincidentally, I've been having issues with DNS. Interesting that you poke that up here.

#

I am the google cooldoge

ionic moth
#

i did edit the hostname yes

#

lemme take a pic

gritty zinc
foggy jungle
#

Ah yes, ARPA.

ionic moth
#

what

foggy jungle
#

Something cute, note that the IP address in the arpa leaf is backward.

ionic moth
#

so is what's going on normal

foggy jungle
#

Nyes.

ionic moth
#

i

#

mh

foggy jungle
#

It shouldn't happen in a way that's visible to you, but that particular transaction happens... virtually every time you open anything ever, at least for the first time.

ionic moth
#

also it's not only google

#

oh wait

#

i had a spelling error in /etc/hosts pithink

#

127.0.1.1 ArchLinux.localdoman

foggy jungle
#

In computer networks, a reverse DNS lookup or reverse DNS resolution (rDNS) is the querying technique of the Domain Name System (DNS) to determine the domain name associated with an IP address – the reverse of the usual "forward" DNS lookup of an IP address from a domain name. The process of reverse resolving of an IP address uses PTR records. r...

ionic moth
foggy jungle
#

Note IPv4 reverse resolution article.

ionic moth
#

i want to learn sum networking, at least the basics to know my way around but idk where to start tbh

acoustic moss
#

same

ionic moth
#

robin suggested community college courses but we got no community college herw lemon_pensive

foggy jungle
#

I've just kind of accumulated knowledge by reading and watching videos lol.

grave cove
#

we got to fuck around with old ass networking equipment in class

#

👎

acoustic moss
#

🐜 🕙 🇦

ionic moth
#

ant clocka?

grave cove
#

ant 10 a?

carmine apex
#

antenna, probably

foggy jungle
grave cove
#

crash course

#

lol

foggy jungle
#

Frankly, it's not... bad.

grave cove
#

john green my beloved

foggy jungle
#

It's not comprehensive, but if you're coming in with absolutely zero networking background, I think it does a good job of covering some concepts that you'll build off of.

ionic moth
#

someone pinged me

heady hamlet
reef goblet
#

Anyone know about pentesting and grey hat

#

I wanna learn those, but there really aren’t many resources on it

foggy jungle
reef goblet
#

got it

foggy jungle
#

OffSec is more or less the highest quality course provider for red teaming education.

#

They're asking what courses you might be interested in in their catalogue.

#

You're not compelled to reply, and there's plenty of information to sponge up in there.

reef goblet
#

What are those courses?

#

Like, what does each on teach

foggy jungle
#

They're very expensive. If you just want to pick up some cool parlor tricks, start with basic networking, Linux, web vulnerability enumeration, etc.
You can get plenty of practice safely in TryHackMe/HackTheBox.

#

There's also VulnHub (also chiefly maintained by OffSec).

reef goblet
#

Holy shit thats expensive wtf

#

I assume the server is useless without the course?

reef goblet
heady hamlet
#

@grave cove why I feel like u change pfp everyday

#

Huh it's weird

grave cove
#

I have had this profile picture for 4 years

heady hamlet
#

Ur pfp on message n pfp on profile is not similar

grave cove
#

well my real pfp

heady hamlet
#

Probably nitro pfp on server

#

The cat one is nitro pfp on thus server

#

This

#

Server

#

SMH I used grammarly bur still

#

Couldn't fix that issue

grave cove
#

I made my profile picture in like 7th grade in photoshop and it just stuck lol

tulip falcon
#

Based

heady hamlet
#

With it didn't fix my but

heady hamlet
#

I don't think so

reef goblet
#

But i like this one

grave cove
#

my dad was an avid bird watcher when I was born

reef goblet
#

Wow

heady hamlet
#

Huh

#

Um