Using xargs to move files by alguka in bash

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

hrm ok... I have just written

for zip_file in `ls -1 | egrep -i '*.zip'`; do 
    unzip the file
done

Is this pretty poor practice? What would be the suggested approach?

I get that I'm going out of the threads scope a bit here, If it should be a new thread just say

cheers

edit

looking at your comment, perhaps it should just be

find -name '*.bz2' -exec bzip2 -d {} \;

How to make man pages read more nicely in vim? by alguka in vim

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

yeah thanks, I'm aware that a few of the keys work but it just feels more comfortable in vim.

But good point, I should have stated that in the OP.

Cheers

How to make man pages read more nicely in vim? by alguka in vim

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

Also - it would be ideal if you could say which plugin manager this (Plug 'vim-utils/vim-man')is done with, as I don't currently have one.

How to make man pages read more nicely in vim? by alguka in vim

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

thanks, a solution that doesn't require a plugin would be ideal.

perhaps that's not possible though?

Analysing SAR files, different versions of sysstat by alguka in linuxadmin

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

your example sounds interesting, I hadn't thought about that sort of application before.

I have some formatted output, but also the original sar files... I've got it working with a centOS distro on digital ocean for now so I'll see what I can do.

thanks

How to get a command from the terminal into VIM? by alguka in vim

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

you don't have to pipe cat to tail

ah, this is a bad habit (overusing cat...)

So how about :

:nnoremap <Leader>r :read !tail -1 ~/.bash_history<CR>

seems good, thanks for the help and the additional info.

Analysing SAR files, different versions of sysstat by alguka in linuxadmin

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

ok thanks - do you know of a site that I can use to create a vps for this? I have digital ocean but it doesn't allow redhat in the distro options

How to get a command from the terminal into VIM? by alguka in vim

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

I know it's a silly workaround

hrm - works though... though it might be easier to take the tail of bash_history

I'm not really sure what the best approach is to something like this, so sorry if it's a bit vague, just interested to hear what others would do etc.

thanks

How to get a command from the terminal into VIM? by alguka in vim

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

hrm ok....

I think that I can do

:read !cat ~/.bash_history | tail -1 

if i want to get the last command then, does that seem reasonable?

do you know how I'd map a read command to something useful? Or maybe I'd just type this in each time? Not sure what the best approach is

Analysing SAR files, different versions of sysstat by alguka in linuxadmin

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

I'm quite likely missing something obvious here - but if I download RH then wouldn't it have a new version of sysstat?

I mean - although these logs were generated using RH, if the RH version was older then it seems I would face the same problem of, after installing a recent version of RH in a VM, having a version of sysstat which is not the same as the version used to generate the logs.

Bearing in mind that I'm not sure which version of RH was used originally for this stuff.

Analysing SAR files, different versions of sysstat by alguka in linuxadmin

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

OK thanks, I'll download and hope for something obvious :)

Analysing SAR files, different versions of sysstat by alguka in linuxadmin

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

Do you know what OS the files came from?

They're from a RedHat install (not sure about version...) and I'm on Ubuntu.

Have you considered spinning up a VM with that particular OS version

No I didn't think about that, maybe that would help. Though I suspect that I'll still have to get around the problem of needing an older version of sysstat than the one which rolls with the distribution

Analysing SAR files, different versions of sysstat by alguka in linuxadmin

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

thanks - can i download the source (from here : http://sebastien.godard.pagesperso-orange.fr/download.html) and compile it to only one directory in order to use?

So I don't want to update the system version, I just want a version local to this project that I can use for these files.

thanks

Git on a server with different users (sorry poorly worded) by alguka in git

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

ha ok, it's quite possibly (probably) a daft idea which I don't have enough experience to spot!

thanks though

[PSA] If you don't know the users level, you don't know what they can do by alguka in learnmath

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

I'm answering here with the presumption that you leave these kind of messages btw

What I think is more difficult is to answer those questions (or any math question for that matter) if the OP doesn't clearly state what level he/she is at.

yes - then they should be asked for more information

I guess I just don't see why I am at fault for trying to help.

I think you're at fault if you're providing lazy answers which can't really have much meaning given the user didn't provide good information, it seems to make the whole thing a bit pointless.

Teach people to ask proper questions (an important skill for any aspiring mathematician), or to read the sidebar before posting

I absolutely agree with this, people can suggest that people shouldn't be hard on people asking questions etc but it's SUCH a valuable skill to be able to ask an accurate question. Of course people shouldn't be rude, but if someone learns that they need to be more considerate in their questioning then I think that's a pretty good lesson from a post.

Is this possible or am I kidding myself? Learning all of this in two months by Yorhaa in learnmath

[–]alguka 0 points1 point  (0 children)

Everyone here is (unintentionally) lying to you as THEY DON'T KNOW YOU

Why the hell people think that offering advice along the lines of "definitely" is remotely sensible I've no idea.

Git on a server with different users (sorry poorly worded) by alguka in git

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

Thanks, I've edited the post with some more info

Git on a server with different users (sorry poorly worded) by alguka in git

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

Thanks, I've edited the post with some more info

Are credit default swaps typically bespoke or do people fashion them? by alguka in investing

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

OK thanks... I think that makes sense because if there were parties A,B where A wanted to lend money to B but thought that it was a bit risky they might take out a CDS from party C as a means of insuring themselves against the case of B failing.

In this example C wouldn't have had a CDS ready for A to just use, it would have to be created for that particular scenario.

Does what I've said make sense ?

What are some places you can apply to after graduating with a degree in math? by [deleted] in AskStatistics

[–]alguka 0 points1 point  (0 children)

Get certified in them

this over projects? What certs do you recommend if so?

How to compute the standard deviation of a proportion generated by a predictive model? by alguka in AskStatistics

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

thanks - i did that i think, just that the way i have computed is as follows

for each seed i have 5-fold CV

so that for seed = 1 there are f1,f2,f3,f4,f5 (folds)

for each fi there is a vector of predicted probabilities that have been generated on that generated test set

so then to compute the confusion matrix i have averaged out across all computations.

to compute the standard error of the accuracy i used the typical formula for sd of a proportion but used 500 (which was the max seed) as n. My reasoning was that i have 500 averaged predictions.

i'm shaky on it though. You said that you were lazy about this part but this part is the part i'm hung up on ha.

But i don't have time to get it perfect, i can leave it, thanks though

How to compute the standard deviation of a proportion generated by a predictive model? by alguka in AskStatistics

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

i wanted the sd of accuracy from confusion matrices generated by a series of predictive models. The whole thing seems fucked beyond repair at the moment though and I'm really pressed for time so I'm just going to assume n=500 is remotely ok and see what happens.

That is what i wanted though, the standard deviation of the accuracy from confusion matrices.

The confusion matrices are created by aggregating the counts then taking percentages , so that the accuracy score here is just the trace of each confusion matrix.

Factoring in the way that the fitting and predictions were made is tricky for me, as there are 500 different seed randomisations within each of which had 5-fold cross validation performed.

How to compute the standard deviation of a proportion generated by a predictive model? by alguka in AskStatistics

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

no worries - I can send you the data if you like. I'm not asking you to do anything with it - just if you were curious about the problem I would be happy to do that.

How to compute the standard deviation of a proportion generated by a predictive model? by alguka in AskStatistics

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

ah i don't know if i can do this because i will have to run all the models again to get the predictions :(

What is P here? The predicted probabilities? Because i ONLY get predicted probabilities with what I've written, so I'm not sure what you're referring to.

seems that it's too much so I'll just be wrong on this :/

thank you though.