text:
# CHANGELOG

## v5.3.0 (2023-07-28)

- Maps 400 status codes to new `BadRequestError` class

## v5.2.0 (2023-07-12)

- Adds `Hooks` to introspect HTTP requests and responses (see `HTTP Hooks` section of README for more details)
- Adds `TaxIdExpirationDate` to `EasyPost.Models.API.Options` for `Shipment` creation

## v5.1.0 (2023-06-06)

- Carrier Metadata is now in GA, accessible via `myClient.CarrierMetadata`
  - `myClient.Beta.CarrierMetadata` is now deprecated and will be removed in a future release
  - Method to retrieve carrier metadata has been renamed: `myClient.Beta.CarrierMetadata.RetrieveCarrierMetadata` is now `myClient.CarrierMetadata.Retrieve`
- Constructors for all response objects (e.g. `EasyPost.Models.API.Address`) are publicly available for end-users to construct their own objects for testing purposes.

## v5.0.0 (2023-05-15)

### Breaking Changes

- All API-calling functions on models have been moved to their respective services. For example, `myPickup.Buy()` is now `myClient.Pickup.Buy(myPickup.Id)`.
- `Client` constructor now takes a `ClientConfiguration` object rather than a list of parameters.
  - `Client myClient = new Client("my_api_key");` is now `Client myClient = new Client(new ClientConfiguration("my_api_key"));`
- `Smartrate` is now `SmartRate`
- `myClient.Clone` functionality has been removed. Please construct a new `Client` object instead.
- RestSharp dependency has been dropped entirely.
- Renamed `UnexpectedHttpError` exception type to `UnknownHttpError` to better reflect its purpose.
- Removed `UnknownApiError` exception type, consolidated into `UnknownHttpError` exception type.
- `ExternalApiError` no longer inherits from `ApiError` (`ApiError` reserved for EasyPost API errors only).
- All `EasyPostError` exceptions and subclasses now have a `PrettyPrint` getter that returns a human-readable string representation of the error.
  - Previously, only `ApiError` exceptions had this. Now, all exceptions thrown by the library should have this.
- Logic for calculating exception type to throw based on API error
  - EasyPost API failures can trigger a variety of specific exceptions, all inheriting from `ApiError`.
  - Non-EasyPost API/HTTP failures will trigger an `ExternalApiError` exception.

### New Features

- [Parameter sets](#v450-2023-03-22) are out of beta. Users can use access them via `EasyPost.Parameters` namespace.
  - Previous plural namespaces are now singular (eg: `Parameters.Addresses` is now `Parameters.Address`)
- All API-calling functions accept an optional `CancellationToken` parameter that can be used to cancel the request.
- Reintroduce `GenerateForm` function for shipments that was accidentally removed in `v4`.
- All `EasyPostClient`-based classes, all `EasyPostService`-based classes, `ClientConfiguration` and internal request classes are now explicitly disposable.

### Miscellaneous

- Add missing `Declaration` parameter to Customs Info creation parameter set
- Handle API timeout errors more gracefully (produce proper `TimeoutError` exception with readable messages)
- `myClient.Webhook.Update` function now has an optional `Parameters.Webhook.Update` parameter (rather than required)
- All aspects of the library have been documented with XML comments

## v4.6.0 (2023-04-18)

- Adds `GetNextPage` function to each service which retrieves the next page of a collection when the `has_more` key is present in the response (eg: `Client.Address.GetNextPage(addressCollection)`)
- Adds `RetrieveCarrierMetadata` via `myClient.Beta.CarrierMetadata`
- Fixes the type of `RequestBody` from Dictionary to String in Payload class
- Fixes a deserialization bug when an error.message from the API was returned as an object instead of a string

## v4.5.0 (2023-03-22)

- Adds new `Parameters` namespace and objects, allowing you to create the paramaters of any CRUD request without needing to build the dictionaries manually. See the README for more details
- Adds missing `StatusDetail` property to `Tracker` and `TrackingDetail` classes
- Adds missing `Fee` property to `Insurance` class
- Removes the `Client` property of a `Collection`

## v4.4.0 (2023-02-17)

- Added new beta `RateService`, accessible via `myClient.Beta.Rate`
- Added `RetrieveStatelessRate` function under beta `RateService` to pull stateless rates when shipment data is provided
- Added `GetLowestStatelessRate` function under `Utilities.Rate` to filter the lowest stateless rate
- Added new `GetLowest` instance functions, callable on `List<Rate>`, `List<Smartrate>` and `List<StatelessRate>`, to
  filter the lowest rate
- Deprecated rate and smartrate filtering methods in `ShipmentService`, `RateService` and `Calculation.Rates` namespaces, moved to `Utilities.Rate` namespace
- Fixes Strong-Name signing that was unintentionally removed in v4.1.0 (this package is now strong-name signed once again)

## v4.3.0 (2023-01-18)

- Added payload functions `RetrieveAllPayloadsForEvent` and `RetrievePayloadForEvent` methods, accessible via `myClient.Event` service.
- Added function to retrieve all pickups via `myClient.Pickup.All()`

## v4.2.0 (2023-01-11)

- Added new beta billing functionality for referral customer users, accessible via `myClient.Beta.Referral` service
  - `AddPaymentMethod` to add an existing Stripe bank account or credit card to your EasyPost account
  - `RefundByAmount` refunds you wallet balance by a specified amount
  - `RefundByPaymentLog` refunds you wallet balance by a specified payment log
- Added new `DeliveryMaxDatetime` Shipment option

## v4.1.0 (2022-12-07)

- Routes requests for creating a carrier account with a custom workflow (eg: FedEx, UPS) to the correct endpoint when using the `Create` function
- `Constants` are now stored in `EasyPost.Constants` instead of `EasyPost.Exceptions.Constants`
- Fixed a typo in `/charges` endpoint that was causing bank and credit card charge requests to fail

## v4.0.2 (2022-11-01)

- Fix bug where the temporary internal API key switch when adding a credit card to a referral user was not reverted after the request.
  - After adding a credit card to a referral user, the existing Client would be misconfigured for following requests.

## v4.0.1 (2022-10-24)

- `myInsurance.Refresh()` function HTTP method fixed from `PATCH` to `GET`
  - This function has been marked as obsolete and will be removed in a future release
- Fix return type of `order.Buy()` when passing in a rate. Function will now return the updated order.
- Fix bug where request time limits were not being copied to a cloned Client.
- Fix bug where hashcode of any `EasyPostObject` or subtype was not consistent.
  - Hashcode and equality now consider properties of the object, including Client. Different properties and/or different Clients will result in different hashcodes and objects will not be considered equal.
- Fix bug where the wrong `SmartrateAccuracy` would be chosen
  - `Percentile75` might accidentally have been chosen rather than `Percentile85` due to a bug in the `SmartrateAccuracy` enum ID.
- Fix bug where some embedded elements (e.g. customs items) were not being created if included during a larger creation request (e.g. customs info create).
- Prevent users from attempting to buy a shipment with a `null` rate, avoiding a `NullReferenceException`.

## v4.0.0 (2022-10-12)

The `v4.0.0` release includes all the changes from the release candidate (see `v4.0.0-rc1` below) as well as the following items:

- Improved API error parsing
  - API error message may be an array rather than a string. Arrays will be concatenated (by comma) and returned as a string.
- Capture 1xx and 3xx HTTP status codes as errors
  - Any known 3xx status code from the EasyPost API will throw a `RedirectError` exception
  - Any unknown 3xx status code will throw a `UnexpectedHttpError` exception
  - Any 1xx status code (known or unknown) will throw a `UnexpectedHttpError` exception

## v4.0.0-rc1 (2022-09-26)

### Breaking Changes & New Features

- Library is now thread-safe
  - Initialize a `Client` object with an API key
  - Static methods (i.e. `create`, `retrieve`, retrieve `all` of a resource) exist in services, accessed via property of the client (e.g. `myClient.Address.Create()`)
  - Instance methods (i.e. `update`, `delete`) accessed on instance of a resource (i.e. `myShipment.Update()`)
- All properties are now title-cased rather than snake-cased to match standard .NET naming conventions
  - e.g. `myShipment.id` is now `myShipment.Id`, `myAddress.federal_tax_id` is now `myAddress.FederalTaxId`, `myTrackerCollection.has_more` is now `myTrackerCollection.HasMore`
  - Some properties have been renamed to avoid naming conflicts:
    - `Rate.rate` is now `Rate.Price`
    - `Message.message` is now `Message.Text`
- All properties are now nullable
  - Almost all properties will be assigned a value during JSON deserialization. This is mostly to address compiler warnings
  - Users can proceed with the assumption that any given property will not be null
- Consistent exception handling
  - All exceptions inherit from `EasyPostError`
  - API-related and HTTP-related exceptions will throw an `ApiError` or inherited-type exception
  - API exception types can be retrieved by HTTP status code via the `EasyPost.Exceptions.Constants` class (i.e. to anticipate what error will be thrown for a 404, etc.)
  - Common exception messages and templates can be found in the `EasyPost.Exceptions.Constants` class (i.e. for log parsing)
- Source code files have been organized
  - Most EasyPost-related objects (i.e. `Shipment`, `Address`, `Tracker`, etc.) are now in the `EasyPost.Model.API` namespace
- Dependencies updated to latest versions, including `RestSharp` v108

### Misc

- Under the hood improvements:
  - Underlying `Request`-`Client`-`ClientConfiguration` relationship has been re-architected to allow for thread safety
  - Process of generating an API request has been standardized and simplified
  - Improved accessibility levels of internal functions, to prevent accidental use by end users
  - Files have been organized into a more logical structure
  - Methods and properties have been organized (e.g. methods ordered by CRUD, properties ordered alphabetically)

## v3.6.1 (2022-09-22)

- Adds missing `dropoff_max_datetime` and `pickup_max_datetime` Shipment options

## v3.6.0 (2022-09-21)

- Adds `end_shipper_id` shipment option
- Adds support to pass an EndShipper ID when buying a shipment
- Add Partner White Label support:
  - Create a referral customer
  - Update a referral customer's email address
  - List all referral customers
  - Add a credit card to a referral customer's account

## v3.5.0 (2022-08-25)

- Adds `ValidateWebhook` function
- Adds `duty_payment` shipment option
- Moves `EndShipper` out of beta to the general namespace

## v3.4.0 (2022-08-02)

- Adds Carbon Offset support
  - Adds the ability to create a shipment with carbon offset
  - Adds the ability to buy a shipment with carbon offset
  - Adds the ability to one-call-buy a shipment with carbon offset
  - Adds the ability to re-rate a shipment with carbon offset
- Removes the unusable `carrier` param from the `verify` function on an Address

## v3.3.0 (2022-07-18)

- Adds ability to generate shipment forms via `GenerateForm` function

## v3.2.0 (2022-07-11)

- Adds `DeletePaymentMethod`, `FundWallet`, and `RetrievePaymentMethods` functions
- Adds `billing_type` attribute in CarrierAccount and Rate classes
- Adds support for webhook secrets
- Collect OS details in User-Agent header
- Update functions now use `patch` instead of `put` under the hood to better match the API behavior and documentation. Behavior of these functions should remain the same

## v3.1.0 (2022-05-19)

- Adds the `EndShipper` class with the ability to create, retrieve, and update EndShipper objects
- Requests will now fail fast with an error if an API key is not provided instead of making a live API call with no key.

## v3.0.0

Upgrading major versions of this project? Refer to the [Upgrade Guide](UPGRADE_GUIDE.md).

### Breaking Changes

- Dropped explicit support for .NET Framework, replaced with .NET Standard 2.0
- Upgrades RestSharp from v106 to v107
- Project was built with C# 8.0
- Project is now entirely asynchronous which will require the addition of async/await on function calls
- Renames methods from `List()` to `All()` to make our library consistent (previously we had methods calling the `/all` endpoint with both names)
- Removes the unusable `Rating` class
- Removes `shipment.GetRates()` method since the shipment object already has rates. If you need to get new rates for a shipment, please use the `shipment.RegenerateRates()` method.
- Must use `verify` and `verify_strict` parameters to verify addresses during creation, per our API docs; `verification` and `strict_verification` will no longer work
- Clarify XList vs XCollection distinction:
  - `ReportList`, `ScanFormList`, `ShipmentList` and `TrackerList` renamed to `ReportCollection`, `ScanFormCollection`, `ShipmentCollection` and `TrackerCollection` to match the other names throughout the project
- Functions previously called `Destroy` are now called `Delete` for consistency (eg: deleting a carrier account)
- Removes non-static `Create()` functions on `Address`, `Order`, `Pickup` and `Shipment` classes for Visual Basic compatibility.

### Features

- Adds explicit support for .NET 5.0 & 6.0
- Adds F# & Visual Basic compatibility
- Adds `RetrieveMe()` which retrieves the authenticated user without the need to pass an ID
- Adds missing `billing_ref` and `dropoff_type` Shipment options
- Adds comprehensive test suite for .NET/.NET Core
- Adds `declaration` attribute to `CustomsInfo` class
- Adds missing `id` property to the `Brand` class
- Adds option to pass in a custom `HttpClient` to the Client constructor (.NET/.NET Core only)
- Adds `CreateAndBuy` function to the Batch class

### Bug Fixes

- Fixes bug where `AddressCollection` was storing `Batch` objects rather than `Address` objects
- Fixes Address creation respecting `verify` and `verify_strict` parameters
- Fixes a bug where Pickup error messages were not deserializing properly

## v2.8.1 (2022-02-17)

- Repackaged the project which contains all the changes made from `2.6.0` - `2.8.0` (see details below)
- Added .NET Core 3.1 to the released package (was previously built but not included starting in `2.6.0`)

**This release includes changes intended for v2.8.0**

- Adds the missing Insurance object and associated actions (closes #47)
- Adds support for updating a user's brand
- Adds support to one-call buy shipments and orders via the `service` key
- Adds support for retrieving all Batch objects
- Adds support for retrieving all Address objects
- Adds support for retrieving all Event objects
- Adds support to regenerate Shipment rates via the `RegenerateRates` method
- Adds support for creating trackers in bulk via the `CreateList` Tracker method
- Removes the unused `orderBy` parameter from the `Batch` object
- Update the `DefaultApiBase` to include `v2` and remove `v2` from every request url string
- Adds the .NET version in use to the User-Agent header
- Add a 30 second connection timeout and a 60 second request timeout for all HTTP requests
- Lints the entire project and adds/updates docstrings throughout
- Fixes the test suite for the project making it runnable once again

**This release includes changes intended for v2.7.0**

- Adds support for tax identifiers (PR #181)

**This release includes changes intended for v2.6.0 & v2.6.1**

- Adds missing `commercial_invoice_letterhead` option (closes #142)
- Adds missing `license_number` option
- Adds missing `receiver_liquor_license` option
- Adds missing `VerificationDetails` object (closes #140, #141, #162)
- Changes the Client delegate constructor from `internal` to `public`
- Updates various information in the README related to thread-safety, examples, releasing, etc
- Adds all missing dates and versions to the CHANGELOG
- Bumps RestSharp from 106.4.2 to 106.13.0
- Adds support for .NET Core 3.1
- Includes SmartRate handling.
- Updated Code Signing Identity.

## v2.8.0 (2022-02-16)

This release was mispackaged, please use `v2.8.1` or newer.

## v2.7.0 (2021-11-24)

This release was mispackaged, please use `v2.8.1` or newer.

## v2.6.0 & v2.6.1 (2021-11-03)

This release was mispackaged, please use `v2.8.1` or newer.

## v<IP_ADDRESS> (2020-01-07)

- Add restricted delivery shipment option
- Correct certified mail type

## v<IP_ADDRESS> (2019-09-29)

- Add certified mail, registered mail, and return receipt shipment options

## v<IP_ADDRESS> (2019-07-05)

- Added suppress etd option

## v2.5.1 (2018-10-09)

- Added overlabel shipment options

## v<IP_ADDRESS> (2018-10-03)

## v2.5.0 (2018-09-28)

## v2.4.0 (2018-06-22)

## v<IP_ADDRESS> (2018-01-09)

## v<IP_ADDRESS> (2017-11-29)

## v<IP_ADDRESS> (2017-05-16)

## v<IP_ADDRESS> (2017-04-20)

## v2.3.1 (2017-03-28)

## v2.3.0 (2017-03-11)

## v2.2.7 (2017-03-07)

## v2.2.6 (2017-01-24)

## v2.2.5 (2017-01-24)

## v2.2.4 (2016-12-15)

## v2.2.3 (2016-12-13)

## v2.2.2 (2016-12-07)

## v2.2.1 (2016-08-26)

## v2.2.0 (2016-08-25)

## v<IP_ADDRESS> (2016-08-19)

## v2.1.1 (2016-07-08)

## v2.1.0 (2016-05-09)

## v<IP_ADDRESS> (2016-03-12)

## v2.0.3 (2016-03-03)

## v<IP_ADDRESS> (2016-02-19)

## v2.0.2 (2016-02-10)

## v<IP_ADDRESS> (2016-01-14)

## v2.0.1 (2016-01-14)

## v2.0.0 (2016-01-12)

## v<IP_ADDRESS> (2015-12-18)

## v<IP_ADDRESS> (2015-11-09)

## v1.2.2 (2015-11-04)

## v1.2.1 (2015-10-27)

## v<IP_ADDRESS> (2015-10-06)

## v1.2.0 (2015-09-15)

## v<IP_ADDRESS> (2015-09-10)

## v<IP_ADDRESS> (2015-08-12)

## v1.1.7 (2015-06-26)

## v1.1.6 (2015-06-11)

## v<IP_ADDRESS> (2015-06-05)

## v<IP_ADDRESS> (2015-05-13)

## v<IP_ADDRESS> (2015-03-20)

## v<IP_ADDRESS> (2015-02-06)

## v<IP_ADDRESS> (2015-02-06)

## v<IP_ADDRESS> (2015-01-29)

## v1.1.4 (2015-01-29)

## v<IP_ADDRESS> (2015-01-20)

## v1.1.3 (2014-12-17)

## v<IP_ADDRESS> (2014-11-19)

## v<IP_ADDRESS> (2014-11-17)

## v<IP_ADDRESS> (2014-11-03)

## v<IP_ADDRESS> (2014-11-03)

## v<IP_ADDRESS> (2014-10-31)

## v1.1.2 (2014-10-31)

## v<IP_ADDRESS> (2014-10-30)

## v1.1.0 (2014-10-07)

## v<IP_ADDRESS> (2014-08-15)

## v<IP_ADDRESS> (2014-07-11)

## v<IP_ADDRESS> (2014-06-10)

## v<IP_ADDRESS> (2014-06-06)

repository: EasyPost/easypost-csharp

gha_language: C#

repo_name: EasyPost/easypost-csharp


text:
**This project has been superseded by
[Whitman](http://github.com/mdippery/whitman) and is unlikely to see any more
improvements or bugfixes.**

---

# Chameleon

Chameleon is a simple service for sampling reputation from
[Stack Overflow](http://stackoverflow.com). It takes a list of users
from a MongoDB collection, collects those users' reputation scores,
and saves them back into a MongoDB collection.

## Prerequisites

1. [Leiningen](http://leiningen.org)
2. [MongoDB](http://www.mongodb.org), running on your local machine.

## Usage

1. Build the Jar:

        $ lein uberjar

2. Create a MongoDB database called `chameleon`.

3. In the `chameleon` database, create a collection called `users`.

4. Populate the `users` collection with users whose reputation you would
   like to record, in the following format:

        {_id: <stack overflow user id>}

5. Run the Jar file:

        $ java -jar target/uberjar/chameleon-standalone.jar

You will probably want to run the program as a cron task, to sample
reputation periodically.

repository: mdippery/chameleon

branch_name: refs/heads/master

extension: md

license_type: permissive

repo_name: mdippery/chameleon


text:
## How to build the AutoActive Matlab toolbox
This repository conatins files needed to make a Matlab toolbox for AutoActive
How to update the java jar file
There is two java projects that contributes to the toolbox.
1) The main project java-file-interface, located in the folder Java.
2) A renamed version of Apache Commons Compress (org.apache.commons.compress2) to avoid version conflicts in Matlab installation, located in the folder Compress2
1) Open the maven projects in NetBeans using JDK 1.8.
2) Build the Compress2 project without running the tests.
     Select Tools->Options->Java->Maven : Check "Skip tests for any build executors not directly releated to testing"
     Avoid doing changes to source code. This should be a clean renamed copy.
3) Open the project in the java folder ('java-file-interface')
4) Update the version information in file 'Version.java' and 'pom.xml' if any update.
5) Build the java-file-interface project
6) Remove any old jar file in 'MatlabToolbox/jar' directory
7) Copy the new jar file 'Java/target/java-file-interface....jar-with-dependencies.jar' to 'MatlabToolbox/jar' directory

