Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000| out.txt | |
| out-sorted.txt | |
| words.txt |
| // zooming squares. by dave | |
| int[][] result; | |
| float t, c; | |
| float ease(float p) { | |
| return 3*p*p - 2*p*p*p; | |
| } | |
| float ease(float p, float g) { |
| % erl -pa /usr/share/elixir/1.0.5/lib/*/ebin -elixir ansi_enabled true | |
| application:ensure_all_started(elixir), | |
| rr("/usr/share/elixir/1.0.5/lib/elixir/src/elixir.hrl"). | |
| % A simplified version of 'Elixir.Code':eval_string/2 | |
| % https://github.com/elixir-lang/elixir/blob/v1.2.0/lib/elixir/lib/code.ex#L159 | |
| EvalString = fun(String, Binding) -> | |
| % Converts a given string (char list) into quote expression | |
| % https://github.com/elixir-lang/elixir/blob/v1.2.0/lib/elixir/src/elixir.erl#L252 |
| defmodule ATGCCount do | |
| def count(sequence), do: cnt(String.to_char_list(sequence),0,0) | |
| def cnt([65|t],at,gc), do: cnt(t,at+1,gc) | |
| def cnt([84|t],at,gc), do: cnt(t,at+1,gc) | |
| def cnt([71|t],at,gc), do: cnt(t,at,gc+1) | |
| def cnt([67|t],at,gc), do: cnt(t,at,gc+1) | |
| def cnt([62|_],at,gc), do: {at,gc} | |
| def cnt([],at,gc), do: {at,gc} | |
| # def cnt(_,0,0), do: {0,0} | |
| def cnt([_|t], at, gc), do: cnt(t,at,gc) |
| test.isFalse(v, msg) | |
| test.isTrue(v, msg) | |
| test.equal(actual, expected, message, not) | |
| test.length(obj, len) | |
| test.include(s, v) | |
| test.isNaN(v, msg) | |
| test.isUndefined(v, msg) | |
| test.isNotNull | |
| test.isNull | |
| test.throws(func) |
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000| <?php | |
| /** | |
| * This is by no means complete, but it's a sketch of an idea I had to create a | |
| * classless functional style framework for PHP. | |
| * | |
| * It might turn out to be something cool! | |
| */ | |
| // This function allows creating a new function from two functions passed into it | |
| function compose(&$f, &$g) { |