Ewanhiggs / csv-game. The CSV Game is a collection of examples of csv parsing programs which have two tests: report the number of fields in a csv file and take the sum of the values in a single column.
Scientific python cheat sheet by IPGP. Pure Python Types a = 2 # integer b = 5.0 # float c = 8.3e5 # exponential d = 1.5 + 0.5j # complex e = 4 > 5 # boolean f = 'word' # string Lists.
Unicode_hack. Vi(m) tip #2: Entering greek/math symbols using vim digraphs « Alec's Web Log. Lately I have been taking computer science/math class notes using vim.
Since typing LaTeX is too cumbersome and not readily intuitive (you have to typeset it). I just use plain text. This is fine until I need to quickly type strange letters/symbols.
Learn You Some Erlang for Great Good! Facebook’s code quality problem. Facebook’s code quality problem tl;dr: It looks like Facebook is getting the textbook results of ignoring code quality.
Facebook has a software quality problem. The Architecture of Open Source Applications. Riak and Erlang/OTP. Riak is a distributed, fault tolerant, open source database that illustrates how to build large scale systems using Erlang/OTP.
Thanks in large part to Erlang's support for massively scalable distributed systems, Riak offers features that are uncommon in databases, such as high-availability and linear scalability of both capacity and throughput. Erlang/OTP provides an ideal platform for developing systems like Riak because it provides inter-node communication, message queues, failure detectors, and client-server abstractions out of the box.
K'th Smallest/Largest Element in Unsorted Array. Given an array and a number k where k is smaller than size of array, we need to find the k’th smallest element in the given array.
It is given that ll array elements are distinct. Examples: We have discussed a similar problem to print k largest elements. Method 1 (Simple Solution) A Simple Solution is to sort the given array using a O(nlogn) sorting algorithm like Merge Sort, Heap Sort, etc and return the element at index k-1 in the sorted array. Mean Shift Clustering Overview. Mean shift clustering is one of my favorite algorithms.
It’s a simple and flexible clustering technique that has several nice advantages over other approaches. In this post I’ll provide an overview of mean shift and discuss some of its strengths and weaknesses. All of the code used in this blog post can be found on github.
Graphs. Tests. Immutable. Becoming a Data Scientist - Curriculum via Metromap - Pragmatic Perspectives. Data Science, Machine Learning, Big Data Analytics, Cognitive Computing …. well all of us have been avalanched with articles, skills demand info graph’s and point of views on these topics (yawn!).
Check out the Places Library of the Google Maps API v3. The Place Autocomplete service is a web service that returns place predictions in response to an HTTP request. The request specifies a textual search string and optional geographic bounds. The service can be used to provide autocomplete functionality for text-based geographic searches, by returning places such as businesses, addresses and points of interest as a user types.
Examples of Mobile Apps using Place Autocomplete The Place Autocomplete service is useful in mobile apps, where you may want to offer users a location-based autocomplete feature. The following images show mobile applications using Place Autocomplete to assist a user in finding a location. Unix Background Queue. For a side-project to be run on a single machine I needed a background queue.
I like self-contained software like sqlite, but I didn’t know of any self-contained background queue. They usually rely on some kind of broker, whether that is Redis or a database. I decided it would be fun to write one! Event loops demystified - Practicing Ruby, Issue 5.3. This issue of Practicing Ruby was contributed by Magnus Holm (@judofyr), a Ruby programmer from Norway. Magnus works on various open source projects (including the Camping web framework), and writes articles over at the timeless repository. Working with network I/O in Ruby is so easy: require 'socket' # Start a server on port 9234server = TCPServer.new('0.0.0.0', 9234) # Wait for incoming connectionswhile io = server.accept io << "HTTP/1.1 200 OK\r\n\r\nHello world!
" io.closeend # Visit in your browser. Boom, a server is up and running! There are several ways to improve this situation, but lately we've seen an influx of event-driven solutions. Why You Should Be Excited About Garbage Collection in Ruby 2.0. You may have heard last week how Innokenty Mihailov’s great Enumerable::Lazy feature was accepted into the Ruby 2.0 code base. But you may not have heard about an even more significant change that was merged into Ruby 2.0 in January: a new algorithm for garbage collection called “Bitmap Marking.” The developer behind this sophisticated and innovative change, Narihiro Nakamura, has been working on this since 2008 at least and also implemented the “Lazy Sweep” garbage collection algorithm already included in Ruby 1.9.3.
The new Bitmap Marking GC algorithm promises to dramatically reduce overall memory consumption by all Ruby processes running on a web server! But what does “bitmap marking” really mean? And exactly why will it reduce memory consumption? Keyboard - How to permanently swap esc and caps lock in xfce / xubuntu? Screencast: Coding Conway’s Game of Life in Ruby the TDD Way with RSpec. Recently, there have been many screencasts of people coding things in real time. Yesterday, Ryan Bigg released a video of him implementing Conway's Game of Life from scratch by reading through the 'rules' and then using RSpec to take a test driven approach to fleshing out the functionality.
Ryan is a Ruby Hero and technical writer best known for being co-author of the recently released Rails 3 in Action (along with Yehuda Katz) which I'll be reviewing soon for Ruby Inside. But Ryan's also been getting into doing a little screencasting: If you can't see the video above, view it directly on Vimeo here. Ryan's technique is just one of many legitimate approaches but many of you will find something to pick up from this, especially if you're not familiar with test driven development or, perhaps, RSpec.
The Nature of Lisp. Monday, May 8, 2006 Introduction When I first stumbled into Lisp advocacy on various corners of the web I was already an experienced programmer. At that point I had grokked what seemed at the time a wide range of programming languages. I was proud to have the usual suspects (C++, Java, C#, etc.) on my service record and was under impression that I knew everything there is to know about programming languages. Submodules. It often happens that while working on one project, you need to use another project from within it. Perhaps it’s a library that a third party developed or that you’re developing separately and using in multiple parent projects. A common issue arises in these scenarios: you want to be able to treat the two projects as separate yet still be able to use one from within the other.
Here’s an example. 5 Ways to Send Email From Linux Command Line - TecAdmin.net. We all know the importance of emails these days for information transfer. Light Table Workflow for Interactive Clojure Development - Safari Blog. A guest post by Timothy Pratley, who currently works for Tideworks Technology as a Development Manager building Traffic Control software for logistics clients including SSA Marine, CSX, and BNSF. Interactive development is a big win. Being able to evaluate snippets of code without building and running your entire project makes it faster to test code. Zsh: 14. Expansion. cURL - Tutorial. How to auto deploy Rails apps after Git push ··· Nico Hagenburger. Rails Rumble Gem Teardown - DwellableTrends. Welcome to the Gem Teardown for the 2014 Rails Rumble. Linux - Detect number of IDLE processors ruby - Stack Overflow.