text:
---
#layout: post
title:  "Brand and Logo"
date:   2019-03-18 20:50:34 +0100
categories: proposal
featured-img: alice-achterhof-85968-unsplash
author: Delijaj Sofia
---

## Brand and Logo
### Introduction
For the website's design, the logo is very important, with it people will keep the image in their head and associate it with a certain emotion and will help to design the website itself (such as the colors). The name SDG-market doesn't seem appropriate in my opinion, mostly SDG. In fact, if we want to create a diverse community we should have a more appealing name. Even market at some extent makes the site looking too commercial, even if we have tokens and some kind of value attributed to each project. This document will talk about my research about logos creations and brand naming.
### Finding a good naming
First, we are going to look for a name indeed if we think about it the name will give us a good start for a logo. We have many possibilities on how to find a good name, if we look at some brand names we could conclude that the brand names are:
1. Using the founder or inventor’s name (Hewlett-Packard)
2. Describing what you do (Southwest Airlines)
3. Describing an experience or image (Sprint)
4. Taking a word out of context (Apple)
5. Making up a word (Google)

If I think about people everyday life, you'll see they tend to remember unique names. A great name can create buzz, position you as a true leader and innovator, and reinforce your value proposition in a word or two. However, it can also neutralize or even negate the work you do to build a position in the market. So it's important to think about it and make a good choice. In the financial point, by choosing a brand we also choose what URL we are going to use and thus depending on the money you put in the project certain name price are better than others. After finding some ideas and good URLs, we should ask people how do they feel about the name to be sure that it is appealing.
If we follow the step of (1) and some brainstorming, we could come with good propositions.
### The logo
"You want your logo to communicate your brand’s personality. And in order to do that, you first need to understand what your brand’s core personality is. Once you have a clear idea of what makes you unique and what your brand is all about, it will be much easier for you to make design choices that complement and complete that picture." (2). This part is very important since the customer needs to have some leads on our brand by the name and mostly the logo. If we look at some brands we can see that they have a simple image or motif. Being simple is not that bad, in fact, we need an easy and effective way to make the audience remember our brand.
#### Logo design style
(2)Gives us 5 main logo design styles that exist:
1. **Classic**: a classic logo will have one color with a certain color background and not too "bright", this style tells people that you are reliable and down to earth.
2. **Retro or vintage**: this type has been popular for a long time and evokes romantic feelings of nostalgia; it uses dark-toned colors.
3. **Modern and minimalist**: a clean and minimalist style to communicate how fresh and modern they are by using geometrical images and whitespaces; that's a very modern way to create a logo and thus showing you are up-to-date.
4. **Fun and quirky**: this kind of logo are mostly targeting a young audience with some colorful and cute images.
5. **Handmade and handcrafted**:  this brand is individualistic and stands for handmade quality, it can be mixed easily with the other types mentioned before.

Of course, all of those types can be fused to give a unique logo.
#### Main types of logos
In addition to the overall style there are **7 main types of logos** we can choose from when we are creating our logo:

**Lettermark logos** can be great to streamline the company logo, especially if the name is very long or hard to remember. Lots of businesses choose to go by their initials, just think of HP, CNN or H&M. These monograms can be great for minimalist logos, but they are not very good at expressing what the business is about.

**Wordmarks** are a very straightforward way of using the company name as a logo. It gives personality and recognition value, they are all about typography—just look at the wordmark logo for ONE.

**Pictorial marks or logo symbols** are what we think of when we hear the word “logo”. They are iconographic images that are easily recognizable and represent the brand with an image. We can choose something simplistic or more complex. Oftentimes these are paired with a wordmark.
Instead of a recognizable symbol, **abstract logo marks** are geometric forms that don’t establish an immediate connection to an existing image but create something entirely new for the brand. An abstract logo mark will condense your business into a symbol that is truly unique to you.

 They are often colorful, cartoonish characters that represent your business in a family-friendly and approachable way.

A **combination mark** does exactly what it says on the tin: it combines a symbol with a word mark to create an easily recognizable logo. The brand name is either placed next to the symbol or is integrated into the graphic element. People will associate both elements with our brand, which allows us to use them both alone or together.

Similar to combination marks, **emblems** are also often a combination of word and pictorial elements. They usually consist of text integrated into a symbol or icon.

#### Color choice
As spoken into my "aspects of a website", colors are very important to a vehicle a certain emotion and I already described some colors. To be sure to have matching colors there are 3 different way to associate colors:
1. Using complementary colors (2 opposite colors)
2. Using analog colors (3 side-by-side colors)
3. Using triadic colors (3 equally spaced around the color-circle, triangle-like)

#### Typography
There are 4 types of fonts that we can use:

**Serif** is a small line or stroke regularly attached to the end of a larger stroke in a letter or symbol, it gives an old-fashioned and elegant look for a brand i.e Freight Text, Caslon, Garamond, and Stanley.

**Sans serif** is the opposite of serif (so no little line), this font is often used in modern and sleeker looks i.e Helvetica, Avant Garde, Arial, and Geneva.

**Script** is a font looking like handwriting and gives a very unique look i.e Blackletter, Calligraphic, Casual and Celtic.

**Display** is a typeface that is intended for use at large sizes for headings, rather than for extended passages of body text, this type gives a more funky look. i. Art Deco, Art Nouveau, Decorative and Graffiti.

#### Animals
Some brands have an animal as their logo. So, like colors, animals have a signification and send a different feeling to the user. Let’s mention some of the most common:

A **cat** symbol means freedom, spiritual power, tenderness, hedonism, mystery, (and either good or bad luck in Japan)

A **Bear** symbol means strength, courage, and tenacity and is the animal that represents the sellers in the market, so it is used along with the bull in several trading and stocks related projects

A **Bull** means strength, courage, tenacity and is the animal that represents the buyers in the market, so it is used a lot in stocks and trading-related projects

A **Fox** symbol means intelligence and slyness.

An **Elephant** symbol means power, dignity, intelligence, and peace.

A **Dolphin** symbol means salvation, transformation, and love.

A **Horse** Symbol means velocity, vitality, and beauty.

An **Ant** means hard effort, while a group of ants can portray effective teamwork.

**Dogs** portray loyalty and unconditional love.

Other animals can be found on the website (4) and (5).

