text:
Maud is an editor for the animated 3-D models used with
[the jMonkeyEngine (JME) game engine][jme].

Anticipated uses:

 + customize models created by others
 + develop animations from motion-capture data
 + copy/retarget animations between models
 + convert models in other formats to native J3O format
 + troubleshoot issues with models (or with the model-asset pipeline)

Summary of features:

 + load models from local filesystems, JAR/ZIP archives, or HTTP servers
 + import models from [Blender]/[glTF]/[IQE]/[Ogre]/[Wavefront][obj]/[Xbuf] and save to native J3O format
 + import animations from [Biovision Hierarchy (BVH)](#bvh) files
 + visualize animations, axes, bones, bounding boxes, lights,
   mesh vertices, physics objects, and skeletons
 + merge models or geometries
 + split geometries
 + apply transforms to meshes or child spatials
 + browse animations, bones, keyframes, lights, material parameters,
   material-parameter overrides, mesh vertices, physics objects,
   physics shapes, scene-graph controls, spatials, tracks, and user data
 + play animations forward/backward at various speeds and pause them
 + create new animations from poses or by altering/mixing existing animations
 + retarget bone animations from one model to another using skeleton maps
 + create new attachments nodes, lights, physics controls, scene-graph controls,
   scene-graph nodes, and user data
 + insert keyframes into animations and bone tracks
 + rename animations, bones, lights, spatials, and user data
 + change animation speeds/durations
 + behead/mix/truncate animations
 + reduce/resample/wrap animations and tracks
 + translate animations for support or traction
 + delete animations, keyframes, lights, material parameters,
   material-parameter overrides, scene-graph controls, spatials, tracks,
   and user data
 + modify bone/spatial transforms (translation, rotation, and scale)
 + modify batch hints, cull hints, lights, material parameters,
   material-parameter overrides, render-queue buckets, shadow modes, and user data
 + review the edit history and undo/redo edits
 + customizable mouse-button assignments and keyboard shortcuts

Java source code is provided under
[a 3-clause BSD license][license].

Maud was designed for a desktop environment with:

 + a wheel mouse and
 + a display at least 640 pixels wide and 720 pixels tall.

## Contents of this document

+ [How to download and run a pre-built release of Maud](#prebuilt)
+ [How to build and run Maud from source](#build)
+ [Using Maud](#use)
+ [3-D Models](#cgms)
+ [Bones](#bones)
+ [Animations](#animations)
+ [The displayed pose](#pose)
+ [The skeleton map](#map)
+ [The edit history](#edithistory)
+ [Scripting](#scripting)
+ [Command-line arguments](#args)
+ [External links](#links)
+ [Wish list](#wishlist)
+ [Conventions](#conventions)
+ [History](#history)
+ [Acknowledgments](#acks)

## How to download and run a pre-built release of Maud

1. Install a 64-bit [Java], if you don't already have one.
   (Maud no longer supports 32-bit Java.)
2. Point the `JAVA_HOME` environment variable to your Java installation.
   (In other words, set it to the path of a directory/folder
   containing a "bin" that contains a Java executable.
   The path might be something like "C:\Program Files\Java\jre1.8.0_301"
   or "/usr/lib/jvm/java-11-openjdk-amd64/" .)
  + using Bash:  `export JAVA_HOME="` *path to installation* `"`
  + using Windows Command Prompt:  `set JAVA_HOME="` *path to installation* `"`
  + using PowerShell: `$env:JAVA_HOME = '` *path to installation* `'`
3. Install the latest Maud release from GitHub:
  + Browse to [the latest release](https://github.com/stephengold/Maud/releases/latest)
  + Follow the "Maud.zip" link.
  + Save the ZIP file.
  + Extract the contents of the saved ZIP file.
4. `cd` to the extracted "Maud" directory/folder that contains "bin" and "lib".
5. Run the Maud startup script:
  + using Bash: `./bin/Maud`
  + using Windows Command Prompt: `./bin/Maud.bat`
  + using PowerShell: `.\bin\Maud.bat`

[Jump to table of contents](#toc)

## How to build and run Maud from source

1. Install a 64-bit Java Development Kit (JDK),
   if you don't already have one.
2. Point the `JAVA_HOME` environment variable to your JDK installation.
  + using Bash:  `export JAVA_HOME="` *path to installation* `"`
  + using Windows Command Prompt:  `set JAVA_HOME="` *path to installation* `"`
  + using PowerShell: `$env:JAVA_HOME = '` *path to installation* `'`
3. Download and extract the Maud source code from GitHub:
  + using Git:
    + `git clone https://github.com/stephengold/Maud.git`
    + `cd Maud`
    + `git checkout -b latest 1.0.0-beta1`
  + using a web browser:
    + browse to [the latest release](https://github.com/stephengold/Maud/releases/latest)
    + follow the "Source code (zip)" link
    + save the ZIP file
    + extract the contents of the saved ZIP file
    + `cd` to the extracted directory/folder
4. Run the [Gradle] wrapper:
  + using Bash or PowerShell: `./gradlew build`
  + using Windows Command Prompt: `.\gradlew build`

After a successful build,
archives for distribution will be found in `build/distributions`.

You can run the local build using the Gradle wrapper:
  + using Bash or PowerShell: `./gradlew run`
  + using Windows Command Prompt: `.\gradlew run`

You can restore the project to a pristine state:
 + using Bash or PowerShell: `./gradlew clean`
 + using Windows Command Prompt: `.\gradlew clean`

[Jump to table of contents](#toc)

## Using Maud

### Overview of the user interface

Maud's user interface consists of 4 screens:
"Start", "Editor", "Display Settings", and "Bind".
The Start Screen loads first. It merely displays the Maud logo while
initialization completes.  It should automatically transition to the Editor
Screen after a few seconds.

The Editor Screen is Maud's main screen, where 3-D models are visualized, browsed,
and edited.  There's a menu bar across the top and a message bar across the bottom.
Most of its user interface
is split into overlapping sub-windows called "tools".

![screenshot](https://i.imgur.com/1GRhpOB.png "Editor Screen with 3 tools visible and a menu active")

#### Tools

At last count, Maud had 52 tools.
Each tool can be independently hidden or made visible.

Selecting a tool makes it visible and moves it to the top layer for convenient
use, but you can use a tool without it being on top.
The controls in a tool work even when partly obscured by other tools.
You can move a tool by dragging its title bar with the left mouse button (LMB).

If a tool gets in your way, you can hide it by clicking on
the X in its upper right corner with the LMB.
Hiding a tool won't affect anything else, so it's always a safe move.

#### Menus

Clicking a button in the menu bar with the LMB activates the corresponding menu.
Menus are modal: activating a menu disables all other user interfaces in Maud.
When a menu is active, the remainder of the screen darkens,
and the mouse cursor becomes a right-pointing magenta arrow.
You can then select a menu item by clicking on it with the LMB or RMB.

Many menu items display icons to help indicate what they do:

 + a right-pointing black arrow to activate a submenu
 + a wrench icon to select a tool
 + a dialog-box icon to open a dialog box or go to a different screen
 + a pencil icon to immediately edit the loaded skeleton map or target model
 + a bone icon to select a bone
 + an ogre's head to immediately load an [Ogre] model
 + and so forth.

Menus are context-sensitive, so for instance you'll see many more options
in the Animation menu when a real animation is loaded than when the model is
in its bind pose.

The first 10 items in each menu are numbered.
For instance, the first item in the menu bar is
labeled "1] View".  The numbers indicate keyboard shortcuts for
navigating menus.  When no popups are open,
you can select the View Menu by pressing
the "1" key on the main keyboard (but NOT the "1" key on the numeric keypad).

#### Keyboard shortcuts

Keyboard shortcuts in the Editor Screen include:

 + "." to pause/restart the loaded animation(s)
 + "Esc" to exit from the active menu (or if there's no active menu, to exit from Maud)
 + "H" to toggle the visibility of the menu bar and the status bar
 + "X" to create a checkpoint
 + "Z" to undo to the previous checkpoint
 + "Y" to redo to the next checkpoint
 + "F1" to switch to the Bind Screen

Mouse-button assignments and keyboard shortcuts can be customized using the
Bind Screen (or by editing the "Interface/bindings/editor.properties" asset
prior to startup)
in which case shortcuts described in this document might not work.

### Views and models in the Editor Screen

At startup, the Editor Screen displays a "scene" view of a single 3-D model:
Jaime, from the jme3-testdata library, with no tools selected.

![screenshot](https://i.imgur.com/vaKixFI.png "Editor Screen at startup")

Startup actions can be customized using the "Settings -> Update startup script"
menu item (or by editing the "Scripts/startup.js" asset prior to startup)
in which case Maud's initial state might differ from that described here.

A scene view consists of a 3-D render of a loaded model, possibly with a
background, a 3-D cursor, a supporting platform, and/or overlaid visualizations.
Visualizations can include axes, a bounding box, a mesh vertex, physics objects, and/or a
skeleton.  If you load and play an animation in a scene view, you'll see the
model move, rather like it would in a game.

When the mouse cursor is in a scene view, you can use the "A" and "D" keys
to rotate the model left and right.  (These keys don't alter the model itself,
only its orientation in the view.)  You can also press:

 + "B" to select the bone closest to the mouse pointer
 + "E" to deselect the selected bone
 + "Q" to open the "View -> Scene options" menu
 + "V" to select the mesh vertex closest to the mouse pointer
 + "W" to deselect the selected mesh vertex

The Editor Screen can also display "score" views of loaded animations.
A score view is a schematic diagram, like a musical score, with bones arranged
vertically and time (indicated by a gnomon) progressing from left to right.
When the mouse cursor is in a score view, the following keyboard
shortcuts may prove helpful:

 + "B" to select the bone track closest to the mouse pointer
 + "G" to grab the gnomon and (while key is held down) drag it with the mouse pointer
 + "K" to select the keyframe closest to the mouse pointer
 + "Q" to open the "View -> Score options" menu

While Maud can only *edit* one model at a time, the Editor Screen can be split
to *display* 2 different models.
(This is useful when merging models or
retargeting animations from one model to another.)
The model being edited is called the "target" model.
The other model is called the "source" model.

The Editor Screen can also be split to display 2 views of the same model.

When the editor screen is split, you can adjust the horizontal position of the
boundary by dragging it with the RMB.

### Views modes of the Editor Screen

The Editor Screen operates in 3 "view modes":
"Scene Mode", "Score Mode", and "Hybrid Mode".
You can change the view mode using the "View -> Select mode" submenu or
use the backtick ("`") keyboard shortcut to cycle through these modes.

        With no source model loaded:
        With a source model loaded:

        In Scene Mode...
        A full-width scene view of the target model
        A split display with a scene view of the source model on the left
            and a scene view of the target model on the right

        In Score Mode...
        A full-width score view of the target model
        A split display with a score view of the source model on the left
            and a score view of the target model on the right

        In Hybrid Mode...
        A split display with a score view of the target model on the left
            and a scene view of the target model on the right

### Maud's cameras

Each view has its own camera.
Generally, the mouse wheel and middle mouse button (MMB) control Maud's cameras.
Rotate the mouse wheel to move a camera forward or backward.
In scene views, drag with MMB to turn the camera.
In score views, drag up/down with MMB to scroll the view down/up.

#### Scene-view cameras

Beyond that, it gets complicated, since scene-view cameras operate in
2 "movement modes" and 2 "projection modes".
The "Camera Tool" (selected using "View -> Scene options -> Camera")
is used to select these modes.

"Orbit Mode" is a scene-view camera's default movement mode.
In orbit mode, the camera orbits a central point.
In orbit mode, turning the camera also changes its location, making it easy to
view models from many directions.
By the default, the central point is the "3-D cursor" -- a user-selected
location, typically visible as a small, black/yellow, 6-pointed star
at the center of the view.

Move the 3-D cursor to a new location by clicking LMB on an object in the view:
either the model or the platform.
The 3-D cursor doesn't attach to other objects, so moving or altering objects
in the scene won't affect the location of the 3-D cursor.
The "Cursor Tool" (selected using "View -> Scene options -> Cursor")
can alter the appearance of the 3-D cursor.
The "Camera Tool" (selected using "View -> Scene options -> Camera")
can be used to redefine what the camera orbits.

"Fly Mode" is a scene-view camera's alternative movement mode.
In fly mode, the camera disregards the central point.
This is useful for close-up viewing of places the 3-D cursor can't easily reach,
such as the interior of a model.

"Perspective Mode" is a scene-view camera's default projection mode,
and "Parallel Mode" is the alternative.
In Parallel Mode, the mouse wheel
alters the scale of the projection without actually moving the camera.

Standard keyboard shortcuts affecting the scene-view cameras:

 + "Numpad-0" to toggle between movement modes
 + "Numpad-1" to move (or rotate) a camera to a horizontal view
 + "Numpad-5" to toggle between projection modes

#### Score-view cameras

Score views don't have anything analogous to the 3-D cursor, but you can
move the score-view camera up/down by clicking LMB where you want it to look.

[Jump to table of contents](#toc)

## 3-D models

As mentioned above, Maud always has a (target) model loaded,
and an additional model (the source model) can also be loaded.
The source model can't be modified; only the target can be modified.

The "Model Tool" (selected using "Models -> Tool") displays basic
information about the target model.

### Loading (or importing) models from assets

Models are loaded from assets, which may be located in the
Java classpath (built into Maud) or in a local filesystem or on a web server.

Before loading a model from a local filesystem, you must specify
a where in the filesystem the model's assets are located:
select "Settings -> Add asset location",
then navigate to the asset folder (typically it contains a "Model" subfolder),
and select "! add this folder".
Or if the assets are in a JAR/ZIP file, simply select that file.

To load a model as the target model, select the "Models -> Load" menu item,
then select an asset location, then navigate to the model file.
To load a model as the source model, select "Models -> Source model -> Load",
then select an asset location, then navigate to the model file.

Maud can of course load models in jME's native binary format.
To be recognized, such models must have filenames ending in ".j3o".

Maud can also import models in other formats:

 + [Blender 3D][blender] (filename must end in ".blend")
 + [glTF] (filename must end in ".glb" or ".gltf")
 + [Inter-Quake Export][iqe] (filename must end in ".iqe")
 + [Ogre] DotScene (filename must end in ".scene")
 + [Ogre] XML (filename must end in ".mesh.xml")
 + [Wavefront OBJ][obj] (filename must end in ".obj")
 + [Xbuf] (filename must end in ".xbuf")

In addition, Biovision Hierarchy animations can be imported as models.
To be recognized, such animations must have filenames ending in ".bvh".
The imported model will consist of a single scene-graph node without any geometries.

### Saving the target model

To write the target model to a file in jME's native binary format,
open the save dialog: "Models -> Save".
Modify the base file path as desired, and click on the "Save" button.
The suffix ".j3o" is automatically appended to the base file path.
Note that materials and textures are not saved.

By default, models loaded from the classpath or from an archive will be written to a
"Written Assets" folder under Maud's working folder.
When loading assets, Maud treats this folder as if it overrides the classpath.

[Jump to table of contents](#toc)

## Bones

In jME, "bones" are named parts of a 3-D model that can influence
vertices in the model's meshes.
A single vertex can be influenced by up to 4 bones.
A bone can also influence other bones, called its "children".
A bone with no children is a "leaf" bone.
A bone with no parent is a "root" bone.

Each bone has a "head" around which it pivots.
However, a jME bone need not have a well-defined "tail", a length,
nor even a direction.

In a scene view, Maud visualizes each bone as a round dot
(red or green by default)
connected to its children by lines (white by default).
(You can customize these colors using the "Skeleton Tool":
"View -> Scene options -> Skeleton".)

In a score view, each bone is represented by horizontal "staff".
If space permits, the staff includes a rectangular name label on the left.
If the bone is tracked (more about that later) the staff also includes
up to 10 stacked "sparklines" bracketed by a pair of "finials".
The sparklines, rendered in 4 colors, represent animation data,
and the finials help identify which sparkline is which.

![screenshot](https://i.imgur.com/nnXqZAI.png "a detailed staff in a score view")

Before editing a bone in Maud, you must "select" it.
In a scene view, the selected bone (if any) is typically indicated by
3 arrows, denoting the axes of its local coordinate axes.

The "Bone Tool" (selected using "Bone -> Tool") controls and describes
the target model's selected bone.

### Selecting bones

Maud provides many ways to select a bone.

The "Bone -> Select" submenu enables you to select a bone in the
target model by name:

 + from among all bones in the selected skeleton, or
 + from among the root bones in the selected skeleton, or
 + from among all bones with attachments nodes, or
 + from among all bones with tracks in the loaded animation, or
 + from among the children of the selected bone.

It also enables you to navigate the bone hierarchy "By parent"
or cycle through bones in numeric order ("Previous" and "Next").

The Bone Tool ("Bone -> Tool") provides a more convenient interface to these same
selection options.

The quickest way to select a bone is to click the right mouse
button (RMB) on or near it in a scene view.
This works for both the source model and the target model.
However, since bones can appear close together in scene views,
and since the RMB is also used to select objects other than bones,
use this technique with caution.

[Jump to table of contents](#toc)

## Animations

In jME, "animations" are usually found as part of a 3-D model.
Each animation has a name and a duration.

Maud treats the model's bind pose like a zero-duration
animation for many purposes.

A real animation is stored in an `AnimControl` and composed of "tracks", usually bone tracks.
Each bone track transforms a single bone.
An animation need not include a track for every bone.
Maud refers to bones that have tracks in the loaded animation
as "tracked bones".

Each track is composed of series of "keyframes", starting at time zero.

The (Target) Animation Tool (selected using "Animations -> Tool")
controls the target model's loaded animation.
There's also a Source Animation Tool ("Animations -> Source tool")
to control the source model's loaded animation.

### Loading animations

In Maud, "loading" an animation means selecting it
for visualization, playback, and/or editing.

To load an animation for the target model,
select "Animations -> Load" and then the name of the animation.
To load an animation for the source model,
select "Animations -> Load source" and then the name of the animation.

### Playing, pausing, and pinning animations

Once an animation is loaded, Maud can play it forward or backward at speeds
of up to 2x.
Each animation tool has a slider to control the speed and direction
of playback.

Each animation tool also has a button to pause/resume the loaded animation.
As mentioned above, you can also use the "." keyboard shortcut
to pause/resume loaded animations.

By default, Maud "loops" to the start (or end) of the loaded animation
when playback reaches the animation's end (or start).
Using the animation tools, you can instruct Maud to pause and/or reverse
direction ("pong") instead.

Using the animation tools, you can also "pin" a loaded animation.
Pinning an animation forces all its root bones to the model origin
for display (scene-view) purposes.

[Jump to table of contents](#toc)

## The displayed pose

While an animation is playing on the target model, Maud typically refreshes
the model's bone transforms on every frame.
Once the animation is paused, however, the target model's bone transforms
(called the "displayed pose") can be modified independently
of the loaded animation.

Use the "Bone-Translation Tool" ("Bone -> Translate") to modify the local
translation of the selected bone in the displayed pose.
Use the "Bone-Scale Tool" ("Bone -> Scale") to scale
the selected bone in the displayed pose.
And use the "Bone-Rotation Tool" ("Bone -> Rotate") to rotate
the selected bone in the displayed pose.

In scene views, you can also rotate the selected bone by grabbing
any of the bone's 3 axis tips with the RMB and dragging with the mouse.
The axis tips are constrained to an invisible sphere surrounding the
selected bone's head, so for many mouse-pointer screen locations,
2 axis directions are possible.
While you're dragging a bone axis, Maud remembers whether the axis
inclines toward the camera or away from it.
You can toggle this inclination using the "S" shortcut key.

The displayed pose has many uses.  For instance:
To save a pose (creating a new, zero-length animation from it)
select "Animations -> Add new -> Pose".
To insert keyframes (and replace any pre-existing keyframes)
at the current time in the loaded animation,
select "Animations -> Edit -> Insert keyframes".
To insert a keyframe (or replace the pre-existing keyframe)
at the current time in the selected bone track,
select "Keyframe -> Insert from pose".
To alter all keyframes in the selected bone
track, use the "Set all to pose" buttons in the "Keyframe Tool"
("Keyframe -> Tool").

You can also use the displayed pose like a paste buffer, to copy bone transforms
from one time to another.
For this to work, you must "freeze" the pose so Maud won't
overwrite it as soon as the animation time changes.
To freeze the pose, either tick the "freeze" check box in the Animation Tool
or use the "F" keyboard shortcut.
Then go to the animation time when you want to paste and select
"Keyframe -> Insert from pose" (to paste to the selected bone track)
or "Animations -> Edit -> Insert keyframes" (to paste to all bone tracks in the loaded animation).
Remember to unfreeze the pose afterward!

[Jump to table of contents](#toc)

## The skeleton map

Once an animation is created for one model, it's a simple matter to
copy it to another model, provided both models have identical
skeletons.

To retarget animations between models with different skeletons, Maud
requires a "skeleton map" to match up bones in the source model with
corresponding ones in the target model.
(Corresponding bones may have different names and/or indices.)

Furthermore, since jME bones don't have defined tails,
it's often necessary to adjust bone orientations when retargeting
animations between models.
To automate these adjustments, each bone mapping in a jME skeleton
map includes a "twist" rotation value.

Maud can load skeleton maps from assets, edit
them, save them, and use them to retarget animations.
A few sample skeleton maps are build into Maud, such as "SinbadToJaime" which
maps Sinbad's skeleton to that of Jaime.

Use the "Mapping Tool" ("Map -> Tool") to load and edit skeleton maps.
To do anything with a skeleton map, you must have a source model loaded.
To add a mapping between 2 bones, select the source bone in the source
model and the target bone in the target model, then click LMB on
the "Map" button in the lower left or use the equals ("=") keyboard shortcut.

As long as the 2 selected bones map to each other in the loaded map,
the corresponding bone mapping stays selected.
You can unmap the selected bone mapping (with the "Unmap" button) or
adjust its twist value with the "Twist Tool" ("Map -> Twist tool").

When editing a skeleton map, it's helpful to see
its effect on the target model in real time.
To do this, click LMB on the "Show retargeted pose" button in the Mapping Tool or
select "Animations -> Load -> ( retargeted pose )".
With this pseudo-animation loaded:

 + changing the source pose automatically updates the target pose,
 + changing the skeleton map automatically updates the target pose,
 + selecting a mapped source bone also selects the corresponding target bone,
 + selecting a mapped target bone also selects the corresponding source bone, and
 + dragging an axis of the target bone automatically updates the twist value of the selected bone mapping.

To save the loaded skeleton map, select "Map -> Save".

When you're ready to retarget animations between models,
use the "Retarget Tool" ("Animations -> Add new -> Retarget source animation").

[Jump to table of contents](#toc)

## The edit history

Like any serious editor, Maud provides an "undo" capability.

Maud's undo capability is based on checkpointing the editor's state.
Tool visibility and positioning are not checkpointed, nor are shortcut
key bindings, but nearly everything else is, including selections, view mode,
view options, and loaded models, maps, and animations.

By default, Maud creates a checkpoint before editing or unloading any map or model.
You can also create a checkpoint manually using the "X" keyboard shortcut.
To undo changes since the most recent checkpoint, use the "Z" keyboard shortcut.

To safeguard work since the last checkpoint,
the "Z" key often creates a new checkpoint as well.
To redo each change you've undone, use the "Y" keyboard shortcut.

To help you visualize and navigate your edit history,
Maud provides a "History Tool" (selected using "History -> Tool").

The edit history occupies heap memory.
To release this memory, you can delete the history using "History -> Clear".

Maud places a limit on the number of checkpoints you can have at any one time.
The default limit is 8.
You can alter this limit using the History Tool.

[Jump to table of contents](#toc)

## Scripting

Maud has a built-in JavaScript scripting capability based
on the [Nashorn] engine.

During startup, Maud looks for a "/Scripts/startup.js" asset.
The built-in startup script (on the classpath) simply loads the Jaime model.
However, if Maud finds a custom script in the "Written Assets" folder,
it executes the custom script instead of the built-in one.

To auto-generate a custom startup script,
select "Settings -> Update startup script".
The generated script will initialize:

 + asset locations
 + global options such as view mode, boundary position, menu-bar visibility,
   performance debug mode, base index, and tweening techniques
 + most scene-view and score-view options
 + the screen positions of any selected tools

Note that customized hotkeys and display settings
are not included in the startup script.
Maud has other mechanisms to make them persist.

To remove a custom startup script,
select "Settings -> Revert startup script to default".

[Jump to table of contents](#toc)

## Command-line arguments

The following arguments can be specified on the command line (or in the Gradle
build script) to configure Maud prior to executing its startup script:

 + `--forceDialog` (or `-f`)
  to show the JME3 "Display Settings" dialog during startup.
  This dialog can be used to edit display properties (such as resolution)
  in case they become corrupted.  If this argument is not
  specified, Maud shows the dialog only if it believes
  (based on JME3 AppSettings) that this is the first time it has run.
 + `--openGL3` (or `-3`)
  to force LWJGL to use the core OpenGL3.2 renderer.
  Forcing this renderer enables Maud to run on systems with
  non-proprietary GPU drivers.
 + `--skipStartup` (or `-s`)
  to bypass the startup script.  If this argument is not specified, Maud
  looks for a startup script and attempts to execute it before displaying the
  Editor Screen.
 + `--verbose` (or `-v`)
  to generate verbose log output.
  This output may assist in diagnosing certain issues.

[Jump to table of contents](#toc)

## External links

YouTube videos about Maud:

+ January 2018 demo (pick-and-drag editing):
  https://www.youtube.com/watch?v=OLLl7xiuCw0 (8:43)
+ December 2017 demo (importing animated models via glTF):
  https://www.youtube.com/watch?v=tv7QgAtwDCA (7:47)
+ September 2017 spatial animation clip:
  https://www.youtube.com/watch?v=EDtiYu-u_Ls (0:12)
+ September 2017 demo part 2:
  https://www.youtube.com/watch?v=2kmxOzDCl_8 (28:22)
+ September 2017 demo part 1:
  https://www.youtube.com/watch?v=4UwxbsOewow (15:02)
+ June 2017 retargeted animation clip:
  https://www.youtube.com/watch?v=yRjh1rAsipI (0:09)
+ May 2017 demo (out-of-date!):
  https://www.youtube.com/watch?v=fSjsbyBWlPk (9:13)

BVH resources:

+ BVH format description:
  http://research.cs.wisc.edu/graphics/Courses/cs-838-1999/Jeff/BVH.html
+ motion-capture data from CMU's Graphics Lab, converted to BVH by Bruce Hahn:
  https://sites.google.com/a/cgspeed.com/cgspeed/motion-capture
+ free motion-capture data from Ohio State University's ACCAD:
  https://accad.osu.edu/research/motion-lab/system-data

[Jump to table of contents](#toc)

## Wish list

Maud is incomplete.
The following features are on my "to do" list, in no particular order:

 + advance/delay keyframe(s)
 + better support for physics controls/joints/objects/shapes
 + smoother camera motion in score views
 + select bone mappings that don't correspond to the loaded models
 + export a model to [OBJ] format
 + export an animation to [BVH](#bvh) format
 + localization
 + more scene-view options for platform
 + tool tips
 + mirror an animation/pose
 + joint-angle limits for models

[Jump to table of contents](#toc)

## Conventions

Maud's source code is compatible with JDK 7.

World coordinate system: the Y axis points upward (toward the zenith).
Prior to loading a model that uses the Z-up convention, select the "+Z up"
load orientation in the Settings Tool ("Settings" -> "Tool").

The first keyframe in each track must be at time=0.

[Jump to table of contents](#toc)

## History

Since April 2017, the Maud project has been hosted at
https://github.com/stephengold/Maud

Maud began as a demo application for the jme3-utilities-debug library,
part of the jme3-utilities project at
https://github.com/stephengold/jme3-utilities

Maud incorporates code from [jMonkeyEngine][jme] and the [BVH Retarget Project][bvhretarget].

[Jump to table of contents](#toc)

## Acknowledgments

Like most projects, Maud builds on the work of many who
have gone before.  I therefore acknowledge the following
artists and software developers:

+ Rémy Bouquet (aka "nehon") for creating the Jaime model and the [BVH Retarget
  Project][retarget] and also for many helpful insights
+ Paul Speed (aka "pspeed") for many helpful insights
+ David Bernard (aka "david_bernard_31") for creating [Xbuf]
+ Adam T. Ryder (aka "tryder") for creating [jME-TTF]
+ Tobias Jung for creating [ProFont]
+ [Nathan Vegdahl][vegdahl], for creating the Puppet model
+ [Can Bican][bican], for creating the Jprefctl preferences editor
+ Zi Ye, for creating the Sinbad model
+ Alweth on hub.jmonkeyengine.org forums
  for providing `IQELoader` for use, free of charge
+ the brave souls who volunteered to be alpha testers for Maud, including:
    + "Jesterrrrrr"
    + Moff Kalast
    + Adam (aka "safari")
    + Ryan (aka "yaRnMcDonuts")
    + "raistm"
    + Remy Van Doosselaer (aka "remy_vd")
    + "Ali_RS"
    + "Toboi"
+ plus the creators of (and contributors to) the following software:
    + [Adobe Photoshop Elements][elements]
    + the [Blender] 3-D animation suite
    + the [Bullet] real-time physics library
    + the [FindBugs] source-code analyzer
    + the [Firefox] and [Chrome] web browsers
    + the [Git] revision-control system and GitK commit viewer
    + the [Gradle] build tool
    + the [IntelliJ IDEA][idea] and [NetBeans] integrated development environments
    + the [Java] compiler, standard doclet, and virtual machine
    + [jMonkeyEngine][jme] and the jME3 Software Development Kit
    + the [Linux Mint][mint] operating system
    + LWJGL, the Lightweight Java Game Library
    + the [MakeHuman] 3-D character creation tool
    + the [Markdown] document-conversion tool
    + Microsoft Windows
    + the [Nifty] graphical user-interface library
    + [Open Broadcaster Software Studio][obs]
    + the PMD source-code analyzer
    + [ProFont], the programmers' font
    + the [RealWorld Cursor Editor][rwce]
    + the [WinMerge] differencing and merging tool

I am grateful to [GitHub], [JFrog], and [Imgur]
for providing free hosting for this project
and many other open-source projects.

I'm also grateful to my dear Holly, for keeping me sane.

If I've misattributed anything or left anyone out, please let me know, so I can
correct the situation<EMAIL_ADDRESS>
[Jump to table of contents](#toc)

[ant]: https://ant.apache.org "Apache Ant Project"
[bican]: https://github.com/canbican "Can Bican"
[blender]: https://docs.blender.org "Blender Project"
[bullet]: https://pybullet.org/wordpress "Bullet Real-Time Physics Simulation"
[bvhretarget]: https://github.com/Nehon/bvhretarget "BVH Retarget Project"
[chrome]: https://www.google.com/chrome "Chrome"
[elements]: https://www.adobe.com/products/photoshop-elements.html "Photoshop Elements"
[findbugs]: http://findbugs.sourceforge.net "FindBugs Project"
[firefox]: https://www.mozilla.org/en-US/firefox "Firefox"
[git]: https://git-scm.com "Git"
[github]: https://github.com "GitHub"
[gltf]: https://www.khronos.org/gltf "glTF Project"
[gradle]: https://gradle.org "Gradle Project"
[heart]: https://github.com/stephengold/Heart "Heart Project"
[idea]: https://www.jetbrains.com/idea/ "IntelliJ IDEA"
[imgur]: https://imgur.com/ "Imgur"
[iqe]: http://sauerbraten.org/iqm "Inter-Quake Model Formats"
[java]: https://java.com "Java"
[jfrog]: https://www.jfrog.com "JFrog"
[jme]: https://jmonkeyengine.org  "jMonkeyEngine Project"
[jme-ttf]: https://1337atr.weebly.com/jttf.html "jME-TTF Rendering System"
[license]: https://github.com/stephengold/Maud/blob/master/LICENSE "Maud license"
[makehuman]: http://www.makehumancommunity.org/ "MakeHuman Community"
[markdown]: https://daringfireball.net/projects/markdown "Markdown Project"
[minie]: https://github.com/stephengold/Minie "Minie Project"
[mint]: https://linuxmint.com "Linux Mint Project"
[nashorn]: https://docs.oracle.com/javase/8/docs/technotes/guides/scripting/nashorn "Nashorn User Guide"
[netbeans]: https://netbeans.org "NetBeans Project"
[nifty]: https://nifty-gui.github.io/nifty-gui "Nifty GUI Project"
[obj]: https://www.fileformat.info/format/wavefrontobj/egff.htm "Wavefront OBJ File Format"
[obs]: https://obsproject.com "Open Broadcaster Software Project"
[ogre]: https://www.ogre3d.org "Ogre Project"
[openJDK]: https://openjdk.java.net "OpenJDK Project"
[profont]: https://tobiasjung.name/profont "ProFont Project"
[retarget]: https://github.com/Nehon/bvhretarget "BVH Retarget Project"
[rwce]: http://www.rw-designer.com/cursor-maker "RealWorld Cursor Editor"
[skycontrol]: https://github.com/stephengold/SkyControl "SkyControl Project"
[utilities]: https://github.com/stephengold/jme3-utilities "Jme3-utilities Project"
[vegdahl]: https://www.cessen.com "Nathan Vegdahl"
[wes]: https://github.com/stephengold/Wes "Wes Project"
[winmerge]: https://winmerge.org "WinMerge Project"
[xbuf]: https://github.com/xbuf/xbuf "Xbuf Project"
[youtube]: https://www.youtube.com/ "YouTube"

repository: stephengold/Maud

gha_language: Java

gha_license_id: NOASSERTION

repo_name: stephengold/Maud


text:
# tg-poggers
tg-poggers is a Telegram bot that sends a POGGERS (Twitch emote) sticker at the right time, i.e. when one of the triggers is activated.

Triggers are strings of text contained in `triggers.txt` (one per line). If one of the triggers is contained in a message the bot will send the sticker.

license: MIT

repository: poggeroni/tg-poggers

branch_name: refs/heads/master

extension: md

license_type: permissive

repo_name: poggeroni/tg-poggers


text:
chef-security-essentials Cookbook
=================================

Requirements
------------
### Platforms
- Debian, Ubuntu
- CentOS, Red Hat, Fedora
- FreeBSD

Dependencies
------------

* fail2ban
* users
* sudo
* openssh

The *ufw* cookbook includes a rule for allowing SSH from any by default. If you would like the ability to disable this, or restrict it to specific IP range, you will want to include the following cookbook in your Berksfile.

`cookbook "ufw", github: 'jrstarke/ufw'`

If you are using chef-solo, you will want to be sure to include the `chef-solo-search` cookbook in your Berksfile, or downstream cookbook dependencies.

Users
-----

This cookbook uses the [users][1] cookbook to
create the set of users and add them to the `sysadmin` group. But this requires a users data bag. See the [users][1]
cookbook for details on how to create these data bags.

The basics, create a data bag for the users.

`$ knife data bag create users`

You will also want to generate a password hash for the user.

`$ openssl passwd -1 "plaintextpassword"`

You can then create a particular user with

`$ knife data bag create users username`

A sample data bag example is

```
{
  "id": "bofh",
  "password": "$1$d...HgH0",
  "ssh_keys": [
    "ssh-rsa AAA123...xyz== foo",
    "ssh-rsa AAA456...uvw== bar"
  ],
  "groups": [
    "sysadmin"
  ],
  "shell": "\/bin\/bash"
}
```

SSH
---

By default, this cookbook will turn off **PermitRootLogin**, disable **PasswordAuthentication** and add allow access only to those in the **sysadmin** group (defined in [Users](#users) above).

UFW
---

Next you will want to configure your own firewall rules. By default we lock down everything but SSH (which we have restricted to only sysadmin users so far). If you want to disable or change the SSH rule, see the **ufw** section of the **requirements** above.

You can configure the firewall, using the instructions from [ufw][2]. A rule that will allow HTTP looks like:

```node['firewall']['rules'] = [
  {"http" => {
    "port" => "80"
    }
  }
]```

[1]: https://github.com/opscode-cookbooks/users
[2]: https://github.com/opscode-cookbooks/ufw

repository: pzelnip/chef-security-essentials

repo_name: pzelnip/chef-security-essentials


text:
Angular.js Hello World
-------
https://angularjs.org/

Note: `angular.min.js` is automatically downloaded if not found in your home directory under `rusthon_cache`,
see the special `source` attribute of the `script` tag below that instructs the transpiler to do the download.

```html
<html>
<head>
<link href='~/bootstrap-3.3.5-dist/css/bootstrap.css' rel='stylesheet' zip="https://github.com/twbs/bootstrap/releases/download/v3.3.5/bootstrap-3.3.5-dist.zip"/>
<script src="~/rusthon_cache/jquery-2.1.4.min.js" source="http://code.jquery.com/jquery-2.1.4.min.js"></script>
<script src="~/bootstrap-3.3.5-dist/js/bootstrap.min.js"></script>

<script src="~/rusthon_cache/angular.min.js" source="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.9/angular.min.js"></script>

<@myscript>

</head>
<body>

<div ng-app="invoice1" ng-controller="InvoiceController as invoice">
  <b>Invoice:</b>
  <div class="well">
    Quantity: <input type="number" min="0" ng-model="invoice.qty" required >
  </div>
  <div class="well">
    Costs: <input type="number" min="0" ng-model="invoice.cost" required >
    <select ng-model="invoice.inCurr">
      <option ng-repeat="c in invoice.currencies">{{c}}</option>
    </select>
  </div>
  <div class="well">
    <b>Total:</b>
    <span ng-repeat="c in invoice.currencies">
      {{invoice.total(c) | currency:c}}
    </span>
    <button class="btn" ng-click="invoice.pay()">Pay</button>
  </div>
</div>

</body>
</html>
```
Above a special syntax is used `@myscript` this tells Rusthon where to insert the output of scripts it translates using the javascript backend.

rusthon
-------
Below `@myscript` is given on the line just before the fenced rusthon code block.  This allows you to insert multiple scripts into your html, in the head or body.

@myscript
```rusthon
#backend:javascript
from runtime import *

module = angular.module('invoice1', [])

def invoice_controller():
	this.qty = 1
	this.cost = 2
	this.inCurr = 'EUR'
	this.currencies = ['USD', 'EUR', 'CNY']
	this.usdToForeignRates = {
		'USD': 1,
		'EUR': 0.74,
		'CNY': 6.09
	}

	def total(outCurr):
		return this.convertCurrency(this.qty * this.cost, this.inCurr, outCurr)
	def convertCurrency(amount, inCurr, outCurr):
		return amount * this.usdToForeignRates[outCurr] / this.usdToForeignRates[inCurr]
	def pay():
		window.alert("Thanks!")

	this.pay = pay
	this.total = total
	this.convertCurrency = convertCurrency

module.controller('InvoiceController', invoice_controller)
```

repository: pombredanne/Rusthon

gha_language: Python

repo_name: pombredanne/Rusthon


text:
# Contributing

Pull requests are welcomed and automatically built and tested against multiple versions of Python through GitHub Actions.

Except for unit tests, testing is only supported on Python 3.9.

The project is packaged with a light development environment based on `Docker` to help with the local development of the project and to run tests within  GitHub Actions.

The project is following Network to Code software development guidelines and are leveraging the following:

- Black, Pylint, Bandit, Mypy, flake8, and pydocstyle for Python linting and formatting.
- pytest, coverage, and unittest for unit tests.

There are a number of things that are required in order to have a successful PR.

- Docstrings must conform to the google docstring [convention](https://google.github.io/styleguide/pyguide.html#381-docstrings).
- Following and adherence to [Extending Parsers](dev_parser.md).
- Run tests with `invoke tests`.

Documentation is built using [mkdocs](https://www.mkdocs.org/). The [Docker based development environment](dev_environment.md#docker-development-environment) can be started by running `invoke docs` [http://localhost:8001](http://localhost:8001) that auto-refreshes when you make any changes to your local files.

## Branching Policy

The branching policy includes the following tenets:

- The develop branch is the primary branch to develop off of.
- If there is a reason to have a patch version, the maintainers may use cherry-picking strategy.
- PRs intended to add new features should be sourced from the develop branch.
- PRs intended to address bug fixes and security patches should be sourced from the develop branch.
- PRs intended to add new features that break backward compatibility should be discussed before a PR is created.

NTC-Templates will observes semantic versioning. This may result in an quick turn around in minor versions to keep pace with an ever growing feature set.

## Release Policy

NTC Templates has currently no intended scheduled release schedule, and will release new features in minor versions.

When a new release is created the following should happen.

- A release PR is created with:
    - Update to the changelog in `docs/admin/release_notes/version_<major>.<minor>.md` file to reflect the changes.
    - Change the version from `<major>.<minor>.<patch>-beta` to `<major>.<minor>.<patch>` in pyproject.toml.
    - Set the PR to the master
- Ensure the tests for the PR pass.
- Merge the PR.
- Create a new tag:
    - The tag should be in the form of `v<major>.<minor>.<patch>`.
    - The title should be in the form of `v<major>.<minor>.<patch>`.
    - The description should be the changes that were added to the `version_<major>.<minor>.md` document.
- If merged into `master`, then push from `master` to `develop`, in order to retain the merge commit created when the PR was merged
- A post release PR is created with.
    - Change the version from `<major>.<minor>.<patch>` to `<major>.<minor>.<patch + 1>-beta` pyproject.toml.
    - Set the PR to the `develop`.
    - Once tests pass, merge.

repository: networktocode/ntc-templates

repo_name: networktocode/ntc-templates


text:
# Gestion-de-Banque-with-Symfony-PHP-In-Linux-18.04-LTS

Bank management carried out by Mohamed Ali Jaziri this project was carried out by the framework symfony. In this project, I did the same thing that I used in the Spring Boot project. : You should watch all the video in the details folder of this work band you can watch my video on my YouTube channel https://www.youtube.com/watch?v=YIZzEBJPp58&t=12s

# Bank management in Symfony Framework

Introduction:

We want to create an application that allows you to manage bank accounts.

Each account is defined with a code, a balance and a creation date.

A current account is an account that also has an overdraft.

A savings account is an account that also has an interest rate.

Each account belongs to a client.

Each client is defined by their code and name

Each account can undergo several operations.

There are two types of transaction: Payment and Withdrawal

An operation is defined by a number, a date and an amount.

The main objectives:

 1. Functional requirements:

The application must allow to:

Manage customers:

Add a client.

 Consult all customers.

 Consult customers whose name contains a keyword.

Manage accounts:

Add an account.

Consult an account.

Manage operations:

Make an amount payment into an account.

Withdraw an amount from an account.

Transfer money from one account to another.

Consult the operations of an account page by page.

The operations require an authentication operation.

 2. Exigences Techniques :

The data is stored in a MySQL database.

The application consists of three layers:

The MVC.

The Pagination.

Security.

...

gha_language: PHP

gha_license_id: MIT


text:
# Geometric Spanner Code

## Credits

This folder houses an implementation of the greedy spanner algorithm of
"A Framework for Computing the Greedy Spanner" by Quirijn W. Bouts,
Alex P. ten Brink, and Kevin Buchin.  The existing code is a modified
version of an implementation due to Bouts, ten Brink, and Buchin.


text:
## Last Week's Accomplishments
The display for the rasberry is working! The numpy is installed and asking in the rcos-help desk, I learned that we need to have pip3 to fix some of out set up problems. Pip3 is still being a bit difficult to download though.(we somehow got every other version of pip besides 3.)

## This Week's Plan

Get pip3 to work so we can finish the installtion for the semester then once we figure out everything, document the steps so no one will have to spend a long time to figure out installation.

## Anything Blocking?
The pip3 package is blocking the path, we were given instruction but there has been an error involing a unicorn package which is strange because the unicorn package from what we researched had to do with led lights which had nothing to do with the packages we are trying to download.

## Notes

repository: alexistj/rcos-status-updates

repo_name: alexistj/rcos-status-updates


text:
A LogStash Configuration to Publish Event Counts to Graphite
==========================================================

Graphite is used to display a stream of measurement/timestamp pairs.
This is not directly suitable for displaying events because
Graphite's minimum time box is 1 second.
This means that high frequency events exceeding this rate are lost.

To solve this problem statsd is often used as an intermediary between LogStash and Graphite.
statsd aggregates discrete events into a frequency or events per time period such as logins for each hour.

The LogStash metrics plugin offers a similar solution to this problem.

This is generally OK, but it means that event metrics published to Graphite
have a timestamp corresponding to the aggregation time.
This is not useful if historical log files need to be ingested.

The LogStash configuration published here uses a different aggregation strategy
that allows historical logs and real time logs to be ingested.
The basic approach is to examine the timestamp of the incoming log record
and to increment a bin count defined by the surrounding whole hour.
Whenever a new record is seen that does not fit into the current bin a
new bin is created around the timestamp of the new record.

Aggregated records passed to Graphite will have a timestamp
which corresponds to the end of the hour encompassing a group of records.
That is just after the timestamp of the last record in the bin.

The binning process is determined by transitions from one group of events
to the next group of events with grouping defined by proximity in time.
When testing the config file this may be confusing as the last group of log records
will not produce an output until a new group comes along.

To run LogStash from the command line:

```
./bin/logstash -f /Users/developer/git/logstash_config/configuration/login_stats_graphite3.conf
```
To test using the command line the .sincedb timestamp database needs to be reset:
```
rm ~/.sincedb_*; ./bin/logstash -f /Users/developer/git/logstash_config/configuration/login_stats_graphite3.conf
```


text:
---
layout: post
title: "Newcomers Guide"
description: "A documentation help for newcomers to contribute in Addy"
tags: newcomers guide quick-start contribution
comments: true
---

**Please do not work on any issue without being assigned to it!** The reason for that is we will not know if you're are working on it and there might be a possibility that someone else might also be working on it. Hence, to avoid clashes and to contribute rightly please read and follow this guide.

This [Code of Conduct](../code-of-conduct/) has to be followed by each an every member of the organisation

# Getting Started
To get started, there are a few steps to be followed.

## 1. Join our community
### 1.1 Join our Gitter chatroom [here](https://gitter.im/addy-org/Lobby)

The first step of contributing in open source is always to get familiar with the community you're working with. Our mode of communication is mostly Gitter. Gitter is an instant messaging service used by developers and users of GitHub. Gitter uses chatrooms, where developers can join in and can talk about a particular topic. Addy has a common chatroom `Lobby` which is a common chatroom used for all the communications & discussion within the organisation and repository chatrooms which are related to a specific repository/ project.

List of all the chatrooms is available [here](https://gitter.im/addy-org)

But before joining the community, here are few things that you should keep in mind.
> - Only log into Gitter using your GitHub account and not your Twitter account since it might get difficult for us to know which GitHub user is really contributing and discussing the project with us. Also in future when we wish to automise the organisation, then the chatbots might have trouble identifying you.
- Don’t @-mention or private message people, unless its utterly important. @ mentions generate notifications on the various gitter clients the user may be signed into, you might even wake someone on the other side of the world up. Also it discourages other people to answer the question, so you might wait longer for an answer.
- Do not mention users unrelated to a particular issue/question. This also means you should not mention the person that was last online. For example, mentioning someone on a Github issue will subscribe them to that issue, even if they don’t want to be a part of the discussion. However, mentioning someone is okay if they really need to see your message.
- Don’t use /all if you are a newcomer or do not have a critical reason.
- Don’t repeatedly @-mention people in an ongoing conversation.
- You should ask someone before mentioning them.

### 1.2 Join the Addy organisation [here](http://bit.ly/JoinAddy).

Just click on the link and the invitation will be sent by mail and you will have to accept it to join. If you don’t find the invitation, accept it [here](https://github.com/addy-org/).

**Congratulations!** Now that you are part of Addys, you can start working on issues. If you are familiar with git, you can skip the next section and pick an issue.

## Optional. Get Help With Git

We use GitHub to manage our repositories. If you’re not familiar with git/GitHub, we strongly recommend following a tutorial, such as [this one](https://try.github.io/levels/1/challenges/1).

We also have a [page dedicated to git commands](../git-tutorial/) that will help you learn the basics.

If anything is unclear, or you are encountering problems, feel free to contact us on gitter, and we will help you!

## Step 2. Picking Up an Issue

Now it is time to pick an issue. It is the best way to familiarise yourself with the codebase. You can view [all Newcomer issues on GitHub](https://github.com/search?utf8=%E2%9C%93&q=is%3Aopen+is%3Aissue+user%3Aaddy-org+label%3Anewcomers+no%3Aassignees).

> ***Note:*** *You need to be logged in before you follow the Newcomer issues link.*

The easy issues that will help you get started are labeled as newcomers and are only there to give you a glimpse of what it’s like to work with us and what the workflow is like.

Now pick an issue which isn’t assigned and which you would like to fix. Leave a comment that you would like to be assigned to the issue. Now ask on the Gitter channel for a maintainer to assign you the issue. Once one of the maintainers assign you the issue you can start working on it!

This way we don’t have multiple people working on the same issue at the same time.

## Step 3. Creating a Fork

This tutorial assumes you are working on your own fork. To fork the repository, go to the official repository of addy-org and click on the ***Fork*** button from the website interface. To add it locally, simply run:
```bash
$ git remote add myfork fork_link
```
where `myfork` is the name of your fork, and `fork_link` is a link to your fork repository.
>**Note:**

>It is important that you DO NOT make your changes on the master branch of your forked repository to avoid the following cases:

>If you make a rebase to synchronize your repository to the original, every commit that is pushed to the remote master will be pulled in your master branch. Then if you make a pull request to commit your changes to the remote, the commits that got synced from the rebase will be recommitted along with your work in the pull request.

>You cannot have two pull requests using the same branch name. Therefore, if your fork’s master has been used in a pull request and you decide to work on a different issue you will have to branch eventually. Differently every new commit that you make on your master branch will get attached to the initial pull request and that will result in altering the purpose of that request.

>If your fork’s master has been used in a pull request, you have to keep the change in the branch until that get’s merged to the remote master. That will lead to the complications listed above, if you decide to work on a different issue.

>In order to avoid the above mentioned cases you can create a new branch where you will work on the issue. To do that run:

>```bash
$ git checkout -b <branchname>
```

## Step 4. Sending Your Changes

Now that you’ve fixed the issue, you’ve tested it, and you think it is ready to be merged, create a commit and push it to your fork, using:
```bash
$ git push -u myfork <branchname>
```

## Step 5. Creating a Pull Request

Now that your commit has been sent to your fork, it is time to create a Pull Request. You can do this by accessing your fork on GitHub and clicking New Pull Request.

**Congratulations!** You have now created your first Pull Request!

>**Note:** If you know you have more work to do on this Pull Request before it is ready to be accepted, you can indicate this to other developers by starting your Pull Request title with wip (case-insensitive, stands for “Work in Progress”).

## Step 6. Review Process

After creating your Pull Request, it enters the review process. Now all you have to do is wait, or let the other developers know on Gitter that you have published your changes.

Now there are two possibilities:

- your `Pull Request` gets accepted, and your commits will get merged into the master branch
- your `Pull Request` doesn’t get accepted, and therefore you will need to to modify it as per the review comments

It’s highly unlikely that your Pull Request will be accepted on the first attempt - but don’t worry, that’s just how it works. It helps us keep Addy clean and stable.

 If your commit message was considered acceptable by our reviewers, you can simply send it again (without any changes). If not, edit it and send it. You have successfully edited your last commit!

> **Note:** Don’t forget! After editing your commit, you will have to push it again. This can be done using:

>```bash
$ git push --force myfork
```

The meaning of `myfork` is explained in step 3 of this guide. The Pull Request will automatically update with the newest changes.

**Congratulations!** Your PR just got accepted! You’re awesome. Now you should tell us about your experience and go for a low level issue - they are really rewarding!

>**Note:** If you need help picking up an issue, you can always ask us and we’ll help you!

repository: addy-org/Wiki

gha_language: CSS

repo_name: addy-org/Wiki


text:
---
title: "Min Cost Climbing Stairs"
description: "Some description ..."

Once you pay the cost, you can either climb one or two steps. You need to find minimum cost to reach the top of the floor, and you can either start from the step with index `0`, or the step with index `1`.

### Example 1
```
Input: cost = [10, 15, 20]
Output: 15
Explanation: Cheapest is start on cost[1], pay that cost and go to the top.
```
### Example 2
```
Input: cost = [1, 100, 1, 1, 1, 100, 1, 1, 100, 1]
Output: 6
Explanation: Cheapest is start on cost[0], and only step on 1s, skipping cost[3].
```

#### Note
1. cost will have a length in the range `[2, 1000]`.
2. Every `cost[i]` will be an integer in the range `[0, 999]`.

### Solution
```python
class Solution:
    def minCostClimbingStairs(self, cost: List[int]) -> int:
        min1 = min2 = 0

        for i in range(len(cost)-1, -1, -1):
            min1, min2 = cost[i] + min(min1, min2), min1

        return min(min1, min2)
```

repository: lek-tin/hashnopolis

branch_name: refs/heads/dev

repo_name: lek-tin/hashnopolis


text:
---
layout: example
category: portfolio
title: Custom Salesforce dashboard for tracking revenue
list_image: 2017-10-27-Salesforce-Dashboard-900-thm.png
css: article

company: Site 9
role: Salesforce Developer
goal: Provide an easy way for sales and management to track projected revenue from within Salesforce
excerpt: ProtoShare.com is a SaaS application with self-sign up. Sign-ups come with a free trial period. The customer funnel was custom built around Salesforce and this dashboard provided a way for management to understand current and future revenue.
end_result:
---

Note: All values in the dashboard below have been replaced with fake data.

![Salesforce Dashboard]({{site.baseurl}}/assets/images/2017-10-27-Salesforce-Dashboard-900.png)

There's a lot going on with this dashboard.

Over time I kept adding bits of information to provide insight into what was working and what wasn't. The **Paying Cusotmers** table is complex because we were experimenting with different pricing models. We allowed customers to stay on whatever pricing they signed up at, so we needed to keep track of the various revisions. We did occasionally force customers off old plans which is why the rows only go back to v6.

The **Active Trials** table showed the potential new revenue broken down by the plans. We would give extended trials to educational institutions and non-profits, so we had a chunk that were open, but not active.

The right-most table tracked the trend of new trials and new customers. Essentially we always wanted to see positive numbers here. At a glance it was easy to tell how good the day had been.

If I'm remembering right, this table was built using a straight HTML with a bunch of Salesforce queries to get the data. I wanted to add some graphs or pie charts, but that was more effort than it was worth at the time.


text:
[![Archived header](https://github.com/newrelic/opensource-website/raw/master/src/images/categories/Archived.png)](https://opensource.newrelic.com/oss-category/#archived)

# New Relic C SDK

This is the New Relic C SDK! If your application does not use other New Relic
APM agent languages, you can use the C SDK to take advantage of New Relic's
monitoring capabilities and features to instrument a wide range of applications.

[![Build Status](https://travis-ci.org/newrelic/c-sdk.svg?branch=master)](https://travis-ci.org/newrelic/c-sdk)

## Archival Notice ##
As of June 30 2022 we are archiving the C-SDK project. Please explore the [option to use OpenTelemetry](https://github.com/newrelic/docs-website/blob/develop/docs/apm/agents/c-sdk/get-started/otel_cpp_example) as an alternative to send C++ telemetry data to New Relic. For more details, see our [Explorers Hub announcement](https://discuss.newrelic.com/t/q1-bulk-eol-announcement-fy23/181744).

## Installation

### Requirements

The C SDK works on 64-bit Linux operating systems with:

* gcc 4.8 or higher
* glibc 2.17 or higher
* Kernel version 2.6.26 or higher
* libpcre 8.20 or higher
* libpthread

Running unit tests requires cmake 2.8 or higher.

Compiling the New Relic daemon requires Go 1.7 or higher.

## Building

If your system meets the requirements, building the C SDK and
daemon should be as simple as:

```sh
make
```

This will create two files in this directory:

* `libnewrelic.a`: the static C SDK library, ready to link against.
* `newrelic-daemon`: the daemon binary, ready to run.

You can start the daemon in the foreground with:

```sh
./newrelic-daemon -f --logfile stdout --loglevel debug
```

Alternatively, you can use the [C SDK daemon image on
Dockerhub](https://hub.docker.com/r/newrelic/c-daemon) to run the daemon.

Then you can invoke your instrumented application.  Your application,
which makes C SDK API calls, reports data to the daemon over a socket;
in turn, the daemon reports the data to New Relic.

For more information on installation and configuration of the C SDK for
different environments, see [Install and configure](https://docs.newrelic.com/docs/agents/c-sdk/install-configure).

## Testing

To compile and run the unit tests:

```sh
make run_tests
```

Or, just to compile them:

```sh
make tests
```

## Privacy
At New Relic we take your privacy and the security of your information seriously, and are committed to protecting your information. We must emphasize the importance of not sharing personal data in public forums, and ask all users to scrub logs and diagnostic information for sensitive information, whether personal, proprietary, or otherwise.

We define “Personal Data” as any information relating to an identified or identifiable individual, including, for example, your name, phone number, post code or zip code, Device ID, IP address and email address.

For more information, review [New Relic’s General Data Privacy Notice](https://newrelic.com/termsandconditions/privacy).

## Contribute

The C SDK  project is read-only and available for cloning only. We encourage you to experiment with it in your fork however please keep in mind that there is neither a maintainer team nor support.

**A note about vulnerabilities**

As noted in our [security policy](https://github.com/newrelic/c-sdk/security/policy), New Relic is committed to the privacy and security of our customers and their data. We believe that providing coordinated disclosure by security researchers and engaging with the security community are important means to achieve our security goals.

If you believe you have found a security vulnerability in this project or any of New Relic's products or websites, we welcome and greatly appreciate you reporting it to New Relic through [HackerOne](https://hackerone.com/newrelic).

If you would like to contribute to this project, review [these guidelines](./CONTRIBUTING.md).

To [all contributors](https://github.com/newrelic/c-sdk/graphs/contributors), we thank you!  Without your contribution, this project would not be what it is today.

## License
The New Relic C SDK is licensed under the [Apache 2.0](http://apache.org/licenses/LICENSE-2.0.txt) License.

The C SDK also uses source code from third party libraries. Full details on
which libraries are used and the terms under which they are licensed can be
found in the
[third party notices document](https://github.com/newrelic/c-sdk/tree/master/THIRD_PARTY_NOTICES.md).

## Resources

* [New Relic Documentation](https://docs.newrelic.com/docs/c-sdk-table-contents): Comprehensive guidance for using our platform
* [New Relic C SDK documentation on GitHub](https://newrelic.github.io/c-sdk/index.html)
* [New Relic C SDK Guide](https://github.com/newrelic/c-sdk/blob/master/GUIDE.md)
* [New Relic C SDK distributed tracing example](https://github.com/newrelic/c-dt-example)
* [New Relic Developer](https://developer.newrelic.com/): Resources for building a custom observability applications
* [New Relic University](https://learn.newrelic.com/): A range of online training for New Relic users of every level
* Use your preferred search engine to find other New Relic resources.

repository: newrelic/c-sdk

branch_name: refs/heads/main

gha_language: C

repo_name: newrelic/c-sdk


text:
# Increment

This program increments a Consul key value

Presumptions:
- Consul is running on localhost
- Consul does not require auth
- Key value is parsable as an int
- Increment file is parasable as an int

```
Start:
  spew [location of a file with an int]

Env Vars:
  INCREMENT_KEY - the consul key to increment
```

repository: mmcquillan/increment

repo_name: mmcquillan/increment


text:
## White et al. 2012 Analysis

The code and data in this repository allow the analyses in White et al. 2012
([http://dx.doi.org/10.1890/11-2177.1](http://dx.doi.org/10.1890/11-2177.1)) to
be fully replicated for four of the six datasets Breeding Bird Survey, Mammal
Community Database, Forest Inventory and Analysis, and Alwyn Gentry's Tree
Transects). The other two datasets were obtained under agreements restricting
the publication of raw data, but simulation results and figures can still be
generated for these datasets.

### Setup

Requirements: Python 2.x and the following Python modules: numpy, scipy,
matplotlib, mpmath, mpl_toolkits (for figures), and mpl_toolkits.basemap (for
figures). You will also need two of our custom Python modules: METE
(https://github.com/weecology/METE) and macroecotools (at the white-etal-2012
tag; https://github.com/weecology/macroecotools). These modules can be installed
by running the following commands from the command line (with sufficient
permissions):

```sh
git clone https://github.com/weecology/METE.git
cd METE
python setup.py install
git clone https://github.com/weecology/macroecotools.git
cd macroecotools
git checkout white-etal-2012
python setup.py install
```

### Replicate analyses

The analyses can be replicated by running the following commands from the
command line.

Run all analyses and generate figures:
`python mete_sads.py ./data/ all`

Run portions of the analysis pipeline:

* Empirical analyses: `python mete_sads.py ./data/ empir`
* Simulation analyses: `python mete_sads.py ./data/ sims`
* Figures: `python mete_sads.py ./data/ figs`

On Windows `./data/` should be replaced with `.\data\` to match the relevant
path conventions.

Please note that these analyses involve both a large amount of data and a lot of
computational work and therefore take a long time to run. Expect the empirical
analysis to take up to a day, and simulations to take up to a week on an 8-core
server. Generating figures takes about one hour due to the neighborhood
calculations required for the color ramps on the observed-predicted plots.

### Data use

Data is provided in this supplement for the purposes of replication and is not
presented in such a way as to be generally useful for additional analyses. If
you wish to use these datasets for additional research they should be obtained
from relevant data providers. For BBS, MCDB, FIA, and Gentry this can be done
automatically by using the EcoData Retriever
(http://ecodataretriever.org).

The ``mete_sads_data.py`` script is intendend to allow for downloading the raw data
from the original source, importing it into MySQL and then executing the queries
we used to get the data in the ./data folder. However, it is not currently
complete. Hopefully, we'll get back to it soon. Sorry for the inconvenience.

### License (MIT)

Copyright (c) 2012 Weecology

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.


text:
# Hello IS601 Fall 2021- Edgardo Guillen
## This is the introduction to GIT Source Code Management
This is part of my first IS601 assignment
## Hello
-Have done fork

-Created a new Branch

-Making someChanges to Readme file

# Hi this is Sabina
# Completed a fork, commits and branches

## This is a screenshot showing the entire repository (IS601-online-f21)
![Repository_Git_Introduction_Assignment1](Repository_GitHub_Introduction_Assigment1.jpg)
## This is screenshot for Commits
![Commits](Commits.jpg)
## This is a screenshot showing fork
![Forks](Forks.jpg)
## This is a screenshot showing Branches
![Branch](Branches.jpg)


text:
---
title: SOC3
name: Social Studies
code: SOC3
subject_area: Social Studies
date: 2019-07-29T02:47:58.474Z
entry_requirements: >-
  12 credits in Level 2 Achievement Standards English or 12 credits Level 2
  achievement standards Social Studies and HOF/TIC approval.
year: '13'
type: Optional
course_duration: Full Year
course_level: NCEA 3
assessment_type: Achievement Standard
standards:
  - '91597'
  - '91598'
  - '91599'
  - '91600'
credits: '20'
ue_approved: true
---
To provide students with opportunities to examine and evaluate peoples responses to challenges and social actions in society. Areas of study include: Fundamentalism, Social Campaigns based on the Impact of Modern Ideologies including Political, Cultural and Environmental.

repository: WhanganuiHigh/Website

gha_language: HTML

repo_name: WhanganuiHigh/Website


text:
This project was bootstrapped with [Create React App](https://github.com/facebookincubator/create-react-app).

### First

```bash
npm install
```

### Then

```bash
npm start
```


text:
## Overview

PL test builded with [Web Starter Kit](https://developers.google.com/web/tools/starter-kit/) and [Angular 1.6](https://angularjs.org/)

## Quickstart

Run $ npm install --global gulp && npm install && bower install in that directory to get started.

## Watch For Changes & Automatically Refresh Across Devices

```sh
$ gulp serve
```

This outputs an IP address you can use to locally test and another that can be used on devices
connected to your network.
`serve` does not use [service worker](http://www.html5rocks.com/en/tutorials/service-worker/introduction/)
caching, so your site will stop being available when the web server stops running.

## Serve the Fully Built & Optimized Site

```sh
$ gulp serve:dist
```

This outputs an IP address you can use to locally test and another that can be used on devices
connected to your network.
`serve:dist` includes will serve a local copy of the built and optimized site generated as part
of the `default` task.
Because the optimized site includes a service worker which serves your site directly from the
cache, you will need to reload the page after regenerating the site to pick up the latest changes.
`serve:dist` uses a different HTTP port than `serve`, which means that the service workers are
kept isolated in different [scopes](https://developer.mozilla.org/en-US/docs/Web/API/Service_Worker_API/Using_Service_Workers#Registering_your_worker).

## Build & Optimize

```sh
$ gulp
```

Build and optimize the current project, ready for deployment.
This includes linting as well as image, script, stylesheet and HTML optimization and minification.
Also, a [service worker](http://www.html5rocks.com/en/tutorials/service-worker/introduction/)
script will be automatically generated, which will take care of precaching your sites' resources.
On browsers that [support](https://jakearchibald.github.io/isserviceworkerready/) service
workers, the site will be loaded directly from the service worker cache, bypassing the server.
This means that this version of the site will work when the server isn't running or when there is
no network connectivity.

## Browser Support

At present, we officially aim to support the last two versions of the following browsers:

* Chrome (Recommendable)
* Edge (Don't support property content(url) and won't show icons)
* Firefox (Don't support property content(url) and won't show icons)

This is not to say that Web Starter Kit cannot be used in browsers older than those reflected, but merely that our focus will be on ensuring our layouts work great in the above.

## Docs and Recipes

* [File Appendix](https://github.com/andyindahouse/PL-test/blob/master/docs/file-appendix.md) - What do the different files here do?
* [File Appendix 2](https://github.com/andyindahouse/PL-test/blob/master/docs/file-appendix-2.md) And how does app work?

## License

Apache 2.0
Copyright 2015 Google Inc

repository: andyindahouse/PL-test

repo_name: andyindahouse/PL-test


text:
# Consultant Simulator
## A Phaser/ES6/Webpack Platform Game

A game I made when fiddling around. Don't take anything seriously.

# Setup
To use this game you’ll need to install a few things before you have a working copy of the project.

### 1. Clone this repo
### 2. Install node.js and npm:

https://nodejs.org/en/

### 3. Install dependencies:

Navigate to the cloned repo’s directory.

Run:

```npm install```

## 4. Run the development server:

Run:

```npm run dev```

This will run a server so you can run the game in a browser.

Open your browser and enter localhost:3000 into the address bar.

Also this will start a watch process, so you can change the source and the process will recompile and refresh the browser

## Build for deployment:

Run:

```npm run deploy```

This will optimize and minimize the compiled bundle.

repository: daviseford/consultant-sim

repo_name: daviseford/consultant-sim


text:
# Python-Skeleton

Command line utility for creating a python project skeleton. Requires python 3 to run.

Examples:

```bash

python3 python-new-project.py myproject --app  # create a new application based project in ./myproject
python3 python-new-project.py /path/to/myproject --lib   # create a library project in /path/to/myproject
python3 python-new-project.py myproject --app --force  # create the new project overwriting any existing skeleton files
```

---

# Notes

## Libraries vs Applications

Libraries specify abstract dependencies (including dev-packages) in `setup.py` but may use Pipenv to create a virtual env.
Applications specify exact dependencies in a `Pipfile` + `Pipfile.lock` that are checked into the source code. A `setup.py` file is not needed as there need not be any packaging.

## Virtual Environment

It's easy to get library/tool version mismatches when not working in an isolated environment on a development machine. It is more feasible to install globally if using something like jails/docker.

- [Pipenv](https://pipenv.org/) is the latest python tooling for creating virtual environments and dealing with dependencies.
- [Anaconda](https://docs.continuum.io/anaconda/install) is a tool for creating isolated environment management. Virtualenv could also be used but anaconda has better support for building non-python code. When using Pipenv you probably are not going to need it, though pipenv might be
able to use an arbritrary environment.
- `pip` and `virtualenv` can be avoided when using Pipenv - pipenv uses them in its implementation.
- `pip-tools` is a good option for carefully managing production and development dependencies if not using `pipenv`.

A `Pipfile` and `Pipfile.lock` should *not* be committed to the project for library based projects - only abstract
dependencies should be specified in the `setup.py` for libraries.

## Import Style

Prefer absolute imports, otherwise I find at least one of flask or pytest or the editor/IDE have some import problem.
Pep-008 recommends absolute imports or maybe explicit relative imports. Implicit relative imports are removed from python 3.

```python
import mypkg.sibling
import mypkg.sibling as sibling
from mypkg import sibling
from mypkg.sibling import example
from . import sibling  # relative
from .sibling import example  # relative
```

## Tool config

Most tools (e.g. coverage, pytest, flake8, mypy) now allow their config to go in the one file `setup.cfg` instead of
requiring their own file (e.g. `mypy.ini`, `.flake`, and `pytest.ini`).

### Pytest

```ini
[tool:pytest]
addopts = --doctest-modules --ignore build
```

### MyPy

```ini
[mypy]
python_version = 3.6
ignore_missing_imports = true
```

Makes mypy quiet when it finds 3rd party code that does not have any type annotations.

## Running 'main' type python files (if part of package)

Running something like `app/main.py` within a project results in import errors as the main file does not know it is part of a package. Both setting the `PYTHONPATH` and doing `sys.path.insert` stuff seems ugly. See [Stackoverflow](http://stackoverflow.com/questions/1893598/pythonpath-vs-sys-path).

A shell script per runnable main file seems a reasonable approach, for example:

```bash
#!/bin/bash
BASEDIR=$(dirname "$0")
PYTHONPATH=$BASEDIR python3 app/main.py
```

## Coverage reports on tests

Install the python dependency `pytest-cov` into the virtual environment.
See `pytest --help`. For example, to run coverage in html or xml on `mymodule` and submodules.

`pytest --cov-report=html|xml --cov=mymodule` or `pytest --cov=mymodule` to print to terminal.

## Type hint linting and documentation

If using python3 and specificaly python3.5+ we can use type hints, that at least serves as minimal documentation and
provides some support for type driven development / domain modelling.

The [MyPy](http://mypy.readthedocs.io/en/latest/) project is a linter that will try to check those types statically.
It is however, an alpha status project, despite being > 5 years old.

## Enabling doctests in combination with pytest & flask

Putting this pytest `conftest.py` file in the main package directory(s) to fix this pytest/doctest/flask combination issue.

```python
"""Pytest configuration module to fix pytest/doctest-discovery/flask interaction issue."""
import importlib

def pytest_configure():
    patch_flask_for_doctest()

def patch_flask_for_doctest():
    """
    Patch flask magic objects to keep them from raising
    RuntimeErrors during doctest discovery.
    https://github.com/pallets/flask/issues/1680
    """
    flask = importlib.import_module('flask')
    object.__setattr__(flask.request, '__wrapped__', None)
    object.__setattr__(flask.session, '__wrapped__', None)
    object.__setattr__(flask.current_app, '__wrapped__', None)
```

repository: enerqi/python-skeleton

repo_name: enerqi/python-skeleton


text:
# meterthingy

Control an analog meter with your RaspberryPi.

Setting a value in a text file results in the meter showing that value.

MeterThingy Intro: https://vimeo.com/319197926
<br/>
MeterThingy HowTo: https://vimeo.com/392043509

Currently, meterthingy is specific to the RaspberryPi.

ToDo:
1) Add client to enable remotely sourced meter setting.
2) Refactor code. (Add comments, etc.)
3) Add scaling feature. It currently works with 0-100 scale.

repository: perryngordon/meterthingy

repo_name: perryngordon/meterthingy


text:
---
title: "Types of Cooperation Episodes in Side-by-Side Programming"
authors: [Lutz Prechelt, Ulrich Stärk, Stephan Salinger]
abstract: "In side-by-side programming, two programmers (typically working on related aspects
of a project) move their computers so close to one another that they can effortlessly change between
working alone and working together, where working alone is the primary mode. The technique was
proposed in order to obtain some of the advantages of pair programming at lower total effort. As
a first step towards understanding how and when to use side-by-side programming, the present
study aims at describing when and for what purpose side-by-side programmers get together to
cooperate. The main result is a classification of the cooperation episodes by purpose and content into
different types: Exchange project details, Exchange general knowledge, Discuss strategy, Discuss
step, Debug work product, Integrate work products, and Make remark. These types were derived
via the Grounded Theory method and are described conceptually in terms of the types of events
of which they consist. All concepts used in these descriptions are grounded in actual observations."
publishedAt: "ppig-2009"
year: 2009
url_pdf: "/files/2009-PPIG-21st-prechelt.pdf"
---


text:
---
layout: post
title:  "Variables"
date:   2022-11-07 01:00:00 -0700
categories: [school-year-2022-2023, lesson, activity]
---

## Lesson

1. What is a variable?
    * [Scratch Wiki: Variable](https://en.scratch-wiki.info/wiki/Variable){:target="_blank"}
2. Examples of variables.
    * Score.
    * Bank balance.
    * Sattelite position.
    * Lots more!
3. Using variables in Scratch.
    * Making a new variable.
    * Set variable to.
    * Change variable by.
    * Show/Hide variable.
    * Changing appearance of a variable on the stage... Double click on it.
    * Variable scope: Global (all sprites), Local (For this sprite only), Cloud.
4. Example: Clicking and keeping score.
    * Sprite scores.
    * Total score.

## Activity

1. Remix another project and add a variable.
    * Login to scratch using your class login.
    * Pick a shared project to remix from either our class studio (Name in
    upper right > My Class > Class Studios) or choose a
    [Starter Project](https://scratch.mit.edu/starter-projects){:target="_blank"}.
    * Add a variable to the stage and make it change.
2. Post your remix to the class studio: "Variables"

## Resources

### Videos

[MIT Scratch - Introduction to Variables](https://www.youtube.com/watch?v=JBaUVBSWbM8){:target="_blank"}

extension: markdown


text:
# Grafana InfluxDB Sensor Visualization

Grafana dashboard for visualizing sensor data. Data will be aquired using an ESP8266 and send over MQTT to Telegraf which saves it to the InfluxDB database.

## Requirements

* ESP8266
* TMP006 Temperature sensor (You can use the `mqtt.go` script instead to send fake data)
* PC with Docker installation for running MQTT, Telegraf, InfluxDB and Grafana

## Technology Stack

* Mosquitto is our MQTT broker which accepts data coming from sensors
* Telegraf subscribes to the MQTT topic, where sensors publish the data. Telegraf then saves the data into InfluxDB
* Grafana reads the data in InfluxDB and visualizes them in a dashboard

## Getting started

### Configuring telegram

Telegraf needs to be configured to read the data of your MQTT topic. For that, you will need to modify the following lines in the `telegraf.conf` files.

```conf
servers = ["tcp://mqtt_server_ip:1883"]
topics = [
  "sensors"
]
data_format = "influx"
```

Here you need to insert the IP of your MQTT server and the topics you want to be saved in the database (This will be localhost if you are using the included docker-compose file). Then you can continue by modifing the following lines under the `outputs.influxdb` tag.

```conf
[[outputs.influxdb]]
  urls = ["http://influxdb_server_ip:8086"]
  skip_database_creation = true
  username = "telegraf"
  password = "telegraf"
```

Here you need to insert the IP Adress of your influxdb server and the username and password of the database (This will also be localhost if you use the included docker-compose file).

### Deploying Grafana, InfluxDB, Telegram and Mosquitto

Now that you have configured telegram you can deploy it using the included docker-compose file.

```bash
docker-compose up -d
```

This will create all containers needed for the project. You now only need to upload the `SensorControl` script to your ESP8266 and configure your Grafana datasource and query. If you don't have a ESP8266 or TMP066 temperature sensor you can use the `mqtt.go` script instead which just sends fake sensor data over MQTT.

repository: AnhellO/learning-go

repo_name: AnhellO/learning-go