- twitter: @arun_suresh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Get job properties | |
JOB=nodemanager | |
index=<%= index %> | |
host_suffix=<%= spec.networks.methods(false).grep(/[^=]$/).first.to_s %>.<%= spec.deployment %>.<%= p("global.boshType")%> | |
server=<%= index %>.<%= spec.job.name %>.${host_suffix} | |
yum_repo_server=0.<%= p("global.yum-repo_job") %>.${host_suffix} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-module(ringu). | |
-export([start/2]). | |
start(N, M) -> | |
Pid_0 = self(), | |
statistics(runtime), | |
statistics(wall_clock), | |
Pid = spawn(fun() -> ringu(N, M, self(), Pid_0) end), | |
Pid ! x, | |
receive |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
grid_id(Lat, Long, XMax, YMax) -> | |
{X, Y} = scale(Long, Lat, XMax, YMax), | |
grid_id(X, Y, XMax div 2, YMax div 2, []). | |
grid_id(_, _, X, Y, Val) when (X < 1) andalso (Y < 1)-> | |
list_to_integer(lists:reverse(Val)); | |
grid_id(X, Y, XTh, YTh, Val) when (X > XTh) andalso (Y > YTh) -> | |
grid_id(X - XTh, Y - YTh, XTh div 2, YTh div 2, [$4|Val]); | |
grid_id(X, Y, XTh, YTh, Val) when (X > XTh) andalso (Y =< YTh) -> | |
grid_id(X - XTh, Y, XTh div 2, YTh div 2, [$3|Val]); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-module(grid). | |
-export([grid_id/4]). | |
%% Rather than provide 1000 blocks as input, | |
%% it would be easier to provide a Height and breadth | |
%% of the bounding box.. making it easier to scale | |
grid_id(Lat, Long, XMax, YMax) -> | |
{X, Y} = scale(Lat, Long, XMax, YMax), | |
grid_id(X, Y, XMax div 2, YMax div 2, []). | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/lib/inets/src/ftp/ftp.erl b/lib/inets/src/ftp/ftp.erl | |
index 534fcae..1062c08 100644 | |
--- a/lib/inets/src/ftp/ftp.erl | |
+++ b/lib/inets/src/ftp/ftp.erl | |
@@ -31,11 +31,11 @@ | |
%% API - Client interface | |
-export([cd/2, close/1, delete/2, formaterror/1, | |
lcd/2, lpwd/1, ls/1, ls/2, | |
- mkdir/2, nlist/1, nlist/2, | |
+ mkdir/2, nlist/1, nlist/2, sizeof/2, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ok, TFactory} = | |
thrift_socket_transport:new_transport_factory( | |
phoebus_utils:get_env(thriftfs_hostname, "localhost"), | |
phoebus_utils:get_env(thriftfs_port, 8899), []), | |
{ok, PFactory} = | |
thrift_binary_protocol:new_protocol_factory(TFactory, []), | |
{ok, Protocol} = PFactory(), | |
{ok, Client} = | |
thrift_client:new(Protocol, thriftHadoopFileSystem_thrift), |