text:
# MoGrid
A peer-to-peer resource discovery and submission/sharing service for mobile grids

MoGrid is a Mobile Grid Middleware implementation for Windows XP and Linux that is particularly tailored to ad-hoc networks. It implements the P2PDP (P2P Discovery Protocol), which is aimed at efficiently discovering available resources and services, as well as some proprietary protocols for job submission and file sharing.

Technical details about MoGrid architecture and implementation can be found in:

LIMA, L.S.; GOMES, A.T.A.; ZIVIANI, A.; ENDLER, M.; SOARES, L.F.G.; SCHULZE, B.
Peer-to-Peer Resource Discovery in Mobile Grids.
In: International Workshop on Middleware for Grid Computing (MGC),
2005, Grenoble, França.

*and*

GOMES, A. T. A. ; ZIVIANI, A. ; LIMA, L. S. ; ENDLER, M. ; CHELIUS, G.
Mitigating Reply Implosions in Query-based Service Discovery Protocols for Mobile Wireless Ad Hoc Networks.
In: International Conference on AD-HOC Networks & Wireless (AdHoc-NOW),
2008, Sophia Antipolis, França.

*MoGrid Copyright (C) 2005-2006 LNCC - PUC-Rio.*

##Technical requirements

MoGrid requires Java SDK 1.3.x or greater (compliance level).

##Installation on Linux

