text:
---
title: Layers for grouping
extends: _layouts.documentation
section: main
lang: en
---

## Accordion

Accordions are useful when you want to switch between hiding and displaying a lot of content:

![Accordion](/assets/img/layouts/accordion.png)

Accordions support short syntax by calling a static method,
which does not require creating a separate class:

```php
use Orchid\Support\Facades\Layout;

public function layout(): array
{
    return [
        Layout::accordion([
            'Personal Information' => [
                Layout::rows([
                    Input::make('user.name')
                        ->type('text')
                        ->required()
                        ->title('Name')
                        ->placeholder('Name'),

                    Input::make('user.email')
                        ->type('email')
                        ->required()
                        ->title('Email')
                        ->placeholder('Email'),
                ]),
            ],
            'Billing Address'      => [
                Layout::rows([
                    Input::make('address')
                        ->type('text')
                        ->required(),
                ]),
            ],
        ]),
    ];
}
```

Keys will be used as headers.

Please note that you can specify the lowercase name of the class as values:

```php
public function layout(): array
{
    return [
        Layout::accordion([
            'Personal Information' => PersonalInformationRow::class,
            'Billing Address'      => BillingAddressRow::class,
        ]),
    ];
}
```

## Columns

Columns are useful when you need to group content.

![Columns](/assets/img/layouts/columns.png)

Columns support short syntax by calling a static method,
which does not require creating a separate class:

```php
use Orchid\Support\Facades\Layout;

public function layout(): array
{
    return [
        Layout::columns([
           TableExample::class,
           RowExample::class,
        ]),
    ];
}
```

## Selection

To group filters, reset them and apply them, there is a separate layer `Selection`, in which they are indicated.

To create, run the command:
```php
php artisan orchid:selection MySelection
```

Class Example:
```php
namespace App\Orchid\Layouts;

use Orchid\Platform\Filters\Filter;
use Orchid\Press\Http\Filters\CreatedFilter;
use Orchid\Press\Http\Filters\SearchFilter;
use Orchid\Screen\Layouts\Selection;

class MySelection extends Selection
{
    /**
     * @return Filter[]
     */
    public function filters(): array
    {
        return [
          SearchFilter::class,
          CreatedFilter::class
        ];
    }
}
```

## Tabs

Tabs group content and help with navigation. Useful when you want to switch between hiding and displaying a lot of content:

![Tabs](/assets/img/layouts/tabs.png)

Tabs support short syntax by calling a static method,
which does not require creating a separate class:

```php
use Orchid\Support\Facades\Layout;

public function layout(): array
{
    return [
        Layout::tabs([
            'Personal Information' => [
                Layout::rows([
                    Input::make('user.name')
                        ->type('text')
                        ->required()
                        ->title('Name')
                        ->placeholder('Name'),

                    Input::make('user.email')
                        ->type('email')
                        ->required()
                        ->title('Email')
                        ->placeholder('Email'),
                ]),
            ],
            'Billing Address'      => [
                Layout::rows([
                    Input::make('address')
                        ->type('text')
                        ->required(),
                ]),
            ],
        ]),
    ];
}
```

Keys will be used as headers.

Please note that you can specify the lowercase name of the class as values:

```php
public function layout(): array
{
    return [
        Layout::tabs([
            'Personal Information' => PersonalInformationRow::class,
            'Billing Address'      => BillingAddressRow::class,
        ]),
    ];
}
```


text:
# Simple-Implementation-of-ML-Algorithms Using Only Numpy
### My simplest implementations of common ML algorithms from scratch.
* Most commonly used algorithms including Regressions, Graph Models, Deep Learning, Ensemble Learning, Reinforcement Learning, Optimization Algorithms, Swarm Intelligence, Heuristic Search, and other basic ML algorithms (see below list for more details).
* For an easy understanding, most of the codes implements only minimal version of the algorithm.
* The implementation uses only numpy.
* Most algorithms are within 100 lines of codes.

### Example Output
* Decision boundary visualization for implemented classifiers in `decision_boundary_visualization.py`
![supervised_model](supervised_model.png)

* Optimization process visualization in `optimization_visualization.py`: ![optimization](optimization.png)

* digit images from the generative models trained with MNIST dataset:
    * Deep Convolutional Generative Adversarial Network (DC GAN) in `generative_adversarial_network.py`: ![dc_gan](dc_gan.png)

    * Variational Autoencoders (VAE) in `variational_autoencoder.py`: ![vae](vae.png)

    * Average image by Restricted Boltzmann Machine (RBM) `restricted_boltzman_machine.py`: ![rbm](rbm.png)

### Implemented algorithms:

#### Regression Models
* Linear Regression `linear_regression.py`
    * Matrix solver
    * SGD/Adam solver
    * L1 regularization Lasso
    * L2 regularization Ridge
* Logistic Regression `logistic_regression.py`
    * Multi-class prediction
* Factorization Machines `factorization_machines.py`
    * Regularization
    * Classification/regression

#### Tree Models and Ensemble Learning
* Decision Tree `decision_tree.py`
    * Classification/regression
    * Different metrics
    * Feature importances
    * Sample weights
* Random Forest `random_forest.py`
* Adaboost `adaboost.py`
* Gradient Boosting Decision Tree (GBDT) `gradient_boosting_decision_tree.py`
    * Shrinkage
    * Line search of multiplier
* XGBoost `xgboost.py`
    * XGBoost Regression Tree
    * Shrinkage

#### Deep Learning
* Architecture
    * Supervised Model
        * Multilayer Perceptron (MLP) `multilayer_perceptron.py` / `simple_mlp.py`
        * Convolutional Neural Network (CNN) `convolutional_neural_network.py`
            * Convolutional layer with vectorized img2col and col2img
        * Recurrent neural network (RNN) `recurrent_neural_network.py`
            * Backpropagation through time (BPTT)
        * Long short-term memory (LSTM) `long_short_term_memory.py`
    * Generative Model
        * Restricted Boltzman Machine (RBM) `restricted_boltzman_machine.py`
        * Deep Belief Network (DBN) `deep_belief_network.py`
        * Variational autoencoder (VAE) `variational_autoencoder.py`
        * Generative Adversarial Network (GAN) `generative_adversarial_network.py`
            * Deep Convolutional GAN (DCGAN)
            * Conditional GAN
    * Transfer Learning `transfer_learning.py`
            * CNN on MNIST - freeze convolutional and fine tune dense layers
* Layers `nn_layers.py` / `simple_cnn_layers.py`
    * Feedforward layer (dense)
    * Convolutional layer
    * Max pooling layer
    * Batch normalization layer
    * Softmax layer for classification
    * Activation layer
        * ReLU (Leaky)
        * Tanh (Leaky)
        * Sigmoid
    * Drop out layer (WIP)
* Training `nn_layers.py` / `multilayer_perceptron.py`
    * Mini Batch
    * He initialization
    * Loss functions
        * Mean squared error for regression
        * Cross entropy for classification
        * Log loss for classification
    * L1/L2 Regularization
    * Gradient check

#### Optimization Algorithms
* Gradient Descent and variations `optimization_visualization.py` / `multilayer_perceptron.py`
    * Stochastic Gradient Descent
    * Gradient Descent with Momentum
    * Nesterov Momentum
    * AdaGrad
    * RMSProp
    * Adam
* Monte Carlo method for global optimum
    * Simulated annealing  `optimization_visualization.py`

#### Graph Models
* Naive Bayes `naive_bayes.py`
    * Multinomial model
    * Document tokenizer
* Beyesian Network `beyesian_net.py`
    * Conditional probability MLE
    * Beyesian inference
* Hidden Markov Model `hidden_markov_model.py`
    * Fitting by Baum-Welch
    * Prediction by Viterbi
* Markov Random Field `markov_random_field.py`
    * Image Segmentation
    * Simulated Annealing for optimal Energy Function

#### Instance-based Learning and Kernel Machines
* k-Nearest Neighbors (kNN) `k_nearest_neighbors.py`
* Learning Vector Quantization
* Support Vector Machine (SVM) `support_vector_machine.py`
    * Soft boundary
    * SMO algorithm
    * Different heuristics for selecting pairs in SMO

#### Swarm Intelligence
* Evolutionary Algorithm (EA) `evolutionary_algorithm.py`
    * Training a NN model by Genetic Algorithm
    * Selection by Fitness
    * Crossover approaches
    * Mutation rate
* Ant Colony Optimization (ACO) `ant_colony.py`
    * Traveling Salesman Problem

#### Heuristic Search
* Monte Carlo tree search `monte_carlo_tree_search.py`
    * Upper Confidence Bound 1 applied to trees (UCT)
* Minimax `minimax.py`
    * Alpha-Beta Pruning

#### Reinforcement Learning
* Temporal difference learning `temporal_difference.py`
    * Tabular Q Learning
* Deep Q-Network (DQN) `deep_q_network.py`
    * CNN Target & Policy Net
    * Epsilon-Greedy

#### Unsupervised Learning
* Clustering (WIP)
    * k-Means / dbscan / spectrum / hierachical
* Dimension Reduction (WIP)
    * SOM
    * Principal Component Analysis / Linear Discriminant Analysis / MDS / t-SNE

Feel free to use the code. Please contact me if you have any question: xiecng [at] gmail.com

license: MIT

branch_name: refs/heads/master

extension: md

license_type: permissive


text:
# Webster Class - 1
## Initial Setup Instructions

