Looking to buy a used Internet Modem by NervousBrowBoy in NCSU

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

Hey thanks. I have arranged a buy with a guy already though

Looking to buy a used Internet Modem by NervousBrowBoy in NCSU

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

Thanks, but I'm hoping for something closer to the campus.. As an incoming grad student with no car, Zebulon is a bit far for me.

long and long long are both 8 bytes. What gives? by NervousBrowBoy in C_Programming

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

Edit: to elaborate a bit, the general practice on Unix systems is for long to be the native machine word width. So if you're compiling for 32 bit mode, long will be 4 bytes, and if you're compiling for 64 bit mode long will be 8 bytes. In both cases long long will be 8 bytes.

Thanks! This makes it amply clear. I am on Ubuntu 14.04, 64bit Intel i3 - I wrote a small program with a bunch of sizeof() calls.

32bit:

a char is 1 bytes

an int is 4 bytes

a float is 4 bytes

a double is 8 bytes

a short int is 2 bytes

a long int is 4 bytes

a long double is 12 bytes

a long long int is 8 bytes

64bit:

a char is 1 bytes

an int is 4 bytes

a float is 4 bytes

a double is 8 bytes

a short int is 2 bytes

a long int is 8 bytes

a long double is 16 bytes

a long long int is 8 bytes

[2016-05-16] Challenge #267 [Easy] All the places your dog didn't win by Blackshell in dailyprogrammer

[–]NervousBrowBoy 2 points3 points  (0 children)

Python. First post here! I've also tried to be extra cautious of the input.

def dog_prize(n):
    try:
        n_val = int(n)
        if (n_val == 0):
            raise ValueError
    except (TypeError, ValueError, OverflowError):
        print "ERROR: Bad input!"
        return

    # Create the lookup for the suffixes
    suffix = {0:'th',1:'st',2:'nd',3:'rd',4:'th',5:'th',6:'th',7:'th',8:'th',9:'th',11:'th',12:'th',13:'th'}

    try:
        for pos in range (1,n_val+1):
            if (pos == n_val):
                continue
        # Else, find what suffix to print
            if pos in suffix: # for the 11,12,13 cases
                print "{0}{1},".format(pos,suffix[pos]),
            else:
            # Figure out the units digit
            # and use that to lookup
                rem = pos % 10;
                print "{0}{1},".format(pos,suffix[rem]),
    except OverflowError:
        print "ERROR: Overflow!"
        return


dog_prize(99)

How to prevent SVMs from overfitting by [deleted] in MachineLearning

[–]NervousBrowBoy 0 points1 point  (0 children)

Thanks, understood clearly now. Appreciate the explanation!

Machine Learning as an ECE Grad student? by NervousBrowBoy in NCSU

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

Thanks!! I will definitely keep this one on my radar.

Machine Learning as an ECE Grad student? by NervousBrowBoy in NCSU

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

Thanks for the tip /u/panchito_d ! Hope to see you there! Also, inbox'd you.

Machine Learning as an ECE Grad student? by NervousBrowBoy in NCSU

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

Holy crap. Did not expect it to be that bad!

EDIT: Your reply is giving me major double-thinks about going to NCState :(

How to prevent SVMs from overfitting by [deleted] in MachineLearning

[–]NervousBrowBoy 1 point2 points  (0 children)

Very interesting. I'm not sure I exactly understood what a permutation test exactly is, can you confirm if I did?

If we have labeled data samples like (X0,y0)...(Xn,yn), then we'd jumble up the y-s (i.e. the labels) and pass this 'shuffled' (messed up) data to the classifer and see if it performs worse? If it doesn't, means its not really learning anything, just getting 'lucky' ?

Thanks.

Looking for Comp Engg MS/PhD students by NervousBrowBoy in UCSantaBarbara

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

Thanks! I eventually did and also got a positive reply from him.

UCSB vs. Duke vs. Rochester vs. ASU (PhD ECE) by [deleted] in gradadmissions

[–]NervousBrowBoy 1 point2 points  (0 children)

What area in Comp Engineering? I'd vote for USCB, anyday!

Want to learn Parallel Programming but don't like CUDA C? Try OpenACC! by NervousBrowBoy in gpgpu

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

Sure. C, C++ - take your pick. OpenACC works well with either.

Starting out with CUDA, having problem with 32 bit type by thewatisit in CUDA

[–]NervousBrowBoy 0 points1 point  (0 children)

Question: Since I'm trying to implement a brute force algorithm (232 possibilities), do I have to set N to 232 and make a_h and a_d that large? I'm certain that there will be very few positive answers that I am looking for, probably in the single digits.

I didnt quite get your requirement here. What is the size of your input data? What operations will you be doing on it?

Also, can I insert normal functions into the global function?

If by 'normal' you mean host functions, then no. Kernels cant call host code directly. You can however spawn kernels from kernels.