text:
## [v0.41.0]
### docs
- **:** use docs-old for now for some docs
### fix
- **ams:** fix ams integration test due to op renaming
- **lobby:** disable lobby presence integration test temporarily

## [v0.40.0]
### feat
- **integration:** add lobby presence test
### fix
- **integration:** add lobby connect before start session browser test
- **integration:** use admin delete session endpoint for session browser test

## [v0.39.0]
### feat
- **core:** added on demand refresh token option
- **test:** added integration test for on demand refresh token
- **sample:** added sample app for on deman refresh token
- **mock-server:** change jenkinfile for new mock-server path
### docs
- **:** updated readme with on demand refresh token info
### fix
- **integration:** fix get match pool detail integration test

## [v0.38.0]
### feat
- **core:** added json serialization options and its tests

## [v0.37.0]
### fix
- **test:** try fix seasonpass init store fail in integration test

## [v0.36.0]
### fix
- **tests:** fixed remaining hardcoded httpbin config
### chore
- **sdk:** generated from openapi spec commit: c30f5d94054e605e482f1877ff7238f721d561de
- bump down version to 0.35
### feat
- **test:** added initial AMS integration test
- added AMS service

## [v0.35.0]
### chore
- **jenkinsfile:** update generate spec target
### fix
- **tests:** fixed leaderboard integration test

## [v0.34.0]
### fix
- change agent for github jenkins job
- **ci:** add HOME env to pack push action
- **sample:** updated tic tac toe sample due to custom op implementation
- **sample:** adjust deps version for custom op test project
- make custom op test explicit
### ci
- **generate:** refactor jenkinsfile.generate
- **generate:** generate changelog also
### feat
- **sample:** added custom op sample projects
- added support for custom sdk and its builder
### docs
- **guide:** updated custom operation guide
- added migration guide draft for 0.34.0

## [v0.33.0]

## integration
- test: due to code level breaking change caused by openapi spec changes in platform service

## makefile
- ci: add outstanding_deprecation target

## jenkinsfile.generate
- ci: add outstanding deprecation check
- ci: fix error when no outstanding deprecation

## github
- ci: add publish to nuget step for github jenkin job

## sdk
- chore: - generated from source sdk spec commit: 833206f541b49d45e4d1a5d1f5ea5acb1b9c1688

## [v0.32.0]
- Sample: update CLI sample app to use op builder pattern
- Docs: add enable http logging in README
- Docs: updated migration guide link in README

## [v0.31.1]
- Hotfix: fixed image size model's property for DSMC service.

## [v0.31.0]
- Removed title matchmaking sample app.
- Updated Basic and Session service integration tests.
- Fixed refresh token integration test.

## [v0.30.0]
- Updated documentations due to name change.

## [v0.29.0]
- API models and endpoints changed. See affected items [here](docs/migration-guides/migration-guide-v0.28-to-v0.29.md)
- Updated AWS Lambda sample app to allow both local tests and FunctionURL invocation.
- Update Lobby integration tests.
- Fixed some minor defects detected by Coverity Scan.
- Added reporting service integration test.

## [v0.28.0]
- Changed operation's static var for builder object to static property.
- Added new generic method for operation that has response with object data type in it.

## [v0.27.0]
- Updated local OAuth Client token validation.
- Fixed Platform integration tests.

## [v0.26.0]
- Fixed MatchV2 integration test for MatchPool.
- Added local OAuth Client token validation (PREVIEW FEATURE).

## [v0.25.0]
- Fixed deprecated messages.

## [v0.24.0]
- Added Create User V3 integration test.
- Namespace changed for some endpoints. See affected endpoint's [here](docs/migration-guides/migration-guide-v0.23-to-v0.24.md)

## [v0.23.0]
- Added [getting started](samples/AccelByte.Sdk.Sample.GettingStarted) sample app.
- Added OpenAPI 2.0 vendor extension [information](spec/openapi-2.0-vendor-extensions.md).
- Make `AB_APP_NAME` optional in `DefaultConfigRepository`.
- Updated OIDC integration test.

## [v0.22.0]
- Added new Matchmaking V2 API
- Added new Session API
- Added integration tests for both Matchmaking V2 and Session API.
- Updated APIs
	- dslogmanager:
		- updated endpoints
	- dsmc
		- updated endpoints
		- updated model
	- iam
		- added new endpoints
		- updated endpoints
	- matchmaking
		- updated endpoints
	- platform
		- updated models
		- **BREAKING CHANGE** `OptionBoxItem` changed to `EntitlementLootBoxReward`
		- **BREAKING CHANGE** `TrackedEntitlementInfo` changed to `EntitlementDecrementResult`
		- **BREAKING CHANGE** `PlayStationReconcileResult` changed to `LootBoxReward`
		- updated endpoints
	- seasonpass
		- updated model

## [v0.21.2]
- Hotfix: revert breaking change on `TelemetryBody` model in gametelemetry API.

## [v0.21.1]
- Hotfix: revert breaking change on `ModelsUserAchievementResponse` model in achievement API.

## [v0.21.0]
- Updated getting started document.
- Fixed HTTP Clients that always send empty body on GET request.

## [v0.20.0]
- Fixed HTTP Clients to handle upload stream handling.
- **BREAKING CHANGE** Fixed operation's response to output `Stream` object for most of export endpoints.

## [v0.19.0]
- Changed doc folder structure.
- **BREAKING CHANGE** IAM TokenGrantV3 operation's response has changed from `OauthmodelTokenResponseV3` to `OauthmodelTokenWithDeviceCookieResponseV3`.
- **BREAKING CHANGE** `ITokenRepository` interface introduce new methods to accomodate `OauthmodelTokenWithDeviceCookieResponseV3`.

## [v0.18.0]
- Fixed issues detected by coverity scan
- Fixed service integration tests due to retry policy used by all request that expect exception.
- Replaced deprecated operations in IAM service integration tests.
- Fixed WS CLI issues when running on specific AMI image used by jenkins worker.

## [v0.17.0]
- Added Tic Tac Toe sample apps (Local Server, Game Client, and AWS Lambda)
- Fixed awesome message parsing
- Moved integration tests into different classes respective to AB Cloud service name
- Added common use cases documents [here](docs/common_use_cases.md)

## [v0.16.0]
- Fixed bug on web socket execute routing in CLI sample app
- Added web socket interactive mode in CLI sample app
- Added Title Matchmaking sample apps (AWS Lambda, Local Server, and Client)
- Added Json file configuration and credential repository

## [v0.15.0]
- Added integration test for SeasonPass
- Added integration test for QoSM
- Switch public HttpBin with locally deployed HttpBin image for core tests
- **POSSIBLE BREAKING CHANGE** Moved all deprecated operations back from its own namespace respective to each service.

## [v0.14.0]
- Updated APIs
	- achievement
		- updated endpoints
	- cloudsave
		- updated endpoints
	- dsmc
		- updated model
	- eventlog
		- updated endpoints
	- gametelemetry
		- added new endpoints
	- gdpr
		- updated endpoints
	- group
		- updated endpoints
	- iam
		- added new endpoints
		- updated endpoints
	- leaderboard
		- updated endpoints
	- legal
		- updated endpoints
	- platform
		- added new endpoints
		- updated endpoints
	- seasonpass
		- updated endpoints
	- social
		- updated endpoints
	- ugc
		- updated endpoints
		- added new endpoints

## [v0.13.0]
- Fixed automatic token refresh performance issue.
- Added scheduled token refresh as an alternative to automatic token refresh.
- Added Platform login feature.
- Added OIDC sample web app.
- **BREAKING CHANGE** Moved all deprecated operations into its own namespace respective to each service.
- **POSSIBLE BREAKING CHANGE** There are some deprecated endpoints in IAM service.
- Added new endpoints in Platform service.
- Updated CLI sample app due to token refresh support and deprecation change.

## [v0.12.0]
- Fixed basic user profile integration tests
- Updated gametelemetry integration test
- Updated APIs
	- basic
		- updated endpoints
		- updated model
	- dslogmanager
		- updated endpoints
	- dsmc
		- updated endpoints
	- group
		- updated model
	- iam
		- updated model
		- updated endpoints
	- legal
		- updated endpoints
	- platform
		- updated models
		- added new endpoints
		- updated endpoints
	- seasonpass
		- updated models
	- social
		- updated models
	- ugc
		- updated model
		- updated endpoints

## [v0.11.0]
- Implemented token auto refresh
- Updated APIs
	- achievement
		- updated endpoints
	- cloudsave
		- added new endpoints
		- updated endpoints
	- dsmc
		- updated endpoints
	- iam
		- updated models
		- updated endpoints
	- lobby
		- added new endpoints
	- platform
		- updated models
	- seasonpass
		- added new endpoints
		- updated models
		- updated endpoints

## [v0.10.0]
- Implemented enum patches in operation's parameter
	- Possible **BREAKING CHANGES**
- Updated operation indexes
- Updated APIs
	- lobby
		- updated endpoints
		- **BREAKING CHANGES**
			- `ModelRequestFriendsRequest` replaced by `ModelUserRequestFriendRequest`

## [v0.9.0]
- Implemented enum in operation's parameter
	- Possible **BREAKING CHANGES**.
- `StringEnum::Create` function is renamed to `StringEnum::NewValue`.
- Updated APIs
	- dsmc
		- updated models
	- gametelemetry
		- updated endpoints
	- iam
		- updated models
	- platform
		- added new endpoints
		- updated endpoints
		- deprecation notice for some of wallet endpoints
	- ugc
		- updated endpoint

## [v0.8.0]
- Updated core unit tests.
- Moved cli tests to cli project's folder.
- Updated APIs.
	- iam
		- updated endpoints
	- matchmaking
		- updated endpoints
	- platform
		- added new endpoints
		- updated endpoints
	- sessionbrowser
		- added new endpoints
	- social
		- added new endpoints
		- updated endpoints
	- ugc
		- updated endpoints

## [v0.7.0]
- Added support for cookie parameters
- Added fluent interface as an alternative way to access operations and wrappers object directly from sdk object.
- Updated integration tests.
- Updated readme and operation indexes.
- Updated APIs.
	- gametelemetry
		- updated endpoints (exposed optional cookie authentication)
	- iam
		- updated endpoints
		- **BREAKING CHANGES**
			- `PublicRemoveTrustedDeviceV4` now required device token to be specified.
	- platform
		- added new endpoints
	- ugc
		- added new endpoint.