## How to update the MatlabToolbox
1) Code to be included is located in the 'MatlabToolbox' folder
2) Download Gaitup Matlab ToolKit for Physilog®5 from https://research.gaitup.com/support/ and uncompress and copy the folder
   Physilog5MatlabToolKit_vx_y_z with all files to MatlabToolbox\external (included in the toolbox from version 2.1, currently not available from GaitUp)
3) Update the Matlab toolkit source code with any changes
4) Update the version information in 'MatlabToolbox/+autoactive/MatlabVersion.m'
5) Start Matlab R2022a and make autoactive-matlab-toolbox active folder
6) Right-click on folder MatlabToolbox and select 'Add to Path => Selected Folders and Subfolders'
7) Open the 'Package toolbox app' by double click on project file 'AutoActive.prj'
8) Update version information
9) Check that MATLAB path has eight entries + examples, (remove .../help_p_files if any)
10) Check that Java Class Path has one correct jar entry
11) Create package in menu 'Package => Package'
12) Save project in meny 'Save => Save'
13) Rename and copy release package for distribution
14) Update ChangeLog file
15) Commit changes in autoactive-matlab-toolbox repository
16) Tag project with version number in git

url: https://raw.githubusercontent.com/SINTEF/AutoActive-Matlab-toolbox/c79115546524e52f8292bc35feaae81362bcb497/How to build the AutoActive Matlab toolbox.md

repository: SINTEF/AutoActive-Matlab-toolbox

gha_language: Java

repo_name: SINTEF/AutoActive-Matlab-toolbox


text:
# jupyterhub_dockerized

This project creates a dockerized jupyterhub with Github authentication.

## Prerequisites

You have to create an organisation at Github.
Also a server with Docker running is nessecary.

## Install

### Create OAuth configuration

You can only login with a Github account that belongs to an organisation. Create an OAuth application at the Github organisation settings.
As callback URL enter https://YOUR_JUPYTERHUB_DOMAIN/hub/oauth_callback

Add the domain, client-id and client-secret at the jupyterhub_config.py

### Setup proxy and ssl

Setup a proxy that proxies requests to your domain to the jupyterhub at localhost:8000
Use nginx-config-snippet.conf as an example.

Make sure your proxy handles ssl connections well.

### Build and run jupyterhub docker containers

To build the docker images and restart jupyterhub and all running jupyter processes, simply run
```sudo build-and-run-jupyterhub.sh```

Caution: The script will kill all running notebook instances.


text:
# Implemented Compression Methods

