#awk
Explore tagged Tumblr posts
idontmindifuforgetme · 1 year ago
Text
Guys I realized you can’t compromise quality time on your core interests without compromising your own core self and fading away as a person . Did you know about this
2K notes · View notes
monkey-network · 2 months ago
Text
15 notes · View notes
221bshrlocked · 1 year ago
Text
Could you imagine if by some miracle, that I know won't happen but let me just hope for a second, Wolffe and Ventress cross paths in this show? I'd fucking cackle because that would be the most awkward moment ever.
31 notes · View notes
writerystuff · 10 months ago
Text
A NEW OLD WORD
TIL that "awk" is a word. It means bad or wrong. If "toward" means "the right way," "awkward" means the wrong way!
English is great.
9 notes · View notes
benzeneteen · 1 year ago
Text
yeah dude of course not a problem!! yeah man it's no biggie don't sweat it. (i threw up about it this morning)
25 notes · View notes
bl00dycocainnee · 6 months ago
Text
feels like i got punched in the gut :/
2 notes · View notes
samhears · 2 years ago
Text
Tumblr media
flyer for my upcoming music livstream I was going for a poison swamp from dragon warrior vibe but my sister says it looks like I'm squishing grapes, making da wine
49 notes · View notes
grusik · 1 year ago
Photo
Tumblr media
Terain... by colourourcity
4 notes · View notes
piratesexmachine420 · 2 years ago
Text
fucked up in my room at 4 AM listening to The Mind Electric on loop while I write AWK scripts
2 notes · View notes
21milespastblue · 2 years ago
Text
dr1 trio bodies every trio. dr2 still pretty solid and drv3 trio non existent because who the fuck
Main character trios are meant to end up as a polycule and you can’t change my mind
23K notes · View notes
ghost5twin · 26 days ago
Text
favorite line when I know someone lying… explain it.
0 notes
setokaibapetty · 4 months ago
Text
Monday's Muse: Writing Prompt
Would not want to be named that myself.
1 note · View note
lachich · 5 months ago
Text
*accidentally opens a chat while someone is actively typing*
*literally gasps in horror and closes every app on phone* (except Spotify, obv.)
0 notes
severeharmonyrebel · 5 months ago
Text
1 note · View note
bl00dycocainnee · 5 months ago
Text
the best idea i’ve ever had was to kill myself
0 notes
aoc2015 · 8 months ago
Text
Historian Hysteria
Solutions to Advent of Code 2024 Day 1 in shell.
Part One
Part one can be solved by sorting the two lists of location IDs in the input file, calculating the distance between the location IDs pairwise, and then summing those distances.
Tumblr media
Make two sorted versions of the input file, one sorted by the first column (sort -n -k1) and one sorted by second column (sort -n -k2).
Combine the two sorted files (paste) into a single file. It will have four columns, two from each sorted version of the input file. The first ($1) and fourth ($4) columns are the sorted left and right lists.
Process the combined file row by row (awk) subtracting the lower value from the higher value to calculate the distance, accumulating the distance in the s variable, and printing it after all the rows have been processed (END {print s}).
Part Two
Part two can be solved by generating a frequency table of the location IDs in the right list, joining it with the location IDs in the left list, computing the similarity score row by row, and finally summing the scores.
Tumblr media
Make a file for the sorted location IDs in the left list by sorting the values numerically (sort -n) in the first column (-k1) of the input file. This file only has a single column.
Make another file for the frequency table of the location IDs in the right list by sorting the input file numerically (sort -n) by the second column (-k2) and then counting the unique location IDs (uniq -c) n the second column by skipping the first column (-f 1). This file has three columns: the frequency, the left list, and the sorted right list.
Join the files together relationally by the first column in the first file (join -1 1) and the third column in the second file (-2 3) to get a file consisting of only the location IDs that show up in both the left and right lists with a non-zero frequency.
Process the joined result row by row (awk) computing the similarity score of the location ID in the first column ($1) multiplied by the frequency in the third column ($3), accumulating the scores in s, and finally printing the total of all the scores.
0 notes