## [v0.6.0]
- Updated integration tests.
- Renamed some operation wrappers for better clarity.
- Updated readme file.
- Added operation indexes at [docs](docs).
- Updated APIs.
	- cloudsave:
		- added new endpoints.
	- dslogmanager:
		- **BREAKING CHANGES**
			- Renamed wrapper Operations class to DslogmanagerOperations.
	- dsmc
		- **BREAKING CHANGES**
			- Renamed wrapper Operations class to DsmcOperations.
	- gametelemetry
		- added new endpoints.
		- **BREAKING CHANGES**
			- Renamed wrapper Operations class to GametelemetryOperations.
	- iam
		- updated endpoints.
	- legal
		- updated endpoints.
	- lobby
		- updated models.
		- **BREAKING CHANGES**
			- Renamed wrapper Operations class to LobbyOperations.
	- matchmaking
		- updated models.
		- **BREAKING CHANGES**
			- Renamed wrapper Operations class to MatchmakingOperations.
	- platform
		- updated endpoints.
	- ugc
		- updated endpoints.
		- added new endpoints.

## [v0.5.0]
- Fixed some of integration tests.
- Added new integration tests for legal service.
- Updated APIs.
	- cloudsave:
		- added new endpoints.
		- updated endpoints.
		- added models.
		- updated models.
		- BREAKING CHANGES (deleted some models related to game reord and player record).
	- dslogmanager:
		- updated models.
	- iam
		- added new endpoints.
		- added models.
		- updated endpoints.
	- legal
		- added new endpoint.
		- updated endpoints.
	- lobby
		- added new endpoints.
		- updated endpoints.
		- updated models.
		- BREAKING CHANGES (deleted some endpoints related to export/import config).
	- platform
		- updated models.
	- sessionbrowser
		- updated endpoints.
	- ugc
		- updated endpoints.

## [v0.4.0]
- Added AWS Lambda sample app. See it's README in samples/AccelByte.Sdk.Sample.Aws.Lambda
- Added integration tests.
- Enabled builder pattern for creating AccelByteSDK object.
- Added optional credential repository to store credential used by client.
- Added logging feature (disabled by default).
- Fixed awesome message parsing.
- Updated APIs.
	- iam:
		- added new endpoints.
		- updated some endpoints.
	- lobby: updated endpoints.
	- platform: updated endpoints.

## [v0.3.0]
- Added lobby service feature.
- Added amazon trace id in every request.
- Added user agent info in every request.
- Added app name in config repository.
- Enabled builder pattern in operation classes.
- Updated APIs.
	- dsmc: added new endpoints.
	- platform: added new endpoints

## [v0.2.0]
- Added CLI sample application.
- Updated tests.
- Added file extension to MIME type converter for file upload.
- Updated APIs.
	- Added summary on each operation
	- iam: added new parameter in TokenGrantV3
	- lobby: added new endpoint.
	- platform:
		- added new endpoints.
		- updated endpoints.
	- seasonpass: added new endpoint.
	- social: added new endpoint.

## [v0.1.0]

Initial release of C# SDK for AccelByte platform.

Supported APIs:

- achievement
- basic
- cloudsave
- dslogmanager
- dsmc
- eventlog
- gametelemetry
- gdpr
- group
- iam
- leaderboard
- legal
- lobby
- matchmaking
- platform
- qosm
- seasonpass
- sessionbrowser
- social
- ugc

repository: AccelByte/accelbyte-csharp-sdk

repo_name: AccelByte/accelbyte-csharp-sdk


text:
# Populatio

