thanks!
The Big Programming Thread - Page 887
Forum Index > General Forum |
Thread Rules 1. This is not a "do my homework for me" thread. If you have specific questions, ask, but don't post an assignment or homework problem and expect an exact solution. 2. No recruiting for your cockamamie projects (you won't replace facebook with 3 dudes you found on the internet and $20) 3. If you can't articulate why a language is bad, don't start slinging shit about it. Just remember that nothing is worse than making CSS IE6 compatible. 4. Use [code] tags to format code blocks. | ||
Deleted User 3420
24492 Posts
thanks! | ||
Manit0u
Poland17196 Posts
Very interesting presentation for anyone who's into web dev. Edit: Uh, oh! Someone had to have a lot of fun writing that ![]()
| ||
Thaniri
1264 Posts
Anyone have any advice on how to learn this shit as fast as possible? | ||
Deleted User 3420
24492 Posts
gonna upload it if any brave souls are willing to review in a couple hours | ||
Deleted User 3420
24492 Posts
i didn't do the challenge question (yet) http://www.cs.umd.edu/class/summer2017/cmsc351/hwk2.pdf my solutions + Show Spoiler + 1a: n-1 1b: [sum of k=1 to n (sum of i=1 to k: of k-i)] + n-1 eventually after a lot of simplifying and some tricks I had to find online I arrived at 1/6(n-1)n(n+1) 2a: n 2b sum of i=1 to n-1 of i + sum of i=1 to n-2 of i + n-1 after simplifcation = 2n(n-1) 2c: still working on it, having some trouble. I have a formula for a given case i,j where i is the left index and j is the right index, but the problem is I need to generalize it for the average i, j gotta figure out how to do that... but have a pounding headache can I generalize it with the sum of j=2 to n of the sum of i=1 to j-1 of: whatever the rest of my work is and then divide all of that by the total number of combinations [i think n(n-1)/2 ?... yeah, n choose 2] | ||
CecilSunkure
United States2829 Posts
| ||
Manit0u
Poland17196 Posts
On June 08 2017 03:55 Thaniri wrote: Just got a DevOps job starting in September. I've got about 3 months to become a master of Linux/Bash. Company uses Ubuntu so that's what I'm gonna be installing on my PC. Anyone have any advice on how to learn this shit as fast as possible? I don't think you can become master of anything in 3 months... Especially DevOps... I don't want to discourage you but you'll have to acquire a TON of knowledge. It's not just Linux and Bash, you'll most likely need to also know how to set up routers, firewalls (entire network stack basically, from intranet to distributed cloud systems), automated backups, databases, Docker, ssh, LDAP, continuous integration, continuous delivery, high availability, high recoverability and what not. Also, working on servers is quite different than working on desktop in Linux. A good starting point would be setting up another comp that would work as a server and playing around with that. You might also learn some Python/Ruby for scripting purposes and vi/vim because you'll almost exclusively work from a console and you might need a good editor (nano just doesn't cut it in the long run). Here are some books for starters: https://www.amazon.com/Phoenix-Project-DevOps-Helping-Business/dp/0988262592 https://www.amazon.com/DevOps-Handbook-World-Class-Reliability-Organizations/dp/1942788002 https://www.amazon.com/DevOps-2-0-Toolkit-Containerized-Microservices-ebook/dp/B01BJ4V66M https://www.amazon.com/Practical-Vim-Edit-Speed-Thought/dp/1680501275 More resources: https://github.com/Leo-G/DevopsWiki https://www.fullstackpython.com/devops.html I think you should start here: https://github.com/Leo-G/DevopsWiki/wiki/Devops-Interview-Questions Just work the list and educate yourself on each topic. ![]() | ||
Acrofales
Spain17849 Posts
On June 08 2017 08:51 travis wrote: okay i actually don't want to upload my pdfs right now, but I can put what answers I got i didn't do the challenge question (yet) http://www.cs.umd.edu/class/summer2017/cmsc351/hwk2.pdf my solutions + Show Spoiler + 1a: n-1 1b: [sum of k=1 to n (sum of i=1 to k: of k-i)] + n-1 eventually after a lot of simplifying and some tricks I had to find online I arrived at 1/6(n-1)n(n+1) 2a: n 2b sum of i=1 to n-1 of i + sum of i=1 to n-2 of i + n-1 after simplifcation = 2n(n-1) 2c: still working on it, having some trouble. I have a formula for a given case i,j where i is the left index and j is the right index, but the problem is I need to generalize it for the average i, j gotta figure out how to do that... but have a pounding headache can I generalize it with the sum of j=2 to n of the sum of i=1 to j-1 of: whatever the rest of my work is and then divide all of that by the total number of combinations [i think n(n-1)/2 ?... yeah, n choose 2] Your answers seem right. Re 2c: the average case is that they are half a list apart... that should help ![]() | ||
Deleted User 3420
24492 Posts
On June 08 2017 16:58 Acrofales wrote: Your answers seem right. Re 2c: the average case is that they are half a list apart... that should help ![]() You sure? That's not what I found. For example, list {1, 2, 3, 4} There are 3 ways for numbers 1 apart to swap 2 ways for numbers 2 apart to swap 1 way for numbers 3 apart to swap 3+4+3 = 10 10/6 = 5/3 apart, but half a list would be 2 apart even for 3 numbers 1, 2, 3 2 ways 1 apart 1 ways 2 apart =4/3 but half a list is 1.5 I ended up just doing the sum of all left indexes to all possible right index: (j is right index, i is left index, inner sums are using the same idea as 2b) the sum of j=2 to n of: the sum of i=1 to j-1: (the sum of z=i to j-1 of z + the sum of z=i to j-2 of z + (n-1)) this eventually ended up simplifying to 1/6n(n^3+n^2-4n+2) then I divided by that (n choose 2) combinations and was left with (n^3+n^2+4n+2)/(3n-3) which looks about right but I don't know how to possible verify it | ||
Acrofales
Spain17849 Posts
E: and here is a stackoverflow explanation of why. Just replace the integrals with summations, and because your minimum is 1 and not 0, you will get the +1 in there. https://math.stackexchange.com/questions/195245/average-distance-between-random-points-on-a-line | ||
Deleted User 3420
24492 Posts
| ||
Manit0u
Poland17196 Posts
| ||
Thaniri
1264 Posts
It's an entry level job, so I got in on the basis that I know routing/switching, Bash, and programming. I don't want to show up and make a fool of myself though. | ||
Deleted User 3420
24492 Posts
![]() I suppose I'll make a big math thread. | ||
CecilSunkure
United States2829 Posts
| ||
bardtown
England2313 Posts
| ||
Manit0u
Poland17196 Posts
On June 09 2017 07:22 bardtown wrote: I feel like learning a new language, maybe Haskell or Rust, but I can't justify it except as a purely 'for fun' distraction. For game development there's basically no substitute for C++ and for AI/Biology there's nothing as good as Python. Any ideas for a fun project that makes proper use of Haskell's featureset? If you have experience with gamedev in C++ you could try it out in Rust. Easier transition than to Haskell in my opinion and more opportunities to do something that's actually useful outside of purely academic field. If you want to do some AI stuff than you could also go with Lisp or Prolog. | ||
![]()
Liquid`Jinro
Sweden33719 Posts
I'm taking a python course @ edx (python for data science to be specific), and the instructor keeps creating variables named after built in functions (for example: list = [1,2,3], or sorted = np.array(unsorted)). .... I thought this was a very basic "don't do this" thing? Or am I wrong and it's not a big deal at all? | ||
Acrofales
Spain17849 Posts
On June 09 2017 15:08 Liquid`Jinro wrote: OK, I've gotta ask because it's driving me a little insane: I'm taking a python course @ edx (python for data science to be specific), and the instructor keeps creating variables named after built in functions (for example: list = [1,2,3], or sorted = np.array(unsorted)). .... I thought this was a very basic "don't do this" thing? Or am I wrong and it's not a big deal at all? Definitely a big don't do this. It'll work in Python as long as you don't use a reserved word, because of scoping, but it's horrific coding practice. | ||
dsyxelic
United States1417 Posts
say.. for example leetcode/interview-esque problems asking for the future since I feel like there is programming thread -> math thread with a missing 'CS thread' in the middle which would better suit that | ||
| ||