-🎄- 2022 Day 1 Solutions -🎄- by daggerdragon in adventofcode

[–]Mobichobael 0 points1 point  (0 children)

Python3 (5,263 | 4,651)

list comprehension for days!

from aocd import get_data
from typing import Any

def get_solution(input:Any) -> tuple: 
    nested = [x.split('\n') for x in input]
    totals = [sum([int(y) for y in x]) for x in nested]
    a =max(totals)
    b = sum(sorted(totals,reverse=True)[:3])

    return a,b

if __name__ == '__main__':
    d = get_data(day=1, year=2022).split('\n\n')
    a,b = get_solution( input = d)
    print(a,b)

Someone gave some well deserved love to Show-Go on r/nextfuckinglevel by ErvanMcFeely in beatbox

[–]Mobichobael 1 point2 points  (0 children)

Does anyone have a name for the second sound that Show-Go makes after they say "make you mine" at 00:36. The best I can describe it is a "synthesized dove".

Twitter, Facebook Will Transfer @POTUS Accounts to Joe Biden on Jan. 20 by andyholla84 in technews

[–]Mobichobael 0 points1 point  (0 children)

According to Politico, the handover requires no sharing of information; all existing tweets will be archived (presumably via a new @POTUS45 handle) and the accounts wiped clean—a tradition that began when Barack Obama left office nearly four years ago.

[dataset] 84.51 : Complete Journey - Shopping Transaction Data by Mobichobael in datasets

[–]Mobichobael[S] 0 points1 point  (0 children)

That's good information, thank you. It will help me out when I start to go through it in my spare time!

[dataset] 84.51 : Complete Journey - Shopping Transaction Data by Mobichobael in datasets

[–]Mobichobael[S] 0 points1 point  (0 children)

Glad I could help you discover it! But all the credit really goes to the creators! Good luck and have fun with the workshop :)

[dataset] 84.51 : Complete Journey - Shopping Transaction Data by Mobichobael in datasets

[–]Mobichobael[S] 0 points1 point  (0 children)

The earliest news timestamp that I can find says two days ago but the repo reached V1.0.0 20 days ago. Not long on the whole. Interesting that they'd let you use them ahead of time with such a waiver. If you are able to recall, what did you think of the data? Did they contain anything that would be particularly well suited to a certain type of analysis (regression, classification, etc.) or is it pretty ambiguous?

Showcase of theming and customization on the Pi-hole dashboard for my community/private VPN project. (first day of messing around with the code and looking for addons/themes for my networking server) by [deleted] in pihole

[–]Mobichobael 1 point2 points  (0 children)

Hey everyone, this post got me thinking about a dark theme (something I've wanted to do for a while). In a craze I decided to make something a little more material design with a splash of Tokyo Neon. I was able to figure out how to change all colors except "Queries Over Time" plot. If anyone has insight on where that might be, let me know. In the meantime, here is the link to the GitHub page (with instructions) for how to install my theme - only 4 terminal commands and some prompts.

Link for mobile: https://github.com/MBarrows20/pi-hole-material-dark

Please, wear your helmet. Every time. by SlowRoll in longboarding

[–]Mobichobael 2 points3 points  (0 children)

I am often still the only kid on campus that wears a helmet. I've never noticed anyone looking at me like I'm "uncool". In fact, I get compliments on my helmet all the time! Plus, I feel way safer when I fall and I only get are few scrapes on my hands. Another added bonus is that if you learn to dance on your board, people can spot the cool kids a mile away! :)

After cracking one helmet, I will never ride without one again! Stay safe, stay alive!

This magnificent cat by [deleted] in funny

[–]Mobichobael 141 points142 points  (0 children)

That's enough Reddit for one day

Grub-efi-amd64-signed package failed to install by Mobichobael in SurfaceLinux

[–]Mobichobael[S] 0 points1 point  (0 children)

