text:
---
layout: post
title: "Differentiable Architecture Search with Ensemble Gumbel-Softmax"
date: 2019-05-06 01:47:17
categories: arXiv_CV
tags: arXiv_CV NAS
author: Jianlong Chang, Xinbang Zhang, Yiwen Guo, Gaofeng Meng, Shiming Xiang, Chunhong Pan
mathjax: true
---

* content
{:toc}

##### Abstract
For network architecture search (NAS), it is crucial but challenging to simultaneously guarantee both effectiveness and efficiency. Towards achieving this goal, we develop a differentiable NAS solution, where the search space includes arbitrary feed-forward network consisting of the predefined number of connections. Benefiting from a proposed ensemble Gumbel-Softmax estimator, our method optimizes both the architecture of a deep network and its parameters in the same round of backward propagation, yielding an end-to-end mechanism of searching network architectures. Extensive experiments on a variety of popular datasets strongly evidence that our method is capable of discovering high-performance architectures, while guaranteeing the requisite efficiency during searching.

##### Abstract (translated by Google)

##### URL
[https://arxiv.org/abs/1905.01786](https://arxiv.org/abs/1905.01786)

##### PDF
[https://arxiv.org/pdf/1905.01786](https://arxiv.org/pdf/1905.01786)


text:
# The `tal:on-error` attribute

The `tal:on-error` attribute is how TAL rendering errors are dealt-with in ZPT document templates.
Developers could think of the on-error attribute as behaving a little like a `try/catch`, available in many programming languages.

The value of a `tal:on-error` attribute is a single TALES expression.

## The on-error attribute has no effect without an error

The presence of a `tal:on-error` attribute does not affect the document or rendering process at all unless an error occurs.

## The scope of an on-error attribute matches the DOM

A `tal:on-error` attribute deals with errors which are caused by _the DOM element on which the attribute is declared, or upon any descendent element_.
Looking at this behaviour from the opposite direction, if/when a TAL rendering error occurs, that error is handled by an on-error attribute from _the closest ancestor_ element, including the element upon which the error occurs.

## When handling an error, `tal:on-error` behaves like `tal:content`

When an error occurs whilst rendering, and the error is handled by a `tal:on-error` attribute, that on-error attribute behaves in the same way as if it were [a `tal:content` attribute].
That is - the contents & descendents of the `tal:on-error` attribute are replaced with the value of the expression.
Be aware that _this can result in the removal & replacement of elements which have been successfully processed without error_, if the on-error attribute is removed from the element which raised the error (following the structure of the DOM).

Inside of the expression for a `tal:on-error` attribute, you may use [the `error` root context] to get a reference to the error/exception object which is being handled.

[the `error` root context]: ../Tales/GlobalContexts.md#error
[a `tal:content` attribute]: ContentAndReplace.md

## Error scenarios

One of the most common error scenarios is an attempt to use a model value which does not exist, such as via [a TALES path expression] which cannot be traversed.
This is not always a coding fault either, because the presence/absence of a value could depend upon the current state of the application.
The `tal:on-error` attribute allows designers to provide _fallback content_ rather than having the whole page-rendering process fail.

[a TALES path expression]: ../Tales/PathExpressions.md

## Unhandled errors

If a TAL rendering error occurs and there is no `tal:on-error` attribute on either the same element or any ancestor of the element which caused the error, then the error will be unhandled.
In this case, the entire rendering operation will fail.
In [an MVC view engine], this could result in the user seeing an error page, and [in the ZptSharp API] this will result in the raising of an exception from the rendering process.

[an MVC view engine]: ../../ViewEngines.md
[in the ZptSharp API]: ../../../api/index.md

## Example

This example shows a usage of a `tal:on-error` attribute.
For this example, presume that the path expression `here/nonexistent` cannot be traversed; the model contains no value named `nonexistent`.
Instead of causing a rendering error that halts the whole process with an error, this example will display an error message instead.

```html
<p tal:on-error="string:There was a problem determining your login status.">
    You are logged in as
    <span class="username" tal:content="here/nonexistent">joebloggs</span>.
</p>
```

We expect an error to be raised when processing the `tal:content` attribute on the `<span>` element.
The final output result will look like this:

```html
<p>There was a problem determining your login status.</p>
```

license: MIT

repository: csf-dev/ZPT-Sharp

branch_name: refs/heads/master

extension: md

gha_language: C#

gha_license_id: MIT

license_type: permissive

repo_name: csf-dev/ZPT-Sharp


text:
# Lichen scriptus L. SPECIES

#### Status
SYNONYM

#### According to
Index Fungorum

#### Published in
Sp. pl. 2: 1140 (1755)

#### Original name
Lichen scriptus L.

### Remarks
null

repository: mdoering/backbone

path: /life/Fungi/Ascomycota/Lecanoromycetes/Ostropales/Graphidaceae/Graphis/Graphis scripta/ Syn. Lichen scriptus/README.md

repo_name: mdoering/backbone


text:
---
layout: default
---

# 1996-08-13 - Re: [NOISE] Newspapers and basic science (was: US Power Outages)

## Header Data

From: "Z.B."<EMAIL_ADDRESS>To: Ian Goldberg<EMAIL_ADDRESS>Message Hash: aebe9003c0394bce600acd60ecc15d6d3020d8db27ac24e781732d37d24bc0bf

Message ID: \<Pine.3.89.9608121627.A22335-0100000@netcom11\>

Reply To<EMAIL_ADDRESS>UTC Datetime: 1996-08-13 03:11:49 UTC

Raw Date: Tue, 13 Aug 1996 11:11:49 +0800

## Raw message

```
{% raw  %}From: "Z.B."<EMAIL_ADDRESS>Date: Tue, 13 Aug 1996 11:11:49 +0800
To: Ian Goldberg<EMAIL_ADDRESS>Subject: Re: [NOISE] Newspapers and basic science (was: US Power Outages)
In-Reply-To<EMAIL_ADDRESS>Message-ID: <Pine.3.89.9608121627.A22335-0100000@netcom11>
MIME-Version: 1.0
Content-Type: text/plain

Well, all I remember is the 3-1/2 Seattles part - I put the"for a day"
part in because I wasn't sure about it.

Zach Babayco

<EMAIL_ADDRESS><----- finger for PGP public key
http://www.geocities.com/SiliconValley/Park/4127

On 12 Aug 1996, Ian Goldberg wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
>
> <GRUMBLE>
> Watts are a measure of energy per unit time; it makes sense to say
> "60 W powers a light bulb", not "60 W powers a light bulb for one hour".
> </GRUMBLE>
>
> But my _favourite_ example of this was a newspaper clipping I used to have
> that said that in the previous month, the city had received "160 square
> pounds of rain".   That just defied common sense.
>

{% endraw %}
```

## Thread

+ Return to [August 1996](/archive/1996/08)

+ Return to<EMAIL_ADDRESS>(Ian Goldberg)](/authors/iang_at_cs_berkeley_edu_ian_goldberg_)"
+ Return to<EMAIL_ADDRESS>(Lucky Green)](/authors/shamrock_at_netcom_com_lucky_green_)"
+ Return to "["Z.B." <zachb@netcom.com>](/authors/z_b__zachb_at_netcom_com_)"

+ 1996-08-12 (Mon, 12 Aug 1996 13:53:37 +0800) - [Re: US Power Outages](/archive/1996/08/95850cc5ce3300773037f51756bd15b502d8158394aab67febb87d60936a790f) -<EMAIL_ADDRESS>(Lucky Green)_
  + 1996-08-12 (Mon, 12 Aug 1996 16:19:25 +0800) - [Re: US Power Outages](/archive/1996/08/dd76a9f9ffc0c61cb2776a3f6fb2d31c46c5d0f4320bbca3e175581e8a44c396) - _"Z.B."<EMAIL_ADDRESS>  + 1996-08-13 (Tue, 13 Aug 1996 09:19:55 +0800) - [[NOISE] Newspapers and basic science (was: US Power Outages)](/archive/1996/08/5575d3fd7dc81655aa2b7c294ad4bb1fb5b45b9c7a0e4e258482f980944a5113) -<EMAIL_ADDRESS>(Ian Goldberg)_
    + 1996-08-13 (Tue, 13 Aug 1996 11:11:49 +0800) - Re: [NOISE] Newspapers and basic science (was: US Power Outages) - _"Z.B."<EMAIL_ADDRESS>


text:
# ❄ Handy snippets for working with the [`freezed`](https://github.com/rrousselGit/freezed) library.

By far the most useful are `fdataclass` and `funioncase`.

If you're reading this, and you're not me, and you'd like a better readme: send me a message. I only created this repository to make migrating my vscode snippets to vim easier.

Want to paste the snippets into your vscode user snippets file directly? Get the gist: https://gist.github.com/AlexMeuer/3a248636e58032f86e23d2e10ed81e8b

repository: AlexMeuer/dart-freezed-snippets

repo_name: AlexMeuer/dart-freezed-snippets


text:
# Chapter 5 : Strings

<dialog character="mechanics">Red alert captain! When you powered the ship, the engines exploded... Seems like someone sabotaged the igniter! We should find out later. For now, you need to replace the damaged part.</dialog>

Strings are defined using the built-in string type as follows:

```
let a: string = "Hello Captain Rogers";
```

## Concatenating Strings

Strings can be concatenated using the _++_ operator.

```
let name: string = "Captain Rogers";
let greeting: string = "Hello";
let full_greeting: string = greeting ++ " " ++ name;
```

## Slicing Strings

Strings can be sliced using a built-in function _String.sub_ which takes three parameters:
- an _offset_ describing the index of first character that will be copied
- the _length_ describing the number of characters that will be copied (starting from the given offset)
- the _string_ being sliced

The function _String.sub_ can be used as follows:

```
let name: string = "Captain Rogers";
let slice: string = String.sub(0n, 1n, name);
```

⚠ Notice that the offset and length of the sub function are natural numbers.

## Length of Strings

The length of a string can be found using a built-in function _String.length_ as follows:

```
let name: string = "Captain Rogers";
let length: nat = String.length(name); // length = 14
```

## Your mission

<!-- prettier-ignore -->1 - Reassign *my\_ship* by modifying the engine attribute (third number) from 0 to 1. Use substrings for the attributes before and after to make sure they are untouched.

repository: octo-technology/tezos-academy

gha_language: TypeScript

repo_name: octo-technology/tezos-academy


text:
# DPG - Instances module

This module creates the ec2 instances used by the playgrounds

``` HCL
  depends_on         = [module.network]
  profile            = aws_iam_instance_profile.jenkins_profile.name
  PlaygroundName     = "${var.PlaygroundName}Jenkins"
  instance_type      = "t2.medium"
  security_group_ids = [module.network.allow_all_security_group_id]
  subnet_id          = module.network.public_subnets.0
  user_data          = file("install-jenkins.sh")

```

This will create a instance and run the "install-jenkins.sh" file on the instance

#### Inputs

| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| PlaygroundName | The name of the playground for tagging | `string` | n/a | yes |
| security_group_ids | An array of security groups for the instance | `list(string)` | n/a | yes |
| subnet_id | The id of the subnet | `string` | n/a | yes |
| amiName | The name of the ami to run on the instance | `string` | `"amzn2-ami-hvm*"` | no |
| amiOwner | The Owner of the ami to run on the instance | `string` | `"amazon"` | no |
| associate_public_ip_address | Should aws give the instance a public ip | `bool` | `true` | no |
| instance_count | The amount of instances to create | `number` | `1` | no |
| instance_type | The type of instance | `string` | `"t2.micro"` | no |
| profile | The Role of the instance to take | `string` | `null` | no |
| purpose | A tag to give each resource | `string` | `"Playground"` | no |
| user_data | Custom user data to run on first start | `string` | `""` | no |

#### Outputs

| Name | Description |
|------|-------------|
| public_ips | The public ips of the workstation |