Let $MOGRID_HOME refer to the directory where MoGrid has been downloaded (e.g.: /usr/MoGrid). Change the permissions of some files and directories in $MOGRID_HOME:
> chmod 744 $MOGRID_HOME/scripts/*

> chmod 744 $MOGRID_HOME/bin/monitor

##Customization of configuration files

Modify the following configuration files under $MOGRID_HOME/conf (see Appendix II for more information about these files):

###MoGridLog4j.xml: (If $MOGRID_HOME=/usr/MoGrid, no changes are needed.)

Either create a symlink from $MOGRID_HOME to /usr/MoGrid,
> ln -s $MOGRID_HOME /usr

*or*

change value of all occurrences of tag \<param name="File"\> in MoGridLog4j.xml to $MOGRID_HOME:
> \<param name="File" value="$MOGRID_HOME/logs/MobileGrid\<log level\>.log"/\>

###DiscoveryProtocol.properties

The P2PDP protocol can use either broadcast or multicast during the resource/service discovery process.  The default configuration is broadcast, using UDP port 50030.  Examples of broadcast and multicast configurations can be found in:

> $MOGRID_HOME/conf/DiscoveryProtocol.properties.broadcast

> $MOGRID_HOME/conf/DiscoveryProtocol.properties.multicast

##Usage

Some testing scripts are provided in the MoGrid.tar archive ($MOGRID_HOME/scripts/). These scripts start the main modules of MoGrid middleware and run a simple testing application that uses the P2PDP protocol as well as a proprietary job submission protocol for performing distributed matrix multiplication.

Modify JAVA_HOME and MOGRID_HOME environment variables in file $MOGRID_HOME/scripts/verifypath.sh (lines 21 and 22)

To start test applications:

1. Run Monitor Service ($MOGRID_HOME/scripts/monitor.sh)
2. Run Initiator ($MOGRID_HOME/scripts/runmatrixInitiator.sh) and Collaborator ($MOGRID_HOME/scripts/runmatrixCollaborator.sh) stand-alone *OR* altogether ($MOGRID_HOME/scripts/runmatrixIni-Collab.sh)

If no arguments are given to these scripts, default values are used. See Appendix I for more information about these scripts and their arguments.

##Contact Us

><EMAIL_ADDRESS>
##APPENDIX I. MoGrid script files

The files in $MOGRID_HOME/scripts provide testing scripts with some arguments that can be customized. If not provided, the arguments take default values, which are shown in the following examples.

### $MOGRID_HOME/scripts/monitor.sh

STARTing MoCA Monitor Service

Usage:
> monitor.sh \<req interval\> \<listener IP Addr\> \<listener port\>

E.g.:
> monitor.sh  10             <IP_ADDRESS>          50000

Where:
> \<request interval\>: time interval (in seconds) to send local context information
> \<listener IP Addr\>: MoGrid listener IP address to send local monitored context information
> \<listener port\>: MoGrid listener port to send local monitored context information

### $MOGRID_HOME/scripts/runmatrixInitiator.sh

STARTing RunMatrix Initiator Application

Usage:
> runmatrixInitiator.sh \<numJobs\> \<request interval\>

E.g.:
> runmatrixInitiator.sh  8         60000

Where:
> \<numJobs\>: number of jobs to be executed
> \<req interval\>: time (in seconds) to send requests (IReq messages)

### $MOGRID_HOME/scripts/runmatrixIni-Collab.sh
STARTing RunMatrix Initiator-Collaborator Application

Usage:
> runmatrixInitiator.sh \<numJobs\> \<req interval\> \<javaPath\>

E.g.:
> runmatrixInitiator.sh  8         60000          $JAVA_HOME/bin

Where:
> \<numJobs\>: number of jobs to be executed

> \<req interval\>: time (in seconds) to send requests (IReq messages)

> \<javaPath\>: directory of java.exe (javaPath is optional, used for APP to run in Collaborator mode too.)

### $MOGRID_HOME/scripts/runmatrixCollaborator.sh

STARTing RunMatrix Collaborator Application

Usage:
> runmatrixCollaborator.sh \<javaPath\>

E.g.:
> runmatrixCollaborator.sh  $JAVA_HOME/bin

Where:
> \<javaPath\>: directory of java.exe

##APPENDIX II. Explanation about files in $MOGRID_HOME/conf

### MoGridLog4j.xml

Log4j logging facility configuration file for MoGrid.

### DiscoveryProtocol.properties:

Configuration file for MoGrid P2P Discovery Protocol

Properties:
> \<coordination.address\>: broadcast or multicast address for P2PDP comunnication channel

> \<coordination.port\>:    P2PDP comunnication channel port

> \<coordination.scan\>:    scan interval in milliseconds for P2PDP comunnication channel listen for new messages

###ContextListener.properties:

Context Listener (CL) configuration file. The CL listen to the monitor service for information about free CPU and memory.

Properties:
> \<monitor.port\>: context listener port

> \<monitor.scan\>: scan interval (in milliseconds) to listener for new monitor service info

repository: atagomes/MoGrid

repo_name: atagomes/MoGrid


text:
# Inkblot

**Note: This is a super early prototype might-not-have-time-energy-to-finish-it project.  Probably don't use it.**

Generate your static site.

## Roadmap

  1. ~~Nested directories.~~
  2. ~~Layouts~~
  3. ~~Includes/underscore files~~
  4. ~~Config~~
  5. ~~Styling/Sass~~
  6. ~~Static files/images?~~
  7. ~~CLI~~
  8. Object model?  Like specify "things" with fields that have default pages/display styles?
  9. Extend that to Posts and Tags at least as the basic "things" supported out of the box.
  10. Plugins
  11. Moar Configuration.
  12. Enable auto-reloading by keeping track of modification time

## Ideas

- Configure sass/scss output style in config?
- Figure out how to do relative pathing for includes?
- There's room for more fancy static file specification (specific files or directories or patterns), but right now, it works by any non-recognized file extension being considered a static file.  And at least now it handles binary files smoothly as well.
- Dev server doesn't reload/find newly created files?

## Contributing

It's early yet, but I'd love contributers!

1. Clone and enter the repo.

```bash
git clone git@github.com:rpalo/inkblot.git
cd inkblot
```

2. Create a virtual environment and activate it (activation must be done every time before working on it).

```bash
python3 -m venv .venv

# In Bash
source .venv/bin/activate
# PowerShell
.venv/Scripts/activate
```

3. Install dependencies.

```bash
pip install -r requirements.txt
pip install -e .
```

And you're ready to go.  To test things out on the example directory, run:

```bash
inkblot build -d example
```

It should build and be amazing.

license: MIT

repository: rpalo/inkblot

branch_name: refs/heads/master

extension: md

gha_language: Python

gha_license_id: MIT

license_type: permissive

repo_name: rpalo/inkblot


text:
---
layout: default
---

# 1996-12-31 - Re: Hardening lists against spam attacks

## Header Data

From: Alan Bostick<EMAIL_ADDRESS>To<EMAIL_ADDRESS>Message Hash: 4254bb6fa176f0e79c6fa11fad4106f6c65f1cf20df237f24e959ffc44745737

Message ID: \<Pine.3.89.9612310958.A19648-0100000@netcom16\>

Reply To<EMAIL_ADDRESS>UTC Datetime: 1996-12-31 17:43:37 UTC

Raw Date: Tue, 31 Dec 1996 09:43:37 -0800 (PST)

## Raw message

```
{% raw  %}From: Alan Bostick<EMAIL_ADDRESS>Date: Tue, 31 Dec 1996 09:43:37 -0800 (PST)
To<EMAIL_ADDRESS>Subject: Re: Hardening lists against spam attacks
In-Reply-To<EMAIL_ADDRESS>Message-ID: <Pine.3.89.9612310958.A19648-0100000@netcom16>
MIME-Version: 1.0
Content-Type: text/plain

On Tue, 31 Dec 1996<EMAIL_ADDRESS>wrote:

> Send a number of unique tokens to each subscriber each day.  Enforce a
> rule that only posts with valid current tokens may be accepted. The
> number of tokens should initially be very small (say, one per day) and
> then should be quickly increased to a sufficient number, like 10 or 20,
> as the subscriber shows a record of using tokens properly (as defined by
> acceptable content rules).
>
> A database is kept as to who was issued which tokens.
>
> If tokens are used improperly (to post off-topic materials) the
> offending subscriber is denied any further tokens.
>
> The problem of this scheme is (besides its cost) that anonymous users
> will not be truly anonymous.

This scheme wouldn't necessarily map True Names to tokens; merely
list subscriptions.  If an account at a nymserver were to subscribe,
there would be no way to identify the account holder.

The real problem is that there could be a lot of subscriptions
from a site like  nymserver.bwalk.com . . . .

Alan Bostick               | I'm not cheating; I'm *winning*!
<EMAIL_ADDRESS>|      Emma Michael Notkin
news:alt.grelb             |
http://www.alumni.caltech.edu/~abostick

{% endraw %}
```

## Thread

+ Return to [December 1996](/archive/1996/12)
+ Return to [January 1997](/archive/1997/01)

+ Return to "[Alan Bostick <abostick@netcom.com>](/authors/alan_bostick_abostick_at_netcom_com_)"
+ Return to "[Bill Frantz <frantz@netcom.com>](/authors/bill_frantz_frantz_at_netcom_com_)"
+ Return to "[Dale Thorn <dthorn@gte.net>](/authors/dale_thorn_dthorn_at_gte_net_)"
+ Return to "[David Molnar <bigdaddy@shell.skylink.net>](/authors/david_molnar_bigdaddy_at_shell_skylink_net_)"
+ Return to<EMAIL_ADDRESS>(Dr.Dimitri Vulis KOTM)](/authors/dlv_at_bwalk_dm_com_dr_dimitri_vulis_kotm_)"
+ Return to "[Eric Murray <ericm@lne.com>](/authors/eric_murray_ericm_at_lne_com_)"
+ Return to "["Frank O'Dwyer" <fod@brd.ie>](/authors/frank_odwyer_fod_at_brd_ie_)"
+ Return to<EMAIL_ADDRESS>(Igor Chudov @ home)](/authors/ichudov_at_algebra_com_igor_chudov__at__home_)"
+ Return to "["Mark M." <markm@voicenet.com>](/authors/mark_m__markm_at_voicenet_com_)"
+ Return to<EMAIL_ADDRESS>(Anonymous)](/authors/nobody_at_replay_com_anonymous_)"
+ Return to "[Ray Arachelian <sunder@brainlink.com>](/authors/ray_arachelian_sunder_at_brainlink_com_)"
+ Return to "[Sandy Sandfort <sandfort@crl.com>](/authors/sandy_sandfort_sandfort_at_crl_com_)"
+ Return to "["Scott V. McGuire" <svmcguir@syr.edu>](/authors/scott_v_mcguire_svmcguir_at_syr_edu_)"
+ Return to "[snow <snow@smoke.suba.com>](/authors/snow_snow_at_smoke_suba_com_)"
+ Return to "[Toto <toto@sk.sympatico.ca>](/authors/toto_toto_at_sk_sympatico_ca_)"
+ Return to "["Z.B." <zachb@netcom.com>](/authors/z_b__zachb_at_netcom_com_)"

+ 1996-12-31 (Mon, 30 Dec 1996 23:01:00 -0800 (PST)) - [Hardening lists against spam attacks](/archive/1996/12/834118d0685fa708dd1a993b0c00423b9a35e142b32f673cb29145c8da41f5d2) - _Bill Frantz<EMAIL_ADDRESS>  + 1996-12-31 (Tue, 31 Dec 1996 00:40:00 -0800 (PST)) - [Re: Hardening lists against spam attacks](/archive/1996/12/fc6f90a948941f09a1561f86ab3c6356f15bd5442b8c76e59cba4346a49f436e) -<EMAIL_ADDRESS>(Igor Chudov @ home)_
    + 1996-12-31 (Tue, 31 Dec 1996 05:29:49 -0800 (PST)) - [Re: Hardening lists against spam attacks](/archive/1996/12/aa4962afec100810337e943f0d0834a6ba22d8912924e0c42bb2ebeb9b059c7a) - _Toto<EMAIL_ADDRESS>      + 1996-12-31 (Tue, 31 Dec 1996 10:31:08 -0800 (PST)) - [Re: Hardening lists against spam attacks](/archive/1996/12/e192cc1c609385d9b7f11db23e5df74518c1c0c984a18fbfbc9db41478899098) -<EMAIL_ADDRESS>(Dr.Dimitri Vulis KOTM)_
    + 1996-12-31 (Tue, 31 Dec 1996 07:10:05 -0800 (PST)) - [Re: Hardening lists against spam attacks](/archive/1996/12/cf09efc39b49d98d8d21c5a94b927382d0b73bab96edba2789473427f6d1adbd) - _Sandy Sandfort<EMAIL_ADDRESS>      + 1996-12-31 (Tue, 31 Dec 1996 09:38:23 -0800 (PST)) - [Re: Hardening lists against spam attacks](/archive/1996/12/672c8ee778bcf53ca1e04505a3ac1b3c12a56be5e25974dee4ba9929af7c2473) - _Ray Arachelian<EMAIL_ADDRESS>    + 1996-12-31 (Tue, 31 Dec 1996 08:14:55 -0800 (PST)) - [Re: Hardening lists against spam attacks](/archive/1996/12/b4d386ce57c623e9a67151cb8e4516572b8d09ddb1cb7b7ebb5e597fe52fb3e1) - _"Mark M."<EMAIL_ADDRESS>    + 1996-12-31 (Tue, 31 Dec 1996 09:43:37 -0800 (PST)) - Re: Hardening lists against spam attacks - _Alan Bostick<EMAIL_ADDRESS>      + 1996-12-31 (Tue, 31 Dec 1996 13:53:26 -0800 (PST)) - [Re: Hardening lists against spam attacks](/archive/1996/12/84cb88674fe7745a7e37658db37ddf10f76af69020b847e2fb0e46b97f6309d7) -<EMAIL_ADDRESS>(Dr.Dimitri Vulis KOTM)_
    + 1996-12-31 (Tue, 31 Dec 1996 09:56:42 -0800 (PST)) - [Re: Hardening lists against spam attacks](/archive/1996/12/4c87d6d22cd6cd51e35bccff8a9d03df22ccaea2e822d9097d8c9979e2cfbadf) - _Dale Thorn<EMAIL_ADDRESS>    + 1996-12-31 (Tue, 31 Dec 1996 10:11:03 -0800 (PST)) - [Re: Hardening lists against spam attacks](/archive/1996/12/8a93a20c930cfa9a24cdb316186b475a1ea93eec9c4ec8ac9dab754668083196) - _Ray Arachelian<EMAIL_ADDRESS>  + 1996-12-31 (Tue, 31 Dec 1996 03:51:19 -0800 (PST)) - [Re: Hardening lists against spam attacks](/archive/1996/12/b652d4c4fb599d75b9732ea2d5e346bc23718db27eb075546609096fc6a2cfa8) - _Toto<EMAIL_ADDRESS>  + 1996-12-31 (Tue, 31 Dec 1996 09:31:59 -0800 (PST)) - [Re: Hardening lists against spam attacks](/archive/1996/12/c58ade7a76516b2a204a8080f2178a7c52d97578439998844f8145cc715c6a42) - _Dale Thorn<EMAIL_ADDRESS>    + 1996-12-31 (Tue, 31 Dec 1996 13:02:16 -0800 (PST)) - [Re: Hardening lists against spam attacks](/archive/1996/12/7800ccdd7b439a8829a453b0902dc586a64b705005dde75da79d4ad6910ce613) - _"Z.B."<EMAIL_ADDRESS>      + 1997-01-01 (Tue, 31 Dec 1996 19:04:24 -0800 (PST)) - [Re: Hardening lists against spam attacks](/archive/1997/01/2b044d1d2b6d66917553d8fff17a8f5cef2edd2354b0e99f451eb0dbc8353521) - _snow<EMAIL_ADDRESS>        + 1997-01-01 (Tue, 31 Dec 1996 23:17:19 -0800 (PST)) - [Re: Hardening lists against spam attacks](/archive/1997/01/a78b7aa2c1bb0b9f271c9610b8116ab18676b52ee4223e11ddfacc07d05927d6) - _David Molnar<EMAIL_ADDRESS>    + 1996-12-31 (Tue, 31 Dec 1996 14:51:19 -0800 (PST)) - [Re: Hardening lists against spam attacks](/archive/1996/12/97a8f5a0eaa1bb8c88e5b3395e57cea2a4c55deec273b06030f5460d2963050b) - _snow<EMAIL_ADDRESS>      + 1997-01-01 (Tue, 31 Dec 1996 18:34:36 -0800 (PST)) - [Re: Hardening lists against spam attacks](/archive/1997/01/7ec77427c5ae5bd1e23c188fe44b1bb72446b2a05f2141bcad51d4a4b5a7e18f) - _Dale Thorn<EMAIL_ADDRESS>      + 1997-01-01 (Tue, 31 Dec 1996 21:42:13 -0800 (PST)) - [Re: Hardening lists against spam attacks](/archive/1997/01/8fce2c87215358f9002673f2ca43c0a4afa3e789f68853311bd640114f771d02) - _"Scott V. McGuire"<EMAIL_ADDRESS>      + 1997-01-02 (Wed, 1 Jan 1997 20:54:20 -0800 (PST)) - [Re: Hardening lists against spam attacks](/archive/1997/01/1379d707a3068af69d67514c56ccb39bbd9c5599ac3f64d2d8c97424fa6a9d1d) - _Bill Frantz<EMAIL_ADDRESS>  + 1997-01-01 (Wed, 1 Jan 1997 13:45:16 -0800 (PST)) - [Re: Hardening lists against spam attacks](/archive/1997/01/fa2e2fbe01ff3178dad3f407387d227d797d16b5e11892a71362b12c1fe3108b) - _Bill Frantz<EMAIL_ADDRESS>    + 1997-01-02 (Wed, 1 Jan 1997 17:00:11 -0800 (PST)) - [Re: Hardening lists against spam attacks](/archive/1997/01/9fbc1623958c61d74049d195048e9b14c241e499134fb63b6308bcc7f94900fa) -<EMAIL_ADDRESS>(Dr.Dimitri Vulis KOTM)_
    + 1997-01-02 (Wed, 1 Jan 1997 20:17:04 -0800 (PST)) - [Re: Hardening lists against spam attacks](/archive/1997/01/622efb5b46b011760f78a31ebade9d268fccdd333fad9d0e71ecb01b0a217436) -<EMAIL_ADDRESS>(Anonymous)_
    + 1997-01-03 (Fri, 3 Jan 1997 12:07:39 -0800 (PST)) - [Re: Hardening lists against spam attacks](/archive/1997/01/6f76f94a0a109563811b99166addc137f193b0646f146b96f0479db611278510) - _"Frank O'Dwyer"<EMAIL_ADDRESS>      + 1997-01-03 (Fri, 3 Jan 1997 14:35:32 -0800 (PST)) - [Re: Hardening lists against spam attacks](/archive/1997/01/fdefacb124132f0e8a09a059d35427da5dc56885251b988165945ae8d6be066b) - _Eric Murray<EMAIL_ADDRESS>        + 1997-01-04 (Fri, 3 Jan 1997 18:04:10 -0800 (PST)) - [Re: Hardening lists against spam attacks](/archive/1997/01/3b489a2e743bb273324fdb7f3b93a47ebb66f61f7a98a2830ae522ad003fc9ac) - _"Frank O'Dwyer"<EMAIL_ADDRESS>      + 1997-01-05 (Sun, 5 Jan 1997 10:05:21 -0800 (PST)) - [Re: Hardening lists against spam attacks](/archive/1997/01/aefea1794b01e685619758e90690352e90ca1a993d462a6caaa6ede24e5c7900) - _Dale Thorn<EMAIL_ADDRESS>


text:
---
layout: post
title:  "Gallery: Tapestry Lighting"
date:   2014-05-29 19:40:00
categories: jekyll rendering arnold
---

In chapter 3.5 of the __Rendering with Radiance__ [book][book] an art
gallery with a small lobby entrance and a showroom is described and
rendered with [Radiance][radiance]. One piece within the showroom is a
__tapestry glass panel__, which is shown below:

In the original Radiance scene the glass panels do not have a
thickness, they are simply made by __flat polygons__:

{% highlight tcsh %}
...
dk_red_g polygon  l1
0
0
12	-3 	-2	-2
	3	-2	-2
	3	-2	-.5
	-3	-2	-.5
...
{% endhighlight %}

The modified Radiance scene in the GitHub [repository][repo] uses
volumes with a __thickness__ (in this case 0.009 units):

{% highlight tcsh %}
...
!genprism dk_red_g l1 4 \
 -3  -2 \
  3  -2 \
	3  -.5 \
 -3  -.5 \
 -l 0 0 .009 | xform -rx 90 -t 0 -2 0
...
{% endhighlight %}

As you can see in the image below the __glass panels__ are arranged in
front of a white plaster and __lit by 4 lights__ to cast __colored
shadows__. Three lights are arranged in a row a little bit further
away and a single light in front of the glass panels:

Each light is modelled as a cylinder with a closed top as the housing
and a __light emitting disk__ with the normals pointing downwards:

To render efficiently in [Arnold][arnold] only a few anti-aliasing
samples were used (__AA_samples__), nodes for the sun&sky simulation
(nodes __physical_sky__ and __skydome_light__) were removed, no
diffuse light bouncing was allowed (__GI\_diffuse\_depth__), and all
other light emitters were turned off, by setting their __standard__
shader __emission__ values to zero:

{% highlight tcsh %}
...
options
{
...
 AA_samples 3
 AA_seed 1
...
 # background "sun_sky"
...
 GI_diffuse_depth 0
...
}
...
polymesh
{
 name MEtypeS4T.d
...
}

mesh_light
{
 name LAtypeS4T_light1
 mesh MEtypeS4T.d
 color 1 1 1
 intensity 5
 samples 3
}
...
standard
{
...
 emission 0 # 1
...
}
{% endhighlight %}

The light emitting disks used already a __polymesh__ instead of a
__disk__ primitive, but to control the __samples__ for each light we
had to use a __mesh_light__ instead of the __standard__ shader with
__emission__.

To achieve a good quality (and a relative short render time) for the
500x500 image shown above we used another trick by rendering __four
images__ in 2000x2000 resolution with different seed values
(__AA_seed__), e.g. values from 1 to 4, and mixing the resulting
images before scaling the final image down to 500x500. Here is the
relevant part of a __Makefile__ to achieve this:

{% highlight basemake %}
...
# art_gallery_04

art_gallery_04.ass: art_gallery_04.patch
	patch art_gallery.ass -i art_gallery_04.patch -o art_gallery_04.ass

art_gallery_04.exr: \
art_gallery_04_seed_1.exr \
art_gallery_04_seed_2.exr \
art_gallery_04_seed_3.exr \
art_gallery_04_seed_4.exr
	echo "TODO: combine seed images into a single one"

art_gallery_04_seed_1.exr: art_gallery_04.ass
	$(KICK) -dp -dw -i art_gallery_04.ass -o art_gallery_04_seed_1.exr \
-set options.AA_seed 1 -r 2000 2000 -v 0

art_gallery_04_seed_2.exr: art_gallery_04.ass
	$(KICK) -dp -dw -i art_gallery_04.ass -o art_gallery_04_seed_2.exr \
-set options.AA_seed 2 -r 2000 2000 -v 0

art_gallery_04_seed_3.exr: art_gallery_04.ass
	$(KICK) -dp -dw -i art_gallery_04.ass -o art_gallery_04_seed_3.exr \
-set options.AA_seed 3 -r 2000 2000 -v 0

art_gallery_04_seed_4.exr: art_gallery_04.ass
	$(KICK) -dp -dw -i art_gallery_04.ass -o art_gallery_04_seed_4.exr \
-set options.AA_seed 4 -r 2000 2000 -v 0
...
{% endhighlight %}

Notice the __syntax__ for overwriting the __resolution__ and one of
the parameter values (__AA_seed__) in the __options__ node from the
command line.

[book]:     http://radsite.lbl.gov/radiance/book/index.html
[radiance]: http://radsite.lbl.gov/radiance
[repo]:     https://github.com/wahn/export_multi
[arnold]:   http://www.solidangle.com

extension: markdown


text:
# norn-demo

This demo can be built and installed the same way as the Norn library.

From this directory, run:

```sh
luarocks make --local
```

… then run the demo code by including the library in the Lua command line:

```sh
lua -l norn.demo
```

repository: jspahrsummers/norn

branch_name: refs/heads/main

repo_name: jspahrsummers/norn


text:
---
tags:
   - Research
   - Compressed Sensing
   - Sparse Representations
   - Compressive Sensing
---

# Research

I am pursuing my Ph.D. from
Indian Institute of Technology, Delhi, India
in Bharti School of Telecommunications.

My research focus is on sparse representations
and compressed sensing.

## Publications

1. Kumar, S., (2021). CR-Sparse: Hardware accelerated functional
   algorithms for sparse signal processing in Python using JAX.
   Journal of Open Source Software, 6(68), 3917,
   https://doi.org/10.21105/joss.03917

## Notes

During the course of study, I have
prepared some notes which have helped
me understand the field better. These
notes are purely draft and for personal
use. They are not published in any
scientific literature. They are being
shared here with the belief that they
might be of some use to other
budding researchers.

All errors and omissions are purely mine.

In case you have any feedback or any
concern regarding these notes, please
write to me [shailesh (at) indigits (dot) com].

## Topics in Signal Processing

This is an online resource for people who want to get
a deeper mathematical background into optimization
algorithms for signal processing.

[Topics in Signal Processing ](https://tisp.indigits.com)

This work includes coverage on:
basic set theory, real analysis, metric spaces,
convex analysis, convex optimization algorithms,
etc..

## Illustrated Compressed Sensing

This is a slightly large set of notes covering the
principles of sparse representations and
compressed sensing. The notes are quite
mathematics oriented and they cover
the derivations of a good variety of
results in the field from a number of
sources.

[Illustrated Compressed Sensing  ](./files/notes_compressed_sensing.pdf)

## References

This is a small bibliography of references
I have prepared during the course of my study.
While this is much smaller than the
list of references at
[Rice Compressive Sensing Resources](http://dsp.rice.edu/cs), there are some specific
features in this document which you might
find useful. It attempts to give a chronological
list of papers around which specific concepts
like spark, coherence, different recovery
algorithms grew over time. There is a detailed
table of contents listing specific concepts
and then a list of papers for each concept.
See for yourself.

[References  ](./files/references.pdf)

If you would want to suggest improvements
to the document, do let me know.


text:
---
title: Copy a long variable from the Console
category: Tip
date: 2021-02-23 22:30:00 +7
layout: layouts/post.njk
topics: DevTools
---

The Chrome DevTools' Console will collapse and split a long variable into smaller ranges. The following screenshot shows how you see `console.log(range)` in the _Console_, where `range` is an array of numbers between 0 and 500.

![long variable in the Console](/assets/img/long-variable-in-console.png)

It's not easy to see the full value or copy the content to clipboard. Here is the tip to do that with ease:

-   In the _Console_, right click the output and click _Store object as global variable_
-   _Console_ creates a temporary variable, `temp1` for example, that holds the variable value
-   Type `temp1 + ''` in the _Console_, and press the _Enter_ key

_Console_ will try to convert the result to `String`. As a result, you get the full content of original variable.

Here is the output which was omitted to fit in the screen:

```js
"0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,...,
490,491,492,493,494,495,496,497,498,499"
```


text:
## Description

<!--  Please explain the object of this PR and the changes you made.
A reference to a github issue would be appreciated. -->

## Pull request type

<!-- Please do not submit updates to dependencies unless it fixes an issue. -->

<!-- Please try to limit your pull request to one type, submit multiple pull requests if needed. -->

Please check the type of change your PR introduces:
- [ ] Bugfix
- [ ] Feature
- [ ] Code style update (formatting, renaming)
- [ ] Refactoring (no functional changes, no api changes)
- [ ] Build related changes
- [ ] Documentation content changes
- [ ] Other (please describe):

### Checklist

- [ ] Linter passes correctly
- [ ] Add tests which fail without the change (if possible)
- [ ] All tests passing
- [ ] Extended the README / documentation, if necessary

## Does this introduce a breaking change?

<!-- If this introduces a breaking change, please describe the impact and migration path for existing applications below. -->

- [ ] Yes
- [ ] No

## Further comments

<!--

repository: ContentSquare/chproxy

gha_language: Go

repo_name: ContentSquare/chproxy


text:
### LudumDare48

## Deep Diver

![](Ludum%20Dare%2048/Cover.png)

https://lilou-cormic.itch.io/deep-diver

Game created by lilou_cormic (www.purplecable.ca) for [Ludum Dare 48 (Apr. 2021)](https://ldjam.com/events/ludum-dare/48/deep-diver-4)
With original music by Joshua McLean (www.mrjoshuamclean.com)

Contains graphics by Kenney (www.kenney.nl)
Licensed under Creative Commons CC0 1.0 Universal

Tools Used
- Unity 2020.3.7f1
- Visual Studio 2017
- FL Studio
- Bfxr


text:
## Refer

> https://stackoverflow.com/questions/54475723/which-is-better-to-get-the-last-x-character-of-a-golang-string

## Result

`getLastRune()` is much better choice.

1. getLastRune() is more than 4-5 times faster.
1. optimization remove allocation from both, but normally converting a string to []rune and back generally requires allocation.

## Benchmark

run benchmark.

```shell
go test -bench . -benchmem
```

```
goos: windows
goarch: amd64
pkg: github.com/guitarrapc/go-lab/stringsLab/sliceString
BenchmarkGetLastRune-8          100000000               22.6 ns/op             0 B/op          0 allocs/op
BenchmarkGetLastRune2-8         20000000               110 ns/op               0 B/op          0 allocs/op
PASS
```

run benchmark without optimization.

```shell
go test -gcflags '-N -l' -bench . -benchmem
```

result.

```
goos: windows
goarch: amd64
pkg: github.com/guitarrapc/go-lab/stringsLab/sliceString
BenchmarkGetLastRune-8          50000000                30.2 ns/op             0 B/op          0 allocs/op
BenchmarkGetLastRune2-8         10000000               133 ns/op              16 B/op          1 allocs/op
PASS
```

repository: guitarrapc/go-lab

repo_name: guitarrapc/go-lab


text:
---
weekly_roundup: true
title: 'Roundup: container tips, smartphone downsides, blockchain,
design & AI, and Crash Bandicoot'
date: '2017-06-30 13:30:00 UTC'
authors:
  - 'Murray Steele'
tags: # (Delete as appropriate)
- Culture

---

## Why Portability is Not the Same Thing as Compatibility - [Charlie E](/people#charlie-egan)

http://crunchtools.com/portability-not-compatibility/

This article has a good discussion about container image / container host
compatibility as well as a good list of questions you might want to
consider when running things in containers on virtual machines.

 The study claims that knowing we have our
smartphone nearby makes us allocate "Working Memory" in case we need to
pay attention to it.

## Design+AI: exploring agency, language, and creativity - [Boris D](/people#boris-divjak)

http://medium.com/design-for-the-network/design-ai-exploring-agency-language-and-creativity-1b6bfdd7050

Interesting thoughts on how design needs to adapt in the age of AI. How
can designer better understand the basics of AI? How does the design
process need to change to design for AI? How can we use AI to enable
human agency and creativity?

## An oral history on Crash Bandicoot - [Elena T](/people#elena-tanasoiu)

https://www.polygon.com/2017/6/22/15820540/crash-bandicoot-an-oral-history

A tale of how Crash Bandicoot was created and how it redefined the
platformer genre.

## Track of the Week - [Tom S](/people#tom-sabin)

We recently watched Moana and this was one of my favourite songs (of many)
from this film. It's worth watching if you've yet to see it!

<iframe width="560" height="315" src="https://www.youtube.com/embed/ubZrAmRxy_M" frameborder="0" allowfullscreen></iframe>

[Lin-Manuel Miranda, Opetaia Foa'i - We Know The Way (From "Moana")](https://www.youtube.com/watch?v=ubZrAmRxy_M)

branch_name: refs/heads/production

gha_language: HTML


text:
## [Keyring](https://developer.hashicorp.com/consul/api-docs/operator/keyring)

| Category                             | Endpoint            | Status
| ------------------------------------ | ------------------- | ------
| List Gossip Encryption Keys          | `/operator/keyring` | ✅
| Add New Gossip Encryption Key        | `/operator/keyring` | ✅
| Change Primary Gossip Encryption Key | `/operator/keyring` | ✅
| Delete Gossip Encryption Key         | `/operator/keyring` | ✅

repository: amenezes/discovery-client

repo_name: amenezes/discovery-client


text:
# Rent a Car Proyect

This is a server containing a REST API to handle our data. It is build using Express.js and for the DB MongoDB with Mongoose as a ORM.

## Instructions
Use the followings
```bash
# To install the dependencies
npm install
cd client && npm install

# To run the server (on localhost:8000)
npm run dev

# To run server on deploy
npm run start

# To run linting tools
npm run lint

```

## App details:
### Technologies:
Back End (server):
 - Node.Js
 - Express.Js
 - MongoDB
 - Mongoose
 - Bcrypt

### Author
Ricardo Bibieca

### Version
1.0.0

### License
This project is licensed under the MIT License

repository: Xhoria-RB/ricardo-rent-car

gha_language: JavaScript

repo_name: Xhoria-RB/ricardo-rent-car


text:
# gha-yarn-cache

#### 1-liner yarn install cache for GitHub Actions

Status and support

- ✔ stable
- ✔ supported
- ✖ no ongoing development

[![CI](/../../workflows/CI/badge.svg?branch=master)](/../../actions)

GitHub Action caches improve build times and reduce network dependencies. However, writing the correct cache logic is [tricky](https://github.com/actions/cache/blob/9ab95382c899bf0953a0c6c1374373fc40456ffe/examples.md#node---yarn). You need to understand how the [cache action](https://github.com/actions/cache) (keys and restore keys) work. Did you know you're not supposed to cache the `node_modules` folder? The setup is different per OS and takes a lot of space in your workflows. Not anymore!

`gha-yarn-cache` is a simple 1-liner that covers all use-cases, correctly:
- Caches the Yarn cache directory instead of `node-modules` [as recommended](https://github.com/actions/cache/blob/9ab95382c899bf0953a0c6c1374373fc40456ffe/examples.md#node---yarn)
- Works on Ubuntu, MacOS and Windows
- Restore keys take the OS into account [as recommended](https://github.com/actions/cache/blob/9ab95382c899bf0953a0c6c1374373fc40456ffe/examples.md#node---yarn)
- Builds on the [native cache functionality of GitHub Actions](https://github.com/actions/toolkit/tree/master/packages/cache), same as [v2 of the generic cache action](https://github.com/actions/cache/issues/55#issuecomment-629433225)

## Usage

Add this step before `yarn install`:
```yml
uses: c-hive/gha-yarn-cache@v2
```

For example:

`.github/workflows/ci.yml`
```yml
name: CI

on: [push]

jobs:
  lint:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v1

    - uses: c-hive/gha-yarn-cache@v2
      # with:
        # directory: server # Optional, speficy the folder of yarn.lock if not in the root directory

    - name: Install JS dependencies
      run: yarn install
    - name: Test
      run: yarn test
```

### Solution comparison

[Native](https://github.com/actions/cache/blob/9ab95382c899bf0953a0c6c1374373fc40456ffe/examples.md#node---yarn)
```yml
- name: Get yarn cache directory path
  id: yarn-cache-dir-path
  run: echo "::set-output name=dir::$(yarn cache dir)"

- uses: actions/cache@v1
  id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
  with:
    path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
    key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
    restore-keys: |
      ${{ runner.os }}-yarn-
```

`gha-yarn-cache`
```yml
- uses: c-hive/gha-yarn-cache@v2
```

## Conventions

This project follows [C-Hive guides](https://github.com/c-hive/guides) for code style, way of working and other development concerns.

## License

The project is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).

repository: iheartradio/gha-yarn-cache

repo_name: iheartradio/gha-yarn-cache


text:
ZF2 Privat24 ![Alt text](https://api.privatbank.ua/p24api/img/privat.png "PrivatBank")
============
PrivatBank online transactions by Privat24 Merchant

To use this service you must be connected to the Privat24 Merchant http://privat24.ua
Then add your store setup verify password and get the Merchant ID.
Customize Merchant, set a credit card for payment and so.
Note the form, do not need to edit! All settings have already been made in the module.
--------------------------------------

Require PHP 5.4+

Configurations :

1. That needs to be done is adding it to your application's list of active modules. Add module "Privat24" in your application.config.php

2. Change configurations in module.config.php

3. Call pay form using route http://yourdomain.dev/privat24 or use a partial helper from view
```php
<?php  echo $this->formPrivate24(new \Privat24\Form\Privat24Form($config['array'], $order['array'])); // for setup see module.config.php ?>
```
--------------------------------------
In order to start using the module clone the repo in your vendor directory or add it as a submodule if you're already using git for your project:

    git clone https://github.com/stanislav-web/ZF2-Privat24.git vendor/Privat24
    or
    git submodule add     git clone https://github.com/stanislav-web/ZF2-Privat24.git vendor/Privat24

The module will also be available as a Composer package soon.


text:
---
layout: page
title: Linear and Nonlinear Classification
tagline:
categories: machine-learning linear classification
---
{% include JB/setup %}

#### Linear Classification

Basic:

1. One class at a Time
2. Combine Binary Classifiers

Improve:

1. One class at a Time
2. **Soft** combine Binary Classifiers

Enhance:

1. **Sum of all the probability equal 1**
2. One class at a Time
3. Soft combine Classifiers

One versus

1. **Two class** at a time compare
2. Combine **Pairwise** Classifiers

---

#### Nonlinear Classification

Circular Separable:

- Equtation:
$$
    h(x) = sign(r \ -1 \cdot x_1^2 -1 \cdot x_2^2)  \\
    h(x) = sign(r \cdot 1 + \ (-1) \cdot x_1^2 + (-1) \cdot x_2^2) \\
    h(x) = sign(w_0z_0 + w_1z_1 + w_2z_2) \\
    h(x) = sign(w^Tz)
$$
- **特征的换：可以把一个平面内的点与圆半径的距离映射到向量空间中去.**
- Linear hypotheses in Z-space: circle, ellipse, hyperbola, constant


text:
0.1.1
====
 - Fixed a bug that was preventing the display of the correct error
   message when using `MakeLabel` on a non-`case` object

0.1
====
 - First release.

repository: thatfulvioguy/eidos

repo_name: thatfulvioguy/eidos


text:
# esentutl

## Description

### MITRE Description

> [esentutl](https://attack.mitre.org/software/S0404) is a command-line tool that provides database utilities for the Windows Extensible Storage Engine.(Citation: Microsoft Esentutl)

## Aliases

```
esentutl
esentutl.exe
```

## Additional Attributes

* Type: tool
* Wiki: https://attack.mitre.org/software/S0404

# Techniques

* [Remote File Copy](../techniques/Remote-File-Copy.md)

* [NTFS File Attributes](../techniques/NTFS-File-Attributes.md)

* [Credential Dumping](../techniques/Credential-Dumping.md)

# Actors

* [menuPass](../actors/menuPass.md)


text:
# Confidences ZendMixpanel

[![Build Status](https://travis-ci.org/ConfidencesApp/zend-mixpanel.svg?branch=master)](https://travis-ci.org/ConfidencesApp/zend-mixpanel)
[![Latest Stable Version](https://poser.pugx.org/ConfidencesApp/zend-mixpanel/v/stable)](https://packagist.org/packages/ConfidencesApp/zend-mixpanel)
[![License](https://poser.pugx.org/ConfidencesApp/zend-mixpanel/license.svg)](https://packagist.org/packages/ConfidencesApp/zend-mixpanel)
[![Code Coverage](https://coveralls.io/repos/ConfidencesApp/zend-mixpanel/badge.svg?branch=master)](https://coveralls.io/r/ConfidencesApp/zend-mixpanel?branch=master)

A Zend Framework 3 module that lets you to use the Mixpanel service.

#Installation

This module is available on [Github](https://github.com/ConfidencesApp/zend-mixpanel).
In your project's `composer.json` use:

    {
        "require": {
            "confidencesapp/zend-mixpanel": "dev-master"
    }

Run `php composer.phar update` to download it into your vendor folder and setup autoloading.

Now copy `zend-mixpanel.local.php.dist` to `yourapp/config/autoload/zend-mixpanel.local.php` and add your Mixpanel Acces Token and App ID.

Add `Confidences\ZendMixpanel` to the modules array in your `application.config.php`, preferably as the first module.

That's it. There's nothing more you need to do, everything works at that stage.

repository: ConfidencesApp/zend-mixpanel

repo_name: ConfidencesApp/zend-mixpanel


text:
[ ![Download](https://api.bintray.com/packages/appinsights-android/maven/ApplicationInsights-Android/images/download.svg) ](https://bintray.com/appinsights-android/maven/ApplicationInsights-Android/_latestVersion)

# Application Insights for Android (1.0-Beta.1)

This project provides an Android SDK for Application Insights. [Application Insights](http://azure.microsoft.com/en-us/services/application-insights/) is a service that allows developers to keep their applications available, performing, and succeeding. This module allows you to send telemetry of various kinds (events, traces, exceptions, etc.) to the Application Insights service where your data can be visualized in the Azure Portal.

The minimum SDK to use the Application Insights SDK in your app is 9.

Automatic collection of lifecycle-events requires API level 15 and up (Ice Cream Sandwich+).

**Release Notes**

* Renamed umbrella class for setting up and starting the SDK to ```ApplicationInsights```
* Developer Mode for improved logging and shorter default interval and batch size for sending telemetry
* Exception tracking and telemetry are now enabled by default
* Source compatibility with Java 6
* Performance improvements and bug fixes

**Breaking Changes**

* **[1.0-Beta.1]** Setup and start of the Application Insights SDK are now done using the new umbrella class `ApplicationInsights` instead of `AppInsights `
* **[1.0-Alpha.5]** Setup and start of the Application Insights SDK are now done using the new umbrella class `AppInsights` instead of `TelemetryClient`

## Setup ##

**Add a compile dependency for the SDK**

Per-module

```java
dependencies {
    compile 'com.microsoft.azure:applicationinsights-android:+'
}
```

**Configure the instrumentation key and add permissions**

Please see the "[Getting an Application Insights Instrumentation Key](https://github.com/Microsoft/ApplicationInsights-Home/wiki#getting-an-application-insights-instrumentation-key)" section of the wiki for more information on acquiring a key.

Plase add the two permissions for `INTERNET` and `ACCESS_NETWORK_STATE` into your app's `AndroidManifest.xml` as well as the property for your instrumentation key as follows. Replace `${AI_INSTRUMENTATION_KEY}` with your instrumentation key or the variable leave it and use gradle.properties to set it.

```xml
<manifest>
    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />

    <application>
        <meta-data
            android:name="com.microsoft.applicationinsights.instrumentationKey"
            android:value="${AI_INSTRUMENTATION_KEY}" />
    </application>
</manifest>
```

**Optional: load instrumentation key from gradle**

~/.gradle/gradle.properties

```java
ai_instrumentation_key=<KEY_PLACEHOLDER>
```

Top-level gradle build file

```java
android {
    buildTypes {
        all {
            manifestPlaceholders = [AI_INSTRUMENTATION_KEY: ai_instrumentation_key]
        }
    }
}
```

**Optional: set instrumentation key in code**

It is also possible to set the instrumentation key of your app in code. This will override the one you might have set in your gradle or manifest file. Setting the instrumentation key programmatically can be done while setting up Application Insights:

```java
ApplicationInsights.setup(this, "<YOUR-IKEY-GOES-HERE>");
ApplicationInsights.start();
```

## Usage ##

Add the following import to your apps root activity

```java
import com.microsoft.applicationinsights.TelemetryClient;
```

And add
```java
ApplicationInsights.setup(this);
ApplicationInsights.start();
```

in the activity's `onCreate`-callback.

A typicall onCreate-method looks like this.

```java
public class MyActivity extends Activity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {

        ApplicationInsights.setup(this);
        //... other initialization code ...//
        ApplicationInsights.start();

        // track telemetry data
        TelemetryClient client = TelemetryClient.getInstance();
        HashMap<String, String> properties = new HashMap<String, String>();
        properties.put("property1", "my custom property");
        client.trackEvent("sample event", properties);
        client.trackTrace("sample trace");
        client.trackMetric("sample metric", 3);
    }
}
```

## Automatic collection of life-cycle events ##

This only works in Android SDK version 15 and up (Ice Cream Sandwich+) and is enabled by default.
If you want to **Disable** automatic collection of life-cycle events call ```setAutoCollectionDisabled``` inbetween setup and start of Application Insights.

```java
	ApplicationInsights.setup(this); //setup

	ApplicationInsights.setAutoCollectionDisabled(true); //disable the auto-collection

	ApplicationInsights.start(); //start
```

## Documentation ##

[http://microsoft.github.io/ApplicationInsights-Android/]()

## Contributing ##

**Development environment**

* Install JDK 1.8
* Install Android studio
* [Get an instrumentation key](/Microsoft/ApplicationInsights-Home/wiki#getting-an-application-insights-instrumentation-key) and set it in the manifest
* Run tests from android studio

repository: pombreda/ApplicationInsights-Android

repo_name: pombreda/ApplicationInsights-Android


text:
# angularbknd-sdk
Backand SDK for Angular

Install:
`npm install`
`bower install`

Build:
`grunt`

Register on bower (only once at first time - done):
`bower register angularbknd-sdk https://github.com/backand/angularbknd-sdk.git`

To upgrade version:

1. Update the code of `backand.js`
2. Update the `bower.json` version
  * Check dependencies versions, if need to be upgraded
  * minor releases for bug fixes
  * major releases for changes in the API signature
3. Update the `package.json` version
4. Run `grunt` to build the min files
5.  Tag the commit `git tag -a 1.6.1 -m "Release version 1.6.1"`
7. Push to GitHub `git push origin master --tags`
8. Create new folder in S3 bucket with the name of the version and upload the 2 files
9. Update documentation to point to the new release

repository: willjorey/Project

repo_name: willjorey/Project


text:
# Events
You can attach handlers to the following lifecycle events.

## Player Join
```javascript
kapow.on('player_join', function(player) {
  var room = kapow.getRoom();
  var countOfAcceptedPlayers = 0;
  room.players.forEach(function(player) {
    if (player.affiliation == "accepted") {
      countOfAcceptedPlayers++;
    }
  });
  if (countOfAcceptedPlayers == EXPECTED_COUNT_OF_PLAYERS) {
    startGame(room);
  }
});
```
Published when a new/invited player joins/accepts an invitation to the room.

## Player Leave
```javascript
kapow.on('player_leave', function(player) {
  var room = kapow.getRoom();
  var countOfAcceptedPlayers = 0;
  room.players.forEach(function(player) {
    if (player.affiliation == "accepted") {
      countOfAcceptedPlayers++;
    }
  });
  if (countOfAcceptedPlayers != EXPECTED_COUNT_OF_PLAYERS) {
    endGame(room);
  }
});
```
Called when an existing player leaves.

## Invite Reject
```javascript
kapow.on('invite_reject', function(player) {
  var room = kapow.getRoom();
  doStuffOnInviteRejected(player, room);
});
```
Called when an invited player rejects the invite.

repository: manumeral/documentation

repo_name: manumeral/documentation


text:
# Serverless Starter - AWS Lambda in TypeScript

This sample uses the [Serverless Application Framework](https://serverless.com/) to implement an AWS Lambda function in TypeScript, deploy it via CloudFormation, and publish it through API Gateway.

## All new Serverless projects should fork this repository by click [here](https://bitbucket.org/tapendium/serverless-starter/fork)

- Change the owner to Tapendium and select the relevant project

[![serverless](http://public.serverless.com/badges/v3.svg)](http://www.serverless.com)
[![CircleCI](https://circleci.com/bb/tapendium/serverless-starter.svg?style=svg&circle-token=fc16fc71250f88b125e4362f0e63af2646a7e2f7)](https://circleci.com/bb/tapendium/serverless-starter)
[![Swagger Validator](https://img.shields.io/swagger/valid/2.0/https/serverless-sample.balassy.me/api/swagger.json.svg)](https://app.swaggerhub.com/apis/balassy/serverless-sample)

[![Known Vulnerabilities](https://snyk.io/test/github/balassy/aws-lambda-typescript/badge.svg?targetFile=package.json)](https://snyk.io/test/github/balassy/aws-lambda-typescript?targetFile=package.json)
[![Dependencies](https://david-dm.org/balassy/aws-lambda-typescript/status.svg)](https://david-dm.org/balassy/aws-lambda-typescript)
[![DevDependencies](https://david-dm.org/balassy/aws-lambda-typescript/dev-status.svg)](https://david-dm.org/balassy/aws-lambda-typescript#type=dev)
[![codebeat badge](https://codebeat.co/badges/b96119c3-6d9b-4a6a-9ffb-1165523a032a)](https://codebeat.co/a/ashley/projects/bitbucket-org-tapendium-serverless-starter-master)
[![Greenkeeper badge](https://badges.greenkeeper.io/balassy/aws-lambda-typescript.svg)](https://greenkeeper.io/)
[![CII Best Practices](https://bestpractices.coreinfrastructure.org/projects/2154/badge)](https://bestpractices.coreinfrastructure.org/projects/2154)

## Features

- Full **[TypeScript](https://www.typescriptlang.org/)** codebase with **strict** type annotation - _get as many compile time errors as possible._
- **Deployment to AWS** from the command line with [Serverless](https://serverless.com/) - _just run an npm script._
- Publishing to your **custom [Route53](https://aws.amazon.com/route53/) domain name** - _for API URLs that live forever._
- **Automated builds and CI** with [Circle CI](https://circleci.com/bb/tapendium/serverless-starter) - _get early feedback for every change_.
- **Offline** execution - _call your endpoints without deploying them to AWS._
- Minimal IAM policy to follow the **principle of least privilege** - _because with great power comes great responsibility_.
- **Code analysis** with [TSLint](https://palantir.github.io/tslint/) and [Codebeat](https://codebeat.co/a/ashley/projects/bitbucket-org-tapendium-serverless-starter-master) - _avoid dumb coding mistakes._
- **Unit testing** with [Mocha](https://mochajs.org/), mocking with [ts-mockito](https://github.com/NagRock/ts-mockito) - _be free to change your implementation._
- Test **coverage report** with [Istanbul](https://istanbul.js.org/) and [Coveralls](https://coveralls.io) - _so you know your weak spots._
- **Integration testing** after release - _to verify your deployment._
- Generated **[Swagger](https://swagger.io/) documentation** for the endpoints, which works well with [SwaggerHub](https://app.swaggerhub.com) - _the expected description of your API._
- Multiple layers in the code to **separate concerns** and independently test them - _avoid monolith and complexity._
- **Health check** endpoints - _to quickly test your service._
- **Dependency checks** and continuous update with [David](https://david-dm.org/), [Greenkeeper](https://greenkeeper.io/) and [Snyk](https://snyk.io)- _because the majority of your app is not your code._
- **[EditorConfig](http://editorconfig.org/)** settings - _for consistent coding styles between different editors._
- Sample CRUD implementation (in progress) - _to see it all in action_.
- Follows Linux Foundation Core Infrastructure Initiative **[Best Practices](https://bestpractices.coreinfrastructure.org/en)** - _for the open source community._

For updates, please check the [CHANGELOG](https://github.com/balassy/aws-lambda-typescript/blob/master/CHANGELOG.md).

## Setup

1. **Install [Node.js](https://nodejs.org).**

2. **Install the [Serverless Application Framework](https://serverless.com/) as a globally available package:**

```bash
npm install serverless -g
```

Verify that Serverless was installed correctly:

```
serverless -v
```

3. **Setup AWS credentials:**

  * Create a new IAM Policy in AWS using the `aws-setup/aws-policy.json` file. Note that the file contains placeholders for your `<account_no>`, `<region>`, `<service_name>`, and `<your_deployment_bucket>`.
  You can replace all those `Resource` ARNs with `*`, if you intentionally don't want to follow the Principle of Least Privilege, but want to avoid permission issues.
  (If you prefer minimal permissions, just like me, you may want to follow [Issue 1439: Narrowing the Serverless IAM Deployment Policy](https://github.com/serverless/serverless/issues/1439). )

  * Create a new IAM User for Programmatic Access only, assign the previously created policy to it, and get the Access Key ID and the Secret Access Key of the user.

  * Save the credentials to the `~/.aws/credentials` file:

  ```bash
  serverless config credentials --provider aws --key YOUR_ACCESS_KEY --secret YOUR_SECRET_KEY
  ```

  _Unfortunately on Windows you will need an Administrator user to run the Serverless CLI._

  You can read more about setting up AWS Credentials on the [AWS - Credentials page](https://serverless.com/framework/docs/providers/aws/guide/credentials/) of the Serverless Guide.

4. **Clone this repository.**

5. **Install the dependencies:**

```bash
npm install
```

6. **Customize the name of your service** by changing the following line in the `serverless.yml` file:

```
service: serverless-starter
```

7. **Customize the name of your domain** by changing the following lines in the `serverless.yml` file:

```
custom:
  customDomain:
    domainName: serverless-starter.tapendium.com.au
    certificateName: "*.tapendium.com.au"
```

**NOTE:** You must have the certificate created in [AWS Certificate Manager](https://aws.amazon.com/certificate-manager/) before executing this command. According to AWS to use an ACM certificate with API Gateway, you must [request or import the certificate](https://serverless.com/blog/serverless-api-gateway-domain/) in the US East (N. Virginia) region.

If you don't want to publish your API to a custom domain, remove the `serverless-domain-manager` from the `plugins` section, and the `customDomains` entry from the `custom` section of the `serverless.yml` file.

**Wild Card Certificate:** Make sure that the wildcard certificate is within double quotes.

## What you can find in the code

### Example CRUD endpoints

This project shows example Lambda function implementations with the following layers (see the `src/cities` folder):

- **Handler**: The handler is the endpoint that is called by AWS when it executes your Lambda. See `cities.ts`.
- **Controller**: The controller is responsible for transforming any operation result to an HTTP response. See `cities.controller.ts`.
- **Service**: The service is responsible for implementing the business logic, and provide the operation result. See `cities.service.ts`.
- **Repository**: The repository is responsible for providing the data for the service. See `cities.repository.ts`.

All layers have unit tests with mocking the underlying layers.

Additional terms:

- **Response**: The HTTP output for an endpoint call. It includes the HTTP status code, the response headers and the response body. The controller is responsible for building the response, using the `ResponseBuilder` helper class.
- **Result**: The outcome of the service call. It can be a success result or an error result.

To understand the code, open `src/cities/cities.ts`, find the `getCity` function and follow the call chain.

### Swagger export

The `src/swagger` folder contains the `/swagger.json` endpoint which exports the documentation of the API in [Swagger](https://swagger.io/) format. Call the endpoint after deploying your API and paste the response JSON into the [Swagger Editor](https://editor.swagger.io) to display it in a friendly way.

You can also reference the `swagger.json` URL when you publish your documentation via [SwaggerHub](https://app.swaggerhub.com), as you can see on the SwaggerHub page of this sample: https://app.swaggerhub.com/apis/balassy/serverless-sample.

### Health check endpoints

The `/health/check` and the `/health/detailed` endpoints in the `src/health` folder are provided to run quick checks on your API after deployment.

## Developer tasks

Frequently used `npm script`s:

| Script name   | Description                                                                                |
|---------------|---------------------------------------------------------------------------------------------------------------------|
| `analyse`     | Runs all code analysis tools, including linters and unit tests.                                                     |
| `deploy`      | Runs all analysis tools, creates the deployment package, installs it on AWS and finally runs the integration tests. |
| `start`       | Runs the service locally, so you can call your API endpoints on http://localhost.                                   |

Additional useful `npm script`s:

| Script name        | Description                                                                                |
|--------------------|---------------------------------------------------------------------------------------------------------------------------------|
| `build`            | Runs all pre-deploy analysis and creates the deployment package, but does not install it onto AWS.                              |
| `clean`            | Removes all tool-generated files and folders (build output, coverage report etc.). Automatically runs as part of other scripts. |
| `deploy:init`      | Creates the domain in Route53. Required to manually execute once.                                                               |
| `lint`             | Runs the static code analyzers. Automatically runs before deployment.                                                           |
| `test`             | Runs the unit tests. Automatically runs before deployment.                                                                      |
| `test:integration` | Runs the integration tests. Automatically runs after deployment.                                                                |

### Test the service locally

**To invoke the Lambda function locally, run:** _This command requires Administrator privileges on Windows!_

```
serverless invoke local --function getCity
```

**To run the service locally, run:** _This command requires Administrator privileges on Windows!_ _OSX users see [here](http://osxdaily.com/2014/04/12/restore-original-hosts-file-mac/)

```bash
npm start
```

This command will not terminate, but will keep running a webserver that you can use to locally test your service. Verify that the service runs perfectly by opening the `http://localhost:3000` URL in your browser. The console window will log your requests.

You can modify your code after running this command, Serverless will automatically recognize the changes and recompile your code.

### Deploy to AWS

**To create a custom domain for your service in AWS, run this command once:** _This command requires Administrator privileges on Windows!_

```bash
npm run deploy:init
```

According to AWS, after this command it may take up to 40 minutes to initialize the domain with a CloudFront distribution. In practice it usually takes about 10 minutes.

**To deploy the service to AWS, run:** _This command requires Administrator privileges on Windows!_

```bash
serverless deploy
```

or you can use the NPM script alias, which is recommended, because it runs the analysers (linter + tests) before deployment, and integration tests after deployment:

```bash
npm run deploy
```

Verify that the deployment is completed successfully by opening the URL displayed in your console window in your browser. To see all resources created in AWS navigate to CloudFormation in the AWS Console and look for the stack named with the name of your service you specified in Step 6.

**To download the Swagger description** of your service, open the following URL in your browser:

```
https://<your_custom_domain_name>/api/swagger.json
```

Note that this endpoint always downloads the Swagger documentation from the live, published API, even if the code is running locally!

If you don't want to deploy your code, just want to peek into the deployment package, you can run:

```bash
npm run build
```

This command is not only an alias to `serverless package`, but also runs all analyzers that the deploy process also runs.

### Run linter

**To check your codebase with TSLint, run:**

```bash
npm run lint
```

The linter automatically checks your code before deployment, so you don't need to run it manually.

### Run unit tests

**To check your code with unit tests, run:**

```
npm test
```

The unit tests are automatically running before deployment, so you don't need to run them manually.

### Run integration tests

**To verify that your deployment completed successfully, run:**

```
npm run test:integration
```

The integration tests are automatically running after deployment, so you don't need to run them manually.

### View the documentation

To view the generated Swagger documentation, deploy your API or start it locally, and then call the `/swagger.json` endpoint.

## Problems?

```
EPERM: operation not permitted, symlink 'C:\Git\serverless-starter\node_modules' -> 'C:\Git\serverless-starter\.build\node_modules'
```

On Windows you need **Administrator privileges** to run `serverless` commands (see [Issue 23](https://github.com/graphcool/serverless-plugin-typescript/issues/23)).

## Getting updates from the original [github repo](https://github.com/balassy/aws-lambda-typescript)

In order to pull any changes from the GitHub repository, use the commands below to merge them into the Bitbucket repository:

```
git fetch upstream master
git merge upstream/master
git push
```
[More Info on how to set it up](https://paazmaya.fi/forking-a-repository-from-github-to-bitbucket)

Please note that while creating such a private fork of an open source project, any useful changes should be made available to the original project, as the people involved with it are in most cases working for free and out of passion for the code.

## About the author

The original author of this project is [Gyorgy Balassy](https://linkedin.com/in/balassy).

gha_language: TypeScript


text:
# Br4ckets Light

A Atom Light Theme inspired by the [Brackets](http://brackets.io) Editor Default Color Scheme.
<br />Based on [Br4ckets Sublime Text Theme](https://github.com/l4ci/Br4ckets-Theme).

Related Theme: [Br4ckets Dark](https://github.com/sergejmueller/br4ckets-dark)

## Installation instructions

```sh
cd ~/.atom/packages
git clone https://github.com/stowball/br4ckets-light
cd br4ckets-light
npm install
```


text:
# Roomies Android App
Android client for Roomies app.
View the backend service [here](https://github.com/MunazR/Roomies-Backend).

## Description
Roomies is an Android application for roommates. It allows users to create, manage and add roommates to their group. They can then create chores for each member, track expenses and keep a list of pantry items. Users can sign up using their Facebook login.

## Download
Download the app on the [Google Play Store](https://play.google.com/store/apps/details?id=com.munaz.roomies).

## License
The MIT License (MIT)

Copyright (c) 2016 Munaz

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

 IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

repository: MunazR/Roomies-Android

repo_name: MunazR/Roomies-Android