Each compression method receives its own hyperparameters that are organized as a dictionary and basically stored in a JSON file that is deserialized when the training starts. Compression methods can be applied separately or together producing sparse, quantized, or both sparse and quantized models. For more information about the configuration, refer to the samples.

- [Quantization](./compression_algorithms/Quantization.md)
  - Symmetric and asymmetric quantization modes
  - Signed and unsigned
  - Per tensor/per channel
  - Exports to OpenVINO-supported FakeQuantize ONNX nodes
  - Arbitrary bitwidth
  - Mixed-bitwidth quantization
  - Automatic bitwidth assignment based on HAWQ
  - Automatic quantization parameter selection and activation quantizer setup based on HW config preset
  - Automatic bitwidth assignment mode AutoQ, based on HAQ, a Deep Reinforcement Learning algorithm to select best mixed precision given quality metric and HW type.
- [Binarization](./compression_algorithms/Binarization.md)
  - XNOR, DoReFa weight binarization
  - Scale/threshold based per-channel activation binarization
- [Sparsity](./compression_algorithms/Sparsity.md)
  - Magnitude sparsity
  - Regularization-based (RB) sparsity
- [Filter pruning](./compression_algorithms/Pruning.md)

repository: openvinotoolkit/nncf

branch_name: refs/heads/develop

gha_language: Python

repo_name: openvinotoolkit/nncf


text:
Title: Thick Client Architecture
Date: 2012-03-04 20:53
Author: Michael
Category: JavaScript
Tags:HTML5, Javascript, Mobile
Slug: thick-client-architecture
Status: published

The funny thing about not knowing something is... not knowing. Until a
few weeks ago I had no idea that a massive transformation was taking
place under my own feet. I knew that servers served and browsers
display. I didn't realize that so many developers using ASP.NET MVC and
Ruby on Rails relied on the server for everything except the container.
Ignorance is bliss eh?

See, to me it makes perfect sense to do as much as one possibly can on
the client. Knowing that the least amount of work one can do to get the
best results is the perfect amount of work. I have always set out to get
the maximum "bang-for-my-buck" as it were.

