text:
= Byte Code Format
If I use a byte code interpreter, what's the instruction set and architecture?

Register based is higher performance than stack based, and not any more
difficult to implement. Eg, the Add opcode has 3 immediate operands,
which are stack frame slot indexes.

Opcodes are integers. The main interpreter loop is switch(opcode) inside
of a for(;;). The opcodes are sequential from 0, defined by enum OpCode, and
the default case uses a "notreached" compiler directive to guide optimization:
this is `__assume(false);` on MSC++ and `__builtin_unreachable();` in gcc.
ChakraCore uses this to optimize its interpreter loop; not sure if it helps
on gcc or clang.
* Direct threaded code is a popular alternative.
  In GCC, `goto (*ip++)` is faster than branch to top of loop and switch.
  It takes up more space (64 bits per opcode), so worse cache coherency.
  The `labels as values` gcc extension isn't available in MSC++.
  In 2014, it was alleged that Clang didn't adequately optimize
  this type of interpreter loop: the IP wasn't stored in a register,
  and the code for goto a label value was slower. I dunno if this is fixed,
  but I need clang for MacOS.

An operation consists of a 16 bit opcode, followed by zero or more
16 bit operands. Constants are loaded from a constant table.
Relative branches use a signed 16 bit offset into an array of shorts,
so 32767 ops could be an upper limit, unless I provide an extended branch
with a 32 bit operand for those special cases.
This seems good and simple: no memory alignment issues, and I won't run
out of registers (8 bit slot ids are limiting).

Rationale:
* Compact is good, fewer cache hits, more cache coherence.
* Opcodes can be 1 byte, I won't likely need more than 256 opcodes.
  But immediate operands need to be more than 1 byte,
  and that raises the issue of unaligned memory access.
  * Eg, relative branch.
  * I might need stack frames with more than 256 value slots?
  * Eg, immediate 8 byte values?