- [Installing VS Code](https://code.visualstudio.com/)

- [Installing Bootstrap Files](https://tinyurl.com/bootstrapWS2019)

## Webster Class Codes

- [Codes of Class 1](https://github.com/CC-MNNIT/2019-20-Classes/tree/master/WebDev/2019_08_21_Webster-Class-1)

## Webster Class Assignment
- [Assignment for Class 1](https://drive.google.com/file/d/1_SxXhMogELcKtv_b9zWKsoqYJ-oHMM2c/view?usp=sharing)

## Resources

- [HTML Resource](https://www.w3schools.com/html/default.asp): One of the best References of HTML for beginners.

- [CSS Resource](https://www.w3schools.com/css/default.asp): One of the best References of CSS for beginners.

- [Bootstrap 4 Docs](https://getbootstrap.com/docs/4.3/getting-started/introduction/): Official Bootstrap Docs

## Webster Class Codes

- [Codes of Class 1](https://github.com/CC-MNNIT/2019-20-Classes/tree/master/WebDev/Webster_Class1_21_08_2019)

## Important Links

- Important Links for CSS assignment:
    - [CSS Positioning](https://www.w3schools.com/css/css_positioning.asp)
    - [CSS Display](https://www.w3schools.com/css/css_display_visibility.asp)
    - [CSS Float](https://www.w3schools.com/css/css_float.asp)
    - [CSS Z-index](https://www.w3schools.com/cssref/pr_pos_z-index.asp)

- Other must read Links:
    - [CSS Flexbox](https://www.w3schools.com/css/css3_flexbox.asp)
    - [CSS Boxsizing](https://www.w3schools.com/css/css3_box-sizing.asp)
    - [CSS Media Queries](https://www.w3schools.com/css/css_rwd_mediaqueries.asp)
    - [CSS Selectors](https://www.w3schools.com/cssref/css_selectors.asp)

gha_license_id: MIT


text:
# Ramichloridium obovoideum (Matsush.) de Hoog, 1977 SPECIES

#### Status
SYNONYM

#### According to
The Catalogue of Life, 3rd January 2011

#### Published in
Stud. Mycol. 15: 73 (1977)

#### Original name
Rhinocladiella obovoidea Matsush.

### Remarks
null

repository: mdoering/backbone

path: /life/Fungi/Ascomycota/Sordariomycetes/Sordariales/Pleurothecium/Pleurothecium obovoideum/ Syn. Ramichloridium obovoideum/README.md

repo_name: mdoering/backbone


text:
## Contract

### Streamer

A Wukong::Streamer must define:

* `process(*record)` -- accepts the array of args returned by the class's `recordize` method

class WebLogParser < Wukong::Streamer
  include Wukong::ApacheLogRecordizer

  def process( date, referer, response, duration, browser_string )
    # ...
  end
class

You may also define:

#### Things that v1 does

* **after_stream**
* **before_stream**
* **track**       -- called with the record after -- used for logging
* **bad_record!** -- on a bad record
* **monitor**     --

#### Things that those are intended to do:

* **this should all be much hook-ier**:
  - using hook behavior pulled in from active_support

* **easy way to dump to log** --

* The **bad_record!** should have an easy hook to say "shit the bed if there are too many bad records"

    on_bad_record do |junk|
      @bad_record_count += 1  # ?? how do I make it not instance-y
      if @bad_record_count > max_bad_records
      end
    end

  - I can then make a class method that would define hooks:

    ```ruby
    die_on_too_many_bad_records(1000)
    ```

#### Reasons for and against going 1.9+ only in  wukong

**CON**:

* fewer people can use it
* you *must* run JRuby in 1.9 mode

**PRO**:

* 1.9 is WAY THE FUCK BETTER
* you can use ordered hashes
* cause I don't want to have to write/run tests in both.

### Recordizer

* `recordize(blob)` -- accepts a blob of data, and returns an array of params to be processed

  def process(record)
    # ..
  end

... then recordize looks like

  def recordize(blob)
    # ...
    [ record ]
  end

if your process method looks like this

  def process( date, referer, response, duration, browser_string )
    # ...
  end

then recordize loooks like

  def recordize(blob)
    # ...
    [ date, referer, response, duration, browser_string ]
  end

### Emitter (? Sink ?)

### ?? Source ??

## First-class Flume Integration

junk:

        # jRubyDecorator script
        require 'java'
        java_import 'com.cloudera.flume.core.EventSinkDecorator'
        java_import 'com.cloudera.flume.core.Event'
        java_import 'com.cloudera.flume.core.EventImpl'

        module FlumeConnector

          # FIXME: need to call before_stream in initializer?? open??

          def append(e)
            body = String.from_java_bytes e.getBody

            record = recordize(body.chomp) or return

            process(*record) do |output_record|
              emit(record, e)
            end
          end

          def emit(record, e)
            out_line = record.to_flat.join("\t")
            out_buf  = out_line.to_java_bytes
            super EventImpl.new(out_buf, e.getTimestamp, e.getPriority, e.getNanos, e.getHost, e.getAttrs )
          end

          # FIXME: need to call after_strem in ?close?
        end

        class ReverseDecorator < EventSinkDecorator
          # def initialize(context, *args)
          #   super( nil )
          # end
        end

        Wukong::Script.new(ReverseStreamer, nil).run

repository: phosphene/wukong

repo_name: phosphene/wukong


text:
---
title: calControlGroup
short: Use control group buttons in calendar
modes: [
	'calbox',
]
frames: [ 'jqm' ]
cats: [ 'themes' ]
relat: "themes"
layout: api
defval: "false"
dattype: "Boolean"
dyn: "True"
---

Show a full week as a collapsed control group.  As of recent versions of jQM, all
this seems to do is remove a bunch of the rounded corners between dates.  This option has no effect
on the bootstrap version, as this is already handled with button groups.

repository: spolischook/jtsage-datebox

repo_name: spolischook/jtsage-datebox


text:
# Evaluation and Optimization

Underfitting

We need more data or train more.

Overfitting

Introduce more data

Early stopping

Sprinkle in more noise

Regularization

Ensembles (combine different models together)

Ditch some features

| Training Error | Testing Error | |
|----------------|---------------|-|
| Low | Low | Its good |
| Low | High | Overfitting |
| High | High | Reject |
| High | Low | Rarely happens, Reject |

Regression accuracy is measured by RMSE.

Lower RMSE (Root mean square Error) is better.

| | True | False |
|-|------|-------|
| True | Predicted correct | False positive </br> Type I Error |
| False | False Negative </br> Type II Error | Predicted Correctly |

ML model performance metric for binary classification model

AUC (Area under the Curve)

value will be between 0 to 1, values closer to 1 means model is more accurate.

Recall = We guessed right / We guessed right + We should have flagged these too

eg: spam gets through

Precision = We guessed right / We guessed right + We flagged these but we were wrong

eg: Legitimate email gets blocked.

F1 score = 2 * (Precision * Recall) / (Precision + Recall)

The hight the F1 score the better.

url: https://raw.githubusercontent.com/sampat21/AWS-Certifications/124efdd5ad54f92b5476758467883401e99c8be5/2.AWS Certified Machine Learning – Specialty/07.Evaluation And Optimization/evaluationAndOptimization.md


text:
# Frontend Boilerplate with React, Redux & TypeScript

A bare minimum react-redux-webpack-typescript boilerplate with TodoMVC example.

Note that this project does not include **Server-Side Rendering**,  **Testing Frameworks** and other stuffs that makes the package unnecessarily complicated.

Ideal for creating React apps from the scratch.

See also: [react-mobx-typescript-boilerplate](https://github.com/rokoroku/react-mobx-typescript-boilerplate)

### Branches
- [`feature-tslint`](https://github.com/rokoroku/react-redux-typescript-boilerplate/tree/feature/tslint): yarn + tslint + prettier integrated branch.

## Contains

- [x] [Typescript](https://www.typescriptlang.org/) 2.5
- [x] [React](https://facebook.github.io/react/) 16.0
- [x] [Redux](https://github.com/reactjs/redux) 3.7
- [x] [React Router](https://github.com/ReactTraining/react-router) 4.2
- [x] [Redux DevTools Extension](https://github.com/zalmoxisus/redux-devtools-extension)
- [x] [TodoMVC example](http://todomvc.com)

### Build tools

- [x] [Webpack](https://webpack.github.io) 3
  - [x] [Tree Shaking](https://medium.com/@Rich_Harris/tree-shaking-versus-dead-code-elimination-d3765df85c80)
  - [x] [Webpack Dev Server](https://github.com/webpack/webpack-dev-server)
- [x] [Awesome Typescript Loader](https://github.com/s-panferov/awesome-typescript-loader)
- [x] [PostCSS Loader](https://github.com/postcss/postcss-loader)
  - [x] [CSS next](https://github.com/MoOx/postcss-cssnext)
  - [x] [CSS modules](https://github.com/css-modules/css-modules)
- [x] [React Hot Loader](https://github.com/gaearon/react-hot-loader)
- [x] [ExtractText Plugin](https://github.com/webpack/extract-text-webpack-plugin)
- [x] [HTML Webpack Plugin](https://github.com/ampedandwired/html-webpack-plugin)

## Setup

```
$ npm install
```

## Running

```
$ npm start
```

## Build

```
$ npm run build
```

# License

MIT

gha_language: TypeScript


text:
#Meteor: Full-Stack Web Application Development
By Packt

###What will you learn

* Secure your site with Meteor best practices
* Create reactive templates that update themselves when data changes
* Add routing to a single-page application and make it appear like a real website
* Make your own Meteor packages and see how to make them public
* Rapidly build robust, responsive user interfaces
* Publish your own reusable custom packages
* Optimize your site for load speed with advanced publishers and subscribers
* Master the intricacies of front-end development using Jeet, Bootstrap, CSS animations, and more
* Leverage the aggregation framework to produce results with big data
* Optimize your site for search engine visibility

###Related products

* [Building Single-page Web Apps with Meteor](https://www.packtpub.com/web-development/building-single-page-web-apps-meteor?utm_source=github&utm_medium=repository&utm_campaign=9781783988129)
* [Mastering Meteor: Powerful Reactive Applications with Full-Stack JavaScript [Video]](https://www.packtpub.com/web-development/mastering-meteor-powerful-reactive-applications-full-stack-javascript-video?utm_source=github&utm_medium=repository&utm_campaign=9781783552580)
* [Getting Started with Meteor.js JavaScript Framework](https://www.packtpub.com/web-development/getting-started-meteorjs-javascript-framework?utm_source=github&utm_medium=repository&utm_campaign=9781782160823)

###Suggestions and Feedback
 [Click here](https://docs.google.com/forms/d/e/1FAIpQLSe5qwunkGf6PUvzPirPDtuy1Du5Rlzew23UBp2S-P3wB-GcwQ/viewform) if you have any feedback or suggestions.### Download a free PDF

 If you have already purchased a print or Kindle version of this book, you can get a DRM-free PDF version at no cost.
Simply click on the link to claim your free PDF.

 https://packt.link/free-ebook/9781787287754


text:
# Adopt Me

![Workflow result](https://github.com/Varsha-Kulkarni/AdoptMe/workflows/Check/badge.svg)

## :scroll: Description

This is a Pet Adoption app UI, built with [Jetpack Compose](https://developer.android.com/jetpack/compose).

## :bulb: Motivation and Context

Jetpack Compose is Android’s modern toolkit for building native UI. It simplifies and accelerates UI development on Android. Quickly bring your app to life with less code, powerful tools, and intuitive Kotlin APIs.

## Features
### The app contains an overview screen that displays a list of pets, and a detail screen showing each pet's details.
These screens use prepoulated dummy data and compose different custom `Composable` functions.
- Use `Row` and `Column` to arrange the contents of the UI, the style setting.
- Add `TopAppBar`
- Use `Material` `Typography` to style the text
- Use `elevation` to make the Cards stand out from the background
- Use Navigation component, with passing arguments to a destination
- Use `LazyColumn` and `LazyRow` to show how only visible items are loaded into the list
- Use `painterResource` to load image drawable resources
- Use `Layout` to show [VerticalGrid](https://github.com/android/compose-samples/blob/main/Jetsnack/) of two columns
- Use `Box` with `ScrollState`, simulate [Collapsible Toolbar](https://github.com/android/compose-samples/blob/main/Jetsnack/)
- Use of [`FilterChip`](https://github.com/android/compose-samples/blob/main/Jetsnack/) to show filters
- Use `CircleShape` to display images

## :camera_flash: Screenshots

## :gif: Animated Preview of the App

### Image Sources
- [Afador](https://www.dogtime.com/)
- [Beaglier](https://puppytoob.com/beaglier/)
- [Bulldog](https://dogtime.com/dog-breeds/bulldog)
- [Goldador](https://animalso.com/breeds/goldador/)
- [Munchkin](https://www.thehappycatsite.com/munchkin-cat/)
- [Himalayan](https://en.wikipedia.org/wiki/Himalayan_cat#/media/File:Himalayan-sharapova.jpg)

## License
```
Copyright 2020 The Android Open Source Project

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    https://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
```

repository: Varsha-Kulkarni/AdoptMe

branch_name: refs/heads/main

repo_name: Varsha-Kulkarni/AdoptMe


text:
# url_connect [![Build Status](https://travis-ci.org/zhoutwo/url_connect.svg?branch=master)](https://travis-ci.org/zhoutwo/url_connect)
A Google Chrome extension that enables users to talk to others who are viewing the same web page

The github repository is at https://github.com/zhoutwo/url_connect

## Development Setup
Install the latest `yarn` package manager.
```
  npm install -g yarn
  yarn install
```
This will use the `yarn.lock` file increase the speed of installs.

## Build
To run watched builds:
```
  yarn start
```
This will build a `popup.js` script in `.\client\src\browser_action\popup.js`. Open Chrome and load the `client` at `chrome://extensions/`. After every build, you must reload the extension.

## Linter
To run the linter:
```
  yarn lint
```
 The linter settings are defined in `tslint.json`.


text:
# React-native redux starter

A boilerplate for building a mobile app using React Native and Redux.

## Requirements
- [Node](https://nodejs.org) `4.x` or newer
- [React Native](http://facebook.github.io/react-native/docs/getting-started.html) for development
- [Xcode](https://developer.apple.com/xcode/) for iOS development

See [Getting Started](https://facebook.github.io/react-native/docs/getting-started.html) to install requirement tools.

## Stack
- [React Native](https://facebook.github.io/react-native/) `0.24.1` for building native apps using react
- [Redux](http://rackt.github.io/redux/index.html) `3.5.x` a predictable state container for Javascript apps
- [Babel](http://babeljs.io/) `6.x.x` for ES6+ support
- [Immutable](https://facebook.github.io/immutable-js/) Immutable persistent data collections for Javascript
- [React Native Router Flux](https://github.com/aksonov/react-native-router-flux) a router based on new React Native Navigation API

## Getting Started
Clone the repo and install dependencies:
```shell
$ git clone https://github.com/eduvon0220/react-native-redux-starter.git
$ cd react-native-redux-starter
$ npm install
$ npm start            # starts the development server
```

##### iOS:
Open `App.xcodeproj` in Xcode, build and run the project.

## Debugging
[Access the in-app developer menu](https://facebook.github.io/react-native/docs/debugging.html) and select ``Debug in Chrome``.

repository: anonrig/react-native-redux-starter

repo_name: anonrig/react-native-redux-starter


text:
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) > [@shopware-pwa/composables](./composables.md) > [IUseSessionContext](./composables.iusesessioncontext.md) > [onCurrencyChange](./composables.iusesessioncontext.oncurrencychange.md)

## IUseSessionContext.onCurrencyChange property

> This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
>

<b>Signature:</b>

```typescript
onCurrencyChange: (fn: (params: {
        currency: Currency;
    }) => void) => void;
```

repository: aris-creator/jancok

repo_name: aris-creator/jancok


text:
# ICE4131-HPC
Lab material for my ICE4131 module about High Performance Computing

## [Week 1](LAB1) -- Using Nano via HelloWorld + Pthread

The aim of this tutorial is to introduce you to the GNU/Linux environment used by SuperComputing Wales. You will learn how to

- log in,
- write and
- compile code, and
- run your first parallel tasks using POSIX threads (also known as Pthreads).

[Click here to go to Lab 1](LAB1).

## [Week 2](LAB2) -- Submitting jobs using SLURM

The aim of this lab is to execute programs on the supercomputer using SLURM (Simple Linux Utility for Resource Management). You will:

- list the partitions that are available on the supercomputer
    ```bash
    $ sinfo
    ```
- launch “Jobs” using SLURM
    ```bash
    $ sbatch
    ```
- view information about jobs located in the Slurm scheduling queue.
    ```bash
    $ squeue -u $USER
    ```

[Click here to go to Lab 2](LAB2).

## [Week 3](LAB3) -- Performance assessment of a program using gprof

In this lab, you practice what we've seen in the lecture so far:

<!-- 1. Parallelise some serial code using Pthreads in `PthreadImage::flipHorizontally()` in [LAB3/src/PthreadImage.cxx](LAB3/src/PthreadImage.cxx),
2. Add timestamps to assess the execution time in [LAB3/src/flip.cxx](LAB3/src/flip.cxx),
3. Run the code on the compute nodes,
4. Plot graphs of runtimes and of speedups. -->

1. Identify the portion of the code that is slow using `gprof`.
2. Run the code on the compute nodes with output images of increasing sizes.
3. Plot graphs of runtimes for the program compiled with `g++` and `icc`

[Click here to go to Lab 3](LAB3-ray-tracing).

## Week 4 -- Parallel programming using POSIX threads (Pthreads)

The code in this lecture shows how to parallelise serial code using Pthreads. It covers:

- Workload balancing of `N` tasks across `T` threads,
- Pthread creation,
- Callback execution,
- Joining threads,
- Mutual exclusion,
- Evaluating execution time and speedup.

[Click here to go to Lecture 4](Lecture-4).
<!-- [Click here to go to Lab 4](Lecture-4). -->

<!-- ## [Lab 3](LAB3) -- Image class using Pthreads

In this lab, you practice what we've seen in the lecture so far:

1. Parallelise some serial code using Pthreads in `PthreadImage::flipHorizontally()` in [LAB3/src/PthreadImage.cxx](LAB3/src/PthreadImage.cxx),
2. Add timestamps to assess the execution time in [LAB3/src/flip.cxx](LAB3/src/flip.cxx),
3. Run the code on the compute nodes,
4. Plot graphs of runtimes and of speedups.

[Click here to go to Lab 3](LAB3).

## Lecture 5 -- Parallel programming using OpenMP

The code in this lecture shows how to parallelise serial code using OpenMP. It covers:

- `#pragma omp parallel` to parallelise for blocks
- `#pragma omp parallel for` to parallelise for loops
- `num_threads(<int>)` clause to control the number of threads per task,
- `omp_get_thread_num()` to return the current thread ID,
- `omp_get_num_threads()` to get the size of the active team (i.e. total number of threads),
- mutual exclusion/critical section with `#pragma omp critical`,
- the reduction clause.

[Click here to go to Lecture 5](Lecture-5).

## [Lab 4](LAB4) -- Image class using OpenMP

In this lab, you practice what we've seen in the lecture so far:

1. Finish parallelising some serial code using Pthreads in [LAB3/src/PthreadImage.cxx](LAB3/src/PthreadImage.cxx) (`PthreadImage::flipVertically()` and `PthreadImage::logFilter()`),
2. Add OpenMP pragmas to parallelise some serial code using OpenMP in [LAB3/src/OpenMPImage.cxx](LAB3/src/OpenMPImage.cxx) (`OpenMPImage::flipHorizontally()`, `OpenMPImage::flipVertically()` and `OpenMPImage::logFilter()`),
3. Compare the runtimes between Pthreads and OpenMP by plotting graphs of runtimes and of speedups.

[Click here to go to Lab 4](LAB4).

## Lecture 6 -- Introduction to MPI

It is a step-by-step introduction to MPI. It covers:

- MPI initialisation,
- Getting the world size,
- Getting the process' rank,
- Getting the processor's name,
- MPI finalisation,
- How to execute MPI programs on the supercomputer using SLURM.

[Click here to go to Lecture 6](Lecture-6).

## Lecture 7 -- Process communication with MPI

This lecture recaps:

- MPI initialisation,
- Getting the world size,
- Getting the process' rank,
- Getting the processor's name,
- MPI finalisation,
- How to execute MPI programs on the supercomputer using SLURM.

It also illustrates process communication one-to-one and many-to-many.

[Click here to go to Lecture 7](Lecture-7).

## [Lab 5](LAB5) -- Image class using MPI

In this lab, you will

1. Look at the MPI code in [LAB5/src/MPIImage.cxx](LAB5/src/MPIImage.cxx),
2. Experiment with various number of tasks and node,
3. Compare the MPI implementation against your Pthread and OpenMP implementations by plotting graphs of runtimes and of speedups.

[Click here to go to Lab 5](LAB5).

## Lecture 8 -- Introduction to CUDA

To appear

## [Lab 6](LAB6) -- Image class using CUDA

In this lab, you will

1. Look at the CUDA code in [LAB6/src/CudaImage.cxx](LAB6/src/CudaImage.cxx),
2. Compile code implemented using CUDA,
3. Run the code using a GPU node:
  - Adapt SLURM scripts for `sbatch` to make sure that a GPU is available on the compute node.
4. Compare the runtimes between CUDA, Pthreads, OpenMP and MPI by plotting graphs of runtimes and of speedups.

## [Lab 7](LAB7) -- Write your own C/C++ and CUDA code

In this lab, you will create your first CUDA programs from scratch. -->


text:
# Wal Theme

This extensions for Visual Studio Code adds a **real time updated theme** that is dynamically generated from the color palette provided by [pywal](https://github.com/dylanaraps/pywal).

## Screenshots

![Example 1](https://raw.githubusercontent.com/dlasagno/vscode-wal-theme/master/screenshots/1.png)

![Example 2](https://raw.githubusercontent.com/dlasagno/vscode-wal-theme/master/screenshots/2.png)

![Example 3](https://raw.githubusercontent.com/dlasagno/vscode-wal-theme/master/screenshots/3.png)

## Features

- Real time updates of the color scheme
- Two variants available: borderless and bordered
- Works out of the box: no setup needed, just run pywal as you normally would

## Requirements

In order to use this extension pywal is needed, it should be run before updating the theme provided by this extension.

## Extension Commands

This extension contributes the following command:

- `walTheme.update`: execute a manual update of the theme

## Extension Settings

This extension contributes the following setting:

- `walTheme.autoUpdate`: enable/disable the auto update of the theme provided by this extension

## Release Notes

The release notes can be find in the [changelog](https://github.com/dlasagno/vscode-wal-theme/blob/master/CHANGELOG.md).

## Troubleshooting

If the extension doesn't update automatically, while the auto updates are enabled, try to do a manual update with the update command.
If the manual update doesn't work try reloading the window.

---

## Credits

This extension is inspired by [Ayu](https://github.com/ayu-theme/vscode-ayu) and [vscode-wal](https://github.com/bluedrack/vscode-wal).

repository: cristeigabriel/vscode-wal-theme

repo_name: cristeigabriel/vscode-wal-theme


text:
---
layout: pattern
title: Specification
folder: specification
permalink: /patterns/specification/
categories: Behavioral
tags:
 - Java
 - Difficulty-Beginner
 - Searching
---

## Also known as
Filter, Criteria

## Intent
Specification pattern separates the statement of how to match a
candidate, from the candidate object that it is matched against. As well as its
usefulness in selection, it is also valuable for validation and for building to
order.

![alt text](./etc/specification.png "Specification")

## Applicability
Use the Specification pattern when

* You need to select a subset of objects based on some criteria, and to refresh the selection at various times.
* You need to check that only suitable objects are used for a certain role (validation).

## Explanation

Real world example

> There is a pool of different creatures and we often need to select some subset of them. We can write our search specification such as "creatures that can fly" or "creatures heavier than 500 kilograms" and give it to the party that will perform the filtering.

In Plain Words

> Specification pattern allows us to separate the search criteria from the object that performs the search.

Wikipedia says

> In computer programming, the specification pattern is a particular software design pattern, whereby business rules can be recombined by chaining the business rules together using boolean logic.

**Programmatic Example**

If we look at our creature pool example from above, we have a set of creatures with certain properties.\
Those properties can be part of a pre-defined, limited set (represented here by the enums Size, Movement and Color); but they can also be discrete (e.g. the mass of a Creature). In this case, it is more appropriate to use what we call "parameterized specification", where the property value can be given as an argument when the Creature is created, allowing for more flexibility.

```java
public interface Creature {
  String getName();
  Size getSize();
  Movement getMovement();
  Color getColor();
  Mass getMass();
}
```

And dragon implementation looks like this.

```java
public class Dragon extends AbstractCreature {

  public Dragon() {
    super("Dragon", Size.LARGE, Movement.FLYING, Color.RED, new Mass(39300.0));
  }
}
```

Now that we want to select some subset of them, we use selectors. To select creatures that fly, we should use MovementSelector.

```java
public class MovementSelector implements Predicate<Creature> {

  private final Movement movement;

  public MovementSelector(Movement m) {
    this.movement = m;
  }

  @Override
  public boolean test(Creature t) {
    return t.getMovement().equals(movement);
  }
}
```

On the other hand, we selecting creatures heavier than a chosen amount, we use MassGreaterThanSelector.

```java
public class MassGreaterThanSelector implements Predicate<Creature> {

  private final Mass mass;

  public MassGreaterThanSelector(double mass) {
    this.mass = new Mass(mass);
  }

  @Override
  public boolean test(Creature t) {
    return t.getMass().greaterThan(mass);
  }
}
```

With these building blocks in place, we can perform a search for red and flying creatures like this.

```java
    List<Creature> redAndFlyingCreatures = creatures.stream()
            .filter(new ColorSelector(Color.RED).and(new MovementSelector(Movement.FLYING))).collect(Collectors.toList());
```

But we could also use our paramterized selector like this.

```java
    List<Creature> heavyCreatures = creatures.stream()
            .filter(new MassGreaterThanSelector(500.0).collect(Collectors.toList());
```

## Related patterns

* Repository

## Credits

* [Martin Fowler - Specifications](http://martinfowler.com/apsupp/spec.pdf)

repository: moodfactor/java-design-patterns

repo_name: moodfactor/java-design-patterns


text:
# jrbPivot

## Introduction

This is a javascript based pivot table calculator that is full of features. It comes with a UI designer to help developers.

The 'external' folder contains all the dependencies needed, so download the package, and open up the **pivotExample.html** in your browser directly.

## Features

* Extensive pivoting of data with any set of table field (column) names used to set row and column headings
* Multiple functions available to act on pivoted data sets: 'Sum', 'Count', 'List', 'Unique List', 'Max', 'Min', 'Mean', 'Mode', 'Median', 'Product', 'Variance', 'StdDev', 'None'
* User defined functions also available
* Data pre-filtering
* Any number of pivoting functions can be used on each value being pivoted (e.g. sum, count, min, max can be used together)
* Pivoted data sortable by row and column.
  * Each field can be be sorted ascending or descending by it's name, or by pivoted values
  * Each field can be be sorted manually (pre-set).
  * Data field names & operations can be used to collate columns
* Summary rows & columns available (e.g. totals) for any pivoted field, or all as a collective
* Option to fill empty cells with 0, null, or empty space
* 'Where from' data returned as part of pivoting action

## Example Use

```javascript
myOutputPivoted = jrbAnalytics.getGlobal('model.pivot')(myInputData, myParams);
```

where myInputData and myOutputPivoted are jrbAnalytics data objects, and myParams is the configuration JSON (see below). Note that myParams IS MODIFIED with a '__ErrorMessages' object that displays in clear text configuration errors identified. Non-matching field or function names for example.

## Helper functions:

### objectifyTable

```javascript
myInputData = jrbAnalytics.getGlobal('utils.objectifyTable')(myTable);
```
where myTable is a normal table object with a [{fieldName1:value1, fieldName2:value2, ..., {..}, ...] format;

### renderSimpleTable
```javascript
jrbAnalytics.getGlobal('utils.renderSimpleTable')('someDIVid', myInputData);
```
renders an HTML table of a jrbAnalytics data object.

### UI Designer
To use with the designer:

```javascript
myParams = {}; //or preset with a configuration
jrbAnalytics.getGlobal('model.pivot')(myInputData, myParams, divIDtoLoadDesigner);
```
loads the UI designer in the DIV with it's id equal to divIDtoLoadDesigner. E.g. if divIDtoLoadDesigner = "designer" then the UI designer is placed here:

```html
<div id="designer"></div>
```

There are two options to obtain the JSON configuration from the UI designer.
1. cut&paste the JSON object displayed ont the left of the designer panel
2. programatically, from the myParams.draftpivotconfig object. At any time 'myParams.draftpivotconfig' contains the latest draft configuration.

Also a document event 'refreshedUI' is triggered on each change. For example:

```javascript
document.addEventListener('refreshedUI', function (e) {
   $('#params').text(JSON.stringify({pivotconfig: myParams.draftpivotconfig}, null, 4));},
false);
```

## Creating the configuration JSON

### Option 1: Use the Designer

Use of the designer is recommended as the quickest way to construct the JSON object correctly and to obtain the view you want.  Change the 'myTable' variable to use your data set. The examples tabs may stop working, but the designer will not.

### Option 2: Construct by hand

Pass a JSON Object in this format:
```javascript
{
    pivotconfig: pivotConfigObject
}
```

where pivotConfigObject is a JSON object that contains items as follows.
- **dataNames**: array of strings ['field name 1', 'field name 2']. Optional but usually needed. Array of column names that contain the data being pivoted. Order of names used to determines order of output columns.
- **columnNames**: array of strings ['field name 1', 'field name 2']. Optional. Array of column names to use to populate the column headers. Order determines hierarchy, or how data is nested.
- **rowNames**: array of strings ['field name 1', 'field name 2']. Optional. Array of column names to use to populate the row headers. Order determines hierarchy, or how data is nested.
- **pivotFn**: string of function name. Optional. Examples are 'Sum' or 'Count', 'List', 'Unique List', 'Max', 'Min', 'Mean', 'mode', 'Median', 'Product', Variance', 'StdDev' also available. 'None', invalid values or not providing this parameter result in the same none operation on the pivoted data array. You can add your own functions with the following simple extension.
```javascript
 jA.extendGlobalObject('model.pivotfunctions', {
	SumPlusOne: function(arrin) { return math.sum(arrin) + 1; }, //note math.js function here
	CountMinusOne: function(arrin) { return arrin.length - 1; }, //note math.js function here
	myFunctionName: function(arrin) { --insert calculation then -- return result; }, //modify as needed
});
```
- **pivotEmpty** any value. Optional. What to use for pivoted cells that contain no data. If not set, 'undefined' will be used. A 0 or '' may be more useful.
- **cleandata** boolean, true or false. Optional but highly recommended. Interpreted as false if missing. When set, the pivot function excludes null, undefined or empty strings ('') in the input data from being pivoted. So for example this pivoted data [1, 4, '', '', 3] contains 5 items and fails to sum without cleandata set, whereas when set the data reduces to [1, 4, 3] contains 3 items and will sum.
- **options** options object. See below. Optional but needed for more useful pivoting actions. This object defines more specific filter, sort, data collation functions, and row and column summary and sub-summary functions (e.g. 'Sum' for totals and sub-totals).

## options object
Here follows a brief explanation. Serious users should use the UI designer to fully appreciate how to implement all the options available.
a JSON Object in this format:
```javascript
{
    'field name': {
		'action': {
			'sub-action': subActionValue,
			//..additional sub actions
		},
		//..additional actions
	},
	//additional field names
}
```
where
- 'field name' is one of the field (or column) names of the input data, OR one of '__rowTotals', '__colTotals' that are used to add overall summary rows or columns (grand totals for example).
- 'action' is one of the following: 'filter', 'msort', 'sort', 'summary', 'summarytype'. Not every action is relevant to every 'field name' as follows:
  - 'filter' applies to anything except '__rowTotals' and '__colTotals'.
  - 'msort', 'sort', 'summary' applies to all row and column field names. I.e. 'field name' must appear in rowNames or columnNames above. Additionally 'summary' applies to '__rowTotals', '__colTotals'. These are the only actions permitted for these 'field names'.
  - 'summarytype' applies to data field names only. I.e. 'field name' must appear in dataNames above.
- 'sub-action' is one of the following: 'in', 'sort', 'msort', 'topOrleft', 'rightOrbottom'. 'sub-action' is related to 'action' as follows:
  - 'in' - use with 'filter' action only. 'subActionValue' is an array of values to be included in the pivot.
  - 'msort' - use with 'msort' action only. 'subActionValue' is an array of field values to set sort order. Over-ridden if sort is set.
  - 'sort' - use with 'sort' action only. 'subActionValue' is an array with one string that defines the sort action. See below.
  - 'topOrleft', 'rightOrbottom' - use with 'summary'. 'subActionValue' is an array of pivot function names (same used used in pivotFn above) with 'Summary' an additional value that is also permitted. This defines the functions and the order to use to create row or column summary lines (e.g. 'Sum' for a sub-total). Using 'Summary' as a function name means that the function used will be the same as that used by the data field names (and is recommended else results can get confusing). If not obvious 'topOrleft' means summary rows displayed above or summary columns displayed to the left the respective data set. 'rightOrbottom' means summary rows displayed below or summary columns displayed to the right the respective data set.
  - 'summarytype' - use with 'summarytype' action only. 'subActionValue' is an array of pivot function names (same used used in pivotFn above) to use on the collated data in each cell in the order specified in the array. Overrides the 'pivotFn' default.

Note in the output of the pivot designer, you'll also see a 'summary_sort' or 'summarytype_sort' 'action'. You can ignore these. Used by the designer UI only to remember sort actions.

Sort Strings for the 'sort' action and subaction, a string is parsed to determine how data rows or columns should be sorted. The string is the same as that used in the sort dropdowns in the designer and has the following format:
	[order] + ' - ' + [Column name] + [' ('+function+')']

[order] is simply one of 'Descending' or 'Ascending'. The column name must be that of a data column name OR be the same as 'field name' under which the 'sort' action is placed. The function in brackets is only used with data column names and must match one of the functions being used.

repository: ukcbajr/jrbPivot

gha_language: JavaScript

repo_name: ukcbajr/jrbPivot


text:
# ghost-diary - Points: 500

This challenge was released and available to everyone without having to unlock any of the previous challenges

Comment:
> It launched without prerequisite problems due to an error with bundling. If you are not experienced with binary exploitation I would recommend saving this for later. - Daniel T (PicoCTF instructor)

## Short Version

- Off by one vulnerability, null byte poison
- Populate Tcache bin and reuse memory to leak heap address
- Exhaust Tcache bin to force unsorted bin to leak libc addresses
- Use null byte overwrite to free and coalesce already used memory
- Allocate overlapping chunks and use tcache poisoning to get arbitary pointer allocated
- Overwrite `__free_hook` with magic one gadget to pop shell
- Profit!

## Longer Version

### Heap Challenges

Other than some very trivial dtmalloc challenges, I tend to shy away from heap challenges. The constantly changing ptmalloc implemenation, the complexity involved, just didn't appeal to me. But this is a PicoCTF challenge, how hard could it be right?

Well turns out it was harder than I had expected. Unlike all the other Pico challenges, this challenge didn't seem to have one clear 'technique' that it was trying to point out and get you to learn.

### Binary Info

```python
[*] './ghostdiary'
    Arch:     amd64-64-little
    RELRO:    Full RELRO
    Stack:    Canary found
    NX:       NX enabled
    PIE:      PIE enabled
```

### Libc Info
```C
gef➤  call (char*)gnu_get_libc_version()
$1 = 0x7f8f17a5f618 <__libc_version> "2.27"
```

##### Typical Menu:
```C
1. New page in diary
2. Talk with ghost
3. Listen to ghost
4. Burn the page
5. Go to sleep
>
```

Looks like we have alloc/free/read/write access, great!

## Step 0x01: Analyze the binary
#### Vulnerablity

After some analysis, we look at the "write_page" function (my name for it...)

![Talk to Ghost](./images/write_to_page.png)

Can you spot it? The function reads one character at a time, terminates early if it's a new line, but then makes sure the string is terminated with a NULL. But if the last character is not a newline, it'll result in the `cnt` being off by one (one more than the total length). So with the right alignment it'll overwrite the lowest byte of the next chunk in the heap with zero [Poison Null Byte](https://github.com/shellphish/how2heap/blob/master/glibc_2.25/poison_null_byte.c).

#### Constraints

 - Limited to `0x14(20)` pages
 - One page can hold up to < `0xF1(241)` bytes
 - Two pages can hold anywhere from `0x10f(271)` - `0x1e1(481)` bytes
 - We can't allocate anything over `480` bytes and inbetween the `241` and `271` bytes.
 - Allocated page pointers are stored in a table in .data.
 - Freed/burnt page pointers are zero'd out (so no double free)
 - Libc 2.27, so we have tcache enable, but a lot of older heap attacks won't work.

## Step 0x02: Leak something

OK, as a "heap newbie", I had to play around a bit...

After some reading I was able to figure out that allocating a couple of same sized chunks, and then freeing them led to them having pointers to each other due to the way tcache creates a single linked list.

By creating the chunks, freeing them, and then allocating that same memory again, would allow me to read out the contents of the heap memory. Since there was no re-initization of memory on the heap, this meant I could leak a heap address.

**But now what?**
「(´･ ･｀｡)ノ”

Well I wanted to get a Libc leak... But how do we do that if we're dealing with a PIE binary, and only have heap memory we can read from?

Lots of experimentation, lots of dead ends, but ultimately lots of knowledge gained...

Tcache apparently only holds up to 7 entries, if you create more than 7 chunks, make sure you have a chunk between the top chunk and the one's being freed, you can get chunks to be binned into the unsorted bin. This means that there is a pointer in the libc main_arena that points to this chunk, and pointers in that chunk that point back to main_arena. A doubly linked list.

This means that we now have two libc pointers to leak!

**But now what?**

How can we use this information??? Well luckily others have already solved problems like this one, and done excelent write-ups: https://vigneshsrao.github.io/babytcache/

The whole write-up is interesting, but particularily the first part.

Since we have a null poison byte, we can reduce the size of a chunk on the heap, and since it also clears the prev_inuse bit, we can get it to combine with a previous memory location to free memory we have active pointers to.

We can craft a fake chunk in heap memory that is larger than the allowed alloc size, EG:
```
pg0: 0x1e0
pg1: 0x40
pg2: 0x50
pg3: 0x60
pg4: 0x28 <--- this one does the overflow of the next chunk size
pg5: 0x1e0
pg6: 0x90
```
Page 4 is the size 0x28 chunk and can overwrite page 5 making it's prev_inuse bit cleared and making the chunk size 0x100. Important note here is that when you clear the prev_inuse bit, make sure to make the preceeding 8 bytes hold the prev_size of the imaginary chunk (I used 0x330).

You can set the start of this imaginary fake chunk at the beginning of the heap (write page 0) with a correct size. I used 0x331 and create fd/bk pointers that will pass the check. [P->fd->bk == P and P->bk->fd == P*](https://heap-exploitation.dhavalkapil.com/diving_into_glibc_heap/security_checks.html)

Then when you free page 5... you'll get memory freed all the way back to the start of the heap.

At this point, when you allocate a new chunk it's overlapping existing memory!

### Step 0x03: Pwnage!

A bit of [tcache poisoning](https://github.com/shellphish/how2heap/blob/master/glibc_2.26/tcache_poisoning.c) and we can get malloc to return an arbitary pointer of our chosing. There are less security checks in place for tcache bins than for fastbins. A step backwards if you ask me...

I chose to overwrite `__free_hook` in libc with a magic gadget to pop a shell and tada... cat the flag.txt file

```python
[*] '/problems/ghost-diary_5_7e39864bc6dc6e66a1ac8f4632e5ffba/ghostdiary'
    Arch:     amd64-64-little
    RELRO:    Full RELRO
    Stack:    Canary found
    NX:       NX enabled
    PIE:      PIE enabled
[*] '/lib/x86_64-linux-gnu/libc.so.6'
    Arch:     amd64-64-little
    RELRO:    Partial RELRO
    Stack:    Canary found
    NX:       NX enabled
    PIE:      PIE enabled
[+] Starting local process '/problems/ghost-diary_5_7e39864bc6dc6e66a1ac8f4632e5ffba/ghostdiary': pid 3801797
0x5654dbd66d30
-----------------------------------------------------------------------------------------
HEAPBASE: 0x5654dbd66000
0x7fee844fd070
-----------------------------------------------------------------------------------------
LIBC_BASE: 0x7fee84111000
LIBC_BASE: 0x7fee84111000
HEAP_BASE: 0x5654dbd66000
[*] Switching to interactive mode
$ ls
flag.txt  ghostdiary  ghostdiary.c
$ cat flag.txt
picoCTF{nu11_byt3_Gh05T_abf74d12}
```

gha_language: Python


text:
---
layout: post
title: Windows 7 Product Lines Announced
date: '2009-02-03 15:01:27 -05:00'
---

![](/img/posts{{ page.path | remove: '_posts' | remove: '.md' }}/Win7_1.png)

Microsoft today announced the new product line for Windows 7. In some ways the new Windows 7 product line follows the same ideas of Windows Vista, but the big differences are that each Windows 7 edition is a superset of the previous edition (which means that each higher edition will have every feature of all lower editions) and they will be focusing primarily on two editions of Windows 7: Windows 7 Home Premium and Windows 7 Professional.

The breakdown on the different editions is:

## Windows 7 Starter
This is for price-sensitive customers with small notebooks PCs.

Key Feature list:

* Broad app and device compatibility with up to 3 concurrent applications
* Safe, reliable, and supported
* Ability to join a Home Group
* Improved taskbar and JumpLists

## Windows 7 Home Basic
This is for customers in emerging markets only.

Key Feature list:

* **Starter features**
* **Unlimited applications**
* Live Thumbnail Previews & enhanced visual experience
* Advanced networking support (ad-hoc wireless networks and internet connection sharing)
* Mobility Center

## Windows 7 Home Premium

This is recommended for most customers (home consumers).

Key Feature list:

* **Home Basic features**
* **Unlimited applications**
* Aero Glass & advanced windows navigation
* Easy networking & sharing across all your PCs & devices
* Improved media format support, enhancements to Windows Media Center and media streaming, including Play To
* Multi-touch and improved handwriting recognition

## Windows 7 Professional

This is recommended for small businesses and those customers (home consumers) who want additional features and functionality useful for small business activities.

Key Feature list:

* **Home Premium features**
* **Unlimited applications**
* Ability to join a managed network with Domain Join
* Protect  data with advanced network backup and Encrypting File System
* Print to the right printer at home or work with Location Aware Printing

## Windows 7 Enterprise

This is recommended for medium-to-large business and enterprise customers that choose to license Windows through Software Assurance and is available only through Microsoft Volume Licensing.

Key Feature list:

* **Professional features**
* **Unlimited applications**
* BitLocker data protection on internal and external drives
* DirectAccess provides seamless connectivity to your corporate network (requires Windows Server 2008 R2)
* Decrease time branch office workers wait to open file across the network with BranchCache (requires Windows Server 2008 R2)
* Prevent unauthorized software from running with AppLocker

## Windows 7 Ultimate

Key Feature list:

* **Enterprise features**
* **Unlimited applications**
* Multi-language packs

I know that looks like there are still a lot of different editions, but the key points are:

* For Consumers: Microsoft recommends Windows 7 Home Premium for most customers and Windows 7 Professional for customers who want additional features and functionality useful for small business activities.
* For Businesses: Microsoft recommends Windows 7 Professional for most customers and Windows 7 Enterprise for medium-to-large business and enterprise customers that choose to license Windows through Software Assurance.
* The features in each version of Windows 7 build upon the one before it. As customers move up from one edition to the next, from Windows 7 Starter through Windows 7 Ultimate, they ***gain additional features and lose none***.


text:
(plugins-for-napari-developers)=

# napari plugin architecture

```{admonition} Introducing npe2
:class: tip
We introduced a new plugin engine in December 2021. The new library [`npe2`][npe2]
is a re-imagining of how napari interacts with plugins. Plugins targeting
`napari-plugin-engine` will continue to work, but we recommend migrating to
`npe2` eventually.  See the [](npe2-migration-guide).

To learn more about the architecture see the [](npe2-manifest-spec).

The content below describes the original [`napari-plugin-engine`](https://github.com/napari/napari-plugin-engine).
```

The napari plugin architecture is contained in an independent package called [napari-plugin-engine](https://github.com/napari/napari-plugin-engine), which
is a fork of [pluggy](https://github.com/pytest-dev/pluggy). The concept is
based around:

- **hook specifications**: function signatures that identify an API (argument
  names and types) that plugin developers must adhere to
- **hook implementations**: functions that plugin developers write to extend
  napari functionality, by providing the actual mechanism (implementation) for
  a specific hook specification.

The best place to get started with learning how plugins are incorporated into
napari is to look at the `napari-plugin-engine` [documentation](https://napari-plugin-engine.readthedocs.io/en/latest/). In particular,
look through the [Usage Overview](https://napari-plugin-engine.readthedocs.io/en/latest/usage.html) and the
[API Reference](https://napari-plugin-engine.readthedocs.io/en/latest/api.html).

The [documentation for pluggy](https://pluggy.readthedocs.io/en/latest/) is
also useful for understanding the concepts, but do note that a lot of the
attribute names and API is different in `napari-plugin-engine`.

[npe2]: https://github.com/napari/npe2

repository: AhmetCanSolak/napari

repo_name: AhmetCanSolak/napari


text:
---
title: "How can I perform a regex search in Powershell?"
slug: "powershell-regex"
description: "In which I remind myself how to search using regexes in Powershell"
category: "questions"
tags:
- "powershell"
---

## How can I perform a regex search?

You can check if a character contains a string by using the cmatch operator like so:

```powershell
$word = "Hello"
$word -cmatch "[A-Z]"
// True
```

gha_language: HTML


text:
# User Roles System

CompreFace roles system consists of two types of roles - global roles
and application roles. The users with these roles have different
responsibilities, so we recommend that you delimit such users and follow
our recommendations to avoid giving too much access to sensitive
information. Of course, in small teams and at your own risk, you can
ignore these recommendations.

## Global Roles

Global roles define what permissions you have in the system itself, and
the primary responsibility of such users is to maintain the system
itself. Therefore, we recommend adding the most permissive (owner and
administrator) roles to technical support employees. Then there is no
reason to add such users to applications as they still have all
permissions within the application.

In CompreFace, the first user automatically receives the global owner
role and has rights for any operation within CompreFace - managing users
and creating and managing applications. The only restriction for the
global owner is that such a user can't delete themselves from the
system, so the user has to assign the global owner role to somebody else
and then remove themselves from the system.

Users with the global administrator role have the same permissions as
users with the global owner role. The only difference is that such users
can\'t manage the user with the global owner role. We recommend reducing
users with such a role to the minimum number required to maintain the
system.

All new users are automatically assigned the global user role. These
users can't create applications, can access only the applications they
were added to, and can't manage other users. These users use CompreFace
for face recognition and are part of the development team; they are not
responsible for managing other users and their permissions.

## Application Roles

Application roles define the user's role within an application, and the
primary responsibility of such users is to develop applications into
which they are going to integrate CompreFace. We recommend that the most
permissive roles (owner and administrator) were added as project
managers and team leads, as they are responsible for the application. We
also recommend that all application users have the global user role. To
become a member of an application team, users with a global user role
need to be added to the application directly by the global owner, global
administrator, or application owner.

The user that creates an application automatically receives the
application owner role and has rights for any operation within the
application - managing the application and its users and creating and
managing [Face Services](Face-services-and-plugins.md). The only
restriction for the application owner is that they can't delete
themselves from the application, so they have to assign the application
owner role to somebody else before deleting themselves.

Users with the application administrator role (global user role +
application administrator role) can create and manage [Face
Services](Face-services-and-plugins.md) but can't manage an application
and its users.

Users with the application user role can't manage anything in the
application. This is the least permissive role (global user role +
application user role), but this provides enough information to
integrate CompreFace with any other application, so we recommend that
most CompreFace users have this role.

gha_language: Shell


text:
---
layout: project
type: project
image: images/sch.jpg
title: School Management System
permalink: projects/school-management-system
# All dates must be YYYY-MM-DD format!
date: 2018-04-30
labels:
  - PHP
  - Laravel
  - JavaScript
  - Vuejs
  - MYSQL
summary: A system to manage students and give parents to follow their children results also allow school management to manage students issues as well as this system was certified to be launched all over Egypt.
---

<img class="ui image" src="{{ site.baseurl }}/images/sch.jpg">

A system to manage students and give parents to follow their children results also allow school management to manage students issues, as well as this system was certified to be launched all over Egypt because it allows sector's government to manage schools very well and archive results so easy for students in a certain sectors of Egypt.


text:
# example-recipes-demo

Taking examples from [gulp-cheatsheet](https://github.com/osscafe/gulp-cheatsheet), demonstrates what [gulp-chef](https://github.com/gulp-cookery/gulp-chef) can achieve.

However, this is to demonstrate what gulp-chef can achieve, not encourage you write configuration this way.

## How to Run

``` bash
$ git clone https://github.com/gulp-cookery/example-recipes-demo.git
$ cd example-recipes-demo
$ npm install
$ gulp
```

## License
MIT

## Author
[Amobiz](https://github.com/amobiz)

repository: gulp-cookery/example-recipes-demo

repo_name: gulp-cookery/example-recipes-demo


text:
---
title: How to uppercase a string in Python
date: "2019-12-20"
tags: ['python','uppercase','string']
template: post
---

To uppercase a string in python, we can use the `upper()` method.

Here is an example that converts lowercase string `king` to upper case.

```python
a = "king"

print(a.upper()) # KING
```


text:
---
title: Bundle Layout
layout: page
---

> [Wiki](Home) ▸ [[API Reference]] ▸ [[Layouts]] ▸ **Bundle Layout**

Implements Danny Holten's [hierarchical edge bundling](http://www.win.tue.nl/~dholten/papers/bundles_infovis.pdf) algorithm. For each input link, a path is computed that travels through the tree, up the parent hierarchy to the least common ancestor, and then back down to the destination node. This sequence of nodes can then be used in conjunction with other [hierarchical layouts](Hierarchy-Layout), such as [cluster](Cluster-Layout) to generate bundled splines between nodes:

![bundle](bundle.png)

For example, consider this visualization of [software dependencies](http://bl.ocks.org/mbostock/1044242).

# d3.layout.bundle()

Constructs a new default bundle layout. Currently, the bundle layout is stateless and thus only has a default configuration. The returned layout object is both an object and a function. That is: you can call the layout like any other function, and the layout has additional methods that change its behavior. Like other classes in D3, layouts follow the method chaining pattern where setter methods return the layout itself, allowing multiple setters to be invoked in a concise statement.

# bundle(links)

Evaluates the bundle layout on the specified array of *links*, returning the computed path from the source to the target, through the [least common ancestor](http://en.wikipedia.org/wiki/Lowest_common_ancestor). Each input link must have two attributes:

* source - the source node.
* target - the target node.

Furthermore, each node must have one attribute:

* parent - the parent node.

This is a subset of the fields generated by the [hierarchy layouts](Hierarchy-Layout). The return value of the layout is an array of paths, where each path is represented as an array of nodes. Thus, the bundle layout does not compute the basis splines directly; instead, it returns an array of nodes which implicitly represent the control points of the spline. You can use this array in conjunction with [d3.svg.line](SVG-Shapes#line) or [d3.svg.line.radial](SVG-Shapes#line_radial) to generate the splines themselves. For example, if you were to use a [cluster](Cluster-Layout):

```javascript
var cluster = d3.layout.cluster()
    .size([2 * Math.PI, 500]);
```

A suitable line generator for hierarchical edge bundling might be:

```javascript
var line = d3.svg.line.radial()
    .interpolate("bundle")
    .tension(.85)
    .radius(function(d) { return d.y; })
    .angle(function(d) { return d.x; });
```

The bundle layout is designed to work in conjunction with the line generator's "bundle" interpolation mode, though technically speaking you can use any interpolator or shape generator. Holten's bundle strength parameter is exposed as the line's [tension](SVG-Shapes#line_tension).


text:
 Select a Proxmox Helper Below

Proxmox VE 7 Post Install

 Proxmox VE 7 Post Install

This script will Disable the Enterprise Repo, Add & Enable the No-Subscription Repo, Add & Disable Test Repo (repo's can be enabled/disabled via the UI in Repositories)
and attempt the *No-Nag* fix.

Run the following in the Proxmox Web Shell. ⚠ *_PVE7 ONLY_*

```
bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/post_install.sh)"
```

It's recommended to update Proxmox after running this script, before adding any VM/CT.

Home Assistant OS VM

 Proxmox Home Assistant OS VM

To create a new Proxmox VM with the latest version of Home Assistant OS, run the following from Proxmox web shell

```
bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/haos_vm.sh)"
```

⚡ Default Settings:  4GB RAM - 32GB Storage - 2vCPU ⚡

After the script completes, If you're dissatisfied with the default settings, click on the VM, then on the **_Hardware_** tab and change the **_Memory_** and **_Processors_** settings to what you desire. Once all changes have been made, **_Start_** the VM.

**Home Assistant Interface - IP:8123**

Home Assistant Container LXC (PVE6)

 Proxmox 6 Home Assistant Container LXC

To create a new Proxmox 6 Home Assistant Container, run the following from Proxmox web shell.

```
bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/pve6_ha_container.sh)"
```

⚡ Default Settings:  4GB RAM - 16GB Storage - 2vCPU ⚡

After the script completes, If you're dissatisfied with the default settings, click on the LXC, then on the **_Resources_** tab and change the **_Memory_** and **_Cores_** settings to what you desire. Changes are immediate.

**Home Assistant Interface - IP:8123**

**Portainer Interface - IP:9000**

Path to HA configuration.yaml
```
/var/lib/docker/volumes/hass_config/_data
 ```
[To pass through a device for ZHA](https://github.com/tteck/Proxmox/blob/main/Alternative.md#zha-device-pass-through)

Home Assistant Container LXC

 Proxmox Home Assistant Container LXC

To create a new Proxmox 7 Home Assistant Container, run the following from Proxmox web shell.

```
bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/pve7_ha_container.sh)"
```

⚡ Default Settings:  4GB RAM - 16GB Storage - 2vCPU ⚡

After the script completes, If you're dissatisfied with the default settings, click on the LXC, then on the **_Resources_** tab and change the **_Memory_** and **_Cores_** settings to what you desire. Changes are immediate.

**Home Assistant Interface - IP:8123**

**Portainer Interface - IP:9000**

Path to HA configuration.yaml
```
/var/lib/docker/volumes/hass_config/_data
 ```
[To pass through a device for ZHA](https://github.com/tteck/Proxmox/blob/main/Alternative.md#zha-device-pass-through)

ESPHome LXC

 Proxmox ESPHome LXC Container

To create a new Proxmox ESPHome LXC Container, run the following from Proxmox web shell.

```
bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/esphome_container.sh)"
```

⚡ Default Settings:  1GB RAM - 4GB Storage - 2vCPU ⚡

**ESPHome Interface - IP:6052**

Nginx Proxy Manager LXC

 Proxmox Nginx Proxy Manager LXC Container

To create a new Proxmox Nginx Proxy Manager LXC Container, run the following from Proxmox web shell.

```
 curl -sL https://raw.githubusercontent.com/ej52/proxmox/main/lxc/nginx-proxy-manager/create.sh | bash -s
```

⚡ Alpine  Default Settings:  512MiB RAM - 2GB Storage - 1vCPU ⚡

____________________________________________________________________________________

Forward port `80` and `443` from your router to your Nginx Proxy Manager LXC IP.

Add the following to your `configuration.yaml` in Home Assistant.
```
 http:
  use_x_forwarded_for: true
  trusted_proxies:
    - <IP_ADDRESS> ###(Nginx Proxy Manager LXC IP)###
```

**Nginx Proxy Manager Interface - IP:81**

**Initial Login**

**username**
 ```
<EMAIL_ADDRESS> ```
 **password**
 ```
 changeme
 ```

Thanks to [ej52](https://github.com/ej52/proxmox-scripts/blob/main/lxc/nginx-proxy-manager/README.md) for his hard work.

MQTT LXC

 Proxmox MQTT LXC Container

To create a new Proxmox MQTT LXC Container, run the following in the Proxmox web shell.

```
bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/mqtt_container.sh)"
```

⚡ Default Settings:  512MiB RAM - 2GB Storage - 1vCPU ⚡

Mosquitto comes with a password file generating utility called mosquitto_passwd.
```
sudo mosquitto_passwd -c /etc/mosquitto/passwd <usr>
```
Password: < password >

Create a configuration file for Mosquitto pointing to the password file we have just created.
```
sudo nano /etc/mosquitto/conf.d/default.conf
```
This will open an empty file. Paste the following into it.
```
allow_anonymous false
persistence true
password_file /etc/mosquitto/passwd
listener 1883
```
Save and exit the text editor with "Ctrl+O", "Enter" and "Ctrl+X".

Now restart Mosquitto server.
```
sudo systemctl restart mosquitto
```

Node-Red LXC

 Proxmox Node-Red LXC Container

To create a new Proxmox Node-RED LXC Container, run the following in the Proxmox web shell.

```
bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/node-red_container.sh)"
```

⚡ Default Settings:  1GB RAM - 4GB Storage - 1vCPU ⚡

From your nodered LXC console, the following commands can be run

`node-red-start`  to start Node-Red

`sudo systemctl enable nodered.service`  to autostart Node-RED at every boot

`node-red-restart`  to restart Node-Red

`sudo systemctl disable nodered.service` to disable autostart on boot

`sudo npm install -g --unsafe-perm node-red` to update Node-Red (`node-red-restart` after update)

**Node-Red Interface - IP:1880**

Mariadb 10.5 LXC

 Proxmox Mariadb 10.5 LXC Container

To create a new Proxmox Mariadb LXC Container, run the following in the Proxmox web shell.

```
bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/mariadb_container.sh)"
```

⚡ Default Settings:  1GB RAM - 4GB Storage - 1vCPU ⚡

To enable MariaDB to listen to remote connections, you need to edit your defaults file. To do this, open the console in your MariaDB lxc:
```
nano /etc/mysql/my.cnf
```
Un-comment `port =3306`
Save and exit the editor with "Ctrl+O", "Enter" and "Ctrl+X".

```
nano /etc/mysql/mariadb.conf.d/50-server.cnf
```
Comment `bind-address  = <IP_ADDRESS>`
Save and exit the editor with "Ctrl+O", "Enter" and "Ctrl+X".

For new MariaDB installations, the next step is to run the included security script. This script changes some of the less secure default options. We will use it to block remote root logins and to remove unused database users.

Run the security script:
```
sudo mysql_secure_installation
```
Enter current password for root (enter for none): `enter`

Switch to unix_socket authentication [Y/n] `y`

Change the root password? [Y/n] `n`

Remove anonymous users? [Y/n] `y`

Disallow root login remotely? [Y/n] `y`

Remove test database and access to it? [Y/n] `y`

Reload privilege tables now? [Y/n] `y`

We will create a new account called admin with the same capabilities as the root account, but configured for password authentication.
```
sudo mysql
```
Prompt will change to ```MariaDB [(none)]>```

Create a new local admin (Change the username and password to match your preferences)
```
CREATE USER 'admin'@'localhost' IDENTIFIED BY 'password';
```
Give local admin root privileges (Change the username and password to match above)
```
GRANT ALL ON *.* TO 'admin'@'localhost' IDENTIFIED BY 'password' WITH GRANT OPTION;
```

Now, we'll give the user admin root privileges and password-based access that can connect from anywhere on your local area network (LAN), which has addresses in the subnet <IP_ADDRESS>/24. This is an improvement because opening a MariaDB server up to the Internet and granting access to all hosts is bad practice..  TO<EMAIL_ADDRESS>IDENTIFIED BY 'password' WITH GRANT OPTION;
```
Flush the privileges to ensure that they are saved and available in the current session:
```
FLUSH PRIVILEGES;
```
Following this, exit the MariaDB shell:
```
exit
```
Log in as the new database user you just created:
```
mysql -u admin -p
```
Create a new database:
```
CREATE DATABASE homeassistant;
```
Following this, exit the MariaDB shell:
```
exit
```
⚠ Reboot the lxc

Checking status.
```
sudo systemctl status mariadb
```
Change the recorder: `db_url:` in your HA configuration.yaml

Example: `mysql://admin:password@<IP_ADDRESS>:3306/homeassistant?charset=utf8mb4`

</details>

<details>
<summary markdown="span">Zigbee2MQTT LXC (PVE6)</summary>

<p align="center"><img src="https://github.com/Koenkk/zigbee2mqtt/blob/master/images/logo.png?raw=true" alt="logo.png" width="100" height="100"/></p>

<h1 align="center" id="heading"> Proxmox 6 Zigbee2MQTT LXC Container </h1>

To create a new Proxmox 6 [Zigbee2MQTT](https://www.zigbee2mqtt.io/) LXC Container, run the following from Proxmox web shell.

```
bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/pve6_zigbee2mqtt_container.sh)"
```
<h3 align="center" id="heading">⚡ Default Settings:  1GB RAM - 4GB Storage - 2vCPU ⚡</h3>

Determine the location of your adapter (Run in the zigbee2mqtt console)
```
ls -l /dev/serial/by-id
```
Example Output: ```lrwxrwxrwx 1 root root 13 Jun 19 17:30 usb-1a86_USB_Serial-if00-port0 -> ../../ttyUSB0```

 If you are having diffucuilty with device pass through or starting check the [Alternative method](https://github.com/tteck/Proxmox/blob/main/Alternative.md)

⚠ **Before you can start Zigbee2MQTT you need to edit the [configuration.yaml](https://www.zigbee2mqtt.io/guide/configuration/)**
```
nano /opt/zigbee2mqtt/data/configuration.yaml
```

Example:
```
frontend:
  port: 9442
homeassistant: true
permit_join: false
mqtt:
  base_topic: zigbee2mqtt
  server: 'mqtt://<IP_ADDRESS>:1883'
  user: usr
  password: pwd
  keepalive: 60
  reject_unauthorized: true
  version: 4
serial:
  port: /dev/serial/by-id/usb-1a86_USB_Serial-if00-port0
advanced:
  pan_id: GENERATE
  network_key: GENERATE
  channel: 20
  ```
Zigbee2mqtt can be started after completing the configuration by running
```
sudo systemctl start zigbee2mqtt
```
To start Zigbee2MQTT automatically on boot
 ```
sudo systemctl enable zigbee2mqtt.service
 ```
To update Zigbee2Mqtt
 ```
cd /opt/zigbee2mqtt
bash update.sh
 ```

</details>

<details>
<summary markdown="span">Zigbee2MQTT LXC </summary>

<p align="center"><img src="https://github.com/Koenkk/zigbee2mqtt/blob/master/images/logo.png?raw=true" alt="logo.png" width="100" height="100"/></p>

<h1 align="center" id="heading"> Proxmox Zigbee2MQTT LXC Container </h1>

To create a new Proxmox 7 [Zigbee2MQTT](https://www.zigbee2mqtt.io/) LXC Container, run the following from Proxmox web shell.

```
bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/pve7_zigbee2mqtt_container.sh)"
```
<h3 align="center" id="heading">⚡ Default Settings:  1GB RAM - 4GB Storage - 2vCPU ⚡</h3>

Determine the location of your adapter (Run in the zigbee2mqtt console)
```
ls -l /dev/serial/by-id
```
Example Output: ```lrwxrwxrwx 1 root root 13 Jun 19 17:30 usb-1a86_USB_Serial-if00-port0 -> ../../ttyUSB0```

 If you are having diffucuilty with device pass through or starting check the [Alternative method](https://github.com/tteck/Proxmox/blob/main/Alternative.md)

 ⚠ **Before you can start Zigbee2MQTT you need to edit the [configuration.yaml](https://www.zigbee2mqtt.io/guide/configuration/)**
```
nano /opt/zigbee2mqtt/data/configuration.yaml
```

Example:
```
frontend:
  port: 9442
homeassistant: true
permit_join: false
mqtt:
  base_topic: zigbee2mqtt
  server: 'mqtt://<IP_ADDRESS>:1883'
  user: usr
  password: pwd
  keepalive: 60
  reject_unauthorized: true
  version: 4
serial:
  port: /dev/serial/by-id/usb-1a86_USB_Serial-if00-port0
advanced:
  pan_id: GENERATE
  network_key: GENERATE
  channel: 20
  ```
Zigbee2mqtt can be started after completing the configuration by running
```
sudo systemctl start zigbee2mqtt
```
To start Zigbee2MQTT automatically on boot
 ```
sudo systemctl enable zigbee2mqtt.service
 ```
To update Zigbee2Mqtt
 ```
cd /opt/zigbee2mqtt
bash update.sh
 ```

</details>

<details>
<summary markdown="span">Debian 10+ LXC</summary>

<p align="center"><img src="https://www.debian.org/Pics/debian-logo-1024x576.png" alt="Debian" height="100"/></p>

<h1 align="center" id="heading"> Proxmox Debian 10 LXC Container </h1>

To create a new Proxmox Debian 10 (curl. sudo, auto login) LXC Container, run the following in the Proxmox web shell.

```
bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/debian10_container.sh)"
```
<h3 align="center" id="heading">⚡ Default Settings:  512MiB RAM - 2GB Storage - 1vCPU ⚡</h3>

After the script completes, If you're dissatisfied with the default settings, click on the LXC, then on the **_Resources_** tab and change the **_Memory_** and **_Cores_** settings to what you desire. Changes are immediate.

</details>

<details>
<summary markdown="span">Debian 11+ LXC</summary>

<p align="center"><img src="https://www.debian.org/Pics/debian-logo-1024x576.png" alt="Debian" height="100"/></p>

<h1 align="center" id="heading"> Proxmox Debian 11 LXC Container </h1>

To create a new Proxmox Debian 11 (curl. sudo, auto login) LXC Container, run the following in the Proxmox web shell.

```
bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/debian11_container.sh)"
```
<h3 align="center" id="heading">⚡ Default Settings:  512MiB RAM - 2GB Storage - 1vCPU ⚡</h3>

After the script completes, If you're dissatisfied with the default settings, click on the LXC, then on the **_Resources_** tab and change the **_Memory_** and **_Cores_** settings to what you desire. Changes are immediate.

</details>

<details>
<summary markdown="span">Pi-hole LXC</summary>

<p align="center"><img src="https://camo.githubusercontent.com/9426a93d32aa9f5ad757b2befcdb762a270d344efd6b8d287a2cea2c4c2233b8/68747470733a2f2f70692d686f6c652e6769746875622e696f2f67726170686963732f566f727465782f566f727465785f776974685f576f72646d61726b2e737667" alt="Pi-hole" width="100" height="100"/></p>

<h1 align="center" id="heading"> Pi-hole LXC </h1>

To create a new Proxmox Pi-hole LXC, run the following in the Proxmox web shell.

```
bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/pihole_container.sh)"
```
<h3 align="center" id="heading">⚡ Default Settings:  512MiB RAM - 2GB Storage - 1vCPU ⚡</h3>

To set your password (Run in the pi-hole console)

```
pihole -a -p
```

</details>

<details>
<summary markdown="span">AdGuard Home LXC</summary>

<p align="center"><img src="https://dashboard.snapcraft.io/site_media/appmedia/2020/04/256.png" width="100" height="100"/></p>

<h1 align="center" id="heading"> AdGuard Home LXC </h1>

To create a new Proxmox AdGuard Home LXC, run the following in the Proxmox web shell.

```
bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/adguard_container.sh)"
```

⚡ Default Settings:  512MiB RAM - 2GB Storage - 1vCPU ⚡

**AdGuard Home Interface - IP:3000**

repository: Robbi-Ho/Proxmox

repo_name: Robbi-Ho/Proxmox


text:
## Adding examples

When you add an example to the [examples](https://github.com/vercel/next.js/tree/canary/examples) directory, please follow these guidelines to ensure high-quality examples:

- TypeScript should be leveraged for new examples (no need for separate JavaScript and TypeScript examples, converting old JavaScript examples is preferred)
- Examples should not add custom ESLint configuration (we have specific templates for ESLint)
- If API routes aren't used in an example, they should be omitted
- If an example exists for a certain library and you would like to showcase a specific feature of that library, the existing example should be updated (instead of adding a new example)
- Package manager specific config should not be added (e.g. `resolutions` in `package.json`)
- In `package.json` the version of `next` should be `latest`
- In `package.json` the dependency versions should be up-to-date
- Use `export default function` for page components and API Routes instead of `const`/`let` (The exception is if the page has `getInitialProps`, in which case [`NextPage`](https://nextjs.org/docs/api-reference/data-fetching/get-initial-props#typescript) could be useful)
- CMS example directories should be prefixed with `cms-`
- Example directories should not be prefixed with `with-`
- Make sure linting passes (you can run `pnpm build && pnpm lint` to verify and `pnpm lint-fix` for automatic fixes)

Also, don’t forget to add a `README.md` file with the following format:

- Replace `DIRECTORY_NAME` with the directory name you’re adding.
- Fill in `Example Name` and `Description`.
- Examples should be TypeScript first, if possible.
- Omit the `name` and `version` fields from your `package.json`.
- Ensure all your dependencies are up to date.
- Ensure you’re using [`next/image`](https://nextjs.org/docs/api-reference/next/image).
- To add additional installation instructions, please add them where appropriate.
- To add additional notes, add `## Notes` section at the end.
- Remove the `Deploy your own` section if your example can’t be immediately deployed to Vercel.

````markdown
# Example Name

Description

## Deploy your own

Deploy the example using [Vercel](https://vercel.com?utm_source=github&utm_medium=readme&utm_campaign=next-example):

[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https://github.com/vercel/next.js/tree/canary/examples/DIRECTORY_NAME&project-name=DIRECTORY_NAME&repository-name=DIRECTORY_NAME)

## How to use

Execute [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app) with [npm](https://docs.npmjs.com/cli/init), [Yarn](https://yarnpkg.com/lang/en/docs/cli/create/), [pnpm](https://pnpm.io), or [Bun](https://bun.sh/docs/cli/bunx) to bootstrap the example:

```bash
npx create-next-app --example DIRECTORY_NAME DIRECTORY_NAME-app
```

```bash
yarn create next-app --example DIRECTORY_NAME DIRECTORY_NAME-app
```

```bash
pnpm create next-app --example DIRECTORY_NAME DIRECTORY_NAME-app
```

```bash
bunx create-next-app --example DIRECTORY_NAME DIRECTORY_NAME-app
```

Deploy it to the cloud with [Vercel](https://vercel.com/new?utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)).
````

branch_name: refs/heads/canary


text:
# Change Log

All notable changes to this project will be documented in this file, whose format is described in [Keep a Change Log](http://keepachangelog.com/).
This project adheres to [Semantic Versioning](http://semver.org/).

## [Unreleased]

* Initial release

repository: porras/store

repo_name: porras/store


text:
# Employee Tracker

  ## Description:
  This is a content management system that allows anyone to navigate, view and interact with information stored in a database. In this case, it is specifically for a company to
  manage their employee database. It allows for viewing of all employees, departments, roles, salaries and managers, as well as, manipulating the data and adding in new data.

  # Table of Contents

  - [Installation](#installation)
  - [Technologies](#technologies)
  - [Usage](#usage)
  - [Credits](#credits)
  - [License](#license)
  - [Contribution](#contributing)
  - [Tests](#tests)
  - [Questions](#questions)
  - [Walkthrough](#walkthrough)

  ## Installation:

  Clone or download the repository to your machine. Initiate with ```npm i```
  Run the program with ```node server```

## Technologies
  - JavaScript
  - Node js
  - Express js
  - MYSQL

  ## Usage:
  Use this to navigate, view and interact with a company's employee database.

  ## Credits:

  Made by Cameron Wills

  ## License:

  For more information about licenses, please visit:

  [License](https://opensource.org/licenses/MIT)

  ## Contributing:

  [![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-v2.0%20adopted-ff69b4.svg)](CODE_OF_CONDUCT.md)

  The project is open-source

  ## Walkthrough
  [Walkthrough Video](https://youtu.be/IeB5M2VBy8c)

  ## Tests:

  no testing

  ## Questions:

  For any questions you may have, please visit my Github profile:
  - [Github Profile](https://github.com/CamWills89)

  If you have any additional questions, feel free to email them to me:
  -<EMAIL_ADDRESS>


text:
---
postName: Drafts
---

# Drafts

You can mark a post or a group as a draft by setting the `draft` frontmatter key to true.

E.g.

Post:
```md
---
postName: Drafts
draft: true
---
```

Group:
```md
---
groupName: Writing
draft: true
---
```

Doing so will remove the post (or the group & all its sub-groups and their posts) from everywhere.

> Note: In dev mode, files are being read from disk (to avoid reloading and generating index), which means that a draft might be accessible from the address bar.

license: Unlicense

url: https://raw.githubusercontent.com/anneiric/SveltePress/3cb78b5ee48d478f674a7dffdf5289ba75c7435e/pages/guide/02 - writing/04 - drafts.md

repository: anneiric/SveltePress

filename: 04 - drafts.md

gha_license_id: Unlicense

repo_name: anneiric/SveltePress


text:
# Posix cksum implementation in go

The [CRC-32 checksum](https://en.wikipedia.org/wiki/Cyclic_redundancy_check), and the checksum generated for [Posix cksum](https://en.wikipedia.org/wiki/Cksum) are slightly different despite starting with the same polynomial.  Maybe this is why people people have moved on to [MD5](https://en.wikipedia.org/wiki/MD5) or [SHA](https://en.wikipedia.org/wiki/SHA-1) based checksums.

If you wish to generated *CRC-32 checksums* the [hash/CRC32](https://golang.org/pkg/hash/crc32/) package (using the [ChecksumIEEE](https://golang.org/src/hash/crc32/crc32.go?s=7544:7581#L241) method) will work just fine.  You can compare results of this with the online tool found [here](http://zorc.breitbandkatze.de/crc.html)

For a *posix cksum* version, I've instead implemented the [C code found here](https://pubs.opengroup.org/onlinepubs/009695399/utilities/cksum.html) in golang (a table based calculator).  For reference I also built a non-table version (see: cksum-nt.go)

## Usage

```go
package main

import (
    "fmt"
    "github.com/gnabgib/go-cksum"
    "os"
)

func main() {
    file := "eg-file.txt"
    f,err := os.Open(file)
    if err != nil {
		fmt.Println("Unable to find file",filename)
		return
    }
    defer f.Close()
	in := bufio.NewReader(f)
    crc, size, err := Stream(in)
    if err!=nil {
        fmt.Println("CRC error:",err)
        return
    }
    fmt.Printf("%d %d %s",crc,size,file)
}
```

repository: gnabgib/go-cksum

repo_name: gnabgib/go-cksum


text:
# MMDWebAgent

![Alt text](miku_wave.gif)

A web application based port of the [MMDAgent](http://www.mmdagent.jp/) voice interaction system developed by the MMDAgent Project Team from the Nagoya Institute of Technology's Department of Computer Science. This toolkit can create a basis for user interactive systems for research and development in Artificial Intelligent for Human Interaction Systems.

Developed as part of a Hackathon project built a while ago at Penn Apps 2015.

Detailed Implementation Information Comming Soon...

Current setup is not complete as of yet and many things are broken at this point. Will provide fix and updated source.

## Included
* JS Based Front End Avatar Module (Uses PMD MMD Models) - Model not rendering correctly...
* OpenJTalk - Japanese TTS Engine (Not Fully Implemented Yet)
* Mitsuku - Backend Client (Any client will do)

repository: yutarochan/MMDWebAgent

repo_name: yutarochan/MMDWebAgent