repository: JoeJacques/mtls-emojivoto-tf

branch_name: refs/heads/main

repo_name: JoeJacques/mtls-emojivoto-tf


text:
# Snippy

Learning NextJs and NestJS by making a Github Gists clone

### Features
- Create, Update, Delete Gists
- List of all public gists
- List gists per user
- Gists can be private
- Multiple files per gist
- Allow users to comment to a gist
- Download gist files as zip
- Can search for gists via snippets or filenames
- User Authentication through httpOnly cookie
- Synthax highlighting (supported programming languages)
- Rating gists (Stars)

## Software versions used
- Postgres 13.3
- NodeJS 16.5.0
- Redis 6.2.4

## Tech stack
- NextJs
- NestJs
- Postgres
- Redis
- Caddy
- Docker
- Docker Compose

## Start the application

#### Create .env in backend directory

```
DATABASE_URL="POSTGRES_DATABASE_URL"
CHECKPOINT_DISABLE=1 # If you want to disable Prisma telemetry
DEBUG="prisma:client,prisma:engine" # Set Prisma debugging property

APP_SECRET=something # Needed for cookie config
APP_PORT=4000 # Override default port

REDIS_URI=redis://localhost # Your redis url
```

#### Create .env in frontend directory

```
NEXT_TELEMETRY_DISABLED=1 # If you want to disable NextJs telemetry
NEXT_PUBLIC_API_URL=your-backend-api-url # This will be used as baseUrl of Axios
```

_Replace env values to your liking_

#### To run the app locally
Before starting any app, do the following
```
✔ snippy (main) ✗ cd backend/
✔ backend (main) ✗ npx prisma migrate dev --preview-feature
```

Set NextJS base url
```
NEXT_PUBLIC_API_URL=localhost:4000
```

To start backend
```
✔ snippy (main) ✗ cd backend/
✔ backend (main) ✗ yarn start:dev
```

To start frontend
```
✔ snippy (main) ✗ cd frontend/
✔ frontend (main) ✗ yarn dev
```

#### Using docker-compose to deploy the app

```
✔ snippy (main) docker-compose build
✔ snippy (main) docker-compose up -d
```

Execute the command to stop the app
```
✔ snippy (main) docker-compose down
```

### TODO
- [ ] Fix reverse proxy issue during deployment
- [ ] Add pagination


text:
![Screenshot of the server management window, controller configuration window, and client browser.](/screenshot.png?raw=true)

# Browser Remote
Browser remote is a remote control for a computer's keyboard. It works with any browser on phones, tablets, laptops, or other devices that support WebSockets. The server runs on any OS with Java installed. Browser Remote is a self-contained HTTP and WebSocket server that can work over the internet or just the local network.

## Building
Run `make` in the project's root directory to build `browser-remote.jar`. All resources (.cfg files, html, images) are packaged into `browser-remote.jar`, so it only requires the `libs` folder in the same directory to run. To replace a resource after building, put the modified file in the same relative location and `browser-remote.jar` will load it first before looking inside of the jar archive.

## License
This software is released by Chad Price under a Modified BSD license.