* Intel and ARM support unaligned memory access. ARMv7 needs to use
  special unaligned instructions: LDRD vs LDR. The compiler needs to know.
  MSC++ has an `unaligned` pointer type decoration, g++ doesn't
  (the documentation for `__attribute__(aligned(1))` doesn't give hope).
  If I have to use memcpy() to fix an alignment problem in the interpreter
  main loop, my performance will be crap.
* The clang mailing list describes using
  `typedef int32_t unaligned_int32_t __attribute__((aligned(1)));`
  to make unaligned pointers safe to use. So maybe I'm good?
  The same post gives reasons not to rely on this: the attribute isn't
  part of the type system, could be dropped in various contexts like template
  parameters and ?: operator.
* I could use 'short codes' instead of 'byte codes'.
  An instruction array is an array of uint16_t. Immediate operands are 16 bit.
  Constants are loaded from a constant table.
  A few operations might need rarely used variants with 32 bit
  immediate operands (eg, branch and load constant). I won't support stack
  frames with more than 65536 value slots.
* This seems good and simple. No alignment issues. I won't run out of registers,
  and I won't need to consider 8 and 16 bit versions of every arithmetic opcode.

Problem: I need 4 operands for Add: the 4th is a source pointer
`(Phrase*)` for reporting an error. This is kind of like how python and ruby
apparently have line numbers embedded in their operations.
* I don't really want to embed a 64 bit pointer in the instruction stream
  that is almost never used: poor cache locality.
* I could have a location table (array of `Phrase*`) and embed a 16 bit
  location index into the instruction. 25% more storage, but better
  cache locality. Easy to implement.
* When emitting an Add operation, instead of putting the location into the
  location table and emitting the location index inline, I could instead
  add an (opcode index, location) pair to an external table. Then, when an
  error occurs, use the opcode index to look up the location. Not intrinsically
  more difficult, improves cache locality, and the external table could later
  be extended or rearranged to support a reverse map from source to
  instructions.
* The opcode index could be stored in the Phrase. Then we exhaustively search
  the source tree for the index when an error occurs. This would speed up
  compile and slow down error handling, which is fine.
* I could have a location map that maps opcode ranges onto source pointers.
  The opcode array is split into a sequence of contiguous ranges.
  For each range, we store the length of the range (16 bits)
  and a source pointer. We use two arrays to eliminate alignment gaps.
  More work. Could be used to set a breakpoint at a source location by
  pointing to code in the editor? Single stepping?

It's unlikely I need more than 256 opcodes, which will fit in a byte.
What about literal operands, and their alignment?
A curv::Value is 8 bytes. I'll also need offsets or pointers for jumps,
and offsets relative to frame pointers for loading variables.
I could use 32 bit opcodes with an 8 bit operator field and 24 bits of
immediate operand. Constant Values are stored in a literal table.
* That's a lot of empty operand fields. Poor cache coherence.
  Ela uses two arrays of the same size, an ops array and an int32 opData array.
* Lua uses 32 bit opcodes with a 6 bit operation; register machine.
* CPython 3.3:
  * 101 opcodes: stack, flow ctrl, arithmetic, constructors, details.
  * 1 byte operation, optional unaligned 2 byte argument may follow
  * registers: IP, stack, fast_locals (local variables and parameters)
  * load_global is an index into an array of names
* Ruby

**Function Calls.**
Several cases:
* **Call to an unknown dynamic function value.**
  Here we are computing a function value at run time, which is stored in a
  value slot. With the current simplified function design, we compare the
  provided # of arguments with the nargs value in the function value, and
  abort if they are different. So: push the arguments,
  then `opCall(funSlot,nargs)`. Abort if fun->nargs != nargs,
  otherwise push the return value and branch to the function.
* **Call to a known static function.** In the machine code interpreter, this
  would be optimized in the same way as in C, with a call to a static address.
  Also, nargs checking happens at compile time.
  In the bytecode interpreter, the function is in the constant table,
  so `opCallConstant(funSlot)`. [builtin functions are accessed via the
  constant table, apparently.]
* ...

I could abstract the difference between different bytecode representations
using an abstract interface for generating and executing code.

I will separate the control stack from the argument stack.
One is pointers and one is doubles: potentially different alignment.

Registers:
* SP: stack pointer (value stack)
* FP: frame pointer (value stack)
* KP: constants
* IP: instruction pointer
* CS: control stack pointer

Function call:
* validate length of argument list (compile or run time)
* push arguments. SP points at 1+the last argument.
* call function. CS points at 1+the return address. IP points to function body.
* return: remember the top of stack value; pop all temporaries and the original
  arguments; push the return value; IP = pop the return address.


text:
Example Flask Applications
==========================

## GifMachine

> Use [GifMachine](http://gifmachine.xwl.me/) to create animated gifs from your favorite Youtube videos. Enter the URL to the Youtube video, the time the gif should start at and the time the gif should end at.

	# For a simple example, use the following:
	https://www.youtube.com/watch?v=34CmJ4qtw44
	00:00:00
	00:00:07
	200

branch_name: refs/heads/master

extension: md

gha_language: Python

license_type: permissive


text:
# Multi-Cluster-App-Deployer Controller Build Instructions

This document will show how to build the `Multi-Cluster-App-Deployer` Kubernetes Controller that operates on an AppWrapper kubernetes custom resource definition. It is for [master](https://github.com/IBM/multi-cluster-app-dispatcher/tree/master) branch.

## 1. Pre-condition

### Docker Environment

To build `Multi-Cluster-App-Deployer`, a running Docker env. must be available. Here is a document on [Getting Started with Docker](https://www.docker.com/get-started).

### Clone Multi-Cluster-App-Deployer Git Repo

Clone this repo in your local environement:

```
$ git clone git@github.com:IBM/multi-cluster-app-dispatcher.git
Cloning into 'multi-cluster-app-dispatcher'...
Checking connectivity... done.
Checking out files: 100% (####/####), done.
$
```

## 2. Building the Multi-Cluster-App-Deployer Controller

### Build the Executables

Run the build script `build.sh`:
```
$ cd multi-cluster-app-dispatcher/deployment/

$ ./build.sh
...
+ cd ..
+ make generate-code
Compiling deepcopy-gen
Generating deepcopy
go build -o _output/bin/deepcopy-gen ./cmd/deepcopy-gen/
_output/bin/deepcopy-gen -i ./pkg/apis/controller/v1alpha1/ -O zz_generated.deepcopy
+ make kar-controller
mkdir -p _output/bin
CGO_ENABLED=0 GOARCH=amd64 go build -o _output/bin/kar-controllers ./cmd/kar-controllers/
$
```

Ensure the executables: `deepcopy-gen`, `kar-controllers`  are created in the target output directory:
```
$ ls ../_output/bin/
deepcopy-gen	kar-controllers
$
```

### Build the Multi-Cluster-App-Dispatcher

Run the image build scfript `image.sh`:

```
$ ./image.sh
...
+ make images
Changed to executable directory
Build the docker image
cd ./_output/bin
docker build --no-cache --tag mcad-controller:v1.14 ...
Sending build context to Docker daemon  122.7MB
Step 1/7 : From ubuntu:18.04
 ---> ea4c82dcd15a
Step 2/7 : ADD mcad-controller /usr/local/bin
 ---> 674cefbce55a
...
 ---> 911c7c82b5ee
Step 7/7 : WORKDIR /usr/local/bin
 ---> Running in f2db4649e7a6
Removing intermediate container f2db4649e7a6
 ---> 1dbf126976cf
Successfully built 1dbf126976cf
Successfully tagged mcad-controller:v1.14
$
$ docker images mcad-controller
REPOSITORY          TAG                 IMAGE ID            CREATED             SIZE
mcad-controller     deleteme            1dbf126976cf        11 minutes ago      272MB
$
```


text:
---
layout: page
title: Presets
nav_order: 4
---

# Taterzen Presets

---

## What are presets?

Presets allow you to export certain Taterzen along with all its equipment, skin, path, command action etc. to file.
You can than share those with your friends and load custom presets.

### Exporting Taterzen to presets
```
/npc preset save <preset_name>
```
will export selected Taterzen to the `minecraft_folder/config/Taterzens/presets/<preset_name>.json`.

### Loading Taterzen from presets
```
/npc preset load <preset_name>
```
will load & spawn Taterzen from `minecraft_folder/config/Taterzens/presets/<preset_name>.json`.

license: MIT

repository: samolego/Taterzens

gha_language: Java

gha_license_id: MIT

repo_name: samolego/Taterzens


text:
---
layout: post
title: "GPSP: Graph Partition and Space Projection based Approach for Heterogeneous Network Embedding"
date: 2018-03-07 10:54:25
categories: arXiv_AI
tags: arXiv_AI Embedding Classification Relation
author: Wenyu Du, Shuai Yu, Min Yang, Qiang Qu, Jia Zhu
mathjax: true
---

* content
{:toc}

##### Abstract
In this paper, we propose GPSP, a novel Graph Partition and Space Projection based approach, to learn the representation of a heterogeneous network that consists of multiple types of nodes and links. Concretely, we first partition the heterogeneous network into homogeneous and bipartite subnetworks. Then, the projective relations hidden in bipartite subnetworks are extracted by learning the projective embedding vectors. Finally, we concatenate the projective vectors from bipartite subnetworks with the ones learned from homogeneous subnetworks to form the final representation of the heterogeneous network. Extensive experiments are conducted on a real-life dataset. The results demonstrate that GPSP outperforms the state-of-the-art baselines in two key network mining tasks: node classification and clustering.

##### Abstract (translated by Google)
在本文中，我们提出了一种基于图形分割和空间投影的新方法GPSP，以了解由多种类型的节点和链接组成的异构网络的表示。具体而言，我们首先将异构网络划分为同构和双向子网络。然后，通过学习投影嵌入向量，提取隐藏在二分子网络中的投影关系。最后，我们将双向子网络的投影向量与从均匀子网络学习的投影向量连接起来，形成异构网络的最终表示。对真实数据集进行了大量实验。结果表明，GPSP在两项关键网络挖掘任务（节点分类和聚类）方面优于最先进的基线。

##### URL
[http://arxiv.org/abs/1803.02590](http://arxiv.org/abs/1803.02590)

##### PDF
[http://arxiv.org/pdf/1803.02590](http://arxiv.org/pdf/1803.02590)


text:
---
layout: post
title: Starting DewHeart
---

Well... it looks like I've attempted a challenge greater than I thought I would
take. I have decided to make DewHeart, a platformer game in 40 stages, where
the player, Jasper Dew, has to collect Red Bull cans in 40 stages in order to
take his resting heart rate from 0bpm at the start, to 40bpm at the end. Once
he reaches 40bpm, he is released from hospital.

Today, after finishing HeartBeast's Godot platformer game tutorial on YouTube, I
set out to start making sprites for the game, because really, I can't have the
game without sprites. Well... it turns out I'm not that good an artist. So I've
started working on making sprites, but this is gonna take a long time to draw
up, because obviously I've been working with a mouse (not the best tool for art)
and I'm not a really experienced artist. Hopefully I'll develop my skills in
pixel art here so its quicker in the future. Just making the first standing
model of Jasper (not yet finished) has taken a substantial amount of time - and
I'll need to make quite a few different variations on this for different
actions, which I'm sure will give me quite a big challenge. I want to try make
his hair flow in the air while he's running, and change depending on his
movement - not for any grand purpose, but I love his hair (hi Jasper ehehe).

All in all, even though I anticipate a great challenge ahead of me on this
journey, it should be great fun and I should have a cool game for my friends
and I at the end of it - but let's just say Jasper will probably be better by
then.

repository: smithomaster/DewHeart

repo_name: smithomaster/DewHeart


text:
---
title: "Multi Language"
date: 2020-01-30T15:34:13+09:00
draft: false
weight: 6
enableToc: false
---

To enable/disable the multi language button in the footer, edit the parameter `enableLangChange` in `params.toml`. The default language of this theme is English. If you want to use another language, follow these steps

1. Make a menu file.

    ```
    root
    ├── config
    │   ├── _default
    │   │   ├── ...
    │   │   ├── menus.ko.toml
    ```

    ```menus.ko.toml
    [[main]]
      identifier = "about"
      name = "about"
      url = "/about/"
      weight = 1

    [[main]]
        identifier = "archive"
        name = "archive"
        url = "/archive/"
        weight = 2
    ...
    ```

2.  Make a language-code folder. Then make a content file.

    ```
    root/content/ko/markdown-syntax.md
    root/content/ko/hugo-blog.md
    ...
    ```

    I made a `ko` folder in the `content` folder. In that way, we can easily organize our content by language.

3. Make an i18n file.

    ```ko.toml
    [search-placeholder]
    other = "검색..."

    [summary-dateformat]
    other = "2006년 01월 02일"

    [tags]
    other = "태그"
    ...
    ```

    We already have some i18n files. If there is your language among them, this process can be omitted.

    - en
    - eo
    - fa
    - fr
    - ko
    - zh

4. Edit config.toml file.

    ```toml
    defaultContentLanguage = "ko"
    defaultContentLanguageInSubdir = true
    hasCJKLanguage = true
    ```

repository: aakashhemadri/zzoDocs

repo_name: aakashhemadri/zzoDocs


text:
#Introducing the Polyrex links gem 0.1.2

The polyrex-links gem was intended to run as a back-end web service to handle clean URL requests and return the associated longer URL. I've been experimenting with QR codes, and I've reached the conclusion it's better to change the associated URL behind a clean URL, than it is to regenerate and print out QR codes each time.

    require 'polyrex-links'

    lines =<<LINES
    food http://kitchen.com/food
      fruit http://kitchen.com/fruit
        apples http://kitchen.com/fruit?q=apples
        pears http://kitchen.com/fruit?q=pears
    spoons http://kitchen.com/spoons
    LINES

    links = PolyrexLinks.new
    links.parse lines
    puts links.to_xml pretty: true

    links.locate "food/fruit/"

However say for example it refers to a physical directory which is:

/home/james/dws2/images

the clean URL stored in polyrex-links may look like this:

/images

and the actual URL requested may be:

/images/sunshine.jpg

and the target URL is
/do/file/read?name=images

after locating the polyrex-link the target URL would be:

/do/file/read?name=images/sunshine.jpg

repository: jrobertson/polyrex-links

repo_name: jrobertson/polyrex-links


text:
# Notes about the stylesheets

Some stylesheet parameters are defined in stylesheet/param.xsl

## Images

See e-template.xml for example markup.

### Image resolution

`$resolution` is defined to be 96dpi (dots per inch). This is the _input_
resolution, not the output resolution. Particularly for PDF output (Formatting
Objects) the `<img>` element has an optional pdfres attribute giving an integer
measured in dpi. Thus `<img pdfres="200"...>` will map to an image in the
/images/200dpi/ directory, `<img pdfres="350">` will map to an image in the
/images/350dpi/ directory and so forth. All dimensions however are calculated
using the default resolution of 96dpi, which guarantees that web and PDF will
give images of the same dimensions on a 96dpi screen (1024x768, 15" monitor).

`$image-folder` is usually defined to be the `images/` folder.

## Tables

See tropical.xml for example markup.

Similar calculations are used in defining table widths, and it may help to know
that a 16cm wide paper dimension will reflect a table just over 605 pixels wide
at 96dpi.

_Multiple_ spans will cause a problem in the DocBook output. They will be
converted, but column alignment is not _guaranteed_ to be correctly applied. The
solution to this issue turned out to be a hard-problem, possibly testing the
limits of what is possible with XSLT 1.0.

## Bibliographies

A basic template for markup of bibliographies is as follows:

```
<bibliography>
<bibitem type="article" label="McKinsey">
  <editor>Ted Hall and Bill Lewis and Stephen Nickell and Robert Solow</editor>
  <title>Driving productivity and growth in the UK economy</title>
  <month>October</month>
  <year>1998</year>
  <journal>McKinsey Global Institute</journal>
</bibitem>
</bibliography>
```

The type attribute has the alternate value "book".

The label attribute is a cross-reference, and is required.

Here is the DTD description:

```
<!ELEMENT bibliography (bibitem)*>

<!ELEMENT bibitem       (author | editor | title | month | year |
			   journal | publisher | edition | note)+>
<!ATTLIST bibitem
          type          (article | book)                #REQUIRED
          label         CDATA                           #REQUIRED
>
```

Note that the editor/author field can contain multiple authors and each value is
separated by ' and '. When transforming to DocBook, a nice algorithm will parse
this information and separate surnames from forenames. Note that you will have
problems with names like Von Neumann and Van der Waals, which will produce the
undesirable V. Neumann and V. d. Waals in the output. I have no workaround, but
I think you will agree that the markup schema is succinct enough to enable easy
hand-coding. You will have no problems with double-barrelled English surnames
such as Pinkerton-Smith. (The space is significant).

The note field allows more extensive comments including links. This is useful
especially for journal articles, though I can envision links to Amazon titles in
this field also. The perspective DTD uses normal HTML conventions for
hyperlinks.

## Tcl scripts

Options have been included to render PDF documents on OS X or Windows, but you
will need to comment-out/uncomment some lines in the scripts. Please don't feel
inhibited from editing the source code.

repository: ctipper/perspective

branch_name: refs/heads/main

repo_name: ctipper/perspective


text:
[![](https://github.com/esrlabs/chipmunk/workflows/BuildAndReleaseMaster/badge.svg)](https://github.com/esrlabs/chipmunk/actions)
[![](https://github.com/esrlabs/chipmunk/workflows/LintMaster/badge.svg)](https://github.com/esrlabs/chipmunk/actions)

# Chipmunk Log Analyzer & Viewer

`chipmunk` is a fast logfile viewer that can deal with huge logfiles (>10 GB). It powers a super
fast search and is supposed to be a useful tool for developers who have to analyze logfiles.

## basic searching & highlighting

`chipmunk`'s search is powerd by rust and is super fast even for gigabytes of logs.

![](https://raw.githubusercontent.com/esrlabs/chipmunk/master/docs/assets/search-highlights.png)

Of course multiple searches are supported and filters can be saved and restored.

![](https://raw.githubusercontent.com/esrlabs/chipmunk/master/docs/assets/multiple-filters.png)

## Bookmarks

Bookmarks can be used to pin down log entries that are important to the user.

![](https://raw.githubusercontent.com/esrlabs/chipmunk/master/docs/assets/bookmarks.png)

## DLT support

The Diagnostic Log and Trace AUTOSAR format is widely used in the automotive industry and is a
binary log format. `chipmunk` can understand and process DLT content in large quantities.

![](https://raw.githubusercontent.com/esrlabs/chipmunk/master/docs/assets/dlt-support.png)

## Combining multiple files

To help developers to deal with multiple logfiles, chipmunk can automatically detect timestamps and
merge logs from multiple files.

![](https://raw.githubusercontent.com/esrlabs/chipmunk/master/docs/assets/merging-timestamp-detection.png)

Of course simple concatenating files is also a supported usecase. Just drag & drop multiple files
and select your operation:

![](https://raw.githubusercontent.com/esrlabs/chipmunk/master/docs/assets/merge-or-concat.png)

After that, the files are combined.

![](https://raw.githubusercontent.com/esrlabs/chipmunk/master/docs/assets/merge-result.png)

## Keyboard Shortcuts

Important to most developers: a good and intuitive set of keyboard shortcuts.

![](https://raw.githubusercontent.com/esrlabs/chipmunk/master/docs/assets/shortcuts.png)

repository: Alexa-cell/chipmunk

repo_name: Alexa-cell/chipmunk


text:
---
title: ""
permalink: design-docs/instance-id-alternative-solution-1.html
hide_sidebar: true
hide_navtoggle: true
toc: false
---

# Overview

Gerrit has already a [parameter](https://gerrit-documentation.storage.googleapis.com/Documentation/3.1.4/config-gerrit.html#gerrit.instanceName)
to define an identifier for the instances. This could be included in the events
generated by the different nodes.

##  Implementation

### Setup

The `instanceName` is currently set in the `gerrit.config`. It defaults to the
full hostname if not set in `gerrit.instanceName`.

### Propagation

Propagation of the id in the events can be done as explained in
[Proposed solution](/design-docs/instance-id-solution.html) or
[Alternative Solution - 2](/design-docs/instance-id-alternative-solution-2.html).

##  Limitations

`instanceName` is not used to uniquely identify an instance in a cluster.

For example, it is, available to the email templating system.

Using it would couple the presentation logic to something more backend specific
as identifying an instance in a cluster.
Also, it could not necessarily be relevant for the end users receiving it in
their inbox.

##  Use case fulfilment

Same consideration as in the proposed [solution](/design-docs/instance-id-solution.html)

repository: GerritCodeReview/homepage

gha_language: HTML

repo_name: GerritCodeReview/homepage


text:
----------------------------------
## matlab/2022a ##
Matlab IDE

Important note about licensing
------------------------------

The Matlab application includes a commercial product, and requires a MATLAB license to run. On first run, a license dialog will appear. Users should follow these steps to activate license:
1. Choose "Activate automatically using the internet" (and press Next)
2. Enter their institutional email address and password (and press Next)
3. Select license to use (and press Next)
4. A username will be displayed (just press Next)

If the user is eligible for a MATLAB license through the institution, the license will be downloaded to the user home directory (inside the ~/.matlab folder). After the license dialog closes, it is required to re-run the Matlab application. The license will be now available for future executions of Matlab, and the dialog will not show again.

To use the application without internet connectivity, it should also be possible to generate a license on the mathworks website, and place it in ~/Downloads (exact file name does not matter, but it should have a .lic extension). The license should be detected automatically when the Matlab application starts (no license dialog will be presented). Generating a license on the Mathworks website requires specifying username and host id. Username can be displayed in Linux by typing 'id' in the terminal. For instructions on how to find your host id, read here: https://au.mathworks.com/matlabcentral/answers/101892-what-is-a-host-id-how-do-i-find-my-host-id-in-order-to-activate-my-license?s_tid=srchtitle

Examples
--------

  LAUNCH INTERACTIVE IDE -

  matlab

  RUNNING SCRIPT IN BATCH -

  matlab -batch command

  COMPILYING C CODE TO WORK WITH MATLAB -

  mex

More documentation can be found here
------------------------------------

  https://hub.docker.com/r/mathworks/matlab-deep-learning

  mathworks.com

To run applications outside of this container
---------------------------------------------

  ml matlab/2022a

Citation
--------

  (MATLAB, Mathworks Inc.)

----------------------------------

repository: CAIsr/caid

gha_language: Shell

repo_name: CAIsr/caid


text:
---
title: If...Then...Else
---

If-then-else clauses have the form:

````
if <conditional-expression> then <expression1> else <expression2>
````

Both `<expression1>` and `<expression2>` must have the same type, and
`<conditional-expression>` must be a singular Boolean.

If `<conditional-expression>` is true, then `<expression1>` is evaluated and
returned; otherwise `<expression2>` is evaluated and returned.

If-then-else clauses have been implemented as late-binding, so potential missing
inspectors on the branch not taken are ignored. This makes it safe to write
cross-platform expressions without worrying about causing errors for incorrect
OS-specific Inspectors. For example, you can write:

{% qna %}
Q: if name of operating system contains "Win" then name of application "conf.exe" of registry else "conf.exe"
A: conf.exe
{% endqna %}

On a non-Windows OS, this expression runs the `else` expression and
avoid attempting to inspect a non-existent registry.

If-statements can be useful for reporting user-defined errors:

{% qna %}
Q: if (year of current date as integer < 2006) then "Still good" else error "Expired"
E: User-defined error: Expired
{% endqna %}

This expression throws a user-defined error if the argument is false.

{% qna %}
Q: if (name of operating system = "WinXP") then "wired" else if (name of operating system ="WinNT") then "tired" else "expired"
A: wired
{% endqna %}

This expression does a three-way test of the operating system.

Watch the video about the [If-Then-Else in Relevance Language](https://www.youtube.com/watch?v=vRoZhvShPeY) to have more information about this clause.

gha_language: JavaScript


text:
# WoT Explainer Video Script

Here are the [original storyboard slides](https://github.com/w3c/wot-marketing/blob/master/material/wot_explainer_script.pdf),
screenshots of which are shown below.
However, please note that the images in the storyboard are only meant to be suggestive,
and the text on the storyboard slides does not match the current script given as text below.

## General Requirements
* Imagery and text should be unbiased with respect to gender and race.
   - There are two stakeholders, the "winemaker" and the "developers".
   - The script has been written to avoid pronouns or to use gender-neutral "they"
   - Developers is plural to avoid grammatical issues with verb agreement.
   - The pronoun "they" is occasionally used in the singular to refer to the winemaker.
* Characters should either have no gender or be evenly balanced with respect to gender.
* Given the limited number of characters available, characters should not have an identifiable race.
   - One possible suggestion: use animal characters.
* Visual style should be simple, clean, and professional.
* Color choices should make the video accessible to color-blind individuals.
   - Avoid distinctions along only a red-green hue axis
* Text should be large and as readable as possible
   - Normal text should use a proportional sans-serif font
   - Code examples when shown should use a fixed-width font such as Courier

## Scene 1: The Winemaker
![Scene01](script_images/Scene01.png)
* Spoken:
   - A winemaker is looking for ways to increase productivity while maintaining excellent product quality.
* Staging: Far-away view of vineyard (maybe animation that zooms in from clouds...)

## Scene 2: Sensors and Sprinklers
![Scene02](script_images/Scene02.png)
* Spoken:
   - To monitor and control growing conditions,
     the winemaker plans to install humidity and temperature sensors,
     and a sprinkler system.
* Staging:
   - Keep zooming in, stop on a closeup of some grapes on the vine
   - Show addition of sensors and sprinkler system (eg have them pop up in the field)

## Scene 3: Web Service for Weather Forecasts
* Spoken:
   - Weather forecast data from an online web service would also be useful in order
     to predict watering requirements.
* Staging:
   - Show data coming from cloud
   - Since it's weather data, can be from an actual cloud.
   - Data can be 0's and 1's falling as rain...

## Scene 4: Contacting the Web Agency
![Scene04](script_images/Scene04.png)
* Spoken:
   - The winemaker decides to engage an IT consultant.
   - The winemaker would like to use the developer of their web presence to realize an IoT solution.
* Text (it and the map should be "built" as the result of a simulated online search):
   - Web Agency
   - Rosental 7, Munich, Germany
   - phone: +49 89 12345678
   - twitter: @webagency
   - The Web Agency provides solutions for your web and social media presence

* Staging: "Build" the result of an online search for a web solution provider

## Scene 5: Web Agency Developers
![Scene05](script_images/Scene05.png)
* Spoken:
   - The developers at Web Agency like the new challenge and are willing to broaden their IoT knowledge.
   - They are experts in both web frontend and backend technologies using Node JS.
   - However, they are worried about the interoperability problems that they experienced
     in a previous IoT project.
* Staging:
    - Show picture of a developer hacking away, but then scratching his/her/their head,
      shuddering a little at some bad memories of a past project
      (maybe a thought bubble showing the consultant vainly trying to plug
      together two incompatible connectors)
* Comments:
    - IoT should be pronounced Eye-oh-Tee.  Node JS is Node-Jay-Ess.
    - We're going to assume the viewer knows what IoT (Internet of Things) is and have chosen not
      to define it.

## Scene 6: WoT, Tools, and Domains
![Scene06](script_images/Scene06.png)
* Spoken:
    - After searching online for a solution,
      the developers find information on the Web of Things,
      also known as Double-U-oh-Tee: "WoT".
    - WoT is a W3C activity that enables Web developers to become IoT developers
      using the tools and frameworks they love.
    - WoT can be applied to many different IoT domains,
      such as Manufacturing or Building Automation,
      but is also applicable to the winemaker's problem in the Agriculture domain.
* Staging (Updates that there should be two scenes):
    - Simulate an online search, typing in "IoT interoperability solution using web technology"
      into a search box, then show some results popping up (represented as icons and logos)
    - WoT logo popping up should co-incide with narration speaking "WoT"
    - Other logos (JS, etc) should pop up with the phrase "tools and frameworks they love"
         - Use the following "tool" logos: HTML, JSON, JS (Javascript), Typescript, Node-RED,
           Angular, RDF, React, and Vue
    - Clear the tools and frameworks logos, and then when domains are being talked about show
      "domain" logos
         - Domain logos (as in slide above): Building Automation, Manufacturing, Smart Grid,
           Smart City, Healthcare, Agriculture, Cloud Systems...
         - When "Building Automation", "Manufacturing", and "Agriculture" are mentioned,
           highlight the corressponding logo

* Comments:
    - When spoken, introduction of the WoT acronym needs to be explicit.  Unlike IoT, we give it
      an explicit definition.  WoT should be pronounced as "Whot", except when the acronym is first
      spelled out.

## Scene 7: Learning About WoT
![Scene07](script_images/Scene07.png)
* Spoken:
    - The developers are happy to find a bunch of WoT tutorials on thingweb.io, YouTube, and GitHub.
    - With node-wot, various protocol bindings like HTTP, MQTT, and CoAP, and a browser bundle,
      the developers easily create a full stack IoT solution.
    - Their solution connects all the devices and includes a great user interface built with web technology.
* Staging:
    - Show code rapidly being built, and a mock user interface popping up
    - User interface mock-up should have a set of icons for watering (a water drop icon),
      weather sensing functions (sun, rain, etc) on a web page, and a map of the vineyard.
    - Maybe a representation of "tutorials" should also flow down the right side of the screen
      (icons representation of videos, documents, etc) when those are mentioned.

## Scene 8: Modular Development
![Scene08](script_images/Scene08.png)
* Spoken:
    - Instead of creating a one-off, proprietary solution,
      the developers use the WoT methodology to create IoT building blocks.
    - These building blocks extend their existing Web technologies portfolio.
    - Thing Descriptions, WoT application templates, and IoT semantics are now in
      the same portfolio of reusable modules as HTML pages, Javascript packages,
      or CSS from former web projects
* Staging:
    - Show a structure metaphorically being built from a collection of blocks

## Scene 9: Thing Descriptions
![Scene09](script_images/Scene09.png)
* Spoken:
    - The main element of the WoT methodology is the Thing Description, also known as a Tee-Dee.
    - The TD is comparable to an index.html for Things
* Staging:
    - Show a Thing/device (perhaps a sprinkler or sensor from the opening)
    - Show a "tag" attached to it (perhaps with a WoT TD logo, which we will provide)
    - Open tag, zoom in, see JSON of TD (which we will provide...)
* Comments:
    - Picture above represents only the final step of zoom
    - The TD acronym needs to be explicitly introduced;
      also include "WoT TD" in text superimposed on top of the screen, along with the TD logo

## Scene 10: Questions and Answers
![Scene10](script_images/Scene10.png)
* Spoken: Various questions can be answered by the information in the TD
* Text: (answers to various questions pop up sequentially in a circular array around WoT TD logo;
  do not need to be spoken)
    - Identification
    - Data organization
    - Access
    - Units
    - Types
    - Interactions
    - Security
    - Relationships
* Staging:
    - Developer has a thought bubble, zoom into it to set stage...
    - Text elements above should show up one by one, get "checked off"

## Scene 11: Becoming IoT Experts
![Scene11](script_images/Scene11.png)
* Spoken:
   - Instead of fiddling around for months,
     the developers create the IoT solution in just a few sprints by combining WoT TDs,
     WoT protocol bindings, and WoT scripting with their web expertise.
   - The developers gain confidence in IoT and from now on consider themselves experts
     in both Web and IoT technologies.
* Staging:
   - Imaging showing high-speed development, maybe playing off "sprint"
     (eg show developers running down a track)

## Scene 12: Next Job
![Scene12](script_images/Scene12.png)
* Spoken:
    - Now the developers are ready to tackle their next IoT challenge.
* Text (on job posting):
    - Extend a hotel's building automation system with home automation components
      and give the house technician a nice user interface for operating it
* Staging:
    - Show job board
    - Zoom in on a job posting with the above written text, picture of a hotel
    - Zoom to WoT logo when talk about methodology

## Scene 13: WoT Logo Closing
Spoken:
  - And yes, WoT is THE methodlogy they will use.
![Scene13](script_images/Scene13.png)
* Staging:
    - zoom into WoT logo, hold

gha_license_id: NOASSERTION


text:
## Elm Front-End Code

To build and package the front-end of Cluster Broccoli, you need to have Elm
and NPM installed.

### Setup the Development Environment

- `npm install`
- `npm run setup`

### Run the Tests

- `npm run test`

### Compile and Package

- `npm run package`

repository: oribaldi/cluster-broccoli

repo_name: oribaldi/cluster-broccoli


text:
# Tutorial: Getting Started with Truss

We will build a simple service based on [echo.proto](./_example/echo.proto)

# Installation tips

1. Follow instructions in the [README](./README.md)
  - Can use `brew install` to get protobuf, golang, but not other packages (`go get` the rest).
2. Go to truss installation folder and run `make test`
  If everything passes you’re good to go.
  If you see any complaints about packages not installed, `go get` those packages
  If you encounter any other issues - ask the developers
3. To update to newer version of truss, do `git pull`, or `go get -u github.com/metaverse/truss/...` truss again.

# Writing your first service

Define the communication interface for your service in the *.proto file(s).
Let's start with [echo.proto](./_example/echo.proto) and read the helpful comments.

## What is in the *.proto file definitions?

The name of the generated service will be based on the package name. (Readability-wise, it is good practice to use the same name for the service definition.)
```
package echo;
...
service Echo{...}
```
The service API is defined through RPC calls and a set of corresponding request and response messages.
The fields in the message definition are enumerated - this is a requirement for protobuf to serialize the data.
```
message LouderRequest {
  string In = 1;          // In is the string to echo back
  int32  Loudness = 2;    // Loudness is the number of exclamations marks to add to the echoed string
}
```
The RPC calls can be annotated with HTTP transport option (endpoint name and type of request). For this we must import the google annotations library.

```
import "github.com/metaverse/truss/deftree/googlethirdparty/annotations.proto";

service Echo {
...
  rpc Echo (EchoRequest) returns (EchoResponse) {
    option (google.api.http) = {
        // All message fields are query parameters of the http request unless otherwise specified
        get: "/echo"
      };
  }
...
}
```
Most of the time a `get` request is sufficient. If you wish to transmit parameters via the body, use `post`.
Currently, if your message contains fields of type `map` they must be transmitted in the body. You would annotate it similarly to the Louder function in our example.
```
  rpc Louder (LouderRequest) returns (EchoResponse) {
    option (google.api.http) = {
        post: "/louder/{Loudness}"    // Loudness is accepted in the http path
        body: "*"                     // All other fields (In) are located in the body of the http/json request
      };
  }
```

The service definition can be split across multiple proto files. However, it is a good practice to keep all the RPC definitions in the same file, to make sure there are no naming conflicts.

## Understanding generated file structures

In your terminal, go to the folder containing echo.proto and run `truss *.proto` command. This will generate the service folder (by default at the same level as the proto files). The command will succeed silently. Your directory will now look like this:

```
.
├── echo-service
|   ├── cmd
|   │   └── echo
|   │       └── main.go
|   ├── echo.pb.go
|   ├── handlers
|   │   ├── handlers.go
|   │   ├── hooks.go
|   │   └── middlewares.go
|   └── svc
|       └── ...
└── echo.proto
```
From the top down, within `echo-service/`:
  - `svc/` contains the wiring and encoding protocols necessary for service communication (generated code)
  - `handlers/handlers.go` is populated with stubs where you will add the business logic
  - `cmd/echo/` contains the service main, which you will build and run shortly
  - `echo.pb.go` contains the RPC interface definitions and supporting structures that have been translated from `echo.proto` to golang

If you try to build and run your service now, it will respond with empty messages. There is no business logic yet! We shall add it in the next step.

You can safely modify only the files in handlers/. Changes to any other files will be lost the next time you re-generate the service with truss.

## Implement business logic

Open `handlers/handlers.go` using your favorite editor. Find the Echo function stub. It should look like this:
```
func (s echoService) Echo(ctx context.Context, in *pb.EchoRequest) (*pb.EchoResponse, error) {
	var resp pb.EchoResponse
	resp = pb.EchoResponse{
	// Out:
	}
	return &resp, nil
}
```
Notice that the stub has created an empty `EchoResponse` structure and suggests that we should fill in the `Out` field (commented field). Let's do this! Remember that we defined EchoResponse.Out as a string in out echo.proto, or you can verify what the structures are by looking at the golang definitions in echo.pb.go. In the case of echo, let's say back what we heard.

```
func (s echoService) Echo(ctx context.Context, in *pb.EchoRequest) (*pb.EchoResponse, error) {
	var resp pb.EchoResponse
	resp = pb.EchoResponse{
	   Out: in.In,
	}
	return &resp, nil
}
```

## Build/Run the client and server executables

From the directory containing echo.proto run
`go build echo-service/echo` and
`go build echo-service/echo`

Create another terminal window to run the server in, navigate to the same directory and launch the server:
`./echo`
When server starts up, you should see something like this:
```
ts=2016-12-06T23:25:14Z caller=main.go:55 msg=hello
ts=2016-12-06T23:25:14Z caller=main.go:106 transport=HTTP addr=:5050
ts=2016-12-06T23:25:14Z caller=main.go:98 transport=debug addr=:5060
ts=2016-12-06T23:25:14Z caller=main.go:124 transport=gRPC addr=:5040

```
The server is now waiting for incoming messages.
At this point we can send a request to the server via networking tools (telnet, curl) and construct message directly

Let's do the latter, in your first terminal. To learn how to launch client with proper parameters run `./echo -help`. The printout will tell you what methods the service supports and all the additional flags that must be set to call a certain method

Now run `./echo echo -in “hello microservices”`
The client terminal will display messages that were sent and received.

You can also specify the address to send messages to via -grpc.addr or -http.addr flags (e.g. `-grpc.addr localhost:5040`), should you want to change the port the server runs on, or test it out on separate machines.

To shutdown the server, press Ctrl+C in the server terminal

## Implement more things!

The following is left as an exercise to the reader:
  - Implement logic for the Louder call
    - code the logic inside the stub
    - now separate this logic into an unexported helper function
  - Define a new RPC call in echo.proto
    - regenerate service with truss, check that your old logic remains
    - implement the logic for your new call in a separate package, place it ouside of echo-service
    - wire in the new logic by importing the package in the `handlers.go`
  Suggestion: Save everything the service hears and echo all of it back. See repeated types (protobuf), package variables and init() function (golang).
  - Remove an RPC call definition from echo.proto
  	- regenerate service with truss, verify that the call no longer exists
  - Break things
  - Launch the server on a different port, or different machine, and talk to it (hint: run `./server_main -h`)
  - Try running multiple servers at once

# Additional features

## File placement

You can control the location of the output folders for your service by specifying the following flags when running truss
```
  --svcout {go-style-package-path to where you want the contents of {Name}-service folder to be}
```

Note: “go-style-package-path” means exactly the style you use in your golang import statements, relative to your $GOPATH.

Executing this command will place the *.pb.go files into `$GOPATH/truss-demo/interface-defs/`, and the entire echo-service contents (excepting the *.pb.go files) to `$GOPATH/truss-demo/service/`.

## Middlewares

 TODO

repository: metaverse/truss

gha_language: Go

repo_name: metaverse/truss


text:
# [`timetable.py`](https://github.com/ineshbose/boyd_bot_messenger/blob/master/timetable.py)

This script handles going through the timetables.

## Packages Used

* [icalendar](https://github.com/collective/icalendar)
* [requests](https://github.com/psf/requests)
* [pytz](https://github.com/stub42/pytz)
* [dateutil](https://github.com/dateutil/dateutil)
* [fuzzywuzzy](https://github.com/seatgeek/fuzzywuzzy)

## Setup

The script is initialized using the following lines.

```python
# Used to localize time and compare datetimes
tmzn = pytz.timezone("Europe/London")

# This can be changed to any university's URL
cal_url = "link/to/timetable.ics"

# A threshold for string-matching
fuzz_threshold = 40

# Calendars as dictionaries corresponding to UID
calendars = {}
```

## `login(uid, uni_id, uni_pw)`

Logins in user with the provided credentials.

A request fetches content from a URL with authentication, and `icalendar.Calendar` creates a calendar from that content. If the operation was successful, the user was successfully logged in. If not, `icalendar.Calendar` throws an exception since the content was not suitable to create a calendar which means the credentials were unable to fetch content through the request; therefore the login was unsuccessful.

```python
>>> login("1234567890", "123456Z", "password123")
False
APP:<PHONE_NUMBER> undergoing registration. Result: False
```

|                                                                        Parameters                                                               |           Returns            |
|-------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------|
| **`uid`:** the unique sender ID of the user
**`uni_id`:** the university ID of the user
**`uni_pw`:** the university password of the user | **`bool`:** the login result |

## `format_event(event)`

Formats calendar event in a presentable string.

The events in `icalendar.Calendar` are in the form of a dictionary. This function creates a string containing all necessary details about the event in a readable manner (example: `datetime` is not readable) and returns it.

**Note:** The formatting is according to how event conventions are for the University of Glasgow. For example, usually events are titled something like "OOSE2 (Laboratory) OOSE2 LB01" or "Computing Science - 1S (Lecture) CS1S Lecture.", therefore the unnecessary / repetitive words after "(Laboratory)" or "(Lecture)" are removed.

```sh
>>> format_event({"summary": "Python Tutorial", "dtstart": <20050404T080000Z>,
                  "dtend": <20050404T090000Z>, "location": "Boyd Orr Building"})
📝 Python Tutorial
🕘 08:00AM - 09:00AM
📅 04 April 2005 (Monday)
📌 Boyd Orr Building
```

|                       Parameters                      |                    Returns                      |
|-------------------------------------------------------|-------------------------------------------------|
| **`event`:** the `icalendar.Calendar.event` to format | **`str`:** a string representation of the event |

## `jsonify_desc(event)`

Creates a `dict` from the description of the event.

**Note:** The formatting is according to how event conventions are for the University of Glasgow. For example, usually events have description like
```
Course: Random Course Name
Class Type: Lecture
Lecturer: Orr, Dr Boyd
Details: Lecture.
```

```python
>>> jsonify_desc(event)
{"Course": "Random Course Name", "Class Type": "Lecture", "Lecturer": "Orr, Dr Boyd", "Details": "Lecture."}
```

|                       Parameters                      |                    Returns                      |
|-------------------------------------------------------|-------------------------------------------------|
| **`event`:** the `icalendar.Calendar.event` to format | **`str`:** a string representation of the event |

## `read(uid, start_date=None, end_date=None, class_name=None)`

Main function to be called from `timetable` and returns a message accordingly.

```python
>>> read("123456Z", start_date="20060404T080000+01:00")
["There seem to be no classes. :D"]
```

|                                                                       Parameters                                                                         |                                    Returns                                                                     |
|----------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------|
| **`uid`:** the unique sender ID of the user
**`start_date`:** `date-time` start parameter if found
**`end_date`:** `date-time` end parameter if found
**`class_name`:** `class-name` parameter if found | **`list`:** list of events |

## `iterate(uid, start_date=None, end_date=None, class_name=None)`

Iterates through all events in the calendar and returns events that start and end between the beginning of that date (00:00) and end of that date (23:59).

```python
>>> iterate("123456Z", start_date="20050404T080000+01:00")
["📝 Python Tutorial\n🕘 08:00AM - 09:00AM\n📅 04 April 2005 (Monday)\n📌 Boyd Orr Building"]
```

|                                                                       Parameters                                                                         |                                    Returns                                                                     |
|----------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------|
| **`uid`:** the unique sender ID of the user
**`start_date`:** `date-time` start parameter if found
**`end_date`:** `date-time` end parameter if found
**`class_name`:** `class-name` parameter if found | **`list`:** list of events |

## `check_loggedIn(uid)`

Checks that calendar exists for the user. This function enables integrity and checks if a `icalendar.Calendar` exists for a specific user. It not, the user is logged in again the background.

```python
>>> check_loggedIn("123456Z")
True
```

|                 Parameters                 |                 Returns                 |
|--------------------------------------------|-----------------------------------------|
| **`uid`:** the unique sender ID of the user| **`bool`:** if user's calendar is found |


text:
# PsyTrack

PsyTrack is a package for fitting a dynamic psychophysical model to behavioral data as described in our 2021 _Neuron_ paper, '[Extracting the dynamics of behavior in sensory decision-making experiments](https://authors.elsevier.com/a/1cMvC3BtfGx4U4).'

<img align='center' src='./psytrack/examples/GraphicalAbstract.png' alt='Graphical abstract from Neuron paper' height='600'/>

[//]: # ()

## Documentation

Documentation and examples can be found in [`ExampleNotebook.ipynb`](./psytrack/examples/ExampleNotebook.ipynb)

[//]: # ()

## How to install

Just run `pip install psytrack`

## Code authors

Nick Roy, [Ji Hyun Bak](http://newton.kias.re.kr/~jhbak/), and [Jonathan Pillow](http://pillowlab.princeton.edu/)

Please cite as:

Roy NA, Bak JH, Akrami A, The IBL, Brody CD, & Pillow JW, ["Extracting the dynamics of behavior in sensory decision-making experiments."](https://doi.org/10.1016/j.neuron.2020.12.004) _Neuron_ (2021).

[//]: # (readme template from https://github.com/HIPS/autograd)

repository: jainraj/psytrack

repo_name: jainraj/psytrack


text:
# JavaSocketIoAnguarBootstrap

##### Bootstrap a simple Socket IO app with Java in the back and JS in the front with angularJS and bootstrap css.

Run server:
```
mvn exec:java
```

Run client:
 - Install dependencies
```
cd public/
bower install
```
 - Open public/index.html with your favorite browser

repository: beplaya/JavaSocketIoAnguarBootstrap

repo_name: beplaya/JavaSocketIoAnguarBootstrap


text:
# AbstractTensors.jl

*Tensor algebra abstract type interoperability with vector bundle parameter*

[![DOI](https://zenodo.org/badge/169811826.svg)](https://zenodo.org/badge/latestdoi/169811826)
[![Docs Stable](https://img.shields.io/badge/docs-stable-blue.svg)](https://grassmann.crucialflow.com/stable)
[![Docs Dev](https://img.shields.io/badge/docs-dev-blue.svg)](https://grassmann.crucialflow.com/dev)
[![Gitter](https://badges.gitter.im/Grassmann-jl/community.svg)](https://gitter.im/Grassmann-jl/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
[![Build Status](https://travis-ci.org/chakravala/AbstractTensors.jl.svg?branch=master)](https://travis-ci.org/chakravala/AbstractTensors.jl)
[![Build status](https://ci.appveyor.com/api/projects/status/yey8huk505h4b81u?svg=true)](https://ci.appveyor.com/project/chakravala/abstracttensors-jl)
[![Coverage Status](https://coveralls.io/repos/chakravala/AbstractTensors.jl/badge.svg?branch=master&service=github)](https://coveralls.io/github/chakravala/AbstractTensors.jl?branch=master)
[![codecov.io](https://codecov.io/github/chakravala/AbstractTensors.jl/coverage.svg?branch=master)](https://codecov.io/github/chakravala/AbstractTensors.jl?branch=master)

The `AbstractTensors` package is intended for universal interoperability of the abstract `TensorAlgebra` type system.
All `TensorAlgebra{V}` subtypes have type parameter `V`, used to store a `TensorBundle` value obtained from [DirectSum.jl](https://github.com/chakravala/DirectSum.jl).

For example, this is mainly used in [Grassmann.jl](https://github.com/chakravala/Grassmann.jl) to define various `SubAlgebra`, `TensorGraded` and `TensorMixed` types, each with subtypes. Externalizing the abstract type helps extend the dispatch to other packages.
By itself, this package does not impose any specifications or structure on the `TensorAlgebra{V}` subtypes and elements, aside from requiring `V` to be a `Manifold`.
This means that different packages can create tensor types having a common underlying `TensorBundle` structure.

## Interoperability

Since `TensorBundle` choices are fundamental to `TensorAlgebra` operations, the universal interoperability between `TensorAlgebra{V}` elements with different associated `TensorBundle` choices is naturally realized by applying the `union` morphism to operations.

```Julia
function op(::TensorAlgebra{V},::TensorAlgebra{V}) where V
    # well defined operations if V is shared
end # but what if V ≠ W in the input types?

function op(a::TensorAlgebra{V},b::TensorAlgebra{W}) where {V,W}
    VW = V ∪ W        # VectorSpace type union
    op(VW(a),VW(b))   # makes call well-defined
end # this option is automatic with interop(a,b)

# alternatively for evaluation of forms, VW(a)(VW(b))
```
Some of operations like `+,-,*,⊗,⊛,⊙,⊠,⨼,⨽,⋆` and postfix operators `⁻¹,ǂ,₊,₋,ˣ` for `TensorAlgebra` elements are shared across different packages, some of the interoperability is taken care of in this package.
Additionally, a universal unit volume element can be specified in terms of `LinearAlgebra.UniformScaling`, which is independent of `V` and has its interpretation only instantiated by the context of the `TensorAlgebra{V}` element being operated on.

Utility methods such as `scalar, involute, norm, norm2, unit, even, odd` are also defined.

### Example with a new subtype

Suppose we are dealing with a new subtype in another project, such as
```Julia
using AbstractTensors, DirectSum
struct SpecialTensor{V} <: TensorAlgebra{V} end
a = SpecialTensor{ℝ}()
b = SpecialTensor{ℝ'}()
```
To define additional specialized interoperability for further methods, it is necessary to define dispatch that catches well-defined operations for equal `TensorBundle` choices and a fallback method for interoperability, along with a `Manifold` morphism:
```Julia
(W::Signature)(s::SpecialTensor{V}) where V = SpecialTensor{W}() # conversions
op(a::SpecialTensor{V},b::SpecialTensor{V}) where V = a # do some kind of operation
op(a::TensorAlgebra{V},b::TensorAlgebra{W}) where {V,W} = interop(op,a,b) # compat
```
which should satisfy (using the `∪` operation as defined in `DirectSum`)
```Julia
julia> op(a,b) |> Manifold == Manifold(a) ∪ Manifold(b)
true
```
Thus, interoperability is simply a matter of defining one additional fallback method for the operation and also a new form `TensorBundle` compatibility morphism.

#### UniformScaling pseudoscalar

The universal interoperability of `LinearAlgebra.UniformScaling` as a pseudoscalar element which takes on the `TensorBundle` form of any other `TensorAlgebra` element is handled globally by defining the dispatch:
```Julia
(W::Signature)(s::UniformScaling) = ones(ndims(W)) # interpret a unit pseudoscalar
op(a::TensorAlgebra{V},b::UniformScaling) where V = op(a,V(b)) # right pseudoscalar
op(a::UniformScaling,b::TensorAlgebra{V}) where V = op(V(a),b) # left pseudoscalar
```
This enables the usage of `I` from `LinearAlgebra` as a universal pseudoscalar element.

##### Tensor evaluation

To support a generalized interface for `TensorAlgebra` element evaluation, a similar compatibility interface is constructible.

```Julia
(a::SpecialTensor{V})(b::SpecialTensor{V}) where V = a # conversion of some form
(a::SpecialTensor{W})(b::SpecialTensor{V}) where {V,W} = interform(a,b) # compat
```
which should satisfy (using the `∪` operation as defined in `DirectSum`)
```Julia
julia> b(a) |> Manifold == Manifold(a) ∪ Manifold(b)
true
```
The purpose of the `interop` and `interform` methods is to help unify the interoperability of `TensorAlgebra` elements.

### Deployed applications

The key to making the whole interoperability work is that each `TensorAlgebra` subtype shares a `TensorBundle` parameter (with all `isbitstype` parameters), which contains all the info needed at compile time to make decisions about conversions. So other packages need only use the vector space information to decide on how to convert based on the implementation of a type. If external methods are needed, they can be loaded by `Requires` when making a separate package with `TensorAlgebra` interoperability.


text:
Reddit Fetcher

### Contributers

* [gusuu1](https://github.com/gusuu1) - Initial work

### Built With

* [JRAW](https://github.com/mattbdean/JRAW) - Reddit API Wrapper (Java)
* [MongoDB](https://docs.mongodb.com/drivers/java/) - Database Driver
* [dotenv](https://github.com/cdimascio/java-dotenv) - Loading environment variables

## Getting Started

To get a local copy up and running follow these simple steps.

### Prerequisites

Make sure you have to following services ready.
* MongoDB Database
* VPS/Dedicated Server
* Reddit Username, Password, ClientID and Client Secret.

### Installation

* Download the JAR
```
wget https://github.com/mugai-bot/reddit-fetcher/releases/download/1.0/RedditFetcher-1.0.jar
```
* Setup your `.env` file. (See template [here](https://github.com/mugai-bot/reddit-fetcher/blob/master/.env.example))
* Run `java -jar RedditFetcher-1.0.jar`
* Setup a cronjob to automate this process.

## License

Distributed under the MIT License. See `LICENSE` for more information.

## Contact

* [Github](https://github.com/gusuu1)
* [Twitter](https://twitter.com/Gusuu2)

Project Link: [https://github.com/mugai-bot/reddit-fetcher](https://github.com/mugai-bot/reddit-fetcher)

repository: mugai-bot/reddit-fetcher

repo_name: mugai-bot/reddit-fetcher


text:
---
layout: page
title: Lim Ji Wei's Project Portfolio Page
---

### Project: CONNECTIONS

CONNECTIONS is a desktop app adapted from [AddressBook - Level 3](https://se-education.org/addressbook-level3/) for managing contacts and keeping track of birthdays.
It is optimized for use via a Command Line Interface (CLI) while still having the benefits of a Graphical User Interface (GUI) that is created with JavaFX.
It is written in Java and has about 10 KLOC.

Given below are my contributions to the project.

* **Code contributed**: [RepoSense link](https://nus-cs2103-ay2122s1.github.io/tp-dashboard/?search=&sort=groupTitle&sortWithin=title&timeframe=commit&mergegroup=&groupSelect=groupByRepos&breakdown=true&checkedFileTypes=docs~functional-code~test-code~other&since=2021-09-17&tabOpen=true&tabType=authorship&zFR=false&tabAuthor=Jiwei99&tabRepo=AY2122S1-CS2103-F09-4%2Ftp%5Bmaster%5D&authorshipIsMergeGroup=false&authorshipFileTypes=docs~functional-code~test-code&authorshipIsBinaryFileTypeChecked=false)

* **New Feature**: Added the ability to untag tags from contacts.
  * What it does: allows the user to remove one or multiple tags from a contact.
  * Justification: This feature improves the product because the user can now remove individual tags from a list of tags that the contact has, instead of having to rebuild the whole list of remaining tags.
  * Highlights: This enhancement improves usability of CONNECTIONS. Untag also informs the user if a tag to be removed from a contact is not found in the contact.

* **New Feature**: Added the ability to retrieve previous commands using `UP` and `DOWN` keys.
  * What it does: allows the user to retrieve and use previously entered commands using the `UP` and `DOWN` keys. Allows users to retrieve and use frequently used commands easily.
  * Justification: This feature improves the product because the user can trace back previously used commands to check what changes have been made, and also reuse previous commands without having to retype the whole command again.
  * Highlights: Changes in code has to be made for CONNECTIONS to read and process keystrokes. Future extensions include adding Command History to storage to allow users to retrieve commands used in previous program runs.

* **New Feature**: Added command assistant to assist users in forming commands.
  * What it does: allows the user to look at the command parameters and examples while the user is keying in the command.
  * Justification: This feature improves the product because users can now double-check to make sure that the command keyed is in the right format. It reduces the need for users to re-enter commands due to errors in the command.
  * Highlights: This enhancement provides a rudimentary version of input validation. As this function works using keystroke validation, steps have to be taken to exclude certain keystrokes, e.g. `ENTER`, so that it does not affect the current functionalities. A separate type of command, which is initiated by the `System` instead of `User` input, has to be created. Future extensions include showing users exactly what parameters are missing or entered wrongly.

* **Enhancements to existing feature**: Improved `Help` command usability.
  * Added functionality to allow `Help` to take in additional parameters so that users can easily obtain support for usage of commands. For example, users can now use `help` to obtain a list of available commands, and `help COMMAND` to get help for a specific command.
  * Refactored help messages for all commands to improve quality of help messages.

* **Enhancements to existing feature**: Added unit test for functions.
  * Added unit tests to for new and existing features to increase test coverage.
  * Features include `Help`, `Untag` and `Command History`.

* **Project management**:
  * Managed release `v1.3` on GitHub.
  * Created, managed and closed issues and milestones on GitHub to track todos and project progress.
  * Managed issues and milestones for `v1.3` and `v1.3b`.

* **Documentation**:
  * User Guide:
    * Updated and refactored User Guide to align with features of CONNECTIONS ([\#20](https://github.com/AY2122S1-CS2103-F09-4/tp/pull/20))
    * Added documentation for BIRTHDAY parameter ([\#20](https://github.com/AY2122S1-CS2103-F09-4/tp/pull/20))
    * Added documentation for the `Tag`, `Untag` and `Help` commands ([\#20](https://github.com/AY2122S1-CS2103-F09-4/tp/pull/20), [\#112](https://github.com/AY2122S1-CS2103-F09-4/tp/pull/112))
    * Added documentation for `Command History` and `Command Assistant` features ([\#112](https://github.com/AY2122S1-CS2103-F09-4/tp/pull/112))
  * Developer Guide:
    * Added implementation for features `Tags`, `Help`, `Command Assistant` and `Command History` ([\#94](https://github.com/AY2122S1-CS2103-F09-4/tp/pull/94))([\#221](https://github.com/AY2122S1-CS2103-F09-4/tp/pull/221))
    * Added use case for `Help` feature ([\#94](https://github.com/AY2122S1-CS2103-F09-4/tp/pull/94))
    * Added activity diagram for `Command History` ([\#221](https://github.com/AY2122S1-CS2103-F09-4/tp/pull/221))
    * Added sequence diagram for `Help` command ([\#221](https://github.com/AY2122S1-CS2103-F09-4/tp/pull/221))
  * Index:
    * Refactored Index file for CONNECTIONS ([\#71](https://github.com/AY2122S1-CS2103-F09-4/tp/pull/71))

* **Community**:
  * PRs reviewed (with non-trivial review comments): [\#177](https://github.com/AY2122S1-CS2103-F09-4/tp/pull/177), [\#183](https://github.com/AY2122S1-CS2103-F09-4/tp/pull/183)
  * Reported bugs and suggestions for other teams in the class: [Bug Report](https://github.com/Jiwei99/ped)


text:
# Protocol Buffers

Protocol buffers are used for the storing structured data in this project.

## Program Graphs

Program graphs are represented using a `ProgramGraph` message. This diagram
shows the relationship between the various message types which make up program
graphs:

![Protocol Buffers](assets/graph_protos.png)

Where solid lines indicate composition, and dashed lines show inferred
relationships (e.g an index into a list of objects of the pointed-to type).

repository: ChrisCummins/ProGraML

branch_name: refs/heads/development

repo_name: ChrisCummins/ProGraML


text:
---
name: Feature request
about: Suggest an idea for this project
labels: enhancement 🚀
---

<!--
    Note that before opening an issue, you can chat maintainer of this project on channel
    #design-system-android in Decathlon IT Communities Slack.

    Find all information about how to contribute on this project via this link:
    https://dktunited.github.io/design-system-android/contributing/

    If a section isn't adapted for your request, please remove it to avoid any unnecessary section.
-->

**Is your feature request related to a problem? Please describe.**
<!-- A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] -->

**Describe the solution you'd like**
<!-- A clear and concise description of what you want to happen. -->

**Additional context**
<!-- Add any other context or screenshots about the feature request here. -->

repository: Nerallan/vitamin-android

repo_name: Nerallan/vitamin-android


text:
# vscloc

Count Lines of Code with [cloc](https://github.com/AlDanial/cloc) tool.

## Requirements

Install [cloc](https://github.com/AlDanial/cloc).

## Extension Settings

* `vscloc.format`: format string shown in status bar.
    - `%t` - total number of lines in file
    - `%s` - source code
    - `%b` - blank lines
    - `%c` - comments

* `vscloc.cmd`: command to run cloc. `%f` substituted with current file path

repository: vdimir/vscloc

repo_name: vdimir/vscloc


text:
# LinkedIn Learning Week 1

## Wide to Long

Often times data is not in digestible format to begin EDA. One common issue that often face is data being in a wide format. This format does not suit itself for data modeling and exploration because each entry is its own column.

We can accomplish this in pandas using melt to convert the data into a desirable format for data processing.


text:
## Version 1.1.3

### Bug fixes

* Improved handling of configuration file changes.

This change should resolve the following issue:

* [Tests "disappear" after changing config files](https://github.com/MortenHoustonLudvigsen/KarmaTestAdapter/issues/30).

### Download

[KarmaTestAdapter.vsix](https://github.com/MortenHoustonLudvigsen/KarmaTestAdapter/releases/download/v1.1.3/KarmaTestAdapter.vsix)

## Version 1.1.2

### Bug fixes

* Improved "discovery" of node.exe and npm.cmd paths.

This change should resolve the following issue:

* [Test Adapter error - "Could not start Karma"](https://github.com/MortenHoustonLudvigsen/KarmaTestAdapter/issues/29).

### Download

[KarmaTestAdapter.vsix](https://github.com/MortenHoustonLudvigsen/KarmaTestAdapter/releases/download/v1.1.2/KarmaTestAdapter.vsix)

## Version 1.1.1

### Traits

* A trait specified as a string or with only a name will be shown in the Test Explorer as just the string or name.

* Traits with only a value are ignored

### Download

[KarmaTestAdapter.vsix](https://github.com/MortenHoustonLudvigsen/KarmaTestAdapter/releases/download/v1.1.1/KarmaTestAdapter.vsix)

## Version 1.1.0

### Extensions and traits

* The name of the outermost suite is now used as the class name for a test. This can be customized using new properties `Name` and `Extensions` in `KarmaTestAdapter.json`.

* The display name of each test now includes the suites separated by a space. This can be customized using new properties `Name` and `Extensions` in `KarmaTestAdapter.json`.

* New properties in `KarmaTestAdapter.json`:
  * `Name` The name of the test container. Used in the default generation of the fully qualified name for each test.
  * `Traits` An array of traits to be attached to each test. A trait can be a string or an object containing properties `Name` and `Value`. For traits specified by a string the string is the trait value and the trait name is "Category".
  * `Extensions` Path to a node.js module implementing extensions.

* Logging to the output window is significantly less chatty.

* The code in the Karma Test Adapter has been refactored to enable sharing code with other test adapters. A lot of the code has moved to [JsTestAdapter](https://github.com/MortenHoustonLudvigsen/JsTestAdapter), which can be install as a NuGet package.

These changes resolve the following issues:

* [Concatenate a test's suites in front of the test description](https://github.com/MortenHoustonLudvigsen/KarmaTestAdapter/issues/24).

* [configure test entries so that they behave as expected in Test Explorer's grouping and sorting](https://github.com/MortenHoustonLudvigsen/KarmaTestAdapter/issues/25).

### Download

[KarmaTestAdapter.vsix](https://github.com/MortenHoustonLudvigsen/KarmaTestAdapter/releases/download/v1.1.0/KarmaTestAdapter.vsix)

## Version 1.0.3

### Bug fixes

* Fixed: [The adapter does not work if both karma-jasmine and karma-jasmine-matchers are used ](https://github.com/MortenHoustonLudvigsen/KarmaTestAdapter/issues/20).

### Download

[KarmaTestAdapter.vsix](https://github.com/MortenHoustonLudvigsen/KarmaTestAdapter/releases/download/v1.0.3/KarmaTestAdapter.vsix)

## Version 1.0.2

### Bug fixes

* Fixed: [Can not read KarmaTestAdapter.json if it is encoded with a BOM](https://github.com/MortenHoustonLudvigsen/KarmaTestAdapter/issues/12).

  From now on `KarmaTestAdapter.json` must be encoded in one of the following encodings:

  * UTF-8
  * UTF-8 with BOM / Signature
  * UTF-16 Big-Endian with BOM / Signature
  * UTF-16 Little-Endian with BOM / Signature

### Download

[KarmaTestAdapter.vsix](https://github.com/MortenHoustonLudvigsen/KarmaTestAdapter/releases/download/v1.0.2/KarmaTestAdapter.vsix)

## Version 1.0.1

### Improved identification of test containers:

* Test containers specify which Karma configuration files to use when running tests.

* A project can contain more than one test container.

* A directory can contain at most one test container.

* Test containers are files named `karma.conf.js` or `KarmaTestAdapter.json`.

* If a test container is named `karma.conf.js` it specifies itself as the Karma configuration file to use.

* If a test container is named `KarmaTestAdapter.json` it specifies the Karma configuration file to use in the optional `KarmaConfigFile` setting. If the `KarmaConfigFile` setting is not specified, then `karma.conf.js` in the same directory is used.

* A test container, which specifies a Karma configuration file that is not included in a project in the current solution or does not exist, will be disabled. I.e. no tests will be run for the container.

* Only test containers, that are included in a project in the current solution, are used.

* If there is a `KarmaTestAdapter.json` file in a project, then any `karma.conf.js` file in the same directory is not used as a test container.

* If there is a `KarmaTestAdapter.json` in a project in the current solution, that specifies a Karma configuration file in a different directory or project, then that Karma configuration file is not used as a test container.

### Bug fixes

* Fixed: [The adapter does not work with karma configuration files not called karma.conf.js](https://github.com/MortenHoustonLudvigsen/KarmaTestAdapter/issues/15).

* Fixed: [The format of the URI could not be determined](https://github.com/MortenHoustonLudvigsen/KarmaTestAdapter/issues/13).

* The adapter now works with globally installed modules

### Download

[KarmaTestAdapter.vsix](https://github.com/MortenHoustonLudvigsen/KarmaTestAdapter/releases/download/v1.0.1/KarmaTestAdapter.vsix)

## Version 1.0.0

### This is a complete rewrite of the Karma Test Adapter

Some of the major changes are:

* The node package `karma-vs-reporter` is deprecated, and is no longer used

* The settings file `karma-vs-reporter.json` is now `KarmaTestAdapter.json`

* Karma is now always run in the background, and the settings `ServerMode` and `ServerPort` are no longer used.

* Deciding when to run tests is now left up to Karma. The adapter only watches configuration files.

* Test results are shown in the Test Explorer as soon as Karma has completed a test run.

### Download

[KarmaTestAdapter.vsix](https://github.com/MortenHoustonLudvigsen/KarmaTestAdapter/releases/download/v1.0.0/KarmaTestAdapter.vsix)

## Version 0.8.3

### Bug fixes

* Ignore tests with no names

### Download

[KarmaTestAdapter.Package.vsix](https://github.com/MortenHoustonLudvigsen/KarmaTestAdapter/releases/download/v0.8.3/KarmaTestAdapter.Package.vsix)

## Version 0.8.2

* Bug fixes

## Version 0.8.1

* The adapter now searches for node module karma-vs-reporter in parent directories

### Bug fixes

* Don't fail if no test files are found

## Version 0.8.0

### Bug fixes

* Use node module 'di' in stead of 'karma/node_modules/di'.

* Version 0.8.0 needs at least version 0.8.0 of karma-vs-reporter to work. To upgrade run:

```
npm install karma-vs-reporter
```

## Version 0.7.4

### Bug fixes

* The adapter now tries to detect the encoding of `karma-vs-reporter.json` falling back to UTF-8 if the encoding could not be detected.

* The adapter no longer fails if it can not get a SHA1 hash of the contents of a file.

## Version 0.7.3

### Bug fixes

* The adapter could sometimes fail with a null exception if there were errors in `karma-vs-reporter.json`. This should now be fixed.

## Version 0.7.2

### Error handling

* The adapter will now always log to `%appdata%\2PS\KarmaTestAdapter\KarmaTestAdapter.log`.

* If there are errors in `karma-vs-reporter.json` no tests will be shown for that configuration,
  and the adapter *will not* use any `karma.conf` in the same directory.

* It is no longer necessary to restart Visual Studio after correcting errors in `karma-vs-reporter.json`.

## Version 0.7.1

* `karma-vs-reporter.json` has a new optional property:

  - `TestFiles` By default the adapter watches all files in the karma configuration to get the list of tests. To avoid
    running test discovery when files, that do not contain tests, are changed specify files with tests in the `TestFiles`
    property. Specify `TestFiles` as an array of file patterns, or omit it to use the file specifications in the karma
    configuration.

* The adapter now fails if the correct version of karma-vs-reporter is not installed.

* Error handling should be a bit better in this version.

## Version 0.7.0

### Server mode

* Introduced server mode. When in server mode Karma will be started once, and run in the background.
  This means that browsers are not restarted every time tests are run, improving performance and
  making the experience much smoother.

* `karma-vs-reporter.json` has new optional properties:

  - `ServerMode` set to true, if you want Karma to always run in the background. This will normally give a
    significant performance improvement. Karma will be started in the background if `ServerMode` is true **and**
    `ServerPort` has a value.

  - `ServerPort` TCP port, that Karma should listen to when running in the background (when `ServerMode` is true).
     This should be different from the port configured in the Karma configuration file (`karma.conf.js`).

* Version 0.7.0 needs at least version 0.7.0 of karma-vs-reporter to work

## Version 0.6.3

### Bug fixes

* Fixed: If `LogToFile` is true and `LogDirectory` is empty in `karma-vs-reporter.json` the adapter fails with the following message: `The path is not of a legal form.`.

## Version 0.6.2

* Changes to tests files that are not included in a project will now trigger test discovery.

## Version 0.6.1

* More improvements to logging

* Tests are discovered when the karma configuration file changes (normally `karma.conf.js`), even when `karma-vs-reporter.json` is used.

## Version 0.6.0

* Version 0.6.0 needs at least version 0.6.0 of karma-vs-reporter to work

* I have made a number of tweaks to logging

* `karma-vs-reporter.json` has new optional properties:

  - `LogToFile`: set to true, if you want the adapter to write log statements to a log file (named `KarmaTestAdapter.log`)

  - `LogDirectory`: Where the log file should be saved (if `LogToFile` is true). If this property is not specified the
    directory in which `karma-vs-reporter.json` resides is used.

  - `OutputDirectory`: Normally the adapter communicates with Karma using temporary files. These files are deleted immediately.
    If you want to see these files, you can specify an `OutputDirectory`, in which case the files will not be deleted.

* The adapter should no longer try to discover tests when any file is saved. Only files that are included in the karma tests
  will trigger discovery, and only if they have actually changed (the adapter keeps track of this using a SHA1 hash for each file).

repository: AlfieJ/KarmaTestAdapter

repo_name: AlfieJ/KarmaTestAdapter


text:
---
Title: Definitions
FileName: definitions.html
---
### SPMeta2 Definitions

Essentially, definitions are c# POCO objects provided by SPMeta2 library.
SPMeta2 introduces a domain model providing set of definitions for most of the SharePoint artifacts.

Before you begin, make sure you are familiar with the following concepts:

* [Get started with SPMeta2](/spmeta2/getting-started)

### Domain model

SPMeta2 introduces a domain of c# POCO objects, then it maps every single POCO object on SharePoint artifacts.

<img src='http://g.gravizo.com/g?digraph G {
     rankdir="LR";
     "CSharp POCO objects" -> "SPMeta2" -> "SharePoint";
    }'/> </img>

We use the following name convention to map SharePoint objects to SPMeta2 definition:

* "SP" prefix gets removed
* "Definition" postfix gets added

For instance, here are a few definitions for most common SharePoint artifacts:

* SPWeb => WebDefinition
* SPField => FieldDefinition
* SPContentType => ContentTypeDefinition

We have different editions of SharePoint, we have a split up between 'foundation' and 'standard' definitions across SPMeta2 library.

#### SharePoint Foundation definitions
SharePoint Foundation definitions could be found in SPMeta2.dll under the following namespaces:

* SPMeta2.Definitions.* - contains SharePoint Foundation definitions
* SPMeta2.Definitions.ContentTypes.* - contains definitions for content type operations
* SPMeta2.Definitions.Fields.* - contains typed field definitions
* SPMeta2.Definitions.Webparts.* - contains typed web part definitions

#### SharePoint Standard definitions
SharePoint standard definitions could be found in SPMeta2.Standard.dll under the following namespaces:

* SPMeta2.Standard.Definitions.* - contains SharePoint Standard definitions
* SPMeta2.Standard.Definitions.DisplayTemplates.* - contains various display template definitions
* SPMeta2.Standard.Definitions.Fields.* - contains typed field definitions
* SPMeta2.Standard.Definitions.Taxonomy.* - contains taxonomy related definitions
* SPMeta2.Standard.Definitions.Webparts.* - contains typed web part definitions

license: MS-PL

gha_language: C#


text:
# GAN handwritten digits generation

A simple Keras implementation of a Generative Adversarial Network, used to generate images of handwritten digits. Based on the tutorial by Stefan Hosein at https://towardsdatascience.com/demystifying-generative-adversarial-networks-c076d8db8f44

## Install

After getting a working [Conda distribution](https://anaconda.org/anaconda/python), install the environment as

    conda env install -f environment.yml

If you do not have an nVidia GPU available, edit the environment.yml to change the `keras-gpu` package to just `keras`.

Then log into the environment

    source activate mnistgan

## Run

Train the network with

    python mnistgan.py

repository: albarji/mnistgan

repo_name: albarji/mnistgan


text:
<!--- prev:auth -->
Moving Riff Raff to a New Host
==============================

Riff Raff is only deployed to one host at a time, and sometimes it will need moving.

 1. Add `AddToLoadBalancer` to the Auto Scaling Group's Suspended Processes.
 2. Increase max/desired capacity to 2.
 3. Block queueing new deploys on the new box.
 4. Block queueing new deploys on the old box.
 5. Add new box to the load balancer.
 6. Remove old box from ASG and terminate.
 7. Unblock deploys.
 8. Resume add to load balancer.

 Blocking Queueing Deploys
 -------------------------
 To check switch status:
  `curl http://localhost:18080/management/switchboard`

 To block queueing of new deployments:
 `curl -d "" http://localhost:18080/management/switchboard?enable-deploy-queuing=OFF`
 To unblock queueing of new deployments:
  `curl -d "" http://localhost:18080/management/switchboard?enable-deploy-queuing=ON`

repository: guardian/riff-raff

gha_language: Scala

repo_name: guardian/riff-raff


text:
# Akka-Http

$name.akka-http$ is available for Scala 2.12 and 2.13.

It provides derivations for:

* _PathMatcher_
* _Unmarshaller_

Make sure to familiarize yourself with @ref:[creating _structible_ instances](../index.md) before looking at the examples below.

## Dependency

@@dependency[sbt,Maven,Gradle] {
    group="$group$"
    artifact="$name.akka-http$"
    version="$version$"
}

## PathMatcher Example

@@snip [PathMatcherExample.scala]($root$/src/main/scala/usage/akkahttp/PathMatcherExample.scala) { #example }

## Unmarshaller Example

This derivation was originally added to address a quirk in an Http Api which returned the id of a
generated resource as plain text. Hence, the response entity needed to be unmarshalled directly as in
_Unmarshal(response.entity).to[A]_.
As long as you receive a properly formatted message, use a derivation for the employed messaging protocol and library
(e.g. your favorite JSON library).

@@snip [UnmarshallerExample.scala]($root$/src/main/scala/usage/akkahttp/UnmarshallerExample.scala) { #example }

repository: cerst/structible

repo_name: cerst/structible


text:
![image](docs/img/logo.png)

Magpie is a deep learning tool for multi-label text classification. It learns on the training corpus to assign labels to arbitrary text and can be used to predict those labels on unknown data. It has been developed at CERN to assign subject categories to High Energy Physics abstracts and extract keywords from them.

## Very short introduction
```
>>> magpie = Magpie()
>>> magpie.init_word_vectors('/path/to/corpus', vec_dim=100)
>>> magpie.train('/path/to/corpus', ['label1', 'label2', 'label3'], epochs=3)
Training...
>>> magpie.predict_from_text('Well, that was quick!')
[('label1', 0.96), ('label3', 0.65), ('label2', 0.21)]
```

## Short introduction
To train the model you need to have a large corpus of labeled data in a text format encoded as UTF-8. An example corpus can be found under data/hep-categories directory. Magpie looks for `.txt` files containing the text to predict on and corresponding `.lab` files with assigned labels in separate lines. A pair of files containing the labels and the text should have the same name and differ only in extensions e.g.

```
$ ls data/hep-categories
1000222.lab 1000222.txt 1000362.lab 1000362.txt 1001810.lab 1001810.txt ...
```

Before you train the model, you need to build appropriate word vector representations for your corpus. In theory, you can train them on a different corpus or reuse already trained ones ([tutorial](http://rare-technologies.com/word2vec-tutorial/)), however Magpie enables you to do that as well.
```python
from magpie import Magpie

magpie = Magpie()
magpie.train_word2vec('data/hep-categories', vec_dim=100)
```

Then you need to fit a scaling matrix to normalize input data, it is specific to the trained word2vec representation. Here's the one liner:

```python
magpie.fit_scaler('data/hep-categories')
```

You would usually want to combine those two steps, by simply running:
```python
magpie.init_word_vectors('data/hep-categories', vec_dim=100)
```

If you plan to reuse the trained word representations, you might want to save them and pass in the constructor to `Magpie` next time. For the training, just type:
```python
labels = ['Gravitation and Cosmology', 'Experiment-HEP', 'Theory-HEP']
magpie.train('data/hep-categories', labels, test_ratio=0.2, epochs=30)
```
By providing the `test_ratio` argument, the model splits data into train & test datasets (in this example into 80/20 ratio) and evaluates itself after every epoch displaying it's current loss and accuracy. The default value of `test_ratio` is 0 meaning that all the data will be used for training.

If your data doesn't fit into memory, you can also run `magpie.batch_train()` which has a similar API, but is more memory efficient.

Trained models can be used for prediction with methods:
```python
>>> magpie.predict_from_file('data/hep-categories/1002413.txt')
[('Experiment-HEP', 0.47593361),
 ('Gravitation and Cosmology', 0.055745006),
 ('Theory-HEP', 0.02692855)]

>>> magpie.predict_from_text('Stephen Hawking studies black holes')
[('Gravitation and Cosmology', 0.96627593),
 ('Experiment-HEP', 0.64958507),
 ('Theory-HEP', 0.20917746)]
```

## Saving & loading the model
A `Magpie` object consists of three components - the word2vec mappings, a scaler and a `keras` model. In order to train Magpie you can either provide the word2vec mappings and a scaler in advance or let the program compute them for you on the training data. Usually you would want to train them yourself on a full dataset and reuse them afterwards. You can use the provided functions for that purpose:

```python
magpie.save_word2vec_model('/save/my/embeddings/here')
magpie.save_scaler('/save/my/scaler/here', overwrite=True)
magpie.save_model('/save/my/model/here.h5')
```

When you want to reinitialize your trained model, you can run:

```python
magpie = Magpie(
    keras_model='/save/my/model/here.h5',
    word2vec_model='/save/my/embeddings/here',
    scaler='/save/my/scaler/here',
    labels=['cat', 'dog', 'cow']
)
```
or just pass the objects directly!

## Installation

The package is not on PyPi, but you can get it directly from GitHub:
```
$ pip install<EMAIL_ADDRESS>```
If you encounter any problems with the installation, make sure to install the correct versions of dependencies listed in `setup.py` file.

## Disclaimer & citation
The neural network models used within Magpie are based on work done by [Yoon Kim](https://arxiv.org/abs/1408.5882) and subsequently [Mark Berger](https://cs224d.stanford.edu/reports/BergerMark.pdf).

## Contact
If you have any problems, feel free to open an issue. We'll do our best to help :+1:

repository: KonstantinKlepikov/magpie

repo_name: KonstantinKlepikov/magpie


text:
Django HitCount Headless
========================

This is simplified fork of [django-hitcount](http://github.com/thornomad/django-hitcount) which is intended to use with [django-popularity-mixin](http://github.com/bashu/django-popularity-mixin)

## Differences from Django HitCount

TBD

## Documentation

Will be updated soon :)

repository: EasonYi/django-hitcount-headless

repo_name: EasonYi/django-hitcount-headless


text:
Adds HTML templates into the JST global object using Rails asset pipeline.

in *app/assets/javascripts/my-component/foo.html*

```html
<h2>I can be found in <code>app/assets/javascripts/my-component/foo.html</code></h2>
```

in the JavaScript Console

```javascript
JST['my-component/foo.html']
//=> "<h2>I can be found in <code>app/assets/javascripts/my-component/foo.html</code></h2>"
```

## Thank You

This gem is forked from [angular-rails-templates](https://github.com/pitr/angular-rails-templates). Thank you Pitr, Damien Mathieu, and Jeremy Ebler.

## Usage

### 1. Add the Gem

In Gemfile

```ruby
gem 'rails_html_javascript_templates'
```

### 2. Add HTML files to your JavaScript

Name your templates like you would name any other Rails view. **The `.html` part is required.** If it is not present your views will not be added to the 'JST' Object.

```
foo.html
foo.html.erb
foo.html.haml
foo.html.slim
```

Caution: *`.ngslim` and `.nghaml` are no longer supported!*

Rails HTML Javascript Templates will try to load support for the following markups if their gems are present:

| Extension | Required gem                                             |
|---------- |----------------------------------------------------------|
| .erb      | -                                                        |
| .str      | -                                                        |
| .haml     | haml                                                     |
| .slim     | slim                                                     |
| .md       | liquid, rdiscount, redcarpet, bluecloth, kramdown, maruku |

See [Advanced](#advanced-configuration) if you would like to use other markup languages.

### 3. Use your Templates

No matter what the source file extension is, your template's url will be  `#{base_name}.html`

For example:
```ruby
main.html => main.html
widget.html.haml => widget.html
modals/confirm.html.slim => modals/confirm.html
modals/dialog.html.slim.erb.str => modals/dialog.html # don't do this
```

The templates can then be accessed via `templateUrl` as expected:

```javascript
// Template: app/assets/templates/yourTemplate.html.haml
JST['app/assets/templates/yourTemplate.html'];
//Returns compiled string template
```

### 5. Avoid name collisions

If you have `app/assets/javascript/user.js` and `app/assets/templates/user.html`, the former one will actually hide the latter. This is due to how Rails asset pipeline sees asset files, both are served under `/assets/user.js`. Please use namespacing to combat this issue.

## Advanced Configuration

Rails HTML Javascript Templates has some configuration options that can be set inside `config/application.rb`

Here are their default values:
```ruby
# config/application.rb
config.html_js_templates.namespace    = 'JST'
config.html_js_templates.ignore_prefix  = %w(templates/)
config.html_js_templates.inside_paths   = [Rails.root.join('app', 'assets')]
config.html_js_templates.markups        = %w(erb str haml slim md)
config.html_js_templates.htmlcompressor = false
```

### Configuration Option: `namespace`

This configures the name of the global object that your templates will be placed into.
It is used to generate javascript like:

```javascipt
window.<%= namespace %> = window.<%= namespace %> || {}
```

Which defaults to `JST`

### Configuration Option: `ignore_prefix`

*If you place your templates in `app/assets/templates` this option is mostly useless.*

`ignore_prefix` will be stripped from the beginning of your template's key on the `JST` object.

Since the default ignore_prefix is [`templates/`], any templates placed under `app/assets/javascripts/templates` will automatically have short names. If your templates are not in this location, you will need to use the full path to the template.

You can set `config.html_js_templates.ignore_prefix` to change the default ignore prefix. Default is [`templates/`].

``` javascript
// Templates in: app/assets/javascripts/templates (default)
// ignore_prefix: templates/ (default)
{
  templateUrl: 'yourTemplate.html'
}
// This won't work:
{
  templateUrl: 'templates/yourTemplate.html'
}
```

``` javascript
// Templates in: app/assets/javascripts/my_app/templates (custom)
// ignore_prefix: templates/ (default)
{
  templateUrl: 'my_app/templates/yourTemplate.html'
}

// ignore_prefix: my_app/templates/ (custom)
{
  templateUrl: 'yourTemplate.html'
}
```

### Configuration Option: `inside_paths`

Templates only from paths matched by `inside_paths` will be used. By default anything under app/assets can be templates. This option is useful if you are using this gem inside an engine. Also useful if you DON'T want some files to be processed by this gem (see issue #88)

### Configuration Option: `markups`

Any markup that Tilt supports can be used, but you may need to add a gem to your Gemfile. See [Tilt](https://github.com/rtomayko/tilt) for a list of the supported markups and required libraries.

```ruby
# Gemfile
gem "asciidoctor"
gem "radius"
gem "creole"
gem "tilt-handlebars"

# config/application.rb
config.html_js_templates.markups.push 'asciidoc', 'radius', 'wiki', 'hbs'
```
If you would like to use a non-standard extension or you would like to use a custom template, you just need to tell Tilt about it.

```ruby
# config/initializers/rails_html_javascript_templates.rb
Tilt.register Tilt::HamlTemplate, 'nghaml'

# config/application.rb
config.html_js_templates.markups.push 'nghaml'
```
Note: You would still need to use `foo`**`.html`**`.nghaml`

## Contributing

Fork, update, and send a PR. I'm likely to offer you project ownership.

Also note that this project is released with an **enforced** Contributor Code of Conduct.

## License

MIT License. Copyright 2015 TheOtherZach

## Theif

* Zach Briggs

## Original Authors & contributors

* Damien Mathieu<EMAIL_ADDRESS>* pitr<EMAIL_ADDRESS>* Jeremy Ebler<EMAIL_ADDRESS>

repository: theotherzach/html-rails-templates

repo_name: theotherzach/html-rails-templates


text:
---
title: "About"
layout: archive
sitemap: true
permalink: /
author_profile: true
---

I am an Assistant Professor in the Division of Applied Mathematics at Brown University.
I work on numerical methods for partial differential equations (PDEs), scientific machine learning, and PDE-constrained optimization.

**Research Highlight:**
*See this press release about my recent work on machine learning and black holes!*

 Short Bio:  Before coming to Brown, I was a postdoctoral researcher at the Center for Applied Scientific Computing at Lawrence Livermore National Laboratory.

Before that, I was a postdoc at the Institute for Computational and Experimental Research in Mathematics.
Before that, I was a postdoc at the Chair of Numerical Analysis at the Technical University of Munich, where I was supervised by Barbara Wohlmuth.
Before that, I was a Ph.D. student at the Oden Institute for Computational Engineering & Sciences, where I was supervised by Leszek Demkowicz.

## Current Research Funding
**DOE SC Early Career Research Program  2024–2028**   REASON-3D: Randomized, Entropic, Adaptive, and Scalable Optimization for Non-Intrusive Data-Driven Design
\
**OVPR Seed Award (Brown Internal)  2023**   Data-Driven High-Order Accurate Fail-Safe Neural Topology Optimization for Plastic Deformation and Fracture
\
**LLNL LDRD  2022–2024**   Adaptive Sampling for Risk-Averse Design and Optimization

### Other notes:
- I'm an active [MFEM](https://mfem.org/) developer. Check out our (growing) list of examples codes and miniapps [here](https://mfem.org/examples/).
- This website has been tidied up a little bit. If you are interested in my old finite element work (2015-2020), short summaries can be found [here](/research/).


text:
# UnityUIComponents

This is a repo to put components that I create that might be useful for others.  Feel free to grab and use them if they're helpful for you, and if you have any feedback or suggestions I'd love to hear them.  Thank you!

Component Description:

IconAutoAnimation:
 -  Requires free asset LeanTween ( or can be replaced with any tween type asset with code changes in SetNewVectorsAndAnimate() method and timing variables) on the asset store
 -  Requires call or input event that passes (string id) and (bool isReversed) to call correct component id and if it is animating in reverse
 -  id variable example:  DPad Up/Down and Left/Right set to function as icon selection input.  Input Event DPad.Up id = "up", DPad.Down id = "down"
 -  Once wiring is set up, you can place as many icons within a parent panel, move and scale them as desired, and they will animate and transform in sequence with each other at runtime

repository: solmas/UnityUIComponents

repo_name: solmas/UnityUIComponents


text:
Analysing Nets with Adaboost
===========================================================

http://en.wikipedia.org/wiki/AdaBoost

Description
-----------

Here analyse our nets using adaboost with decision stumps. We report the training and test errors.
Cross validation sets were for 300, 200, 100 and 50.

* Entire Nets folder:
Performed for the entire nets, with the features that were possible to be extracted from these large graphs, divided by cross-validation sets. From these results we can evaluate the vality of the chose division for networks (info, social, bio, and tech).

* Sampling Nets folder:
Perfomed for the sampled nets, divided by cross-validation sets. We test for all features (missing have 0 values) and for the 10 first features (that do not present missing values).