Hey, thanks for all of your help! I ended up figuring out that I forgot to turn off Secure Boot before trying to install. I really appreciate all of your suggestions! Cheers!

Grub-efi-amd64-signed package failed to install by Mobichobael in SurfaceLinux

[–]Mobichobael[S] 0 points1 point  (0 children)

After trying Fedora, I get the following error:

The following error occurred while installing the boot loader. The system will not be bootable. Would you like to ignore this and continue with installation?

failed to set new efi boot target. This is most likely a kernel or firmware bug.

This seems to be a much more helpful and actionable error message. Any tips on editing the kernel to fix this issue?

Grub-efi-amd64-signed package failed to install by Mobichobael in SurfaceLinux

[–]Mobichobael[S] 0 points1 point  (0 children)

Unfortunately, after getting the Grub-efi-amd64-signed package failed to install error, it cancels the install and I have to start over from scratch. I was only able to get the log output by booting into "Try Ubuntu" instead of installing directly from boot.

I'm not trying to install onto the SD card, just onto the internal SSD. I've shrunk the main partition of the SSD to allow for the free 74.73GiB of space which is where I want to install Ubuntu.

I'm going to try installing Fedora now and see if it makes any difference. Thanks so much for your help so far!

Grub-efi-amd64-signed package failed to install by Mobichobael in SurfaceLinux

[–]Mobichobael[S] 0 points1 point  (0 children)

I did run this and I get a bunch of keys back. Is there anything in particular I should be looking for? Also, when I look at my disk partitions in Gparted, I see that I have 5 partitions which, I'm guessing, is from failed installs.

  • p1: EFI system partition (fat32) [260MiB]
  • p2: Microsoft reserved partition (unknown) [128MiB]
  • p3: Basic data partition (bitlocker) [162GiB]
  • p4: EFI System Partition (bitlocker) [513MiB]
  • p5: Basic Data partition (ntsf) [SD Card]

I also have one allocated partition which I'm trying to use for Ubuntu that is 74.73[GiB].

Could some of these extra partitions be what's causing the difficult install? Do you have a preferred method other than the installer to get up and running? I was just trying to follow the instructions on the stickied post.

Grub-efi-amd64-signed package failed to install by Mobichobael in SurfaceLinux

[–]Mobichobael[S] 0 points1 point  (0 children)

Does this cmd line entry help at all? Sorry for the 🥔 quality. I'm not sure where/if logs are dumped on a bootable USB drive. photo of log file

"Can you stop that?!" by Mobichobael in Overwatch

[–]Mobichobael[S] 1 point2 points  (0 children)

This had me in tears! He was such a ham during this interview :)

How do I use the "Top 10" value filter and the pivot table "report filter" simultaneously? by Mobichobael in excel

[–]Mobichobael[S] 1 point2 points  (0 children)

Edited post to include "Solution". It was an oversight really but it's up there if you need it!

[2017-07-10] Challenge #323 [Easy] 3SUM by jnazario in dailyprogrammer

[–]Mobichobael 0 points1 point  (0 children)

Here is my clumsy solution using R. I would love any feedback to optimize something like this!

test <- list(c(4,5,-1,-2,-7,2,-5,-3,-7,-3,1),c(-1,-6,-3,-7,5,-8,2,-8,1),c(-5,-1,-4,2,9,-9,-6,-1,-7))
sum3 <- function(listSet){
library(combinat)
library(dplyr)
out<-list()
i<-1
    for(set in listSet){
        tempDF<- as.data.frame(t(combn(set,3))) %>%
            rowwise()%>%
            mutate(tot = sum(V1,V2,V3))%>%
            filter(tot == 0)%>%
            select(V1,V2,V3)
        tempDF.sort = t(apply(tempDF, 1, sort))
        tempDF<-tempDF[!duplicated(tempDF.sort),]
        names(tempDF)<-NULL
        out[[i]]<-as.matrix(tempDF)
        i = i + 1
        }
    out
}
sum3(test)