We are now seeing lots of posts titled: [Should your web application be
rich-client from day
one?](http://fhwang.net/2012/03/05/Should-your-web-application-be-rich-client-from-day-one)
and [decoupling front
ends](http://eliperelman.com/blog/2012/03/03/decoupling-front-ends/).
Great reads to be sure, but to me this is common wisdom. However, I
haven't been a developer for as long as many of these developers so I
don't have the experience or historical perspective.

I do feel that this is a prime time for indie-developers, like me, to
make a dent in the development world. If front end developers have
invested a little time to become proficient with JavaScript they will
have very little trouble transferring to the newer thick-client
architecture paradigm.

Don't get me wrong, a masterfully crafted RESTful API is indeed a thing
of beauty and generally bomb-proof. However, getting a "working" web app
out the door without knowing the nuts and bolts of a massive server-side
framework is within closer reach than ever before. Exciting!!!!

I would be lying if I told you this wasn't exciting to me on a personal
and professional level. I have been really focused on mobile and web for
the last year and I hope some exciting opportunities extend from my
efforts.

license: MIT


text:
# simple c code testing enviroment with gcc image.
![LICENSE](https://img.shields.io/github/license/AC34/docker-v3-c-compile?color=blue)
![docker-version](https://img.shields.io/badge/dynamic/yaml?url=https://raw.githubusercontent.com/AC34/docker-v3-c-compile/master/docker-compose.yml&label=docker-version&query=$.version&color=blue)
## note
Dont't get confused about docker version.
## prepare
```
docker-compose build
```
this needs to be done only on first time.
## compile and run
```
docker-compose up
```


text:
# Torino

Torino is an example of an Onion Address generator for Tor hidden services.

This was a simple little "can I do it project?" and **ultimately isn't
likely worth using in a production environment** due to how slow
the program is but it's fun all the same if you want to try it out
or see how Tor addresses are generated.

## Install and use

To install globally run

```
npm install -g torino
```

running ```torino -h```

```

  Usage: torino [options]

  Options:

    -h, --help                           output usage information
    -V, --version                        output the version number
    -m, --match-pattern [regex pattern]  find an onion address that matches the [regex pattern]
```

To generate any address (no pattern) run with no options:

```
torino
```

Giving you an output like so:

```
uqggk3zd6ragkh3n.onion

<REDACTED_PRIVATE_KEY>
```

To generate an address that matches a regex pattern run with :

```
torino --match-pattern ^a
```

With the pattern ```^a``` it'll key generating keys until it has an address that starts with the character ```a```.

You can also use the library behind the program as well in your own project if you so wish simply install it like so:

```
npm install torino --save
```

Then use as follows:

```js

const torino = require('torino').onionAddressGenerator;
const rsa = require('torino').privateKey;

const myPattern = '^torino';

torino.searchForAddress(myPattern).then(function (result) {
    const address = result.address;
    const privateKey = rsa.privateKeyToPem(result.privateKey); // Converts it to a PEM format for use in Tor
});
```

## Hell it's slow, can it be improved?

I'd love to make the program production useful but to compete against the likes of
[Shallot](https://github.com/katmagic/Shallot) and [Scallion](https://github.com/lachesis/scallion)
it's just not possible without having a low level implementation of the key generation
or hashing algorithms. There's no reason the use of OpenCL that's seen in Scallion couldn't be done in nodejs,
it's just not something I have a huge background in or time to learn about. If you
want to give it ago, please do share your results.

## License

It's licensed under MIT, enjoy.

repository: peterfox/torino

repo_name: peterfox/torino


text:
---
title: 8A IT - Codecademy Lesson 1
layout: post
author: gus.bloxham
permalink: /8a-it---codecademy-lesson-1/
source-id: 1KJ-4MmibdRbcbM-iaQ2DxGg1Sm5rsOa7GwnqRPc38Vw
published: true
---

    Title
    Codecademy
    Date
    25/05/17

    Starting point:
    Haven't started.

    Target for this lesson?
    To reach Chapter 2

    Did I reach my target?
(add details to "Lesson Review")
    Yes. I reached Chapter 4.

    Lesson Review

    How did I learn? What strategies were effective?

    I learned by doing the provided exercises on Codecademy. I found them to be really helpful, because they tell you what you're doing wrong, but don’t give you the answer. I also spent a bit of time helping other people, which I found slightly beneficial, because it helped me revise things which I’ve already done. Another bonus of helping other people is that they’re more likely to help you if you’re stuck. However, I think the exercises still help you more than other people do for the most part.

    What limited my learning? Which habits do I need to work on?

    I have no evidence that I got to Chapter 4 as I didn’t take screenshots of the badges I obtained this week. I do need to do that as I continue with this course. I found the course helpful and easy to follow, and I didn’t get stuck on any of the questions, and, more importantly, I didn’t need to skip any questions. I feel that skipping a question won’t benefit you in the long run so I need to refrain from skipping if I get stuck.

    What will I change for next time? How will I improve my learning?

    Next time, I will make sure to record my progress by taking screenshots of the badges I obtain and saving them to my Drive. I also need to make a blog post and paste the badges into it to prove that I have done this much. On the other hand, I think that that there isn’t much I need to change about my pace of work; I can say with certainty that I will finish the course on time at this rate. I reached 19% at the end of the lesson.


text:
The AEA generic buyer and seller skills demonstrate an interaction between two AEAs.

* The provider of a service in the form of data for sale.
* The buyer of a service.

## Discussion

The scope of the specific demo is to demonstrate how to create an easy configurable AEA. The seller AEA will sell the service specified in the `skill.yaml` file and deliver it upon payment by the buyer. Adding a database or hardware sensor for loading the data is out of the scope of this demo.

As a result, the AEA can provide data that are listed in the `skill.yaml` file. This demo does not utilize a smart contract. We interact with a ledger only to complete a transaction. This demo assumes the buyer
trusts the seller AEA to send the data upon successful payment.

Moreover, this example provides a way to customise the skill code and connect a database or sensor. You can modify the `has_data_source` variable in `skill.yaml` file of the `generic_seller` skill to `True`. Then you have to implement the method `collect_from_data_source(self)` inside the `strategy.py` file.

## Communication

This diagram shows the communication between the various entities as data is successfully sold by the seller AEA to the buyer.

    sequenceDiagram
        participant Search
        participant Buyer_AEA
        participant Seller_AEA
        participant Blockchain

        activate Buyer_AEA
        activate Search
        activate Seller_AEA
        activate Blockchain

        Seller_AEA->>Search: register_service
        Buyer_AEA->>Search: search_agents
        Search-->>Buyer_AEA: list_of_agents
        Buyer_AEA->>Seller_AEA: call_for_proposal
        Seller_AEA->>Buyer_AEA: propose
        Buyer_AEA->>Seller_AEA: accept
        Seller_AEA->>Buyer_AEA: match_accept
        Buyer_AEA->>Blockchain: transfer_funds
        Buyer_AEA->>Seller_AEA: send_transaction_hash
        Seller_AEA->>Blockchain: check_transaction_status
        Seller_AEA->>Buyer_AEA: send_data

        deactivate Buyer_AEA
        deactivate Search
        deactivate Seller_AEA
        deactivate Blockchain

## Preparation instructions

### Dependencies

Follow the Preliminaries and Installation sections from the AEA quick start.

## Demo instructions

### Create the seller AEA

First, fetch the seller AEA:
``` bash
aea fetch fetchai/generic_seller:0.19.0 --alias my_seller_aea
cd my_seller_aea
aea install
aea build
```

Alternatively, create from scratch.

The following steps create the seller from scratch:
``` bash
aea create my_seller_aea
cd my_seller_aea
aea add connection fetchai/p2p_libp2p:0.16.0
aea add connection fetchai/soef:0.17.0
aea add connection fetchai/ledger:0.13.0
aea add skill fetchai/generic_seller:0.20.0
aea install
aea build
aea config set agent.default_connection fetchai/p2p_libp2p:0.16.0
aea config set --type dict agent.default_routing \
'{
  "fetchai/ledger_api:0.10.0": "fetchai/ledger:0.13.0",
  "fetchai/oef_search:0.13.0": "fetchai/soef:0.17.0"
}'
```

### Create the buyer AEA

Then, fetch the buyer AEA:
``` bash
aea fetch fetchai/generic_buyer:0.20.0 --alias my_buyer_aea
cd my_buyer_aea
aea install
aea build
```

Alternatively, create from scratch.

The following steps create the buyer from scratch:
``` bash
aea create my_buyer_aea
cd my_buyer_aea
aea add connection fetchai/p2p_libp2p:0.16.0
aea add connection fetchai/soef:0.17.0
aea add connection fetchai/ledger:0.13.0
aea add skill fetchai/generic_buyer:0.20.0
aea install
aea build
aea config set agent.default_connection fetchai/p2p_libp2p:0.16.0
aea config set --type dict agent.default_routing \
'{
  "fetchai/ledger_api:0.10.0": "fetchai/ledger:0.13.0",
  "fetchai/oef_search:0.13.0": "fetchai/soef:0.17.0"
}'
```

### Add keys for the seller AEA

First, create the private key for the seller AEA based on the network you want to transact. To generate and add a private-public key pair for Fetch.ai `AgentLand` use:
``` bash
aea generate-key fetchai
aea add-key fetchai fetchai_private_key.txt
```

Next, create a private key used to secure the AEA's communications:
``` bash
aea generate-key fetchai fetchai_connection_private_key.txt
aea add-key fetchai fetchai_connection_private_key.txt --connection
```

Finally, certify the key for use by the connections that request that:
``` bash
aea issue-certificates
```

### Add keys and generate wealth for the buyer AEA

The buyer needs to have some wealth to purchase the service from the seller.

First, create the private key for the buyer AEA based on the network you want to transact. To generate and add a private-public key pair for Fetch.ai `AgentLand` use:
``` bash
aea generate-key fetchai
aea add-key fetchai fetchai_private_key.txt
```

Then, create some wealth for your buyer based on the network you want to transact with. On the Fetch.ai `AgentLand` network:
``` bash
aea generate-wealth fetchai
```

Next, create a private key used to secure the AEA's communications:
``` bash
aea generate-key fetchai fetchai_connection_private_key.txt
aea add-key fetchai fetchai_connection_private_key.txt --connection
```

Finally, certify the key for use by the connections that request that:
``` bash
aea issue-certificates
```

### Update the skill configurations

The default skill configurations assume that the transaction is settled against the Fetch.ai ledger.

In `my_seller_aea/vendor/fetchai/skills/generi_seller/skill.yaml` the `data_for_sale` is the data the seller AEA is offering for sale.
``` yaml
models:
  ...
  strategy:
    args:
      currency_id: FET
      data_for_sale:
        generic: data
      has_data_source: false
      is_ledger_tx: true
      ledger_id: fetchai
      location:
        latitude: 51.5194
        longitude: 0.127
      service_data:
        key: seller_service
        value: generic_service
      service_id: generic_service
      unit_price: 10
    class_name: GenericStrategy
```
The `data_model`, `data_model_name` and the `service_data` are used to register the service in the SOEF search node and make your agent discoverable. The name of each `data_model` attribute must be a key in the `service_data` dictionary.

In the generic buyer skill configuration (`my_buyer_aea/vendor/fetchai/skills/generic_buyer/skill.yaml`) defines the `search_query`, which has to match the `service_data` of the seller.

``` yaml
models:
  ...
  strategy:
    args:
      currency_id: FET
      is_ledger_tx: true
      ledger_id: fetchai
      location:
        latitude: 51.5194
        longitude: 0.127
      max_negotiations: 1
      max_tx_fee: 1
      max_unit_price: 20
      search_query:
        constraint_type: ==
        search_key: seller_service
        search_value: generic_service
      search_radius: 5.0
      service_id: generic_service
    class_name: GenericStrategy
```

### Update the skill configurations

Both skills are abstract skills, make them instantiable:

``` bash
cd my_seller_aea
aea config set vendor.fetchai.skills.generic_seller.is_abstract false --type bool
```

``` bash
cd my_buyer_aea
aea config set vendor.fetchai.skills.generic_buyer.is_abstract false --type bool
```

## Run the AEAs

Run both AEAs from their respective terminals.

First, run the seller AEA:

``` bash
aea run
```

Once you see a message of the form `To join its network use multiaddr 'SOME_ADDRESS'` take note of the address. (Alternatively, use `aea get-multiaddress fetchai -c -i fetchai/p2p_libp2p:0.16.0 -u public_uri` to retrieve the address.)
This is the entry peer address for the local agent communication network created by the seller.

Then, in the buyer, run this command (replace `SOME_ADDRESS` with the correct value as described above):
``` bash
aea config set --type dict vendor.fetchai.connections.p2p_libp2p.config \
'{
  "delegate_uri": "<IP_ADDRESS>:11001",
  "entry_peers": ["SOME_ADDRESS"],
  "local_uri": "<IP_ADDRESS>:9001",
  "log_file": "libp2p_node.log",
  "public_uri": "<IP_ADDRESS>:9001"
}'
```
This allows the buyer to connect to the same local agent communication network as the seller.

Then run the buyer AEA:
``` bash
aea run
```

You will see that the AEAs negotiate and then transact using the Fetch.ai testnet.

repository: Funsho-Agboola/agents-aea

repo_name: Funsho-Agboola/agents-aea


text:
# Planning the App

* Ask a question - Create a question
* Read the question
* Answer a question
* Read the answers
* Edit an answer - Update answer
* Delete an answer
* Vote on answers - Update answer

CRUD - Create, Read, Update, Delete

```javascript
// example.com/about/index.html
// ======== ROUTES ========
// /questions
// GET
// /questions/:id
// POST
```

gha_language: JavaScript


text:
# If you're reporting a bug, please fill in the following information, otherwise delete this section

- Application type: WPF 4.0 / WPF 4.5+ / Silverlight / Windows Store app / Universal Windows Platform
- Operating system version:
- Expected behavior:
- Actual behavior:
- Steps to reproduce the problem:
  1. ...
- If you're having issues with a specific GIF file, please attach or link the file.

repository: xupefei/XamlAnimatedPng

repo_name: xupefei/XamlAnimatedPng


text:
<!--
Thanks for contributing to jupyterlab-lsp!
Please fill out the following items to submit a pull request.
See the contributing guidelines for more information:
https://github.com/jupyterlab/jupyterlab/blob/master/CONTRIBUTING.md
-->

## References

<!-- Note issue numbers this pull request addresses (should be at least one, see contributing guidelines above).
Use "fixes" and "closes" linking phrases as appropriate. -->

<!-- Note any other pull requests that address this issue and how this pull request is different. -->

## Code changes

<!-- Describe the code changes and how they address the issue. -->

## User-facing changes

<!-- Describe any visual or user interaction changes and how they address the issue. -->

<!-- For visual changes, include before and after screenshots here. -->

## Backwards-incompatible changes

<!-- Describe any backwards-incompatible changes to public APIs. -->

## Chores

- [ ] linted <!-- Required: Run "jlpm lint" and "python scripts/lint.py" from the root of the repository, then check this box like this: [x] -->
- [ ] tested <!-- Recommended: Let us know if you already added a test case (if relevant). -->
- [ ] documented <!-- Optional: Would it be good to improve the documentation? If yes, please consider doing this and checking this box. -->
- [ ] changelog entry <!-- Recommended: Add a note in the CHANGELOG.md file under the most recent >unreleased< version; if one does not exist, feel free to create one by increasing the version number (no worries if you are not certain of the details - we can improve it later; let's just have something to work with) -->

repository: krassowski/jupyterlab-lsp

gha_language: TypeScript

repo_name: krassowski/jupyterlab-lsp


text:
# Interface: IAddressUnlockCondition

Address Unlock Condition.

## Hierarchy

- [`ITypeBase`](ITypeBase.md)<``0``\>

  ↳ **`IAddressUnlockCondition`**

## Table of contents

### Properties

- [type](IAddressUnlockCondition.md#type)
- [address](IAddressUnlockCondition.md#address)

## Properties

### type

• **type**: ``0``

The type of the object.

#### Inherited from

[ITypeBase](ITypeBase.md).[type](ITypeBase.md#type)

___

### address

• **address**: [`AddressTypes`](../api.md#addresstypes)

The address.

branch_name: refs/heads/feat/stardust

gha_license_id: MIT


text:
# Virtual Reality Modeling project (part 1)

Facial emotions dataset used in this project can be found at: https://github.com/muxspace/facial_expressions

This repository is a subpart of a project "vr-facial-expressions" for the Kaunas University of Technology VR-Modeling module.

The second part can be found here: vr-facial-expressions-quiz

This facial emotions classifier was specifically made only using OpenCV library. The SVM classifier was trained only on 4 emotions classes using just ~300 labeled images for each of the class, due to lack of good quality samples in the used dataset (even though it was the best public dataset for this task that I managed to find).

Trained emotions and their labels:

Anger - 0

Happiness/joy - 3

Surprise - 5

Neutral - 6

The overall classifier accuracy (tested on total of 127 images) is 73%


text:
# Mod-Engine

Mod-Engine is a work in progress game engine designed with moddability in mind. This engine is currently not in a usable state.

# Dependencies

### Windows:
Install the latest Vulkan SDK for Windows from here: https://vulkan.lunarg.com/sdk/home#windows and you're good to go! All other dependencies are included.

Visual Studio 2019 is supported, Visual Studio 2017 may work but is not supported.

### Linux:
Consult your distros package manager and install the following packages

* SDL2
* fmtlib
* assimp

You will also want to download the latest Vulkan SDK from here: https://vulkan.lunarg.com/sdk/home#linux The README inside the Vulkan tarball contains a link to the guide for that version. Most importantly, follow the instructions for setting up the runtime environment. This will define the VULKAN_SDK environment variable so Mod-Engine's premake script can find Vulkan.

You will want at least GCC/G++ 7 or at least clang 5 as this project relies on C++17 features.

# Building
This project uses premake5 for its build system. You will want to download the latest version of premake5 for your OS from here: https://premake.github.io/download.html

Generating projects should be as simple as doing premake5 vs2019 or premake5 gmake

repository: Spirrwell/Mod-Engine

repo_name: Spirrwell/Mod-Engine


text:
# Producing a pdf paper

We will use **Latex** to produce journal-like papers. This [link](https://www.latex-project.org/get/) offers you Latex for every operating system. If you are using Mac, you can get some instructions you have some instructions [here](https://miktex.org/howto/install-miktex-mac). If you are using **Windows**, I recommend you download **[Miktex](https://miktex.org/download/ctan/systems/win32/miktex/setup/windows-x64/basic-miktex-2.9.6753-x64.exe)**; Yiu also have a tutorial [here](https://miktex.org/howto/install-miktex).  While runing the Basic Installer, **do not forget the selection recommended in the image below**:

branch_name: refs/heads/main


text:
# Solidworks Integration with Pybullet
A development guide for building custom robot assemblies in Solidworks, converting them to URDF, importing to pybullet environment, and setting up position and speed controllers. To get started I recommend downloading the Test_Files folder and creating a python script to copy and paste code into. The Test_Files folder includes the solidworks models, urdf, and python files I will be referencing throughout this tutorial. It is also assumed that you have solidoworks and python installed on your machine.

### Topics
- modeling robot assemblies in Solidworks
- converting solidworks assembly to URDF
- importing URDF into pybullet enviroment
- Setting up GUI and configuring pybullet parameters
- retriving info about the URDF model
- creating position and speed controlers for robot joints

### Installing PyBullet
- pybullet is a simple python interface to the physics engine "Bullet", this allows you to import robots into a simulator and controll them. pybullet can load kinematic descriptions of robots or other objects from URDF files.

      - pip install pybullet

### Installing URDF exporter for Solidworks, Windows 10

  1. Assuming you already have solidworks verison 2016 or greater already installed, click on the link below
    - https://github.com/ros/solidworks_urdf_exporter/releases/tag/1.5.1

  2. Download the Source Code (zip) file
    - https://github.com/ros/solidworks_urdf_exporter/archive/1.5.1.zip

  3. Once downloaded unzip the folder and navigate to  --> solidworks_urdf_exporter-1.5.1 --> INSTALL --> Output

  4. In the Output folder you should see the file sw2urdfSetup.exe, double click to install it.

  5. After installing open solidworks and create a new partfile, click the file tab and scroll down, you should see an option (Export as URDF). If you do not see this option, you will need to try and reinstall the source code.

### Modeling your own robot in Solidworks
- Assuming you have some basic knowledge of creating parts and assemblies in solidworks, a simple work flow for creating your robot should look something like the steps listed below. I also included the solidworks parts/assmbly files in the Test folder. (Assem_model.SLDASM arm.SLDPRT base.SLDPRT).

     1. Create seperate part files for each major component of your robot.
     2. Create an assembly file.
     3. Import you part files into the assembly.
     4. Define refference geometries for each part (ie joint axises and planes)
     5. Construct your robot assembly by assign mates to your geometery references for each part .

### Exporting your Solidworks Assembly as a URDF file.
- Once you have opended the solidworks assembly file Assem_model.SLDASM, (or created your own robot parts and joined them in an assemblie file), we need to set up the parameters for the URDF file. Below is an example of what this processes looks like. How I created Assem_test8 folder which include the URDF model

  1. Select urdf exporter
  2. Define main link
  3. Create tree list of joint and assign names
  4. Verify information on the urdf exporter (joint type, position, ect..)
  5. Create URDF model
  6. Locate your model directory

### Importing URDF file into PyBullet Enviroment
- To check if your URDF model was created correctly, locate the model in the folder created by the URDF exporter
- Next create a new python script and paste in the code below.

      import os
      import pybullet
      import pybullet_data

      pybullet.connect(pybullet.GUI)
      pybullet.resetSimulation()
      pybullet.setAdditionalSearchPath(pybullet_data.getDataPath())
      pybullet.setGravity(0, 0, -9.81) # define x,y,z gravity constants
      pybullet.setTimeStep(0.0001)

      # Load the URDF file of your robot.
      robot = pybullet.loadURDF(r'C:\Users\Jesse\Desktop\PyFluid\Assem_test8\urdf\Assem_test8.urdf',[0,0,0],useFixedBase=1)

### Getting information about your URDF model
- If the file loads successfully, we can move on to the next step of checking that our robot was configured properly. Define the function below in your python script. This will print out the number of joints the system has and details related to each of them. Test function and read what gets printed out to the terminal.

      def get_joint_info(robot):
        print('The system has', pybullet.getNumJoints(robot), 'joints')
        num_joints = pybullet.getNumJoints(robot)
       for i in range(num_joints):
           joint_info = pybullet.getJointInfo(robot, i)
            print('Joint number',i)
            print('-------------------------------------')
            print('Joint Index:',joint_info[0])
            print('Joint Name:',joint_info[1])
            print('Joint misc:',joint_info[2:])
            print('-------------------------------------')
        return

- Now to get info about the joints of your URDF model simply pass the loaded robot to the function. The names of each joint should match the names that were given in Section "Exporting your Solidworks Assembly as a URDF file"

      get_joint_info(robot)

### Creating Positional Joint Controllers
- Lets first create a position controller for one of the systems joints. The inputs to the function will be the joint_index of the joint we wish to create the controller for, followed by an upper/lower position limit in radians, and an inital position we want the joint to start in when we run the simulation.

       def create_joint_position_controller(joint_index=0,lower_limit=-3.14,upper_limit=3.14,inital_position=0):
           # get name of joint, to create on screen label
           joint_info = pybullet.getJointInfo(robot, joint_index)
           #define joint paramters for controller
           joint_parameters = pybullet.addUserDebugParameter(paramName=str(joint_info[1])+'PC', rangeMin=lower_limit, rangeMax =upper_limit,          startValue=inital_position)
           # return array containing joint index and paramters
           # pass the returned array to activate_position_contoller in the main loop of your script
           return [ joint_index,joint_parameters]

### Creating Velocity Joint Controllers
- Next we will create a velosity controller for the same joint, The inputs to the function will be the joint_index of the joint we wish to create the controller for, followed by an upper/lower velosity limit in radians/sec, and an inital velocity we want the joint to have a the start of the simulation.

      def create_joint_velocity_controller(joint_index=0,lower_limit=-10,upper_limit=10,inital_velosity=0):
        # get name of joint, to create on screen label
         joint_info = pybullet.getJointInfo(robot, joint_index)
          #define joint paramters for controller
         joint_parameters = pybullet.addUserDebugParameter(paramName=str(joint_info[1])+'VC', rangeMin=lower_limit, rangeMax =upper_limit,        startValue=inital_velosity)
        # return array containing joint index and paramters
         # pass this to activate_position_contoller
        return [ joint_index,joint_parameters]

- Now create two variables to store the returned array from the functions above, I use "PC" to indicate Position Controll and "VC" to indicate a velosity controller.

      Joint1_PC = create_joint_position_controller(joint_index =0,lower_limit=-3.14,upper_limit=3.14,inital_position=0)

      Joint1_VC = create_joint_velocity_controller(joint_index =0,lower_limit=-10,upper_limit=10,inital_velosity=0)

### Activating your Joint Controllers as a GUI gooey
- Next lets create functions which will active the controllers we just made while the simulation is running. The functions will accept the variable defined above ie: Joint1_PC and Joint1_VC, and create a sidebar slider on the pybullet GUI which we can use to control the robots joint. The function will return the joints current position and velocity.

      def activate_position_controller(joint_parameters):
             joint_index = joint_parameters[0]
            angle = joint_parameters[1]
            user_angle = pybullet.readUserDebugParameter(angle)
            pybullet.setJointMotorControl2(robot, joint_index, pybullet.POSITION_CONTROL,targetPosition= user_angle)
            joint_info = pybullet.getJointState(robot,joint_index)
            joint_position = joint_info[0]
            joint_velosity = joint_info[1]
            return joint_position,joint_velosity

      def activate_velocity_controller(joint_parameters):
             joint_index = joint_parameters[0]
            velosity = joint_parameters[1]
            user_velocity = pybullet.readUserDebugParameter(velosity)
            pybullet.setJointMotorControl2(robot, joint_index, pybullet.VELOCITY_CONTROL,targetVelocity= user_velocity)
            joint_info = pybullet.getJointState(robot,joint_index)
            joint_position = joint_info[0]
            joint_velosity = joint_info[1]
            return joint_position,joint_velosity

### Running Simulation
- Now lets test the postion/velocity controllers, by starting a simulation and testing each of them. Add the code below to your script.

      while True:

      """ Note you can only activate either a postion or velosity controller, cannot use both simutaneously"""

       #activate Joint1 for on screen control and get position and velosity readings

       joint1_position,joint1_velosity = activate_position_controller(Joint1_PC)

       # comment out the line above and uncomment the below to test the velocity_controller
       # joint1_position,joint1_velocity = activate_velocity_controller(Joint1_VC)

       print(joint1_position,joint1_velocity)

      pybullet.stepSimulation()

      pybullet.disconnect()

### Wrapping Up
- If you followed along correctly, you should have something like the examples shown below.

      - python bullet_test.py - reference https://alexanderfabisch.github.io/pybullet.html
      - python test_position_controller.py
      - python test_velocity_controller.py

### Endless Posibilites
- Example of a real robot I designed in solidworks moving around in the pybullet enviroment.


text:
---
collegename: "COLLEGE OF ENGINEERING CHENGANNUR"
hubname: "Kochi Hub"
slug: "/kochi-hub/college-of-engineering-chengannur"
---

## WIE-TECH: Opportunities and Difficulties Faced By Women In Industry Session

```Date: 3 March 2020```

```No. of Participants: 17```

IEEE Women in Engineering Affinity Group organized a session, WIE- Tech: Opportunities and Difficulties Faced By Women in Industry. The session was taken by Shweta Prabhakar and discussed the importance of work-life balance, the physical barriers a woman has to overcome for attaining a successful career.

## LEARN TO CODE - Introduction to GitHub (Webinar)

```Date: 30 March 2020```

```No. of Participants: 31```

IEEE Women in Engineering Affinity Group in collaboration with the IEEE Computer Society organized a webinar on Introduction to GitHub by Shylesh S

## WISSEN - MARCH EDITION

```Date: 31 March 2020```

```No. of Participants: 18```

The quiz consisted of fifteen questions from the topic Internet of Things.

## #IamRemarkable Workshop

```Date: 2 April 2020```

```No. of Participants: 30```

IEEE Women in Engineering Affinity Group organized an #IamRemarkable Workshop through a webinar by Amalu Susan Santhosh, an #IamRemarkable facilitator and Google Women Techmakers Scholar  2018.

## CAREER CHOICES (Webinar)

```Date: 16 April 2020```

```No. of participants: 30```

IEEE Women in Engineering Affinity Group organized a webinar on Career Choices by Fausya Amalh, ML Engineer, and Product Development Analyst.

## DATA STRUCTURES & ALGORITHM FOR JOB INTERVIEWS (Webinar)

```Date: 18 April 2020```

```No: of participants: 45```

IEEE Women in Engineering Affinity Group in collaboration with IEEE Computer Society organized a webinar on Data structures and Algorithms for Job Interviews, handled by Keerthana K, Software Engineer.

## CODEATHON

```Date: 19 APRIL 2020```

```No. of Participants: 23```

IEEE Women in Engineering Affinity Group in collaboration with the IEEE Computer Society Student Branch Chapter organized Codeathon, an online coding competition exclusively for Learn to Code participants.

## REVELATION

```Date: 22 April 2020```

```No. of Participants: 10```

IEEE Women in Engineering Affinity Group in collaboration with the IEEE Special Interest Group on Humanitarian Technology organized an online innovation challenge, Revelation.

## WOMEN IN STEM AND INNOVATION (Webinar)

```Date: 25 April 2020```

```No. of participants: 30```

IEEE Women in Engineering Affinity Group organized a webinar on Women in Stem & Innovation by Divya Ravindranath, CCO & Founding Member, Wequity for Women & Technology.

## DISINFORMATION AND DATA PROTECTION DURING COVID’19 (Webinar)

```Date: 30 April 2020```

```No. of participants: 26```

IEEE Women in Engineering Affinity Group organized a webinar on Disinformation and Data Protection during COVID’19 by Asha Jomis, Policy Leader Fellow, European University Institute.

## GOING PLACES BY ARUNDHATI KURUP (Webinar)

```Date: 7 June 2020```

```No. of participants: 40```

IEEE Women in Engineering Affinity Group College of Engineering Chengannur organized Going Places, an interactive session with Arundhati Kurup who is currently doing her Masters in Computer Science at USC.


text:
# Introduction to AngularJS

* Name      : Kent C. Dodds
* Twitter   : [@kentcdodds](http://twitter.com/kentcdodds)
* Github    : [kentcdodds](http://github.com/kentcdodds)
* Website   : [kent.doddsfamily.us](http://kent.doddsfamily.us)

## Abstract

[AngularJS](http://angularjs.org/) is currently one of the most popular frontend frameworks. If you haven’t yet heard of it, prepare to be amazed. In Intro to AngularJS we’ll be doing an interactive workshop to learn the fundamental principles of AngularJS including:
  1. Templates/Expressions - Your DOM structure
  2. Module - Your app's namespace
  3. Directives - How you talk to the DOM
  4. Filters - Utilities for what's displayed to the user
  5. Scope - What on earth is this thing!?
  6. Controllers - The scope initializer
  7. Services - Common utilities
  8. Working with third-party modules
  9. Firebase & AngularFire - Going from two way binding, to three way binding. A full web application with no server setup required!

We'll be following through [a repository](https://github.com/kentcdodds/ng-workshop) hosted on GitHub. There’s a branch for each concept, so you can play around with the code and then catch right back up with the next branch. So come on, and let’s learn AngularJS!

## Speaker Bio

![kentcdodds](https://raw.github.com/kentcdodds/2014.cascadiajs.com/master/images/kentcdodds.png)

I'm a 25 year old JavaScript padawan who recently fell in love with the open web. I found the truth at Domo Technologies Inc. where they hired me to do endpoint testing but I found the beauty that is JavaScript. I started doing JavaScript at Domo just over a year ago. We've been running with AngularJS for the last 9 months. I'll graduate with a Master of Information Systems degree in April (*finally*) and go full time as a front-end engineer at Domo.

I have presented Intro to AngularJS twice to two groups of about 40 students. I'm helping to organize [DevFestFam](http://devfestfam.com) here in Utah (as the website dev) put on by Google Developer Group Utah (where I've had the opportunity to present as well). I went to my first conference in January ([ng-conf](http://ng-conf.org/) sponsored by Domo and organized by my co-workers here). I look forward to attending more and more, and hope to speak at as many as I feel I can contribute to!

All in all, what I really love, is to contribute to the web community and talke to people about software development. I would love to speak at CascadiaJS this year! Thanks!

gha_language: CSS


text:
# readwrite-school

Programmatic reading and writing practice books.

## Installation

1. `git clone`
2. `npm install`

Requires a .env file with the following variables:

- NYT_API_KEY - API key from the New York Times (wordlist)
- UNSPLASH_APP_ID - Unsplash.com App ID (photos)
- UNSPLASH_SECRET - Unsplash.com API secret (photos)
- PROJECT_ID - Google Cloud project ID (translations)
- DB_URL - Mongo connection string`

## Database Seeding

Scripts are seperate in order to work around API limits.

Generate wordlist from NYT: `node bin/fetch-data.js`

Import images: `node bin/image-import.js`

Import translations:  `node bin/translations-import.js` (you'll need to enable the Google Translations API in the Cloud Console)

## Sample Sentences

Export data and import a CSV of sentences for each word:

1. Create a directory in the project folder called "./tmp"
2. `node bin/generate-csv.js` will export a CSV
3. Add sentences to a new column called "New Sentence"
4. Run `node bin/csv-import.js` to add the sentences to the database

## Rendering PDFs

1. Create a "./pdf" directory inside "./tmp"
2. Make sure all the data is seeded, then run `node bin/render-pages`

repository: philleif/readwrite-school

repo_name: philleif/readwrite-school


text:
# Article research
A simple scala / play program to search for articles online

# Install & launch
```sh
git clone git@github.com:amstuta/article-research.git
cd article-research
./bin/install.sh
sbt run
```

The installation script will install scala, sbt and cassandra.
It will also create cassandra keyspace "article_search" and table "raw_articles".
The application is now accessible on localhost:9000

repository: amstuta/article-research

repo_name: amstuta/article-research


text:
---
id: injection
sidebar_position: 0
---

# Dependency Injection

SenseJS framework provides an advanced injection framework, which features

-  Constructor parameters injection, which is exactly what your expected for a dependency injection framework

-  Method parameters injection, by the method invocation framework. It

The Method Invoking Framework brings the ability to invoke arbitrary method of a component and enhanced the ability of
dependency injection that supports injection from contextually bound injectables that provided by middlewares.

It is the most powerful and elegant part of SenseJS. We'll discuss it in another article of this chapter.

license: ISC

repository: sensejs/sensejs

gha_license_id: NOASSERTION

repo_name: sensejs/sensejs


text:
K.A.I.J.U.
=======
K.A.I.J.U. is a 3D QWOP-like game where the player must take control of either the valiant ATLAS robot defender or the attacking monster. The game was ambitiously created by a group of four students in a Game Design Practicum course using Unity 4 and attempting a 3D game for the first time.

The game can be played on Kongregate here: http://www.kongregate.com/games/Caereus/k-a-i-j-u

Team
-------
- [Brian Gabin](http://github.com/bpgabin)
- [Ruben Telles](http://github.com/gdrtelles)
- [Chase Khamasta](http://github.com/ckhamash)
- [Victor Nguyen](http://github.com/vitnguye)

repository: bpgabin/kaiju

repo_name: bpgabin/kaiju


text:
# numerical-method
Numerical method is the algorithm behind any computation. Here's implementations of various basic numerical methods in Python

## "Computers, Waves, Simulation" course by Prof. Heiner Eigel from Ludwig-Maximillian University (Coursera)
go to [folder](https://github.com/yohanesnuwara/numerical-method/tree/master/LMU_course_Eigel)

repository: abhinain/numerical-method

repo_name: abhinain/numerical-method


text:
# Cesium Terrain Server

A basic server for serving up filesystem based tilesets representing
[Cesium.js](http://cesiumjs.org/) terrain models.  The resources served up are
intended for use with the
[`CesiumTerrainProvider`](http://cesiumjs.org/Cesium/Build/Documentation/CesiumTerrainProvider.html)
JavaScript class present in the Cesium.js client.

This has specifically been created for easing the development and testing of
terrain tilesets created using the
[Cesium Terrain Builder](https://github.com/geo-data/cesium-terrain-builder)
tools.  On its own it is not recommended for production deployments as no
optimisation (especially caching) has been implemented yet.  Caching, however,
can be added to the stack using third party HTTP caching tools.  The code base
can also provide a useful starting point for developing custom applications.

This project also provides a [Docker](https://www.docker.com/) container to
further simplify deployment of the server and testing of tilesets.  See the
[Docker Registry](https://registry.hub.docker.com/u/geodata/cesium-terrain-server/)
for further details.

## Usage

The terrain server is a self contained binary with the following command line
options:

```sh
$ ./server -help
Usage of server:
  -dir=".": the root directory under which tileset directories reside
  -port=8000: the port on which the server listens
```

Assume you have the following (small) terrain tileset (possibly created with
[`ctb-tile`](https://github.com/geo-data/cesium-terrain-builder#ctb-tile)):

```
/data/tilesets/terrain/srtm/
├── 0
│   └── 0
│       └── 0.terrain
├── 1
│   └── 1
│       └── 1.terrain
├── 2
│   └── 3
│       └── 3.terrain
└── 3
    └── 7
        └── 6.terrain
```

To serve this tileset on port `8080`, you would run the following command:

```sh
./server -dir /data/tilesets/terrain -port 8080
```

The tiles would then be available under <http://localhost:8080/tilesets/srtm/>
(e.g. <http://localhost:8080/tilesets/srtm/0/0/0.terrain> for the root tile).
This URL, for instance, is what you would use when configuring
[`CesiumTerrainProvider`](http://cesiumjs.org/Cesium/Build/Documentation/CesiumTerrainProvider.html)
in the Cesium client.

Serving up additional tilesets is simply a matter of adding the tileset as a
subdirectory to `/data/tilesets/terrain/`.  For example, adding a tileset
directory called `lidar` to that location will result in the tileset being
available under <http://localhost:8080/tilesets/lidar/>.

### `layer.json`

The `CesiumTerrainProvider` Cesium.js class requires that a `layer.json`
resource is present describing the terrain tileset.  The `ctb-tile` utility does
not create this file.  If a `layer.json` file is present in the root directory
of the tileset then this file will be returned by the server when the client
requests it.  If the file is not found then the server will return a default
resource.

### Root tiles

The Cesium javascript client requires that the two top level tiles representing
zoom level `0` are always present.  These tiles are represented by the
`0/0/0.terrain` and `0/1/0.terrain` resources. When creating tilesets using the
`ctb-tile` utility only one of these tiles will be generated *unless* the source
terrain dataset intersects with the prime meridian.  The terrain server
addresses this issue by serving up a blank terrain tile if a top level tile is
requested which does not also exist on the filesystem.

## Installation

The server is written in [Go](http://golang.org/) and requires Go to be present
on the system when compiling it from source.  As such, it should run everywhere
that Go does.  Assuming that you have set the
[GOPATH](https://golang.org/cmd/go/#hdr-GOPATH_environment_variable),
installation is a matter of running `go install`:

```sh
go install github.com/geo-data/cesium-terrain-server
```

A program called `cesium-terrain-server` should then be available under your
`GOPATH` (or `GOBIN` location if set).

## Developing

The code has been developed on a Linux platform. After downloading the package
you should be able to run `make server` from the project root to build the
server.

Executing `make docker-local` will create a docker image tagged
`geodata/cesium-terrain-server:local` which when run with a bind mount to the
project source directory is very handy for developing and testing.

## Issues and Contributing

Please report bugs or issues using the
[GitHub issue tracker](https://github.com/geo-data/cesium-terrain-server).

Code and documentation contributions are very welcome, either as GitHub pull
requests or patches.

## License

The [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0).

## Contact

Homme Zwaagstra<EMAIL_ADDRESS>

repository: posslu/cesium-terrain-server

repo_name: posslu/cesium-terrain-server


text:
# openapi.model.CellSchema

## Load the model package
```dart
import 'package:openapi/api.dart';
```

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**lac** | **int** | the Location Area Code of your operator’s network. | [optional] [default to null]
**cid** | **int** | Cell ID | [optional] [default to null]
**radio** | [**RadioSchema**](RadioSchema.md) |  | [optional] [default to null]
**mcc** | **int** | \"Mobile Country Code of your operator’s network represented by an integer (Optional). Range: 0 to 999.\" | [optional] [default to null]
**mnc** | **int** | Mobile Network Code of your operator’s network represented by an integer (Optional). Range: 0 to 999. On CDMA, provide the System ID or SID, with range: 1 to 32767. | [optional] [default to null]
**signal** | **int** | Signal Strength (RSSI) | [optional] [default to null]
**psc** | **int** | Primary Scrambling Code | [optional] [default to null]
**asu** | **int** | Arbitrary Strength Unit | [optional] [default to null]
**ta** | **int** | Timing Advance | [optional] [default to null]

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


text:
---
layout: post
title: A Comprehensive guide to Fine-tuning Deep Learning Models in Keras (Part I)
#feature-img: "img/sample_feature_img.png"
comments: true
---

In this post, I am going to give a comprehensive overview on the practice of fine-tuning, which is a common practice in Deep Learning.

Drawing from my own experience, I will list out the rationale behind fine-tuning, the techniques involved, and last and most important of all, detailed step-by-step guide of how to fine-tune Convolutional Neural Network models in Keras in [Part II](/2016/10/08/fine-tuning-in-keras-part2.html){:target="_blank"} of this post.

## First, why do we fine-tune Models?
When we are given a Deep Learning task, say, one that involves training a Convolutional Neural Network (Covnet) on a dataset of images, our first instinct would be to train the network from scratch. However, in practice, deep neural networks like Covnet has a huge number of parameters, often in the range of millions. Training a Covnet on a small dataset (one that is smaller than the number of parameters) greatly affects the Covnet’s ability to generalize, often result in overfitting.

Therefore, more often in practice, one would fine-tune existing networks that are trained on a large dataset like the ImageNet (1.2M labeled images) by continue training it (i.e. running back-propagation) on the smaller dataset we have. Provided that our dataset is not drastically different in context to the original dataset (e.g. ImageNet), the pre-trained model will already have learned features that are relevant to our own classification problem.

## When to fine-tune Models?
In general, if our dataset is not drastically different in context from the dataset which the pre-trained model is trained on, we should go for fine-tuning. Pre-trained network on a large and diverse dataset like the ImageNet captures universal features like curves and edges in its early layers, that are relevant and useful to most of the classification problems.

Of course, if our dataset represents some very specific domain, say for example, medical images or Chinese handwritten characters, and that no pre-trained networks on such domain can be found, we should then consider training the network from scratch.

One other concern is that if our dataset is small, fine-tuning the pre-trained network on a small dataset might lead to overfitting, especially if the last few layers of the network are fully connected layers, as in the case for VGG network. Speaking from my experience, if we have a few thousand raw samples, with the common data augmentation strategies implemented (translation, rotation, flipping, etc), fine-tuning will usually get us a better result.

If our dataset is really small, say less than a thousand samples, a better approach is to take the output of the intermediate layer prior to the fully connected layers as features (bottleneck features) and train a linear classifier (e.g. SVM) on top of it. SVM is particularly good at drawing decision boundaries on a small dataset.

## Fine-tuning Techniques
Below are some general guidelines for fine-tuning implementation:

**1.** The common practice is to **_truncate the last layer_** (softmax layer) of the pre-trained network and replace it with our new softmax layer that are relevant to our own problem. For example, pre-trained network on ImageNet comes with a softmax layer with 1000 categories.

If our task is a classification on 10 categories, the new softmax layer of the network will be of 10 categories instead of 1000 categories. We then run back propagation on the network to fine-tune the pre-trained weights. Make sure cross validation is performed so that the network will be able to generalize well.

**2.** **_Use a smaller learning rate_** to train the network. Since we expect the pre-trained weights to be quite good already as compared to randomly initialized weights, we do not want to distort them too quickly and too much. A common practice is to make the initial learning rate 10 times smaller than the one used for scratch training.

**3.** It is also a common practice to **_freeze the weights of the first few layers_** of the pre-trained network. This is because the first few layers capture universal features like curves and edges that are also relevant to our new problem. We want to keep those weights intact. Instead, we will get the network to focus on learning dataset-specific features in the subsequent layers.

## Where can we find Pre-trained Networks?
It depends on the deep learning framework. For popular frameworks like *Caffe*, *Keras*, *TensorFlow*, *Torch*, *MxNet*, etc, their respective contributors usually keep a list of the state-of-the-art Covnet models (VGG, Inception, ResNet, etc) with their implementations and pre-trained weights on a common dataset like the ImageNet or CIFAR.

The best way to find those pre-trained models is to google your specific model and framework. However, to facilitate your search process, I put together a list with the common pre-trained Covnet models on popular frameworks.

* **Caffe**
  * [Model Zoo](https://github.com/BVLC/caffe/wiki/Model-Zoo) - A platform for third party contributors to share pre-trained caffe models

* **Keras**
  * [Keras Application](https://keras.io/applications/) - Implementation of popular state-of-the-art Convnet models like VGG16/19, googleNetNet, Inception V3, and ResNet

* **TensorFlow**
  * [VGG16](https://github.com/ry/tensorflow-vgg16)
  * [Inception V3](https://github.com/tensorflow/models/blob/master/inception/README.md#how-to-fine-tune-a-pre-trained-model-on-a-new-task)
  * [ResNet](https://github.com/ry/tensorflow-resnet)

* **Torch**
  * [LoadCaffe](https://github.com/szagoruyko/loadcaffe) - Maintains a list of popular models like AlexNet and VGG .Weights ported from Caffe

* **MxNet**
  * [MxNet Model Gallery](https://github.com/dmlc/mxnet-model-gallery) - Maintains pre-trained Inception-BN (V2) and Inception V3.

## Fine-tuning in Keras
In [Part II](/2016/10/08/fine-tuning-in-keras-part2.html){:target="_blank"} of this post, I will give a detailed step-by-step guide on how to go about implementing fine-tuning on popular models VGG, Inception V3, and ResNet in Keras.

If you have any questions or thoughts feel free to leave a comment below.

You can also follow me on Twitter at @flyyufelix.

{% if page.comments %}

Please enable JavaScript to view the comments powered by Disqus.
{% endif %}


text:
# Tools [![license](https://img.shields.io/npm/l/get-changelog-lib?style=flat-square)](./LICENSE)

> Changelog analysis tools

## Install

```bash
cd packages/tools
npm install
```

## Popular package analysis

Collect data on popular npm packages (1000 by default):
`node src/fetchNpmTopPackages.js [nbPackage]`

This command generates a file (in the data directory) with newline separated json of popular packages data

## Chart generation

Generate pie charts representing common changelog location for active/inactive/total collected packages

`node src/generateCharts.js [file]`


text:
---
name: Bug
about: Found a Bug? Let us know!
title: ''
labels: bug
assignees: ''

---

**Describe the bug**
A clear and concise description of what the bug is.

** Are you using the Retrospectives Tool on-prem?**
[ ] Yes
[ ] No

If Yes, what version of the extension?

**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots**
If applicable, add screenshots to help explain your problem. If you have any developer console information that feels relevant, that is also helpful!

**What screen type are you seeing this on ?**
[ ] Desktop
[ ] Mobile

**Additional context**
Add any other context about the problem here.

repository: microsoft/vsts-extension-retrospectives

repo_name: microsoft/vsts-extension-retrospectives


text:
---
title: jx scm pull-request
linktitle: pull-request
type: docs
description: "Commands for working with pull-requests ***Aliases**: pr*"
aliases:
  - jx-scm_pull-request
---

### Usage

```
jx scm pull-request
```

### Synopsis

Commands for working with pull-requests

### Options

```
  -h, --help   help for pull-request
```

### Source

[jenkins-x-plugins/jx-scm](https://github.com/jenkins-x-plugins/jx-scm)

repository: jenkins-x/jx-docs

gha_language: HTML

repo_name: jenkins-x/jx-docs


text:
# Event Pipe Protocol Specification

The Event Pipe Protocol is the protocol used between a monitored .NET application (called "Application") and a tracing tool (called "Monitor") to enable the Monitor to enable and disable Event Sources in the application, and to enable the Application to signal events, when they occur.

## Goals / Non-Goals

The goals of this protocol are:

1. To represent the set of operations that can be performed in a monitored .NET application and the set of notifications the application can provide
2. To be time-efficient to write and space-efficient in the Application's memory in order to have a minimal impact on the execution of the application.

Some non-goals of this protocol are:

1. To be time-efficient or space-efficient for the Monitor, or to be space-efficient on the Network. The highest priority is application performance. Space-efficient network traffic is desirable only insofar as it makes the Application logic time/space-efficient.

To summarize: The protocol should be trivial to write, but can be complicated to read. It should require no buffering to write but can require buffering when reading. The goal is to shift as much of the burden to the Monitor so that the Application can quickly blit the data out to the socket and move on.

## Ideas

Just a brain dump of some ideas:

* Binary format
* Be careful with length prefixes. If we require a length prefix over the whole message, the message has to be buffered before it can be flushed out to the socket. Better would be to length-prefix smaller chunks.
* In fact, it may be desirable to use delimiters and escaping instead. Delimiters generally mean the receiver has to buffer more, but that's OK here because the Monitor has less pressure to be time-/space-efficient.
* Unlike most network protocols, we should probably encode strings in UTF-16 since that makes it easier to blit the native .NET string type out to the network.
* Fixed-length integers are probably better than variable-length integers.

repository: aspnet/AspLabs

repo_name: aspnet/AspLabs


text:
---
name: "\U0001F310 Propose a refactoring/improvement"
about: Use this to propose refactorings/improvements to the existing code.

---

<!--
Use this to record any proposed refactoring/tech debt/improvement to the
system, in order to discuss it team-wide.
-->

## Problem

<!-- Describe the problem you are trying to solve.
State down the following:

- Why do you think this is a necessary feature for the project to have?
-->

## Solution/implementation plan

<!-- Describe your proposed solution. -->

## (Optional) Alternative solutions considered

<!-- Which were the alternatives considered and why this one was picked as
  the best?
-->

repository: oscoin/oscoin

gha_language: Haskell

repo_name: oscoin/oscoin


text:
# EXEC Command - Node Version Switcher

    nvs exec <version> <exe> [args...]

Runs any executable using a `PATH` environment that includes the specified node version, without changing the caller's `PATH`.

repository: jasongin/nvs

repo_name: jasongin/nvs


text:
# ConnectMe

Flow diagram:
![FlowDiagram](https://user-images.githubusercontent.com/50551211/124631223-2b978680-de51-11eb-8712-b472637c1064.png)

## Table of Contents

### Requirements for ConnectMe & extending DEASSA framework

### SPII - how this is being handled
1. how it is determined if it is SPII data vs non-regulated data

2. how we are handling it

### EventHub to RAW zone - Using DEASSA to ingest data

#### What's required:
   A new widget called 'Message_Type' was added to the Runway Self Service form to process data with multiple message types.

   for e.g. Message_Type for ConnectMe -> MetaData[Empty], Others[FlightTeams, StaticTeams, OneToOne, DoD]

   For applications without Message_Types, the value "none" needs to be entered.

Notebooks modified for ConnectMe:
- ##### events_from_eh_to_raw
- ##### EventHubIngestor
- ##### MetadataTool
- ##### SchemaUtil

The changes include:
- Data validations added to check if the widget value is left empty. If so, value "none" is used. This is to avoid errors during job executions.

	for e.g. val ADLS_CONTAINER: String = Option(dbutils.widgets.get("ADLS_Container")).filter(_.nonEmpty).getOrElse("none")

- A new widget called 'Message_Type' was added to the events_from_eh_to_raw notebook to capture data with multiple message types.

	for e.g. Message_Type for ConnectMe -> MetaData[Empty], Others[FlightTeams, StaticTeams, OneToOne, DoD]

	Multiple data streams are written to seperate tables based on the Message_Types.

- Added code to create new json file (if it does not already exist) containing Map of MessageTypes in Delta Lake container.

	File Location: /cntme/metadata/messageType

	File Name: dataFeedMessageTypeMap.json

	File Contents:
				{
    				"cntme": {
        				"eventType": {
            				"MetaData": ["Empty"],
            				"Others": ["FlightTeams", "StaticTeams", "OneToOne", "DoD"]
        				}
    				}
				}

- Added code in SchemaUtil notebook to use appropriate schema file during the stream read.
		for e.g.
		"Others_FlightTeams" -> "/schema_structtype/schema_structtype_flightteams.json",
		"Others_StaticTeams" -> "/schema_structtype/schema_structtype_staticteams.json",
		"Others_OneToOne" -> "/schema_structtype/schema_structtype_onetoone.json",
		"Others_DoD" -> "/schema_structtype/schema_structtype_dod.json",
		"MetaData_Empty" -> "/schema_structtype/schema_structtype_metadata.json"

### RAW to STRUCT zone
Notebooks modified for ConnectMe:
- ##### 	raw_to_struct_cntme
- ##### 	RawToStructProcessor

Incoming data streams are read and based on the Message_Types in the data, seperate write streams are created and the data stored in the delta lake tables in STRUCT.
The appropriate schema is applied to each data stream before the write.

#### DEASSA Self Service Form changes
- Modified React/TypeScript code Runway\runway\plugins\access-control\src\components\SelfService\SelfServiceReviewPage.tsx to add a field "Message_Type" to the DEASSA self serice form.
	for e.g. Message_Type: `${formInput.messageType}`,

repository: rnaGitHub/ConnectMe

repo_name: rnaGitHub/ConnectMe


text:
---
layout: default
---

# 1996-01-31 - Re: Lotus Notes

## Header Data

From: "Brian A. LaMacchia"<EMAIL_ADDRESS>To<EMAIL_ADDRESS>Message Hash: 7537755bc5e69a640ff07ec44dbf6520112fc5db9a4771629157fe576a37ccaf

Message ID<EMAIL_ADDRESS>Reply To<EMAIL_ADDRESS>UTC Datetime: 1996-01-31 14:38:27 UTC

Raw Date: Wed, 31 Jan 1996 22:38:27 +0800

## Raw message

```
{% raw  %}From: "Brian A. LaMacchia"<EMAIL_ADDRESS>Date: Wed, 31 Jan 1996 22:38:27 +0800
To<EMAIL_ADDRESS>Subject: Re: Lotus Notes
In-Reply-To<EMAIL_ADDRESS>Message-ID<EMAIL_ADDRESS>MIME-Version: 1.0
Content-Type: text/plain

   From: Rich Salz<EMAIL_ADDRESS>   Date: Tue, 30 Jan 1996 19:19:13 -0500
   Cc<EMAIL_ADDRESS>   Sender<EMAIL_ADDRESS>   Precedence: bulk

   >I find this very interesting. RSA prohibits its licencees from using RSA
   >software with truly secure keylenghts.

   Hunh?  I could find no mention of keylength or keysize in the RSAREF
   documents I had around.  I'm at home now, but I also recall no mention
   of keysize or keylength in the license OSF has, either.

In RSAREF 2.0 this is covered by clause 2(d) in the license:

     d.   Prior permission from RSA in writing is required for any
          modifications that access the Program through ways other
          than the published Program interface or for modifications
          to the Program interface. RSA will grant all reasonable
          requests for permission to make such modifications.

The published interface references the following constants in source/rsaref.h:

/* RSA key lengths.
 */
#define MIN_RSA_MODULUS_BITS 508
#define MAX_RSA_MODULUS_BITS 1024
#define MAX_RSA_MODULUS_LEN ((MAX_RSA_MODULUS_BITS + 7) / 8)
#define MAX_RSA_PRIME_BITS ((MAX_RSA_MODULUS_BITS + 1) / 2)
#define MAX_RSA_PRIME_LEN ((MAX_RSA_PRIME_BITS + 7) / 8)

As part of the agreements leading to the release of MIT PGP 2.6 we
received explicit permission from RSADSI to increase
MAX_RSA_MODULUS_BITS to 2048.

					--bal

{% endraw %}
```

## Thread

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

+ Return to "["Brian A. LaMacchia" <bal@martigny.ai.mit.edu>](/authors/brian_a_lamacchia_bal_at_martigny_ai_mit_edu_)"
+ Return to<EMAIL_ADDRESS>(Futplex)](/authors/futplex_at_pseudonym_com_futplex_)"
+ Return to "[Rich Salz <rsalz@osf.org>](/authors/rich_salz_rsalz_at_osf_org_)"

+ 1996-01-31 (Wed, 31 Jan 1996 23:31:06 +0800) - [Re: Lotus Notes](/archive/1996/01/fda053e934e06350d5c84ebf7a022b447d3428d06246cabc7053fa80b6c0afaf) - _Rich Salz<EMAIL_ADDRESS>  + 1996-01-31 (Wed, 31 Jan 1996 22:38:27 +0800) - Re: Lotus Notes - _"Brian A. LaMacchia"<EMAIL_ADDRESS>    + 1996-01-31 (Wed, 31 Jan 1996 22:36:06 +0800) - [Re: Lotus Notes](/archive/1996/01/e744ba6ccb40c671fc14afcf292ba6620530468b7268485c2070a68187b4fcef) -<EMAIL_ADDRESS>(Futplex)_


text:
---
path: "/blog/post/2016-03-18_event_loop"
date: "2016-03-18"
title: "The Node Event Loop"
summary: "Coffee shops and the Node event loop"
abstract: "The Node event loop is the core concept behind Node's performance.  Here is a little metaphor that will hopefully help you understand a little bit more about it."
author: "Joel Lord"
formattedDate: "March 18th, 2016"
banner: "loop"
keywords: ["javascript", "node", "event loop"]
---
One of the biggest hesitation from Java developers in adopting NodeJs is
the fact that it’s single threaded. So how come so many large companies
have still decided to use NodeJs as their backend infrastructure? Well,
the NodeJs is single threaded but it relies on its event loop to
delegate work asynchronously.

## So what does that mean?

I am currently writing this from a small local coffee shop. This place
is a great place to work from. It’s rather quiet during the weekdays
afternoons and they have a great wifi connection. Because it’s rather
quiet, they only have 1 employee during the day. When I get to the
counter, the employee takes my order, goes to the coffee machine to do
my coffee and then comes back to the counter with my coffee, tells me
the total and I pay using my card.

## So what about this other major coffee chain?

If you’ve been to this fancy very large coffee shop lately, you might
have noticed that things work a bit differently. Over there, you go to
the counter, order your “Triple, Venti, Soy, No Foam Latte”, the clerk
asks for your name and yells your order to the other employee that is in
charge of the coffee machine. You then pay and go wait for your coffee a
little further away. Once the coffee is ready, the employee at the
counter will call your name and you can pick up your coffee.

 You have one process that
is triggered every time a request comes in. This process then does
multiple things and ends. This causes this process to have a lot of idle
time. It is also synchronous. Everything happens one after the other in
an order that you would more or less expect it to happen.

Now, say that the owner wanted to be able to serve more people at once.
He could add another employee with it’s own cash register, coffee
machine and credit card machine so that if someone arrives at the same
time as I do, both employees will be able to simultaneously serve the
two of us.

The larger chain works like a Node server. The main employee delegates
an i/o task to the coffee maker and then continues with his normal tasks
which is to make you pay. Once the coffee is ready, the employee calls
your name and you receive your coffee asynchronously (that’s the call
back).

Now, if they need to speed up things a little bit during the rush hour,
they will add another person at the coffee machine but won’t necessarily
add another cashier because the latter is not blocked by the espresso
maker.

Node uses this event loop to allow multiple things to happen at once.
This makes it much easier for developers to build scalable systems
without worrying about locks. Despite the fact that Node does not use
threads, you can still take advantage of the multiple cores on your
server by using child processes (see the [blog
article](/blog/post/2016-03-05_using_cluster)).

repository: joellord/blog

repo_name: joellord/blog


text:
---
title: "CAP Theorem"
date: 2022-04-26
tags:
- seed
---

CAP theorem states that when designing and deploying applications in distributed environments, you can only optimize for 2 out of the following 3 properties:

1. [[thoughts/consistency|Consistency]]: a system operates fully or not at all, all nodes agree (the system's behaviour is indistinguishable from a centralized system)
2. Availability: system is always able to answer a request
3. Partition Tolerance: if data is distributed and some nodes fail, the whole system can continue to function

One way to illustrate this is to imagine a set of clusters trying to agree on a value. There is a network partition between two groups of nodes in the cluster called A and B. They all initially have a value `x = 0`.  A client ever issues a command `x = 1` to a node `i` in A and sometime in the future, a client issues another command `return x`.
1. If node `i` ever returns 1, this violates consistency as B cannot have heard of the update from A.
2. If it only ever answers 0, this violates availability as `x = 1` was never appropriately set.

ACID vs BASE
- ACID stands for atomicity, consistency, isolation, durability
	- Prioritizes C and A
	- Immediate consistency limits scale-out performance
- BASE stands for basically available, soft state, eventual consistency
	- Prioritizes A and P
	- Scale-out performance is greatly enhanced
	- Fine when nature of the data can tolerate some imprecision in query results

path: /content/thoughts/CAP Theorem.md

branch_name: refs/heads/hugo

filename: CAP Theorem.md

gha_language: SCSS


text:
# 669. Coin Change

- **Description**
    - You are given coins of different denominations and a total amount of money amount. Write a function to compute the fewest number of coins that you need to make up that amount. If that amount of money cannot be made up by any combination of the coins, return `-1`.
    - You may assume that you have an infinite number of each kind of coin.
- **Example**
    - Given `coins = [1, 2, 5]`, `amount = 11`
        - return `3` (11 = 5 + 5 + 1)
    - Given `coins = [2]`, `amount = 3`
        - return `-1`.

## Solution

### Dynamic Programming

1. **确定状态**
    - 状态在动态规划中的作用属于定海神针,
    - 确定最后一步 --- 最优策略中使用的最后一枚硬币 `A(k)`
    - 化成子问题 --- 最少的硬币拼出更小的面值 `27-A(k)`
2. **转移方程**
    - `f(x)` = 最少用多少枚硬币拼出 `X`
    - `f(27) = min {f(27-2) + 1, f(27-5) + 1, f(27-7) + 1}`
3. **初始条件和边界条件**
    - 如果不能拼出 `Y`，就定义 `f[Y]=正无穷`，
    - `x-2`, `x-5`，`x-7` 少于 `0` 怎么办
    - `f[0] = 0`
4. **拼出 `X` 所需要的最少硬币数**
    - 计算 `f[1],f[2],...,f[7]`

**消除冗余，加速计算**

这道题的关键就在于确定状态和怎么写转移方程。另外一方面，`f[0] = 0` 的初始化条件和循环 `i` 从 `1` 开始也非常重要。中间还需要判定条件让下标为正以及前一个值能够拼的出来。

### Python

```python
import sys

class Solution:
    """
    @param coins: a list of integer
    @param amount: a total amount of money amount
    @return: the fewest number of coins that you need to make up
    """
    def coinChange(self, coins, amount):
        # write your code here

        # Initialize dp array -> combination of coins
        comb = [sys.maxint] * (amount + 1)
        comb[0] = 0

        # iterate amout of money
        for i in xrange(amount + 1):

            # iterate coins
            for coin in coins:

                # if current amout is greater than coin value and
                # we can reach the diff of amout and current coin
                if i >= coin and comb[i - coin] != sys.maxint:

                    # update
                    comb[i] = min(comb[i - coin] + 1, comb[i])

        # return if we can give a feasible combination
        return comb[amount] if comb[amount] != sys.maxint else -1
```

### Java

```java
public class Solution {
    /**
     * @param coins: a list of integer
     * @param amount: a total amount of money amount
     * @return: the fewest number of coins that you need to make up
     */
    public int coinChange(int[] coins, int amount) {
        // write your code here

        int[] f = new int[amount + 1];
        int n = coins.length;

        // Initialization
        f[0] = 0;

        for (int i = 1; i <= amount; i++) {

            f[i] = Integer.MAX_VALUE;

            for (int j = 0; j < n; j++) {

                if (i - coins[j] >= 0 && f[i - coins[j]] != Integer.MAX_VALUE) {
                    f[i] = Math.min(f[i], f[i - coins[j]] + 1);
                }

            }

        }

        // Double check
        if (f[amount] != Integer.MAX_VALUE) {
            return f[amount];
        } else {
            return -1;
        }

    }
}
```

repository: jxhangithub/lintcode

path: /Medium/669. Coin Change/README.md

repo_name: jxhangithub/lintcode


text:
---
wordpress_id: 233
title: Rails authenticity token with jQuery
categories:
- JavaScript
- Ruby on Rails
- jQuery
date: 2008-05-31 21:25
layout: post
comments: true
---
By default, Rails 2 employs protection against CSRF attacks.

What it comes down to is sending an authenticity token (unique per session) along with all non-GET requests as well as all Ajax requests.

I prefer jQuery to Prototype, the JavaScript library that ships with Rails. This is how I made jQuery automagically send the authenticity token along with all Ajax requests.

In my application layout, I stick an authenticity token in a JavaScript variable in the page header:

``` rhtml
<%= javascript_tag "var AUTH_TOKEN = #{form_authenticity_token.inspect};" if protect_against_forgery? %>
```

Then in my application.js file:

``` javascript
$(document).ajaxSend(function(event, request, settings) {
  if (typeof(AUTH_TOKEN) == "undefined") return;
  // settings.data is a serialized string like "foo=bar&baz=boink" (or null)
  settings.data = settings.data || "";
  settings.data += (settings.data ? "&" : "") + "authenticity_token=" + encodeURIComponent(AUTH_TOKEN);
});

```

ajaxSend is a global event that is broadcast before every Ajax request. This code adds a handler for that event, that in turn adds the authenticity token to the request data.

This solution was inspired by some code by "Andreas" in an "Err the Blog" comment. Note that if you use $.ajaxSetup({data: …}), though, you only set default data, that is overwritten if the Ajax request has data of its own. My solution effectively merges the authenticity token into whatever other data is in the request.

repository: henrik/octopress

extension: markdown

gha_language: Ruby

repo_name: henrik/octopress


text:
Start Bootstrap - SB Admin 2
=========

Warning: you have to put this files in a HTTP Server and access the site through
this server. Double clicking index.html won't work.

Tip: To install a HTTP Server in seconds, just open a terminal with Python available,
change to the directory where your index.html is contained and type
"python -m SimpleHTTPServer". Then access http://localhost:8000/index.html using
your browser.

Description:

This is a modified version (see angularmod branch). It uses Angular.js to organize
better the page contents. HTML regarding menus are all in a single file
(templates/navigation.html), while the real content are all in the partials folder,
without the code from menus.

It also loads the page contents without refreshing the whole page, thanks to Angular.js.

Please take a look at the file js/main.js. It is responsible for loading all the
pages using Angular.js. It will be useful in case you want to add or remove the
existing pages.

Enjoy.

repository: bahwan/bct-payment

repo_name: bahwan/bct-payment