- Master Build Status [![Build Status](https://travis-ci.org/PopulatioInc/Populatio.svg?branch=master)](https://travis-ci.org/PopulatioInc/Populatio)
- Development Build Status [![Build Status](https://travis-ci.org/PopulatioInc/Populatio.svg?branch=develop)](https://travis-ci.org/PopulatioInc/Populatio)
- License [![LICENSE](https://img.shields.io/github/license/populatioinc/populatio.svg?style=flat-square)](https://github.com/populatioinc/populatio/LICENSE)
- Release [![Releases](https://img.shields.io/github/release/populatioinc/populatio/all.svg?style=flat-square)](https://github.com/populatioinc/populatio/releases)
- CodeCov [![codecov](https://codecov.io/gh/PopulatioInc/Populatio/branch/master/graph/badge.svg)](https://codecov.io/gh/PopulatioInc/Populatio)

20 requirements of 32 have been implemented, which is 62.5%.

Unfortunately we could not add any screenshots as proof as the dB connection kept failing so we couldn't figure out how to reflect the outputs in time.

| ID | Name | Met | Screenshot |
| --- | --- | --- | --- |
| 1 | All the countries in the world organised by largest population to smallest. | NO |  |
| 2 | All the countries in a continent organised by largest population to smallest. | NO |  |
| 3 | All the countries in a region organised by largest population to smallest. | YES (Have) | Can't Connect to database |
| 4 | The top N populated countries in the world where N is provided by the user. | YES (Have) | Can't Connect to database |
| 5 | The top N populated countries in a continent where N is provided by the user. | YES (Have) | Can't Connect to database |
| 6 | The top N populated countries in a region where N is provided by the user. | YES (Have) | Can't Connect to database |
| 7 | All the cities in the world organised by largest population to smallest. | YES (Have) | Can't Connect to database |
| 8 | All the cities in a continent organised by largest population to smallest. | YES (Have) | Can't Connect to database |
| 9 | All the cities in a region organised by largest population to smallest. | YES (Have) | Can't Connect to database |
| 10 | All the cities in a country organised by largest population to smallest. | YES (Have) | Can't Connect to database |
| 11 | All the cities in a district organised by largest population to smallest. | YES (Have) | Can't Connect to database |
| 12 | The top N populated cities in the world where N is provided by the user. | YES (Have) | Can't Connect to database |
| 13 | The top N populated cities in a continent where N is provided by the user. | YES (Have) | Can't Connect to database |
| 14 | The top N populated cities in a region where N is provided by the user. | YES (Have) | Can't Connect to database |
| 15 | The top N populated cities in a country where N is provided by the user. | YES (Have) | Can't Connect to database |
| 16 | The top N populated cities in a district where N is provided by the user. | YES (Have) | Can't Connect to database |
| 17 | All the capital cities in the world organised by largest population to smallest. | No |  |
| 18 | All the capital cities in a continent organised by largest population to smallest. | No |  |
| 19 | All the capital cities in a region organised by largest to smallest. | No |  |
| 20 | The top N populated capital cities in the world where N is provided by the user. | No |  |
| 21 | The top N populated capital cities in a continent where N is provided by the user. | No |  |
| 22 | The top N populated capital cities in a region where N is provided by the user. | No |  |
| 23 | The population of people, people living in cities, and people not living in cities in each continent. | No |  |
| 24 | The population of people, people living in cities, and people not living in cities in each region. | No  |  |
| 25 | The population of people, people living in cities, and people not living in cities in each country. | No |  |
| 26 | The population of the world. | YES (Have)  | Can't Connect to database |
| 27 | The population of a continent. | YES (Have) | Can't Connect to database |
| 28 | The population of a region. | YES (Have) | Can't Connect to database |
| 29 | The population of a country. | YES (Have) | Can't Connect to database |
| 30 | The population of a district. | YES (Have) | Can't Connect to database |
| 31 | The population of a city. | YES (Have) | Can't Connect to database|
| 32 | The number of people who speak Chinese, English, Hindi, Spanish and Arabic from greatest number to smallest, including the percentage of the world population. | No |  |

| Name | Code Review 1 | Code Review 2 | Code Review 3 | Code Review 4 | Final Deliverable | Average |
|------|---------------|---------------|---------------|---------------|-------------------|-------|
| Venetsia Krasteva | 0.25 | 0.25 | 0.25 | 0.25 | 0.25 | 0.25 |
| Celeste Prussiani | 0.25 | 0.25 | 0.25 | 0.25 | 0.25 | 0.25 |
| Dominic Manderson | 0.25 | 0.25 | 0.25 | 0.25 | 0.25 | 0.25 |
| Alexander Koenig | 0.25 | 0.25 | 0.25| 0.25 | 0.25 | 0.25 |

repository: PopulatioInc/Populatio

branch_name: refs/heads/master

extension: md

gha_language: Java

license_type: permissive

repo_name: PopulatioInc/Populatio


text:
# jb-searchbar-react

bring you a search bar for custom filter of list or anything else you need to filter and has following benefit:

- support different type of filter like  text, number, date, list
- unlike big filter panel jb-searchbar take only 45px of height and can open up so much space for you
- good and smooth animation
- responsive
- you can limit the use of each filter for user

## installation

run `npm install jb-searchbar-react` to install package with npm

## usage

import component in your page `import JBSearchBar from 'jb-searchbar-react'`
you can import special edition for different envirement like es6 or requirejs or systemjs like:
`import JBSearchBar from 'jb-searchbar-react/dist/JBSearchBar.cjs.min'` for requirejs version
`import JBSearchBar from 'jb-searchbar-react/dist/JBSearchBar.min'` for standard es6
`import JBSearchBar from 'jb-searchbar-react/dist/JBSearchBar.systemjs.min'` for systemjs

use below syntax in your render function

`<JBSearchBar config={this.model.searchbarConfig} className="your-custom-class" onSearch={(e)=>this.model.onSearch(e)}></JBSearchBar>`
config example:

```javascript
{
    columns=[
        {
            id:1,
            name:'UserId',
            caption:"شناسه کاربر",
            type:"number",
        },
        {
            id: 2,
            name:'UseName',
            caption:"نام کاربر",
            type:"text",
        },
        {
            id:3,
            name:'RegistrationDate',
            caption:"تاریخ ثبت نام",
            type:"date",
            [config:{/*jb-dateinput-react standard config*/}] //optional
        },
        {
            id:4,
            name:'Gender',
            caption:"جنسیت",
            type:"list",
            config:{
                /*the config is standard config of jb-selectbox-react*/
                options:[
                    {
                        value:"male",
                        caption:"آقا"
                    },
                    {
                        value:"female",
                        caption:"خانم"
                    },
                ],
                placeHolder:"جنسیت را انتخاب کنید"
            }
        }
    ]
    //after config binded to component you can call this function outside of component
    triggers={
       focus : undefined, //focus on filter bar
       injectFilter:undefined //you can add filter object dynmically in code
   }
   callBacks={
       onChange : undefined, //on user select or remove filter
       oncolumnSelect:undefined, //on user select a column to set value but value is not set by user yet
       onHeightOverflow:undefined,//when user select a filter and it cant fit in searchbar width the searchbar expand and call this callback function so you can react to it in your code
       onHeightChange:undefined //like on onHeightOverflow but called when height grow or shrink and not just grow
   }
   //determine if you want trigger search button on filter bar value changed if set to false user have to click on search button after change the filter list value
   searchOnChange = true;//true or false,
   captions={
    unknownSelectedOptionCaption:"ستون نامشخص", //when selected column dont have caption
    unknownSelectedOptionValue:"مقدار نا مشخص" //when selected column dont have specified value
   }
}
```

triggers fill inside of component and you can call them outside of searchbar component.
callBacks is defined by you and component will call them on event happend
the onSearch prop get a function and when user click on a search button this function will called

demo image:
![demo](demo-gif.gif)

license: MIT

repository: javadbat/packages

gha_language: JavaScript

repo_name: javadbat/packages


text:
### General purpose text translations for sofware developers

TurboLocales is a text translation library that is designed to work as a general purpose resource of texts translations for sofware developers. All the translated texts are organized into different categories (bundles) that represent common application areas like "users", "products", "user-interface"...

By using TurboLocales you can avoid the tedious task of translating most of the commonly used texts that software applications use.

### How to use it

You simply have to download the "TurboLocales-<bundleformat>" folder that is right for you and load it into your project like any other bundle you may use.

### Supported languages

The library currently supports the following languages:

- English (USA)
- Spanish (SPAIN)

Please help us grow this list!

### Localization bundle formats

This translation library is designed to be cross platform and it is structured in a per-bundle-format basis. This repository contains one folder for each one of the bundle formats in which the translations are avaliable. This is the list of bundle formats:

- TurboLocales-Properties

    - This folder contains the translated texts using the JAVA properties format. Each bundle is stored as a "<bundlename>/<bundlename>_<xx_XX>.properties" file where bundlename is the name of the bundle and xx_XX is the locale in which the texts are translated.

Please help us improve this list. If you find for example that it would be interesting to have a "TurboLocales-Android-Json" folder containing all the translated texts in android json format, please contact us!

### Contribute

TurboLocales is 100% free and open source, but we will be really pleased to receive any help, support, comments or donations to help us improve this library. We are open to translation for new languages and new tags to be added to the library bundles. And if you like it, spread the word!

### Donate

[![Donate](https://turboframework.org/view/views/home/donate-button.png)](https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=53MJ6SY66WZZ2&lc=ES&item_name=TurboCommons&no_note=0&cn=A%c3%b1adir%20instrucciones%20especiales%20para%20el%20vendedor%3a&no_shipping=2&currency_code=EUR&bn=PP%2dDonationsBF%3abtn_donateCC_LG%2egif%3aNonHosted)

repository: edertone/TurboLocales

repo_name: edertone/TurboLocales


text:
## SPI loop

SPI sends data from "main" and receives them in corresponding IRQ.

## Features
 - Clock source: HSE
 - SYSCLK: 48 MHz
 - APB1: 48 MHz
 - CMSIS only

## Licence
MIT Licence


text:
# ContentBasedRouter

```text
eip-1/MessageRouting/ContentBasedRouter
```

```text
include('eip-1/MessageRouting/ContentBasedRouter')
```

| Illustration | ContentBasedRouter | ContentBasedRouterGroup |
| :---: | :---: | :---: |
| ![illustration for Illustration](../../eip-1/MessageRouting/ContentBasedRouter.png) | ![illustration for ContentBasedRouter](../../eip-1/MessageRouting/ContentBasedRouter.Local.png) | ![illustration for ContentBasedRouterGroup](../../eip-1/MessageRouting/ContentBasedRouterGroup.Local.png) |

## Sprites
The item provides the following sriptes:

- `<$ContentBasedRouterXs>`
- `<$ContentBasedRouterSm>`
- `<$ContentBasedRouterMd>`
- `<$ContentBasedRouterLg>`

## ContentBasedRouter

### Load remotely
```plantuml
@startuml
' configures the library
!global $LIB_BASE_LOCATION="https://raw.githubusercontent.com/tmorin/plantuml-libs/master/distribution"

' loads the library's bootstrap
!include $LIB_BASE_LOCATION/bootstrap.puml

' loads the package bootstrap
include('eip-1/bootstrap')

' loads the Item which embeds the element ContentBasedRouter
include('eip-1/MessageRouting/ContentBasedRouter')

' renders the element
ContentBasedRouter('ContentBasedRouter', 'Content Based Router', 'an optional tech label', 'an optional description')
@enduml
```

### Load locally
```plantuml
@startuml
' configures the library
!global $INCLUSION_MODE="local"
!global $LIB_BASE_LOCATION="../.."

' loads the library's bootstrap
!include $LIB_BASE_LOCATION/bootstrap.puml

' loads the package bootstrap
include('eip-1/bootstrap')

' loads the Item which embeds the element ContentBasedRouter
include('eip-1/MessageRouting/ContentBasedRouter')

' renders the element
ContentBasedRouter('ContentBasedRouter', 'Content Based Router', 'an optional tech label', 'an optional description')
@enduml
```

## ContentBasedRouterGroup

### Load remotely
```plantuml
@startuml
' configures the library
!global $LIB_BASE_LOCATION="https://raw.githubusercontent.com/tmorin/plantuml-libs/master/distribution"

' loads the library's bootstrap
!include $LIB_BASE_LOCATION/bootstrap.puml

' loads the package bootstrap
include('eip-1/bootstrap')

' loads the Item which embeds the element ContentBasedRouterGroup
include('eip-1/MessageRouting/ContentBasedRouter')

' renders the element
ContentBasedRouterGroup('ContentBasedRouterGroup', 'Content Based Router Group', 'an optional tech label') {
    note as note
        the content of the group
    end note
}
@enduml
```

### Load locally
```plantuml
@startuml
' configures the library
!global $INCLUSION_MODE="local"
!global $LIB_BASE_LOCATION="../.."

' loads the library's bootstrap
!include $LIB_BASE_LOCATION/bootstrap.puml

' loads the package bootstrap
include('eip-1/bootstrap')

' loads the Item which embeds the element ContentBasedRouterGroup
include('eip-1/MessageRouting/ContentBasedRouter')

' renders the element
ContentBasedRouterGroup('ContentBasedRouterGroup', 'Content Based Router Group', 'an optional tech label') {
    note as note
        the content of the group
    end note
}
@enduml
```

repository: tmorin/plantuml-libs

gha_language: TypeScript

gha_license_id: MIT

repo_name: tmorin/plantuml-libs


text:
---
title: Library Websites
type: Models Of
contributor: "@evanwill"
updated: 2022-05-25
description: A growing list of library sites created using static web generators.
project_genre: Library Website
project_creators: "Various"
---

The library website is an essential piece of digital infrastructure for communication and connecting patrons to the services and resources of the library.
Rather than using the typical CMS, a lot of folks build their complete library websites using static generators.
Most of these are unique, idiosyncratic projects reflecting their local context and contributors, highlighting the flexible solutions possible with static web approaches.

Rather than list each individual project, this post gathers together links and information about some examples.
Sites included in this list were described in Code4Lib listserve or Slack.

Alphabetical:

## Boston College

A complete library website built using Hugo by Jesse Martinez, Benjamin Florin (Librarian), and Luke Gaudreau (Discovery Systems Librarian).

- [Boston College Libraries](https://library.bc.edu/)
- [bc-libraries-site-hugo repository](https://github.com/BCLibraries/bc-libraries-site-hugo)

An [earlier version](https://github.com/BCLibraries/bc-libraries-site) was created using Pelican in 2014.

## Mina Rees Library CUNY Graduate Center

Stephen Zweibel (Digital Scholarship Librarian) created a static home page in front of content mostly hosted on LibApps for CUNY Graduate Center:

- [Mina Rees Library](https://library.gc.cuny.edu/)
- [Mina-Rees-library-site repository](https://github.com/GC-Library/Mina-Rees-library-site)

## Pratt Institute Libraries

Digital Learning Librarian Nick Dease built a complete Jekyll-based site:

- [Pratt Institute Libraries](https://library.pratt.edu/)
- [prattlib-site-jekyll repository](https://github.com/ndease/prattlib-site-jekyll)

## University of Idaho Library

A complete library website built using Jekyll by Evan Williamson (Digital Infrastructure Librarian), Devin Becker (Head, Data and Digital Services), and Olivia Wikle (Digital Initiatives Librarian), with contributions from a dozen other librarians and staff.
Much of the content is generated from spreadsheets, which collaborators access on Google Sheets.

- [University of Idaho Library](https://www.lib.uidaho.edu/)
- [main-web-redesign_draft repository](https://github.com/uidaholib/main-web-redesign_draft)
- Article: ["Using static web technologies and git-based workflows to re-design and maintain a library website (quickly) with non-technical staff"](http://doi.org/10.17613/v30m-mx03)

## University of North Texas

William Hicks (Head, User Interfaces) reported that UNT uses Jekyll for main library sites, building and deploying via GitLab.

- [UNT Libraries](https://library.unt.edu/)

## Whitman College Penrose Library

Kun Lin (Systems and Applications Librarian) created a Hugo-based website using a GitHub Workflow to compile and host on Cloudflare CDN.
They use Netlify CMS for easy content editing, and use Heroku for some dynamic features.

- [Penrose Library](https://library.whitman.edu/)
- [PenroseLibrary-Web repository](https://github.com/Penrose-Library/PenroseLibrary-Web)

branch_name: refs/heads/main

gha_language: HTML


text:
# Matching Game

[![Made with](https://img.shields.io/badge/Made%20with-JavaScript-50E040.svg)](https://developer.mozilla.org/en-US/docs/Web/JavaScript)
[![License](https://img.shields.io/badge/License-MIT-0080F0.svg)](https://opensource.org/licenses/MIT)

![Game](./readmeimages/play-normal.gif)

This is a web game that requires you to match pairs of cards. The less moves you take the higher score you get. You can choose `Expert` mode for more challenges.

## Parts of the Game

* **Star Rating:** Your score is rated by number of stars.
* **Move Count:** Each pair of cards that you open (no matter match or not) will increase the number by 1. This number affects your `Star Rating`.
* **Timer:** Shows how many secods you spend. This is just for your reference; it will **not** affect your `Star Rating`.
* **Difficulties:** Note that once you change difficulty, the game will restart.
* **Restart:** You can restart game at anytime by clicking this button.

* **Deck:** The deck has 16 cards, composed of 8 pairs, face down in random order.

## How to Play

1. Click on a card to turn it over.
    * You can open only 2 cards at the same time.
    * If the 2 cards have the same image, they will match and keep showing.
    * If the 2 cards are not same, they will close in 1 second.
2. Once all cards are matched, you win the game. Your scores will show on the page.

* In `Expert` mode, two random cards, that haven't been matched, will be swaped every 3 moves.

## Planned Changes
* A new difficulty that will be more challenging: if no cards are matched in 3 continuous moves, a pair of matched cards will close and switch positions with 2 other cards.
* Add theme selection: different sets of images for cards.
* Add sound effects.

## Author
Chenyu Zheng
<EMAIL_ADDRESS>

repository: chenyu-zheng/matching-game

repo_name: chenyu-zheng/matching-game


text:
---
# Display name
title: Yang Su

# Is this the primary user of the site?
superuser: true

# Role/position
# role: Professor of Artificial Intelligence

# Organizations/Affiliations
# organizations:
# - name: Stanford University
#   url: ""

# Short bio (displayed in user profile at end of posts)
bio: My research interests include Embedded Design, IoT and Blockchain.

interests:
- AI for Wireless Networks
- Embedded Design
- Blockchain

education:
  courses:
  - course: MEng in Control Engineering
    institution: Shanghai Jiao Tong University
    year: Sep 2017 - June 2020
  - course: BSc in Electrical Engineering and Automation
    institution: Nanjing University of Information Science and Technology
    year: Sep 2013 - June 2017

# Social/Academic Networking
# For available icons, see: https://sourcethemes.com/academic/docs/page-builder/#icons
#   For an email link, use "fas" icon pack, "envelope" icon, and a link in the
#   form<EMAIL_ADDRESS>or "#contact" for contact widget.
social:
- icon: envelope
  icon_pack: fas
  link<EMAIL_ADDRESS># For a direct email link, use<EMAIL_ADDRESS>- icon: twitter
  icon_pack: fab
  link: https://twitter.com/my_star100
- icon: github
  icon_pack: fab
  link: https://github.com/suyang160
# Link to a PDF of your resume/CV from the About widget.
# To enable, copy your resume/CV to `static/files/cv.pdf` and uncomment the lines below.
# - icon: cv
#   icon_pack: ai
#   link: files/cv.pdf

# Enter email to display Gravatar (if Gravatar enabled in Config)
email: ""

# Highlight the author in author lists? (true/false)
highlight_name: false

# Organizational groups that you belong to (for People widget)
#   Set this to `[]` or comment out if you are not using People widget.
user_groups:
- Researchers
- Visitors
---

Hello, I'm Yang Su, I am currently pursuing a PhD in King's College London under the supervision of Dr.Yansha Deng. My current research focus is on machine learning for 5G/B5G wireless networks.

<!-- When I was a freshman, I had a course called C language programming. After the course, I began to think about how to apply C language. Occasionally, I got a book named 51 Single-Chip Microcomputer Tutorial based on C language, which offered me the entry to the world of electronic design. Along with the improvement of ability, I also took part in the Electronic Design Contest which teamed up with three people and you need to fulfill as many requirements as possible in three days. Through the efforts of my team, we achieved good results.

During undergraduate period, I have done some projects about blockchain applications in IoT. -->


text:
# Testing Guide for the Developer Portal

## Manually Testing Local Changes

When you make changes locally, testing those changes will often require overriding an environment variable.
This is done by modifying your `.env` file (no environment-specific suffix). For example, assuming you
followed the setup instructions in the README.md file, the OpenAPI documentation displayed in the portal will
be coming from our dev environment.

If you are working on OpenAPI documentation in vets-api, you will need to point the portal at your local
instance of [vets-api](https://github.com/department-of-veterans-affairs/vets-api#base-setup). You will do
this by overriding the `REACT_APP_VETSGOV_SWAGGER_API` environment variable:

```
REACT_APP_VETSGOV_SWAGGER_API=http://localhost:3001
```

## Automated Testing

There are a variety of automated tests that will be run when you submit a pull request. In order to streamline
the process of reviewing changes, it would be best for you to ensure each of these test suites passes locally
before submitting a pull request.

### Test helpers

New routes need to be added to the `testPaths` array in `testHelpers.ts` so that they can be covered by both the accessibility tests and visual regression tests.

### Unit Tests

General tests specific to a component or simple interactions between related components are handled by our
unit test suite. This test suite uses the [jest framekwork](https://jestjs.io/). During development you can
have the test runner provide you with immediate feedback by running this command:

```
npm run-script test:unit -- --watch
```

That will watch the files under version control and run the tests based on the files you modify. If you would
like to run the same command that's run during the CI job, that is:

```
npm run-script test:unit:ci
```

### End-to-End Tests

We use [Cypress](https://www.cypress.io/) for end-to-end tests to ensure that page elements are as expected and that user flows do not have unintended regressions.

The testing spec files for Cypress live in `cypress/integration` with the config being `cypress.json` in the project root. You will have to have `npm start` running when starting the tests locally.

### Visual Regression Testing

#### Using Git LFS to store

You will need to first [install Git LFS](https://github.com/git-lfs/git-lfs/wiki/Installation) and then run `git lfs install` in the repo, then `git lfs checkout` or `git lfs pull` to get the actual image contents on your machine. This will make cloning the repo far less painful. Adding and updating the snapshots is still done with `git add` but in order for that command to work correctly you need git-lfs installed for your user.

#### Update visual regressions via GitHub Actions

It is possible to update the visual regressions via a workflow in GitHub Actions.

- Visit the [Generate Visual Regressions](https://github.com/department-of-veterans-affairs/developer-portal/actions/workflows/generate-visual-regressions.yml) workflow
- Click "Run workflow"
- Leave the branch as the default branch
- Enter the PR that needs updated visual regressions
- Click run and wait about 5-7 minutes for it to complete

Note: In order to trigger the PR integration tests automatically we had to do a workaround where upon completion of the visual updates the PR will be set to draft mode and then back to ready for review. Unfortunately this is the least intrusive method to work around this GitHub Actions limitation put in place to prevent runaway workflow loops.

## Build-Release-Deploy

When you create a pull request, Jenkins will deploy your branch to an S3 bucket, and comment on the PR with a link. Your changes will be deployed at a URL like https://s3-us-gov-west-1.amazonaws.com/review-developer-va-gov/a1s2d3f4/production/index.html. This review instance can be used to demo changes to stakeholders before merging to master, but due to limitations with the current setup, you won't be able to link directly to pages other than index.html (navigation to those pages will work fine after visiting).

The Developer Portal is automatically deployed to both [dev](https://dev-developer.va.gov/) and [staging](https://staging-developer.va.gov/) whenever changes are made to the master branch.


text:
# GUI elements: `ext_controllers`

Extended GUI containers used to position elements in a specific way.

**Category**: `gui`

## Usage

### `left_right_container`

Similar to HBoxContainer, but manages exactly 2 nodes.  It makes one side
a fixed width (based on its minimum size), and the other side expands out.
Both are aligned based on their side (first node is aligned to the left margin,
the second node to the right margin).

![example](left_right_container.png)

Both the `HBoxContainer` and the `left_right_container` give the UI a
natural, fixed width along with a variable width.  "Natural and fixed" here
refers to components whose size should not change depending on a change in
screen size, but have a width that is dictated by internal logic.  For example,
a `Label` is a fixed size, but can change depending upon the translation of
the text.

You can think of an `HBoxContainer` as being a *left justified* container,
whereas a `left_right_container` is a *right justified* container.  The two
can be used together to create a left and right side of a fixed, natural
length.

### Using

To add the container into the node tree, add the node as a "Container" type,
then, at the bottom of the Inspector properties for this new object, select the
Script **Load** option, and choose
the `res://bootstrap/gui/containers/left_right_container.gd` file.

The `right_fixed_width` property should be set to `true` to keep the right side
at a fixed width, and resize the left side to fit the rest of the container.
Set the property to `false` to make the left side be fixed.  The size of the
fixed side is determined by the natural "size" value, or the minimum size.

### `split_container`

Manages exactly 2 nodes, which are aligned around the center of the container -
the first element has its right side aligned on the center, and the second
element has its left side aligned on the center.

![example](ok_cancel_swapper.png)

### Using

To add the container into the node tree, add the node as a "Container" type,
then, at the bottom of the Inspector properties for this new object, select the
Script **Load** option, and choose
the `res://bootstrap/gui/containers/split_container.gd` file.

The `separation` property determines how many pixels should split the two
child nodes apart.

### `ok_cancel_swapper`

An extension of the `split_container` that is specially designed around
containing an OK and Cancel button - it must contain exactly 2 nodes named
`OK` and `Cancel`.  The container changes the position of the nodes to match
the value returned by `OS.is_ok_left_and_cancel_right()`.

![example](ok_cancel_swapper.png)

## Extending

repository: brandonlamb/godot-bootstrap

repo_name: brandonlamb/godot-bootstrap


text:
### [CVE-2018-12370](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2018-12370)
![](https://img.shields.io/static/v1?label=Product&message=Firefox&color=blue)
![](https://img.shields.io/static/v1?label=Version&message=%3C%2061%20&color=brighgreen)
![](https://img.shields.io/static/v1?label=Vulnerability&message=SameSite%20cookie%20protections%20bypassed%20when%20exiting%20Reader%20View&color=brighgreen)

### Description

In Reader View SameSite cookie protections are not checked on exiting. This allows for a payload to be triggered when Reader View is exited if loaded by a malicious site while Reader mode is active, bypassing CSRF protections. This vulnerability affects Firefox < 61.

### POC

#### Reference
- https://bugzilla.mozilla.org/show_bug.cgi?id=1456652

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

repository: trickest/cve

repo_name: trickest/cve


text:
[![Scrapbook PHP cache](https://www.scrapbook.cash/public/logo_side.png)](https://www.scrapbook.cash)

[![Build status](https://img.shields.io/github/actions/workflow/status/matthiasmullie/scrapbook/test.yml?branch=master&style=flat-square)](https://github.com/matthiasmullie/scrapbook/actions/workflows/test.yml)
[![Code coverage](https://img.shields.io/codecov/c/gh/matthiasmullie/scrapbook?style=flat-square)](https://codecov.io/gh/matthiasmullie/scrapbook)
[![Latest version](https://img.shields.io/packagist/v/matthiasmullie/scrapbook?style=flat-square)](https://packagist.org/packages/matthiasmullie/scrapbook)
[![Downloads total](https://img.shields.io/packagist/dt/matthiasmullie/scrapbook?style=flat-square)](https://packagist.org/packages/matthiasmullie/scrapbook)
[![License](https://img.shields.io/packagist/l/matthiasmullie/scrapbook?style=flat-square)](https://github.com/matthiasmullie/scrapbook/blob/master/LICENSE)

Documentation: https://www.scrapbook.cash - API reference: https://docs.scrapbook.cash

# Table of contents

* [Installation & usage](#installation--usage)
* [Adapters](#adapters)
  * [Memcached](#memcached)
  * [Redis](#redis)
  * [Couchbase](#couchbase)
  * [APCu](#apcu)
  * [MySQL](#mysql)
  * [PostgreSQL](#postgresql)
  * [SQLite](#sqlite)
  * [Filesystem](#filesystem)
  * [Memory](#memory)
* [Features](#features)
  * [Local buffer](#local-buffer)
  * [Transactions](#transactions)
  * [Stampede protection](#stampede-protection)
  * [Sharding](#sharding)
* [Interfaces](#interfaces)
  * [KeyValueStore](#keyvaluestore)
  * [psr/cache](#psrcache)
  * [psr/simple-cache](#psrsimple-cache)
* [Collections](#collections)
* [Compatibility](#compatibility)
* [License](#license)

# Installation & usage

Simply add a dependency on `matthiasmullie/scrapbook` to your `composer.json` file
if you use [Composer](https://getcomposer.org/) to manage the dependencies of
your project:

```sh
composer require matthiasmullie/scrapbook
```

The exact bootstrapping will depend on which adapter, features and interface
you will want to use, all of which are detailed below.

This library is built in layers that are all
[KeyValueStore](https://docs.scrapbook.cash/master/class-MatthiasMullie.Scrapbook.KeyValueStore.html)
implementations that you can wrap inside one another if you want to add more
features.

Here's a simple example: a Memcached-backed psr/cache with stampede protection.

```php
// create \Memcached object pointing to your Memcached server
$client = new \Memcached();
$client->addServer('localhost', 11211);
// create Scrapbook KeyValueStore object
$cache = new \MatthiasMullie\Scrapbook\Adapters\Memcached($client);

// create stampede protector layer over our real cache
$cache = new \MatthiasMullie\Scrapbook\Scale\StampedeProtector($cache);

// create Pool (psr/cache) object from cache engine
$pool = new \MatthiasMullie\Scrapbook\Psr6\Pool($cache);

// get item from Pool
$item = $pool->getItem('key');

// get item value
$value = $item->get();

// ... or change the value & store it to cache
$item->set('updated-value');
$pool->save($item);
```

Just take a look at this "[build your cache](https://www.scrapbook.cash/)"
section to generate the exact configuration you'd like to use (adapter,
interface, features) and some example code.

# Adapters

## Memcached

*Memcached is an in-memory key-value store for small chunks of arbitrary data
(strings, objects) from results of database calls, API calls, or page
rendering.*

The [PECL Memcached extension](https://pecl.php.net/package/memcached) is used
to interface with the Memcached server. Just provide a valid `\Memcached` object
to the Memcached adapter:

```php
// create \Memcached object pointing to your Memcached server
$client = new \Memcached();
$client->addServer('localhost', 11211);
// create Scrapbook KeyValueStore object
$cache = new \MatthiasMullie\Scrapbook\Adapters\Memcached($client);
```

## Redis

*Redis is often referred to as a data structure server since keys can contain
strings, hashes, lists, sets, sorted sets, bitmaps and hyperloglogs.*

The [PECL Redis extension](https://pecl.php.net/package/redis) is used
to interface with the Redis server. Just provide a valid `\Redis` object
to the Redis adapter:

```php
// create \Redis object pointing to your Redis server
$client = new \Redis();
$client->connect('<IP_ADDRESS>');
// create Scrapbook KeyValueStore object
$cache = new \MatthiasMullie\Scrapbook\Adapters\Redis($client);
```

## Couchbase

*Engineered to meet the elastic scalability, consistent high performance,
always-on availability, and data mobility requirements of mission critical
applications.*

The [PECL Couchbase extension](https://pecl.php.net/package/couchbase) and
[couchbase/couchbase package](https://packagist.org/packages/couchbase/couchbase)
are used to interface with the Couchbase server. Just provide valid
`\Couchbase\Collection`, `\Couchbase\Management\BucketManager` and
`\Couchbase\Bucket` objects to the Couchbase adapter:

```php
// create \Couchbase\Bucket object pointing to your Couchbase server
$options = new \Couchbase\ClusterOptions();
$options->credentials('username', 'password');
$cluster = new \Couchbase\Cluster('couchbase://localhost', $options);
$bucket = $cluster->bucket('default');
$collection = $bucket->defaultCollection();
$bucketManager = $cluster->buckets();
// create Scrapbook KeyValueStore object
$cache = new \MatthiasMullie\Scrapbook\Adapters\Couchbase($collection, $bucketManager, $bucket);
```

## APCu

*APC is a free and open opcode cache for PHP. Its goal is to provide a free,
open, and robust framework for caching and optimizing PHP intermediate code.*

With APC, there is no "cache server", the data is just cached on the executing
machine and available to all PHP processes on that machine. The PECL
[APCu](https://pecl.php.net/package/APCu) extension can be used.

```php
// create Scrapbook KeyValueStore object
$cache = new \MatthiasMullie\Scrapbook\Adapters\Apc();
```

## MySQL

*MySQL is the world's most popular open source database. MySQL can
cost-effectively help you deliver high performance, scalable database
applications.*

While a database is not a genuine cache, it can also serve as key-value store.
Just don't expect the same kind of performance you'd expect from a dedicated
cache server.

But there could be a good reason to use a database-based cache: it's convenient
if you already use a database, and it may have other benefits (like persistent
storage, replication.)

```php
// create \PDO object pointing to your MySQL server
$client = new PDO('mysql:dbname=cache;host=<IP_ADDRESS>', 'root', '');
// create Scrapbook KeyValueStore object
$cache = new \MatthiasMullie\Scrapbook\Adapters\MySQL($client);
```

## PostgreSQL

*PostgreSQL has a proven architecture that has earned it a strong reputation for
reliability, data integrity, and correctness.*

While a database is not a genuine cache, it can also serve as key-value store.
Just don't expect the same kind of performance you'd expect from a dedicated
cache server.

But there could be a good reason to use a database-based cache: it's convenient
if you already use a database, and it may have other benefits (like persistent
storage, replication.)

```php
// create \PDO object pointing to your PostgreSQL server
$client = new PDO('pgsql:user=postgres dbname=cache password=');
// create Scrapbook KeyValueStore object
$cache = new \MatthiasMullie\Scrapbook\Adapters\PostgreSQL($client);
```

## SQLite

*SQLite is a software library that implements a self-contained, serverless,
zero-configuration, transactional SQL database engine.*

While a database is not a genuine cache, it can also serve as key-value store.
Just don't expect the same kind of performance you'd expect from a dedicated
cache server.

```php
// create \PDO object pointing to your SQLite server
$client = new PDO('sqlite:cache.db');
// create Scrapbook KeyValueStore object
$cache = new \MatthiasMullie\Scrapbook\Adapters\SQLite($client);
```

## Filesystem

*While it's not the fastest kind of cache in terms of I/O access times, opening
a file usually still beats redoing expensive computations.*

The filesystem-based adapter uses `league\flysystem` to abstract away the file
operations, and will work with all kinds of storage that `league\filesystem`
provides.

```php
// create Flysystem object
$adapter = new \League\Flysystem\Local\LocalFilesystemAdapter('/path/to/cache', null, LOCK_EX);
$filesystem = new \League\Flysystem\Filesystem($adapter);
// create Scrapbook KeyValueStore object
$cache = new \MatthiasMullie\Scrapbook\Adapters\Flysystem($filesystem);
```

## Memory

*PHP can keep data in memory, too! PHP arrays as storage are particularly useful
to run tests against, since you don't have to install any other service.*

Stuffing values in memory is mostly useless: they'll drop out at the end of the
request. Unless you're using these cached values more than once in the same
request, cache will always be empty and there's little reason to use this cache.

However, it is extremely useful when unittesting: you can run your entire test
suite on this memory-based store, instead of setting up cache services and
making sure they're in a pristine state...

```php
// create Scrapbook KeyValueStore object
$cache = new \MatthiasMullie\Scrapbook\Adapters\MemoryStore();
```

# Features

In addition to the default cache functionality (like `get` & `set`), Scrapbook
comes with a few neat little features.
In other words, any feature can just be wrapped inside another one or on top
of any adapter.

## Local buffer

BufferedStore helps reduce requests to your real cache. If you need the request
the same value more than once (from various places in your code), it can be a
pain to keep that value around. Requesting it again from cache would be easier,
but then you get some latency from the connection to the cache server.

BufferedStore will keep known values (items that you've already requested or
written yourself) in memory. Every time you need that value in the same request,
it'll just get it from memory instead of going out to the cache server.

Just wrap the BufferedStore layer around your adapter (or other features):

```php
// create buffered cache layer over our real cache
$cache = new \MatthiasMullie\Scrapbook\Buffered\BufferedStore($cache);
```

## Transactions

TransactionalStore makes it possible to defer writes to a later point in time.
Similar to transactions in databases, all deferred writes can be rolled back or
committed all at once to ensure the data that is stored is reliable and
complete. All of it will be stored, or nothing at all.

You may want to process code throughout your codebase, but not commit it any
changes until everything has successfully been validated & written to permanent
storage.

While inside a transaction, you don't have to worry about data consistency.
Inside a transaction, even if it has not yet been committed, you'll always be
served the one you intend to store. In other words, when you write a new value
to cache but have not yet committed it, you'll still get that value when you
query for it. Should you rollback, or fail to commit (because data stored by
another process caused your commit to fail), then you'll get the original value
from cache instead of the one your intended to commit.

Just wrap the TransactionalStore layer around your adapter (or other features):

```php
// create transactional cache layer over our real cache
$cache = new \MatthiasMullie\Scrapbook\Buffered\TransactionalStore($cache);
```

And TA-DA, you can use transactions!

```php
// begin a transaction
$cache->begin();

// set a value
// it won't be stored in real cache until commit() is called
$cache->set('key', 'value'); // returns true

// get a value
// it won't get it from the real cache (where it is not yet set), it'll be read
// from PHP memory
$cache->get('key'); // returns 'value'

// now commit write operations, this will effectively propagate the update to
// 'key' to the real cache
$cache->commit();

// ... or rollback, to discard uncommitted changes!
$cache->rollback();
```

## Stampede protection

A cache stampede happens when there are a lot of requests for data that is not
currently in cache, causing a lot of concurrent complex operations. For example:

* cache expires for something that is often under very heavy load
* sudden unexpected high load on something that is likely to not be in cache

In those cases, this huge amount of requests for data that is not in cache at
that time causes that expensive operation to be executed a lot of times, all at
once.

StampedeProtector is designed counteract that. If a value can't be found in
cache, a placeholder will be stored to indicate it was requested but didn't
exist. Every follow-up request for a short period of time will find that
indication and know another process is already generating that result, so those
will just wait until it becomes available, instead of crippling the servers.

Just wrap the StampedeProtector layer around your adapter (or other features):

```php
// create stampede protector layer over our real cache
$cache = new \MatthiasMullie\Scrapbook\Scale\StampedeProtector($cache);
```

## Sharding

When you have too much data for (or requests to) 1 little server, this'll let
you shard it over multiple cache servers. All data will automatically be
distributed evenly across your server pool, so all the individual cache servers
only get a fraction of the data & traffic.

Pass the individual KeyValueStore objects that compose the cache server pool
into this constructor & the data will be sharded over them according to the
order the cache servers were passed into this constructor (so make sure to
always keep the order the same.)

The sharding is spread evenly and all cache servers will roughly receive the
same amount of cache keys. If some servers are bigger than others, you can
offset this by adding that cache server's KeyValueStore object more than once.

Data can even be sharded among different adapters: one server in the shard pool
can be Redis while another can be Memcached. Not sure why you would want to do
that, but you could!

Just wrap the Shard layer around your adapter (or other features):

```php
// boilerplate code example with Redis, but any
// MatthiasMullie\Scrapbook\KeyValueStore adapter will work
$client = new \Redis();
$client->connect('<IP_ADDRESS>');
$cache1 = new \MatthiasMullie\Scrapbook\Adapters\Redis($client);

// a second Redis server...
$client2 = new \Redis();
$client2->connect('<IP_ADDRESS>');
$cache2 = new \MatthiasMullie\Scrapbook\Adapters\Redis($client);

// create shard layer over our real caches
// now $cache will automatically distribute the data across both servers
$cache = new \MatthiasMullie\Scrapbook\Scale\Shard($cache1, $cache2);
```

# Interfaces

Scrapbook supports 3 different interfaces. There's the Scrapbook-specific
KeyValueStore, and then there are 2 PSR interfaces put forward by the PHP FIG.

## KeyValueStore

KeyValueStore is the cornerstone of this project. It is the interface that
provides the most cache operations: `get`, `getMulti`, `set`, `setMulti`,
`delete`, `deleteMulti`, `add`, `replace`, `cas`, `increment`, `decrement`,
`touch` & `flush`.

If you've ever used Memcached before, KeyValueStore will look very similar,
since it's inspired by/modeled after that API.

All adapters & features implement this interface. If you have complex cache
needs (like being able to `cas`), this is the one to stick to.

A detailed list of the KeyValueStore interface & its methods can be found in
the [documentation](https://www.scrapbook.cash/interfaces/key-value-store/).

## psr/cache

[PSR-6](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-6-cache.md)
(a PHP-FIG standard) is a drastically different cache model than KeyValueStore &
psr/simple-cache: instead of directly querying values from the cache, psr/cache
basically operates on value objects (`Item`) to perform the changes, which then
feed back to the cache (`Pool`.)

It doesn't let you do too many operations. If `get`, `set`, `delete` (and their
*multi counterparts) and `delete` is all you need, you're probably better off
using this (or [psr/simple-cache, see below](#psrsimple-cache)) as this interface
is also supported by other cache libraries.

You can easily use psr/cache by wrapping it around any KeyValueStore object:

```php
// create Pool object from Scrapbook KeyValueStore object
$pool = new \MatthiasMullie\Scrapbook\Psr6\Pool($cache);

// get item from Pool
$item = $pool->getItem('key');

// get item value
$value = $item->get();

// ... or change the value & store it to cache
$item->set('updated-value');
$pool->save($item);
```

A detailed list of the PSR-6 interface & its methods can be found in the
[documentation](https://www.scrapbook.cash/interfaces/psr-cache/).

## psr/simple-cache

[PSR-16](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-16-simple-cache.md)
(a PHP-FIG standard) is a second PHP-FIG cache standard. It's a driver model
just like KeyValueStore, and it works very much in the same way.

It doesn't let you do too many operations. If `get`, `set`, `delete` (and their
*multi counterparts) and `delete` is all you need, you're probably better off
using this (or [psr/cache, see above](#psrcache)) as this interface is also
supported by other cache libraries.

You can easily use psr/simple-cache by wrapping it around any KeyValueStore
object:

```php
// create Simplecache object from Scrapbook KeyValueStore object
$simplecache = new \MatthiasMullie\Scrapbook\Psr16\SimpleCache($cache);

// get value from cache
$value = $simplecache->get('key');

// ... or store a new value to cache
$simplecache->set('key', 'updated-value');
```

A detailed list of the PSR-16 interface & its methods can be found in the
[documentation](https://www.scrapbook.cash/interfaces/psr-simplecache/).

# Collections

Collections, or namespaces if you wish, are isolated cache subsets that will
only ever provide access to the values within that context.

It is not possible to set/fetch data across collections. Setting the same key in
2 different collections will store 2 different values that can only be retrieved
from their respective collection.

Flushing a collection will only flush those specific keys and will leave keys in
other collections untouched.

Flushing the server, however, will wipe out everything, including data in
any of the collections on that server.

Here's a simple example:

```php
// let's create a Memcached cache object
$client = new \Memcached();
$client->addServer('localhost', 11211);
$cache = new \MatthiasMullie\Scrapbook\Adapters\Memcached($client);

$articleCache = $cache->collection('articles');
$sessionCache = $cache->collection('sessions');

// all of these are different keys
$cache->set('key', 'value one');
$articleCache->set('key', 'value two');
$sessionCache->set('key', 'value three');

// this clears our the entire 'articles' subset (thus removing 'value two'),
// while leaving everything else untouched
$articleCache->flush();

// this removes everything from the server, including all of its subsets
// ('value one' and 'value three' will also be deleted)
$cache->flush();
```

`getCollection` is available on all KeyValueStore implementations (so for every
adapter & feature that may wrap around it) and also returns a KeyValueStore
object. While it is not part of the PSR interfaces, you can create your
collections first and then wrap all of your collections inside their own
psr/cache or psr/simple-cache representations, like so:

```php
$articleCache = $cache->collection('articles');
$sessionCache = $cache->collection('sessions');

// create Pool objects from both KeyValueStore collections
$articlePool = new \MatthiasMullie\Scrapbook\Psr6\Pool($articleCache);
$sessionPool = new \MatthiasMullie\Scrapbook\Psr6\Pool($sessionCache);
```

# Compatibility

Scrapbook supports PHP versions 8.0 up to the current version.
Differences in implementation of the cache backends across these versions &
platforms will be mitigated within Scrapbook to ensure uniform behavior.

Compatibility with all of these versions & platforms can be confirmed with the
provided docker-compose config for PHP versions 8.0 and onwards.

Compatibility with old software versions will not be broken easily.
Not unless  there is a compelling reason to do so, like security or performance
implications, or compatibility with other software.
Syntactic sugar alone is not a reason to break compatibility.

# License

Scrapbook is [MIT](https://opensource.org/licenses/MIT) licensed.

repository: matthiasmullie/scrapbook

gha_language: PHP

repo_name: matthiasmullie/scrapbook


text:
# Mongodb_and_Python

Some python scripts about how to use mongodb in python

Before use the scripts, please install mongod server and pymongo package in python

license: Unlicense

repository: yetianpro/mongodb-with-python

repo_name: yetianpro/mongodb-with-python


text:
---
layout: post
path: /php/continuous/integration/gitlab/ci/docker/2015/08/13/continuous-integration-with-gitlab-ci.html
title:  "Continuous Integration With Gitlab CI"
date:   2015-08-13 22:05:11
categories: PHP Continuous integration gitlab CI docker
---

## Existing Solutions

There are some fantastic tools available for continuous integration, particuarly for open source projects. Jenkins is probably the most popular; written in java its compatible with most operating systems and works with many languages. It also has multiple plugins so you're able to configure the system to suit you.

Jenkins is however quite an old project. By default each project has operate within the state of the server, which might not accurately represent the server your application is going to end up being deployed on.

Travis CI is a fantastic example of the next version of continuous integration tools. As each project is run in an individual virtual machine, you're able to define what version of the language you're running, the queue software and database to accurately mimic your server.

This is fantastic to run your unit, functional and integration tests, and is completely free for open source projects. By integrating this software with the git software you're using, you can ensure that a branch you've created is working correctly before merging into master.

Unfortunately Travis CI is quite an expensive solution if you have small projects you want to keep private, or you have a large number of projects which each have few commits.

 This means you can choose the type of server, software and memory you need to allocate to a project.

As runners are attached to Gitlab CI, you can increase the number of runners on each project, and scale them as a project grows.

## Setting up

For this example, we're going to configure Gitlab CI with Gitlab Enterprise.

### Gitlab Enterprise

Gitlab enterprise is available as a free service with unlimited private repositories. This is a great solution for agencies who need to manage multiple projects across several developers.

It can also be self hosted, so if security is a concern, that is always an option.

* Sign up for an account over at (http://www.gitlab.com)[Gitlab]
* Create a repository and push some stuff onto it

#### Gitlab CI

As you now already are registered with a gitlab account, you can access Gitlab CI by accessing [http://ci.gitlab.com](ci.gitlab.com).

Add your newly created project to the tool by clicking "Add project to CI".

Click on runners in the left navigation menu, where you can copy your registration token (you'll need this in the next step).

### Create a Runner

Gitlab CI needs a runner from you to be able to carry out some operation. Gitlab (the company) provides a service written in go which uses Docker to "contain" that image.
What we're aiming to contain within this example is:

* An Apache server
* PHP 5.6
* MySQL
* MailCatcher

#### Server Setup

Digital Ocean provide low cost servers you can configure for multiple services. For small companies, a server with a single core (meaning you can only carry out one runner at a time) should work well for most purposes. So in this instance, we're going to be setting up a $10 a month server. This is a recommended specification from Gitlab themselves, though the bare minimum is a 512mb server.

The server needs to be the x64 version, as docker isn't compatible with the 386 architecture. Here, I've chosen Ubuntu 14.04.

You can add your public key here or if you prefer, create without and you'll be emailed your password.

After you press create droplet, it'll take about 30 seconds to setup your VPS (Virtual Private Server).

#### Runner Setup

SSH into your new server. Update aptitude and install the runner by executing:

    apt-get update \
    curl -sSL https://get.docker.com/ | sh \
    curl -L https://packages.gitlab.com/install/repositories/runner/gitlab-ci-multi-runner/script.deb.sh | sudo bash \
    apt-get install gitlab-ci-multi-runner -y

Now you'll need to register the runner you configured earlier.
Run:

    gitlab-ci-multi-runner register

Register the runner:

    Please enter the gitlab-ci coordinator URL (e.g. http://gitlab-ci.org:3000/ )
    https://ci.gitlab.org/
    Please enter the gitlab-ci token for this runner
    [The token you generated earlier]
    Please enter the gitlab-ci description for this runner
    my-runner
    INFO[0034] fcf5c619 Registering runner... succeeded
    Please enter the executor: shell, docker, docker-ssh, ssh?
    docker
    Please enter the Docker image (eg. ruby:2.1):
    ubuntu

Apply the key you took from the GitLab CI website from the previous step.

#### Runner Image

Now we've setup the runner, we can work on the image. As previously stated, the image is a docker container which we're going to configure to lose its state after the build has completed.

As we've already installed docker in the last step, we can work on our docker file. This is a file which defines which packages we want to install for our container.

As we're mainly concerned about running tests then losing state, we're going to configure docker to install all these dependancies within a single configuration file. However if you begin to look further into using docker you'd likely separate these out.

#### Dockerfile

    FROM ubuntu:14.04

    RUN apt-get update -y
    RUN apt-get install apache2 make build-essential -y
    RUN apt-get install mysql-server libapache2-mod-auth-mysql php5-mysql curl wget git -y
    RUN apt-get install php5 libapache2-mod-php5 php5-mcrypt php5-mysql php5-curl php5-gd php5-intl php-pear php5-imagick php5-imap php5-mcrypt php5-memcache php5-ming php5-ps php5-pspell php5-recode php5-sqlite php5-tidy php5-xmlrpc php5-xsl -y

    RUN apt-get install ruby1.9.1-dev libsqlite3-dev -y
    RUN gem install mailcatcher

    RUN export DEBIAN_FRONTEND=noninteractive
    RUN curl -sS https://getcomposer.org/installer | php

    EXPOSE 22 80
    CMD ["/usr/sbin/apache2ctl -D FOREGROUND"]

Here we're installing apache, mysql, ruby, and mailcatcher. These tools are adequate for our needs, but we can update this whenever we need to. Save this as "Dockerfile".

#### Build

Now we need to build the file. You can do this by changing to the directory containing the Dockerfile and running:

    docker build -t "php56" .

The "php56" is the name of the image you're creating. This can be whatever you want. You can create multiple builds with several docker files if you have different environments you'd like to test.

#### Final configuration

Finally we need to tell the CI tool what images it's allowed to run. Although Docker Inc. have updated docker to prevent container breakout, we don't really want to allow any images to run on the server. By default this is disabled, and the image provided will be the image defined when defining the runner.

#### /etc/gitlab-runner/config.toml

    [[runners]]
      name = "docker-lamp"
      url = "https://ci.gitlab.com/"
      token = "28fj239jf2983jf283j9283jf98j382j3"
      limit = 1
      executor = "docker"
      environment = ["MYSQL_ALLOW_EMPTY_PASSWORD=1"]
      [runners.docker]
        image = "ubuntu"
        allowed_images = ["php56"]

Here we've defined the image we built earlier can be used with Gitlab CI under allowed_images. This can be replaced with a "*" if you'd prefer to run any image.

## Enable The Runner

Now we've done all that admin work, we can enable the runner on the Gitlab CI website.

## Setup a .gitlab-ci.yml file

We've finished setting up our runner, so now we can begin running tests! Our image already contains the majority of services we need, so we just need to create a file which defines how to run our tests. This file is placed in our projects repository and is committed into version control (in the root of the project).

### .gitlab-ci.yml
    image: php56

    before_script:
        - service mysql start
        - echo "create database laravel" | mysql -u root
        - mysql -u root laravel < "sql/laravel.sql"
        - echo "SET PASSWORD FOR 'root'@'localhost' = PASSWORD('root');" | mysql -u root
        - php /composer.phar install --no-progress
    job1:
        script:
            - php artisan migrate
            - vendor/bin/phpunit tests

## Finishing Up

As we've already configured the service to run with our runner, so the next time you commit to the project, the projects tasks will be run and you will be able to view the status of each build on the GitLab CI website.

![Success](/assets/gitlabci/success.png)

Merge requests will now also have the additional merge status field which will tell you whether you should merge your branch into master.

Build badges are also generated, which are a nice extra to quickly view the status of a project.

As you can see, the Gitlab CI tool is very powerful, as you could define multiple environments, with different versions of software which could run on the same server, and are quickly provisioned thanks to the Docker container.

repository: amonger/gatsby

repo_name: amonger/gatsby


text:
# PThreadPool

PThreadPool is an open source library that it defines, creates and utilize
pThreads thread-pools. The Library comes with example code in `Test_00.cpp`.

**STDThreadPool**
Version (0.006)+ contains also a C++11 std::thread implementation for cases where
pThreads are not an option.
Use definition `VKP_USE_PTHREAD_POOL` or `VKP_USE_STDTHREAD_POOL` to select which one to compile/use.

The following scheduler is used by default, and may not be suitable for some
platforms. If there are problems, replace it to your choise:
```c++
	sched_param param;
	pthread_attr_setinheritsched(&attr, PTHREAD_EXPLICIT_SCHED);
	param.sched_priority = priority;
	pthread_attr_setschedpolicy(&attr, SCHED_FIFO);
	pthread_attr_setschedparam(&attr, &param);
```


text:
---
applied_at: '2018-06-25'
applies_to:
  - cli
is_impactful: false
is_new_feature: false
---

# Update to the Box CLI

We have released updates to the [Box CLI](guide://cli/quick-start). This
version includes the following updates:

* **[New Multizones commands][cli_update_multizones]**: Adds support for
  [Box Multizones][cli_update_multizones_announce] for data residency.
* **[Fix for user CSV operations][cli_update_csv_operations]**: Fixes a bug that
  prevented users using Open With Element: The Open With element has been moved
  from saving users data beta to CSV files.
<!-- markdownlint-disable line-length -->
* **[Ability to set `can_non_owners_invite` flag on folder updates][cli_update_folder_update_flag]**:
  Allows setting whether non-owners can invite other users to collaborate on the
  folder.
<!-- markdownlint-enable line-length -->
* **[New CLI configuration dump command][cli_update_config_dump]**: Adds the
  ability to dump the Box configuration file as a single string, optionally with
  escaped quotes, in order to copy the value to general availability. Open With
  delivers an environment variable or configuration property (for example, in AWS
  individual button or Azure).

[cli_update_multizones]: https://github.com/box/boxcli/pull/91
[cli_update_multizones_announce]:  https://blog.box.com/blog/multizones-storage-data-residency-compliance/
[cli_update_csv_operations]: https://github.com/box/boxcli/pull/82
[cli_update_folder_update_flag]: https://github.com/box/boxcli/pull/92
[cli_update_config_dump]: https://github.com/box/boxcli/pull/83

repository: box/box-developer-changelog

repo_name: box/box-developer-changelog


text:
# Integer programming formulations for the time-dependent elementary shortest path problem with resource constraints
Source code to replicate the experiments from the article https://doi.org/10.1016/j.endm.2018.07.008

## Abstract
The impact of congestion in transportation has become one of the main concerns regarding urban planing in large cities. Time-Dependent Vehicle Routing Problems (TDVRPs) is the name given to a broad family of VRPs that explicitly incorporate the congestion by considering variable travel times. In this paper we study the Time-Dependent Elementary Shortest Path Problem with Resource Constraints (TDESPPRC), that appears as the pricing sub-problem in column generation-based approaches for TDVRPs. We consider two integer programming formulations which exploit the characteristics of the time-dependent travel time function and are evaluated on benchmark instances. On preliminary computational experiments, the approach is able to effectively solve instances with up to 25 vertices in reasonable times, showing its potential to be used within a Branch and Price algorithm.

## Getting started
The following instructions will guide you through the steps to execute the experiments from the article.

### Prerequisites
- Python >= 3.6 [(more info)](https://www.python.org/)
- CPLEX >= 12.8 [(more info)](https://www.ibm.com/products/ilog-cplex-optimization-studio)
- Boost Graph Library >=1.66 [(more info)](https://www.boost.org/doc/libs/1_66_0/libs/graph/doc/index.html)
    - On Linux: ```sudo apt-get install libboost-all-dev```
- CMake >= 2.8.4 [(more info)](https://cmake.org/)
    - On Linux: ```sudo apt-get install cmake```
- C++14 or higher [(more info)](https://es.wikipedia.org/wiki/C%2B%2B14)

### Built with
- Kaleidoscope: A tool to visualize the outputs of Optimization Problems [(more info)](https://github.com/gleraromero/kaleidoscope)
- Runner: A script to ease the process of running experiments [(more info)](https://github.com/gleraromero/runner)
- GOC lib: A library that includes interfaces for using (Mixed Integer) Linear Programming solvers, and some useful resources [(more info)](https://github.com/gleraromero/goc).

### Running the experiments.
1. Add environment variables with the paths to the libraries.
    1. Add two environment variables to bash with CPLEX include and library paths.
        1. ```export CPLEX_INCLUDE=<path_to_cplex_include_dir>```
            - Usually on Linux: _/opt/ibm/ILOG/CPLEX_Studio\<VERSION\>/cplex/include_
        1. ```export CPLEX_BIN=<path_to_cplex_lib_binary_file>```
            - Usually on Linux: _/opt/ibm/ILOG/CPLEX_Studio\<VERSION\>/cplex/lib/x86-64_linux/static_pic/libcplex.a_
    1. Add two environment variables to bash with BOOST Graph Library include and library paths.
        1. ```export BOOST_INCLUDE=<path_to_boost_include_dir>```
            - Usually on Linux: _/usr/include_
        1. ```export BOOST_BIN=<path_to_boost_lib_binary_file>```
            - Usually on Linux: _/usr/lib/x86_64-linux-gnu/libboost_graph.a_
1. Go to the euroalio2018 root directory.
1. Execute ```python3 runner/runner.py experiments/comparison.json```
1. The execution output will be continually saved to the output folder.

### Visualizing the experiment results.
1. Go to https://gleraromero.github.io/kaleidoscope/euroalio2018/index.html
1. Add the output file.
1. Select the experiments (TTBF or CTTBF).
1. Add some attributes to visualize.
1. Click on Refresh.
1. If more details on an experiment are desired click on the + icon in a specific row.

### Checker
We include a checker program to validate that algorithms produce **valid** routes. To run the checker execute:
```python3 checker/checker.py output/<output_file.json>```

The checker will go through each instance and validate:
- That the exact solution route is feasible (with respect to all resources).
- That the reported duration of the route is correct.
- If Optimum status is reported, then it should be better or equal than any solution in the _solutions.json_ file of its dataset.

## Built With
* [JSON for Modern C++](https://github.com/nlohmann/json)
* [Boost Graph Library](https://www.boost.org/doc/libs/1_66_0/libs/graph/doc/index.html)

## Authors
- Gonzalo Lera-Romero
- Juan José Miranda-Bront

## License
This project is licensed under the MIT License - see the LICENSE.md file for details


text:
---
sidebar_position: 2
---

# Getting started

The library is very straight forward, at the very top of the library there is country which is tanzania and at the very bottoms are places in a given street and you access the locations as attributes just as shown in the example below;

## Example

```python

>>> from mtaa import tanzania
>>> tanzania
['Shinyanga', 'Mara', 'Dar-es-salaam', 'Kilimanjaro', 'Kagera', 'Tanga', 'Mwanza', 'Tabora', 'Kigoma', 'Pwani', 'Ruvuma', 'Mtwara', 'Morogoro', 'Rukwa', 'Katavi', 'Simiyu', 'Geita', 'Arusha', 'Iringa', 'Mbeya', 'Njombe', 'Manyara', 'Lindi', 'Singida', 'Songwe', 'Dodoma']

>>> tanzania.Mbeya.districts
['Mbeya cbd', 'Mbeya', 'Rungwe', 'Mbarali', 'Kyela', 'Chunya]

>>> tanzania.Mbeya.districts.Rungwe.wards
['ward_post_code', 'Bulyaga', 'Bagamoyo', 'Makandana', 'Msasani', 'Kawetele', 'Itagata', 'Ibigi', 'Kyimo', 'Suma', 'Masoko', 'Mpuguso', 'Malindo', 'Lufingo', 'Kiwira', 'Nkunga', 'Ikuti', 'Kisondela', 'Ilima', 'Bujela', 'Masukulu', 'Kisiba', 'Kabula', 'Lupata', 'Kambasegela', 'Kisegese', 'Itete', 'Lufilyo', 'Lwangwa', 'Mpombo', 'Isange', 'Kandete', 'Luteba', 'Isongole', 'Kinyala', 'Matwebe', 'Masebe', 'Swaya', 'Iponjola', 'Lupepo', 'Ndanto', 'Ntaba', 'Mpata']

```

## How about Dar-es-salaam ?

In the above example we were able to retreive locations of **Mbeya** region because, Mbeya is a valid python identifier, when you try to access **Dar-es-Salaam** it will ofcourse raise you an error just as shown below;

```python
>>> from mtaa import tanzania
>>> tanzania.Dar-es-salaam
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: 'Tanzania' object has no attribute 'Dar'
```

To resolve this at anypoint where you a location name is an invalid identifier, use get_dict() instead of (.) operator to access it as shown in the example below;

```python
>>> from mtaa import tanzania
>>> tanzania.get('Dar-es-salaam').districts
['Ilala cbd', 'Ilala', 'Kinondoni', 'Temeke', 'Ubungo', 'Kigamboni']

```

## Types ?

Since we can access the attributes by locations it obviously the **tanzania** is an Abstract data type (ADT) implemented using a class, we can see this by using python builtin functionality *type()*;

```python
>>> from mtaa import tanzania
>>> type(tanzania)
<class 'mtaa.Tanzania'>
```

In many cases you will want those locations to be in standard types whether that a list, tuple, or set to easy manipulate and interact with them as build an application but how ?

:::tip
tanzania object is iterable, that's means you can easy convert locations at any level location  into any iterable standard type whether that be a list, set or a tuple just as shown in the example below;

```python
>>> from mtaa import tanzania
>>> dar = tanzania.get('Dar-es-salaam').districts
>>> type(dar)
<class 'mtaa.Tanzania'>
>>> list(dar)
['Ilala cbd', 'Ilala', 'Kinondoni', 'Temeke', 'Ubungo', 'Kigamboni']
>>> set(dar)
{'Temeke', 'Kinondoni', 'Ilala', 'Ilala cbd', 'Kigamboni', 'Ubungo'}
>>> tuple(dar)
('Ilala cbd', 'Ilala', 'Kinondoni', 'Temeke', 'Ubungo', 'Kigamboni')
```
:::

## Looping over locations

As we have seen that since *mtaa.Tanzania* is an iterable, then thats means we can also loop through it.

:::note
When we loop over a *Mtaa.Tanzania* , we are looping the locations as strings not objects, here an example on what I mean;

```python
>>> for district in tanzania.Mbeya.districts:
...     print(type(district))
...
<class 'str'>
<class 'str'>
.............
```
:::

If were to find the all the district in Mbeya that starts with **R**, our code is going to look like this;

```python
>>> for ds in tanzania.Mbeya.districts:
...     if ds.startswith('R'):
...             print(f'{ds} starts with R')
...
Rungwe starts with R
```

In the next chapter we will see how to use mtaa to retrieve grouped locations data so keep reading

repository: Kalebu/mtaa-docs

repo_name: Kalebu/mtaa-docs


text:
# Donald-Trump-TweetBot-v1
Python script for replying to reddit comments about Trump with Trump Tweets

Created as a social experiment to see how users across various subreddits would react to actual tweets from Trump.

*Should be noted that the tweets were not preselected, and were in fact chosen completely at random by the bot.*

No subreddits were targetted in particular, the only targets were comments where the words 'Donald' or 'Trump' were included. This was to stop comments from going on *completely* unrelated threads, where it would be seen more as spamming than anything else.

If you are going to use this code, please do so under Reddit's guidelines, and I will not be held responsible for anything you do with the code.


text:
# Event-driven Finite State Machine

Event-driven finite state machine (QnFSM) game architecture implementation in JavaScript. For more information read chapter 6 in [this book](http://ithare.com/contents-of-development-and-deployment-of-massively-multiplayer-games-from-social-games-to-mmofps-with-stock-exchanges-in-between/).

<img src="diagram.png">

## Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.

### Prerequisites

For development the following versions were used. Proper functionality can't be guaranteed for earlier versions.

* [Git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git) >= 2.20.1
* [Node.js](https://nodejs.org/en/download/package-manager/) >= 10.18.0
* [npm](https://www.npmjs.com/get-npm) >= 6.13.7

### Installing

Clone Git repository

```
git clone https://github.com/nickyvanurk/qnfsm.git
```

Install required npm modules

```
npm install
```

Run the program

```
npm run dev
```

## Output

```
LoadState: updating
LoadState: rendering
Event added
Event added
Processing event
LoadState: loading graphics
RenderState: updating
RenderState: rendering
Processing event
PlayState: spawning player
Event added
Processing event
RenderState: creating spaceship at x: 29, y: 28, z: 28
RenderState: updating
RenderState: rendering
RenderState: updating
RenderState: rendering
...
```

## License

This project is licensed under the [MIT License](./LICENSE).

repository: nickyvanurk/qnfsm

repo_name: nickyvanurk/qnfsm


text:
# Important

This course is now archived and has been replaced with the [Serverless Angular with Firebase & AngularFire Course](https://github.com/angular-university/firebase-course).

# Repository contents

This repository contains the full application of the course Angular and Firebase - Build a Web Application, so this contains the complete application like it will look like at the end of the course.

This course repository is updated to Angular 6, there is a Yarn lock file available.

[Angular and Firebase - Build a Web Application](https://angular-university.io/course/build-an-application-with-angular2)

![Angular firebase course](https://angular-academy.s3.amazonaws.com/thumbnails/angular_app-firebase-small.jpg)

# Looking for the course starting repo?

If you are looking for a clean starting point for coding along as you follow the course, please check this [repository](https://github.com/angular-university/angular-firebase-app-starter) instead.

# Which Course are You Looking For?

Below is a list of the Angular University courses:

# Angular University Lessons Code
Contains the code for all the Angular University courses.

![Angular for Beginners course](https://angular-academy.s3.amazonaws.com/thumbnails/angular2-for-beginners-small.png)

If you are looking for the Complete Angular With Typescript Course, the repo can be found here:

# Complete Typescript 2 Course - Build A REST API

If you are looking for the Complete Typescript 2 Course - Build a REST API, the repo with the full code can be found here:

[Complete Typescript 2 Course - Build A REST API](https://github.com/angular-university/complete-typescript-course)

![Complete Typescript Course](https://angular-academy.s3.amazonaws.com/thumbnails/typescript-2-small.png)

# Angular Ngrx Reactive Extensions Architecture Course

If you are looking for the Angular Ngrx Reactive Extensions Architecture Course code, the repo with the full code can be found here:

[Angular Ngrx Reactive Extensions Architecture Course](https://github.com/angular-university/ngrx-course)

![Angular Ngrx Course](https://angular-academy.s3.amazonaws.com/thumbnails/ngrx-angular.png)

# RxJs and Reactive Patterns Angular Architecture Course

If you are looking for the RxJs and Reactive Patterns Angular Architecture Course code, the repo with the full code can be found here:

[RxJs and Reactive Patterns Angular Architecture Course](https://angular-university.io/course/reactive-angular-architecture-course)

![RxJs and Reactive Patterns Angular Architecture Course](https://s3-us-west-1.amazonaws.com/angular-academy/blog/images/rxjs-reactive-patterns-small.png)

# Installation pre-requisites

For running this project we need and npm installed on our machine. These are some tutorials to install node in different operating systems:

*Its important to install the latest version of Node*

- [Install Node and NPM on Windows](https://www.youtube.com/watch?v=8ODS6RM6x7g)
- [Install Node and NPM on Linux](https://www.youtube.com/watch?v=yUdHk-Dk_BY)
- [Install Node and NPM on Mac](https://www.youtube.com/watch?v=Imj8PgG3bZU)

# Installing the Angular CLI

With the following command the angular-cli will be installed globally in your machine:

    npm install -g @angular/cli

# Installing the code

The code can be installed with the following command (needs to be run in the folder where package.json is):

    npm install

If you prefer the Yarn package manager, instead of npm install you can also run:

    yarn

Although npm install would also work, its recommended to use Yarn to install the course dependencies. Yarn has the big advantage that if you use it you will be
installing the exact same dependencies than I installed in my machine, so you wont run into issues caused by semantic versioning updates.

This should take a couple of minutes. If there are issues, please post the complete error message in the Questions section of the course.

## Running the code
Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The app will automatically reload if you change any of the source files.

repository: imauice/angular-firebase-app

repo_name: imauice/angular-firebase-app