#### Adinkra symbols
Not very used, those symbols have a meaning (see (6)). The advantages are: they don't have any copyright, they are simple and they are not used that much so it could be a good way to be original.
#### Avoiding generic logos
To better apprehend the logo creation we can look at existing logos and we can see that there are many logos nearly identic. We would want to avoid having an unoriginal design. The article of (3) really describes well all the used icons and what methods we can use to find an original idea.
### My ideas
#### Branding
In my opinion, to include most of our community, we need something different from SDG. In fact, if we talk about SDGs some people will find it too vague or not connected with their objective. Indeed we will first target programmers and developers. The next part "market" should stay (or we could find a synonym for it if it feels odd) since the point is to evaluate projects, being able to trade the generated tokens between users and having a financial help (with philanthropy or other kinds of investors). So **developers.market** seems to be a more appropriate name than SDG market. If we look trough URLs prices we can conclude that it's not so expensive($80.44)(7).
#### Logo
In this part, I will propose some logo ideas and concepts. These ideas could work for both my proposition and the current name, SDG market.
I want to create a circle icon seeing that the names are long so we will put them around the logo. In the center I see many possibilities; Nyomi showed me the African symbols and "ANANSE NTONTAN" took our attention, indeed this symbol represents _"'spider's web', symbol of wisdom, creativity and the complexities of life"_ (7) which is really fitting looking at the purpose of our website. The ant is also very fitting (see animals). I would prefer the ant because people can recognize it easier than the spider's web but both must be considered.
The color scheme will be one that I proposed in the _design of a website_, the one with dark blue, teal, light pink and orange. I feel like that we should use only two fo them, teal and orange or dark blue and orange. I put orange since having a dark-toned color and a more flashy one gives a better look and an easier way to memorize the logo.
[add some logo idea]
### Documentation
[https://www.canva.com/create/logos/?utm_expid=.dKVwQnVmSaKfjE7BH2tsVw.0&utm_referrer=https%3A%2F%2Fwww.google.com%2F](https://www.canva.com/create/logos/?utm_expid=.dKVwQnVmSaKfjE7BH2tsVw.0&utm_referrer=https%3A%2F%2Fwww.google.com%2F)

(1) [https://www.columnfivemedia.com/how-to-choose-a-brand-name](https://www.columnfivemedia.com/how-to-choose-a-brand-name)

(2) [https://en.99designs.ch/blog/logo-branding/how-to-design-logo/](https://en.99designs.ch/blog/logo-branding/how-to-design-logo/)

(3) [https://en.99designs.ch/blog/tips/generic-logos/](https://en.99designs.ch/blog/tips/generic-logos/)

(4) [http://www.spiritanimal.info/animal-meanings/](http://www.spiritanimal.info/animal-meanings/)

(5) [https://www.spirit-animals.com/](https://www.spirit-animals.com/)

(6) [http://www.adinkra.org/htmls/adinkra/anan.htm](http://www.adinkra.org/htmls/adinkra/anan.htm)

(7) [https://www.name.com/domain/search/developers.market#notify](https://www.name.com/domain/search/developers.market#notify)


text:
Various Portfiles for installation of Orocos on OS X.

Using This Repository
=====================
The following steps will allow you to use the portfiles in this repository with your local macports installation. Please replace /Users/vm with your local home directory as appropriate.

1. Clone the repository locally:

	$ cd ~

	$ git clone https://github.com/smits/smits-macports.git

2. Edit /opt/local/etc/macports/sources.conf to include the path to the local clone:

	file:///Users/vm/smits-macports

	Be sure that this line is above the rsync:// line.

3. At this point, you should be good to install the included ports, such as lua51:

	$ sudo port install lua51

license: MIT

repository: smits/smits-macports

branch_name: refs/heads/master

extension: md

license_type: permissive

repo_name: smits/smits-macports


text:
# Design Blog- espresso lib
Ruminations on the design and evolution of the espresso library.

***
## Introduction

The idea of capturing this work in a library came to me many years ago now
while I was still a relatively junior engineer. I'd been working on migration/upload feature developed for performance to complete the task in an strictly limited time-window, as part of an overnight batch job.

I'd leveraged multithreading to maximize throughput and was running extensive testing to determine exactly how many concurrent threads were optimum and it became clear that passing this info as an arg parameter was an important feature. I implemented a rudimentary solution quickly enough but a curiosity for a more robust solution was ignited and I began tinkering with a more comprehensive command line argument parsing solution.

I figured it would have general applicability so a standalone library seemed apt. Some time later, having gained experience of API design and Physical Code Design, I remodeled the library into pretty much the current layout.

At this point, anytime I had an idea for a handy tool or utility, I had a quick way to create it and treat it as a command, with the typical handling of help, version and usage information.

***
## Design Goals/Influences

There are a few stylistic aspects to the solution that are a result of some influences.

* I like libraries that have a single header for simple inclusion and adoption.
* Equally, I like libraries that are logically segregated so you can include the parts you like and avoid #including the parts you don't.
* I wanted the solution to be cross-platform so I could build tools for Windows and Unix/Linux. Later, as macOS emerged as a development platform, I ported to this OS.
* Internally, I wanted to take advantage of precompiled headers when working on Windows.
* I wanted a completely clean build, without any compiler or linker warnings so I wanted to be able to disable some compiler warnings. However, I wanted a way for the user to disable that.
* I like to use write additional messages to the output window when compiling, but I wanted to provide a way to disable this in case they annoyed other users.

So, as theme, I wanted ultimately flexibility.

***
## Design Evolution

When working with C++ and taking an object-oriented approach, there are lots of ways to devise a solution. It occurred to me that while I originally developed the library for use with CMD-line tools, some Windows developers have a preference, if not a natural instinct, to devise tool solutions using the Windows UI. So, while you may well launch the command from the CMD-line with optional arguments, it actually launches a Windows GUI.

This really challenged my assumptions about the library writing to stdout. I didn't want to limit its scope so I set about catering to this facet - i.e. separating argument parsing logic from writing output to stdout. My initial attempt was to use class inheritance to separate 'common' logic into an abstract base class and pushing the parts leveraging stdout into a concrete class. This succeeded in achieving the design goal but it didn't sit well with me as an elegant solution.

Years later, when working with Java and learning about Spring's Inversion of Control (IOC) design pattern, I learnt about the concept of separating function down to it's core parts. For example, I realized that rendering output is quite distinct from argument parsing. This allowed me to provide a stdout renderer as standard but provided a means for another developer to devise a compatible renderer for there environment.

I detailed the design thought process in a separate article on [construction](Blog-Construction.md).

Another design journey lead me down a track that led to the implementation of the [MVC pattern](Blog-Manager-Object.md).

***
## Style, Conventions and External Influences

When I first devised the espresso library, I was strongly influenced by the Visual C++ naming conventions, using camelCase with a leading capital letter. I always thought this more aesthetically pleasing that the use of underscores in names.

However, after years and years of Java programming, I came round to having a preference for camelCase 'without' the leading uppercase letter. I tend to use a 'light' version of Hungarian notation so I found my new preference to be compatible with this.

***
## IDE History

This library was first developed using Visual C++ 6.0. That version of the Microsoft C/C++ compiler had quite a long life and the project was still tied to that version for many years. Eventually, it was upgraded to Visual Studio 2003 (Visual C++ 7), then Visual C++ 8 and Visual C++ 9. Thereafter, it was neglected while I pursued pure Java development and didn't get any attention until Visual Studio 2014 but then was upgraded to Visual Studio 17 and most recently Visual Studio 2019.

***
Donnacha Forde - Espresso Library

1995-2021

repository: donnachaforde/espresso

repo_name: donnachaforde/espresso


text:
## Assessment Instructions

Assessments are just practice, so don't stress out! Feel free to ask your instructors for hints and help as you code. You can ask for a big hint or a small hint to nudge in the right direction. We understand that there is some sport in working through problems on your own. So if you want, you can take the assessment solo. If you will be distracted from overhearing the chatter from instructors helping other students, feel free to put on some headphones.

Assessments will be made available in your class's [slack][bp-slack] channel by your instructor. Assessments are in class 8:00 - 9:00pm on Fridays and 6:30 - 7:30pm on Mondays. Here are instructions to set up and take an assessment.

### During an assessment
+ Download the assessment from slack and unzip it to somewhere you can access easily, like your Desktop.
+ Do not move or rename any of the files or folders inside.
+ Rename the outer assessment folder to `firstName_lastName_num` using your name and the assessment number.
  + For example, I would name my first assessment `alvin_zablan_1`.
+ Open the renamed assessment folder in Atom. Your job is to fill in the functions in the `problems` subfolder. Only modify the .js files in the `problems` folder.
+ Use your command line to `cd` into your assessment folder. You can then use the `mocha` command to test your assessment for correctness. Feel free to run `mocha` as frequently as you like.
+ [Video Walkthrough][assessment-setup]

### After an assessment
+ Make sure you renamed your assessment folder correctly.
Compress/zip your entire assessment folder (by right clicking)
+ Direct message your instructor the assessment by attaching a file by clicking the + in the slack text box.
+ Students are required to upload an 100% passing assessment by the next assessment. You can upload your corrected assessment by starting a follow up discussion on your original submission. Be sure to name the file firstName_lastName_num_corrected. For example,
alvin_zablan_1_corrected. Direct message your instructor your corrections.
  + Friday corrections are due by the next Monday's class. Monday corrections are due by the next Friday's class.

[bp-slack]: https://aa-bootcamp-prep.slack.com/
[assessment-setup]: https://vimeo.com/212974113/0460ab776b

gha_license_id: MIT


text:
# Preprocessed Wikinews Keyphrase benchmark dataset

This dataset was introduced in:

 - **TopicRank: Graph-Based Topic Ranking for Keyphrase Extraction.**
   Adrien Bougouin, Florian Boudin, Béatrice Daille.
   *In Proceedings of the International Joint Conference on Natural Language
   Processing (IJCNLP), 2013.*

The dataset is split into three directories:

  * `references`: reference keyphrases for evaluation
  * `test`: test set
  * `src`: scripts and archive from which the dataset is built

Each input file is processed using the Stanford CoreNLP suite v3.6.0.
We use the default parameters and perform tokenization, sentence splitting and
Part-Of-Speech (POS) tagging. Files are in XML format.

Original raw text dataset can be retreived from this [link](bougouin-2013).

Reference keyphrases are in json format and named according to the following
rules:

    test.reader.[stem]?.json

reader-provided (stemmed or not) reference keyphrases for test.

Stemming (if applied), is performed with nltk Porter algorithm (French).

This corpus has been made for the evaluation of automatic keyphrase extraction
systems. It contains 100 French documents published on WikiNews between May 2012
and December 2012.

[witten-1999]: https://github.com/adrien-bougouin/WikinewsKeyphraseCorpus


text:
# Welcome contributors! :smiley:

- Please be mindful of the [code of conduct](CODE_OF_CONDUCT.md) while interacting or contributing!

- Do not hesitate to raise an [issue](https://github.com/HarshKapadia2/attendance_management/issues) if you have any problems!

- If you make a contribution, please do not forget to add your personal details to the [`CONTRIBUTORS.md`](CONTRIBUTORS.md) file!

## Change and commit guide

- Please check for duplication before adding information.
- Add appropriate headings under which the commands come, if they do not already exist.
- Commit message format can be found [here](https://harshkapadia2.github.io/git_basics/#_git_commit).
   - :books: docs: `:books: docs:` for additions.
   - :sparkles: docs: `:sparkles: docs:` for new files.
   - :bug: fix: `:bug: fix:` for typos, changes and other mistakes.

repository: KartikSoneji/cli

repo_name: KartikSoneji/cli


text:
# screenshot cog

this cog uses [pyppeteer](https://github.com/pyppeteer/pyppeteer) to take a screenshot of a given url

only the bot owner can use this command (`[p]screenshot`) for two main reasons:

1. a harmful user could potentially screenshot a nsfw website
2. a harmful user could potentially screenshot an ip grabber, giving them the ip address of the host machine

repository: OofChair/cogs

gha_language: Python

repo_name: OofChair/cogs


text:
# uploadtonya

Uploads the given file to nya.is, optionally using your token to login.

## Installation

```
git clone https://github.com/Flat/uploadtonya.git && cd uploadtonya && crystal build --release ./src/uploadtonya.cr
```

## Usage

```
Usage: uploadtonya [th] files
    -t TOKEN, --token=TOKEN          Specify access token for nya.is
    -h, --help                       Show this help
```

## Development

TODO: Write development instructions here

## Contributing

1. Fork it ( https://github.com/flat/uploadtonya/fork )
2. Create your feature branch (git checkout -b my-new-feature)
3. Commit your changes (git commit -am 'Add some feature')
4. Push to the branch (git push origin my-new-feature)
5. Create a new Pull Request

## Contributors

- [Flat](https://github.com/flat) - creator, maintainer

repository: Flat/uploadtonya

repo_name: Flat/uploadtonya


text:
# Help for module RBKCD

## Disable-RBKCD

### Synopsis
Removes all accounts allowed to delegate to ServerC

### Description
Sets the msDS-AllowedToActOnBehalfOfOtherIdentity computer object attribute to $null (by using the aliased attribute PrincipalsAllowedToDelegateToAccount)

### Parameters

-ServerC <String>
    FQDN of ServerC

    Required?                    true
    Position?                    1
    Default value
    Accept pipeline input?       false
    Accept wildcard characters?  false

-DomainCCred <PSCredential>
    Credential to edit the ServerC computer account from the domain where ServerC resides. Can be a domain admin, but only
    needs delegated authority to the computer object.
    Will prompt for credential if not provided

    Required?                    true
    Position?                    2
    Default value                (Get-Credential -Message 'DomainC credential')
    Accept pipeline input?       false
    Accept wildcard characters?  false

### Examples
-------------------------- EXAMPLE 1 --------------------------

```
PS C:\> Disable-RBKCD -ServerC sc.proseware.com

```
-------------------------- EXAMPLE 2 --------------------------

```
PS C:\> Disable-RBKCD -ServerC sc.proseware.com -Credential (Get-Credential proseware\adminacct)

```

## Enable-RBKCD

### Synopsis
Enables Resource-Based Kerberos Constrained Delegation for ServerB to access ServerC

### Description
Enables Resource-Based Kerberos Constrained Delegation for one or more ServerB computers to access one or more ServerC computers. Optionally, these computers can reside in separate domains, requiring two sets of credentials for the command.

### Parameters

-ServerB <String[]>
    FQDN of ServerB. Accepts an array.

    Required?                    true
    Position?                    named
    Default value
    Accept pipeline input?       false
    Accept wildcard characters?  false

-ServerC <String[]>
    FQDN of ServerC. Accepts an array.

    Required?                    true
    Position?                    named
    Default value
    Accept pipeline input?       false
    Accept wildcard characters?  false

-Credential <PSCredential>
    Credential when both ServerB and ServerC are in the same domain.

    Required?                    true
    Position?                    named
    Default value
    Accept pipeline input?       false
    Accept wildcard characters?  false

-DomainBCred <PSCredential>
    Credential to query the domain of the ServerB computer account, also having admin rights on ServerB.

    Required?                    true
    Position?                    named
    Default value
    Accept pipeline input?       false
    Accept wildcard characters?  false

-DomainCCred <PSCredential>
    Credential to update the ServerC computer account from the domain where ServerC resides. Can be a domain admin, but only
    needs delegated authority to the computer object.

    Required?                    true
    Position?                    named
    Default value
    Accept pipeline input?       false
    Accept wildcard characters?  false

### Notes
This code is still a work in progress. There are some obvious areas for optimization.

### Examples
-------------------------- EXAMPLE 1 --------------------------

```
PS C:\> Enable-RBKCD -ServerB sb.proseware.com -ServerC sc.proseware.com -Credential (Get-Credential)
Both ServerB and ServerC in the same domain.

```
-------------------------- EXAMPLE 2 --------------------------

```
PS C:\> Enable-RBKCD -ServerB sb.proseware.com -ServerC ms1.alpineskihouse.com -DomainBCred (Get-Credential) -DomainCCred (Get-Credential)
ServerB and ServerC in different domains.

```
-------------------------- EXAMPLE 3 --------------------------

```
PS C:\> Enable-RBKCD -ServerB sa.proseware.com,sb.proseware.com,sc.proseware.com -ServerC ms1.alpineskihouse.com,ms1.alpineskihouse.com -DomainBCred (Get-Credential) -DomainCCred (Get-Credential)
Multiple ServerB and multiple ServerC in different domains.
If passing multiples to either server parameter, they must be in the same domain. This is a limitation of the way the code is written. It is not a limitation of resource-based kerberos constrained delegation.

```

## Get-RBKCD

### Synopsis
Displays the identities allowed to delegate to ServerC

### Description
Retrives the msDS-AllowedToActOnBehalfOfOtherIdentity computer object attribute which contains an ACL. Displays only the identity portion of the ACL.

### Parameters

-ServerC <String>
    FQDN of ServerC

    Required?                    true
    Position?                    1
    Default value
    Accept pipeline input?       false
    Accept wildcard characters?  false

-DomainCCred <PSCredential>
    Credential to view the ServerC computer account from the domain where ServerC resides. Can be a domain admin, but only
    needs delegated authority to the computer object.
    Will prompt for credential if not provided

    Required?                    true
    Position?                    2
    Default value                (Get-Credential -Message 'DomainC credential')
    Accept pipeline input?       false
    Accept wildcard characters?  false

### Examples
-------------------------- EXAMPLE 1 --------------------------

```
PS C:\> Get-RBKCD -ServerC sc.proseware.com

```
-------------------------- EXAMPLE 2 --------------------------

```
PS C:\> Get-RBKCD -ServerC sc.proseware.com -Credential (Get-Credential proseware\adminacct)

```

## Invoke-DoubleHop

### Synopsis
Nested Invoke-Command from ServerB to ServerC

### Description
Passes fresh credentials to ServerC Invoke-Command from a nested Invoke-Command on ServerB with $using:.

### Parameters

-ServerB <String>
    First hop computer

    Required?                    true
    Position?                    1
    Default value
    Accept pipeline input?       false
    Accept wildcard characters?  false

-ServerC <String>
    Second hop computer

    Required?                    true
    Position?                    2
    Default value
    Accept pipeline input?       false
    Accept wildcard characters?  false

-DomainBCred <PSCredential>
    Credentials to access ServerB

    Required?                    true
    Position?                    3
    Default value
    Accept pipeline input?       false
    Accept wildcard characters?  false

-DomainCCred <PSCredential>
    Credentials to access ServerC. This can be omitted if both ServerB and ServerC are in the same domain.

    Required?                    false
    Position?                    4
    Default value
    Accept pipeline input?       false
    Accept wildcard characters?  false

-Scriptblock <ScriptBlock>

    Required?                    true
    Position?                    5
    Default value
    Accept pipeline input?       false
    Accept wildcard characters?  false

### Notes
The output PSComputerName property reflects ServerB, while the output is actually from ServerC.

### Examples
-------------------------- EXAMPLE 1 --------------------------

```
PS C:\> Invoke-DoubleHop -ServerB sb -ServerC dc -DomainBCred $DomainBCred -Scriptblock {
dir \\dc\c$
}

```
-------------------------- EXAMPLE 2 --------------------------

```
PS C:\> $p = @{
ServerB = 'sb'
    ServerC = 'dc1.alpineskihouse.com'
    DomainBCred = (Get-Credential)
    DomainCCred = (Get-Credential)
}

Invoke-DoubleHop @p -Scriptblock {
    dir C:\
}

```


text:
# Haxe and Python

![](docs/img/haxe_python_logos.png)

I started this documentation with the idea to learn more about python and Haxe.

But instead of focussing on only python I made a documentation about all the system target from Haxe.

- cpp (C++)
- cs (C#)
- interp (Eval/Macro)
- java
- lua
- jvm
- neko
- node.js (without installing npm packages)
- python

Website: https://matthijskamstra.github.io/haxesys/#/

Github : https://github.com/MatthijsKamstra/haxesys

## This documentation is for now deprecated!

repository: MatthijsKamstra/haxepython

repo_name: MatthijsKamstra/haxepython


text:
# Student Step Follower App

#### By
** Assumpta Uwanyirijuru **
** Jeanne d'Arc NYIRAMWIZA **
** Florence MBABAZI **
** Naima NIYIGENA **

## Description
This is a communication App that will help parents to get regular updates of their children’s education. The schools will use less time giving regular reports on the students while excluding the use of papers to print this information, the parents will have the updates on their children at the tap of a button which is more convenient.

* If you haven't already, log in to your Heroku account and follow the prompts to create a new SSH public key.

* $ heroku login
* Clone the repository
* Use Git to clone SSF's source code to your local machine.

* $ heroku git:clone -a awwards1010
* $ cd awwards1010

## link to it on Heroku

https://ssf10.herokuapp.com/

## Known Bugs

This app may not meet all the desired services as the user need but,
It is still in Development and that will be soon resolved.

## Behavior Driven Development (BDD).

## Specifications

| Behavior        | Input           | Outcome  |
| ------------- |:-------------:| -----:|
| Superuser is able to add different schools | N/A | Display all schools added|
| School admin is able to add the school information | N/A | Display school information |
| School admin is able to add the guide | N/A| Display the list of guide |
| School admin is able to add the guide | N/A | Display the the list of students |
| The guide  is able to add the student updates that the parent will see| N/A | Display each student updates(discipline and marks) |
| Parent is able to login to see his child updates | N/A | Parent is able to get updates of his child information |

## Technologies Used

This App is made with:
* *postgreSQL*
* *SQLAlchemy*
* *python3.6*
* *Django*
* *Bootstrap & css*
* *html*

## Support and contact details

If you meet any issue, have questions, ideas or concerns;please contact us on
<EMAIL_ADDRESS>and any contribution to the code is welcomed and will be much appreciated.

### License & Copyright

* **This project is licenced under the MIT license.**
* **Copyright (c) 2019 Juru-10**
* **WeCode program under Moringa Project**

### Acknowledgments

* *Moringa School Project/WeCode Programming*
* *Technical Mentors*
* *Fellow Students*
* *This project collaborators*


text:
# Annotations

::: tip Namespace
Using a namespace alias simplifies typing and improves readability.

All annotations are in the `OpenApi\Annotations` namespace.
:::

Since Annotations are technically PHP comments, adding `use OpenApi\Annotations as OA;` is strictly speaking not necessary.
However, doctrine will be quite specific about whether an alias is valid or not.

`swagger-php` will automatically register the `@OA` alias so all annotations can be used using the `@OA` shortcut without
any additional work.

## Doctrine
Annotations are PHP comments (docblocks) containing [doctrine style annotations](https://www.doctrine-project.org/projects/doctrine-annotations/en/latest/index.html).

::: info
All documentation related to doctrine applies to annotations only.
:::

**Example:**
```php
<?php

use OpenApi\Annotations as OA;

/**
 * @OA\Info(title="My First API", version="0.1")
 */
class OpenApi {}

class MyController {

    /**
     * @OA\Get(
     *     path="/api/resource.json",
     *     @OA\Response(response="200", description="An example resource")
     * )
     */
    public function resource() {
        // ...
    }
}
```

## Escaping

::: tip Escaping double quotes
Double quotes can be escaped by doubling them rather than using ```\```

For example:
```php
    @OA\Schema(
       title="Request",
       schema="Request",
       example={
          "configuration":"{""formConfig"":123}"
       }
     )
```
:::

## Arrays and Objects

Doctrine annotations support arrays, but use `{` and `}` instead of `[` and `]`.

Doctrine also supports objects, which also use `{` and `}` and require the property names to be surrounded with `"`.

::: warning DON'T WRITE
```php
/**
 * @OA\Info(
 *   title="My first API",
 *   version="1.0.0",
 *   contact={
 *     "email"<EMAIL_ADDRESS> *   }
 * )
 */
```
:::

This "works" but most objects have an annotation with the same name as the property, such as `@OA\Contact` for `contact`:

::: tip WRITE
```php
/**
 * @OA\Info(
 *   title="My first API",
 *   version="1.0.0",
 *   @OA\Contact(
 *<EMAIL_ADDRESS> *   )
 * )
 */
```
:::

This also adds validation, so when you misspell a property or forget a required property, it will trigger a PHP warning.

For example, if you write<EMAIL_ADDRESS>swagger-php would generate a notice with `Unexpected field "emial" for @OA\Contact(), expecting "name", "email", ...`

Placing multiple annotations of the same type will result in an array of objects.
For objects, the key is defined by the field with the same name as the annotation: `response` in a `@OA\Response`, `property` in a `@OA\Property`, etc.

```php
/**
 * @OA\Get(
 *   path="/products",
 *   summary="list products",
 *   @OA\Response(
 *     response=200,
 *     description="A list with products"
 *   ),
 *   @OA\Response(
 *     response="default",
 *     description="an ""unexpected"" error"
 *   )
 * )
 */
```

**Results in**
```yaml
openapi: 3.0.0
paths:
  /products:
    get:
      summary: "list products"
      responses:
        "200":
          description: "A list with products"
        default:
          description: 'an "unexpected" error'
```

## Constants

You can use constants inside doctrine annotations.

```php
define("API_HOST", ($env === "production") ? "example.com" : "localhost");
```

```php
/**
 * @OA\Server(url=API_HOST)
 */
```

:::tip
Using the CLI you might need to include the php file with the constants using the `--bootstrap` options.

```shell
> openapi --bootstrap constants.php
```
:::

repository: zircote/swagger-php

gha_language: PHP

repo_name: zircote/swagger-php


text:
# Chat with Socket.io and React

## How to run

To run the project you must clone 2 project. one of project is Server and the other is client so clone both of these projects;
[Server](https://github.com/MBehtemam/Socket-io-chat-server)
[Client](https://github.com/MBehtemam/socket-io-chat-client-react)

after that run `npm install` in both projects. before run the client you must change the url of server in `.env` file in client directory. for example if you run the server on `http://localhost:3002` change the `REACT_APP_SERVER_URL` to `REACT_APP_SERVER_URL = http://localhost:3002`

## Test

In both project I used `Jest` for test. so you can run `yarn test` for run th

repository: MBehtemam/Socket-io-chat-server

repo_name: MBehtemam/Socket-io-chat-server


text:
---
layout: default
---

# 1997-09-10 - Re: Nuclear Hedge Funds / Social Engineering in History /  Wiretap DiFi

## Header Data

From: Sean Roach<EMAIL_ADDRESS>To<EMAIL_ADDRESS>Message Hash: e57e99e34437389cbb1cfbb265f818acdd373b28661dfa479d316555d1108889

Message ID<EMAIL_ADDRESS>Reply To: _N/A_

UTC Datetime: 1997-09-10 04:32:04 UTC

Raw Date: Wed, 10 Sep 1997 12:32:04 +0800

## Raw message

```
{% raw  %}From: Sean Roach<EMAIL_ADDRESS>Date: Wed, 10 Sep 1997 12:32:04 +0800
To<EMAIL_ADDRESS>Subject: Re: Nuclear Hedge Funds / Social Engineering in History /  Wiretap DiFi
Message-ID<EMAIL_ADDRESS>MIME-Version: 1.0
Content-Type: text/plain

At 11:01 PM 9/8/97 -0700, Bill Stewart wrote:
...
>On the other hand, 0.5 kt of ANFO in the basement wasn't quite enough
>to take the towers out.
...
The version that I read was that the truck was merely parked next to a
pillar hoping that that would do it.
The guys weren't physics majors.  With enough people here who speak in pure
math, there might be a few who could calculate the best spot for such a
device based on blueprints of the building.

My opinion, one place the charges primarily along one side.  The north one.
That way, when the columns give, the building falls on more of Manhattin.

BOOM!  Timberrr..

This is speculation, of course.  Purely for academic consideration and all that.

{% endraw %}
```

## Thread

+ Return to [September 1997](/archive/1997/09)

+ Return to "[Sean Roach <roach_s@alph.swosu.edu>](/authors/sean_roach_roach_s_at_alph_swosu_edu_)"

+ 1997-09-10 (Wed, 10 Sep 1997 12:32:04 +0800) - Re: Nuclear Hedge Funds / Social Engineering in History /  Wiretap DiFi - _Sean Roach<EMAIL_ADDRESS>


text:
Linux (manual)
==============

Download suitable binary from the
[newest release](https://github.com/function61/varasto/releases) (you don't need anything
else).

Rename `sto_linux-amd64` -> `sto` and `chmod +x` it.

Make `config.json` in the same directory with content:

```json
{
	"db_location": "varasto.db"
}
```

Now start the server (you may need to use sudo):

```console
$ ./sto server
2019/08/02 12:35:04 bootstrap [INFO] generated nodeId: LCb0
2019/08/02 12:35:04 [INFO] node LCb0 (ver. dev) started
```

If everything seems to work, now stop it by pressing `ctrl+c`.

Now make it start on system boot (you may need to run this with `sudo`):

```console
$ ./sto server install
Wrote unit file to /etc/systemd/system/varasto.service
Run to enable on boot & to start now:
        $ systemctl enable --now varasto
        $ systemctl status varasto
```

Just follow above instructions (again, you might need `sudo`).

After Varasto is started
------------------------

Now you can navigate your browser to [https://localhost/](https://localhost/).
(You'll have to approve the "insecure certificate" warning.)

gha_language: Go


text:
---
layout: page
title: "Portfolio"
date: 2011-08-01 13:12
comments: false
sharing: true
footer: true
---

## Web Sites

- [www.mycharitybox.com](https://www.mycharitybox.com) Online Donations System for Organizations and Individuals. Built with RoR, but using Backbone.js, and HTML5/CSS3 on the front end.
- [www.aktionapp.com](https://www.aktionapp.com) Custom Online Donations System based on the same system I built for Nadanu.
- [awedition.com.ar](aweditions.com.ar) Website part of the RallyOnRails 2011 competition, built with RoR.
  competition. We made it during a weekend. Awesome experience.
- [www.rubyconfargentina.org](http://rubyconfargentina.org) Ruby Argentina Conference, in 2011, built with Sinatra. [code](https://github.com/lucasefe/rubyconfar-website)
- [www.suipit.com](http://www.suipit.com) Project Management Application in Spanish, built with RoR.
- [www.checupcakes.com.ar](http://www.checupcakes.com.ar) Online Shop for a Cupcake Shop.

## Unpublished or Private Projects

- Network Provisioning Backend for [RIDSA](http://www.ridsa.com.ar/).
- InterOffice for [RIDSA](http://www.ridsa.com.ar/): Data Migration Service from legacy system to company's ERP.
- ID Server for [RIDSA](http://www.ridsa.com.ar/): Single Sign On Authentication System (bootstrapped from a basic [OpenID](http://openid.net/) Server).
- YidCafe: Forum based system oriented to the jewish community. Not deployed. Lot of work, right to the garbage.

## Ruby Gems

- [themes_for_rails](https://github.com/lucasefe/themes_for_rails) Theming solution for Rails 3 applications.
- [flattener](https://github.com/lucasefe/flattener) Hard to explain... Need to flat several objects so it gets easier to handle one multiple object creation of objects. Good for masquerading internal APIs.
- [garlenko](https://github.com/lucasefe/garlenko) Address book reader for Gmail, Hotmail and Yahoo.
- [core-generators](https://github.com/lucasefe/core-generators) Basic generators for bootstrapping Rails applications (kind of old now...)

## Talks

- This year I've been part of the [RubyConf Argentina](http://rubyconfargentina.org)'s organizers team. Great
  experience. You can find me on some of this
  [images](http://www.flickr.com/groups/rubyconfargentina2011/pool/with/6325823674/). I'm the dude with the hat.

- Ruby Argentina Monthly Meetups: Couple of talks there about [Grape](https://github.com/intridea/grape) and [Representable](http://github.com/apotonick/representable), and previously about [Rails](https://github.com/rails/rails)

- I spoke in a couple of regional Ruby Events like the [Ruby Meet Ups](http://ruby.com.ar) in Buenos Aires, or [Ruby Acts As Lit](http://www.rubylit.com.ar) in Santa Fe, Argentina, always about Ruby or Rails. Also on the 2006 [CaFeLug](http://www.cafelug.org.ar/).

extension: markdown


text:
---
layout: default
---

# 1997-03-24 - Re: "why privacy" revisited

## Header Data

From: jim bell<EMAIL_ADDRESS>To: Robert Hettinga<EMAIL_ADDRESS>Message Hash: 45822fcd784487fc2c6b2e2b4cdea6567f2316e791674a3fa0fd1be20958b3d0

Message ID<EMAIL_ADDRESS>Reply To: _N/A_

UTC Datetime: 1997-03-24 05:29:39 UTC

Raw Date: Sun, 23 Mar 1997 21:29:39 -0800 (PST)

## Raw message

```
{% raw  %}From: jim bell<EMAIL_ADDRESS>Date: Sun, 23 Mar 1997 21:29:39 -0800 (PST)
To: Robert Hettinga<EMAIL_ADDRESS>Subject: Re: "why privacy" revisited
Message-ID<EMAIL_ADDRESS>MIME-Version: 1.0
Content-Type: text/plain

At 10:55 PM 3/23/97 -0500, Robert Hettinga wrote:
>Seen with the traditional liberal/conservative political worldview, it
>makes no sense for the famous compassionate liberal judge Earl Warren,
>whose supreme court presided over the creation of the world's largest
>welfare state, to advocate what is on its face an extremely conservative
>act -- the internment of thousands of Japanese Americans in concentration
>camps -- in his earlier role as a state governor.
>
>Viewed from the statism/freedom standpoint, it is completely logical, that
>is, "We're your nation-state.
>
>In the case of the Japanese concentration camps, it was taking the personal
>freedom of Japanese Americans. In the case of the judicially activist
>Warren court's welfare state, it was the confiscation of assets from
>productive members of society in violation of the laws of economics, which
>in turn caused misery for the increasing dole-dependant millions. People
>who are now much less free than they ever were before the creation of the
>"Great Society".

Which is yet another of the many reasons I can espouse an "extreme" solution
to the problem, but one that I can honestly claim to not consider "extreme"
at all!  The way I see it, the lives of these thugs are not sufficiently
valuable to lose sleep over their loss, when to keep them around means the
kinds of abuse society has suffered for many generations.

Jim Bell
<EMAIL_ADDRESS>

{% endraw %}
```

## Thread

+ Return to [March 1997](/archive/1997/03)

+ Return to "[jim bell <jimbell@pacifier.com>](/authors/jim_bell_jimbell_at_pacifier_com_)"

+ 1997-03-24 (Sun, 23 Mar 1997 21:29:39 -0800 (PST)) - Re: "why privacy" revisited - _jim bell<EMAIL_ADDRESS>


text:
# @secretlint/secretlint-rule-azure

A secretlint rule for Azure (i.e. Azure AD) secrets. This rule takes aim at two common credentials leaks:

- [Service principals in code and config](https://learn.microsoft.com/en-us/azure/active-directory/fundamentals/service-accounts-principal)
- [Standard environment variables](https://learn.microsoft.com/en-us/dotnet/api/azure.identity.environmentcredential)

Note that unlike other secretlint PaaS rules, Azure does not have a standard file format for credentials and all
sensitive information is fully random, so discovering Azure AD credentials is purely heuristical.

## Install

Install with [npm](https://www.npmjs.com/):

    npm install @secretlint/secretlint-rule-azure

## Usage

Via `.secretlintrc.json`

```json
{
    "rules": [
        {
            "id": "@secretlint/secretlint-rule-azure"
        }
    ]
}
```

## MessageIDs

### AzureTenantId

> found Azure AD tenant ID: {{ID}}

This is the GUID of an Azure AD tenant. While this ID can be discovered from the domain name, knowing the tenant ID
increases the chance that credentials can be exploited. It is thus a good idea to treat the tenant ID as sensitive.

### AzureClientId

> found Azure client id: {{ID}}

This is the equivalent of a username and should be treated as sensitive.

### AzureClientSecret

> found Azurre client secret: {{SECRET}}

This is the long-lived secret for a user or service principal and should be kept secret.

## Options

- `allows: string[]`
    - Allows a list of [RegExp-like String](https://github.com/textlint/regexp-string-matcher#regexp-like-string)

## Examples

```json
{
    "rules": [
        {
            "id": "@secretlint/secretlint-rule-azure",
            // Ignore error related to IDs
            "allowMessageIds": ["AzureTenantId", "AzureClientId"],
            "options": {
                // allow list
                "allows": ["/IT_IS_PUBLIC/"]
            }
        }
    ]
}
```

## Changelog

See [Releases page](https://github.com/secretlint/secretlint/releases).

## Running tests

Install devDependencies and Run `npm test`:

    npm test

## Contributing

Pull requests and stars are always welcome.

For bugs and feature requests, [please create an issue](https://github.com/secretlint/secretlint/issues).

1. Fork it!
2. Create your feature branch: `git checkout -b my-new-feature`
3.  Push to the branch: `git push origin my-new-feature`
5. Submit a pull request :D

## Author

- [github/bittrance](https://github.com/bittrance)

## License

MIT © [Xenit AB](https://github.com/xenitab)

repository: secretlint/secretlint

gha_language: TypeScript

repo_name: secretlint/secretlint


text:
# Inference Lock

Mixin module to get inference locking in custom Ruby tool to match that of
native SketchUp tool (as close as possible).

Supports constraint lock (Shift) and axial locks (Arrow Keys).
Parallel/Perpendicular lock (Down Arrow) is not supported.

## Installation

1. Place file inside your extension's directory, preferably in a sub-directory called vendor to distinguish it from your own code base.
2. Wrap file content in your extension's namespace.
3. Require the file from files depending on it.


text:
---
layout: post
title: "Paper reviews: Implementing Remote Procedure Calls "
date:   2019-11-18
author: Faushine
tags:
- Distributed system
---

# RPC

[Remote procedure call](/img/in-post/2019-11-18/RPC.pdf) is an useful paradigm for providing communication across a network between programs and it is written in a high-level language. There are lots of open source RPC framework such as [gRPC](https://grpc.io/) and [Dubbo](https://dubbo.apache.org/en-us/).

## Modes of Communication

- Raw message passing: Low level, and not easy to use.

    – TCP/IP: reliable stream

    – UDP: unreliable, connectionless, packet oriented.

- Distributed shared memory: higher overhead, and failure handling is difficult

- File system: Low level and slow.

## Working of RPC

When making a remote call, five pieces of program are involved: the user, the user-stub, the RPC communications package (known as RPCRuntime), the server-stub, and the server. The user, the user-stub, and one instance of RPCRuntime execute in the caller machine; the server, the server-stub and another instance of RPCRuntime execute in the callee machine.

![alt text](/img/in-post/2019-11-18/rpc.jpg)

```
Interface{
    // has enough information for compile time
 	// checking, and generating proper calling sequence
    int func1(int arg)
    int func2(char * buffer, int size)
}
```

### func1

Client stub for func1

```
int func1(int arg) {
    Create req
    Pack  fid, arg, …etc
    Send req
    Wait for reply
    Unpack results
    Return result
}

```

Server stub for func1

```
Server stub fun1{
	Unpack request
 	Find the requested server function
	Call the function
	Pack results
	Send results
}
```

### func2

problems:

- *buffer points to local address space, and invocation on a remote node: copy/restore if needed.
- Semantic is not clear can be input or output: add an argument type (in|out|both).
- Complex data structures

## Binding

There are two aims to binding which we consider in turn. How does a client of the binding mechanism specify what he wants to be bound to? How does a caller determine the machine address of the callee and specify to the callee the procedure to be invoked ? Basically the first is solved by **naming** and the second is solved by **locating**.

> Naming: binding an importer of an interface to an exporter of an interface. There are two parts to the name of an interface: the type and the instance.

> Locating: can be a network address that allow the importer to bind and communicate to the exporter.

System described in the paper uses Grapevine (a distributed database) for RPC binding. Client gets the address from Grapevine, then uses the address and function id to invoke the
procedure. Server returns Table index and function ID to the client. Client tries to invoke the function using table index, fun ID, call ID and args

There are 3 different types of binding:

- Importer specifies only the type of the interface, the instance is chosen dynamically.

- Importer specifies that RName, which delays the resolution of the actual instance.

- Importer explicitly specifies the instance that it wants to run the RPC on.

Example: RPC-based file system

![alt text](/img/in-post/2019-11-18/rpc-server.jpg)

![alt text](/img/in-post/2019-11-18/rpc-client.jpg)

## RPC-Runtime

![alt text](/img/in-post/2019-11-18/rpc-run.jpg)

Runtime choices:

- TCP: High overhead in terms of latency and server state (having to keep several open TCP connections).

- UDP: Unreliable, doesn’t wait for acknowledgements of packet reception.

## Call semantics

- At least once: the function is executed at least once.

- At most once: the function is executed once or not at all

## Fault tolerance

**1. Lost reply from server**

![alt text](/img/in-post/2019-11-18/rpc-lost.jpg)

**Solution**: Call ID used to enforce **precisely once** semantics of procedure execution. Call sequence numbers are strictly increasing. Each calling activity has a latest call ID stored on callee machines. All the calls made to the callee machines should have Call IDs greater than this number, else the precisely once semantics will be violated.

![alt text](/img/in-post/2019-11-18/rpc-once.jpg)

![alt text](/img/in-post/2019-11-18/rpc-onesolv.jpg)

**2. Client failure with repeated seq**

Client rebooted before receiving result and then call func1() with different sequence number. fun1() was acked the second time without execution.

![alt text](/img/in-post/2019-11-18/rpc-ack.jpg)

**Solution**: add clock based conversation id, to every call. *<Conversation_id, seq#>* is strictly increasing.

**3. Server crash**

Server updated prev.calls table and then crashed.

![alt text](/img/in-post/2019-11-18/rpc-scrash.jpg)

**Solution**: Rebind on server restart with new fid.

![alt text](/img/in-post/2019-11-18/rpc-scsolv.jpg)

## Demo

[gRPCdemo](https://github.com/faushine/gRPCdemo) implemented greet and streaming calls.

## Reference

[CS 754: Advanced Distributed Systems](https://cs.uwaterloo.ca/~alkiswan/Classes/CS754-19F/)

url: https://raw.githubusercontent.com/faushine/faushine.github.io/686ad9b9b2ad9514ae0e908c881107a52141b32a/_posts/2019-11-18-Paper reviews: Implementing Remote Procedure Calls.md


text:
---
title: "Kaplan-Meier curves in R"
author: "Steve Simon"
source: "http://blog.pmean.com/kaplan-meier/"
date: "2014-10-31"
categories:
- Blog post
tags:
- R software
- Survival analysis
output: html_document
---

I am giving a talk about using R for survival analysis and I wanted to
talk first about the Kaplan-Meier curve and how you might draw it in
R.

<!---More--->

I wrote about the Kaplan-Meier curve in a [previous
webpage](http://www.pmean.com/08/SimpleKm.html)
- but that was a generic
example. First
- you read the data in R and transform it into a survival
object.

    day <- c(37,40,43,44,45,
     47,49,54,56,58,59,60,61,62,68,
     NA,71,NA,NA,75,
     NA,NA,89,NA,96)
    death <- is.finite(day)
    tim <- day
    tim[is.na(day)] <- 70
    library("survival")
    fly.surv <- Surv(tim,death)

The Surv function has options for left censored and interval censored
observations. Read the help file for details.

There is a print method for survival objects.

    print(fly.surv)

The survival object prints with a "+" attached to any censored
observation.

    [1] 37  40  43  44  45  47  49  54  56  58  59  60  61  62  68  70+ 71  70+ 70+ 75  70+ 70+ 89
    [24] 70+ 96

The survfit function creates a new object that summarizes the data in a
survival object using a Kaplan-Meier curve or a Cox regression model.
The input for survfit is a formula with a survival object on the left
side of the equation. A model with "~1<U+2033> fits a single Kaplan-Meier
curve to the entire survival object.

    fly.fit <- survfit(fly.surv~1)

There is a print method for survfit objects .

    print(fly.fit)

which lists some basic statistics

    Call: survfit(formula = fly.surv ~ 1)

    records   n.max n.start  events  median 0.95LCL 0.95UCL
         25      25      25      19      61      56      NA

There is also a summary method

    summary(fly.fit)

which produces a more detailed set of statistics.

    Call: survfit(formula = fly.surv ~ 1)

    records   n.max n.start  events  median 0.95LCL 0.95UCL
         25      25      25      19      61      56      NA
     time n.risk n.event survival std.err lower 95% CI upper 95% CI
       37     25       1     0.96  0.0392       0.8862        1.000
       40     24       1     0.92  0.0543       0.8196        1.000
       43     23       1     0.88  0.0650       0.7614        1.000
       44     22       1     0.84  0.0733       0.7079        0.997
       45     21       1     0.80  0.0800       0.6576        0.973
       47     20       1     0.76  0.0854       0.6097        0.947
       49     19       1     0.72  0.0898       0.5639        0.919
       54     18       1     0.68  0.0933       0.5197        0.890
       56     17       1     0.64  0.0960       0.4770        0.859
       58     16       1     0.60  0.0980       0.4357        0.826
       59     15       1     0.56  0.0993       0.3956        0.793
       60     14       1     0.52  0.0999       0.3568        0.758
       61     13       1     0.48  0.0999       0.3192        0.722
       62     12       1     0.44  0.0993       0.2827        0.685
       68     11       1     0.40  0.0980       0.2475        0.646
       71      4       1     0.30  0.1136       0.1428        0.630
       75      3       1     0.20  0.1114       0.0672        0.596
       89      2       1     0.10  0.0900       0.0171        0.584
       96      1       1     0.00     NaN           NA           NA

Most importantly
- there is a plot method.

    plot(fly.fit)

The graph includes the survival curve (either from a Kaplan-Meier
estimate or a Cox regression model) and confidence limits. The graph
displays a "+" at any censored value.

![](http://www.pmean.com/new-images/14/kaplan-meier01.png)

There's a lot more on survival models which I hope to cover in another
blog entry.

You can find an [earlier version][sim1] of this page on my [blog][sim2].

[sim1]: http://blog.pmean.com/kaplan-meier/
[sim2]: http://blog.pmean.clom

repository: pmean/build-website

repo_name: pmean/build-website


text:
# Google Cloud DNS Inbound Policy Addresses

This module allows discovering the addresses reserved in subnets when [DNS Inbound Policies](https://cloud.google.com/dns/docs/policies) are configured.

Since it's currently impossible to fetch those addresses using a GCP data source (see [this issue](https://github.com/hashicorp/terraform-provider-google/issues/3753) for more details), the workaround used here is to derive the authorization token from the Google provider, and do a direct HTTP call to the Compute API.

## Examples

```hcl
module "dns-policy-addresses" {
  source     = "./fabric/modules/__experimental/net-dns-policy-addresses"
  project_id = "myproject"
  regions    = ["europe-west1", "europe-west3"]
}
# tftest skip (uses data sources)
```

The output is a map with lists of addresses of type `DNS_RESOLVER` for each region specified in variables.

## Variables

| name | description | type | required | default |
|---|---|:---:|:---:|:---:|
| [project_id](variables.tf#L17) | Project id. | string | ✓ |  |
| [regions](variables.tf#L22) | Regions to fetch addresses from. | list(string) |  | ["europe-west1"] |

## Outputs

| name | description | sensitive |
|---|---|:---:|
| [addresses](outputs.tf#L24) | DNS inbound policy addresses per region. |  |

repository: juliocc/cloud-foundation-fabric

gha_language: HCL

repo_name: juliocc/cloud-foundation-fabric


text:
---
title: "Install Docker Compose"
date: 2019-09-24T00:20:25+08:00
tags: [docker, container, docker-compose]
draft: false
---

```
sudo yum install epel-release
sudo yum install -y python-pip
sudo pip install docker-compose
```
Further details in https://www.digitalocean.com/community/tutorials/how-to-install-and-use-docker-compose-on-centos-7

repository: icasimpan/quicktasks-docker

repo_name: icasimpan/quicktasks-docker


text:
# Automatically populate a team vacation calendar

Quickly see when your colleagues are out of the office, with no manual entry
required.

[Read more](https://developers.google.com/gsuite/solutions/vacation-calendar)

## Setup

<!-- [START setup] -->

First, set up Google Calendar:

1. Open [Google Calendar][calendar] in your browser.
1. [Create a new calendar][calendar_setup] called "Team Vacations".
1. Still in the settings screen, select the new calendar from the left menu.
1. Scroll to **Integrate calendar** and copy the value under **Calendar ID**.

Next, create the Apps Script project:

1. Open the [Apps Script project][project] in your browser.
1. Click the menu item **File > Make a copy...**.
1. Set the variable `TEAM_CALENDAR_ID` to the ID of the calendar you
   created earlier.
1. Set the variable `GROUP_EMAIL` to the email address of a Google Group
   containing your team members.

Then run the script:

1. Click the **Select function** dropdown and select **setup**.
1. Click the Run button (►).
1. When prompted, click the **Review permissions** button.
1. Select your G Suite account from the list.
1. Click the **Allow** button.

When complete, return to Google Calendar to see the Team Vacations calendar
populated with events. For a more detailed record of what the script did, you
can view the logs by clicking
**View > Stackdriver Logging** and then **Apps Script Dashboard**.

[project]: https://script.google.com/d/1Z00KFsXZSLMYw1Tsf7gXqxEt4LjTYtyrnc0EHel43sHs6dl8_z5mHze2/edit
[calendar]: https://calendar.google.com
[calendar_setup]: https://support.google.com/calendar/answer/37095

<!-- [END setup] -->

repository: hemanthkodandarama/solutions

repo_name: hemanthkodandarama/solutions


text:
---
layout:             post
title:              Training set and Test set
date:               2016-08-20 23:32:43 +0200
tags:               [Machine-Learning, R]
comments: true
img_url:     /images/20160820-header-img.jpg
img_width:   1280
img_height:  853
---

As I mentioned in my blog "[What is Machine Learning][blog-1]", Machine Learning
tasks are typically classified into three broad categories, one of them is
_Supervised learning_. In the supervised learning setting, it is important to
understand the concept of two sets: **Training set** and **Test set**, which are
useful to make good predictions about unseen observations.

When learning a predictive model, we should not use the complet dataset to train
a model, we only use so-called _training set_ for this; the other part of the
dataset is called _test set_, which can be used to evaluate performance of model.
It's really important to realise that training set and test set are disjoint sets,
they don't have any observation in common, this makes it's possible to test our
model on unseen data.

## Split the dataset

First, we need to split our dataset. Here I refer to [DataCamp][DataCamp]'s slide
to explain its theorem. Suppose that we have N observations, K features and
class labels for each observations y.

For the _training set_, we use the first r observations, then use the features
and the class label to train a model. For the _test set_, we use the observations
from r+1 until the end of the dataset, then use the features classified
observations and compare the prediction with the actual class y. The confusion
matrix that results gives us clear ideas of the actual predicted performance
of the classifier.

Then, how to choose _training set_ and _test set_? We should choose _training set_
which is **larger** than _test set_, and the ratio is typically _3/1_(arbitrary)
in the _training set_ over the _test set_. But make sure that your _test set_ is
NOT too small!

For example, you could use the following commands to shuffle a data frame df
and divide it into training and test sets with a 60/40 split between the two.

{% highlight r %}
n <- nrow(df)
shuffled_df <- df[sample(n), ]
train_indices <- 1:round(0.6 * n)
train <- shuffled_df[train_indices, ]
test_indices <- (round(0.6 * n) + 1):n
test <- shuffled_df[test_indices, ]
{% endhighlight %}

## Distribution of the sets

It's important that you choose wisely which elements you put in the _training
set_ and which ones you put in the _test set_. For _Classification_, the classes
inside the _training_ and _test_ set must have similar distributions, avoid a
class not being available in a set. For _Classification & Regression_, it's
always a smart idea to shuffle dataset before splitting.

## Effect of sampling

Finally, be aware of the effect that the sampling of data in a certain way to
compose the _test set_ can influence the performance measures on the set. In
order to add robustness to these measures, we can use **cross-validation**,
which means that we use a learning algorithm to train a model multiple times,
each time with different separations of _training_ and _test set_. _n-fold
cross-validation_ means the _test set_ is fold n times, each _test set_ is
_1/n_ size of total dataset.

For example, you will fold the dataset 6 times and calculate the accuracy
for each fold. The mean of these accuracies forms a more robust estimation
of the model's true accuracy of predicting unseen data, because it is less
dependent on the choice of training and test sets.

{% highlight r %}
# Initialize the accs vector
accs <- rep(0,6)

for (i in 1:6) {
  # These indices indicate the interval of the test set
   indices <- (((i-1) * round((1/6)*nrow(shuffled))) + 1)
                    :((i*round((1/6) * nrow(shuffled))))
  # Exclude them from the train set
  train <- shuffled[-indices,]

  # Include them in the test set
  test <- shuffled[indices,]

  # A model is learned using each training set
  tree <- rpart(Survived ~ ., train, method = "class")

  # Make a prediction on the test set using tree
  pred <- predict(tree, test, type = "class")

  # Assign the confusion matrix to conf
  conf <- table(test$Survived, pred)

  # Assign the accuracy of this model to the ith index in accs
  accs[i] <- sum(diag(conf))/sum(conf)
}
{% endhighlight %}

## Reference
- Kendal, "person holding amber glass bottles", _unsplash.com_. [Online]. Available: [https://unsplash.com/photos/L4iKccAChOc][img]

[blog-1]:https://jingwen-z.github.io/what-is-machine-learning
[DataCamp]:https://www.datacamp.com/home
[img]: https://unsplash.com/photos/L4iKccAChOc


text:
# Payment Gateway Cloud PrestaShop Extension

## Installation

1.
1. Click `Upload a module`.
1. Select the extension zip file.

or

1. Manually upload the source to `modules/paymentgatewaycloud`.
1.
1. Select category `Other`.
1. Click `Install` on the `Payment Gateway Cloud` item.

## Configuration

Either

1. Click on `Configure` right after installation

or

1.
1. Select or scroll down to category `Other`.
1. Click on `Configure` on the `Payment Gateway Cloud` item.

- On the `General` tab:
    1. Enter your API credentials.
    1. Enable the payment extension.
    1. Click on `Save`.
- On the `CreditCard` tab:
    1. Enter credentials for individual Credit Card options.
    1. Enable individual Credit Card options.
    1. Click on `Save`.

The active payment methods will be provided to your customers during checkout.

repository: ixopay/pgc-prestashop

repo_name: ixopay/pgc-prestashop


text:
# hummingbird
Hummingbird keyboard using Seeeduino XIAO controller

![Layout](https://github.com/PJE66/hummingbird/blob/main/Images/Base_Layout.png?raw=true)
![Image of PCB](https://github.com/PJE66/hummingbird/blob/main/Images/Hummingbird_Top.png)
![XIAO Module](https://images-na.ssl-images-amazon.com/images/I/61GjpRJ1X0L._AC_SL1400_.jpg)

The parts needed to build this keyboard are:
* PCBs made from Gerber files supplied - I used JLCPCB (https://jlcpcb.com), and the TH_XIAO zip file, which currently costs around $10 for five units plus shipping.
* Seeeduino XIAO modules (https://www.seeedstudio.com/Seeeduino-XIAO-Arduino-Microcontroller-SAMD21-Cortex-M0+-p-4426.html) which I purchase in packs of three from Amazon for $21.99 (https://www.amazon.com/Seeeduino-Smallest-Microcontroller-Interfaces-Compatible/dp/B08745JBRP)
* 30 Kailh Choc Switches, available in many types
* 30 Choc Keycaps
* 30 1N4148 SMD Diodes (Part number to come)
* 3D Printed Case
* USB-C Cable (with small USB-C end to fit between switches)

<Information on switch types and caps sources to come>

## JLCPCB Settings

THese are the settings I used to order the original PCBs:
  * Layers: 2
  * Dimensions: 100x204mm (automatically entered)
  * PCB Qty: 5 (or more)
  * Different Design: 1
  * Delivery Format: Single PCB
  * PCB Thickness: 1.6
  * PCB Color: Black
  * Surface Finish: LeadFree HASL-RoHS (ENIG-RoHS would be better but doubles cost)
  * Copper Weight: 1oz
  * Gold Fingers: No
  * MAterial Type: FR4-Standard Tg 130-140C
  * Confirm Production File: No
  * Flying Probe Test: Fully Test
  * Castellated Holes: No
  * Remove Order Number: No
  * 4-Wire Kelvin Test: No
  * Paper between PCBs: No

repository: racyon/hummingbird

branch_name: refs/heads/main

repo_name: racyon/hummingbird


text:
# Uromyces euryopsidicola A.R. Wood & M. Scholler, 2005 SPECIES

#### Status
ACCEPTED

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

#### Published in
Sydowia 57(1): 138 (2005)

#### Original name
Uromyces euryopsidicola A.R. Wood & M. Scholler, 2005

### Remarks
null

repository: mdoering/backbone

repo_name: mdoering/backbone


text:
# Performance Overview

When working with node.js there are a few things to keep in mind in regard to performance and the threading model.

## Threading

Node.js has a single threaded event-loop that can farm asynchronous calls off to a thread pool.

## Node.js is not good for CPU bound programming

Unless you are doing out of the ordinary, the code you write in a Node.js application will always run in the same thread with the exception of asynchronous calls.  This means you don't have to worry about things like locking.  However, this also means if you block in any portion of your code, this will prevent any other code from running.  In instances where an application is simply moving data from one source to another, such as a database through an API, this is not much of a concern.  For heavy analytical applications that need to do CPU processing, Node.js probably isn't the best environment.

## Node.js does simplify resource access (kind of)

Much of multi-threaded programming is dedicated to shared usage of resources.  Much work needs to be done to keep shared resources thread safe so that if multiple threads are accessing them, there are no unintended consequences.

## ALWAYS avoid synchronous code when an asynchronous pattern is available

A recent example of a situation where I ran into severe performance degradation was working through a large set of records where each record had a good chunk of data compressed.  The coder had written a block of code whereby a large set of records was to be decompressed all at once.  The code was using the zlib built-in library, but with synchronous calls to decompress the data.  The decompression itself was done within an async method.  The code had a collection of rows, and made a call to iterate through all the rows and wait for all the promises to complete.

What ended up happening was the asynchronous code made it as far as the decompression in each record.  Thus the Node.js process was attempting to decompress all the data for all the records in succession.  Since the Node.js can only handle one CPU task at a time in it's main event-loop, this caused the event loop to be filled up with requests to decompress.

As the event loop filled up, once the actual results came in, the continuation for the promise was pushed to the event loop to complete with the result of the decompression.  This caused memory to fill up with the decompressed data.  Since the completion of the original process over the rows of data involved several continuations, this led to degraded performance, and with enough rows eventually ended up crashing the Node.js process with an out of memory error.

Envision the event queue to have the following items to process.  Keep in mind decompress in this case was a process that took a very long time to process.  However, even if it wasn't this would have still been an issue.

* Decompress record 1
* Decompress record 2
* Decompress record 3
* Decompress record 4
* Decompress record 5
* Decompress record 6
* ....
* Up to N records

As it iterates through the list for a few records, this would become

* Decompress record 2
* Decompress record 3
* Decompress record 4
* Decompress record 5
* Decompress record 6
* ....
* Up to N records
* Process record 1 (with huge set of decompressed data )
* Process record 2 (with huge set of decompressed data )

Eventually it would be out of control, and Node.js couldn't keep up
* Decompress record 50
* ....
* Up to N records
* Process record 1 (with huge set of decompressed data )
* Process record 2 (with huge set of decompressed data )
* Process record 3 (with huge set of decompressed data )
...
* Process record 49 (with huge set of decompressed data )

And finally, the queue is gone, because the application crashed due to being out of memory. Not good.

The problem was resolved in a few ways.
1. Always use asynchronous operations when possible.  The only way to multi-thread in Node.js is to try farm operations off with asynchronous calls.  This is especially true of calls that are bound to some resource like I/O or CPU.
2. Results from the database should always either have a limit in processing, or an implementation such as the Bluebird APIs for arrays of Promises should be used.  Another option is streaming, but only if it limits the number of items being concurrently executed.

repository: jerhon/developer-notes

gha_language: C#

repo_name: jerhon/developer-notes


text:
Live Site!
https://warm-badlands-61966.herokuapp.com

# Fitness-Tracker
  [![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/MohamedAhmed24/Fitness-Tracker)

  # Description
  An app that helps you track your workouts

  # Table of Contents

  * [Installation](#installation)
  * [Usage](#usage)
  * [License](#license)

  * [Contributing](#contributing)
  * [Tests](#tests)

  * [Questions](#questions)

  # Installation

  The following necessary dependencies must be installed to run the application properly: mongoose, express, morgan
  # Usage

  This application is used for Tracking Workouts
  # License

  This project is license under the MIT license.
  # Contributing

  Contributors:
  # Tests

  To run tests, you need to run the following command: node server

  # Questions
  If you have any questions about contact github.com/MohamedAhmed24 or mohamed.ahmed1357@yahoo.com.


text:
![image](./media/logo.png)

# Blocky

**Wanna read something and don't want to be interrupted?**

**Have got a terminal session open and just want to watch it?**

This is an example project to show how to use the `Tray` module and prevent your machine to go into screensaver or sleep mode.

Blocky will put itself inside of your menu bar and give you an easy way to not interupt you by going into sleep or screensave mode.

### MacOS

![image](./media/screenshot_macos.jpg)

### Windows

-

## Installation

Download the installer listed on the [releases](https://github.com/stefanjudis/blocky/releases) page and simply install it.

repository: stefanjudis/blocky

repo_name: stefanjudis/blocky


text:
![Bareflank](https://github.com/Bareflank/bsl/raw/master/.github/images/bsl_logo.png)

## **Description**
The Bareflank Support Library (BSL) is a Rust 2018 and C++20, "constexpr everything", AUTOSAR compliant header-only library intended to support the development of critical systems applications. Although the BSL does not adhere to the Rust and C++ Standard Library specifications, it attempts to where possible, to ensure most of the APIs are as familiar as possible. Since a number of critical systems applications do not support dynamic memory or exceptions, the BSL uses neither, but is capable of supporting both if desired. Since AUTOSAR only supports C++, the Rust code was written with the same AUTOSAR rules where applicable.

With respect to testing, the BSL provides full unit testing with 100% code coverage. Futhermore, the C++ portion of the BSL is written entirely as a "constexpr", meaning APIs are unit tested both at compile-time and run-time. This allows us to ensure that the compiler's rules for constexpr and undefined behavior are leveraged to prove most of the C++ code does not invoke UB at runtime.

## **Quick start**
![GitHub release (latest by date)](https://img.shields.io/github/v/release/bareflank/bsl?color=brightgreen)

Get the latest version of the BSL from GitHub:

``` bash
git clone https://github.com/bareflank/bsl
mkdir bsl/build && cd bsl/build
cmake -GNinja -DCMAKE_CXX_COMPILER="clang++" ..
ninja
```

Enjoy:

``` c++
#include <bsl/arguments.hpp>
#include <bsl/array.hpp>
#include <bsl/convert.hpp>
#include <bsl/cstr_type.hpp>
#include <bsl/debug.hpp>
#include <bsl/exit_code.hpp>
#include <bsl/safe_idx.hpp>
#include <bsl/safe_integral.hpp>
#include <bsl/unlikely.hpp>

[[nodiscard]] auto
main(bsl::int32 const argc, bsl::cstr_type const *const argv) noexcept
    -> bsl::exit_code
{
    constexpr auto num_expected_args{2_umx};
    bsl::arguments const args{argc, argv};

    if (args.size() < num_expected_args) {
        bsl::error() << "Invalid number of args" << bsl::endl << bsl::here();
        return bsl::exit_failure;
    }

    constexpr auto index_of_arg{1_umx};
    auto const val{args.at<bsl::safe_i32>(index_of_arg)};

    if (bsl::unlikely(val.is_invalid())) {
        bsl::error() << "Invalid arg" << bsl::endl << bsl::here();
        return bsl::exit_failure;
    }

    constexpr auto size_of_arr{42_umx};
    bsl::array<bsl::safe_i32, size_of_arr.get()> mut_arr{};

    for (auto &mut_elem : mut_arr) {
        mut_elem = val;
    }

    for (bsl::safe_idx mut_i{}; mut_i < mut_arr.size(); ++mut_i) {
        bsl::print() << "elem["
                     << mut_i
                     << "] == "
                     << bsl::fmt{"#010x", *mut_arr.at_if(mut_i)}
                     << bsl::endl;
    }

    return bsl::exit_success;
}
```

## Interested In Working For AIS?
  Check out our [Can You Hack It?®](https://www.canyouhackit.com) challenge
  and test your skills! Submit your score to show us what you’ve got. We have
  offices across the country and offer  competitive pay and outstanding
  benefits. Join a team that is not only committed to the future of cyberspace,
  but to our employee’s success as well.

## **Build Requirements**
Currently, the BSL only supports the Clang/LLVM 11+ compiler. This, however, ensures the BSL can be natively compiled on Windows including support for cross-compiling. Support for other C++20 compilers can be added if needed, just let us know if that is something you need.

### **Windows**
To compile the BSL on Windows, you must first install the following:
- [Visual Studio](https://visualstudio.microsoft.com/thank-you-downloading-visual-studio/?sku=Community&rel=16) (Enable "Desktop development with C++")
- [LLVM 10+](https://github.com/llvm/llvm-project/releases)
- [CMake 3.13+](https://cmake.org/download/)
- [Ninja](https://github.com/ninja-build/ninja/releases)

Visual Studio is needed as it contains Windows specific libraries that are needed during compilation. Instead of using the Clang/LLVM project that natively ships with Visual Studio, we use the standard Clang/LLVM binaries provided by the LLVM project which ensures we get all of the tools including LLD, Clang Tidy and Clang Format. Also note that you must put Ninja somewhere in your path (we usually drop into CMake's bin folder).

To compile the BSL, use the following:
``` bash
git clone https://github.com/bareflank/bsl
mkdir bsl/build && cd bsl/build
cmake -GNinja -DCMAKE_CXX_COMPILER="clang++" -DBUILD_EXAMPLES=ON -DBUILD_TESTS=ON ..
ninja info
ninja
```

### **Ubuntu Linux**
To compile the BSL on Ubuntu (20.04 or higher) you must first install the following dependencies:
```bash
sudo apt-get install -y clang cmake
```

To compile the BSL, use the following:
``` bash
git clone https://github.com/bareflank/bsl
mkdir bsl/build && cd bsl/build
cmake -DCMAKE_CXX_COMPILER="clang++" -DBUILD_EXAMPLES=ON -DBUILD_TESTS=ON ..
make info
make
```

### **Why 'constexpr everything'**
The BSL implements everything as a "constexpr". Beyond the usual reasons for compile-time code, the BSL enables unit tests to be executed at compile-time. Although C++20 added an enormous amount of additional support for "constexpr", there are a number of things that are still not allowed in a "constexpr", and this is a good thing, especially if critical systems compliance is important to your use case. This includes:
- No support for Undefined Behavior (UB)
- No support for casts from a void* to something else, or any other attempts to change an object's type without proper lifetime management.
- No support for memory leaks and any other memory related issues like out-of-bounds array accesses, etc.
- No support for reinterpret_cast, goto, etc.
- No support for the use of uninitialized variables
- No support for global or static local variables
- And much more

In other words, the constexpr validation checker in the compiler is in a way, the ultimate dynamic analysis tool. Tools like ASAN, UBSAN and Clang-Tidy are helpful, and should still be used, but if you ensure 100% code coverage at compile-time, most of the hard to find bugs related to undefined behavior will be eliminated. To perform compile-time unit testing, consider the following test:

``` c++
[[nodiscard]] constexpr auto
tests() noexcept -> bsl::exit_code
{
    bsl::ut_scenario{"verify += adds correctly"} = []() noexcept {
        bsl::ut_given{} = []() noexcept {
            constexpr auto data1{42_umx};
            bsl::safe_umx data2{};
            bsl::ut_when{} = [&]() noexcept {
                data2 += data1;
                bsl::ut_then{} = [&]() noexcept {
                    bsl::ut_check(data2.checked() == data1);
                };
            };
        };
    };

    return bsl::ut_success();
}
```

To execute this test at compile-time, simply do the following:

``` c++
[[nodiscard]] auto
main() noexcept -> bsl::exit_code
{
    static_assert(tests() == bsl::ut_success());
    return tests();
}
```

Using this pattern, all unit tests will be executed at both compile-time and at runtime, allowing you to use things like code coverage tools to ensure complete coverage of your unit tests.

If you think this is impossible in any real-world example, take a look at the [Bareflank Hypervisor](https://github.com/Bareflank/hypervisor). This is not a simple "Hello World" application, but instead is a hypervisor microkernel, complete with paging, ASM logic, etc. With a couple small exceptions (like virtual address to physical address conversions), all of the C++ code in this repro is tested at compile-time with 100% code coverage including branch coverage.

## **AUTOSAR Compliance**
The BSL is mostly compliant with AUTOSAR, and in a lot of ways far exceeds the AUTOSAR rules. This means the BSL is one of the few, if not the only partial C++ libraries in open source that is AUTOSAR compliant. There are some rules that are not adhered to:
- The BSL uses C++20. Without C++20, constexpr unit testing would not be possible. AUTOSAR requires the use of C++14. The advantages of "constexpr everything" for safety far out-weight the disadvantages of needing an exception to this rule. To ensure as much compliance as possible, the BSL avoids most of the new features added with C++17 and C++20  and will wait until a new AUTOSAR/MISRA specification is available to provide proper guidance.
- Since C++14 is not used, issues with things like `auto i{};` are fixed and therefor allowed. Two's compliment as well. This does not mean that all uses of `auto` are allowed as a number of rules still exist around `auto` that have nothing to do with the ambiguity issues with `auto i{};` in C++14.
- Some user-defined literals are provided for initializing fixed-width integrals. How this is done to ensure there are no issues with initializing variables can be found in the [convert.hpp](https://github.com/Bareflank/bsl/blob/master/include/bsl/convert.hpp#L900) header file, but the short story is, it is absolutely possible to create safe user-defined literals if raw literals are used (instead of their cooked counterparts). Raw literals require the code to manually parse the literal's tokens and thanks to C++20's extensive support for constexpr, this is all possible at compile-time.
- In some rare situations the BSL does not use an explicit single argument constructor to ensure compatibility with the C++ standard library where it makes sense. In these cases, a deleted single argument template function is provided which ensures that implicit conversions are still not possible, mitigating this issue. In fact, implicit conversions of any kind are not allowed by our custom version of the Clang-Tidy static analysis engine, including implicit conversions of integral types.
- There are some rules that simply cannot be adhered to when implementing the C++ standard library features. For example, the BSL must perform pointer arithmetic using the subscript operator when implementing bsl::array. It must also include some non-C++ headers like stdint.h to implement cstdint.hpp as required by the spec.
- C++ exceptions are not used by the BSL, but they are supported (meaning you can use C++ exceptions with the BSL if you choose). This is due to the fact that a lot of embedded, IoT and kernel/hypervisor applications for the BSL cannot support C++ exceptions due to the need for an unwinder, which is only really provided for Windows, Linux and macOS.

## **Resources**
[![Join the chat](https://img.shields.io/badge/chat-on%20Slack-brightgreen.svg)](https://bareflank.herokuapp.com/)

The Bareflank Support Library provides a ton of useful resources to learn how to use the library including:
-   **Examples**: <https://github.com/Bareflank/bsl/tree/master/examples>
-   **Unit Tests**: <https://github.com/Bareflank/bsl/tree/master/tests>

If you have any questions, bugs, or feature requests, please feel free to ask on any of the following:
-   **Slack**: <https://bareflank.herokuapp.com/>
-   **Issue Tracker**: <https://github.com/Bareflank/bsl/issues>

If you would like to help:
-   **Pull Requests**: <https://github.com/Bareflank/bsl/pulls>
-   **Contributing Guidelines**: <https://github.com/Bareflank/bsl/blob/master/contributing.md>

## **Testing**
[![Build Status](https://img.shields.io/endpoint.svg?url=https%3A%2F%2Factions-badge.atrox.dev%2Fbareflank%2Fbsl%2Fbadge&style=flat)](https://actions-badge.atrox.dev/bareflank/bsl/goto)
[![codecov](https://codecov.io/gh/Bareflank/bsl/branch/master/graph/badge.svg)](https://codecov.io/gh/Bareflank/bsl)

The Bareflank Support Library leverages the following tools to ensure the highest possible code quality. Each pull request undergoes the following rigorous testing and review:
-   **Static Analysis:** [Clang Tidy](https://github.com/Bareflank/llvm-project)
-   **Dynamic Analysis:** Google's ASAN and UBSAN
-   **Code Coverage:** Code Coverage with CodeCov
-   **Coding Standards**: [AUTOSAR C++14](https://www.autosar.org/fileadmin/user_upload/standards/adaptive/17-03/AUTOSAR_RS_CPP14Guidelines.pdf) and [C++ Core Guidelines](https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGuidelines.md)
-   **Style**: Clang Format
-   **Documentation**: Doxygen

repository: Bareflank/bsl

gha_license_id: NOASSERTION

repo_name: Bareflank/bsl


text:
---
layout: post
title: "Deep Perceptual Compression"
date: 2019-07-18 22:17:52
categories: arXiv_CV
tags: arXiv_CV Detection
author: Yash Patel, Srikar Appalaraju, R. Manmatha
mathjax: true
---

* content
{:toc}

##### Abstract
Several deep learned lossy compression techniques have been proposed in the recent literature. Most of these are optimized by using either MS-SSIM (multi-scale structural similarity) or MSE (mean squared error) as a loss function. Unfortunately, neither of these correlate well with human perception and this is clearly visible from the resulting compressed images. In several cases, the MS-SSIM for deep learned techniques is higher than say a conventional, non-deep learned codec such as JPEG-2000 or BPG. However, the images produced by these deep learned techniques are in many cases clearly worse to human eyes than those produced by JPEG-2000 or BPG.
 We propose the use of an alternative, deep perceptual metric, which has been shown to align better with human perceptual similarity. We then propose Deep Perceptual Compression (DPC) which makes use of an encoder-decoder based image compression model to jointly optimize on the deep perceptual metric and MS-SSIM. Via extensive human evaluations, we show that the proposed method generates visually better results than previous learning based compression methods and JPEG-2000, and is comparable to BPG. Furthermore, we demonstrate that for tasks like object-detection, images compressed with DPC give better accuracy.

##### Abstract (translated by Google)

##### URL
[http://arxiv.org/abs/1907.08310](http://arxiv.org/abs/1907.08310)

##### PDF
[http://arxiv.org/pdf/1907.08310](http://arxiv.org/pdf/1907.08310)