Included Binary Libraries:
* [NanoHTTPD](https://github.com/NanoHttpd/nanohttpd), released under a Modified BSD license
* [Java-WebSocket](https://github.com/TooTallNate/Java-WebSocket), released under an MIT license

repository: chadsprice/browser-remote

repo_name: chadsprice/browser-remote


text:
Let's [get started](getting-started.md)!

!!! warning
    This documentation is still a work in progress, but you can find a significant amount of
    information!

[st3]: http://sublimetext.com/

repository: evandroforks/FileManager

gha_language: Python

repo_name: evandroforks/FileManager


text:
# Puppet Node Manifests

This directory contains the manifests for the puppet site and all the nodes under puppet management control.

## Contents

This directory will contain:

* This `README.md` file.
* A manifest ([site.pp]) for the whole Puppet site.
* A collection of puppet node manifest files.

This directory may contain:

* A default manifest ([default.pp]), though this is not included in the initial Dynaguppy Framework.

## Node Manifests

The node manifest files should be named using the fully qualified domain name (FQDN) as resolved by facter on the node being managed and each file should hold the manifest for a single node. However some deployments may use puppet node naming features that may vary this recommendation, such as grouping similar nodes into a single manifest by name or with regular expressions, or by issuing a Puppet back end certificate with a name that does not match a nodes FQDN (e.g. for aliasing purposes such as when a node's internal hostname does not match it's public hostname, which is common in load balancing configurations).

The use of subdirectories to organise node groupings can implemented by using `import` statements in the `site.pp` manifest, though this is not recommended as the `import` statement is being depreciated for the Puppet future parser.

## Roles

The Dynaguppy Framework is uses roles and profiles as described in the [presentation and examples](https://github.com/hunner/roles_and_profiles) by [Hunter Haugen](https://github.com/hunner) at [PuppetConf 2013](http://puppetconf.com/), which is in turn was based on a [similar presentation](http://www.slideshare.net/PuppetLabs/roles-talk) given by Craig Dunn at [Puppet Camp Stockholm 2013](http://puppetlabs.com/community/puppet-camp#previous).

Each node manifest should be short and contain only classes and resources that manage low level system requirements or defaults. The main functionality of the node should be implemented using a role defined in the [role module](modules/role). This separation makes it clear that the resources managed in the base node manifest are low level and not the role that if fulfils. These definitions should either be specific to the system, platform, or hardware the node is running on (e.g. network settings, or vmware tools setup), or generic defaults applied across all nodes in the site (e.g. a default ntp configuration).

repository: Aethylred/dynaguppy

repo_name: Aethylred/dynaguppy


text:
# commons

These are my very own tools for Go that I use regularly for most of my little command line tools.

You don't need that.

 Logging is established.

###Debugging info
...

#### Flags
  -logcolour
    	Use coloured logging (switch off when redirecting log output). (default true)
  -logfile string
    	Sets the name of the logfile. Uses STDOUT if empty.
  -loglevel string
    	Determines logging verbosity. [All|Info|Debug|Warn|Error|Fatal|Off]. (default "Warn")
  -version
    	Show version info.

repository: wlbr/commons

repo_name: wlbr/commons


text:
# Vagrant/Ansible Example

## Running a local (vagrant) environment

### One-time pre-requisites

You'll need to install:

* git (maybe with a GUI such as [SourceTree](https://www.sourcetreeapp.com))
* Vagrant (http://vagrantup.com)
* VirtualBox (http://www.virtualbox.org) or Parallels (http://www.parallels.com)

### Host name resolution

The vagrant virtual machine needs an IP address that does not conflict with any
other virtual machines you have running. Adding an IP address to your /etc/hosts
file serves both to configure this IP address and resolves a convenient hostname
when browsing the server.

Add an entry to your /etc/hosts file that is in the valid host-only range for
your virtual machine hypervisor and does not conflict with any other virtual
machines you have running. Assuming you haven't changed any of your default
networking setup, then one of the following should work for you:

For VirtualBox:

    <IP_ADDRESS>     local.example.com

For Parallels:

    <IP_ADDRESS>    local.example.com

### Running the application

1. Check out source code (you must have a git account and valid SSH key):

    ```
    $ git clone https://github.com/kwaaioak/vagrant-ansible.git
    ```

2. Start the Virtual Machine

    ```
    $ cd vagrant-ansible
    $ vagrant up
    ```

3. Once running, the server can be reached at local.example.com

repository: kwaaioak/vagrant-ansible

repo_name: kwaaioak/vagrant-ansible


text:
---
title: "Download Ghost (2019) Hindi Movie HDRip 480p [400MB] || 720p [1.2GB] || 1080p [2GB]"
date: "2020-04-01"
---

Download Ghost (2019) Hindi Movie in [1080p](https://1moviesflix.com/1080p-movies/), [**720p**](https://1moviesflix.com/720p-movies/) and **[480p](https://1moviesflix.com/480p-movies/)**. This is a Bollywood Hindi movie and available in 480p, 720p & 1080p quality. This is a **Horror** and **Thriller** based movie. This movie is released in **2019** in the Hindi language**.** Click on the Download button below to download this movie. This is the Latest **HDRip Print** with **Hindi audio**.

**TheMoviesFlix.in** is one of the Best Websites/Platform For Bollywood and Indian Movies and Series. We also provide south movies like Tamil, Telugu and Malayalam movies, and also Bengali, Punjabi, and other local movies. We Provide Direct Fast Google Drive Download Links For Secure Downloading. Just Click On Download Button And Follow Steps To Download And Watch Movies Online For Free.

[![](https://m.media-amazon.com/images/M/MV5BNDNhMGUwMzMtYTNkMi00ZjUxLWIwYzQtNzA2MjkzNmJkNzQxXkEyXkFqcGdeQXVyODE5NzE3OTE@._V1_SX300.jpg)](https://www.imdb.com/title/tt9378950/ "Ghost")

Ghost (2019)

5.2**Rating:** 5.2 / 10 from 1,238 users**Metascore:** N/A

The story of the film follows Karan Khanna, a politician of Indian origin in the United Kingdom, who is accused of killing his wife. He tells his lawyer that a spirit committed the murder and should be tried.

### Download Ghost 2019 1080p, 720p & 480p – Full Hindi Movie

### Movie Info:

- **Full Name:** Ghost
- **Language:** Hindi
- **Release Year:** 2019
- **Size:** 400MB & 1.2GB & 2GB
- **Quality:** 480p & 720p – HDRip
- **Format:** Mkv
- **Director:** Vikram Bhatt
- **Writers:** Vikram Bhatt, Srivinay Salian
- **Stars:**  Sanaya Irani, Shivam Bhaargava, Vikram Bhatt

## Storyline:

he film starts with a girl named Barkha Khanna, supposedly killed by a vengeful ghost in her room which is later noticed by her husband, Karan Khanna, a political figure from Britain.  Meanwhile Simran (Sanaya Irani), a lawyer having own stress related issues and use morphine and is going through an emotional time as her father recently passed away and her boyfriend (a judge) too broke up with her. Simran after the reluctance of Karan’s campaign manager Bob agrees to take the case.

No surprises though, that this movie from the Bhatts has decent music. It doesn’t have any blockbuster songs but, the compositions work out against the exotic locales of UK’s countryside and London.

### Download Ghost (2020) Hindi Movie 480p \[400MB\]

[Download Links](https://1moviesflix.com?a270777880=MlJ1SmtNNTVxNE9ZaW92RUNGVU5nK3gzTFNNMGZsMnhvK0wvQmFrZHRwdjlMekRVRDNWSER6NGVqS09Od1ZvNUx1Q1Q0b3g5OW1JaXgxSkZOMXU4dVg4VDFuRFNaTk9RTWtoKzM5cnBWNk09)

### Download Ghost (2020) Hindi Movie 720p \[1.2GB\]

[Download Links](https://1moviesflix.com?a270777880=MlJ1SmtNNTVxNE9ZaW92RUNGVU5nK3gzTFNNMGZsMnhvK0wvQmFrZHRwdjlMekRVRDNWSER6NGVqS09Od1ZvNWFoNncrbkt6eFFHeUl3cU9XbmxGNzlNZ1NYTWlGNXVpSVJPU0JIRHZiamc9)

### Download Ghost (2020) Hindi Movie 1080p \[2GB\]

[Download Links](https://1moviesflix.com?a270777880=MlJ1SmtNNTVxNE9ZaW92RUNGVU5nK3gzTFNNMGZsMnhvK0wvQmFrZHRwdjlMekRVRDNWSER6NGVqS09Od1ZvNW5ZK1ozY2ZLT09HL3lnNHhYOG5GeEtJVUpUOVg1UFo1RXdOVkNseDJXYjA9)

* * *

* * *

.button { color: white; padding: 8px 6px; text-align: center; text-decoration: none; display: inline-block; font-size: 14px; margin: 2px 1px; -webkit-transition-duration: 0.4s; /\* Safari \*/ transition-duration: 0.4s; cursor: pointer; } .button5 { background-color: #555555; color: white; border: 1px solid #e7e7e7; border-radius: 4px; } .button5:hover { background-color: #e7e7e7; border: 2px solid #555555; color: black; }

[Join Our Telegram](http://gdrivepro.xyz/join.php) [Hollywood](https://moviesverse.com/) [AnimeFlix](https://animeflix.in/) [Download PC Games](https://gamesflix.net/)

* * *

* * *

Please Do Not Use VPN for Downloading Movies From Our Site.

Click On The Above **Download Button** to Download File.

If You Find Any Broken Link Then **Report** To Us.

**Comment** Your Queries And Requests Below In The Comment Box.

* * *


text:
---
layout: post
microblog: true
audio:
date: 2017-04-30 00:11:25 -0700
guid: http://joe.duvall.micro.blog/2017/04/30/on-ios-changing.html
---
On iOS 10.3.1, changing an app's icon only triggers a pop-up on some of my apps. Is anyone else seeing this?

For me, these apps *never* show a pop-up:

* Narwhal
* Hello Weather

And these *always* show it:

* MLB At Bat
* Overcast


text:
---
title: Our experience with Comatose - the MicroCMS
date: '2010-02-23 13:46:44'
tags:
- cap-vaidy
- rails
- technology
wp:post_id: '4184'
link: http://www.multunus.com/blog/2010/02/our-experience-with-comatose-the-microcms/
---

In one of our projects which is primarily a web application, the client had asked that we go ahead and make as much of the copy available across the site, editable. This included not just copy in static pages such as “About Us”, but also copy in dynamic pages. I mean things like tooltips for fields in forms, for example.

We first looked at
[RadiantCMS](http://radiantcms.org/), with the intention of building our web application on top of it. But then decided to instead build our web app from scratch and then make parts of it editable using
[Comatose](http://github.com/darthapo/comatose) [which is a “MicroCMS”]. This way, we have more flexibility to add features to the web app using the Rails API and available plugins, rather than being constrained by RadiantCMS system.Things we liked about Comatose:

* Its implemented as a Rails plugin - which makes it a breeze to install

* Implementing Single Sign On is also simple. Because it works well with the
[restful_authentication plugin](http://agilewebdevelopment.com/plugins/restful_authentication).

* Comatose allows rendering of pages inline from your application view - just like rendering a partial in a Rails app. To include an “editable” tool tip within a form, something as simple as the following is enough:

* [ror]<%= render :comatose=>’about’ %>[/ror]

There’s of course a lot more you can do with this plugin. Check it out.

Now for the bad part :-(

* The main issue is font inconsistency. There are some options for setting the font size, but they don’t work as expected - because the CSS styles are inherited from our app.

* In production mode, there is a noticeable delay between making changes in the CMS and the updated content showing up on the main site. Not sure why this is the case.

repository: multunus/multunus-website

extension: markdown

repo_name: multunus/multunus-website


text:
---
title: Overview
page_title: RadAvatar Server-side Programming
description: Overview of the Server-side APIs you can use to create and configure the Telerik WebForms Avatar Control.
slug: avatar/server-side-programming/overview
tags: overview
published: True
position: 0
---

# Server-side Programming Overview

Overview of the Server-side APIs you can use to create and configure the Telerik WebForms Avatar Control.

## Creating an Avatar in the Markup

To create an Avatar in the markup, add the Avatar element to the page and set its properties accordingly. You can find the properties in the following article:
- [Properties]({%slug avatar/server-side-programming/properties%})

Example

````ASP.NET
<telerik:RadAvatar runat="server" Type="Text" Size="Large" Text="JS" Border="true" FillMode="Outline"  ThemeColor="Success"  />
````

## Creating an Avatar dynamically

To create the Avatar on the server, create a new instance of the RadAvatar object, set its properties and add it to the Controls collection of another control (e.g. PlaceHolder1).  You can find the properties and enums in the following articles:
- [Properties]({%slug avatar/server-side-programming/properties%})
- [Enums]({%slug avatar/server-side-programming/enums%})

Example

````ASP.NET
<asp:PlaceHolder ID="PlaceHolder1" runat="server"></asp:PlaceHolder>
````

````C#
protected void Page_PreInit(object sender, EventArgs e)
{
    RadAvatar avatar = new RadAvatar() {
        Type = Telerik.Web.UI.AvatarType.Text,
        Size = AvatarSize.Large,
        Text = "JS",
        Border = true,
        FillMode = AvatarFillMode.Outline,
        ThemeColor = AvatarThemeColor.Success
    };
    PlaceHolder1.Controls.Add(avatar);
}
````
````VB
Protected Sub Page_PreInit(ByVal sender As Object, ByVal e As EventArgs)
    Dim avatar As RadAvatar = New RadAvatar() With {
        .Type = Telerik.Web.UI.AvatarType.Text,
        .Size = AvatarSize.Large,
        .Text = "JS",
        .Border = True,
        .FillMode = AvatarFillMode.Outline,
        .ThemeColor = AvatarThemeColor.Success
    }
    PlaceHolder1.Controls.Add(avatar)
End Sub
````

>important Creating controls programmatically must be done in an early event such as **PreInit** (preferably), **Init**. For more details you can check out the [ASP.NET Page Life-Cycle Events](https://learn.microsoft.com/en-us/previous-versions/aspnet/ms178472(v=vs.100)#life-cycle-events)

### Up next

- [Properties]({%slug avatar/server-side-programming/properties%})
- [Enums]({%slug avatar/server-side-programming/enums%})

## See Also

- [Properties]({%slug avatar/server-side-programming/properties%})
- [Enums]({%slug avatar/server-side-programming/enums%})

repository: telerik/ajax-docs

repo_name: telerik/ajax-docs


text:
# nino

Toolbelt for Arduino.

## Installation

```
npm install -g nino
```

## Using

```
$will ➔ nino help
Usage: nino [command] [options...]

       command: | build
                | erase
                | list
                | serial
                | upload
```

## Examples
```
$will ➔ nino build main.c
```

repository: jodytate/nino

repo_name: jodytate/nino


text:
# NISMOD website

This is the technical site for NISMOD, the National Infrastructure Model
developed by [ITRC Mistral](http://www.itrc.org.uk/) (Infrastructure Transitions
Research Consortium, Multi-Scale Infrastructure Systems Analytics), supported by
EPSRC.

The first purpose of this site is to host training and reference material.

## Jekyll and Github pages

This repository is processed by [Github Pages](https://pages.github.com/)
to produce the site at [https://nismod.github.io/](https://nismod.github.io/)
using the [Jekyll](https://jekyllrb.com/) static site generator.

Top level files - `index.md` and `about.md` correspond to the home page and
about page on the site.


text:
# style-soft-intro-vae-pytorch

Implementation of Style Soft-IntroVAE for image data.

This codes builds upon the original Adversarial Latent Autoencoders (ALAE) implementation by Stanislav Pidhorskyi.
Please see the [official repository](https://github.com/podgorskiy/ALAE) for a more detailed explanation of the files and how to get the datasets.
The authors would like to thank Stanislav Pidhorskyi, Donald A. Adjeroh and Gianfranco Doretto for their great work which inspired this implementation.

- [style-soft-intro-vae-pytorch](#style-soft-intro-vae-pytorch)
  * [Requirements](#requirements)
  * [Training](#training)
  * [Datasets](#datasets)
  * [Pretrained models](#pretrained-models)
  * [Recommended hyperparameters](#recommended-hyperparameters)
  * [What to expect](#what-to-expect)
  * [Files and directories in the repository](#files-and-directories-in-the-repository)
  * [Credits](#credits)

## Requirements

* Please see ALAE's repository for explanation of the requirements and how to get them.
* We provide an `environment.yml` file for `conda`, which installs all that is needed to run the files, in an environment called `tf_torch`.
  * `conda env create -f environment.yml`
* The required packages are located in the `requirements.txt` file.
  * `pip install -r requirements.txt`
  * If you installed the environment using the `environment.yml` file, there is no need to use the `requirements.txt` file.
* As in the original ALAE repository, the code is organized in such a way that all scripts must be run from the root of the repository.
  * If you use an IDE (e.g. PyCharm or Visual Studio Code), just set Working Directory to point to the root of the repository.
  * If you want to run from the command line, then you also need to set PYTHONPATH variable to point to the root of the repository.
    * Run `$ export PYTHONPATH=$PYTHONPATH:$(pwd)` in the root directory.

## Training

* This implementation uses the [DareBlopy](https://github.com/podgorskiy/DareBlopy) package to load the data.
  * `pip install dareblopy` (in addition to the `pip install -r requirements.txt`)
  * TL;DR: read TFRecords files in PyTorch, for better utilization of the data loading, train faster.

To run training:

`python train_style_soft_intro_vae.py -c <config>`

* Configs are located in the `configs` directory, edit them to change the hyperparameters.
* It will run multi-GPU training on all available GPUs. It uses DistributedDataParallel for parallelism. If only one GPU available, it will run on single GPU, no special care is needed.
  * To modify the visible GPUs, edit the line: `os.environ["CUDA_VISIBLE_DEVICES"] = "0, 1, 2, 3"` in the `train_style_soft_intro_vae.py` file.

Examples:

`python train_style_soft_intro_vae.py` (FFHQ)

`python train_style_soft_intro_vae.py -c ./configs/celeba-hq256`

## Datasets
* CelebHQ: please follow [ALAE](https://github.com/podgorskiy/ALAE#datasets) instructions.
* FFHQ: please see the following repository [Flickr-Faces-HQ Dataset (FFHQ)](https://github.com/NVlabs/ffhq-dataset).

## Pretrained models
|Dataset | Filename | Where to Put| Links|
|------------|------|----|---|
|CelebA-HQ (256x256)|`celebahq_fid_18.63_epoch_230.pth` |`training_artifacts/celeba-hq256`|[MEGA.co.nz](https://mega.nz/file/sJkS2BAC#aGFwJIPvOTIP147GwBGHOJgwRMC_NYKHT_QK7abb0VE), [Mediafire](https://www.mediafire.com/file/fgf0a85z5d0jtu5/celebahq_fid_18.63_epoch_230.pth/file) |
|FFHQ (256x256)|`ffhq_fid_17.55_epoch_270.pth` |`training_artifacts/ffhq` | [MEGA.co.nz](https://mega.nz/file/YJ1SkBwI#9t0ZEZTC0WWG0NUsJg2OwZujOuUXKn_ehP6fba1pV7o), [Mediafire](https://www.mediafire.com/file/x6jkyg4rlkqc4hl/ffhq_fid_17.55_epoch_270.pth/file) |

* In config files, `OUTPUT_DIR` points to where weights are saved to and read from. For example: `OUTPUT_DIR: training_artifacts/celeba-hq256`.

* In `OUTPUT_DIR` it saves a file `last_checkpoint` which contains the path to the actual `.pth` pickle with model weight. If you want to test the model with a specific weight file, you can simply modify `last_checkpoint` file.

## Recommended hyperparameters

|Dataset | `beta_kl` | `beta_rec`| `beta_neg`|`z_dim`|
|------------|------|----|---|----|
|FFHQ (256x256)|0.2|0.05| 512|512|
|CelebA-HQ (256x256)|0.2|0.1| 512|512|

## What to expect

* During the training, figures of samples and reconstructions are saved locally.
* During training, statistics are printed (reconstruction error, KLD, expELBO).
* In the final resolution stage (256x256), FID will be calculated every 10 epcohs.
* Tips:
    * KL of fake/rec samples should be > KL of real data (by a fair margin).
    * It is usually better to choose `beta_kl` >= `beta_rec`.
    * We stick to ALAE's original architecture hyperparameters, and mostly didn't change their configs.

## Files and directories in the repository

* For a full description, please ALAE's repository.

|File name         | Purpose |
|----------------------|------|
|`train_style_soft_intro_vae.py`| main training function|
|`checkpointer.py`| module for saving/restoring model weights, optimizer state and loss history.|
|`custom_adam.py`| customized adam optimizer for learning rate equalization and zero second beta.|
|`dataloader.py`| module with dataset classes, loaders, iterators, etc.|
|`defaults.py`| definition for config variables with default values.|
|`launcher.py`| helper for running multi-GPU, multiprocess training. Sets up config and logging.|
|`lod_driver.py`| helper class for managing growing/stabilizing network.|
|`lreq.py`| custom `Linear`, `Conv2d` and `ConvTranspose2d` modules for learning rate equalization.|
|`model.py`| module with high-level model definition.|
|`net.py`| definition of all network blocks for multiple architectures.|
|`registry.py`| registry of network blocks for selecting from config file.|
|`scheduler.py`| custom schedulers with warm start and aggregating several optimizers.|
|`tracker.py`| module for plotting losses.|
|`utils.py`| decorator for async call, decorator for caching, registry for network blocks.|
|`configs/celeba-hq256.yaml`, `configs/ffhq256.yaml`| config file for CelebA-HQ and FFHQ datasets at 256x256 resolution.|
|`dataset_preparation/`| folder with scripts for dataset preparation (creating and splitting TFRecords files).|
|`make_figures/`| scripts for making various figures.|
|`metrics/fid_score.py`, `metrics/inception.py`| functions for FID calculation from datasets, using the pretrained Inception network|
|` training_artifacts/`| default folder for saving checkpoints/sample outputs/plots.|

## Credits
* Adversarial Latent Autoencoders, Pidhorskyi et al., CVPR 2020 - [Code](https://github.com/podgorskiy/ALAE), [Paper](https://arxiv.org/abs/2004.04467).

repository: LearnerLYH/soft-intro-vae-pytorch

repo_name: LearnerLYH/soft-intro-vae-pytorch


text:
This class evaluates XPath expressions in the context of XMLNodes with optional custom context objects to control evaluation. It supports complete XPath 1.0 syntax with extensions.

Basic usage:
	| doc path result context |
	doc := XMLDOMParser parse: '<test>test</test>'.
	path := XPath for: '/test'.
	result := path in: doc.

	"with a custom context"
	path := XPath for: '/*[name() = $name]'.
	context :=  XPathContext new.
	context
		variableAt: 'name'
		put: 'test'.
	result :=
		path
			in: doc
			context: context.

The syntax extensions are:
- Prefix wildcards in name tests like "*:name"
- Expanded name tests like "Q{namespaceURI}localName" that allow easier namespace testing
- The element(), attribute(), and namespace() type tests that can also have embedded name tests like "element(name)"

Unlike standard XPath, by default prefixes in node tests are matched against literal prefixes of nodes, so you don't need to declare prefixes in the context before using them in node tests. Declaring at least one prefix triggers standard behavior. See XPathContext for more.

XPath expressions can be encoded directly in Smalltalk using special binary selectors on XMLNodes and  XMLNodeSets:
	xmlNode // 'entry' / '*' / 'link' @ 'href'.

Block or position predicates can be applied with ?? to axis node test arguments or to result node sets. This returns the first element of each 'entry' descendant:
	xmlNode // 'entry' / ('*' ?? 1).

These return the first (document order) element of the first (document order) 'entry' descendant:
	(xmlNode // 'entry' / '*') ?? 1.
	xmlNode // 'entry' / '*' ?? 1. "same"

Block predicates take upto three arguments, the context node, context position, and context size. This returns the 2nd-5th 'link' elements of all descendant 'entry' elements with no more than 5 'link' elements:
	xmlNode // 'entry' //
		('link' ?? [:node :position :size |
				position >= 2
					and: [size <= 5]]).

Multiple predicates are supported by chaining ?? or using collection arguments. These return the first 'content' element with children of each 'entry' descendant:
	xmlNode // 'entry' //
		('content'
			?? [:node | node hasChildren]
			?? 1).
	xmlNode // 'entry' //
		('content' ?? {[:node | node hasChildren]. 1})

repository: GsDevKit/XML-XPath

branch_name: refs/heads/gemstone

gha_language: Smalltalk

repo_name: GsDevKit/XML-XPath


text:
# Migrate DB

Easy data transfer from one database to another

[![StyleCI Status][badge_styleci]][link_styleci]
[![Github Workflow Status][badge_build]][link_build]
[![Coverage Status][badge_coverage]][link_scrutinizer]
[![Scrutinizer Code Quality][badge_quality]][link_scrutinizer]

[![Stable Version][badge_stable]][link_packagist]
[![Unstable Version][badge_unstable]][link_packagist]
[![Total Downloads][badge_downloads]][link_packagist]
[![License][badge_license]][link_license]

## Installation

To get the latest version of `Migrate DB`, simply require the project using [Composer](https://getcomposer.org):

```bash
$ composer require andrey-helldar/migrate-db --dev
```

Or manually update `require-dev` block of `composer.json` and run `composer update`.

```json
{
    "require-dev": {
        "andrey-helldar/migrate-db": "^1.1"
    }
}
```

## Compatibility

| Service | Versions |
|:---|:---|
| PHP | ^7.3, ^8.0 |
| Laravel | ^8.0 |
| Databases | MySQL 5.7+, PostgreSQL 9.5+, MSSQL |

## Using

Create a new database and set up both connections in the `connections` section of
the [config/database.php](https://github.com/laravel/laravel/blob/8.x/config/database.php) file, then run the `db:migrate` console command passing two
parameters:

```bash
$ php artisan db:migrate --schema-from=foo --schema-to=bar
```

where:

* `foo` - Source [connection](https://github.com/laravel/laravel/blob/master/config/database.php) name
* `bar` - Target [connection](https://github.com/laravel/laravel/blob/master/config/database.php) name

The command will perform all migrations on the source and destination databases and transfer all records from the old to the new one.

Enjoy 😊

## License

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

## For Enterprise

Available as part of the Tidelift Subscription.

The maintainers of `andrey-helldar/migrate-db` and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source packages you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact packages you use. [Learn more](https://tidelift.com/subscription/pkg/packagist-andrey-helldar-migrate-db?utm_source=packagist-andrey-helldar-migrate-db&utm_medium=referral&utm_campaign=enterprise&utm_term=repo).

[badge_build]:          https://img.shields.io/github/workflow/status/andrey-helldar/migrate-db/phpunit?style=flat-square

[badge_coverage]:       https://img.shields.io/scrutinizer/coverage/g/andrey-helldar/migrate-db.svg?style=flat-square

[badge_downloads]:      https://img.shields.io/packagist/dt/andrey-helldar/migrate-db.svg?style=flat-square

[badge_license]:        https://img.shields.io/packagist/l/andrey-helldar/migrate-db.svg?style=flat-square

[badge_quality]:        https://img.shields.io/scrutinizer/g/andrey-helldar/migrate-db.svg?style=flat-square

[badge_stable]:         https://img.shields.io/github/v/release/andrey-helldar/migrate-db?label=stable&style=flat-square

[badge_styleci]:        https://styleci.io/repos/338000763/shield

[badge_unstable]:       https://img.shields.io/badge/unstable-dev--main-orange?style=flat-square

[link_build]:           https://github.com/andrey-helldar/migrate-db/actions

[link_license]:         LICENSE

[link_packagist]:       https://packagist.org/packages/andrey-helldar/migrate-db

[link_scrutinizer]:     https://scrutinizer-ci.com/g/andrey-helldar/migrate-db/?branch=main

[link_styleci]:         https://github.styleci.io/repos/338000763

repository: ksorto/migrate-db

repo_name: ksorto/migrate-db


text:
# go-api
A simple api written in Go.

# Setup
Put this folder in your $GOPATH and run `go get` to get all the dependencies then run `./serve.sh` a script located in this repository to build and run the code

# Mock data
`main.go` contains some mock data to test with, modify it directly in the code as needed.

# Port
By default the api starts on port `8000`, modify that in `main.go`

# Postman Collection
Import the `postman_collection.json` into your postman app to get a quick start with calling different endpoints

repository: naguibihab/go-api

repo_name: naguibihab/go-api


text:
# Package manager for IDA Pro

> WARNING: This project is still between alpha and beta state. Feel free to report bugs if this is not working!

## How to install

Execute the script below in IDAPython console (minified [`installer.py`](https://github.com/Jinmo/idapkg/raw/master/installer.py).)

```
import zipfile,tempfile,sys,os,threading,shutil,importlib
def install():P=os.path;tag='v0.1.4';n=tempfile.NamedTemporaryFile(delete=False,suffix='.zip');n.close();print('Started downloading idapkg...');importlib.import_module('urllib.request' if sys.version_info.major==3 else 'urllib').urlretrieve('https://github.com/Jinmo/idapkg/archive/%s.zip'%tag,n.name);f=open(n.name,'rb+');f.seek(0,os.SEEK_END);f.truncate(f.tell()-0x28);f.close();z=zipfile.ZipFile(n.name);base=z.namelist()[0];sys.path.append(P.join(n.name,base));from pkg.config import g;import pkg.main as main;packages_path=g['path']['packages'];z.extractall(packages_path);z.close();dest=P.join(packages_path,'idapkg');P.isdir(dest)and shutil.rmtree(dest);os.rename(P.join(packages_path,base),dest);main.update_pythonrc();main.init_environment(False);print('Installation success! Please restart IDA to use idapkg.');os.unlink(n.name)
threading.Thread(target=install).start()
```

Then you can access related actions via command palette (Ctrl+Shift+P on windows/mac/linux, or Command+Shift+P on mac) after restarting IDA Pro.

### Testing latest changes

To test the master branch, you can replace `tag='v...'` into `tag='master'`.

## What file is created

`~(Your home directory)/idapkg`, and some lines in idapythonrc.py will be created.

```
idapkg/
  packages/
  python/
  config.json
```

### packages/

When a package is installed, `packages/<name>` is created and further added to `IDAUSR` variable. This enables following folders to be loaded by IDA Pro.

```
<name>
  plugins/
  procs/
  loaders/
  til/
  sig/
  ids/
```

### python/ - virtualenv

To manage PIP packages easily, this creates a virtualenv and creates `pip`, `easy_install` and other virtalenv-related files and activates the environment.

TL;DR If you run `pip install`, they are installed into `python/lib/*` (`Lib` on windows, all same.)

### config.json

In fact, all paths above are configurable!

```json
{
    "path": {
        "virtualenv": "...\\idapkg\\python",
        "packages": "...\\idapkg\\packages"
    },
    "repos": [
        "https://api.idapkg.com",
        "github:Jinmo/idapkg-repo/master"
    ]
}
```

And you can use your private repo for fetching packages. The api server will be uploaded soon!

## Writing a package

See [Writing a package (link)](https://idapkg.com/getting-started).

## TODO

Currently finding way to reliably and generally [update `IDAUSR` variable on all platforms](https://github.com/Jinmo/idapkg/blob/master/pkg/internal_api/win.py). Currently only supporting Windows and Mac OS X.

repository: fengjixuchui/idapkg

repo_name: fengjixuchui/idapkg


text:
## 1.0.4 (2021-08-15)

### :rocket:   New Functions:
  * [randomElement()](https://github.com/g-modules/utils#randomelement)
  * [randomKey()](https://github.com/g-modules/utils#randomkey)
  * [randomValue()](https://github.com/g-modules/utils#randomvalue)

---

## 1.0.3 (2021-08-12)

### :wrench:   Minor Fixes
  * CI/CD Integration
  * Added GitHub Packages

---

## 1.0.2 (2021-08-11)

### :wrench:   Small Fixes

---

## 1.0.1 (2021-08-11)

### :wrench:   Small Fixes

---

## 1.0.0 (2021-08-11)

### :rocket:   Basic Functions:
  * [randomNumber()](https://github.com/g-modules/utils#randomnumber)
  * [randomBool()](https://github.com/g-modules/utils#randombool)
  * [randomId()](https://github.com/g-modules/utils#randomid)
  * [uppercaseFirstLetter()](https://github.com/g-modules/utils#uppercasefirstletter)
  * [shuffleArray()](https://github.com/g-modules/utils#uppercasefirstletter)
  * [uniqObjectsInArray()](https://github.com/g-modules/utils#uppercasefirstletter)

### :memo:   Documentation
  * [Basic Readme](https://github.com/g-modules/utils#readme)

repository: g-modules/utils

gha_language: JavaScript

repo_name: g-modules/utils


text:
# kat 🐱
A simple cat-like/library syntax highlighter made in C

## Introduction
Kat is a C-only syntax highlighter made in C that comes in two flavors: library and a companion program. The former allows
the user to easily highlight code snippets (or entire source code) line by line. The latter is a cat-like tool that reads
from _stdin_ or a file and outputs a C highlighted code using ANSI Escape Sequences.

Kat was born as a [PBD](https://github.com/Theldus/PBD) feature that highlights the lines that changed as soon as
possible. So I thought: why I wouldn't do a library with it? some people might find it useful as well.

## Library
Kat library is pretty simple and consists in a few set of functions:

 Function 	  Description

```c
int highlight_init(const char *theme_file);
```

This function initializes the highlight context and its global state. It should be called before
any other routines present here.

If theme_file
is not NULL, Kat will read a theme from the specified
file. More about themes latter.

```c
void highlight_finish(void);

```

This function just finishes the dynamically
allocated structures and reset the global
state.

```c
char *highlight_line(const char *line, char *hl,
	size_t str_size);
```

Highlight the given _line_ and returns a
dynamically allocated string highlighted.

Note that the _hl_ parameter is a pointer to
a dynamically allocated string. This option
is useful for reusing a string pointer
returned from this same function. If NULL,
_highlight_line_ will allocate a dynamic
string and returns it.

Optionally the user can provide the string size,
by passing a value other than 0 to _str_size_.
This can be useful for constant strings that are
used multiples times.

```c
void highlight_free(char *line);
```

Deallocates a previously allocated string
from `highlight_line`.

### Example
A simple example as follows (complete source in example/ex1.c):
```c
...
/* Initialize the Kat global state. */
if (highlight_init(NULL) < 0)
	quit(-1, "Unable to initialize the highlight!\n");

/* Highlight some lines. */
line = highlight_line("#include <stdio.h>", NULL, 0);
puts(line);
line = highlight_line("int main(int argc, char **argv){ /* Comment. */", line, 0);
puts(line);
line = highlight_line("    printf(\"Hello World \%s\\n\", argv[1]);", line, 0);
puts(line);
line = highlight_line("}", line, 0);
puts(line);

/* Free the allocated line and finalizes the highlighter context. */
highlight_free(line);
highlight_finish();
...
```
will produce the following output below:

Kat example

## Program
Kat also ships with a cat-like program that reads from _stdin_ or a file and outputs a highlighted C code to _stdout_.
Note, however, that Kat does not intend to entirely substitute a standard `cat(1)` utility. If you _really_ need a
replacement, check out the amazing [bat(1)](https://github.com/sharkdp/bat) project.

## Customization
Despite its simplicity, Kat (with some restrictions) easily allows the addition of new keywords and symbols.
Moreover, Kat has 2 color schemes by default (8-colors and 256-colors) and also supports reading external themes.

The theme layout is as follows: eight numbers separated by commas, spaces, tabs and/or line breaks from 0 to 255
that represents the range of colors supported by a 256-color* terminal.

Each position represents exactly:
- Preprocessor color
- Type color
- Keywords color
- Number color (including integer, floats ...)
- String / Char color
- Comment color
- Function call color
- Symbols color

As an example, a text file with the content: `47, 160, 57, 226, 207, 241, 69, 208` is valid and will configure
respectively: 47 (preprocessor, green), 160 (types, red), 57 (keywords, purple), 226 (number, yellow) and so on...

You can select an external theme file via _theme_file_ parameter, in `int highlight_init(const char *theme_file);` or via
the complimentary program, via `-t/--theme` parameter.

*To convert an RGB value to the nearest approximated value in a 256-color palette, please check [colortrans.py](https://gist.github.com/MicahElliott/719710/)

## Performance

Although not the main focus, Kat is surprisingly fast.

Our methodology consisted of using three programs with the following parameters (cat, kat, and [bat(1)](https://github.com/sharkdp/bat)):
- `cat [file] > /dev/null`
- `kat [file] > /dev/null` (Kat always uses ANSI Escape Sequences, regardless of whether the output is tty or a file)
- `bat --color=always -p [file] > /dev/null` (`--color=always` keeps the highlight on even for a file, and `-p`
  removes extra decorators).

The following files were tested and for each one, they were executed 8 times and obtained the average of the times:
- 1) **First test:** sqlite3.c (amalgamated version): 4.5MiB file and 133.611 lines of code.

cat vs kat vs bat with sqlite3.c

- 2) **Second test:** highlight.c (from Kat's own source): 22.1kB file and 813 lines of code.

cat vs kat vs bat with highlight.c

Thanks to its simplicity, it is even possible to overcome the `cat` for small inputs and stay close even for large inputs.
The benchmarks above can be executed with: `make bench`.

## Limitations
Kat has some limitations that might be useful or not:
- Only C highlight support: However, it's easy to add 'support' to similar languages, like C++, Java, since most of the
  changes would be related to keywords and symbols. **(library limitation)**

- No Regular Expressions support **(library limitation)**

- Full Buffered: Meaning that Kat will keep in memory all the input until find an EOF and only after that, parses
and prints the output. While this could sounds unreasonable, Kat is made to highlight source codes and most of them
are just a few kilobytes and in the worst case, few megabytes, so I'm not expecting that a user will want to see an
entire huge source tree in the terminal. If you're planning to see all the Linux source tree in Kat, you are crazy,
really. **(Kat program limitation)**

- Not a `cat(1)` substitute. Although the Kat program can be improved, this is not in my plans. Because you can always
use cat in conjunction with kat, e.g: `cat file1 file2 | kat`. **(Kat program limitation)**

- Kat is not a _pager_ and does not have this type of functionality, _however_, it is perfectly fine to pipe to one,
such as: `kat file | less -R`. **(Kat program limitation)**

## Building
Building Kat program (kat) and library (libkat.ar) is as simple as possible, just clone the repository and invoke make:
```bash
git clone https://github.com/Theldus/kat
cd kat/
make
```
## License and Authors
Kat is licensed under MIT License. Written by Davidson Francis and (hopefully) others
[contributors](https://github.com/Theldus/kat/graphs/contributors).

repository: Theldus/kat

repo_name: Theldus/kat


text:
<!-- add-breadcrumbs -->
# Packages

> New in [Version 14](https://github.com/frappe/frappe/pull/14123)

Packages are light weight apps that you can directly build from the Framework UI. A Package is very much like an app and a collection of Module Defs.

You can make apps directly from the Framework UI (without using the command-line) using DocTypes, Server Scripts, Web Page etc. High quality apps can be build from the Framework directly. These apps can be bundled in a "Package" and then imported to other sites.

To add a module to a package, you have to set its "Package" property. This is available for "Custom" Module Defs

### Creating a Package

You can create a new Package by creating a Package object. You can set a README and a LICENSE. A Package is designed in a way that it can be pushed to a git repository.

Once you have created a package, you can add your custom Module Defs to that package.

![Package](/docs/assets/img/deployment/package.png)

### Making a Package Release

A **Package Release** will export all the package modules in the `[bench]/sites/[site]/packages` folder like an app, and then bundle the folder in a gzipped tarfile `[package]-[version].tar.gz`

You can then download the package release and import it in another site

![Package Release](/docs/assets/img/deployment/package-release.png)

### Importing a Package

You can create a **Package Import** and attach the exported package on a new site. If you check "Activate", the package will be extracted into the `[bench]/sites/[sitename]/packages` folder (existing files will be overwritten).

The system will then *migrate* this package to the database similar to how an app migration works. Files that have not been changed will be skipped unless the "Force" check is applied.

A log is created with the output.

![Package Import](/docs/assets/img/deployment/package-import.png)

gha_license_id: NOASSERTION


text:
# Generic Makefile

Simply add the Makefile to the root of you projects and start automating.

## Files

| Makefile | Description |
|----------|-------------|
| [Makefile](Makefile) | Makefile for all generic projects |

## Targets

| Target | Description |
|--------|-------------|
| `help` | (Default target) Show help screen |
| `lint` | Various linting against all possible files (encoding, line-feeds, whitespace) |

## Tunables

### Disable specific linters
The linting stage `lint` offers you to disable certain linters via make argumets:
```bash
# Specify file-lint Docker image version
$ make lint FL_VERSION=latest

# Specify paths to ignore during file lint
$ make lint FL_IGNORE_PATHS='.git/,.github/'
```

## CI Integration

The following example shows Travis CI integration
```yml
---
sudo: required
services:
  - docker

before_install: true
install: true

script:
  - make lint
```

repository: cytopia/makefiles

gha_language: Makefile

repo_name: cytopia/makefiles


text:
## Proposals

The Treasury module defines special proposals which allow the [Tax Rate](./02_state.md#TaxRate) and [Reward Weight](./02_state.md#RewardWeight) values in the `KVStore` to be voted on and changed accordingly, subject to the [policy constraints](./03_end_block.md#PolicyConstraints) imposed by `pc.Clamp()`.

### TaxRateUpdateProposal

```go
type TaxRateUpdateProposal struct {
	Title       string  // Title of the Proposal
	Description string  // Description of the Proposal
	TaxRate     sdk.Dec // target TaxRate
}
```

::: details JSON Example

```json
{
  "type": "treasury/TaxRateUpdateProposal",
  "value": {
    "title": "proposal title",
    "description": "proposal description",
    "tax_rate": "0.001000000000000000"
  }
}
```

### RewardWeightUpdateProposal

```go
type RewardWeightUpdateProposal struct {
	Title        string  // Title of the Proposal
	Description  string  // Description of the Proposal
	RewardWeight sdk.Dec // target RewardWeight
}
```

::: details JSON Example

```json
{
  "type": "treasury/RewardWeightUpdateProposal",
  "value": {
    "title": "proposal title",
    "description": "proposal description",
    "reward_weight": "0.001000000000000000"
  }
}
```

repository: somethingelsev/core

repo_name: somethingelsev/core


text:
---
title: Advent of Code 2020 - Day 1
category: blog
layout: post
description: Advent of Code 2020 Day 1
tag:
- advent-of-code-2020
- python
headerImage: false
---

Even though[ Advent of Code 2020 ](https://adventofcode.com/2020) is over, I thought it would be a good opportunity for me to get back into writing Python code and create some blog posts along the way.

My idea for these posts is to explore multiple solutions(*read naive and optimal solutions*) and compare their runtime and space complexities.

All of the code is going to be written in python3, so if you want to follow along make sure that you have it installed locally.

Every Advent of Code problem consists of two parts, so we're going to split each post into two sections: In the first section, we're going to be talking about the possible solutions for the first part, while in the second section we're going to focus on the second part. If you already solved one of the parts, you can just jump to the one that is of interest to you.

Today we're going to explore the **Day 1: Report Repair** problem.
# Part 1
> Before you leave, the Elves in accounting just need you to fix your expense report (your puzzle input); apparently, something isn't quite adding up.
> Specifically, they need you to find the two entries that sum to 2020 and then multiply those two numbers together.

In shorter terms, given a list of integers, we need to find the two entries that sum to **2020** and return their product.\\
For example, given the list **`[1721, 979, 366, 299, 675, 1456]`**, the two numbers that match the given condition are  **`1721`** and **`299`** so we need to return **`1721 * 299 = 514579`**.

Let's start off by creating the function for reading the input from a file:
```python
from typing import List
import sys

def read_input(filepath: str) -> List[int]:
    with open(filepath) as f:
        numbers = list(map(lambda x: int(x.strip()), f.readlines()))
        return numbers

if __name__ == '__main__':
    numbers = read_input(sys.argv[1])
    print(f'The numbers are: {numbers}')

```

Now if we run our code, we get the integer list as expected:
```bash
$ python3 day_1.py sample_input.txt

The numbers are: [1721, 979, 366, 299, 675, 1456]
```

## Naive Solution
The first solution that comes to mind is to just iterate over all pairs of integers and check if their sum is equal to **2020**:

```python
from typing import List
from typing import Tuple
from typing import Optional

def two_sum(numbers: List[int], target: int) -> Optional[Tuple[int, int]]:
    for i in range(len(numbers)):
        for j in range(i + 1, len(numbers)):
            s = numbers[i] + numbers[j]
            if s == target:
                return numbers[i], numbers[j]

    return None

if __name__ == '__main__':
    numbers = read_input(sys.argv[1])
    first, second = two_sum(numbers, target=2020)
    print(first, second, first * second)
```

Looks good right? Let's run it on the sample input:
```bash
$ python3 day_1.py sample_input.txt

1721 299 514579
```
Yay, we got the correct output from the first try! This wasn't that hard, was it?

At this point you might have some questions, so let's address some of them.

> Why is the second loop starting from **i + 1**?

There are two main reasons for this:
- We do not want to reuse the same element twice. For example, if our list contained **`[1010, 1721, 299]`** and **`j`** would start from **`i`** when **`i = 0`**, we would use **`1010`** twice, thus returning an invalid solution.
- If we already visited the subset **`[0, i]`**, we no longer need to visit it in the second loop since it would just generate a duplicate solution with the pairs in reverse order.

> Why did you return an Optional?

This is not really required for our problem since we are always going to have a pair that satisfies the given condition but I wanted to follow a more generic approach that does not depend on this assumption.

> Isn't there a more *pythonic* approach to this?

Good catch, we can write this in a much nicer way by making use of python's **itertools.combinations**.  The **combinations** function can be used to return al the successive *2-length* combinations from a given iterable.
First, let's bring the *combinations* functional method into our namespace:
```python
from itertools import combinations
```

Now we can rewrite the **two_sum** method as follows:
```python
def two_sum(numbers: List[int], target: int) -> Optional[Tuple[int, int]]:
    return next(filter(lambda p: sum(p) == target,
                       combinations(numbers, 2)), None)
```

If we run the code on the sample input once again, we still get the expected output:
```bash
$ python3 day_1.py sample_input.txt

1721 299 514579
```

The **runtime complexity** of this approach is **O(N^2)** where N is equal to the number of integer values that we were given as input. The **space complexity** is **O(1)** since we do not store any auxiliary data structures and we just return a pair containing the matching elements.

## Optimal Solution
How could we improve our naive solution? A good place to start would be the removal of the inner loop but how could we do that?
Let's first look at why we need the inner loop: for a given element **a** we need to find an element **b** such at **a + b = 2020**, from this we can deduce that **b = 2020 - a**.
Since we know what the value of the element should be, we just need a data structure that can help us check if that value is present in our integer list in **O(1)** time.
A perfect fit for this is a **hash map**(or **set** in python) since it has an amortized runtime complexity of **O(1)** for both adding and checking for the existence of an element.

This problem is commonly known as [**Two Sum**](https://leetcode.com/problems/two-sum/)(thus the function name) and has an O(n) solution since for any given **k**, the **ksum** problem can be solved in **O(N^(k / 2))**.

Thus, our function can be rewritten as follows:
```python
def two_sum(numbers: List[int], target: int) -> Optional[Tuple[int, int]]:
    available_numbers = set()
    for number in numbers:
        remaining = target - number
        if remaining in available_numbers:
            return [remaining, number]
        available_numbers.add(number)

    return None
```

The **runtime complexity** of this approach is **O(N)** due to the usage of a **set** for the task of checking if the remaining target difference exists. The space complexity is also is **O(N)** since we are using a **set** to store the available number at each step.

# Part 2
> The Elves in accounting are thankful for your help; one of them even offers you a starfish coin they had left over from a past vacation.
> They offer you a second one if you can find three numbers in your  expense report that meet the same criteria.

Compared to **Part 1** we now need to find three numbers such that **a  + b + c = 2020**. For example, given the list **`[1721, 979, 366, 299, 675, 1456]`**, the three numbers that match the given condition are  **`979`**, **`366`** and **`675`** so we need to return **`979 * 366 * 675 = 241861950`**.

## Naive Solution
The naive solution is almost the same as the solution for **Part 1**, the only difference is that we need to change the length of the tuples that need to be generated by **itertools.combinations**.
To make this more generic, let's add a paramter to our initial function that allows us to control the tuple size and let's rename the function to **"k_sum"** to better express it's functionality.

```python
def k_sum(numbers: List[int], target: int, tuple_size: int) -> Optional[Tuple[int, ...]]:
    assert tuple_size > 0 and tuple_size <= len(numbers)
    return next(filter(lambda p: sum(p) == target,
                       combinations(numbers, tuple_size)), None)

if __name__ == '__main__':
    numbers = read_input(sys.argv[1])
    first, second, third = k_sum(numbers, target=2020, tuple_size=3)
    print(first, second, third, first * second * third)
```

Running the above solution prodices the expected output:
```bash
$ python3 day_1.py sample_input.txt

979<PHONE_NUMBER>61950
```

The **runtime complexity** of this approach is **O(N^3)** where N is equal to the number of integer values that we were given as input. The **space complexity** is **O(1)** for the same reasons as for Part 1.
## Optimal Solution
The optimal solution for this part is based on the observation that for **a + b + c = 2020** we can use our optimal **two_sum** function to find the values of **b** and **c**, since **b + c = 2020 - a**.

```python
def three_sum(numbers: List[int], target: int) -> Optional[Tuple[int, int, int]]:
    for i, number in enumerate(numbers):
        remaining = target - number
        pair = two_sum(numbers[i + 1:], remaining)
        if pair:
            return number, (*pair)

    return None
```

The **runtime complexity** of this approach is **O(N^2)** where N is equal to the number of integer values that we were given as input.
The **space complexity** is **O(N)** since the **two_sum** method stores the available numbers in a **set**.


text:
---
layout: post
title: Notes from Recent Advances in Recurrent Neural Networks by Hojjat Salehinejad et.all
author: jagan
tags: [RNN, Deep Learning, Artificial Intelligence, Machine Learning]
comments: true
---

The paper "Recent Advances in Recurrent Neural Networks" by Julianne Baarbe, Sharan Sankar, Joseph Barfett, Errol Colak, and Shahrokh Valaee[1] provides a comprehensive literature review on various aspects of RNN. The authors give a concise and in-depth analysis of the evolution of RNN.

The paper starts with a brief discussion on the theory of Artificial Neural Networks (ANN) and then Recurrent Neural Networks (RNN). The notable contribution in this part is a short table of noteworthy research papers; starting with Elman et.all to Jing et.all 2017.

A quick walkthrough of the theory of RNN provided in the second section of the paper. Model architecture, activation, and loss functions were explained in this section.

The next section provides a detailed view of training various RNN architecture/models. It starts with weight and bias initialization and then discusses fundamental concepts such as applying gradient-based techniques, BPTT, SGD, and different optimization techniques.

The next section provides various prominent RNN architecture. The discussion starts with deep RNN with MLP, Bidirectional RNN, Recurrent RNN, Multidimensional RNN, LSTM and LSTM varients, GRU, memory networks and structurally constrained RNN's are discussed. This discussion includes views on pros and cons of this architecture and possible application areas. A chart describing pros and cons of various LSTM architecture is a notable feature of this section. A comparison of major RNN architecture is also provided here.

The next section discusses regularization in RNNand the final section discusses the application of RNN in text, speech, image and video processing.

The authors did an excellent job in summarising significant research in the area of RNN till date. The presentation of the article is exquisite and useful for students academicians and general Deep Learning professionals.

Some of the additional reference on the similar line includes:
A Critical Review of Recurrent Neural Networks for Sequence Learning
Zachary C. Lipton, John Berkowitz, and Charles Elkan[2]. Comparative Study of CNN and RNN for Natural Language Processing
Wenpeng Yin, Katharina Kann, Mo Yu and  Hinrich Schütze [3]

[1] https://arxiv.org/abs/1801.01078

[2] https://arxiv.org/abs/1506.00019

[3] https://arxiv.org/abs/1702.01923


text:
---
layout: post
title:  "8_0_20_patch1"
date:   2017-10-07 22:04:13 +0200
categories: cmssw
relmajor: 8
relminor: 0
relsubminor: 20
relpatch: _patch1
---

# CMSSW_8_0_20_patch1
#### Changes since CMSSW_8_0_20:

[compare to previous](https://github.com/cms-sw/cmssw/compare/CMSSW_8_0_20...CMSSW_8_0_20_patch1)

1. [16078](http://github.com/cms-sw/cmssw/pull/16078){:target="_blank"}  from **@davidlange6**: PR with hopefully all that I wanted for 8_0_20_patch1 `comparison`  `db`  `dqm`  `generators`  `hlt`  `l1`  `reconstruction`  created: 2016-10-03T18:38:20Z merged: 2016-10-03T18:39:19Z

#### CMSDIST Changes between Tags REL/CMSSW_8_0_20/slc6_amd64_gcc530 and REL/CMSSW_8_0_20_patch1/slc6_amd64_gcc530:

[compare to previous](https://github.com/cms-sw/cmsdist/compare/REL/CMSSW_8_0_20/slc6_amd64_gcc530...REL/CMSSW_8_0_20_patch1/slc6_amd64_gcc530)

repository: rovere/ReleaseNotes

repo_name: rovere/ReleaseNotes


text:
# Chocolate Sample - iOS

This sample demonstrates how to display different types of ads using Chocolate Mediation Ads SDK for Xamarin. The project builds as is, however, to display ads, you will first need to obtain an API Key from Chocolate. Contact us at<EMAIL_ADDRESS>
Once you obtain the API Key, open the `AppDelegate.cs` file in the project and in the following line:

`ChocolatePlatform.InitWithAdUnitID("AAAAAA");`

Replace `AAAAAA` with the received API Key. The SDK is now ready to deliver ads.

The Chocolate SDK performs ad mediation among different partners, and delivers the best-yielding ad on each request. The partners for different ad types are as following:

1. Interstitial ads: Chocolate, AdColony, AppLovin, Amazon, Google Admob, and Unity
2. Rewarded ads: Chocolate, AdColony, AppLovin, Amazon, Google Admob, and Unity
3. Inview (300x250) ads: Chocolate, AppLovin, Amazon, and Google Admob

### Integrating the Chocolate SDK in your own Xamarin app

1. Add the Nuget package `xam.ios.chocolate_all` to the project. This package includes the compiled binaries for all the partners, as well as C# files in the `ChocolateSDK` namespace. You will need to include `using ChocolateSDK;` to any file where you use Chocolate's APIs

2. Initialize the SDK with your Chocolate API Key: `ChocolatePlatform.InitWithAdUnitID("YOUR_API_KEY_HERE");`. It is better to do this as early in the app launch cycle as possible, ideally in the `FinishedLaunching` method of `AppDelegate.cs`.

3. Implement the sets of callback methods to receive events from the SDK for the ad types you want to display. These are declared in the `IChocolatePlatformInterstitialAdDelegate`, `IChocolatePlatformRewardAdDelegate`, and `IChocolatePlatformInviewAdDelegate` interfaces.

4. Create the appropriate ad instances and call the APIs in the manner demonstrated within this project's `ViewController.cs` class. Make sure you only call the ad object's "Show" method (`ShowFrom` for interstitial, `Show` for reward, and `ShowIn` for inview) only after receiving the corresponding Loaded callback.


text:
# Cleanup Workflow History
## Requires
- Visual Studio 2005
## License
- Apache License, Version 2.0
## Technologies
- SharePoint
- SharePoint 2007
- SharePoint 2010
## Topics
- SharePoint Workflow
- SharePoint Administration
## Updated
- 09/09/2011
## Description

A command-line tool to cleanup the workflow history list in a SharePoint site. SharePoint has a "Workflow Auto Cleanup" job that deletes the association, but it does not delete items from the Workflow History list.

Background

When I started my job, I was told that one of the Workflow History lists for an InfoPath form that uses SharePoint 2007 workflows had around 500,000 items in it. To clean the Workflow History list, they would delete & recreate the site. I couldn't find
 any other solutions so I wrote this console application. I used it to get the list to under 10,000 items, and I still run it every night to keep the list at a manageable size.

Update (2/9/11): I have confirmed with Microsoft Support that this issue still exists in SharePoint 2010

Update (3/15/11): As discussed in the Q&A section, if you are going to use this on SharePoint 2010 servers you will need to recompile the project using the .Net 3.5 Framework.  If
 you are going to use this on SharePoint 2007, you don't have to make any changes.  I will upload a VS2010 version of this project shortly.

http://technet.microsoft.com/en-us/library/cc298800%28office.12%29.aspx

By default, Microsoft Office SharePoint Server 2007 runs a daily Workflow Auto Cleanup job to permanently delete workflow instances and related task entries that still exist 60 days after a workflow is completed or cancelled.
Workflow history items themselves are not deleted, but the entry point to view them on the status page for a particular instance will no longer be available.

Usage

Run CleanupWorkflowHistory .exe from the command line without any parameters to see how to use it. All of the parameters are required:

• SiteUrl – URL to the SharePoint site

• ListName – Name of the Workflow History list

• NumDays – Delete items with Last Modified date older than (Today – NumDays). The Auto Cleanup timer job uses 60 days by default, so use 60 if you are unsure what to use.

• MaxHistoryListDelete – Maximum number of items to delete from the Workflow History list

• MaxRecycleBinDelete – Maximum number of items to delete from the Recycle Bin

• PermanentDelete – Permanently delete list items from the Recycle Bin

• ReportOnly – Run in read-only mode

• LogFileName – Name of the file to use for logging (overwrite if it exists)

Example:

CleanupWorkflowHistory.exe http://moss/site "Workflow History" 60 100 100 false true Cleanup.log

Recommendations

Some things to keep in mind when cleaning up the workflow history lists with this application:

• Do it during off-hours. In the application I use the most efficient way to do batch updates in SharePoint (SPWeb.ProcessBatchData). The WFE SharePoint servers won’t be affected much, but the SQL database server may get busy.

• Pause SharePoint Search crawls if you have any scheduled to run while you are doing the clean up.

• Make sure you don’t have a SharePoint / SQL backup scheduled to run while you are doing the clean up.

• Keep an eye on the SQL transaction logs. Depending on how many items you delete, the transaction logs could become pretty big. Here’s my thread on TechNet that shows one problem I ran into, and how I fixed it:

http://social.technet.microsoft.com/Forums/en-US/sharepointadmin/thread/05c2e4a1-33c2-439e-bacf-870410e4366a.

• Once you have a feel for how long it takes to complete a “cycle”, you can use Scheduled Tasks to run it from the command line and have it run every X minutes (instead of running it manually).

For reference, I had a Workflow History list with 500,000 items, and I used this tool to clean it up. Initially, I was able to delete 7,500 items in 25 minutes, so I scheduled it to run every 30 minutes. As the size of the list gets smaller, less time is required
 to do the cleanup.

• Run it on a development server first so you know what to expect.

CleanupWorkflowHistory.exe running in Report Mode (read-only):

CleanupWorkflowHistory logfile:

path: /Cleanup Workflow History/README.md


text:
---
title: 'Installation'
weight: 100
---

Some operations are required to grant proper permission from macOS to Karabiner-Elements.
Follow these instructions to set up Karabiner-Elements.

## Install Karabiner-Elements

1.  Open the downloaded file.
    <img<EMAIL_ADDRESS>alt="dmg" width="64" />
2.  Open the .pkg file.
    <img<EMAIL_ADDRESS>alt="pkg" width="64" />
3.  The installer will be opened. Install Karabiner-Elements.
    {{< local-image<EMAIL_ADDRESS>>}}

## Keep Login Items enabled

Since macOS 13 Ventura, background item notifications will be shown after the installation.

{{< local-image<EMAIL_ADDRESS>>}}

The following Login Items in System Settings are required, and have to keep enabled.

-   `Karabiner-DriverKit-VirtualHIDDeviceClient.app`
-   `Karabiner-Elements.app`

{{< local-image<EMAIL_ADDRESS>>}}

{{% alert title="Note" color="primary" %}}

If you are using macOS 12 or prior, these items are not shown in System Preferences.
Please proceed to the next step.

{{% /alert %}}

## Open Karabiner-Elements Settings

1.  Open Karabiner-Elements from Launchpad.
    {{< local-image<EMAIL_ADDRESS>>}}

## Allow system software which provides virtual devices for Karabiner-Elements

1.  The following alert will be shown when you open Karabiner-Elements Settings.
2.  Click **Open System Settings** button, then press the **Allow** button.
    {{< local-image<EMAIL_ADDRESS>>}}
    {{< local-image<EMAIL_ADDRESS>>}}

{{% alert title="Note" color="primary" %}}

Please follow [this instruction](../../help/troubleshooting/kext-allow-button-does-not-work/) if there is any problem with the **Allow** button.

{{% /alert %}}

## Grant Input Monitoring to Karabiner-Elements processes

1.  **Two Keystroke Receiving** alerts will be shown on macOS Catalina or later after you allow the system software.
2.  Press the **Open System Settings** button on both alerts.
    {{< local-image<EMAIL_ADDRESS>>}}
    {{< local-image<EMAIL_ADDRESS>>}}
3.  System Settings will be opened after you press the **Open System Settings** button.

    Choose **Privacy & Security > Input Monitoring**, and then enable **karabiner_grabber** and **karabiner_observer**.

    {{< local-image<EMAIL_ADDRESS>>}}

## Setup your keyboard layout

1.  Keyboard Setup Assistant will be opened.

    Choose your keyboard layout. (ANSI, ISO or JIS)
    {{< local-image<EMAIL_ADDRESS>>}}

## Configure Karabiner-Elements

Enjoy keyboard configuration!

-   [Configuration manual](../../manual/configuration/)

license: Unlicense

gha_language: HTML

gha_license_id: Unlicense


text:
# encoding/json [![GoDoc](https://godoc.org/github.com/segmentio/encoding/json?status.svg)](https://godoc.org/github.com/segmentio/encoding/json)

Go package offering a replacement implementation of the standard library's
[`encoding/json`](https://golang.org/pkg/encoding/json/) package, with much
better performance.

## Usage

The exported API of this package mirrors the standard library's
[`encoding/json`](https://golang.org/pkg/encoding/json/) package, the only
change needed to take advantage of the performance improvements is the import
path of the `json` package, from:
```go
import (
    "encoding/json"
)
```
to
```go
import (
    "github.com/segmentio/encoding/json"
)
```

One way to gain higher encoding throughput is to disable HTML escaping.
It allows the string encoding to use a much more efficient code path which
does not require parsing UTF-8 runes most of the time.

## Performance Improvements

The internal implementation uses a fair amount of unsafe operations (untyped
code, pointer arithmetic, etc...) to avoid using reflection as much as possible,
which is often the reason why serialization code has a large CPU and memory
footprint.

The package aims for zero unnecessary dynamic memory allocations and hot code
paths that are mostly free from calls into the reflect package.

## Compatibility with encoding/json

This package aims to be a drop-in replacement, therefore it is tested to behave
exactly like the standard library's package. However, there are still a few
missing features that have not been ported yet:

- Streaming decoder, currently the `Decoder` implementation offered by the
package does not support progressively reading values from a JSON array (unlike
the standard library). In our experience this is a very rare use-case, if you
need it you're better off sticking to the standard library, or spend a bit of
time implementing it in here ;)

Note that none of those features should result in performance degradations if
they were implemented in the package, and we welcome contributions!

## Trade-offs

As one would expect, we had to make a couple of trade-offs to achieve greater
performance than the standard library, but there were also features that we
did not want to give away.

Other open-source packages offering a reduced CPU and memory footprint usually
do so by designing a different API, or require code generation (therefore adding
complexity to the build process). These were not acceptable conditions for us,
as we were not willing to trade off developer productivity for better runtime
performance. To achieve this, we chose to exactly replicate the standard
library interfaces and behavior, which meant the package implementation was the
only area that we were able to work with. The internals of this package make
heavy use of unsafe pointer arithmetics and other performance optimizations,
and therefore are not as approachable as typical Go programs. Basically, we put
a bigger burden on maintainers to achieve better runtime cost without
sacrificing developer productivity.

For these reasons, we also don't believe that this code should be ported upstream
to the standard `encoding/json` package. The standard library has to remain
readable and approachable to maximize stability and maintainability, and make
projects like this one possible because a high quality reference implementation
already exists.

repository: GoogleContainerTools/skaffold

gha_language: Go

repo_name: GoogleContainerTools/skaffold


text:
# Translating Software Carpentry

Presentation about translating the [Software Carpentry](https://software-carpentry.org) curricula given to [Workflow meetup on 2019-12-16](https://github.com/manabuishii/workflow-meetup/wiki/20191216).

Slides are here: https://joelnitta.github.io/swc-trans-2019-12-16/

For more about the translation project, see this repo: https://github.com/swcarpentry-ja/i18n/

... and these blogposts:

- https://carpentries.org/blog/2019/11/local-team-japan/

- https://carpentries.org/blog/2019/11/translations-in-japanese/


text:
yii1 OciDbAuthManager
================

The problem is that Oracle use capital letters because of naming conventions. Provided schema-oci.sql and DbAuthManager simply don't work.

OciDbAuthManager is the rewrite of DbAuthManager with column names capitalized. SQLite check was removed also, because it is not needed.

1. Run the quieries from schema-oci.sql to create authorization tables.
2. Upload OciDbAuthManager.php to components folder
3. And call it in the main.php
```php
 'authManager'=>array(
    'class'=>'OciCDbAuthManager',
  ),
```

repository: ruskid/OciDbAuthManager

repo_name: ruskid/OciDbAuthManager


text:
---
layout: post
title: Poisoned Summer
---

Collecting artisan keycaps has become a bit of a hobby of mine recently. In this post, I aim to educate readers on some light history of this somewhat niche community before showcasing the most recent "Poisoned Summer" Nightcaps sales by Eat The Food.
<!--more-->
# The Mechanical Keyboard Community

![Poisoned Summer](http://i.imgur.com/pf5F64p.jpg)

## /r/MK
Places like /r/mechanicalkeyboards and GeekHack have long served as hubs for interested parties to discuss myriad keyboards, switches and, yes, even artisan keycaps. Heated discussions have raged about the superiority of Topre switches over the different Cherry MX switches and it didn't take long before people started trading boards, caps and keysets. Switching the keyset of one keyboard onto another gave a different look or feel and soon became fashion.

![HHKB](https://i.redd.it/hzmbats99acy.jpg)

## /r/MM
Another subreddit soon emerged for the specific purpose of uniting buyers with sellers: /r/MechMarket, serving as an internet bazaar for all the different keyboard components out there, has grown to a community of 22,450 members, which is a far cry from /r/MK's 184,355. People visit the sub to buy or sell their boards, caps, and even custom USB cables. It wasn't long until certain items grew in popularity and in price. Older keyboards like the IBM Model M, pictured below, took precedent for their uniquely loud buckling spring switch design, which, supposedly feels great to type on. These boards typically sell for around $200 if they're in great condition.

![Model M](https://steemitimages.com/DQmXBr8tV6SJ4NsbeYJsHira34AD1BYhaKWB3Ga1SfpkKTC/ModelM.jpg)

But, there is an even more expensive and more sought after category, which now dominates the bulk of private sales.

## Artisan Keycaps
Artisan Caps, while somewhat strange and possibly hard to understand for most people, have grown in popularity and demand for these tiny figurines has gone through the roof in recent years. Among the first artisans on the scene and arguably the most important, ClickClack AKA ClackFactory was first on the scene producing the "Click Clack Skull" artisan keycap, commonly referred to as "Clacks", pictured below.

![Clacks](https://steemitimages.com/DQmYjCCQvjezPZqjiApPk4rXBnX2NQfbo2gZr81Emhjahfv/clack6.jpg)

These caps are well known and tend to be some of, if not the most expensive caps currently on the market. They are highly sought after, which has driven the price up to over $1,000, which may be the highest price paid for any key cap. Depending on the colorway and stem type (MX or Topre), the price of a Clack can vary, but most fluctuate between the $300 and $400 range.

Today the artisan keycap market isn't exactly flooded, but there are many players on the field. Among my personal favorite artisans, there are two who seem to stand out the most. BroCaps and Eat_The_Food have been making caps for quite some time and their quality is among the highest.

## Bro
BroCaps makes a few different caps, but my favorite among them are the BroBotV2's. Unfortunately for me, these caps also range on the higher end of the spectrum, usually hovering around the $200 to $300 price point, again depending on the colorway and stem.

Bro has sales where you can purchase the caps directly, every 4 months or so.

![Three Kings Gold](https://steemitimages.com/DQmYsLCqhvCg7d3j2TWJRY8peUhVDcVGhPyxZkvFnXDMPSx/bbv2gold.jpg)

## Eat the Food
My second favorite artisan cap would be the Fugu, made by ETF. The character of the cap is a blow fish or "puffer" fish and, just like the others, price varies by color and stem however these artisans are much easier to acquire because they are offered for sale more frequently and at a lower price, usually in the $40 to $60 range, although the aftermarket prices can usually climb much higher for the rarer fugus.

![St. Patrick](https://i.imgur.com/ma2a4JB.jpg)

![fugus](http://i.imgur.com/MmqVRbD.jpg)

## Raffles
Believe it or not, acquiring these little figures can be a difficult process. Most key makers hold sales in the form of raffles. Artisans will typically post a link, either on /r/MM or GeekHack, to a Google Form where hopeful customers fill out their PayPal address, select their favorite colors, stem type and how many caps they'd like to buy. Most caps, when bought directly from the maker, are sold in the $30 to $60 price range. However, simply filling out the form does not guarantee you a spot in the sale. Supplies are extremely limited and demand is outrageously high. These days the cap creators use random number generators, trivia questions and first come first serve sales to narrow down a selection of customers who are lucky enough to be awarded the privilege to purchase the merchandise. Needless to say, they can be hard to get.

Trading is highly encouraged by the community and by the artisans themselves. Some users have been banned from future raffles simply by listing the caps they've won for sale too soon after the official sale has ended.

## ETF's Poisoned Summer

![Poisoned Summer](http://i.imgur.com/pf5F64p.jpg)

A friend messaged me about a rumor he heard, saying that ETF would be holding a few raffles on /r/MM in the next couple of days and that I should keep an eye out. I was pretty excited for the chance to snag a couple Fugus from the man himself, instead of suffering the extreme markups introduced by the private third-party sellers on MechMarket. The details were that it would be a FCFS (first come, first served) sale and that there would be only 20 caps made of each colorway, so a prospective buyer would have to be quick.

In order to get into the sale, you'd have to be one of the first twenty people to find the link, fill out the form and submit it before all 20 caps sold out. Thankfully, I work on a computer and it wasn't hard to keep a tab open in the corner of the screen, refreshing every 30 seconds or so.

It wasn't long before we all found out that there would be one sale per day, unannounced, posted on /r/MM. Each day would be a new color scheme and there would only ever be 20 made. I was glued to the screen for the first day, refreshing the /new page of MechMarket, watching for the unannounced sale to begin. My diligence paid off. As soon as the post went up, it only took about 45 seconds for the first 20 caps to sell out, but I made it in. I was number 8. Victory. I'd won my first FCFS sale and I was now the proud, soon-to-be owner of a rare "Surgical Shine Job" Fugu.

![Surgical Shine Job](http://i.imgur.com/auXxpIS.jpg)

I tried to stick to the same process on day 2, but "real life" took me away from the screen and I couldn't watch as closely. But when day 3 came along, I made sure not to miss it. I was able to snag my second Fugu, "Phosphene".

![Phosphene](http://i.imgur.com/tTarLRe.jpg)

I was surprised with how bright the pink was. The packaging the caps came in was pretty cool too, shipping boxes stamped by the artisan with a Fugu logo and sealed in paper bags with some art on them.

![USPS](http://i.imgur.com/TK60Yxe.jpg)

![Paper or Plastic](http://i.imgur.com/Re8xr3f.jpg)

No one knows how many days Poisoned Summer will continue for, but day 10 will be held on /r/MM some time today, 6/29/17.

gha_language: CSS


text:
UnifiedPreference
=================

UnifiedPreference is a library for working with all versions of the
Android Preference package from API v4 and up.

Features
========

 * Easy to use
 * Takes care of most of the boilerplate code
 * Tiny, only ~5k!
 * Use a single pane for phones, or headers and fragments for tablets
 * Binds preference values to summaries according to Android Design
   Guidelines
 * Translated to 50 locales (imported from AOSP internal strings)
 * Uses ActionBarSherlock (optional)

How to Use
==========

 1. Ensure your project has one preference xml file for each desired header
 2. Create or modify a header xml file *using your project's own namespace*
    for header attributes. Be sure to define preferenceRes for each.

	```xml
	<preference-headers xmlns:android="http://schemas.android.com/apk/res/android"
		xmlns:unified="http://schemas.android.com/apk/res-auto" >

		<header
		unified:fragment="your.project.namespace.SampleActivity$SampleFragment"
		unified:title="@string/pref_header_sample"
		unified:preferenceRes="@xml/pref_sample" />

	</preference-headers>
	```

 3. Subclass UnifiedPreferenceActivity (or UnifiedSherlockPreferenceActivity
    for ABS). Call setHeaderRes before super.onCreate and subclass the fragments here.

	```java
	public class SampleActivity extends UnifiedPreferenceActivity {

		@Override public void onCreate(Bundle savedInstanceState) {
			setHeaderRes(R.xml.pref_headers);
			super.onCreate(savedInstanceState);
		}

		public static class SampleFragment extends UnifiedPreferenceFragment {}
	```

Thats it! See the demo project for a more in depth example of how to use the library.

Author
======

 * Joel Pedraza - [Google+](http://plus.google.com/111289811888358912498/)

Screenshots
===========

![Framed artwork](https://raw.github.com/saik0/UnifiedPreference/website/images/framed_all.png "Framed artwork")

FAQ
===

When is a two-pane layout used?

 > When com.android.internal.R.bool.preferences_prefer_dual_pane evaluates to true. In AOSP this is true for sw720dp
   but this may vary by OEM or third party ROM.

License
=======

Copyright 2012 Joel Pedraza

    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

       http://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: pstanisl/UnifiedPreference

repo_name: pstanisl/UnifiedPreference


text:
---
layout: post
title: "A Summary: Cracking the Coding Interview"
date: 2018-11-17 13:13:21
categories: featured discourse
---

I read this awful book, a tome which characterises all the worst elements of the technology industry, so you don't have to. Included is a short summary of each chapter and my takeaways.

Table of Contents

1. Seed entry for TOC
{:toc}

# Chapter Summaries

The **foreword** states that interviews are hard. Your primary focus should be applying your skills and intuition to a problem. Solving the problem is of less importance than your technical process.

Following this, the **introduction** outlines a scenario where a highly qualified friend was turned down for a job at Google. His academic programming skills were sublime, but *K&R* and *CLRS* were not enough to prepare him for interviews, despite the theory being incredibly valuable once *on the job.* Real interview questions focus on developing 'fresh' algorithms rather than memorizing existing problems.

## The Interview Process

Algorithms and programming problems are the largest component of a tech interview; the interviewer is attempting to evaluate your ability to solve unfamiliar problems. It is essential to vocalize your thought process. The method by which you analyse, propose a solution, judge tradeoffs, and implement a solution to a problem will be compared to others who have been interviewed.

Academic knowledge of data structures and algorithms is useful. It is hard to formulate problem-solving questions that don't involve a data structure.

## Behind the Scenes
## Special Situations
## Before the Interview
## Behavioural Questions
## Big O
## Technical Questions
## The Offer and Beyond
## Interview Questions

# Analysis

Bla, bla, bla.

# Further Reading
- K&R C
- CLRS Algorithms

# Sample Header One

-  Ω  -

![Image.]({{ site.url }}/assets/opinion.gif){: .center-image}

Thanks for reading,


text:
---
title: 'JS: Getting Started'
position: 0
description: "Prepare your development environment to use Javascript with the Steem blockchain."
layout: full
---
Full, runnable src of [Getting Started](https://github.com/steemit/devportal-tutorials-js/tree/master/tutorials/00_getting_started) can be downloaded as part of the [JS tutorials repository](https://github.com/steemit/devportal-tutorials-js).

For Javascript tutorials, we will use the opensource library [dsteem](https://github.com/steemit/dsteem).

### Node.js

To get the most out of these tutorials, you should be familiar with [Node.js](https://nodejs.org/en/), [ES6](https://babeljs.io/learn-es2015/) aka [es2015](http://www.ecma-international.org/ecma-262/6.0/), the DOM, and modern Javascript programming practices.
You can still learn a lot of these if they aren't in your base skill-set; it'll be much easier if they are.

### Your Dev Environment

These tutorials require [Node.js 8.9+](https://nodejs.org/en/download/). [Yarn](https://yarnpkg.com/en/) is nice, but not required. Runnable versions of the tutorials are located [in this github repo](https://github.com/steemit/devportal-tutorials-js).
If you haven't chosen an editor, you can use [Atom](https://atom.io/), [Sublime](https://www.sublimetext.com/), [Intellij](https://www.jetbrains.com/idea/), [Vi](https://en.wikipedia.org/wiki/Vi), etc.

If you want to keep multiple versions of Node on your system try [Node Version Manager](https://github.com/creationix/nvm).

### Running a typical Tutorial

Let's say you wanted to run the very [first tutorial](blog_feed), `01_blog_feed`. Here's how you'd do it:

1.  From Bash:

    ```bash
    git clone https://github.com/steemit/devportal-tutorials-js.git

    cd devportal-tutorials-js/tutorials/01_blog_feed
    npm i
    npm run dev-server
    ```

1.  open http://localhost:3000/ in your web browser

```
### Github

If you'd rather clone projects in a windowed environment rather than the terminal, consider [Github Desktop](https://desktop.github.com/).
```

---

repository: steemit/devportal

branch_name: refs/heads/develop

repo_name: steemit/devportal


text:
# typed-REST

REST API with TypeScript definition. This does not provide runtypes or any validation library.

Of course, this is similar to [RESTyped or rest.ts](https://github.com/hmil/rest.ts/wiki/Rest.ts-vs-RESTyped), but I created this in order to use the latest libraries

- Latest TypeScript
- Latest Axios (Currently, can only use up to 0.18.1 as 0.19.0 produces error)

repository: patarapolw/typed-rest

repo_name: patarapolw/typed-rest