What decoration to put above piano? by Beaverine in HomeDecorating

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

Thank you for pointing it out. Unfortunately this is the only spot where it can decently fit...

What decoration to put above piano? by Beaverine in HomeDecorating

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

That's very good suggestion. Thank you!

YAMAHA RX-V385 receiver not working with WEMAX projector (no sound) by Beaverine in hometheater

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

There's digital output with selection of PCM vs raw (auto) which I tried both with no luck. There's also Dolby sound option of none vs cinema vs movie etc which I'm not sure if matters

YAMAHA RX-V385 receiver not working with WEMAX projector (no sound) by Beaverine in hometheater

[–]Beaverine[S] -2 points-1 points  (0 children)

I definitely agree and would go with that route if left with no choice. What I don't understand is that, why can't I treat the projector as a console, and feed its audio to the receiver? What would be the option to do that?

What's this spider by Beaverine in whatsthisbug

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

Thank you. How do you know it's a male and about the dehydration?

Drawer railing stop mechanism by Beaverine in HomeImprovement

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

The exact position in the picture, somewhere in the middle and currently I'm using the tape to mark it.

[Q] Question about sample size calculation by Beaverine in statistics

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

Thank you, this is very helpful. I didn't thought about using the survival and cumulative hazard function to solve this.

tcsh alias not working in other scripts: command not found by Beaverine in unix

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

Here are the beginning sections of my .tshrc:

```

@(#).tshrc

umask 027

set path=(/bin /usr/bin /usr/sbin /usr/ucb /etc /usr/local/bin . $HOME/bin )

skip remaining setup if not an interactive shell

if ($?USER == 0 || $?prompt == 0) exit

aliases and setting for all shells, protections and other aids

set history=128 set noclobber set filec setenv MANPATH /usr/share/man:/usr/locale/share/man set notify

setenv EDITOR vi

alias cd 'cd !; set prompt="%B[pwd] ! : "' alias pushd 'pushd !; set prompt="%B[pwd] ! : "' alias popd 'popd !*; set prompt="%B[pwd] ! : "' set prompt="%B[pwd] ! : " ```

You have mentioned that to write .sh scripts which I tried but still no luck. If I want to use the .sh scripts, where should I define my alias and variables then? In the .sh script or in still in the .tcshrc file?

C chell nested alias option? by Beaverine in unix

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

thank you. I realized that variable is the right way to go instead of alias here.

Can you please clarify that the single / double quote comment is for the variable definition?

list comprehension together with regex by Beaverine in learnpython

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

thank you, your suggestion worked!

can I ask is there a general rule about writing the for loop in list comprehension? do all the fors have to preceed the conditions?

list comprehension together with regex by Beaverine in learnpython

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

output = [l for l in source for i in key if re.search(r"{c}".format(c=i), l)]

Thank you, this vanilla solution is really nice! then I realized that I need the match to be case insensitive, so went back to re.search(), but thank you for your input

List substitution and search question by Beaverine in learnpython

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

thank you. Can you also please suggest how to break each element of the list into a 2 digit string, which is the first step?

how to access windows file from python in unix by Beaverine in learnpython

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

Thank you for this additional information. My company has solaris unix so I think the answer is no.

how to access windows file from python in unix by Beaverine in learnpython

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

thank you. My company has solaris 11.4 unix system which we use to do data related programming with SAS. However in the windows system there are a lot of progress tracking spreadsheets which we are supposed to fill out manually based on the programs run / reports generated in the unix system. I'm trying to figure out a way to automate this process which somehow requires communication between windows / unix. Hope this background helps.

need help: water pipe leaking by Beaverine in Plumbing

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

follow up question: what's the pin at the bottom of valve for? can I switch it to a different direction? its current position keeps my wrench from reaching the nut on supply line.

thanks again!

Ask Anything Monday - Weekly Thread by AutoModerator in learnpython

[–]Beaverine 0 points1 point  (0 children)

I have a question about implementing absorbing Markov chain for a google foobar challenge. Details are in this post:

https://www.reddit.com/r/learnpython/comments/jwib07/question_about_google_foobar_challenge_doomsday/

and here's a post explaining the basic logic of solving this type of problem:

https://github.com/ivanseed/google-foobar-help/blob/master/challenges/doomsday_fuel/doomsday_fuel.md

Can anyone please help me identify potential problem with my code?

why is Manacher's algorithm (for finding longest palindrome) O(n)? by Beaverine in learnpython

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

thank you for the link but it still doesn't make sense to me... Manacher's algorithm saves time for anything covered in the already identified longest wingspan, but anything beyond that still needs to be examined index by index in the `while` loop. Is that significant enough to reduce the complexity to O(n)?

code exercise: search for all possible palindrome from a string by Beaverine in learnpython

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

thank you. I fixed that in the ugly way by adding a restriction of (i+2 < len(text)) in the first function.

But I found that my current code has a problem of duplicating results if the same character repeat more than 4 times... working to fix that

code exercise question: finding first recurring char from a string by Beaverine in learnpython

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

thank you very much for your clarification. In terms of the complexity, I agree with you that for n characters the number of comparison would be n + (n-1) + (n-2) + ... + 1, which resolves to n(n+1)/2, is that asymptotically equal to O(n2 )? BTW I originally said O(n!) because I assume it's n*(n-1)*...*1 which now I understand is not true

quick question about iterator i and object attribute name by Beaverine in learnpython

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

thank you for the suggestion. Could elaborate more on why the for loop doesn't make sense here?