text:
---
layout: post
title: Predicting Popularity of Hip-Hop Music on Spotify
---

_Disclaimer: Much of this post assumes that the reader has some basic data science knowledge, as opposed to my
[inaugural post](https://stephenjkaplan.github.io/2020/07/06/how-i-got-here/) which was a self-reflective, career
oriented post._

I just completed the first major independent project during my time as a student at
[Metis](https://thisismetis.com){:target="_blank"}. We were given two weeks to complete a project that satisfied the
following constraints:

* Train a model that predicts a continuous, numeric value using a mix of numerical and categorical data.
* The model must be fit using only linear regression, polynomial regression, or any regularization-enhanced variant of
  linear regression (Lasso, Ridge, ElasticNet).
* At least a portion of the training data must be acquired via web-scraping.
* Use a relatively small training set (on the order of 100's or 1000's of records).

Generally, I enjoyed working through the full data science workflow for the first time and being able to go deep into a
data set. This blog post details my process, from the initial search for data to deploying the model.

### Motivation

My opinion going into my first project was that aside from all technical metrics, there are two determinants of a
compelling portfolio project:

1. The project should use a topic/data set that excites you. That excitement and passion will come through in your work.
2. The project should not just produce "interesting" or "cool" results. The results should be actionable and carry
   value. Your future hiring manager might like to see something that is fun, but they also most likely want to see
   that you can make valuable predictions and/or interpretations with data.

As a [music producer](https://open.spotify.com/artist/5qdyMjUQjxhdWtKjHvh3cm?si=fIw0oAbfQgmo--fETANStA){:target="_blank"}
and someone exploring music technology as a potential career path, I felt compelled to search for music-related data.
I find the field of music recommendation and personalization to be exciting. Reading the
[Spotify Engineering blog](https://engineering.atspotify.com/){:target="_blank"} gave me the prior knowledge that they
are on the cutting edge of music technology, and that they publish interesting, high-quality data sets on
[their API](https://developer.spotify.com/documentation/web-api/){:target="_blank"}. One particular Spotify data set
that stood out to me contains
["track audio features"](https://developer.spotify.com/documentation/web-api/reference/tracks/get-audio-features/){:target="_blank"}.
These data are generated by a proprietary algorithm for every track on the Spotify platform, and contain such features
as "danceability", "energy", and "loudness". Most of these features are numerically encoded on a scale of 0 to 1.

As far as yielding valuable conclusions, it seemed that the best way to apply this data was to predict the success of
a song based on its various qualities and what factors carry the most weight. Choosing a target to predict that
accomplished this goal took some time, but was a good lesson in selection of project scope.

### Narrowing the Scope

#### Initial Scope

The first thing that came to mind to predict was Pitchfork album ratings. [Pitchfork](https://pitchfork.com/){:target="_blank"} is
arguably the most well-established music blog on the internet. The website's most prominent feature is its album reviews,
each of which contain a written review and a rating, scored on a scale of 0 to 10. While these reviews have received
heavy criticism and scrutiny, their stamp of approval has been credited with jump starting the successful music careers
of artists like [Arcade Fire](https://pitchfork.com/reviews/albums/452-funeral/){:target="_blank"} and
[Bon Iver](https://pitchfork.com/reviews/albums/10709-for-emma-forever-ago/){:target="_blank"}. Surely, a good review
on Pitchfork is a strong indicator of (and sometimes reason for) a successful album.

However, initial exploratory data analysis showed that Pitchfork album rating might not be a promising target variable,
for two main reasons:

When plotting all of my feature data against Pitchfork album rating, there was no obvious relationship. Could I have
chosen new features? Maybe, but I really was enjoying exploring the Spotify audio feature data, and believed that there
was some value in it.

![Pitchfork Pairplot](/images/2020-07-17/pitchfork_pairplot.png)

Pitchfork Album rating plotted versus a few track audio features/metadata, showing very little feature-by-feature
correlation with the target.

Running a baseline Linear Regression model on the data yielded a validation R-squared score of `0.091`, which felt
too low to do extensive feature engineering and training on given the time constraint.

![Narrowing Scope](/images/2020-07-17/scope.png)

The process of choosing an appropriate project scope.

Why was this model performing so poorly? If you remember, the Spotify audio features are available for individual tracks,
but the Pitchfork ratings are for albums. I had to do some data processing to aggregate the track-level
audio features as album-level features, which mostly amounted to taking averages across the album. My suspicion is that since an album
can contain songs with varied "vibes", averaging features like "energy" and "danceability" neutralized the significance
of these metrics. Beyond that, it seems that album reviews and ratings are highly subject to the tastes of the person
writing a particular review, or perhaps what side of the bed they wake up on that morning. Something so subjective
is unlikely to show a clear pattern in the data.

If I was being asked by an employer or client to specifically predict Pitchfork Album Ratings, I would have persisted.
While I'm looking forward to having a job, being a student gave me the flexibility to pivot my project slightly.

#### Setting a New Target

My next objective was to find a track-level feature that in some way represented commercial success. Spotify, being
the good data stewards that they are, provides a "popularity score" for each track on their platform via the API.
Spotify doesn't provide documentation on how they calculate popularity, a score given on a 0-100 scale, but they
do state that it is highly dependent on the number of streams a track has, and how recent those streams are - in other
words, how "hot" or "viral" a track has been. Once again, by creating a pair plot of the new target (popularity), I
saw no obvious correlations and knew that I hadn't quite hit the mark on my project scope. Running another baseline
linear regression model doubled my previous R-squared score to around `0.2`, but this still didn't seem like a good
starting point for feature engineering and tuning, given my relative lack of exposure to those skills at the time.

![Popularity Pairplot](/images/2020-07-17/popularity_pairplot.png)

Popularity plotted versus a few track audio features/metadata, showing very little feature-by-feature
correlation with the target.

#### Choosing the Final Scope

It was then that I learned the value of stepping away from the Jupyter Notebook for a few minutes to think about the
problem at hand from a practical, common-sense perspective. "Different genres of music are popular for different
reasons, right?", I thought to myself. For instance, a fan of Folk/Country probably won't like a "danceable", "high
energy song", but a fan of electronic music might. Fortunately, I already had a column for genre in my data set, so
I separated the data into each genre and plotted a correlation matrix for each. Hip Hop music showed the most
highly correlated features, so I made the decision to finalize my scope, and title my project, "Predicting Popularity
of Hip Hop Music on Spotify". I did some data cleaning on the filtered hip hop data, and persisted my data set in
preparation for the next phase of the project.

### Feature Engineering, Modeling, & Technicals

The first way I improved the baseline model was through a new features and feature engineering. Both of these tasks
can take you into deep rabbit holes - given the time limit, I decided to set a reasonable goal of adding at least
one brand new column of data, and one new feature created by transforming an existing feature or combining features.

#### Feature Addition: Artist Followers

While Spotify's definition of song "popularity" implies that even up and coming artists can have very popular songs,
artist follower count (available via Spotify's API) still sounded like a strong contender for predicting song popularity.
After querying Spotify's API for each artist of each song and adding the number of followers as a column to the data,
I plotted a correlation matrix:

![Popularity Pairplot](/images/2020-07-17/correlation_before.png)

Correlation matrix of data after adding number of artist followers as a feature.

Sure enough, artist followers was the most highly correlated feature.

#### Feature Engineering: Log Transforming Artist Followers

The feature I added turned out to be the feature I engineered. Upon inspecting the plot of popularity versus artist
followers, I noticed that the relationship could be fit to a logarithmic equation (`log(x)`).

Song Popularity vs. Artist Followers, a sparse, but logarithmic relationship.

Log transforming the feature (taking the log of artist followers) yielded a relatively strong linear relationship.

Song Popularity vs. the Log of Artist Followers, showing a linear relationship.

Finally, plotting the correlation matrix with the addition of `Log(Artist Followers)` shows a more highly correlated
feature to use in a model that predicts song popularity.

![Correlation matrix after feature engineering.](/images/2020-07-17/correlation_after_eng.png)

#### Modeling & Evaluation of Metrics

I began developing the final model by splitting the full data set into a training/validation (train-val) set (75% of
data) and test set (25% of data). Running cross validation on a linear regression model using the train-val set
yielded a training R-squared score of `0.61`, a validation R-squared score of `0.58`, and a root mean square error
(RMSE) of `12.29`.

In an attempt to reduce model overfitting, I ran both a Lasso and Ridge regression with varying regularization
parameters (alpha). Both yielded similar best results of a training R-squared score equal to `0.62`, validation R-squared
score of `0.61`, and similar RMSE to the baseline linear regression. Both models succeeded in reducing complexity
and raising the validation R-squared score, without affecting RMSE.

From there, I experimented to see if I could raise the R-squared score and lower RMSE. I tried a combination of
polynomial regression and Lasso regression to eliminate unneeded polynomial features, which yielded very similar
results. Since the coefficients of polynomial regression are harder to interpret than linear features, and there
was no improvement in model performance, I threw the model out.

Another experiment I tried was pre-removing the features from the dataset that the initial Lasso removed (by reducing
their coefficients to zero). I then ran additional Lasso and Ridge regressions on that dimension-reduced feature set to
see if that had any effect on the model performance. This also yielded similar results, so I decided to go with the
model that I felt would be the easiest to interpret. The Lasso model, run on the reduced feature set, left me with a
model with reduced complexity from the original baseline regression, and a slightly reduced feature set. It had a few
slight advantages: a validation R-squared score on the higher end of all of my models (`0.619`), the smallest difference
between training R-squared score and validation R-squared score (`0.05`) indicating very little overfitting, and an
RMSE on the lower end of all of my models (`12.1`).

Scoring the model on the test set yielded a final R-squared score of `0.579` and RMSE of `13.8`, indicating that on average
the predictions of song popularity are off by `13.8`. If an artist is trying to determine if their song will be popular
a score of, for instance, 70 out of 100 might be, in some cases, anywhere from 57 to 83. Based on my understanding
of the distributions of popularity on Spotify, even a score on that lower end indicates a successful song. This model
could be improved quite a bit, but still provides potential value for hip hop artist trying to predict the impact of their
music.

As an additional quality check on the model, I evaluated a few of the essential linear regression assumptions:

1. The residuals have a fairly constant variance for all predictions.
2. The predictions are approximately normally distributed.

### Final Steps

#### Deploying the Model

After scoring the final model, I challenged myself to create a
[simple web application](https://song-popularity-predictor.herokuapp.com/){:target="_blank"}
(using [Streamlit](https://www.streamlit.io/){:target="_blank"}) that allows anyone to play around with the
model parameters and make predictions.

~~As a final bonus, I learned how to make a Dockerfile for the application and deploy it to Google Cloud App Engine.~~
_Update (2020-09-17): I've since migrated the app to Heroku because it is much cheaper._

#### Lessons Learned

Aside from the theory and technical skilled learned, I took away a couple of general lessons from this project:

- Refining scope can lead to a much more successful project, model, or product.
- When feature engineering and model tuning gets tedious, take a step back and think about the problem at hand from a
  more global, common sense perspective.

**The code for this project can be accessed [here](https://github.com/stephenjkaplan/song-popularity-predictor){:target="_blank"}.**

**The Streamlit app I created for this project can be accessed [here](https://song-popularity-predictor.herokuapp.com/){:target="_blank"}.**


text:
# Interactions
## Description

> Interaction resources follow this example format in JSON

```json
{
"id": 24062,
"uuid": "7aa870f0-046f-11e7-9cc9-9de741d6e753",
"survey_id": 493,
"phone_number": "+61409999999",
"email"<EMAIL_ADDRESS>"survey_type": "inbound",
"scheduled_at": "2016-02-19 10:30:02",
"external_ref": "example-id-235i129",
"updated_at": "2016-02-19 10:30:02",
"created_at": "2016-02-19 10:30:02",
"call_type": "support",
"agent_id": "nevilr",
"status": "Not Started",
"web_link": "https://surveydynamix.com/web_survey/<uuid>"
}
```

An interaction resource represents a request for a survey respondent to complete a specified survey. The status of all interactions with survey respondents are tracked by the Survey Dynamix system using the interaction resource.
The interaction resource API is used to create new survey interactions, update existing interactions with new information, and view the status of existing interactions. Each interaction JSON object can contain any of the following information:

* A unique interaction ID

* The ID of the survey that the interaction belongs to

* The contact phone number that will be used to perform outbound voice or SMS interactions

* The email address of the survey respondent if the survey is a web survey distributed via email

* The survey type - the medium by which the interaction will be performed.

* A timestamp scheduling when the interaction should be performed by the Survey Dynamix system

* Timestamps specifying when the interaction was created and last updated

* The agent ID of a user in the Survey Dynamix system, used for report aggregation

* A text field describing the current status of the interaction at point of retrieval

* The web link that a respondent would follow to complete the survey

* The call type and external reference populated by the customer.

## Get Interactions List

> This code will return 5 outbound interactions from the survey with ID = 52:

```shell
curl -X GET   "https://surveydynamix.com/api/interactions?survey_id=52&_limit=5&survey_type=outbound" \
    -u Customer_UUID:Auth_Token
```
Gets a list of survey interactions as a JSON array of interaction resources.
### URI
`/interactions`
### Method
`GET`

### Parameters
| Name | Description | Allowed Values | Default
| --- | --- | --- | --- |
| survey_id | The ID of the survey the interactions belong to. Found on the top right of the relevant survey page. | integer | Required |
| _limit | The number of matching interactions to return. | integer between 1 and 1000 | 10 |
| _offset | The row number to start at if more than _limit interactions are found. | integer | 0 |
| _order | The order of ID that results should be returned in. | ‘ASC’: earliest first or ‘DESC’: most recent first  | Default order is by current interaction status. |
| _include_responses | Whether or not to include question responses in JSON. When true, response objects (see [Responses](#responses)) will be appended in an array under the “responses” field. | boolean | FALSE |
| _include_data | Whether or not to include interaction data in JSON. When true, interaction data objects (see [Interaction Data](#interaction-data)) will be appended in an array under the “interaction_data” field. | boolean | FALSE |
| email | The email address to be used in surveying. | An email address | empty |
| survey_type | The survey medium to use. | inbound, outbound, sms | none |
| scheduled_at | The exact time the interaction was scheduled for | dateTime | none |
| external_ref | A standard string field for referencing external system IDs. | string | none |
| call_type | A standard string field for report aggregation | string | none |
| agent_id | A string corresponding to an agent ID for report aggregation. | string | none |
| started | Whether or not the interaction has started | boolean | none |
| completed | Whether or not the interaction has completed | boolean | none |
| survey_ended | Whether or not the survey was successfully completed within the interaction | boolean | none |

## Add New Interaction

> This code will create an email interaction for<EMAIL_ADDRESS>on survey with ID = 52 to be sent in 5 minutes:

```shell
curl -X POST   "https://surveydynamix.com/api/interactions" \
    -d "survey_id=52" \
    -d "survey_type=email" \
    -d<EMAIL_ADDRESS>\
    -d "scheduled_at=Now + 5 minutes" \
    -u Customer_UUID:Auth_Token
```

Creates a survey interaction with the specified parameters.
### URI
`/interactions`
### Method
`POST`

### Parameters
| Name | Description | Allowed Values | Default
| --- | --- | --- | --- |
| survey_id | The ID of the survey you wish to add the interaction to. Found on the top right of the relevant survey page. | integer | Required |
| _force_new | Force a new interaction to be added even if a pending interaction with the same phone number and survey ID exists. | boolean | FALSE |
| phone_number | The phone number to be used in surveying. Required for voice and sms interactions. | A 12 character string in the proper phone number format | empty |
| email | The email address to be used in surveying. Required for email interactions. | An email address | empty |
| survey_type | The survey medium to use. | inbound, outbound, sms, web, email | web |
| scheduled_at | The time at which an outbound/sms survey will start, or the time after which an inbound survey is allowed to start. | dateTime string. Accepts times in standard UTC format and in the format “Now + X Days/Hours/Minutes” | now |
| external_ref | A standard string field for referencing external system IDs. | string | empty |
| call_type | A standard string field for report aggregation | string | empty |
| agent_id | A string corresponding to an agent ID. Will allow an agent user with this ID to see the interaction in the dashboard, and will be used to aggregate for agent rankings. | string | empty |
| Custom Metadata| parameters not otherwise listed in this table will be added as interaction data resources associated with the created interaction. | The key must only include alphanumeric characters and underscores and must start with a letter. The value may be any string. | none |

<aside class="notice"> Interactions cannot be added if a pending interaction with the same phone number and survey id exists, unless the _force_new parameter is set to true. If you attempt to add an interaction like this, a 409(Conflict) response will be returned. </aside>

## Get Specific Interaction

> This code will return a JSON object for the interaction resource with ID = 891234:

```shell
curl -X GET   "https://surveydynamix.com/api/interactions/891234" \
    -u Customer_UUID:Auth_Token
```

Returns the JSON object for an interaction resource specified by `{interaction_id}`

### URI
`/interactions/{interaction_id}`
### Method
`POST`

### Parameters
| Name | Description | Allowed Values | Default
| --- | --- | --- | --- |
| _include_responses | Whether or not to include question responses in JSON. When true, response objects (see 3.2) will be appended in an array under the “responses” field. | boolean | FALSE |
| _include_data | Whether or not to include interaction data in JSON. When true, interaction data objects (see 4.2) will be appended in an array under the “interaction_data” field. | boolean | FALSE |

## Delete Interaction

> This code will delete the interaction resource with ID = 891234:

```shell
curl -X DELETE   "https://surveydynamix.com/api/interactions/891234" \
    -u Customer_UUID:Auth_Token
```

Deletes an interaction resource specified by `{interaction_id}`.

Note that for billing and data consistency purposes, interactions cannot be deleted once they have started.

### URI
`/interactions/{interaction_id}`
### Method
`DELETE`

### Parameters
None

## Update Interaction

> This code will update the interaction resource with ID = 891234 using a modified JSON object:

```shell
curl -X PUT   "https://surveydynamix.com/api/interactions/891234" \
    -d "interaction={\"id\":891234,\"survey_id\":52,\"phone_number\":\"\",\"survey_type\":\"email\",\"scheduled_at\":\"2017-05-04 02:53:49\",\"external_ref\":\"\",\"created_at\":\"2017-05-04 02:53:49\",\"updated_at\":\"2017-05-04 02:54:55\",\"call_type\":\"\",\"agent_id\":\"\",\"uuid\":\"e67fa4e0-3074-11e7-8efe-116b9b2f6833\",\"email\":\"rileyneville@gmail.com\",\"status\":\"Completed 1 hour ago\",\"weblink\":\"https:\/\/surveydynamix.com\/web_survey\/e67fa4e0-3074-11e7-8efe-116b9b2f6833\"}" \
    -u Customer_UUID:Auth_Token
```

Updates a specified interaction with new properties supplied in a JSON object.

Note that the new JSON object must have the same ID as the resource you are attempting to update.

### URI
`/interactions/{interaction_id}`
### Method
`PUT`

### Parameters
| Name | Description | Allowed Values | Default
| --- | --- | --- | --- |
| interaction | A JSON object representing the interaction in the same format as returned by get and create requests with the fields to update altered in text. | JSON String | Required |

## Get Responses List By Interaction

> This code will return a list of survey response resources associated with the interaction resource with ID = 891234:

```shell
curl -X GET   "https://surveydynamix.com/api/interactions/891234/responses" \
    -u Customer_UUID:Auth_Token
```

Gets a list of survey responses for the requested interaction.

This works the same as a GET call to the /responses resource with the interaction_id parameter set to `{interaction_id}``

### URI
`/interactions/{interaction_id}/responses`
### Method
`GET`

### Parameters
See [Get Responses List.](#get-responses-list)

## Get Interaction Data List By Interaction

> This code will return a list of interaction data resources associated with the interaction resource with ID = 891234:

```shell
curl -X GET   "https://surveydynamix.com/api/interactions/891234/interaction_data" \
    -u Customer_UUID:Auth_Token
```
Gets a list of interaction data for the requested interaction

This works the same as a GET  call to the /interaction_data resource with the interaction_id parameter set to `{interaction_id}`

### URI
`/interactions/{interaction_id}/responses`
### Method
`GET`

### Parameters
See [Get Interaction Data List.](#get-interaction-data-list)

## Start Survey

> This code will start the survey for interaction with ID = 891234

```shell
curl -X POST   "https://surveydynamix.com/api/interactions/891234/start_survey" \
    -u Customer_UUID:Auth_Token
```
> The request will return a JSON object with the following example structure:

```json
{
  "prompts":[
     "This is the first survey prompt text",
     "This is the second survey prompt text",
     # ...
     "This is the Nth survey prompt text",],
  "sound_files":[
     "http://First_sound_file_url.mp3",
     "http://Second_sound_file_url.mp3",
     # ...
     "http://Nth_sound_file_url.mp3",],
  "survey_completed": 0,
  "current_question":{
    #question resource object for current question if survey_completed = 0
  }
}
```

 Starts a web based survey (if not already started) and returns lists of the current survey prompts and sound files if relevant. Also returns details of current question if a question response is expected.

### URI
`/interactions/{interaction_id}/start_survey`

### Method
`POST`

### Parameters
None

## Submit Survey Response

> This code will submit the response "Yes" to the survey for interaction with ID = 891234

```shell
curl -X POST   "https://surveydynamix.com/api/interactions/891234/submit_response" \
    -d "response=Yes" \
    -u Customer_UUID:Auth_Token
```
> The request will return a JSON object with the following example structure:

```json
{
  "prompts":[
     "This is the first survey prompt text",
     "This is the second survey prompt text",
     # ...
     "This is the Nth survey prompt text",],
  "sound_files":[
     "http://First_sound_file_url.mp3",
     "http://Second_sound_file_url.mp3",
     # ...
     "http://Nth_sound_file_url.mp3",],
  "survey_completed": 0,
  "current_question":{
    #question resource object for current question if survey_completed = 0
  }
}
```

Submits a response to the current survey question, evaluates the response, then returns lists of the current survey prompts and sound files if relevant. Also returns details of current question if a question response is expected. If the interaction has not yet started, this will redirect to the [Start Survey](#start-survey) call instead.

### URI
`/interactions/{interaction_id}/submit_response`

### Method
`POST`

### Parameters
| Name | Description | Allowed Values | Default
| --- | --- | --- | --- |
| response |The string response sent by the survey respondent. | Any string response. | Required |

## Abandon Survey

> This code will finish the survey for interaction with ID = 891234

```shell
curl -X POST   "https://surveydynamix.com/api/interactions/891234/abandon_survey" \
    -u Customer_UUID:Auth_Token
```
> The request will return a JSON object with the following example structure:

```json
{
  "prompts":[
     "This is the first survey prompt text",
     "This is the second survey prompt text",
     # ...
     "This is the Nth survey prompt text",],
  "sound_files":[
     "http://First_sound_file_url.mp3",
     "http://Second_sound_file_url.mp3",
     # ...
     "http://Nth_sound_file_url.mp3",],
  "survey_completed": 1
}
```

Abandons or completes a web based survey and returns lists of the current survey prompts and sound files if relevant.

### URI
`/interactions/{interaction_id}/abandon_survey`

### Method
`POST`

### Parameters
None

repository: contactdynamix/slate

branch_name: refs/heads/master

extension: md

license_type: permissive

repo_name: contactdynamix/slate


text:
# Let's Code and Indie Game - Episode 20 - Punch

## What's Covered

In this episode we use give our player the ability (well half of the ability) to punch when the `z` key is pressed.

## Sound Effects

You can make great sound effects with the super-useful [sfxr](http://www.drpetter.se/project_sfxr.html).

license: MIT

repository: hypnoscope/let-s-code-an-indie-game

repo_name: hypnoscope/let-s-code-an-indie-game


text:
# strapi-provider-upload-aws-s3-with-webp

## Creates an additional image in .webp format on upload

### Configurations

Your configuration is passed down to the provider. (e.g: `new AWS.S3(config)`). You can see the complete list of options [here](https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/S3.html#constructor-property)

See the [using a provider](https://strapi.io/documentation/v3.x/plugins/upload.html#using-a-provider) documentation for information on installing and using a provider. And see the [environment variables](https://strapi.io/documentation/v3.x/concepts/configurations.html#environment-variables) for setting and using environment variables in your configs.

**Example**

`./config/plugins.js`

```js
module.exports = ({ env }) => ({
  // ...
  upload: {
    provider: "aws-s3",
    providerOptions: {
      accessKeyId: env("AWS_ACCESS_KEY_ID"),
      secretAccessKey: env("AWS_ACCESS_SECRET"),
      region: env("AWS_REGION"),
      params: {
        Bucket: env("AWS_BUCKET"),
      },
    },
  },
  // ...
});
```

## Resources

- [License](LICENSE)

## Links

- [Strapi website](http://strapi.io/)
- [Strapi community on Slack](http://slack.strapi.io)
- [Strapi news on Twitter](https://twitter.com/strapijs)

gha_language: JavaScript

gha_license_id: MIT


text:
# Userstyles

This repository is a collection of userstyles I created, mostly to create a Dark Mode for websites I visit.
This document will name each of those userstyles and provide a link to install them.

## Requirements
To install and use these styles you'll need a CSS customization add-on for your browser. If you don't have one already, I'd recommend [Stylus](https://github.com/openstyles/stylus), which works with both Chromium and Firefox.

# LingoDark

**Dark LingoDeer theme**.
Supports home, support, and the actual lesson pages.

[Install this theme](https://raw.githubusercontent.com/urbancmc/userstyles/master/LingoDark/lingodark.user.css)

# PCGamingWiki Dark
**Dark PCGamingWiki theme**.
Supports wiki pages and community file download.

[Install this theme](https://raw.githubusercontent.com/urbancmc/userstyles/master/PCGamingWiki-Dark/pcgw-dark.user.css)

repository: UrbanCMC/userstyles

repo_name: UrbanCMC/userstyles


text:
---
title: Continue With The Van Prep Work
layout: post
---

After removing the bulkhead (which cleared up a lot of space) the next step in the prep phase was to remove the floor to get the van ready for cleaning but I had to deal with a couple of mechanical issues first.

The rear right tire had a slow leak which caused the van to lean to the right and the TPMS light to come on, I read about Discount Tire offering a free patch service so I drove over and after an hour or so I got the van back with the tire patched and the TPMS light off.

The next issue I had to deal with was a cylinder #3 misfire (error code P0303 from a OBDII reader) and a warning light coming on, I spoke to someone who told me that there is most likely gunk in the fuel tank which is causing the misfire since the van was moslty likely sitting at the dealership for a while and he recommended I try some STP Fuel System Cleaner to fix it. After putting it in a reseting the codes (using the OBDII reader) the warning light stayed off. Update: after a few days the warning light came back on so I'm going to try something else.

STP

I have another issue to take care of (right side mirror shaking) but I'll leave that for later so I can continue with the prep work. Over the weekend I returned to my local Makerspace and worked on removing the cargo floor cover. For that I had to remove the front seats in order to be able to pull out the floor cover.

Seat being removed.

The floor cover was pretty dirty underneath and also a little wet, I'm assuming it holds moisture so it's probably not something that I'll use in the van build.

The cargo floor cover.

The entire process didn't take that long and went over without any issues.

The next step in the prep work is to take off the cab floor which will require removing the seats and the center console but from what I've seen so far it shouldn't be an issue.

Before And After Removing The Cargo Floor.


text:
1. [1. This is header 1](#1-this-is-header-1)
   1. [1.1. This is header 2](#11-this-is-header-2)
      1. [1.1.1. This is header 3](#111-this-is-header-3)
      2. [1.1.2. This is header 4](#112-this-is-header-4)
2. [2. This is header 5](#2-this-is-header-5)

# 1. This is header 1
## 1.1. This is header 2
### 1.1.1. This is header 3
### 1.1.2. This is header 4
# 2. This is header 5

ordered list:
1. thing1
   1. thing2
   2. thing3
2. thing4
3. thing5

unordered list:
- thing1
  - thing2
    - thing3
    - thing4
  - thing5
- thing6
- thing7

todo list:
  - [x] thing1
  - [ ] thing2
  - [ ] thing3

This is a piece of inline code: `Hello, Markdown!`

This is a piece of C code:
~~~C
  #include <stdio.h>
  using namespace std;

  int main()
  {
    printf("Hello, Markdown!");
    return 0;
  }
~~~

This is a piece of C++ code:
~~~C++
  #include <iostream>
  using namespace std;

  int main()
  {
      cout << "Hello, Markdown!" << endl;
      return 0;
  }
~~~

I am Groot.

This is a math equation:
$a^2 = b^2 + c ^2$

This is another math equations:
$$
  a^2 = b^2 + c^2 \\
  \frac{a}{b} = \frac{c}{d}
$$

This is a table:

| left | mid | right |
| ---- | --- | ----- |
| 1    | 2   | 3     |
| 4    | 5   | 6     |

This is [a link](https://github.com/lixk28), which is directed to my github profile page.

This is a image:
![kaf and rim](image/85258716_p0_master1200.jpg)

These are emojis: :smile: :zap: :cyclone: :star:

This is a mermaid diagram:
```mermaid
stateDiagram
    [*] --> First
    state First {
        [*] --> second
        second --> [*]
    }
```

This is another mermaid diagram:
```mermaid
  graph TD;
    A-->B;
    A-->C;
    B-->D;
    C-->D;
```

branch_name: refs/heads/main


text:
# Release Notes

## Unreleased

- Fixed a bug where `craft\flysystem\base\FlysystemFs::directoryExists()` was calling `fileExists()` on the Flysystem adapter, rather than `directoryExists()`. ([#11](https://github.com/craftcms/flysystem/issues/11))

## 1.0.0 - 2022-05-03

- Initial release.

repository: craftcms/flysystem

gha_language: PHP

repo_name: craftcms/flysystem


text:
---
title: "Build a better RecyclerView Adapter"
categories:
  - Android
tags:
  - Kotlin
---

Many of my Android apps end up including listst, which are implemented via a [RecyclerView](https://developer.android.com/guide/topics/ui/layout/recyclerview).  More importantly, I know all the items in the list ahead of time.  Every single blog and tutorial always uses the same methodology. This ends up being a lot of boilerplate code.

* Create a view holder class
* Create a list adapter
* Attach the list adapter to the recyclerview
* Update the view holder class to implement the UI
* Check out the requirements around clicking
* Arrange for the list of items in the adapter to be updated

Even with the reduction in code from writing this in Kotlin, it's still a lot of code spread over three classes.  I'd prefer for it to be all in one class.  Recently, I was building a new app and the same problem surfaced, so I decided to fix it once and for all with an abstract adapter.

## The Abstract Adapter

Here is the theory.  Let's say I have an adapter that is always the same.  The only thing I have to do is specify a method for building out the UI.  Wouldn't this save time?

  The essence is:

* Call `setItems()` to replace the current list with a new list of items.
* Implement `onBindData()` to bind the data within a single element of the list to the UI.
* Everything else is taken care of for you.

## Creating a list

When does the code necessary to create a list become?  It is also (in my opinion) simplified.  I only have to create the list adapter and define one method:

```kotlin
class MyFragment: Fragment() {
  private val vm by viewModel<MyViewModel>()

  override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? {
    val view = inflater.inflate(R.layout.fragment_my, container, false)

    // Initialize the recyclerview
    val list = view.findViewById<RecyclerView>(R.id.my_list)
    list.adapter = object : SimpleListAdapter(R.layout.my_list_item) {
      override fun onBindData(position: Int, viewHolder: RecyclerView.ViewHolder, data: Any) {
        this@MyFragment.bindDataToRow(viewHolder.itemView, data as MyData)
      }
    }

    // Populate the list from something in the view-model
    vm.listItems.observe(this, Observer { items ->
      (list.adapter as SimpleListAdapter).setItems(items)
    })
  }

  private fun bindDataToRow(view: View, data: MyData) {
    val title = view.findViewById<TextView>(R.id.list_item_title)

    title.text = data.title
  }
}
```

This is a really simple example, but you can see the initialization is straight forward.  I pass the layout of an individual row as an argument, then I override the `onBindData()` method.  This is called for every row to bind the data to the row.  The new adapter doesn't know what sort of data is in your list, nor does it know what is in your layout.  You provide the binding.

To populate the list, you call `setItems()`.  This will wipe out the data that is there and replace it with the new data.

## Handling row clicks

You can easily handle row clicks by registering a click-listener within `bindDataToRow()` method:

```
  private fun bindDataToRow(view: View, data: MyData) {
    //...

    view.setOnClickListener { this.onClick(data) }
  }
```

## Why not a library?

There are a lot of RecyclerView replacements out there that implement better semantics for list building.  I find it isn't worth it.  The code needed to implement a simple list is small, and I would rather not bring in another dependency for a small amount of code.  It's difficult to keep up to date, and you never know what else is in the library.  Always consider the effects of the dependency before agreeing to it.  Some dependencies are good, but some will just cause issues.

## Next steps

Swiping left and right still takes a major amount of work to implement an `ItemTouchHelper`, so I will tackle that next as a reusable component.


text:
When submitting a pull request, make sure you do the following:

- submit the PR to the `dev` branch on the main repo, **not** the `master` branch
- in the body, reference the issue that it closes by number in the format `Closes #000`

repository: s-KaiNet/node-sp-auth

gha_language: TypeScript

repo_name: s-KaiNet/node-sp-auth


text:
# Generator Stack NodeJs
[![Build Status][travis-image]][travis-url] [![Coverage Status][coveralls-image]][coveralls-url] [![Dependencies Status][david-dm-image]][david-dm-url] [![DevDependencies Status][david-dm-dev-image]][david-dm-dev-url]

[![NPM][npm-image]][npm-url]

[travis-image]: https://img.shields.io/travis/guiigos/generator-stack-node/master.svg?style=flat-square
[travis-url]: https://travis-ci.org/guiigos/generator-stack-node
[coveralls-image]: https://img.shields.io/coveralls/github/guiigos/generator-stack-node/master.svg?style=flat-square
[coveralls-url]: https://coveralls.io/github/guiigos/generator-stack-node?branch=master
[david-dm-image]: https://david-dm.org/guiigos/generator-stack-node/status.svg?style=flat-square
[david-dm-url]: https://david-dm.org/guiigos/generator-stack-node
[david-dm-dev-image]: https://david-dm.org/guiigos/generator-stack-node/dev-status.svg?style=flat-square
[david-dm-dev-url]: https://david-dm.org/guiigos/generator-stack-node?type=dev
[npm-image]: https://nodei.co/npm/generator-stack-node.png?downloads=true&downloadRank=true&stars=true
[npm-url]: https://nodei.co/npm/generator-stack-node

> Stack boilerplate personal from API **NodeJs**.

> - [Overview](#overview)
>   - [Generated Project Dependencies](#generated-project-dependencies)
> - [Installation](#installation)
> - [Usage](#usage)
>   - [Options](#options)
> - [Directory](#directory)
> - [Generator Development](#generator-development)
>   - [Run](#run)
>   - [Tests](#tests)
> - [Authors](#authors)
> - [License](#license)

## Overview
Generator using [Yeoman](http://yeoman.io).

The generator creates an express API model compiling the code with [Babel](https://babeljs.io/), comes with integration with [PostgreSql](https://github.com/brianc/node-postgres) database, token authentication with [Passport](https://github.com/jaredhanson/passport) using [JWT](https://github.com/themikenicholson/passport-jwt) and possibility of reporting errors by [Sentry](https://sentry.io/). It has a documentation generator using [apiDoc](http://apidocjs.com/). Contains lint tests using [esLint](https://eslint.org/), TDD tests using [Mocha](https://github.com/mochajs/mocha) and code coverage using [nyc](https://github.com/istanbuljs/nyc).

### Generated Project Dependencies
[![Dependencies Status][david-dm-dep-image]][david-dm-dep-url] [![DevDependencies Status][david-dm-dep-dev-image]][david-dm-dep-dev-url]

[david-dm-dep-image]: https://david-dm.org/guiigos/stack-node-dependency/status.svg?style=flat-square
[david-dm-dep-url]: https://david-dm.org/guiigos/stack-node-dependency
[david-dm-dep-dev-image]: https://david-dm.org/guiigos/stack-node-dependency/dev-status.svg?style=flat-square
[david-dm-dep-dev-url]: https://david-dm.org/guiigos/generator-stack-node?type=dev

## Installation
Commands to install the tools to run the generator.

```bash
# tools
$ npm install npm -g
$ npm install yo -g

# generator
$ npm install -g generator-stack-node
```

## Usage
Commands to run the generator.

```bash
$ yo stack-node <options>
```

### Options
The options that are not informed will be requested by the generator when initiating project.

```bash
  -h,     --help          # Print the generator's options and usage
          --skip-cache    # Do not remember prompt answers                                  Default: false
          --skip-install  # Do not automatically install dependencies                       Default: false
  -n,     --name          # What is the project name?
  -d,     --description   # What is a short description for this project?
  -a,     --author        # Who is the author of this project?
  -e,     --email         # What is the email of the author of this project?
  -h,     --homepage      # What is the project homepage?
  -dbu,   --dbuser        # What is the connection user with postgres?
  -dbp,   --dbpassword    # What is the access password for connection to postgres?
  -dbh,   --dbhost        # What is the host of the database?
  -dbp,   --dbport        # What is the database port?
  -s,     --sentry        # If you have report sentry DNS to monitor errors in production.
```

## Directory
```bash
|-- name-project                                 # Project name
    |-- .editorconfig                            # Maintain consistent coding styles
    |-- .gitignore                               # Contains files to be ignored when pushing to git
    |-- gulpfile.js                              # Link all splittered gulp tasks
    |-- package.json                             # Holds various metadata relevant to the project
    |-- README.md                                # Contains the details of the generated project
    |-- src                                      # The source code of the application
    |   |-- index.js                             # Application main file
    |   |-- api                                  # Main project folder
    |       |-- app.js                           # Module that starts the server
    |       |-- config                           # General settings folder
    |       |   |-- config.js                    # File that loads the settings according to the environment
    |       |   |-- auth                         # Authentication settings folder
    |       |   |   |-- passport.js              # Authentication configuration module using passport
    |       |   |-- db                           # Database module folder
    |       |   |   |-- database.js              # PostgreSql database module
    |       |   |-- env                          # Project settings folder
    |       |   |   |-- development.env          # Development environment settings
    |       |   |   |-- production.env           # Production environment settings
    |       |   |   |-- test.env                 # Test environment settings
    |       |   |-- validator                    # Express validation folder
    |       |       |-- sanitizers.js            # Sanitizers of express
    |       |-- models                           # Templates folder
    |       |   |-- user.model.js                # User model manipulation of data with the database
    |       |-- routes                           # Application routes
    |           |-- routes.js                    # Standard and custom route file
    |           |-- auth                         # Authentication routes folder
    |           |   |-- auth.js                  # Token request route
    |           |-- exposed                      # Folder of other routes
    |           |   |-- users.js                 # User registration routes
    |           |-- responses                    # Responses definitions folder
    |               |-- handlers.js              # Standard responses to requests
    |-- test                                     # The source code of the tests
        |-- mocha.opts                           # Mocha options and parameters
        |-- data                                 # Fictitious data folder
        |   |-- user.json                        # User registration data
        |-- integration                          # Integration testing folder
        |   |-- index.spec.js                    # Main integration testing file
        |   |-- modules                          # Integration test modules
        |       |-- authentication.spec.js       # Authentication test file
        |       |-- routes.spec.js               # Standard route test file
        |       |-- user.spec.js                 # User test file
        |-- loader                               # Folder files that are required by the tests
        |   |-- globals.js                       # Loads modules and global settings
        |-- unitary                              # Unitary testing folder
            |-- index.spec.js                    # Main unitary testing file
            |-- modules                          # Unitary test modules
                |-- authentication.spec.js       # Authentication test file
                |-- database.spec.js             # Database connection test file
                |-- user.spec.js                 # User test file
```

## Generator Development
Procedures in the development of the generator.

### Run
Run project in development mode.

```bash
# start submodules
$ git submodule init

# populating the submodule
$ git submodule update

# link package npm
$ npm link

# create a tarball from a package
$ npm pack

# run generator
$ yo stack-node <options>
```

### Tests
Run test to ensure generator functionality.

```bash
$ npm test
```

## Authors
| ![Guilherme Alves](https://avatars2.githubusercontent.com/u/6471538?v=3&s=150)|
|:---------------------:|
|  [Guilherme Alves](https://github.com/guiigos)   |

## License
[![License MIT](https://img.shields.io/github/license/guiigos/generator-stack-node.svg?style=flat-square)](https://github.com/guiigos/generator-stack-node/blob/master/LICENSE)

repository: guiigos/generator-stack-node

repo_name: guiigos/generator-stack-node


text:
---
title: Gatsby Kontent Lumen
github: 'https://github.com/Kentico/gatsby-starter-kontent-lumen'
demo: 'https://gatsby-starter-kontent-lumen.netlify.app/'
author: makma
date: 2020-04-30T00:00:00.000Z
github_branch: master
ssg:
  - Gatsby
cms:
  - Kontent
archetype:
  - Blog
  - Portfolio
description: >-
  Lumen is a minimal, lightweight and mobile-first starter for creating blogs
  using Gatsby and Kentico Kontent.
stale: false
---

# Gatsby Kontent Lumen

Lumen is a minimal, lightweight and mobile-first starter for creating blogs using Gatsby and Kentico Kontent.

## Features

* Content from Kontent headless CMS.
* Lost Grid (peterramsing/lost).
* Beautiful typography inspired by matejlatin/Gutenberg.
* Mobile-First approach in development.
* Stylesheet built using SASS and BEM-Style naming.
* Syntax highlighting in code blocks.
* Sidebar menu built using a configuration block.
* Archive organized by tags and categories.
* Automatic Sitemap generation.
* Google Analytics support.

repository: styxlab/jamstackthemes

repo_name: styxlab/jamstackthemes


text:
# [ML.NET](http://dot.net/ml) 1.5.4

## **New Features**
- **New API for exporting models to Onnx**. ([#5544](https://github.com/dotnet/machinelearning/pull/5544)). A new API has been added to Onnx converter to specify the output columns you care about. This will export a smaller and more performant model in many cases.

## **Enhancements**
- Perf improvement for TopK Accuracy and return all topK in Classification Evaluator ([#5395](https://github.com/dotnet/machinelearning/pull/5395)) (**Thank you @jasallen**)
- Update OnnxRuntime to 1.6 ([#5529](https://github.com/dotnet/machinelearning/pull/5529))
- Updated tensorflow.net to 0.20.0 ([#5404](https://github.com/dotnet/machinelearning/pull/5404))
- Added in DcgTruncationLevel to AutoML api and increased default level to 10 ([#5433](https://github.com/dotnet/machinelearning/pull/5433))

## **Bug Fixes**
- **AutoML.NET specific fixes**.
  - Fixed AutoFitMaxExperimentTimeTest ([#5506](https://github.com/dotnet/machinelearning/pull/5506))
  - Fixed code generator tests failure ([#5520](https://github.com/dotnet/machinelearning/pull/5520))
  - Use Timer and ctx.CancelExecution() to fix AutoML max-time experiment bug ([#5445](https://github.com/dotnet/machinelearning/pull/5445))
  - Handled exception during GetNextPipeline for AutoML ([#5455](https://github.com/dotnet/machinelearning/pull/5455))
  - Fixed internationalization bug([#5162](https://github.com/dotnet/machinelearning/pull/5163)) in AutoML parameter sweeping caused by culture dependent float parsing. ([#5163](https://github.com/dotnet/machinelearning/pull/5163))
  - Fixed MaxModels exit criteria for AutoML unit test ([#5471](https://github.com/dotnet/machinelearning/pull/5471))
  - Fixed AutoML CrossValSummaryRunner for TopKAccuracyForAllK ([#5548](https://github.com/dotnet/machinelearning/pull/5548))
- Fixed bug in Tensorflow Transforer with handling primitive types ([#5547](https://github.com/dotnet/machinelearning/pull/5547))
- Fixed MLNet.CLI build error ([#5546](https://github.com/dotnet/machinelearning/pull/5546))
- Fixed memory leaks from OnnxTransformer ([#5518](https://github.com/dotnet/machinelearning/pull/5518))
- Fixed memory leak in object pool ([#5521](https://github.com/dotnet/machinelearning/pull/5521))
- Fixed Onnx Export for ProduceWordBags ([#5435](https://github.com/dotnet/machinelearning/pull/5435))
- Upgraded boundary calculation and expected value calculation in SrCnnEntireAnomalyDetector ([#5436](https://github.com/dotnet/machinelearning/pull/5436))
- Fixed SR anomaly score calculation at beginning ([#5502](https://github.com/dotnet/machinelearning/pull/5502))
- Improved error message in ColumnConcatenatingEstimator ([#5444](https://github.com/dotnet/machinelearning/pull/5444))
- Fixed issue 5020, allow ML.NET to load tf model with primitive input and output column ([#5468](https://github.com/dotnet/machinelearning/pull/5468))
- Fixed issue 4322, enable lda summary output ([#5260](https://github.com/dotnet/machinelearning/pull/5260))
- Fixed perf regression in ShuffleRows ([#5417](https://github.com/dotnet/machinelearning/pull/5417))
- Change the _maxCalibrationExamples default on CalibratorUtils ([#5415](https://github.com/dotnet/machinelearning/pull/5415))

## **Build / Test updates**
- Migrated to [Arcade](https://github.com/dotnet/arcade/) build system that is used my multiple dotnet projects. This will give increased build/CI efficiencies going forward. Updated build instructions can be found in the docs/building folder
- Fixed MacOS builds ([#5467](https://github.com/dotnet/machinelearning/pull/5467) and [#5457](https://github.com/dotnet/machinelearning/pull/5457))

## **Documentation Updates**
- Fixed Spelling on stopwords ([#5524](https://github.com/dotnet/machinelearning/pull/5524))(**Thank you @LeoGaunt**)
- Changed LoadRawImages Sample ([#5460](https://github.com/dotnet/machinelearning/pull/5460))

## **Breaking Changes**
- None

repository: dotnet/machinelearning

gha_language: C#

repo_name: dotnet/machinelearning


text:
## Records
Originally published: 2008-11-04 06:52:42
Last updated: 2008-11-04 06:52:42
Author: George Sakkis

This is a recipe similar in functionality and exec-style optimized implementation to the very well received namedtuple (http://code.activestate.com/recipes/500261/) that was included in Python 2.6. The main difference is that **records**, unlike named tuples, are mutable. In addition, fields can have a default value. Instead of subclassing tuple or list, the implementation create a regular class with __slots__.

gha_language: Python


text:
see http://www.scala-sbt.org/0.13/docs/Command-Line-Applications.html and http://www.scala-sbt.org/0.13/docs/Commands.html

sbt publishLocal

repository: zoosky/sbt-cmd-tst

gha_language: Scala

repo_name: zoosky/sbt-cmd-tst


text:
Routing Component
=================

(as in Symfony's default Routing component)
'Routing associates a request with the code that will convert it to a response.'

This routing component is specialised in delivering various sites, browser
targets and languages to specific controllers. Aiming to simplify routing for
common scenarios in modern websites.
It sports an 'internal referencing' system which allows developers and
CMS-users can use to build simple links which are translated actual URL's. This
is similar to what Symfony users are already used too, but goes a lot further.

To do
-----

At this time it's not finished and the tests are far from complete. When it's
finished it should support more Symfony defaults:
- YAML and XML routes
- compiled routes
- routes to ReWrite rules
- more tests
- speed and more speed

repository: pivotx/corebundle

repo_name: pivotx/corebundle


text:
# Starter Project for Spring Boot WebFlux Swagger MongoDB React & many other goodies

### What's in the package:
- Spring Boot with WebFlux
- Swagger2 fully automated configuration, accessible at /api
- Logback configured with SizeAndTimeBasedRollingPolicy
- Access log support added
- **JWT**: Full authentication and authorization implemented with sample Role and User (do change the secrets before publishing your app)
- Access controlled API and Bearer login
- Ready application config
- Spring **Actuator** configured, accessible at /manage
- **Reactive MongoDB** with generic CRUD service
- **Audit** support on any collection
- **Auto-sequence** generation for collections
- End to end sample backend flow
- Sample JUnits
- **Lombok** based pojos
- Separate modules for backend and frontend
- **React** configured as frontend
- Integrated production build for backend and frontend, frontend can still be used separately during dev

### Instructions:
- Start local MongoDB
- Run Application.java
- Optionally pass -Dreactor.netty.http.server.accessLogEnabled=true in commandline to enable access.log
- Open localhost:8080
- Goto /api for swagger
- You can login using /login from swagger (user/user), then take the token and use swagger authentication to pass Bearer <token>. You are now authorized and should be able to use other APIs.

Enjoy!

repository: univermal/webflux-mongodb-react-starter

repo_name: univermal/webflux-mongodb-react-starter


text:
Ignition Spec v1-v2.x.0 to v3.0.0 Config Converter
===================================================

## What is this?

This is a tool and library for convert old (v1-v2.x.0) Ignition configs to the
new v3.0.0 format.

## Why is this not part of Ignition?

The old spec versions have bugs that allow specifying configs that don't make
sense. For example, it is valid for a v2.1+ config to specify the same path
should be both a directory and a file. The behavior there is defined by
Ignition's implementation instead of the spec and in certain edge cases, by the
contents of the filesystem Ignition is operating on.

This means Ignition can't be guaranteed to automatically translate an old
config to an equivalent new config; it can fail at conversion. Since Ignition
internally translates old configs to the latest config, this would mean old
Ignition configs could stop working on newer versions of whatever OS included
Ignition. Additionally, due to the change in how filesystems are handled (new
configs require specifying the path relative to the sysroot that Ignition
should mount the filesystem at), some configs require extra information to
convert from the old versions to the new versions.

This tool exists to allow _mechcanical_ translation of old configs to new
configs. If you are also switching operating systems, other changes may be
necessary.

## How can I ensure my old config is translatable?

Most of the problems in old configs stem from specifying illogical things. Make
sure you don't have any duplicate entries. Do not rely on the order in which
files, directories, or links are created. Most configs should be translatable
without problems.

repository: kikisdeliveryservice/ign-converter

repo_name: kikisdeliveryservice/ign-converter


text:
# fastly.AclApi

All URIs are relative to *https://api.fastly.com*

Method | HTTP request | Description
------------- | ------------- | -------------
[**create_acl**](AclApi.md#create_acl) | **POST** /service/{service_id}/version/{version_id}/acl | Create a new ACL
[**delete_acl**](AclApi.md#delete_acl) | **DELETE** /service/{service_id}/version/{version_id}/acl/{acl_name} | Delete an ACL
[**get_acl**](AclApi.md#get_acl) | **GET** /service/{service_id}/version/{version_id}/acl/{acl_name} | Describe an ACL
[**list_acls**](AclApi.md#list_acls) | **GET** /service/{service_id}/version/{version_id}/acl | List ACLs
[**update_acl**](AclApi.md#update_acl) | **PUT** /service/{service_id}/version/{version_id}/acl/{acl_name} | Update an ACL

# **create_acl**
> AclResponse create_acl(service_id, version_id)

Create a new ACL

Create a new ACL attached to the specified service version. A new, empty ACL must be attached to a draft version of a service. The version associated with the ACL must be activated to be used.

### Example

* Api Key Authentication (token):

```python
import time
import fastly
from fastly.api import acl_api
from fastly.model.acl_response import AclResponse
from pprint import pprint
# Defining the host is optional and defaults to https://api.fastly.com
# See configuration.py for a list of all supported configuration parameters.
configuration = fastly.Configuration(
    host = "https://api.fastly.com"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: token
configuration.api_key['token'] = 'YOUR_API_KEY'

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['token'] = 'Bearer'

# Enter a context with an instance of the API client
with fastly.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = acl_api.AclApi(api_client)
    service_id = "SU1Z0isxPaozGVKXdv0eY" # str | Alphanumeric string identifying the service.
    version_id = 1 # int | Integer identifying a service version.
    name = "test-acl" # str | Name for the ACL. Must start with an alphanumeric character and contain only alphanumeric characters, underscores, and whitespace. (optional)

    # example passing only required values which don't have defaults set
    try:
        # Create a new ACL
        api_response = api_instance.create_acl(service_id, version_id)
        pprint(api_response)
    except fastly.ApiException as e:
        print("Exception when calling AclApi->create_acl: %s\n" % e)

    # example passing only required values which don't have defaults set
    # and optional values
    try:
        # Create a new ACL
        api_response = api_instance.create_acl(service_id, version_id, name=name)
        pprint(api_response)
    except fastly.ApiException as e:
        print("Exception when calling AclApi->create_acl: %s\n" % e)
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **service_id** | **str**| Alphanumeric string identifying the service. |
 **version_id** | **int**| Integer identifying a service version. |
 **name** | **str**| Name for the ACL. Must start with an alphanumeric character and contain only alphanumeric characters, underscores, and whitespace. | [optional]

### Return type

[**AclResponse**](AclResponse.md)

### Authorization

[token](../README.md#token)

### HTTP request headers

 - **Content-Type**: application/x-www-form-urlencoded
 - **Accept**: application/json

### HTTP response details

| Status code | Description | Response headers |
|-------------|-------------|------------------|
**200** | OK |  -  |

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

# **delete_acl**
> InlineResponse200 delete_acl(service_id, version_id, acl_name)

Delete an ACL

Delete an ACL from the specified service version. To remove an ACL from use, the ACL must be deleted from a draft version and the version without the ACL must be activated.

### Example

* Api Key Authentication (token):

```python
import time
import fastly
from fastly.api import acl_api
from fastly.model.inline_response200 import InlineResponse200
from pprint import pprint
# Defining the host is optional and defaults to https://api.fastly.com
# See configuration.py for a list of all supported configuration parameters.
configuration = fastly.Configuration(
    host = "https://api.fastly.com"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: token
configuration.api_key['token'] = 'YOUR_API_KEY'

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['token'] = 'Bearer'

# Enter a context with an instance of the API client
with fastly.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = acl_api.AclApi(api_client)
    service_id = "SU1Z0isxPaozGVKXdv0eY" # str | Alphanumeric string identifying the service.
    version_id = 1 # int | Integer identifying a service version.
    acl_name = "test-acl" # str | Name for the ACL. Must start with an alphanumeric character and contain only alphanumeric characters, underscores, and whitespace.

    # example passing only required values which don't have defaults set
    try:
        # Delete an ACL
        api_response = api_instance.delete_acl(service_id, version_id, acl_name)
        pprint(api_response)
    except fastly.ApiException as e:
        print("Exception when calling AclApi->delete_acl: %s\n" % e)
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **service_id** | **str**| Alphanumeric string identifying the service. |
 **version_id** | **int**| Integer identifying a service version. |
 **acl_name** | **str**| Name for the ACL. Must start with an alphanumeric character and contain only alphanumeric characters, underscores, and whitespace. |

### Return type

[**InlineResponse200**](InlineResponse200.md)

### Authorization

[token](../README.md#token)

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: application/json

### HTTP response details

| Status code | Description | Response headers |
|-------------|-------------|------------------|
**200** | OK |  -  |

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

# **get_acl**
> AclResponse get_acl(service_id, version_id, acl_name)

Describe an ACL

Retrieve a single ACL by name for the version and service.

### Example

* Api Key Authentication (token):

```python
import time
import fastly
from fastly.api import acl_api
from fastly.model.acl_response import AclResponse
from pprint import pprint
# Defining the host is optional and defaults to https://api.fastly.com
# See configuration.py for a list of all supported configuration parameters.
configuration = fastly.Configuration(
    host = "https://api.fastly.com"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: token
configuration.api_key['token'] = 'YOUR_API_KEY'

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['token'] = 'Bearer'

# Enter a context with an instance of the API client
with fastly.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = acl_api.AclApi(api_client)
    service_id = "SU1Z0isxPaozGVKXdv0eY" # str | Alphanumeric string identifying the service.
    version_id = 1 # int | Integer identifying a service version.
    acl_name = "test-acl" # str | Name for the ACL. Must start with an alphanumeric character and contain only alphanumeric characters, underscores, and whitespace.

    # example passing only required values which don't have defaults set
    try:
        # Describe an ACL
        api_response = api_instance.get_acl(service_id, version_id, acl_name)
        pprint(api_response)
    except fastly.ApiException as e:
        print("Exception when calling AclApi->get_acl: %s\n" % e)
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **service_id** | **str**| Alphanumeric string identifying the service. |
 **version_id** | **int**| Integer identifying a service version. |
 **acl_name** | **str**| Name for the ACL. Must start with an alphanumeric character and contain only alphanumeric characters, underscores, and whitespace. |

### Return type

[**AclResponse**](AclResponse.md)

### Authorization

[token](../README.md#token)

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: application/json

### HTTP response details

| Status code | Description | Response headers |
|-------------|-------------|------------------|
**200** | OK |  -  |

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

# **list_acls**
> [AclResponse] list_acls(service_id, version_id)

List ACLs

List ACLs.

### Example

* Api Key Authentication (token):

```python
import time
import fastly
from fastly.api import acl_api
from fastly.model.acl_response import AclResponse
from pprint import pprint
# Defining the host is optional and defaults to https://api.fastly.com
# See configuration.py for a list of all supported configuration parameters.
configuration = fastly.Configuration(
    host = "https://api.fastly.com"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: token
configuration.api_key['token'] = 'YOUR_API_KEY'

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['token'] = 'Bearer'

# Enter a context with an instance of the API client
with fastly.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = acl_api.AclApi(api_client)
    service_id = "SU1Z0isxPaozGVKXdv0eY" # str | Alphanumeric string identifying the service.
    version_id = 1 # int | Integer identifying a service version.

    # example passing only required values which don't have defaults set
    try:
        # List ACLs
        api_response = api_instance.list_acls(service_id, version_id)
        pprint(api_response)
    except fastly.ApiException as e:
        print("Exception when calling AclApi->list_acls: %s\n" % e)
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **service_id** | **str**| Alphanumeric string identifying the service. |
 **version_id** | **int**| Integer identifying a service version. |

### Return type

[**[AclResponse]**](AclResponse.md)

### Authorization

[token](../README.md#token)

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: application/json

### HTTP response details

| Status code | Description | Response headers |
|-------------|-------------|------------------|
**200** | OK |  -  |

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

# **update_acl**
> AclResponse update_acl(service_id, version_id, acl_name)

Update an ACL

Update an ACL for a particular service and version.

### Example

* Api Key Authentication (token):

```python
import time
import fastly
from fastly.api import acl_api
from fastly.model.acl_response import AclResponse
from pprint import pprint
# Defining the host is optional and defaults to https://api.fastly.com
# See configuration.py for a list of all supported configuration parameters.
configuration = fastly.Configuration(
    host = "https://api.fastly.com"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: token
configuration.api_key['token'] = 'YOUR_API_KEY'

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['token'] = 'Bearer'

# Enter a context with an instance of the API client
with fastly.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = acl_api.AclApi(api_client)
    service_id = "SU1Z0isxPaozGVKXdv0eY" # str | Alphanumeric string identifying the service.
    version_id = 1 # int | Integer identifying a service version.
    acl_name = "test-acl" # str | Name for the ACL. Must start with an alphanumeric character and contain only alphanumeric characters, underscores, and whitespace.
    name = "test-acl" # str | Name for the ACL. Must start with an alphanumeric character and contain only alphanumeric characters, underscores, and whitespace. (optional)

    # example passing only required values which don't have defaults set
    try:
        # Update an ACL
        api_response = api_instance.update_acl(service_id, version_id, acl_name)
        pprint(api_response)
    except fastly.ApiException as e:
        print("Exception when calling AclApi->update_acl: %s\n" % e)

    # example passing only required values which don't have defaults set
    # and optional values
    try:
        # Update an ACL
        api_response = api_instance.update_acl(service_id, version_id, acl_name, name=name)
        pprint(api_response)
    except fastly.ApiException as e:
        print("Exception when calling AclApi->update_acl: %s\n" % e)
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **service_id** | **str**| Alphanumeric string identifying the service. |
 **version_id** | **int**| Integer identifying a service version. |
 **acl_name** | **str**| Name for the ACL. Must start with an alphanumeric character and contain only alphanumeric characters, underscores, and whitespace. |
 **name** | **str**| Name for the ACL. Must start with an alphanumeric character and contain only alphanumeric characters, underscores, and whitespace. | [optional]

### Return type

[**AclResponse**](AclResponse.md)

### Authorization

[token](../README.md#token)

### HTTP request headers

 - **Content-Type**: application/x-www-form-urlencoded
 - **Accept**: application/json

### HTTP response details

| Status code | Description | Response headers |
|-------------|-------------|------------------|
**200** | OK |  -  |

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

repository: fastly/fastly-py

repo_name: fastly/fastly-py


text:
---
layout: mypost
title: (SIG19)Dynamic Graph CNN for Learning on Point Clouds
categories: [PaperNote]
---

# (SIG19)Dynamic Graph CNN for Learning on Point Clouds

## 1  Contributions

- We present **a novel operation** for learning from point clouds, ==**EdgeConv**==, to **better capture local geometric features** of point clouds **while** still **maintaining permutation invariance**.
- We show the model can **learn to semantically group points** by ==**dynamically updating a graph of relationships**== from layer to layer.
- We demonstrate that **EdgeConv can be integrated into multiple existing pipelines** for point cloud processing.
- We present extensive analysis and testing of EdgeConv and show that it **achieves state-of-the-art performance** on benchmark datasets.

## 2  Method

### 2.1 Overview

本文最大创新点就是==**EdgeConv**==和==**dynamically updating a graph of relationships**== 。

1. We propose an approach inspired by PointNet and convolution operations. Instead of working on individual points like PointNet, however, we **exploit local geometric structures** by **constructing a local neighborhood graph** and **applying convolution-like operations on the edges connecting neighboring pairs of points**, in the spirit of graph neural networks. We show in the following that such an operation, dubbed edge convolution (EdgeConv), has properties lying between **translation-invariance** and **nonlocality**.

   ![image-20200921174936257]((SIG19)Dynamic Graph CNN for Learning on Point Clouds_chengdehan.assets/image-20200921174936257.png)

   Fig. 2. Left: Computing an edge feature, $e_{ij}$(top), from a point pair,  $x_{i}$and $x_{j}$(bottom). In this example,  $h_{\varTheta}()$ is instantiated using a fully connected layer, and the learnable parameters are its associated weights. Right: The **EdgeConv** operation. The output of EdgeConv is calculated by aggregating the edge features associated with all the edges emanating from each connected vertex.

2. Unlike graph CNNs, our **graph** is **not fixed** but rather is **dynamically updated after each layer of the network**. That is, the set of k-nearest neighbors of a point changes from layer to layer of the network and is computed from the sequence of embeddings. ==**Proximity in feature space** differs from **proximity in the input**, **leading to nonlocal diffusion** of information throughout the point cloud.==

Fig. 4. Structure of the feature spaces produced at different stages of our shape classification neural network architecture, visualized as the distance between the red point to the rest of the points. For each set, **Left:** **Euclidean distance** in the input $\Bbb{R}^{ 3}$space; **Middle:** Distance after **the point cloud transform stage**, amounting to a global transformation of the shape; **Right:** Distance in the **feature space** of the last layer. Observe how in the feature space of deeper layers semantically similar structures such as shelves of a bookshelf or legs of a table are brought close together, although they are distant in the original space.

![image-20200921194542430]((SIG19)Dynamic Graph CNN for Learning on Point Clouds_chengdehan.assets/image-20200921194542430.png)

Fig. 3. Model architectures: The model architectures used for **classification (top branch)** and **segmentation (bottom branch)**.

### 2.2  Edge Convolution

Consider an F-dimensional point cloud with n points, denoted by $X = \{\textbf{x}_{1}, . . . , \textbf{x}_{n}\} ⊆ \Bbb{R}^{F}$ . In the simplest setting of F = 3, each point contains 3D coordinates $\textbf{x}_{i}=\{x_{i},y_{i},z_{i}\}$;

![image-20200921174936257]((SIG19)Dynamic Graph CNN for Learning on Point Clouds_chengdehan.assets/image-20200921174936257.png)

Fig. 2. Left: Computing an edge feature, $e_{ij}$(top), from a point pair,  $x_{i}$and $x_{j}$(bottom). In this example,  $h_{\varTheta}()$ is instantiated using a fully connected layer, and the learnable parameters are its associated weights. Right: The **EdgeConv** operation. The output of EdgeConv is calculated by aggregating the edge features associated with all the edges emanating from each connected vertex.

**EdgeConv** 模块的具体步骤：

1. 首先，以$n\times f$ 的一个张量作为该模块的输入。

2. 一个直接的图为 $\cal{G}=\{\cal{V},\cal{E}\}$, $\cal{V}=\{1,...,n\}$为图结构中的顶点，$\cal{E}\subseteq \cal{V} \times \cal{V}$ 为相应的边。 在$X = \{\textbf{x}_{1}, . . . , \textbf{x}_{n}\} ⊆ \Bbb{R}^{F}$ 中，对每个点使用 k-nearest neighbor (k-NN)创建 $\cal{G}$ 。对点$\textbf{x}_{i}$，构建的相应图的边以$(i,j_{i_{1}}),(i,j_{i_{2}}),...,(i,j_{i_{k}})$来进行组织，使其$\textbf{x}_{j_{i_{1}}},\textbf{x}_{j_{i_{2}}},...,\textbf{x}_{j_{i_{k}}}$ 刚好为离$\textbf{x}_{i}$逐近到远的点。

3. 对于每个点，融合一个局部特征, $（\textbf{x}_{i},\textbf{x}_{i}-\textbf{x}_{j_{i_{1}}}）,（\textbf{x}_{i},\textbf{x}_{i}-\textbf{x}_{j_{i_{2}}}）,...,（\textbf{x}_{i},\textbf{x}_{i}-\textbf{x}_{j_{i_{k}}}）$. This explicitly **combines global shape** **structure**, captured by the coordinates of the patch centers $\textbf{x}_{i}$ , **with local neighborhood informatio**n, captured by $\textbf{x}_{i}-\textbf{x}_{j_{i_{k}}}$. 然后根据 $（\textbf{x}_{i},\textbf{x}_{i}-\textbf{x}_{j_{i_{1}}}）,（\textbf{x}_{i},\textbf{x}_{i}-\textbf{x}_{j_{i_{2}}}）,...,（\textbf{x}_{i},\textbf{x}_{i}-\textbf{x}_{j_{i_{k}}}）$通过MLP层，学习到相应的edge features $e_{ij}$（$a_{n}$维的特征） 。

4. 对于以上得到的对于点$\textbf{x}_{i}$的 k 个edge features $e_{ij}$ （$a_{n}$维的特征），使用一个max 操作，输出一个pooling后的 feature。

5. 如此，通过该层之后输入的为一个$n \times f$ 的一个特征，输出的便是一个融合了局部信息和非局部信息（在特征空间进行EdgeConv体现）的特征$n \times a_{n}$。

### 2.3  Dynamic Graph Update

==Our experiments suggest that **it is beneficial to recompute the graph** **using nearest neighbors in the feature space** produced by each layer.== This is a crucial distinction of our method from graph CNNs working on a fixed input graph. Such a dynamic graph update is the reason for the name of our architecture, the Dynamic Graph CNN (DGCNN). ==**With dynamic graph updates**, **the receptive field is as large as the diameter of the point cloud**, **while being sparse**.==

Fig. 4. Structure of the feature spaces produced at different stages of our shape classification neural network architecture, visualized as **the distance between the red point to the rest of the points**. For each set, **Left**: **Euclidean distance** in the input R3 space; **Middle:** Distance after the point cloud **transform stage**, amounting to a global transformation of the shape; **Right:** Distance in the **feature space** of the **last layer**. Observe how in the feature space of deeper layers semantically similar structures such as shelves of a bookshelf or legs of a table are brought close together, although they are distant in the original space.

### 2.4  Properties

- **Permutation Invariance.**

- **Translation Invariance.**

## 3  Classification

![image-20200921215037583]((SIG19)Dynamic Graph CNN for Learning on Point Clouds_chengdehan.assets/image-20200921215037583.png)

![image-20200921215614581]((SIG19)Dynamic Graph CNN for Learning on Point Clouds_chengdehan.assets/image-20200921215614581.png)

## 4  Part Segmentation

![image-20200921220154959]((SIG19)Dynamic Graph CNN for Learning on Point Clouds_chengdehan.assets/image-20200921220154959.png)

## 5 Indoor Scene Segmentation

![image-20200921220458872]((SIG19)Dynamic Graph CNN for Learning on Point Clouds_chengdehan.assets/image-20200921220458872.png)

url: https://raw.githubusercontent.com/ChengdeHan/ChengdeHan.github.io/7a692d685500d3046013fcf33153cd1e3cc03899/_posts/2020-10-06-(SIG19)Dynamic Graph CNN for Learning on Point Clouds_chengdehan.md


text:
---
layout: post
title: Startup competitors - Data Viewer
date: 2017-01-17 01:55:27.000000000 +00:00
categories: []
categories: [sdv, startup]
permalink: "/2017/01/17/startup-competitors-data-viewer/"
---

If you follow my ramblings you might know that I've revived my interest in
creating a commercial tool to help devs, dbas etc browse their sql databases.
I've done some research before and didn't find much on a par with what I have
in mind. I've done a bit more, and turned up a couple:

*   [A feature of sql
    workbench](http://www.sql-workbench.net/fk_lookup_png.html) - I've seen the
    product but didn't know it could do that. Not directly competition as it's
    not nearly as smooth to use as what I'm building for this particular use
    case.
*   [SqlSmash](http://www.sqlsmash.com/) - Something I'd not seen before, which
    has [fk based navigation (vid)](https://youtu.be/Z0kdqcrYHdo?t=1m14s)
    that's basically what I'm building, albeit embedded in SSMS rather than
    standalone.

This isn't the first time I've had the experience of getting started before
discovering another product that basically solves the problem I'm gunning for.
([Ready-roll](http://www.red-gate.com/products/sql-development/readyroll/) was
the last, since bought by red-gate).

Now it's not that I thought my idea was magic or special or a unique little
flower, but why is it after working with SQL Server databases for 15 years that
I've only just noticed this tool (which I would have found useful and probably
would have paid for).

If I created another would it be just as obscure? Should I still go ahead even
though it's a solved problem? Are there any ideas left on the earth?

Something for me to consider this week. I might update this post with further
thoughts. Your thoughts are welcome.

---

* You might also like this post: [Database tools I was surprised
  existed](/2019/06/10/database-tools-you-didnt-know-about/)
* I did end up building it, and it became <https://schemaexplorer.io/>

gha_language: SCSS

gha_license_id: NOASSERTION


text:
---
layout: post
title: "Hacking My Life: Day 5 - Arch to the Rescue"
date: 2014-12-29 20:22:20 -0500
comments: true
categories:
---
So I wasn't successful in switching to E3. I'm still curious about it and will probably try again, but I had a full sleep and loved it. I will need to figure out how it'll affect my work.

Anyways, today's post is about a dilemma I found myself in earlier today. I <strike>had</strike> wanted to reinstall my Arch Linux install to get a fresh start, so I booted into Arch via DriveDroid and proceeded to (try) to reinstall it. Immediately after wiping it I realized I didn't have an internet connection...
<!-- more -->

So this was quite a pickle. In an installed copy, I can simply compile and install the wireless drivers and be up and running, but you can't exactly do that with a live install because it won't survive a reboot. So... what to do?

SIDENOTE AND BORING DISCLAIMER: I'm going to be doing some dangerous stuff in this post, so please be careful and proceed at your own risk.

So, what do we do? Simple. Start -> "Disk Management" -> find your disk and see what it's labelled as. Mine is "Disk 0".

Change to the directory you've got VirtualBox installed in:

cd "C:\Program Files\Oracle\VirtualBox"

Now that we know what VirtualBox will see the disk as, we can use it at the end of our command.

VBoxManage internalcommands createrawvmdk -filename C:\Users\wings\archredirect.vmdk -rawdisk \\.\PhysicalDrive0

Hopefully you'll get a message like this: "RAW host disk access VMDK file C:\Users\wings\archredirect.vmdk created successfully."

Open VirtualBox **as an Administrator** and create a new VM. Call it "Arch" - the name doesn't matter since we'll delete it afterwards, but that tells VirtualBox it's an Arch-64 box.

Follow the wizard until it asks for a disk. Select "Use an existing virtual hard drive file" and point it at your VMDK. Follow the rest of the wizard and assign your Arch Linux ISO to it.

Start the VM and follow the install process.  Magic!

extension: markdown


text:
# Cool

[![CI Status](https://img.shields.io/travis/Daniel Peter/Cool.svg?style=flat)](https://travis-ci.org/Daniel Peter/Cool)
[![Version](https://img.shields.io/cocoapods/v/Cool.svg?style=flat)](https://cocoapods.org/pods/Cool)
[![License](https://img.shields.io/cocoapods/l/Cool.svg?style=flat)](https://cocoapods.org/pods/Cool)
[![Platform](https://img.shields.io/cocoapods/p/Cool.svg?style=flat)](https://cocoapods.org/pods/Cool)

## Example

To run the example project, clone the repo, and run `pod install` from the Example directory first.

## Requirements

## Installation

Cool is available through [CocoaPods](https://cocoapods.org). To install
it, simply add the following line to your Podfile:

```ruby
pod 'Cool'
```

## Author

Daniel Peter<EMAIL_ADDRESS>
## License

Cool is available under the MIT license. See the LICENSE file for more info.


text:
# Samples for the AWS SDK for PHP

This is a small handful of samples that should be ready-to-run. For more tutorials, screencasts and other
educational materials, check out the [PHP Developer Center](http://aws.amazon.com/php) to learn more.

If a file begins with:

* `html` -- You should run this in a web browser because it outputs HTML.
* `cli` -- You can run this on the command line (via `php <filename>`) OR in a web browser.


text:
# Graceful Shutdown Test

This test ensures that proxies will be shutdown gracefully.

This is measured by sending many long lasting requests.

When the server is redeployed, traffic should gracefully transition to the new deployment - connections should not be dropped.

repository: DalavanCloud/tools

repo_name: DalavanCloud/tools


text:
[![Stories in Ready](https://badge.waffle.io/pavog/MySimpleHelp.png?label=ready&title=Ready)](https://waffle.io/pavog/MySimpleHelp)
![MySimpleHelp](https://github.com/pavog/MySimpleHelp/blob/master/logo.png)
=========

MySimpleHelp
-------------------------------------------------
This Spigot plugin provides an easy way to display custom help messages to your users.
It's fully configurable, plug and play ready and easy to use.

[Visit on Spigot](https://www.spigotmc.org/resources/mysimplehelp.27781/ "MySimpleHelp - Spigot")

# Features
- Configure the main command /<command> (e.g. /help)
- Configure the command aliases
- Configure the permission for the command
- Configure the command description (used in command lists)
- Configure the command usage (used in command lists)

# Usage

## Install the plugin
- Open your server folder
- Open your plugins folder
- Drag and drop the plugin
- Start or reload your server to activate the plugin
- Edit the config.yml file
- Stop and start your server or reload your server
- Log into your server via minecraft and try the plugin by executing the command configured in the config.yml

## Config file
During setup the configuration file (config.yml) will be created for you (in /plugins/MySimpleHelp/config.yml):

The config file and the variables are explained in the file.

## Commands and permissions
- **Configurable**

# License
The MIT License (MIT)

Copyright (c) 2016 Paul Vogel

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

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

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

repository: pavog/MySimpleHelp

gha_language: Java

repo_name: pavog/MySimpleHelp


text:
# a11y-report [![Build Status](https://travis-ci.org/danielhusar/a11y-report.svg?branch=master)](https://travis-ci.org/danielhusar/a11y-report)
> Run accessibility report on the provided urls via [axe-core](https://github.com/dequelabs/axe-core)

## How it works
Using [puppeeter](https://github.com/GoogleChrome/puppeteer) we run axe-core on all provided urls and collect all violations.

Make sure you have at least axe-core ^3.0.0 loaded in your urls or provide axe url to be automatically injected for you.

![screenshot.png](screenshot.png)

## Install

```sh
yarn add --dev @daniel.husar/a11y-report
```
or
```sh
npm install --dev @daniel.husar/a11y-report
```

## Usage

```js
import a11yReport from<EMAIL_ADDRESS>
(async () => {
  const report = await a11yReport({
    urls: ['http://localhost:9001/index.html'],
    axeUrl: 'https://cdnjs.cloudflare.com/ajax/libs/axe-core/3.2.2/axe.min.js'
  });
})();
```

## API

### a11yReport(config)

Prints accessibility report with logger function and returns counts of passes, failures and warnings.

#### config

| Property                  | Type        | Default                   | Description                                                                                |
| :------------------------ | :---------- | :-----------------------  | :---------- |
| `urls`                    | `string[]`  | `[]`                      | Array of urls to run report on. |
| `delay`                   | `number`    | `100`                     | Delay to wait for `axe-core` to be executed. |
| `axeUrl`                  | `string`    | `undefined`               | Every page needs axe-core script to be loaded. If your pages don't load axe-core, you can provide axe-core url to be injected. |
| `ignoreViolations`        | `string[]`  | `[]`                      | Global array of all violations that should be ignored. |
| `ignoreViolationsForUrls` | `{}`        | `[]`                      | Mappings of violations per url to ignore. Example: `{ 'http://localhost:9001/index.html': ['Violation to ignore'] }` |
| `errorTags`               | `string[]`  | `['wcag2a', 'wcag2aa', 'wcag21aa']` | Array of [tags](https://www.deque.com/axe/axe-for-web/documentation/api-documentation/#parameters) which would consider violation as error. |
| `reporter`                | `default`   | `simple∣default`          | Which reporter to use. |
| `logger`                  | `function`  | `console.log`             | Logger function to use. |
| `axe`                     | `{}`        |                           | [Axe-core](https://github.com/dequelabs/axe-core) config. |
| `axe.context`             | `{}`        | `element: { include: ['html'] }` | [Context parameter](https://github.com/dequelabs/axe-core/blob/develop/doc/API.md#context-parameter). |
| `axe.options`             | `{}`        | `{}` | [Axe-core options parameter](https://github.com/dequelabs/axe-core/blob/develop/doc/API.md#options-parameter). |

## Related
[a11y-static-report](https://github.com/danielhusar/a11y-static-report)

## License
MIT


text:
### [CVE-2019-13066](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-13066)
![](https://img.shields.io/static/v1?label=Product&message=n%2Fa&color=blue)
![](https://img.shields.io/static/v1?label=Version&message=n%2Fa&color=blue)
![](https://img.shields.io/static/v1?label=Vulnerability&message=n%2Fa&color=brighgreen)

### Description

Sahi Pro 8.0.0 has a script manager arena located at _s_/dyn/pro/DBReports with many different areas that are vulnerable to reflected XSS, by updating a script's Script Name, Suite Name, Base URL, Android, iOS, Scripts Run, Origin Machine, or Comment field. The sql parameter can be used to trigger reflected XSS.

### POC

#### Reference
- https://packetstormsecurity.com/files/154985/Sahi-Pro-8.x-Cross-Site-Scripting.html

#### Github
No PoCs found on GitHub currently.

repository: trickest/cve

gha_language: HTML

repo_name: trickest/cve


text:
# Jobs for Novaks

I am, $deity willing, going to graduate from grad school soon, with a Ph.D. in bioinformatics. I am looking for jobs in this field.

Here is a list of companies I might want to work at. Some of these won't work geographically with where I want to live, but they're the *sorts* of companies I want to work at. If you work at companies like this, you should definitely hire me.

* [Desktop Genetics](https://www.deskgen.com/landing/company#about-careers) is building a fancy CRISPR CAD system, or, as they put it, "building an AI to re-engineer the human genome".
* [Caribou Biosciences](http://cariboubio.com/careers) apparently owns CRISPR?
* [GenePeeks](https://www.genepeeks.com/careers/) takes genomic data from two people and tries to predict the risk that their child might have of being conceived with any of a number of genetic diseases.
* [Ginkgo Bioworks](http://www.ginkgobioworks.com/careers/) engineers better organisms for biosynthesis.
* [Dovetail Genomics](https://dovetailgenomics.com/company/careers/) has a cool distantly-paired-read technology that presents interesting bioinformatics challenges.
* [Helix](https://www.helix.com/careers/) is hiring lots of people to do some kind of personal genomics thing.
* [Twist](https://www.twistbioscience.com/careers/) makes oligos on silicon somehow.
* I know a guy at [DNANexus](https://www.dnanexus.com/careers) where they do data analysis on cloud infrastructure.
* I know a lady at [Agilent](http://careers.agilent.com/) where they make microarrays.
* These startup people have a [whole list of companies](https://angel.co/bioinformatics).
* I could also work for some kind of as-yet-nonexistent biohacker cooperative.


text:
## The `blob` contract

The `blob` contract is one of 4 [core contracts](coresc.md) on each ISCP chain.

Function of the `blob` contract is to maintain on-chain registry of _blobs_, the binary data.
The _blobs_ are referenced from smart contracts via their hashes.

A _blob_ is a collection of named pieces of arbitrary binary data:
```
    <fieldName1> : <binaryChunk1>
    <fieldName2> : <binaryChunk2>
    ...
    <fieldNameN> : <binaryChunkN>
```

Here the `fieldNameK` is arbitrary binary array used as a name of the `binaryChunkK`.
Usually `fieldNameK` is not long. Its interpretation is use-case specific.

The `binaryChunkK` may be of arbitrary size (practical limits apply, of course).

The order of field-chunk pairs is essential.

The hash of the _blob_ is equal to the hash of concatenation of all pieces:
```
    blobHash = hash( fieldName1 || binaryChunk1 || fieldName2 || binaryChunk2 || ... || fieldNameN || binaryChunkN)
```

There are two predefined field name which are interpreted by the VM while deploying smart contracts from binary:

- _fieldname_ = `"v"` is interpreted as _VM type_
- _fieldname_ = `"p"` is interpreted as _smart contract program binary_

If the field `"v"` is equal the string `"wasmtimevm"`, the binary chunk of `"p""` is interpreted as WebAssembly binary,
loadable to the _Wasmtime_ wasm interpreter.

Another use_case for the _blob_ may be full collection of self described immutable data of the smart contract program:
```
    "v" : VM type
    "p" : smart contract program binary
    "d" : data schema for data exchange between smart contract and outside sources and consumers
    "s" : program sources in .zip format
```

### Entry points

There's only on entry point, which allows to submit _blob_ to the smart contract:

* **storeBlob**. In the current implementation the data of the _blob_ is passed as parameters of the call
to the entry point. It may be practically impossible to submit very large _blobs_ to the chain. In the future
we plan to implement special mechanism which allows for the nodes to download big data chunks as part of the
committee consensus.

### Views

* **getBlobInfo** view returns information about fields of the blob with specific hash and sizes of data chunks:
```
    <fieldName1>: <size of the dataChunk1>
    ...
    <fieldNameN>: <size of the dataChunkN>
```

* **getBlobField** view allows to download data chunk of the field of particular _blob_

* **listBlobs** view returns list of pairs `blob hash`: `total size of chunks` for all blobs in the registry

gha_language: Go