text:
---
title: 'Analyzing my MCAT data'
date: 2022-10-19
permalink: /posts/2022/10/bp1/
tags:
  - Life
  - Data
---

There are two datasets that I would like to analyze regarding how I prepared for my most recent MCAT exam on August 13th, 2022. First, a month's worth of CARS practice. Secondly, how I spent my time in the last week of studying. There's a chance of one or more subsequent posts about these data, since I haven't really come to terms yet with how I should/can analyze these data.

- [Introduction.](#introduction)
  - [Methods.](#methods)
    - [Data collection - CARS.](#data-collection---cars)
    - [Data collection - final week of studying.](#data-collection---final-week-of-studying)
- [CARS data and analysis.](#cars-data-and-analysis)
  - [Changes in CARS performance over time.](#changes-in-cars-performance-over-time)
  - [Comparing different companies' CARS resources.](#comparing-different-companies-cars-resources)
    - [Checking MANOVA assumptions.](#checking-manova-assumptions)
    - [Results of MANOVA.](#results-of-manova)
- [Final week of studying data and analysis.](#final-week-of-studying-data-and-analysis)
- [Takeaways.](#takeaways)

## Introduction.

The [MCAT (Medical College Admission Test)](https://en.wikipedia.org/wiki/Medical_College_Admission_Test) is an exam widely used by admissions committees in medical schools throughout North America. As of 2015, the MCAT consists of four sections:

    Section

    Questions	Minutes

    Chemical and Physical Foundations of Biological Systems (CP)

    59

    95

    Critical Analysis and Reasoning Skills (CARS)

    53

    90

    Biological and Biochemical Foundations of Living Systems (BB)

    59

    95

    Psychological, Social and Biological Foundations of Behavior (PS)

    59

    95

I wrote the MCAT exam on **August 13th, 2022**. I started practicing CARS on July 15th, 2022 and, everyday from then until August 12th, 2022, I tried to complete nine CARS passages - the equivalent of a full CARS section in an MCAT exam. In general, I used third-party resources, but also purchased a CARS Question Pack from the official AAMC store. Below is a list of the resources that I used for CARS:

1. [NextStep Verbal Practice (NS101)](https://www.amazon.com/MCAT-Verbal-Practice-Next-Step/dp/1944935231)
2. [The Princeton Review's CARS Workbook (2016; TPR)](https://www.amazon.com/MCAT-CARS-Workbook-Princeton-Review/dp/B01MT6IHHN)
3. [Khan Academy (KA)](https://jackwestin.com/khan-academy-mcat/critical-analysis-reasoning-skills-pratice)
4. [Jack Westin (JW)](https://jackwestin.com/mcat-cars-practice-exams/)
5. [Examkrackers 101 Verbal Reasoning Passages (EK101)](https://www.amazon.com/Examkrackers-Passages-MCAT-Verbal-Reasoning/dp/1893858553)
6. [AAMC CARS Question Pack 2 (AAMC QP2)](https://store.aamc.org/official-mcat-critical-analysis-and-reasoning-skills-question-pack-volume-2-online.html)

### Methods.

#### Data collection - CARS.

For each CARS passage, I used the stopwatch functionality of Windows 10's native Clock application to manually record the time I spent reading versus answering questions. After completing one passage, I moved on to the next without stopping, and calculated my scores at the very end.

Without exception, I always started by reading a passage, and did not preview questions before fully reading the passage. Time spent answering questions was defined as the time spent on the passage after having fully read the passage. Thus, even though I often referred back to the passage while answering questions, this was also included in time spent on the questions, and considered from the initial reading time. Furthermore, when practicing, I never reviewed previous passages.

The data were collected in a single spreadsheet, [CARS.xlsx](CARS.xlsx), which was then further analyzed.

#### Data collection - final week of studying.

To track the efficiency of my studying, I started using [PomodoroLogger](https://github.com/zxch3n/PomodoroLogger) to schedule and record my study sessions. Study sessions were categorized by defining tasks in PomodoroLogger.

In addition to these data, I also kept adding daily updates in [Daylio](https://daylio.net/), an iPhone app that I use to track my mood, completion of various activities (e.g. exercise, studying, etc.), and other happenings.

Data from PomodoroLogger and Daylio were exported from their respective applications as JSON files and then further analyzed.

## CARS data and analysis.

In this section, I will:

1. Present how my CARS performance changed over the entire study period of 27 days.
2. Examine differences between practice material.

### Changes in CARS performance over time.

Initially, I noticed that my timing improved quite quickly. I wanted to eventually finish each passage within six minutes, which would leave roughly 30 minutes to spare in a full-length exam. On the first day, I spent about 9 minutes per passage (min/psg), but only about 7.5 min/psg on my second day. Whereas my score did not improve dramatically over the course of several weeks, 24 days later (August 4th), I had shaved off nearly 1.5 min/psg on average.

The increase in overall passage speed on the first day was attributable to being faster at both reading and answering questions, to roughly equal proportions. Later on, however, 70-75% of the decrease in overall passage time was due to a decrease in time spent reading, rather than time spent answering questions.

Notably, for roughly one week between July 30th and August 4th, my scores continued to decrease quite dramatically below their averages. However, the decreasing trend in reading and question-answering speed were not significantly impacted by this slump. Furthermore, I was eventually able to recover from this slump, but both the slump and recovery may be attributable to changes in practice material.

     Fig. 1. Changes in key metrics over time.

Overall score: Overall percentage score for all passages completed in a given day.

Total passage time: Total time (in minutes) spent on a passage (reading and answering questions).

Passage reading time: Total time (in minutes) spent reading each passage.

Passage question time: Total time (in minutes) spent answering questions in each passage.

Individual question time: Average time (in minutes) spent on each question in each passage

Reading/question time: The ratio of time spent reading versus answering questions, in each passage.

Errorbars indicate standard error of the mean (s.e.m) of all passages completed in a single day. Black dashes show a 5-day moving average of the means (circles). The s.e.m of the 5-day moving average is shown by the gray region.

How are exams structured? Most, but not all, practice materials were structured as practice exams. Pooling data from all dates and companies (e.g. AAMC, TPR, etc.), my timing seemed to be fairly consistent from passage-to-passage, whereas my overall score tended to suffer considerably in the middle passages. It is unclear whether this decrease in performance is due to the passages being more difficult, or because of a personal characteristic.

![Figure 2](
  https://github.com/haganenoneko/haganenoneko.github.io/blob/master/_posts/figs/2022-10-19-figs/CARS_StatsByPsg.png?raw=true
)
**Figure 2. Score and timing per passage.**
Percentage score (left) and overall time (in minutes, right) for the first nine passages completed in a given day, for all days in the dataset. *Errorbars in both plots show SEM. Boxplots (right) extend from the first to the third quartiles. Black dots and white dashes inside boxes indicate means and medians, respectively. Black diamonds indicate outliers.*

Another important consideration is the amount of time I 'waste' when I spend longer than usual reading a passage or answering its questions. Intuitively, I may 'waste' time doing so because I may lose time better spent on later passages.

To quantify the amount and effect of wasted time, I compared my timing and score for each passage to their expected values based on uniform performance. For example, if I scored 80% and spent 63-minutes on a 9-passage practice test, then, uniform performance would lead me to expect that I scored 80% and spent 7-minutes on each individual passage. Subtracting the expected values, I get a value for the 'excess' time and score for each passage:

$$
\begin{aligned}
    \textbf{Raw values} \quad t_i&, \quad s_i \\
    \textbf{Uniform performance} \quad
        t_U &= \frac{\sum^N_{i=1} t_i}{N}, \quad
        s_U = \frac{\sum^N_{i=1} s_i}{N} \\
    \textbf{Excess performance} \quad
        t_{xs} &= t_i - t_U, \quad
        s_{xs} = s_i - s_U \\
\end{aligned}
$$

If the excess time is positive, then I spent longer than expected on that passage, based on what was expected from uniform performance. Similarly, if the excess score on a passage is negative, then I scored lower than expected.

I often spend less time than expected reading passages and answering questions (55% and 56% of passages, respectively). Furthermore, in 60% of passages where I read or answer questions faster than expected, I also score better. However, if I spend more time than expected reading or answer questions, I am nearly 1.6x more likely to score lower than score better. Therefore, the take-away seems to be that I should generally feel comfortable with my timing, but be careful if I'm spending longer than usual on a passage.

![Figure 3](https://github.com/haganenoneko/haganenoneko.github.io/blob/master/_posts/figs/2022-10-19-figs/CARS_xs-stats.png?raw=true "Figure 3")
**Figure 3. Visualization of excess performance.**
Excess points (score) per passage, versus excess reading time (top), question time (middle), and total time (bottom) per passage. *Circles indicate data from individual passages. White crosses indicate passages from the most recent day in the data. Shaded regions of brighter colour correspond to greater density of passages in the indicated region. Dashed lines indicate the positions of zeroes (daily means based on uniform performance). Labelled percentages indicate the percent of all passages within the indicated quadrants. The passages may not sum to 100% due to rounding.*

### Comparing different companies' CARS resources.

First, I want to know whether passages from different companies differed in the three main metrics presented above, namely, reading time, question time, and percent score. To do this comparison, I used a multivariate analysis-of-variances (MANOVA) test with [Pillai's trace](https://online.stat.psu.edu/stat505/lesson/8/8.3) as the test statistic. Pillai's trace was chosen as the test statistic because most of the assumptions required for MANOVA are violated in our data:

#### Checking MANOVA assumptions.

1. Homogeneity of variances and covariances.

To check equal variances, we use Levene's test:

|variable   | df1| df2| statistic|         p|
|:----------|---:|---:|---------:|---------:|
|pct        |   5| 237|  2.612093| 0.0253957|
|t_question |   5| 237|  3.564348| 0.0039792|
|t_read     |   5| 237|  1.744274| 0.1252767|

and Box's M test for variance-covariance matrices:

| statistic| p.value| parameter|method                                              |
|---------:|-------:|---------:|:---------------------------------------------------|
|  150.4087|       0|        30|Box's M-test for Homogeneity of Covariance Matrices |

2. Linearity

|var1       |var2       |   cor| statistic|        p|method   |
|:----------|:----------|-----:|---------:|--------:|:--------|
|t_read     |t_question |  0.24|   1825167| 1.95e-04|Spearman |
|t_read     |pct        | -0.22|   2914882| 5.90e-04|Spearman |
|t_question |t_read     |  0.24|   1825167| 1.95e-04|Spearman |
|t_question |pct        | -0.33|   3184723| 1.00e-07|Spearman |
|pct        |t_read     | -0.22|   2914882| 5.90e-04|Spearman |
|pct        |t_question | -0.33|   3184723| 1.00e-07|Spearman |

3. Normality

     Fig. 4.

 QQ plots for reading times.

Besides some large outliers in NS and TPR, most companies' data look fairly normal.

     Fig. 5.

 QQ plots for question times.

Although some companies' data look close to normal (particularly NS'), others are clearly not normal (e.g. TPR, JW).

     Fig. 6.

 QQ plots for percent scores.

Note that, since percents are constrained in $[0,1]$, we do not expect that these will be normally distributed at all.

#### Results of MANOVA.

MANOVA with Pillai's test statistic gave a p-value of 6.279e-06, so I next conducted pair-wise comparisons with Games-Howell's test, which was chosen because it is non-parametric and thus suitable for data that are not normally distributed.

In terms of timing, only NS differed significantly from AAMC, and only in reading time (Figure 7). This is somewhat surprising because, from the boxplots, it appears as if the different companies' question times are distributed quite differently from one another. Yet, for question times, KA:NS and NS:TPR are the only statistically significant combinations. Moreover, only the scores of JW and NS differed significantly from those of AAMC (both were lower; Figure 8).

Some of these 'surprising' results may be attributed to the low sample size for certain companies. For instance, I only did 9 EK101 passages and 18 JW passages. In comparison, I did 90+ NS passages and 50 or so TPR passages. For a more accurate comparison, it would be helpful to collect more data from each of the companies.

     Fig. 7.

 MANOVA for reading and question times.

Box plots for reading time (blue) and question time (yellow). *Circles indicate outliers. Boxplots extend from the first to third quartiles for each company's data.*

     Fig. 8.

 MANOVA for percent scores.

*Black circles indicate scores of individual passages. Red circles indicate the mean score for each company.*

|variables  |Company1 | Company2 |    p.adj|
|:----------|:------|:------|--------:|
|pct        |AAMC   |JW     | 1.30e-02|
|pct        |AAMC   |NS     | 6.00e-03|
|pct        |JW     |KA     | 1.70e-02|
|pct        |KA     |NS     | 1.80e-02|
|t_question |KA     |NS     | 5.00e-03|
|t_question |KA     |TPR    | 6.00e-03|
|t_read     |AAMC   |NS     | 1.00e-03|
|t_read     |EK101  |NS     | 1.50e-02|
|t_read     |JW     |NS     | 2.02e-04|
|t_read     |KA     |NS     | 4.90e-06|
|t_read     |KA     |TPR    | 2.40e-02|
|t_read     |NS     |TPR    | 1.80e-02|

**Table 1. Pairwise comparisons using Games-Howell's test.**

## Final week of studying data and analysis.

Roughly one week before my exam, I began scheduling and recording my study sessions using [PomodoroLogger](https://github.com/zxch3n/PomodoroLogger). In addition, I kept adding daily updates to [Daylio](https://daylio.net/), an iPhone app that I use to track my mood and completion of various activities and daily goals.

Besides CARS, I spent the first few weeks of my studying heavily focused on psychology and sociology, mainly via [Anki](https://apps.ankiweb.net/) (which I ultimately spent a total of 1.52 days in). Afterwards, I shifted my focus to physiology and biochemistry. The latter took up most of my final week of studying.

     Fig. 9.  "Final week of studying"

 How I spent my final week of studying.

* (A) Time spent (in hours) in Pomodoro sessions ("active", green bars) versus sleeping (blue bars). Red lines and circles show, for each day, the time spent in Pomodoro sessions, as a fraction of the total time remaining in a day after subtracting time spent sleeping.
* (B) Study sessions each day, colourized by categories indicate in the legend (upper right). Labelled arrows in each day indicate time spent asleep.
* (C) Histogram showing the number of Pomodoro sessions in each hour of day throughout the week.
* (D) Heatmap showing the presence or absence of certain activities. For columns labelled with weekdays, the absence of an event is indicated by a white cell, whereas a black cell indicates that an activity was done that day. Cells in the penultimate column are labelled with the percent of the days in the current week where an activity was completed. The column 'All' indicates the total frequency of completion for each activity, as a percentage of days from when I began using Daylio, up until the last day of studying.

I believe that the data in Figure 9 are generally an underestimation of the actual time I spent studying, as I often forgot to restart my Pomodoro sessions after a break, or continued working after a session had ended. For example, on August 12th, the day before my exam, I did my first and only practice full-length exam (the AAMC Sample exam). I probably took about 8 hours, but only logged about half this time (as "N/A" sessions).

Nonetheless, I think that this data captures my daily schedule quite well: I usually woke up sometime between 10 AM and 1 PM, and rarely started studying before 1 PM. Most of my studying was done in one of two time windows: 2-8 PM and 10 PM - 3 AM. On average, I studied 5.1 hours a day and slept 11.5 hours a day.

Note, however, that the time I spent 'sleeping' was simply calculated as the longest time interval in a day that did not have a Pomodoro session. For example, if I woke up and did not study, but did something else for a couple hours, this additional time is also considered time spent sleeping.

How efficient was I, time-wise? One way to be 'efficient' would be to have simply spent all my waking hours in Pomodoro sessions. In reality, I spent somewhere around 30-50% of my time awake in Pomodoro sessions (Figure 9A). Interestingly, the fraction of my waking hours that I spent studying peaked around 50% on Monday and slowly decreased in an oscillating manner over the week. At this point, I had been studying fairly hard everyday for a couple weeks, so I was probably quite tired, but it's unclear whether this has anything to do with the oscillating pattern.

## Takeaways.

First, I think that practicing CARS helped me both materially and psychologically. As each section of the MCAT has passage-based questions and incentivizes strong reasoning ability, practicing CARS may improve performance in the other sections, too. Furthermore, simply doing a nine (or more) passages everyday, regardless of score or timing, probably helped me build stamina for the real exam, especially since I only did one full-length practice exam.

My initial emphasis on practicing CARS was motivated by past difficulties in the section. In fact, there were some days where the only studying I did was my daily CARS practice. However, progress in CARS can be slow, difficult, and non-linear (Figure 1). Even I had weeks where my score and/or timing worsened considerably. Though, non-linear progress, plateaus, and fatigue are probably inevitable when compressing MCAT preparation into a short timeframe. Developing effective ways to work around these obstacles is paramount to sustaining motivation and general well-being. Looking back, I would have preferred to follow a more structured approach to studying the scientific material, e.g. [Integrated MCAT](https://integrated-mcat.com/).

In 2018, when I eventually scored a 526, I religiously followed the advice of [r/mcat](https://www.reddit.com/r/Mcat/): I used UWorld, did one full-length exam each week (including all of the AAMC exams), and completed all of the other AAMC materials - multiple times, even, for some of them. This time, of course, I only purchased one AAMC resource (CARS QP2) and only did one full-length practice exam on the day before my exam. Thus, I now think that reasoning is very important in the MCAT, and not easily obtained through practice.

By the way, this is my first post here in almost a year.. That's insane. Coincidentally, I've been a NEET for nearly just as long. Wow. Hopefully, if/when I update this blog again, I'll no longer be a NEET.


text:
# RollingCounter

[![Travis build status][badge]][travis]

[badge]: http://img.shields.io/travis/globaldev/rolling_counter.svg
[travis]: https://travis-ci.org/globaldev/rolling_counter

A Redis-based rolling counter with customisable windows.

## Installation

Add this line to your application's Gemfile:

```ruby
gem "rolling_counter"
```

And then execute:

```sh
bundle
```

Or install it yourself as:

```sh
gem install rolling_counter
```

## Usage

### Basic Usage

Basic usage of RollingCounter is very simple, and revolves around the methods
`#inc` to increment a count, and `#get` to retrieve a count for a given
time window.

```ruby
require "redis"
require "rolling_counter"

max_window = 60  # the maximum timeframe in seconds over which to count
counter    = RollingCounter.new(Redis.current, max_window)
key        = "my-counter"

counter.inc(key)    #=> 1
sleep 2
counter.inc(key)    #=> 2

# Query counts using `max_window` as the time window
counter.get(key)    #=> 2

# Query counts over a custom time window (in seconds)
counter.get(key, 1) #=> 1
```

### Multiple Counters

A single counter can be used to count multiple keys, as long as the required
`max_window` is the same for each.

```ruby
keys = %w{ key1 key2 key3 }
100.times { counter.inc(keys.sample) }

keys.collect { |key| [key, counter.get(key)] }
#=> [["key1", 40], ["key2", 31], ["key3", 29]]
```

Do not attempt to use counters with a different `max_window` to access the same
keys, as results may be inconsistent. Instead set `max_window` to the max
window needed, then pass the window required to `#get`.

### Multiple Windows

Using the binary arity version of `#get(key, window)`, it's possible to track
counts over different windows for the same key.  A use case for this might be
a request rate-limiter which allows burts of requests over a short time period,
but still has a limit over a longer window.

```ruby
class RateLimiter
  def initialize(redis, windows)
    @redis      = redis
    @windows    = windows
    @max_window = windows.keys.max
    @key        = rand(36**20).to_s(36) # use a random key name
  end

  def inc
    counter.inc(@key)
  end

  def limited?
    # We can use #mget to atomically get counts for multiple windows
    counts = counter.mget(@key, @windows.keys)
    @windows.any? { |window, cap| counts[window] >= cap }
  end

  private

  def counter
    @counter ||= RollingCounter.new(@redis, @max_window)
  end
end

# Define a limiter with two windows: 10 in one second, or 15 in 5 seconds
limiter = RateLimiter.new(Redis.current, { 1 => 10, 5 => 15 })

9.times { limiter.inc }
limiter.limited?         #=> false
limiter.inc              #=> 10
limiter.limited?         #=> true (hit the "10 in 1 second" cap)

sleep 2
limiter.limited?         #=> false

5.times { limiter.inc }
limiter.limited?         #=> true (hit the "15 in 5 seconds" cap)
```

This example could be trivially extended to provide the ability to track
multiple counters, for example to track and limit individual API key usage.

## Contributing

1. Fork it
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am "Add some feature"`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create new Pull Request

license: MIT

branch_name: refs/heads/master

extension: md

license_type: permissive


text:
---
layout: kanji
v4: 1013
v6: 1088
kanji: 荷
keyword: baggage
elements: baggage, flowers, what, person, can, mouth, street, nail, spike
strokes: 10
image: E88DB7
on-yomi: カ
kun-yomi: に
permalink: /rtk/荷/
prev: 何
next: 俊
---

1) [dingomick] 22-2-2007(262): TSA guard: What's in the baggage?! It's just flowers, I swear!

2) [rtkrtk] 1-11-2007(85): Your girlfriend arrives at the airport.

3) [msukovich] 7-5-2008(51): Customs agent: "What kind of flowers are these in your baggage, sir? Poppies, huh? Please come with us, sir...".

 The sniffer dogs go bezerk! "What's in the bag?" yell the guards. But when they open the bag they just find it's full of flowers.

5) [fuaburisu] 31-3-2006(12): My story is similar to rptb1, only that the baggage is extremely heavy, and when the guards open it they see flowers and say "What kind of flowers is that !?" (you would never imagine flowers would make baggage this heavy).


text:
---
layout: default
---
# Recurrent Neural Networks
Compared to vanilla neural networks, there are two things we need to know first about rnn:

1. A recurrent neural network is a neural network that is specialized for processing a sequence of values $$x^{(1)}.....x^{(t)}$$. Recurrent networks can scale to much longer sequences.

2. Most recurrent networks can also process sequences of variable length.

## Overview: A Simple RNN And The Computational Graph
Essentially, any function involving recurrence can be considered a recurrent neural network. Many recurrent neural networks use Eq. 1 or similar equation to define the values of their hidden units.

$$
{h^{(t)} = f(h^{(t-1)}, x^{(t)}; \theta)} \tag{1}
$$

Figure 0: A recurrent network with no outputs. This recurrent network just processes information from the input x by incorporating it into the state h that is passed forward through time.
 (Left) Circuit diagram. The black square indicates a delay of 1 time step.
(Right) The same network seen as an unfolded computational graph, where each node is now associated with one particular time instance.

Most RNN may have a output layer,
$$
y^{(t)} = g(h^{(t)};\theta)
$$
where $$g$$ could be the softmax function for classification tasks.

## The Challenges of Long-Term Dependencies

## The Vanishing Gradient problems
Let disscuss this problem under a more realistic RNN formulation:

$$
\begin{align}
h_t &= Wf(h_{t-1}) + W^{(hs)}x_{[t]} \\
\hat{y}_t &= W^{(S)}f(h_t)
\end{align}
$$

where $$W$$ is the shared hidden layer parameter, $$W^{(hs)}$$ is the input transformation paramter, and the $$W^{(S)}$$ is the output softmax parameter.

Let $$E$$ be the total error, and $$E_t$$ be the error at a specified time step $$t$$. Let $$T$$ be the total time step, then

$$
\frac{\partial{E}}{\partial{W}} = \sum^T_{t=1}\frac{\partial{E_t}}{\partial{W}}
$$

Apply chain rule to $$\frac{\partial{E_T}}{\partial{W}}$$,

$$
\frac{\partial{E_T}}{\partial{W}} = \sum^t_{k=1} \frac{\partial{E_t}}{\partial{y_t}} \frac{\partial{y_t}}{\partial{h_t}} \frac{\partial{h_t}}{\partial{h_k}} \frac{\partial{h_k}}{\partial{W}}
$$

Consider $$\frac{\partial{h_t}}{\partial{h_k}}$$,

$$
\frac{\partial{h_t}}{\partial{h_k}} = \Pi^t_{j=k+1} \frac {\partial h_j}{\partial h_{j-1}}
$$

$$\frac {\partial h_j}{\partial h_{j-1}}$$ is the Jacobian Matrix of $$h_t = Wf(h_{t-1}) + W^{(hs)}x_{[t]}$$.

$$
\dfrac {\partial h_j}{\partial h_{j-1}} =
\begin{bmatrix}
\dfrac {\partial h_j}{\partial h_{j-1}^0} & \dfrac {\partial h_j}{\partial h_{j-1}^1} & \dots & \dfrac {\partial h_j}{\partial h_{j-1}^n}
\end{bmatrix}
=
\begin{bmatrix}
\dfrac {\partial h_j^0}{\partial h_{j-1}^0} & \dfrac {\partial h_j^0}{\partial h_{j-1}^1} & \dots & \dfrac {\partial h_j^0}{\partial h_{j-1}^n} \\
\dfrac {\partial h_j^1}{\partial h_{j-1}^0} & \dfrac {\partial h_j^1}{\partial h_{j-1}^1} & \dots & \dfrac {\partial h_j^1}{\partial h_{j-1}^n} \\
\vdots & \vdots & \ddots & \vdots \\
\dfrac {\partial h_j^n}{\partial h_{j-1}^0} & \dfrac {\partial h_j^n}{\partial h_{j-1}^1} & \dots & \dfrac {\partial h_j^n}{\partial h_{j-1}^n}
\end{bmatrix}
$$

$$h_{j}^l$$ means the $$l$$-th element in vector $$h_j$$. Note, according to the definition of Jacobian, Given vector $$f$$ with length $$m$$ and $$x$$ with length $$n$$, the Jacobian
 $$\dfrac{\partial \textbf{f}}{\partial \textbf{x}}$$ is a $$m \times n$$ matrix.

Now consider the derivative of each element of the matrix $$\dfrac {\partial h_{j, m}}{\partial h_{j-1, n}}$$, because

$$
h_j^m = h_j^{[m,1]} = \sum_k W^{[m,k]}*f(h_{j-1})^{[k,1]}
$$

where $$A^{[m,n]}$$ means the element at the $$m$$-th raw, $$n$$-th column of matrix $$A$$.  Finally,

$$
\dfrac{\partial h_{j}}{\partial h_{j-1}} =
\begin{bmatrix}
W^{[0,0]}*f^{\prime}(h_{j-1}^{[0,1]}) & W^{[0,1]}*f^{\prime}(h_{j-1}^{[1,1]}) & \dots & W^{[0,m]}*f^{\prime}(h_{j-1}^{[m,1]}) \\
W^{[1,0]}*f^{\prime}(h_{j-1}^{[0,1]}) & W^{[1,1]}*f^{\prime}(h_{j-1}^{[1,1]}) & \dots & W^{[1,m]}*f^{\prime}(h_{j-1}^{[m,1]}) \\
\vdots & \vdots & \ddots & \vdots \\
W^{[m,0]}*f^{\prime}(h_{j-1}^{[0,1]}) & W^{[m,1]}*f^{\prime}(h_{j-1}^{[1,1]}) & \dots & W^{[m,m]}*f^{\prime}(h_{j-1}^{[m,1]})
\end{bmatrix}
= Wdiag[f^{\prime}(h_{j-1})]
$$

where $$diag(z) =
\begin{pmatrix}
    z_0                                    \\
      & z_1             &   & \text{0}\\
      &               & \ddots                \\
      & \text{0} &   & z_{n-1}            \\
      &               &   &   & z_n
\end{pmatrix}
$$

Analyzing the norm of the Jacobians,

$$
\| \dfrac{\partial h_j}{\partial h_{j-1}} \| \leq \|W\|\|diag[f^\prime (h_{j-1})] \leq \beta_W\beta_h
$$

where $$\beta_W \text{, } \beta_h$$ are the upper bounds of the norms of $$W \text{and } diag[f^\prime]$$. So,

$$
\|\dfrac {\partial h_t} {\partial h_k}\| = \| \Pi_{j=k+1}^{t} \dfrac {\partial h_j}{\partial h_{j-1}} \| \leq (\beta_W\beta_h)^{t-k}
$$

which could easily become very large or very small.

Vanishing gradient could actually do harm to learning process. The error at a time step ideally can tell a previous time step from
 many steps away to change during backprop. When vanishing gradient happens, information from time steps far away are not taken into
consideration.In language modelling training, given sentence:
```
Jane walked into the room. John walked in too. It was late in the day. Jane said hi to (?)
```
We can easily find out that the qustion mark should be `Jane`, however this `Jane` depends on the word 16-time-step away. It is hard for
the error signal to flow that long range of  time steps.

### Multiple Time Scales

One way to deal with long-term dependencies is to design a model that operates at multiple time scales, so that some parts of the model operate at fine-grained time scales and can handle small details, while other parts operate at coarse time scales and transfer information from the distant past to the present more efficiently.

1. **Adding Skip Connections through Time:** add direct connections from variables in the distant past to variables in the present.

2. **Leaky Units:**
When we accumulate a running average $$μ_t$$ of some value $$v_t$$ by applying the update $$μ_t ← αμ_{t−1} + (1 − α)v_t$$ the $$α$$ parameter is an example of a linear self-connection from $$μ_{t−1}$$
to $$μ_{t}$$. Leaky units are hidden units with linear self-connections. A leak unit in rnn could be represented as $$h_{t,i} = α_ih_{t−1,i} + (1 − α_i)F_i(h_{t−1}, x_{t})$$
The standard RNN corresponds to $$α_i = 0$$, while here different values of $$α_i$$ were randomly sampled from $$(0.02, 0.2)$$, allowing some units to react quickly while others
are forced to change slowly, but also propagate signals and gradients further in time. Note that because $$α < 1$$, the vanishing effect is still present (and gradients can still explode via $$F$$),
but the time-scale of the vanishing effect can be expanded.

3. **Remove Connections:** remove length-one connections and replace them with longer connections

### LSTM

Like leaky units, gated RNNs(long short-term memory and networks based on the gated recurrent unit etc.) are based on the idea of creating paths through time that have derivatives that
 neither vanish nor explode. Leaky units did this with connection weights that were either manually chosen constants or were parameters. Gated RNNs generalize this to connection weights
that may change at each time step(conditioned on the context).

A LSTM unit consists of a memory cell $$c_t$$, an *input gate* $$i_t$$, a *forget gate* $$f_t$$, and an *output gate* $$o_t$$. The memory cell caries the memory content of a LSTM unit, while
the gates control the amount of changes to and exposure of the memory content. The content of the memory cell $$C_t$$ at time-step $$t$$ is update similar to the form of a gated
 leaky neuron.

$$
C_t = f_tC_{t-1} + i_t\tilde{C}_t
$$

where $$\tilde{C}$$ is the candidate memory:

$$
\tilde{C_t} = tanh(Wh_{t-1} + W_{[x]}x_t)
$$

Gates are all sigmoid functions of affined transformation on current input $$x_t$$ and last hidden state $$h_{t-1}$$

$$
\begin{align}
f_t &= \sigma(W_{f}h_{t-1} + U_fx_t + b_f) \\
i_t &= \sigma(W_ih_{t-1} + U_ix_t + b_i) \\
\end{align}
$$

The final hidden state of $$h_t$$ could be computed as

$$
h_t = o_ttanh(C_t)
$$

where $$o_t = \sigma(W_oh_{t-1} + U_ox_t + b_o)$$

### GRU
GRU is more like a leaky unit, except that $$\alpha$$ now becomes  trainable and depend on the context.

$$
h_t = (1-z_t)h_{t-1} + z_t\tilde{h_t}
$$

where $$\tilde{h_t}$$ is the new candidate memory

$$
\tilde{h_t} = tanh(r_t \odot Wh_{t-1} + W_{[x]}x_t)
$$

$$z_t$$ are called *update gate*, $$r_t$$ are called *reset gate*.

$$
\begin{align}
z_t &= \sigma(W_zh_{t-1} + U_zx_t + b_z) \\
r_t &= \sigma(W_rh_{t-1} + u_rx_t + b_r) \\
\end{align}
$$

### Trick for exploding gradient: clipping trick
The intuition is simple, we set a *threshold* to the gradient, make the absolute value of gradient no larger than the threshold.
```python
if math.abs(gradient) > threshold:
    gradient = threshold if gradient > 0 else -threshold
```

## Reference

1. Bengio et al. Deep Learning, chapter 10 Sequence Modeling: Recurrent and Recursive Nets
2. Bengio [Advances in optimizing recurrent networks](http://<IP_ADDRESS>/arxiv.org/pdf/1212.0901.pdf)
3. Socher [cs224d classnotes](http://cs224d.stanford.edu/lectures/CS224d-Lecture8.pdf)
4. Bengio et al. [Gated Feedback Recurrent Neural Networks](http://arxiv.org/pdf/1502.02367v3.pdf)


text:
---
title: Recipes
draft: true
category: recipes
---
+ [to stream](to-stream.md)
+ [tasks](tasks.md)
+ [rendering templates](rendering-templates.md)
+ [rename keys](rename-keys.md)
+ [inspecting-the context](inspecting-the-context.md)
+ [delete files](delete-files.md)
+ [default layout](default-layout.md)
+ [declarative config](declarative-config.md)
+ [create-a collection](create-a-collection.md)
+ [collection loaders](collection-loaders.md)
+ [browser sync](browser-sync.md)
+ [assemblefile](assemblefile.md)

## Related

* [gulp's docs](https://github.com/gulpjs/gulp/tree/master/docs): Since assemble supports gulp plugins, be sure to take a look at the gulp documentation and [recipes](https://github.com/gulpjs/gulp/tree/master/docs/recipes).

repository: assemble/assemble

gha_language: CSS

gha_license_id: MIT

repo_name: assemble/assemble


text:
---
author: Fiona Krakenbuerger
date: 2015-07-20 12:00
image:
  src: /files/blog/2015/07/jobs.jpg
  title: Jobs bei OKFDE
layout: post
tags:
- Jobs
title: Junior Researcher/Journalist für OpenBudgets.EU gesucht
type: post
---
###  Junior Researcher/Journalist with a strong technical background (Product Owner) in the H2020 EU Project: OpenBudgets.EU

* Part-Time (50%) limited term: 14 months
* Salary: depending on experience
* Start: asap
* Application deadline: 10 August 2015

The Open Knowledge Foundation Germany is one of the leading NGOs in the field of Open Knowledge, Open Data and Transparency in Germany. We support the Open Data community in Germany,  run innovative projects such as OffenerHaushalt, CodeforGermany and Jugend hackt, and provide expertise to users and providers of open data, in the government, civil society, and media. We are now hiring for one of the H2020 EU projects: OpenBudgets.EU.

OpenBudgets.eu is a platform for fiscal transparency in the EU and its member states. Open Budgets develops a Software as a Service platform for budget and spending data. The project focuses on the development easy-to-use, flexible and attractive tools for comparative analysis and visualisation.

Open Knowledge Foundation Deutschland is responsible for ‘Communication and Dissemination’ of Open Budgets. We mainly focus on three stakeholder groups: journalists, policy makers (MEPs), and participatory budgeting organisations. For specific tools that cater to Journalists, we are looking for a junior product owner with an interest in journalism, or a researcher/journalist with a technical background.

Tasks

Your tasks will consists of the development of user requirement workshops and reports, testing tools and contribute to the development of new tools around Budget and Spending data for Journalists. It is not a traditional role as a product owner, as you will be working in a large consortium building a platform and tools together. The emphasis lies with the gap analysis, stakeholder workshops (with training elements), creating personas, detailed user stories and requirements.  In addition, you can be asked to contribute to broader stakeholder outreach and training on the OpenBudgets platform and its tools.

What we offer

* An exciting research project on the crossroads of journalism and technology development;
* Experience in working in an EU research consortium;
* Room for initiative and contribution to the design of the research;
* Becoming part of a dynamic and innovative NGO;
* A welcoming and motivated team;
* Office in Berlin, flexible working hours, friendly office atmosphere
* Access to and close cooperation with the (international) networks of investigative- and data-journalists and open data organisations.
* Travel and conference visits.

What we expect

* Recent graduate (approx. 1 year of working experience)
* Experience with with user-requirement research and gap analysis, experience with product development itself is a plus.
* Experience with research, report writing and documentation (in English)
* Experience as or affinity with data-journalism and/or with Fiscal Transparency and Open Spending data.
* Team-player and willingness to work in the Berlin Office
* Excellent knowledge of spoken and written English. Good knowledge of German.
* Affinity with Open Data, Transparency, and Accountability and identification with the [Open Knowledge values][]

Please apply by sending your CV and Cover Letter (in English) to: <a href="mailto:getinvolved@okfn.de?Subject=Application<EMAIL_ADDRESS>and <a href="mailto:anna.alberts@okfn.de?Subject=Application<EMAIL_ADDRESS>
For more information, please contact: <a href="mailto:anna.alberts<EMAIL_ADDRESS>
[getinvolved<EMAIL_ADDRESS>[anna.alberts<EMAIL_ADDRESS>[Open Knowledge values](/mission)

extension: markdown

gha_language: Rich Text Format


text:
# Continuous Integration ReadMe

## 1 Introduction

This document serves as a guide for developers to test this project
in a Continuous Integration (CI) environment.  It can also be used
to evaluate this project for new users.

To test the installation process, the scripts under the ci directory
can create compute, networking and storage resources to run SNAPS-boot
inside an open stack environment.

iPXE image is used to PXE boot from VM.

IPMI is not available in this environment and is not tested.

This will enable more testing and development to occur than would be
supported on available physical hardware.

### 1.1 Terms and Conventions

The terms and typographical conventions used in this document are listed and
explained in below table.

| Convention | Usage |
| ---------- | ----- |
| CI Server | This is the physical or virtual server were we run the CI script. The CI server will connect to an OpenStack instance to create the environment|
| Build Server | The VM which will install snaps-boot |
| Kickseed VM | The VMs that are installed by snaps-boot |
### 1.2 Acronyms

The acronyms expanded below are fundamental to the information in this
document.

| Acronym | Explanation |
| ------- | ----------- |
| CI | Continuous Integratoin |
| VM | Virtual Machine |

## 2 CI server setup

1. Download and install snaps-oo.
```
git clone https://gerrit.opnfv.org/gerrit/snaps
sudo apt install python git python2.7-dev libssl-dev python-pip
sudo pip install -e snaps/snaps
```

2. Download and set branch of snaps-openstack to test
```
git clone https://github.com/cablelabs/snaps-boot.git
cd snaps-boot
git checkout <branch>
```
3.  Configure the environment file.
This file will provide information about the configuration and the
OpenStack isntance which snaps-openstack will be installed on.
lab3.yaml
```
---
build_num: ci-launcher

# These values are variable
admin_user: admin
admin_proj: admin
admin_pass: something
auth_url: http://<IP_ADDRESS>:5000
id_api_version: 3
proxy_host:
proxy_port:
ssh_proxy_cmd:

ext_net: external
ext_subnet: external-net

src_snaps_boot_dir: /home/ubuntu/snaps-boot
src_copy_dir: /tmp
local_snaps_boot_dir: /home/ubuntu/snaps-boot

os_pxe_user_pass: password

ctrl_ip_prfx: 10.0.0
admin_ip_prfx: 10.1.0
priv_ip_prfx: 10.1.1
pub_ip_prfx: 10.1.2

build_kp_pub_path: /tmp/pxe-kp-lab1-launcher.pub
build_kp_priv_path: /tmp/pxe-kp-lab1-launcher

pxe_machine_user: root
pxe_machine_pass: Pa$$w0rd

hosts_yaml_target_path: /tmp/hosts.yaml
```
4. Launch the test
This is best to do in a screen session and redirect the output.
It will take about an hour to run.
```
cd snaps/examples
python ./launch.py -t /home/ubuntu/snaps-boot/ci/snaps/snaps_pxe_tmplt.yaml \
-e lab3.yaml -d
```
5. Clean the environment
This will remove the account, VMs, netwoks and storage that was created
in the install.
```
python ./launch.py -t /home/ubuntu/snaps-boot/ci/snaps/snaps_pxe_tmplt.yaml \
-e lab3.yaml -c
```


text:
# onnxruntime Support

## Introduction of ONNX Runtime

**ONNX Runtime** is a cross-platform inference and training accelerator compatible with many popular ML/DNN frameworks. Check its [github](https://github.com/microsoft/onnxruntime) for more information.

## Installation

*Please note that only **onnxruntime>=1.8.1** of on Linux platform is supported by now.*

### Install ONNX Runtime python package

- CPU Version

```bash
pip install onnxruntime==1.8.1 # if you want to use cpu version
```

- GPU Version

```bash
pip install onnxruntime-gpu==1.8.1 # if you want to use gpu version
```

### Install float16 conversion tool (optional)

If you want to use float16 precision, install the tool by running the following script:

```bash
pip install onnx onnxconverter-common
```

## Build custom ops

### Download ONNXRuntime Library

Download `onnxruntime-linux-*.tgz` library from ONNX Runtime [releases](https://github.com/microsoft/onnxruntime/releases/tag/v1.8.1), extract it, expose `ONNXRUNTIME_DIR` and finally add the lib path to `LD_LIBRARY_PATH` as below:

- CPU Version

```bash
wget https://github.com/microsoft/onnxruntime/releases/download/v1.8.1/onnxruntime-linux-x64-1.8.1.tgz

tar -zxvf onnxruntime-linux-x64-1.8.1.tgz
cd onnxruntime-linux-x64-1.8.1
export ONNXRUNTIME_DIR=$(pwd)
export LD_LIBRARY_PATH=$ONNXRUNTIME_DIR/lib:$LD_LIBRARY_PATH
```

- GPU Version

In X64 GPU:

```bash
wget https://github.com/microsoft/onnxruntime/releases/download/v1.8.1/onnxruntime-linux-x64-gpu-1.8.1.tgz

tar -zxvf onnxruntime-linux-x64-gpu-1.8.1.tgz
cd onnxruntime-linux-x64-gpu-1.8.1
export ONNXRUNTIME_DIR=$(pwd)
export LD_LIBRARY_PATH=$ONNXRUNTIME_DIR/lib:$LD_LIBRARY_PATH
```

In Arm GPU:

```bash
# Arm not have 1.8.1 version package
wget https://github.com/microsoft/onnxruntime/releases/download/v1.10.0/onnxruntime-linux-aarch64-1.10.0.tgz

tar -zxvf onnxruntime-linux-aarch64-1.10.0.tgz
cd onnxruntime-linux-aarch64-1.10.0
export ONNXRUNTIME_DIR=$(pwd)
export LD_LIBRARY_PATH=$ONNXRUNTIME_DIR/lib:$LD_LIBRARY_PATH
```

You can also go to [ONNX Runtime Release](https://github.com/microsoft/onnxruntime/releases) to find corresponding release version package.

### Build on Linux

- CPU Version

```bash
cd ${MMDEPLOY_DIR} # To MMDeploy root directory
mkdir -p build && cd build
cmake -DMMDEPLOY_TARGET_DEVICES='cpu' -DMMDEPLOY_TARGET_BACKENDS=ort -DONNXRUNTIME_DIR=${ONNXRUNTIME_DIR} ..
make -j$(nproc) && make install
```

- GPU Version

```bash
cd ${MMDEPLOY_DIR} # To MMDeploy root directory
mkdir -p build && cd build
cmake -DMMDEPLOY_TARGET_DEVICES='cuda' -DMMDEPLOY_TARGET_BACKENDS=ort -DONNXRUNTIME_DIR=${ONNXRUNTIME_DIR} ..
make -j$(nproc) && make install
```

## How to convert a model

- You could follow the instructions of tutorial [How to convert model](../02-how-to-run/convert_model.md)

## How to add a new custom op

## Reminder

- The custom operator is not included in [supported operator list](https://github.com/microsoft/onnxruntime/blob/master/docs/OperatorKernels.md) in ONNX Runtime.
- The custom operator should be able to be exported to ONNX.

#### Main procedures

Take custom operator `roi_align` for example.

1. Create a `roi_align` directory in ONNX Runtime source directory `${MMDEPLOY_DIR}/csrc/backend_ops/onnxruntime/`
2. Add header and source file into `roi_align` directory `${MMDEPLOY_DIR}/csrc/backend_ops/onnxruntime/roi_align/`
3. Add unit test into `tests/test_ops/test_ops.py`
   Check [here](../../../tests/test_ops/test_ops.py) for examples.

**Finally, welcome to send us PR of adding custom operators for ONNX Runtime in MMDeploy.** :nerd_face:

## References

- [How to export Pytorch model with custom op to ONNX and run it in ONNX Runtime](https://github.com/onnx/tutorials/blob/master/PyTorchCustomOperator/README.md)
- [How to add a custom operator/kernel in ONNX Runtime](https://onnxruntime.ai/docs/reference/operators/add-custom-op.html)

repository: open-mmlab/mmdeploy

branch_name: refs/heads/main

gha_language: Python

repo_name: open-mmlab/mmdeploy


text:
# Bubble Tea

Makes 1 serving.

### Ingredients

- 2 bags black tea
- 1/4 cup dried tapioca pearls
- agave nectar
- sweetened condensed milk

### Instructions

1. Steep tea in 1 cup of boiling water for 4 minutes (or according to package instructions). Chill.
2. Cook tapioca pearls according to package instructions. If using Wufuyuan, bring 2 1/2 cups of water to a boil in a small saucepan and add tapioca pearls. Wait until they float, then cover and cook for 2 minutes on medium heat. Turn off the heat and keep the saucepan covered for another 2 1/2 minutes.
3. Drain tapioca pearls into a strainer and transfer them to a bowl of ice water for 20 seconds. Strain again and move back to the same (now empty) bowl. Cover with agave nectar. Let sit for at least 15 minutes.
4. When ready to assemble, shake tea with condensed milk and ice in a cocktail shaker. Serve in a tall glass and add the pearls (nectar and all).

Serve with a giant straw, if available.

repository: saisai/cookbook

repo_name: saisai/cookbook


text:
# Rails Warden

This application adds some nice helpers on-top of the base [Warden](https://github.com/hassox/warden) Rack layer. It aims to make Warden easier to use in Rails-based environments without something as heavy-weight as devise.

Require the gem:

```ruby
gem 'rails_warden'
```

Setup an initializer:

```ruby
# config/initializers/warden.rb

Rails.configuration.middleware.use RailsWarden::Manager do |manager|
  manager.default_strategies :my_strategy
  manager.failure_app = LoginController
end

# Setup Session Serialization
class Warden::SessionSerializer
  def serialize(record)
    [record.class.name, record.id]
  end

  def deserialize(keys)
    klass, id = keys
    klass.find(:first, :conditions => { :id => id })
  end
end

# Declare your strategies here, or require a file that defines one.
#Warden::Strategies.add(:my_strategy) do
#  def authenticate!
#    # do stuff
#  end
#end

```

gha_language: HTML


text:
# FoodGan.ai

App to classify the Food and in future i will enhance this app to identify ingredients, calories and recommend similar type food based on health conditions.

https://foodgan-ai.herokuapp.com

# Introduction

This project was completed by Kausik Chattapadhyay. This article details how to create a web app image classifier and is deep-learning-language agnostic.

FoodGan.ai app will capture food images and perform the following tasks :

1. Identify the Food. Completed as of now.
2. In future-->Identify Ingredients and total calories.
3. In future-->Recommend similar food based on user health conditions.

Our example uses the fastai library, but a model weights file from any deep learning library can be used to create a web app using our methods.

# Summary

The project covers:

1. training a deep learning model for food images using fastai
2. deploying a web app using Heroku and Flask

# Heroku Web App Deployment

[Heroku](https://www.heroku.com/) was utilized to deploy the web app.

### Input to Heroku App

This output file, **`model.pth`** is the input to the Heroku app.

### Test running the web app
This [Docker image] contains Python 3, Flask and fastai.
```
docker build -t app .
docker run -p 5000:5000 -it app
```

## Heroku Setup
If you don't have a Heroku account, create one here: [www.heroku.com](https://www.heroku.com/).  Each line can be copied and submitted.
```
wget -qO- https://cli-assets.heroku.com/install-ubuntu.sh | sh
heroku login
heroku container:login

APP_NAME="foodgan-ai"
heroku create $APP_NAME

heroku container:push web --app ${APP_NAME}

heroku container:release web --app ${APP_NAME}
heroku open --app $APP_NAME
heroku logs --tail --app ${APP_NAME}
```

Note:  After 15 minutes of inactivity, Heroku will suspend the app.  The next time the web app is called, Heroku will restart the app.  There could be a slight delay in starting the app.

## Our Flask Web Application
- Our Flask web app is available here:  [**foodgan-ai.herokuapp.com**]( https://foodgan-ai.herokuapp.com/)
- Give it a try!  Upload an image or add a URL.

## Demo

![](https://github.com/chatkausik/FoodGan.ai/blob/master/assets/demo.gif)

![](https://github.com/chatkausik/FoodGan.ai/blob/master/assets/demo2.gif)


text:
@title
Tasknas - Manage tasks

@intro
Manage tasks

@description

### **USE ITEM FRAMER TO MANAGE TASKS**

So, that's not really a great list of tasks. To fix that, lets use `ItemFramer`

`AppFramer` provides standard requirements that would be in a Material based app

`ItemFramer` provides standard requirements around managing data (CRUD)

Complete the following in `src/app/tasks/tasks.module.ts`

step 1 - import the `ItemFramer`

<code-example path="tasknas/pt3/1.ts" linenums="false"></code-example>

step 2 - get rid of the custom `TasksComponent` you made and replace it

so this line:

<code-example path="tasknas/pt3/2.ts" linenums="false"></code-example>

becomes this:

<code-example path="tasknas/pt3/3.ts" linenums="false"></code-example>

### **LET’S KEEP YOUR DATA AROUND FOR A WHILE**

we will persist it by using Firebase (neat!)

go to your terminal window and kill the app by hitting `ctrl + c`

step 1 - install the Firebase dependencies

`npm i angularfire2 firebase --save`

then you have to go to the [Firebase website](http://firebase.google.com), click “get started” and signup for an account to create a new project.

If this is your first project with Firebase you'll be presented with API access keys. Save this information for a later step.
Otherwise select "Add Firebase to your web app" to see those API credentials

Next, we need to enable read/write access to your data. Click "Database" from the left menu, select the "Rules" tab and paste the following in to the editor:

<code-example path="tasknas/pt3/firebase.json" linenums="false"></code-example>

then go into the `src/app/app.module.ts` and import the Firebase module

<code-example path="tasknas/pt3/4.ts" linenums="false"></code-example>

next (above `@NgModule`) you’re going to configure Firebase

<code-example path="tasknas/pt3/5.ts" linenums="false"></code-example>

^ populate this with all of the specifics that Firebase gave you when you set up your account (you can copy paste this from Firebase)

above your `.frame()` method, include this:

<code-example path="tasknas/pt3/6.ts" linenums="false"></code-example>

next, open `src/app/tasks/tasks.module.ts` file

Import the Firebase adaptor we created

<code-example path="tasknas/pt3/7.ts" linenums="false"></code-example>

next, we are going to update `ItemFramer` so that it is now longer a static array of tasks

<code-example path="tasknas/pt3/8.ts" linenums="false"></code-example>

hit save - the screen will reload

now for the magic

if you know the local IP address of your computer you can load the app in a browser on your phone and add a new task, it will then show up in the browser of your computer...NEAT!

repository: framing/ng-framing

gha_language: TypeScript

repo_name: framing/ng-framing


text:
## Introduction
---
This brick uses the DS18B20 1-Wire digital temperature sensor from Maxim IC.

 ![](https://i.imgur.com/c8DrDnH.jpg)

## Characteristics

- It can report degrees C with 9 to 12-bit precision, -55C to 125C (+/-0.5C). Each sensor has a unique 64-Bit Serial number etched into it that can allow for a huge number of sensors to be used on one data bus.

## Specifications
---
Item | Parameter
:-: | :-:
SKU|EF04042
Power Dissipation|ULP
Working Temperature|-20-70℃
Working Voltage|3.3-5V

## Outlook and Dimensions
---
 ![](https://i.imgur.com/Bc8O78l.jpg)

## Quick to Start
---

### Materials used and connection diagram
---
Take sensor:bit for example

 ![](https://i.imgur.com/Sc5JwUT.png)

### Add Package

- Click "Advanced"in the choice of the MakeCode to find more choices.

 ![](https://i.imgur.com/smtcNoB.png)

Click "Extensions", search "iot"in the dialog box and then download it.

 ![](https://i.imgur.com/qChMeYd.png)

### Program as the picture shows

 ![](https://i.imgur.com/kO6z0oE.png)

### Reference

Links: [https://makecode.microbit.org/_FEiCtaV235Xw](https://makecode.microbit.org/_FEiCtaV235Xw)

You can also download the links below:

---

### Result
- The current temperature is showing on the micro:bit.

## Relevant Cases
---

## Technique Files
---
[Datasheet](https://elecfreaks.com/estore/download/EF03155-Datasheet)


text:
# pycon2016
Welcome to the repository for code bases, tutorials, posters, and other content for the following PyCon2016 presentations:

- Tutorial on [Natural Language Processing with NLTK and Gensim](https://us.pycon.org/2016/schedule/presentation/1597/)
- Talk on [Visual Diagnostic for More Informed Machine Learning](https://us.pycon.org/2016/schedule/presentation/1616/)

Find all links to resorces related to these presentations at the homepage at [pycon.districtdatalabs.com](http://pycon.districtdatalabs.com/).


text:
---
layout: creature
name: "Giant Toad"
tags: [grande, bestia, cr1, manual-de-monstruos]
cha: 3 (-4)
wis: 10 (0)
int: 2 (-4)
con: 13 (+1)
dex: 13 (+1)
str: 15 (+2)
size: Large beast
alignment: no alineado
challenge: "1 (200 XP)"
senses: "darkvision 30 ft."
speed: "20 pies (6 mts), nadando 40 pies (12 mts)"
hit_points: "39 (6d10+6)"
armor_class: "11"
---

***Anfibio.*** The toad can breathe air and water

***Standing Leap.*** The toad's long jump is up to 20 ft. and its high jump is up to 10 ft., with or without a running start.

### Acciones

***Mordisco.*** Ataque de arma cuerpo a cuerpo: +4 al ataque, alcance 5 pies (1.5 mts), un objetivo. Impacto: 7 (1d10 + 2) puntos de daño perforante más 5 (1d10) poison damage, and the target is grappled (escape DC 13). Until this grapple ends, the target is restrained, and the toad can't bite another target.

***Swallow.*** The toad makes one bite attack against a Medium or smaller target it is grappling. If the attack hits, the target is swallowed, and the grapple ends. The swallowed target is blinded and restrained, it has total cover against attacks and other effects outside the toad, and it takes 10 (3d6) puntos de daño por ácido at the start of each of the toad's turns. The toad can have only one target swallowed at a time.

If the toad dies, a swallowed creature is no longer restrained by it and can escape from the corpse using 5 feet of movement, exiting prone.


text:
---
weekly_roundup: true
title: 'Unboxed Roundup: Our links for w/c 3rd April 2017'
date: '2017-04-07 13:30:00 UTC'
authors:
  - 'Neil van Beinum'
tags: # (Delete as appropriate)
- Culture

---

## Tell Me When It Closes - [Charlie](/people#charlie-egan)

https://tellmewhenitcloses.com/session/new

This is a simple app that sends you an email reminder when an issue you're interested in is closed. Useful for keeping track of bug fixes without needing to deal with the noise of following the issue. It'd be nice if Github added this eventually but for now this looks good enough.

## Meditations on learning Haskell (2014) - [Charlie](/people#charlie-egan)

http://bitemyapp.com/posts/2014-04-29-meditations-on-learning-haskell.html

An editorial version of a discussion where some people who enjoy using Haskell talk about the benefits they draw from it.

## ORM Hate (2012) - [Elena](/people#elena-tanasoiu)

https://martinfowler.com/bliki/OrmHate.html

An article written by Martin Fowler where he tries to dispell the notions that ORMs are bloatware and that your own in-house ORM is automatically better. One argument for using an existing ORM is that it can handle 80-90% of mapping problems, which is actually a pretty good reason to use one in the first place since it saves you 80-90% of the hassle.

## Cacio E Pepe - [Ben](/people#ben-wong)

http://www.epicurious.com/recipes/food/views/cacio-e-pepe-365162

Mmmm, stripped down mac and cheese

## The Majestic Monolith - [Elena](/people#elena-tanasoiu)

https://m.signalvnoise.com/the-majestic-monolith-29166d022228

DHH is making the case for why splitting your application into multiple parts is not always the best approach. Although microservices fit very well with the organizational structure of large companies, the same patterns might not make sense and can prove counter-productive for smaller companies. He uses Basecamp as a case study for a successful monolith that's been running since 2003, and argues that one of the advantages of working on it is that you have to understand it as a whole, avoiding fragmentation of knowledge and responsibility.

## Track of the Week - Chris C

I think there can only be a few choices for my Track of the Week this week. I’ll let it speak for itself…

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

[Spice Girls - Goodbye](https://www.youtube.com/watch?v=eegDtyrSUZw)

branch_name: refs/heads/production


text:
# Un Poly All

A lot of polyfills are not needed if your project requires a certain php version, or needs the locale
aware functionality of an extension. The polyfills slow down your application by adding `function_exists`, `extension_loaded` or php version checks that
are when your autoloader is loaded. By removing the polyfills the start up time is (slightly) reduced.

If you do add this or one of its child packages, consider adding extension as a requirement to your `composer.json`.

## Installation

```bash
$ composer require backentea/un-poly-all
```

repository: BackEndTea/un-poly-all

repo_name: BackEndTea/un-poly-all


text:
# swagui

    go get github.com/codemodus/swagui/cmd/swagui

swagui is a basic implementation of the swagui library which simplifies serving
an instance of Swagger-UI.

    Usage of swagui:
      -def string
            remote definition
      -port string
            http port (default ":2288")
      -scrape string
            definition to scrape and serve
      -v int
            swagger version

repository: codemodus/swagui

repo_name: codemodus/swagui


text:
Payflow .NET SDK
----------------

A simple SDK allowing easy integration with the Payflow Gateway for .NET.

> THIS VERSION IS NOT 100%  COMPATIBLE WITH OLDER VERSIONS AS SOME OF THE OBJECTS AND THEIR LOCATIONS HAVE MOVED.
DO NOT COPY THE DLL INTO A PRODUCTION ENVIRONMENT WITHOUT ADJUSTING YOUR CODE IF NECESSARY AND TESTING.

## Supported Platforms
The code is compatible as-is for .NET Framework v4.x or higher using Visual Studio 2019/2022 and can be used in a .NET Core or .NET Standard application with minor changes to the solution/package.

## SDK Documentation
The `Payflow SDK Docs` project is built using [**Sandcastle Help File Builder (SHFB)**](https://github.com/EWSoftware/SHFB).

## API Documentation
See the [**Payflow Gateway Developer Guide**](https://developer.paypal.com/docs/payflow/integration-guide/).

## Development
Please feel free to follow the [Contribution Guidelines](./CONTRIBUTING.md) to contribute to this repository. PRs are welcome, but for major changes please raise an issue first.

## Older Versions
The last builds of the v4 SDKs are located in the [SDK Binaries](https://github.com/paypal/payflow-gateway/tree/master/SDK%20Binaries/) directory.

## License
SDK License - [LICENSE](https://github.com/paypal/payflow-gateway/blob/master/LICENSE)

repository: paypal/payflow-gateway

gha_language: C#

repo_name: paypal/payflow-gateway


text:
# edgectl install: Failed to Acquire TLS Certificate

## The Problem

The installer was unable to acquire a TLS certificate from Let's Encrypt.

## How to Resolve It

...

To reinstall AES, see:

https://www.getambassador.io/docs/latest/tutorials/getting-started/

repository: MicrophoneBen/ambassador

repo_name: MicrophoneBen/ambassador


text:
# my_notes

![MIT license](https://img.shields.io/badge/license-MIT-green)

## Links to Deployed Pages

- See the live app here: https://whispering-falls-77182.herokuapp.com/
- [Link to Git Hub Repository](https://github.com/parth167/my_notes.git)
- [LinkedIn](https://www.linkedin.com/in/parth-patel-4725381b5/)
- [GitHub](https://github.com/parth167/)

# Project Description

The Note Taker is an app that uses an Express backend to save, retrieve, and delete notes from a JSON file. The user starts at the home page shown in the screenshot below:
![Home page screenshot](https://github.com/parth167/my_notes/blob/main/public/assets/images/homepage.jpg)

On the home page, the user clicks the "Get Started" button to navigate to the notes page. On the left side of the screen is a list of existing notes, just showing the title of the note.
![Notes page screenshot 1](https://github.com/parth167/my_notes/blob/main/public/assets/images/note1.jpg)

Clicking the pencil icon in the upper right corner allows the user to write a new note. The user has to click on either the "title" or "note" field and then can type the text they want to be in the note. Once there is content in both fields, the save icon appears in the upper right next to the pencil icon.
![Notes page screenshot 2](https://github.com/parth167/my_notes/blob/main/public/assets/images/note2.jpg)

When the user clicks the save icon, the note is added to the JSON file and the list of notes on the left is updated to include the new note.
![Notes page screenshot 3](https://github.com/parth167/my_notes/blob/main/public/assets/images/note3.jpg)

The user can review existing notes by clicking any of the note titles on the left. This will populate the "title" and "note" fields with the saved note information.
![Notes page screenshot 4](https://github.com/parth167/my_notes/blob/main/public/assets/images/note5.jpg)

A note can be deleted from the list by clicking the red trash can icon by the note title in the list on the left. This will remove it from the JSON file and update the list on the screen.
![Notes page screenshot 5](https://github.com/parth167/my_notes/blob/main/public/assets/images/note4.jpg)

This app is hosted on Heroku and does not use an external database, so the JSON file that stores the notes is reset every time the server resets.


text:
# Pick-Your-Poison

This game was made in November 2018 for the Godot Wild game jam

## Engine

This game uses the Godot game engine [https://godotengine.org]

## Art

1. **Shooter Redux** [https://kenney.nl/assets/space-shooter-redux]
2. **Space Shooter Extension** [https://kenney.nl/assets/space-shooter-extension]
3. **Crosshair Pack** [https://kenney.nl/assets/crosshair-pack]

repository: Illuxxium/Pick-Your-Poison

gha_language: GDScript

repo_name: Illuxxium/Pick-Your-Poison


text:
# Annex library to run the procedural for mpst-seq

This library contains the different procedural macros for [https://github.com/NicolasLagaillardie/mpst_rust_github/mpst-seq/](https://github.com/NicolasLagaillardie/mpst_rust_github/mpst-seq/).

The tests for the different functions are the ones in [https://github.com/NicolasLagaillardie/mpst_rust_github/](https://github.com/NicolasLagaillardie/mpst_rust_github/).

## License

Licensed under either of [Apache License, Version 2.0](LICENSE-APACHE)
or [MIT license](LICENSE-MIT) at your option.

gha_language: Rust


text:
---
title: The Last Configuration Section Handler I'll Ever Need
disqus_identifier: 2003-04-the-last-configuration-section-handler-ill-ever-need
comments: true
---

>If you've ever seen the web.config file that ASP.NET uses, and thought, "Wow, I'm so glad they configure things that way, in this nice, easy-to-use XML file. Wish I could do that!" then you should check out the System.Configuration namespace. There's an interface called IConfigurationSectionHandler that lets you write your own parsers for your application configuration file, letting you put whatever you want in there.

>I've written a bunch of these over the last few months, but today I wrote the last one I ever will.

[Read more... (via CraigBlog)][1]

[1]:http://pluralsight.com/wiki/default.aspx/Craig.XmlSerializerSectionHandler "The Last Configuration Section Handler I'll Ever Need"

gha_language: JavaScript


text:
# Basic-3d-lib2
#### This is a 3d engine for stm32h750 based 32blit game system. It would be quite easy to port to any arm cortex m4/m7 mcu with enough ram.
Several math functions were copy from nvidia cg fast math lib. invert sqrtf is copy from id soft quake.

Left-hand coordinate was used in this lib
    ^ y
    |    ^ z
    |  /
    |/
    +--------> x

Screen coordinate is x y[0,0] from top left corner. The real render area is defined by
the RENDER_RESOLUTION_X/Y, the whole frameBuff is defined by WHOLE_FRAME_BUFF_WIDTH/HEIGHT,
the position shift of the render window is controlled by the address given to the init function.
0,0 ---------> x
   |
   |
   |
 y v
Always using row vector, so v * mat -> new v

Rotations used quaternion internally in transform struct. You could also set the rotation by euler angles in ZXY order, Positive rotation about an axis follow left-hand method.
- [x] Light and color shade
- [x] Texture mapping triangle drawing
- [x] 2d Sprite drawing in 3d space
- [x] Polygon drawing
- [x] 3d particles, common per defined particle (rain)
- [x] fast flat color triangle drawing
- [x] Near plane clip option
- [x] LUT 8bit framebuff and 16bit uint zbuff
- [x] Customerized heap management (modified from FreeRTOS heap4.c)
- [x] Heap resource buffering and garbage collection based on reference count

#### How to use the lib
You could get the 32blit project from :https://github.com/32blit/32blit-sdk.git
This project is based on the default template for 32blit project : https://github.com/32blit/32blit-boilerplate.git
If you use the default setting in the config file for max heap size in stm32h750, you would need to copy the "STM32H750VBTx.ld" to replace the one in 32blit-sdk/32blit-stm32/ folder.
The new ld file move the default heap steak bss data section to DTCM area and left the main ram area for the customerized heap.

You could use the b3d_config.h to change the default values for the engine.
b3d_port.h/c contains the heap and z buffer setting which depends on the hardware.

Call B3L_RenderInit_Simple function to init the render system. It would allocate RAM for buffers and default parameters for the engine.

struct render
         |--Scene
         |--Camera
         |--Light
         |--pointer to the framebuffer
         |--pointer to the z buffer
         |--pointer to the vector buffer
         ... and other render parameters

Scene contains all the resources and objs. Only objs in the active list would be draw to the screen.
Camera has two type: PERSPECTIVE_PROJECT and OTHROGRAPHIC_PROJECT, you could set the zoom parameter (focuslength) and aspect ratio for the camera

gha_language: C


text:
Checkpoint Four (iWorkout)
==========================

This repository contains the source code for iWorkout Android app.

iWorkout (Checkpoint 4) is built to improve fitness levels. The basic idea is to develop an app that help to plan, remind and count your daily push ups. This app help users to stay disciplined, see monitoring report of how well they are doing with their daily exercise, and of course stay fit.

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

 ![Alt text](https://github.com/andela-kogunde/iWorkout/blob/master/app/src/main/assets/images/banner.png?raw=true "iWorkout")
------------------------------------------------------------------------------------------------------------------------------

The concept is very simple. iWorkout allow its user plan how they would like to organize their push up training.

> TIME : enable users to customize the minimum time necessary for a number of push ups.

> GOAL: enable users to customize minimum number of push ups to be achieved.

> ANALYTICS: enable users to view a pictorial representation of their performance over the last 5 - 7 days in terms of number of push ups achieved.

> REMINDER: enable users to schedule a push up session.

----------

 ![Alt text](https://github.com/andela-kogunde/iWorkout/blob/master/app/src/main/res/drawable/how_to_use.png?raw=true "iWorkout")

Steps to start push up with iWorkout.
> 1. Launch iWorkout app, tap workout button to switch to push up screen.
> 2. Tap start button to initiate push up.
> 3. Begin push up with your phone placed in-between your hands.
> 4. As you push down toward your phone, iWorkout keep track of your push ups.

----------

> Available on [<i class="icon-download"></i> Google Play Store](https://play.google.com/store/apps/details?id=com.andela.iworkout)  for android devices.

### Development

Want to contribute? Great!

1.  Fork [__Checkpoint Four (iWorkout)__](https://github.com/andela-kogunde/iWorkout.git) repository.
2.  Make the fix.
3.  Submit a pull request.

### Todos

 - Calculate and display calories burned during push up.

License
----

MIT

**Free Software!**

----------

repository: coach-K/iWorkout

repo_name: coach-K/iWorkout


text:
---
title: Decarboxylative Alkylcarboxylation of α,β-unsaturated Acids Enabled by
  Copper-Catalyzed Oxidative Coupling
publication_types:
  - "2"
authors:
  - Bao Gao
  - Yinjun Xie
  - Zhiqiang Shen
  - Lei Yang
  - Hanmin Huang
doi: 10.1021/acs.orglett.5b02382
publication: Organic Letters
abstract: A facile and general method for copper-catalyzed decarboxylative
  alkylcarboxylation of cinnamic acids with dimethyl
  2,2′-azobis(2-methylpropionate) has been developed. The scope and versatility
  of the reaction was demonstrated, and a broad range of substrates bearing
  electron-donating and -withdrawing groups on the aromatic rings were all
  compatible with this reaction to provide desired β,γ-unsaturated esters in
  moderate to good yields. Moreover, α,β-unsaturated acids with a carbonyl group
  on the γ-position of acrylic acids also smoothly proceeded to furnish the
  desired products in good yields.
draft: false
featured: false
tags:
  - alkylcarboxylation
image:
  filename: featured.jpg
  focal_point: Smart
  preview_only: false
date: 2015-09-29T03:19:22.904Z
---


text:
---
layout: post
title: ux design
summary: User-centered design is a really helpful paradigm at times. Time to bust out the sticky notes
featured-img: heroshot-uxdesign
categories:
driveID-anatome: 1aBLmAP4Emp-wP4XYmZ05vbrKhrM9joYe/preview

---
## Introduction
One of the most valuable courses I took during undergrad was called Art of Making (AoM). It was IDEO fieldguide-inspired course that heavily emphasized user-centered design. Design thinking is just like any other tool - there are times for it and times not for it. I'm not a huge fan of jargon about methods and affinity charts, but I definitely understand the importance of a deliberate design process. While it isn't always the correct paradigm for a problem, it did teach me the importance of staying engaged client-side throughout all steps of the design process.

From sticky note ideation to ethnographic observation, having this incremental workflow that constantly prompted re-evaluation helped me build up creative confidence to picture something in my head and just start trying things. While not quite technically difficult, these projects help show the creative, non-STEM elements of engineering. I took the course freshmen year and can say with confidence that it really shaped my approach to engineering.

# AnatoME - multisensory anatomical learning
This was the capstone project in AoM. We had been learning different prototyping techniques and design approaches, and then given full freedom to identify a problem and come up with a creative solution. Since my group was primarily pre-med and bioengineering, we tackled standard medical school learning pedagogy. Between team dynamic, progression timeline, and project enthusiasm, this was one of the most positive experiences of my time in undergrad!

![Anatome](https://github.com/seth-so/portfolio/raw/master/assets/img/ux-design/AnatoMe/skull-final.jpg){: .center-image }

### Problem Statement
Anatomy is a cornerstone course that every health professions-aspiring student needs to master. However there thousands of parts to learn, which can be extraordinarily challenging. The challenge is compounded by the fact that the primary teaching method is with textbooks, an ill-suited medium for such a physically-rooted subject. Cheap models are tactile, but often lack textbook-level information density and context. While realistic models address the issue, but they are obviously reserved for more advanced study and can be prohibitively expensive. The goal of AnatoMe was to bridge this gap between 1-dimensional learning and literal cadavers in a way that would be more inviting and impressionable to beginners.

### Prototyping
After brainstorming and some sticky note ideation, we decided that we wanted to make an interactive model the touched on several nontraditional learning senses. To start with a pre-prototype (pretotype), we took about an hour to make a quick proof of concept to simulate some functionality and get initial feedback.

![arm](https://github.com/seth-so/portfolio/raw/master/assets/img/ux-design/AnatoMe/skull-prototype.jpg){: .center-image }

This is a forearm model that mimicked the core functionality of what we imagined. I whittled some wooden dowels to make the radius and ulna, the team sewed some muscles together out of cotton and felt, and another member used [littleBits](https://en.wikipedia.org/wiki/LittleBits){:target="_blank"} to make a interactive light-up nerve. The muscles are removable and each part has a info card stapled on - the goal was to increase the tactility of models.

### Ethnography
Armed with our prototype, we set up a table at the nursing school to have students try it out a give some observe, get opinions. We got all sorts of user testing - students who had taken anatomy, those who hadn't, and even the odd professor over a couple days. Overall reception was positive, but by the end there some salient takeaways:

1. Electronics should be hidden or it distracted from the model
2. Muscle material should be more realistic if possible
3. We needed a fail-safe to ensure the user could put the model back accurately
4. Some users pointed out that beyond tactility, it'd be good to include something for auditory learners
5. Professors liked the idea but expressed doubt about how much information could be conveyed this way.

These were all important points that the team probably wouldn't have addressed if we locked ourselves to the train tracks of the initial idea. And so we pivoted a bit to incorporate user feedback.

Adding Electronics          |  Silicone tactility
:-------------------------:|:-------------------------:
![electronics](https://github.com/seth-so/portfolio/raw/master/assets/img/ux-design/AnatoMe/skull-electronics.jpg) | ![silicone](https://github.com/seth-so/portfolio/raw/master/assets/img/ux-design/AnatoMe/skull-silicone.jpg)

To tackle **(1)** we switched to a skull because it was A. cooler and B. had a convenient hollow brain cavity, perfect for hiding things. **(2)** I learned how to make custom injection-molded silicone muscles for a more rubbery feel and look. **(3)** I came up with the idea of magnetic connections that served 3 purposes - 1. easier removal and replacement than the previous velcro, 2. would force attachment in specific orientation, and 3. could be used to trigger electrical signals for **(4 + 5)** by adding a small display element that would read out the name of the removed part and provide extra information.

### Final Design
The above essentially comprised the final design. Touch sensing and part removal was triggered with capacitive touch, and an arduino handled control and display. We went back to the nursing school to do some results testing versus an equivalent textbook learning procedure (and some more feedback of course). Although it wasn't quite up to scientific testing standards, the results were significant enough to show that there is some merit to the idea of multisensory learning.

Final with program          |  Results
:-------------------------:|:-------------------------:
![program](https://github.com/seth-so/portfolio/raw/master/assets/img/ux-design/AnatoMe/skull-demo.jpg) | ![results](https://github.com/seth-so/portfolio/raw/master/assets/img/ux-design/AnatoMe/skull-results.png)

For the end of semester presentation, we put together this fun little video that storyboards everything you've read so far. None of us had any videography experience back then, but it definitely captured the spirit of what we wanted:

{% include googleDrivePlayer.html id=page.driveID-anatome %}

<br />
# Bronchoscopy Trainer - lo-fi simulation tool
Bronchoscopy Trainer a client-based design project. The client was the [WISER Institute](https://www.wiser.pitt.edu/){:target="_blank"}, an organization dedicated to training health care professionals the practical simulation. This was one of the more iterative projects I have worked on - I came up with 3 lo-fi versions along with different sketches to talk with the client about. Each highlighted different key characteristics, and getting feedback on each helped give perspective into what exactly was wanted. Being able to communicate back and forth with the client so openly made this an incredibly valuable experience

### Problem Statement
Medical simulation equipment can be prohibitively expensive. Although realistic simulators prepare experienced students well, sometimes simpler tools are needed to teach newer learners. Bronchoscopy simulators is such an area with a dearth of options for beginners.

![original](https://github.com/seth-so/portfolio/raw/master/assets/img/ux-design/Bronchoscopy/bronch-prototype0.jpg){: .center-image }

Tom Dongilli, Director of Operations at WISER, filled in one of these options (above) to help introduce basic dexterity and control of bronchoscopes to newer learners. The goal of the project was to create another intermediate model that would help bridge the difficulty gap between the basic trainer and full body simulator.

### Ethnography
I visited WISER several times to hear directly from Tom as well as observe how students typically learn with each of the existing options. I also used the bronchoscope myself to get first hand experience.

![original](https://github.com/seth-so/portfolio/raw/master/assets/img/ux-design/Bronchoscopy/bronch-ethno.jpg){: .center-image }

From the visits it became evident that while the project was fairly open-ended, there was an ideal trainer in mind. It should be:

1. extremely portable
2. have basic anatomical accuracy
3. incorporate easily varied levels of difficulty
  - in the dark or light environments
  - variable occlusions and deformations
4. have swappable end target panels
5. waterproof for fluid build up simulation
6. the solution should be economical

In comparison with the current beginner model, any addition of these would have been a fair improvement, so I had to prioritize which would be the most important features and hit them in that order.

### Prototyping

mechanism ideas   |  form and feature ideas |  potential model
:-------------------------:|:-------------------------:|:-------------------------:
![original](https://github.com/seth-so/portfolio/raw/master/assets/img/ux-design/Bronchoscopy/bronch-sketch1.jpg) | ![original](https://github.com/seth-so/portfolio/raw/master/assets/img/ux-design/Bronchoscopy/bronch-sketch2.jpg) | ![sketch0](https://github.com/seth-so/portfolio/raw/master/assets/img/ux-design/Bronchoscopy/bronch-sketch.png)

I sketched out several pages of possible way to address the issues above. The biggest challenge was thinking of a solution that allowed for both instructor viewing and changeable obstacles in the airways. None of the pretotypes below answered both of these problems: the first didn't allow for external viewing, the second and third were transparent, but as a result I couldn't swap out occlusions.

Option 1   |  Option 2  |  Option 3
:-------------------------:|:-------------------------:|:-------------------------:
![original](https://github.com/seth-so/portfolio/raw/master/assets/img/ux-design/Bronchoscopy/bronch-prototype1.jpg) | ![original](https://github.com/seth-so/portfolio/raw/master/assets/img/ux-design/Bronchoscopy/bronch-prototype2.jpg) | ![original](https://github.com/seth-so/portfolio/raw/master/assets/img/ux-design/Bronchoscopy/bronch-prototype3.png)

The answer actually came relatively simply - vacuum molding could provide a way to shape clear plastics like PETG into a lung shape. Moreover, it was actually preferable to have the airway bisected (which is required by vacuum forming), since this would allow for easy internal access - then a clay or poster-tack could be used to place custom, easily cleaned, occlusions.

![cad](https://github.com/seth-so/portfolio/raw/master/assets/img/ux-design/Bronchoscopy/bronch-cad.PNG){: .center-image }

The model above is a quick CAD mock-up of the final concept. The red object is the airway on supports - made by printing out bisected halves of the airway and vacuum forming over them. The box around could be simply laser cut. This solution addresses all of the initial goals, better than I had hoped.

### Final Design
Below is the latest prototype, created using the steps outlined above. You'll notice that instead of plastic supports, I have a 3d printed base support due to the planned dimensions being too thin. As a result, tabs with magnets were used for registration, which I hope to phase out.

Initial array          |  Final Optimized
:-------------------------:|:-------------------------:
![original](https://github.com/seth-so/portfolio/raw/master/assets/img/ux-design/Bronchoscopy/bronch-prototyp5a.jpg) | ![original](https://github.com/seth-so/portfolio/raw/master/assets/img/ux-design/Bronchoscopy/bronch-prototype5.jpg)

The client was very satisfied with the concept, and we have begun moving forward to make a more polished design with quality materials. Although Co-vid 19 has slowed progress, I've been able to use the time to update the model and find an injection mold company that is willing to produce parts for low volume production. Updates coming soon.

repository: seth-so/portfolio

repo_name: seth-so/portfolio


text:
# Redis key naming convention used in Bee

### Bee (worker) IDs
`HOSTNAME:PID:UNIQUE_HIVE_ID:QUEUE_NAME:UNIQUE_ID`
Example: `Oleksiys-MacBook-Pro.local:87362:b355de80-54e5-11e3-9023-57b39a72bd38:Items.applyProfile.static:b671c480-54e5-11e3-9023-57b39a72bd38`

### Delimeter
`:` is used as field delimeter

### Prefix
Prefixes correspond to [Redis types](http://redis.io/topics/data-types) in the following manner:

- `bee:s` - Set
- `bee:ss` - Sorted Set
- `bee:str` - String
- `bee:h` - Hash
- `bee:l` - List

and

- `bee:ch` - PubSub channel

### Queues

**Working queue**

Name: `bee:ss:queue:QUEUE_NAME`

Score: Priority, timestamp based.

Value: JID

**Delayed queue**

Name: `bee:ss:delayed:QUEUE_NAME`

Score: Time to put into working queue (timestamp)

**Expired jobs queue (completed or failed jobs)**

Name: `bee:ss:expires:QUEUE_NAME`

Score: Time for job to expire (timestamp)

Value: JID

### Jobs
**Job**

Name: `bee:h:jobs:JID`

Fields:
- `jid`
- `queue`
- `data` - Job data. JSON encoded
- `options` - Job options. JSON encoded
- `worker`
- `status` - ['new', 'queued', 'running', 'completed', 'duplicate', 'canceled', 'failed', 'expired', 'retried']
- `retries` - number of times this job has been retried after failure
- `result` - Job result. JSON encoded
- `parent` - Parent job JID (when using `job.sub()`)
- `hash` - Job duplicates hash
- `tags` - Job tags
- `history` - Job history. JSON encoded
- `dependants` - List of job dependants. JSON encoded

**List of duplicates**

Name: `bee:l:hashes:QUEUE_NAME:HASH`

Value: JID

**List (Set) of jobs per tag**

Name: `bee:s:tags:TAG`

Value: JID

**List (Set) of dependencies for this JID (jobs that this JID will wait for completion/failure before going into the queue)**

Name: `bee:s:dependencies:JID`

Value: JID

### Bees (workers)
Name: `bee:ss:bees:QUEUE_NAME`

Score: Last heartbeat timestamp

Value: WORKER_ID

### Job locks
**List of jobs running on worker**

Name: `bee:s:locks:WORKER_ID`

Value: JID

**Used to detect dead workers**

Name: `bee:ss:locks:QUEUE_NAME`

Score: Lock expiration timestamp (in the future)

Value: JID

**Used to count attempts for possibly dead worker to finally send a heartbeat**

Name: `bee:str:lock-waits:WORKER_ID:JID`

Value: Number of attempts

repository: oleksiyk/bee

repo_name: oleksiyk/bee


text:
# String Interpolation

In previous exercises, we assigned strings to variables. Here, you will learn how to insert the content saved to a variable into a string.

The JavaScript term for inserting the data saved to a variable into a string is string interpolation.

The `+` operator, known until now as the addition operator, is used to interpolate (insert) a string variable into a string, as follows:

```js
let myPet = 'armadillo';
console.log('I own a pet ' + myPet + '.');
// Output: 'I own a pet armadillo.'
```
In the example above, we saved the value `'armadillo'` to the myPet variable. On the second line, the `+` operator is used to combine three strings: `I own a pet`, the value saved to `myPet`, and `.`. We log the result of this interpolation to the console as:

`I own a pet armadillo.`

### Example

![string-interpolation](../string-interpolation.png)

# String Interpolation II

In the newest version of JavaScript (ES6) we can insert variables into strings with ease, by doing two things:

Instead of using quotes around the string, use backticks (this key is usually located on the top of your keyboard, left of the 1 key).

Wrap your variable with `${myVariable}`, followed by a sentence. No +s necessary.
ES6 string interpolation is easier than the method you used last exercise. With ES6 interpolation we can insert variables directly into our text.

It looks like this:

```js
let myPet = 'armadillo'
console.log(`I own a pet ${myPet}.`)
// Output: 'I own a pet armadillo.'
```
In the example above, the backticks (`) wrap the entire string. The variable (myPet) is inserted using ${}. The resulting string is:

`I own a pet armadillo.`

### Example

![string-interpolation2](../string-interpolation2.png)

### Project Example

![project-example](../project-example.png)

repository: anmud/learntocode

path: /Codecademy. Introduction to JavaScript/2_Variables/013_String Interpolation.md

filename: 013_String Interpolation.md

repo_name: anmud/learntocode


text:
# VIDEO 1 - INTRO TO OBJECT ORIENTED PROGRAMMING

What is OOP
- approach for breaking down large, complex products into siimple solutions
- smaller parts can be implemented and tested separately
- results in higher confidence in overall solution
- makes it easier to pinpoint issues with code

The Big Picture
- group data and related actions / behaviors together
- treat as single entity within a larger system

Encapsulation
- the practice of bundling related properties and behaviors into
  one class
- each class has a purpose and is responsible for keeping track of
  properties related to that purpose and providing the methods
  necessary to manage those properties

Inheritance
- mechanism that passes traits of a parent class to its descendants
- prevents duplication of code

Polymorphism
- provides a way to perform a single action in different forms by
  calling the same method on different objects

Abstraction
- implemented to hide unnecessary data and withdraw relevant data

# VIDEO 2 - INHERITANCE (lecture-demos/inheritance.js)

Inheritance
- base a class (child class) upon another class (parent class)
- child class will have access to properties and methods defined within parent
- use `extends` keyword to extend Child class from Parent class
- typically applied to classes

* TODO : CREATE ANIMAL PARENT CLASS FOR DOGS AND CATS
	- dogs and cats both have a name and age property
	- dogs and cats both have a speak method

Using super
- calls parent classes constructor function with specified arguments
- calling `super(name, age)` assigns `this.name` and `this.age` prop to dog instance

```js

// INHERITANCE

class Animal {
  constructor(name, age) {
    this.name = name;
    this.age = age;
  }

  speak() {
    console.log(`hi my name is ${this.name}`);
  }
}

class Dog extends Animal {
	constructor(name, age) {
		super(name, age);
		this.tricks = []
	}

	bark() {
		console.log("bark bark bark");
	}
}

let bodhi = new Dog('bodhi', 5);
bodhi.speak();

```

Leaving off constructor
- if there arent any additional attributes, can leave off constructor func
- automatically runs parents constructor function

```js

// LEAVING OFF CONSTRUCTOR FUNCTION

class Animal {
	constructor(name, age) {
		this.name = name;
		this.age = age;
	}

	speak() {
		console.log(`hi my name is ${this.name}`);
	}
}

class Dog extends Animal {

	bark() {
		console.log("bark bark bark");
	}
}

let bodhi = new Dog('bodhi', 5);
bodhi.speak();

```

Overwriting and adding onto inherited methods
- without `super` => overwrites
- calling `super.method(args)` is essentially copying code from parent method into the specified location

```js
// TODO : OVERWRITE SPEAK METHOD TO ALSO PRINT "bark bark bark"

class Dog extends Animal {
  constructor(name, age) {
		super(name, age);
    this.tricks = [];
  }

  speak() {
		console.log("bark bark bark");
		super.speak() // console.log(`hi my name is ${this.name}`);
  }
}

let bodhi = new Dog('bodhi', 5);
bodhi.speak();
```

THIS
- always references the instance object (obj created with new keyword)

# VIDEO 3 - COMMMON JS MODULES (./lecture-demo/module-demo)

Overview
- up until now we've put all our code in single JS file
- as code base gets larger we'll want to break our code up into multiple files
- each file containing a logical unit of code that defines a module.

Modules
- a module is just a javascript file
- local module: defined within your project
- core modules: native modules contained within Node.js
	- don't have to npm install
	- ex: `path`, `readline`, `fs`
- third party modules: imported using npm

Module systems
- recent node versions contain two different systems
	1. CommonJS (legacy system)
	2. ES Modules (newer system)
- conceptually similar
- syntax/implementation details differ

The Module Object
- each module in node has access to a `module` object
- represents current module
- contains number of properties with info about current module

* TODO: SHOW CONSOLE.LOG(MODULE) IN ANIMAL.JS

The `module.exports` Property
- object used to export items from the module

* TODO: SHOW CONSOLE.LOG(MODULE.EXPORTS) IN ANIMAL.JS

To Export a Single Item:
- set `module.exports` equal to that item
- OR
- define properety for that item on the `module.exports` obj


text:
# How to add a new root menu or sub-menu to booster UI

If you would like to add a new root menu or sub-menu, you should add data to `src/router/data/xx` and add translation contents for the title to `src/locales/lang/xx` in [booster UI](https://github.com/apache/skywalking-booster-ui).

1. Create a new file called `xxx.ts` in `src/router/data`.
2. Add configurations to the `xxx.ts`, configurations should be like this.
```ts
export default [
  {
    // Add `Infrastructure` menu
    path: "",
    name: "Infrastructure",
    meta: {
      title: "infrastructure",
      icon: "scatter_plot",
      hasGroup: true,
    },
    redirect: "/linux",
    children: [
      // Add a sub menu of the `Infrastructure`
      {
        path: "/linux",
        name: "Linux",
        meta: {
          title: "linux",
          layer: "OS_LINUX",
        },
      },
      // If there are Tabs widgets in your dashboards, add following extra configuration to provide static links to the specific tab.
      {
        path: "/linux/tab/:activeTabIndex",
        name: "LinuxActiveTabIndex",
        meta: {
          title: "linux",
          notShow: true,
          layer: "OS_LINUX",
        },
      },
    ],
  },
];
```
3. import configurations in `src/router/data/index.ts`.
```ts
import name from "./xxx";
```

repository: parampavar/skywalking

gha_language: Java

repo_name: parampavar/skywalking


text:
---
title: Using the .NET Compiler SDK | C# Guide
description: Explore the the Roslyn APIs to create automatic diagnostics and code fixes
keywords: .NET, .NET Core, C#, Roslyn,
ms.date: 06/25/2016
ms.topic: article
ms.prod: .net
ms.technology: devlang-csharp
ms.devlang: csharp
ms.assetid: abed9e00-2ddc-468e-9cca-d033bd6a7e36
redirect_url: /dotnet/articles/csharp/index
---

# 🔧 Using the .NET Compiler SDK

> **Note**
>
> This topic hasn’t been written yet!
>
> We welcome your input to help shape the scope and approach. You can track the status and provide input on this
> [issue](https://github.com/dotnet/docs/issues/972) at GitHub.
>
> If you would like to review early drafts and outlines of this topic, please leave a note with your contact information in the issue.
>
> Learn more about how you can contribute on [GitHub](https://github.com/dotnet/docs/blob/master/CONTRIBUTING.md).
>

This is a meta-topic for an entire section. Areas that need to be covered here include:
* Getting Started
* Samples and tutorials
* conceptual content
* overall model of the APIs
* links to samples on the [roslyn-analyzers](http://github.com/dotnet/roslyn-analyzers) repository
* links to other reference content


text:
# Semantic-Scaffold-for-Neo4j
Using Semantic-UI and custom templates to provide a sane scaffold generator for Rails 4/5 with Neo4j

Use with `rails new MyApp -m <path to the cloned repository>/Semantic-Scaffold-for-Neo4j/neo4jrb.io.rb -O`

### Once MyApp is created:

- change config/neo4j.yml to match your setup
- use the scaffold generators to add models, such as `rails generate scaffold Artefact name:string content:text author:references` and `rails generate scaffold Author name:string artefacts:references`.

### Once the scaffold is generated:
- change the relationship in the model definition to match your purposes
- change the `_form.html.erb` as indicated with the line ```# Edit the Class.all.sort to the Class name of the connected node (such as `GeospatialNode.all.sort`)```
  - (In this case you would edit `MyApp/app/views/artefacts/_form.html.erb` and change `Class.all.sort` to `Author.all.sort`)

You should now be able to run `rails s` and use a functional app with Semantic-UI


text:
🚨 This web application is not maintened anymore because this app uses nuSoap library and an old version of Mondial Relay webservice. A new updated and modern version is now integrated in WooCommerce Mondial Relay plugin since 4.0.0 version.

# Mondial Relay shipping creation test

Create shipping, get barcodes of a shipping and track a shipping using Mondial Relay webservice.

For more informations, visit [webservice.mondialrelay-woocommerce.com](http://webservice.mondialrelay-woocommerce.com) (in french).

![Mondial Relay Webservice](screenshot.jpg)

## Dependencies

Name | Version
-----|--------
[jQuery](https://jquery.com/) | 1.11.13
[Bootstrap](http://getbootstrap.com/) | 3.3.6
[Font Awesome](http://fontawesome.io/) | 4.6.3
[NuSoap](https://sourceforge.net/projects/nusoap/) | 1.56

## Usage

You can change brand ("Enseigne") and private code ("Clé Privée") in ``/includes/conf.php`` if you want to use your codes.

## i18n

This web application is in french by default.
The other langage possible is english.

You can change the langage in ``/includes/conf.php``.

The error messages are only in french.

## Mondial Relay webservice issues

If you have issues with Mondial Relay webservice, contact Mondial Relay.

You can find documentation (in french and english) about the Mondial Relay webservice on Mondial Relay website : [http://www.mondialrelay.fr/solutionspro/documentation-technique/cahier-des-charges-informatiques/](http://www.mondialrelay.fr/solutionspro/documentation-technique/cahier-des-charges-informatiques/)

## PHP code

This web application is coded in simple *old school* PHP to be compatible with old hosts (>= PHP 5.3).

## Changelog

Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.

## Credits

- [Clément Barbaza](https://github.com/cba85)
- [All Contributors](../../contributors)

## About Appstraction

Appstraction is a webagency specialized in Laravel and Wordpress and based in Toulouse, France.

More information [on our website](https://www.appstraction.fr).
[More about Clément Barbaza](http://www.clementbarbaza.com).

## License

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.