text:
---
external help file: TeamViewerPS-help.xml
Module Name: TeamViewerPS
online version: https://github.com/teamviewer/TeamViewerPS/blob/main/docs/commands/Remove-TeamViewerManagedDevice.md
schema: 2.0.0
---

# Remove-TeamViewerManagedDevice

## SYNOPSIS

Remove a managed device from a managed group.

## SYNTAX

```powershell
Remove-TeamViewerManagedDevice [-ApiToken] <SecureString> [-Device] <Object> [[-Group] <Object>] [-WhatIf]
 [-Confirm] [<CommonParameters>]
```

## DESCRIPTION

Removes a managed device from a managed group. The device remains in the
pending status "leave" until it gets online and actually leaves the managed
group. The current account needs `DeviceAdministration` manager permissions on
the device.

## EXAMPLES

### Example 1

```powershell
PS /> Remove-TeamViewerManagedDevice -Device 'c0cb303a-8a85-4e54-b657-a4757c791aef' -Group '9fd16af0-c224-4242-998e-a7138b038dbb'
```

## PARAMETERS

### -ApiToken

The TeamViewer API access token.

```yaml
Type: SecureString
Parameter Sets: (All)
Aliases:

Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### -Confirm

Prompts you for confirmation before running the cmdlet.

```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### -Device

Object that can be used to identify the managed device.
This can either be the managed device ID (as string or GUID) or a managed device
object that has been received using other module functions.

```yaml
Type: Object
Parameter Sets: (All)
Aliases: DeviceId

Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
```

### -Group

Object that can be used to identify the managed group.
This can either be the managed group ID (as string or GUID) or a managed group
object that has been received using other module functions.

```yaml
Type: Object
Parameter Sets: (All)
Aliases: GroupId

Required: False
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### -WhatIf

Shows what would happen if the cmdlet runs.
The cmdlet is not run.

```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).

## INPUTS

### System.Object

## OUTPUTS

## NOTES

## RELATED LINKS

repository: franc-lambrecht-teamviewer/TeamViewerPS

repo_name: franc-lambrecht-teamviewer/TeamViewerPS


text:
# SqlQuery

## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**can** | Option<**::std::collections::HashMap<String, bool>**> | Operations the current user is able to perform on this object | [optional][readonly]
**slug** | Option<**String**> | The identifier of the SQL query | [optional][readonly]
**last_runtime** | Option<**f32**> | Number of seconds this query took to run the most recent time it was run | [optional][readonly]
**run_count** | Option<**i64**> | Number of times this query has been run | [optional][readonly]
**browser_limit** | Option<**i64**> | Maximum number of rows this query will display on the SQL Runner page | [optional][readonly]
**sql** | Option<**String**> | SQL query text | [optional][readonly]
**last_run_at** | Option<**String**> | The most recent time this query was run | [optional][readonly]
**connection** | Option<[**crate::models::DbConnectionBase**](DBConnectionBase.md)> |  | [optional]
**model_name** | Option<**String**> | Model name this query uses | [optional][readonly]
**creator** | Option<[**crate::models::UserPublic**](UserPublic.md)> |  | [optional]
**explore_url** | Option<**String**> | Explore page URL for this SQL query | [optional][readonly]
**plaintext** | Option<**bool**> | Should this query be rendered as plain text | [optional][readonly]
**vis_config** | Option<**::std::collections::HashMap<String, String>**> | Visualization configuration properties. These properties are typically opaque and differ based on the type of visualization used. There is no specified set of allowed keys. The values can be any type supported by JSON. A \"type\" key with a string value is often present, and is used by Looker to determine which visualization to present. Visualizations ignore unknown vis_config properties. | [optional]
**result_maker_id** | Option<**i64**> | ID of the ResultMakerLookup entry. | [optional]

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

license: MIT

repository: hirosassa/looker-rs

branch_name: refs/heads/master

extension: md

gha_language: Rust

gha_license_id: MIT

license_type: permissive

repo_name: hirosassa/looker-rs


text:
//[astronomy](../../../../index.md)/[io.github.cosinekitty.astronomy](../../index.md)/[Time](../index.md)/[Companion](index.md)/[fromMillisecondsSince1970](from-milliseconds-since1970.md)

# fromMillisecondsSince1970

@[JvmStatic](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.jvm/-jvm-static/index.html)

fun [fromMillisecondsSince1970](from-milliseconds-since1970.md)(millis: [Long](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html)): [Time](../index.md)

Creates a Time object from the number of milliseconds since the 1970 epoch.

Operating systems and runtime libraries commonly measure civil time in integer milliseconds since January 1, 1970 at 00:00 UTC (midnight). To facilitate using such values for astronomy calculations, this function converts a millsecond count into a Time object.

repository: cosinekitty/astronomy

gha_language: C

repo_name: cosinekitty/astronomy


text:
---
layout: post
title:      "Help, I Need a Helper Method"
date:       2019-10-29 20:20:19 +0000
permalink:  help_i_need_a_helper_method
---

While I was working on my Sinatra portfolio project for Flatiron, I found myself writing some of the same lines of code over and over.  I didn't really see anyway to avoid this and, frankly, was just glad things were working and I was moving forward.  When I had my project assessment, my review coach suggested refactoring some of my code into a helper method.

![](https://media.giphy.com/media/4dQxifEBXoD6w/giphy.gif)

For reference, here is a quick summary of the Sinatra project from the curriculum:

> For this assessment you'll be creating a CRUD, MVC app using Sinatra. This app should be a custom app that is created to track something important to you, whether that's your golf club collection, video games, or travel destinations. Essentially, you're building a simple Content Management System (CMS) using the tools you've learned thus far.

My application is designed to allow users to track their kids' toys.  If you don't have kids, I'm sure you've visited the homes of those that do and witnessed first-hand the epic accumulation of toys.  If you have kids - you are aware of the problem.

Within my Toys Controller, which handles routing all of the  '/toys' domain  requests from the browser, I have the following code:

```
get '/toys/:id' do
    redirect_if_not_logged_in
    @toy = Toy.find(params[:id])
    if current_user.toys.include?(@toy)
      erb :'toys/show'
    else
      flash[:errors] = "Can't find that toy!"
      redirect to '/toys'
    end
  end
```

Several routes within the Toys Controller, four to be precise, contain these specific lines:

```
 if current_user.toys.include?(@toy)
			erb :'toys/some_view'
    else
      flash[:errors] = "Can't find that toy!"
      redirect to '/toys'
    end
```

This is where a helper method can come in handy.

```
helpers do

    def redirect_if_not_user_owned(toy)
      if !current_user.toys.include?(toy)
        flash[:message] = "Toy not found!"
        redirect to "/toys"
      end
    end

end
```

This is the same logic, just seperated into it's own method which will be accessible to everything within the ToysController Class.  My redirect_if_not_user_owned method takes an argument, but since helper methods have access to instance variables (i.e. '@toy'), it isn't strictly neccesary.  I thought it might provide some flexibility in the instance another method doesn't define the instance variable needed.

So refactoring the route with this new helper method looks like this:

```
get '/toys/:id' do
    redirect_if_not_logged_in
    @toy = Toy.find_by_id(params[:id])
    redirect_if_not_user_owned(@toy)
    erb :'toys/show'
  end
	```

The helper method allows for much more readability and simplicity than the alternative.  I was able to clean up 20+ repetitive lines.  I took this same approach for the rest of my controllers and feel like my code looks much cleaner.  Give it a whirl if you are feeling tidy.

extension: markdown


text:
soylent-green
=============

Green style for Soylent News

Changes to the site CSS:

* Turn Soylent News from red to green.
* Use CSS rounded borders instead of rounded GIFs.
* Change background colors.
* Change font size and spacing (the font line in body {} is important)

Include this file in Stylish with these two lines in the Stylish editor:

    @import "file:///path/to/stylish/soylent-green.css";
    @-moz-document url-prefix(http), url-prefix(file) {}

Keep the Stylish window open and click Preview to make it apply your changes.

Thanks to http://snarfed.org/my_stylish_userstyle_workflow for that

license: Unlicense

repository: pmontrasio/soylent-green

repo_name: pmontrasio/soylent-green


text:
# tba.rb

[![Gem Version](https://badge.fury.io/rb/tba.svg)](https://badge.fury.io/rb/tba)

Unofficial Ruby API to get data from The Blue Alliance.

This API returns JSON-parsed data fetched from The Blue Alliance's API.

## Installation

Add `tba.rb` to your Gemfile.
```ruby
gem 'tba'
```
and then run
```bash
bundle install
```
in the same directory as the Gemfile.

or manually install using this command
```bash
gem install tba
```

## Setup
To use these functions, you must require the `tba` gem:

    require 'tba'

Before using the API, you must instantiate the class, providing your application's ID in the format `author:application:version`, for example:

    tba = TBA.new('frc254:cheesy_arena:v2.2')

or

    tba = TBA.new('woodie_flowers:scouting-system:5')

The Blue Alliance's API requires that all applications identify themselves when retrieving data.

## Retrieval Functions
These functions should all be preceded by `tba.` (replace with your instance's name if you changed it above).
* `get_teams(page)` - Get a list of of valid teams, where `page * 500` is the starting team number.
* `get_team(team)` - Get a team's data.
* `get_team_events(team, year)` - Get a list of events a team has been to.
* `get_team_awards(team, [event])` - Get a list of the team's awards. _OPTIONAL: Specify an event that you want awards from. Otherwise all a team's awards will be returned._
* `get_team_matches(team, event)` - Get a list of a team's matches at an event.
* `get_team_years(team)` - Get a list of years the team was active in FRC.
* `get_team_media(team, [year])` - Get team media. _OPTIONAL: Specify a year to get media from. Otherwise the current year will be inferred._
* `get_team_history_events(team)` - Get events that a team has been to.
* `get_team_history_awards(team)` - Get all awards that a team has received.
* `get_team_history_robots(team)` - Get all of a team's robots.
* `get_team_history_districts(team)` - Get the districts that a team has been part of over the years.
* `get_event_list([year])` - Get a list of all events. _OPTIONAL: Include a year to get events from that year. Otherwise the current year's events will be returned._
* `get_event(event)` - Get data about an event.
* `get_event_stats(event)` - Get statistics from an event.
* `get_event_rankings(event)` - Get the rankings at an event.
* `get_event_awards(event)` - Get the awards from an event.
* `get_event_matches(event)` - Get a match list of an event.
* `get_district_points(event)` - Get points from a district.
* `get_match(match)` - Get data about a match.
* `get_districts(year)` - Get a list of all districts that exist(ed) in a given year.
* `get_district_events(district, year)` - Get list of events in a district.
* `get_district_rankings(district, year)` - Get the rankings in a district.
* `get_district_teams(district, year)` - Get a list of the teams in a district.

See `example.rb` for a usage example.

Documentation for The Blue Alliance's API can be found [here](https://www.thebluealliance.com/apidocs).

## Authors
This software was created and is maintained by [Erik Boesen](https://github.com/ErikBoesen) with [Team 1418](https://github.com/frc1418).

## License
This software is protected under the [MIT License](LICENSE).


text:
# ArgParser

ArgParser is a simplified argument parser / multiplatform CLI for Kotlin.

With only about 500 LoC implementation, ArgParser has:

- Parsing for params, flags, items(positional args) and [subcommands](src/commonMain/kotlin/org/parserkt/argp/ParserTricks.kt)
- Type safe and convince data model (`Tuple4`/`OneOrMore` and `NamedMap`, you can ignore them and just use `ArgParserBy`)
- No pre-defined command syntax restriction, only prefixed(param, flag) and unprefixed(item) args are distinguished
- No self-made concept, let users define `-v`, `-h` (`ParseStop`) and `--` (`PrefixesStop`) behavior themselves

```kotlin
object ReadMap: ArgParser3<String, Pair<String, String>, String>(
  arg("name", "store mapping to a name", param = "map_name", default_value = "anonymous") { require(it.isNotBlank()) ; it },
  arg("map m", "maps a key to its value", "k v", repeatable = true, convert = multiParam { it[0] to it[1] }),
  arg("mode", "mode of this mapping", ""/*default to it's name, "mode"*/, "none").checkOptions("none", "mutable", "linked"),
  arg("v", "print version") { println("mapper v1.0") ; throw SwitchParser.ParseStop }
)
```

And the one using `ArgParserBy` wrapper:

```kotlin
class ReadMapUsingBy(ap: ArgParserBy) {
  val name by ap+arg("name", "...", "map_name", "anonymous") { require(it.isNotBlank()) ; it }
  val map by (ap+arg("map m", "...", "k v", convert = multiParam { it[0] to it[1] })).multiply { it.toMap() }
  val mode by ap+arg("mode", "...", "", "none").checkOptions("none", "mutable", "linked")
  val showVer by ap+arg("v", "print version") { println("v1.0") ; SwitchParser.stop() }//should not be accessed
  val isShowVer/*run later?*/ by ap.flag("v", "print version", "vh") // when 'h' in res.flags, item count/ordering checking are suppressed.
}
```

Subcommands:

```kotlin
class Pip(ap: ArgParserBy) {
  val show = ArgParserBy("show").apply {
    flag("files f", "Show the full list of installed files for each package.")
    // Use general super class to add general(non subcommand specific) options.
  }
  val install = ArgParserBy("install").apply {
    this+arg("index-url i", "Base URL of Python Package Index", "url")
    (this+arg("requirement r", "Install from the given requirements file.", "file")).multiply()
    item(arg("target", "target specifier, maybe requirements file / VCS / local / PyPI", "archive url/path"))
  }
  init {
    ap+helpArg ; ap.asParser().addHelpSubCommand("pip")
    ap.flag("verbose v", "Give more output. Option is additive, and can be used up to 3 times.") // then check "vvv" in flags, or count { it == "v" }.
    ap.addSub("Show information about one or more installed packages.", show)
    ap.addSub("Install packages from PyPI/VCS/Local or remote path&archives", install)
    ap.addSub("Compute hashes of package archives.", ArgParserBy("hash").apply { items(arg("...", "")) })
  }
}
```

And the one using the old way:

```kotlin
object PipOld: ArgParser1<Unit>(noArg, helpArg) {
  init { addSub("show", "...", Show) ; addHelpSubCommand("pip") }
  object Show: ArgParser1<Unit>(noArg, arg("files f", "..."))
}
```

## Features 🎁

+ Supports named args `--a=b`(using `autoSplit=listOf("a=")`) with configurable prefix list
+ Supports variable number of items and named destruct (both `[src...] [dst]` and `[dst] [src...]` are supported)
+ Extension funs for idiom: `checkOptions(*strings)`, `options("a" to 1)`, `options(SomeEnum)`, `getEnv()`, `multiParam {list->}`, `defineFlags("enable-oo" to "O")`
+ Supports __repeatable args, multiply params, each can with a converter__
+ __Sub-commands and command alias__ (like `pip install`, `git commit -m` -> `git cm`)
+ Extensible using `override`, features like prompt when missing, mutually exclusive args, sequential prefixes(`ffmpeg`), @-file expansion, did-you-mean suggestion can be implmented easily
+ Generates well formatted line-wrapped help message (can be grouped), only with Kotlin's named arguments in `toString`(opened for override)
+ __Supports `backRun` unparsing__, so it's also fascinating to build a CLI program binding with this lib
+ Supports 3 different programming paradigm: procedural `SwitchParser`, OOP&FP `ArgParser`, reflect `ArgParserBy`
+ KISS(keep it simple, stupid) principle, modular programming, "Simplicity is the ultimate sophistication".
+ Readable code with reading order guide, <^v>comments and a little line breaks ;)
+ TBD: add shell completion gen(not compile time, req. Arg objects) in a separate module

## Not Features 😟

+ Doesn't provide basic APIs for building CLIs on Kotlin/Multiplatform
+ Use __*too much puzzling configuration objects*__ that hiding the essence from users (e.g. "token transformer" instead of Kotlin's native approach `ap.run(map {}.toTypedArray())`)
+ Define __*too complicated data/mental model*__ for command line args
+ Unchangable&invisible __*pre-defined syntax for args*__ (e.g. GNU/POSIX)
+ Boring API that have __*too much coding conventions(e.g. named parameter)*__ or boilerplate codes
+ Doesn't support argument types other than `String`, or expose unchecked types
+ Treating flags as "boolean params", instead of storing them together
+ Made it too complicated to set help-printing format
+ Call `exitProcess` instead of throwing `ParseError` to let users influence error behavior(e.g. to print usage)
+ Unnecessary reflection / lazy calculation(e.g. runParse)
+ Unnecessary design patterns(e.g. validator)/ Exception type definitions
+ Too long implementation code that scares newcomers from reading :fearful:

## FAQ

- _Why not add shorthands for types like `Double`, `kotlin.Pair` and `Triple`?_

I think using a general `convert` parameter for `arg` is sufficient, and those "special case" ain't special enough.

(In fact I checked `--help` option in ruby, python, lua, rustc, php, squeak, java, javac, kotlinc; no one have multi-param or float num options... even gcc, clang doesn't have much)

So what's the reason for adding them in `org.parserkt.argp`, instead of letting users to define them explicitly in their projects...

- _Why not enforce GNU(`-o`,`--name`,`--name=val`)/POSIX(`--`) syntax for cmdline_

This repository is licensed under MIT, neither GNU nor UNIX :)

...and it's boring to separate "long option" and "short option"(they are both "prefixed" option), if you wants to build a [Minimist Parser](https://github.com/substack/minimist)
that must distinguish between them, override `checkPrefixForName` and save `var currentPrefix`
 (a partially implemented one can be found [here](src/commonTest/kotlin/TheArgParserVersions.kt#L64)).

- _The animated banner is low-quality/have slow frame rate_

This one is the best I've got, it tooks me at least 5-hrs making that...

- _How's the performance of this lib comparing to others?_

I don't care, but `SwitchParser` will only traverse `args` once every time you `run`,
 and declarative code is _always no faster than_ imperative one (a lot of `Map<String,Arg<*>>` is allocated in `ArgParser4`)

- _`ArgParserBy` for unusual/subcommand arg definitions requires dirty code_

I'v tried my best... forgive me

- _Your English grammar is poor_

...Sorry for that, and please open an issue if you found my grammar mistakes.

## Extension APIs

[ArgParserHandlers](src/commonMain/kotlin/org/parserkt/argp/ArgParser.kt#L46)

```kotlin
//package org.parserkt.argp

const val SPREAD = "..." //< spread itemArg name

val noArg: Arg<Unit> = arg<Unit>("\u0000\u0000", "") { error("noArg parsed") }
val helpArg = arg("h help", "print this help") { SwitchParser.stop() }

abstract class ArgParserHandlers {
  protected open fun printHelp() = println(toString())
  protected open fun prefixMessageCaps() = TextCaps.nonePair
  protected open fun rescuePrefix(name: String): Arg<*> { throw SwitchParser.ParseError("$name unknown") }
  protected open fun rescueMissing(p: Arg<*>): Any? = null
  protected open fun checkAutoSplitForName(name: String, param: String) {}
  protected open fun checkPrefixForName(name: String, prefix: String) {
    if (prefix == "--" && name.length == 1) throw SwitchParser.ParseError("single-char shorthand should like: -$name")
  }
  /** Un-parse method used in ArgParser4.backRun */
  protected open fun showParam(param: Any): String? = param?.toString() //<^ real implementation omitted
}
```

- rewrite `prefixMessageCaps` if you want to change letter case in message prefix / body
- rewrite `rescuePrefix` (yield an `Arg<*>` with param/defaultValue) if you want to support dynamic `-k=v` or `-n5`
- rewrite `rescueMissing` if you want to prompt for arg value when missing

## Source Reading

Ordering & focal point:

- [SwitchParser](src/commonMain/kotlin/org/parserkt/argp/SwitchParser.kt) a basic `Array<String>` iterator state machine with `onItem` and `onPrefix` and pretty error messages. __focus__: `run`, `arg`, `ParseError`/`ParseLoc`, `Companion.extractArg`
- [ArgParser](src/commonMain/kotlin/org/parserkt/argp/ArgParser.kt) `ArgParser4`~`ArgParsrer1`(subclass) functional wrapper to `SwitchParser` using `Map`s to make DSL-style available.
    __focus__: `ParseResult` (tup,named,flags,items), `ArgParser4.<init>`(checks), `commandAliases`,
    `dynamicNameMap`/`flagMap`(non-typed "prefix name" map), `inner class Driver: SwitchParser`, `argToOMs`+`nameMap`,
    `getOrPutOM`/`addResult`(dynamic storage), `itemArgZ`(an iter); `onItem`, `onPrefix`, `read`, `dynamicInterpret`; `onArg` (alias&subcmd), `run`, `assignDefaultOrFail`; and `backRun`/`toString`/`ArgParserAsSubDelegate`
- [Helpers](src/commonMain/kotlin/org/parserkt/argp/Helpers.kt) Utils & multiplatform CLI and extension for `Arg<String>`/`Arg<T>` building. __focus__: `Env` a multiplatform(MP) CLI API set(envvar/prompt/write), `arg`/`argInt`, (JVM)`argFile`,
    `OneOrMore`+`NamedMap`, `TextCaps`, `associateByAll`(used in arg alias `Arg.names`), `joinToBreakLines` (format --help summary line)
- [ArgParserBy](src/commonMain/kotlin/org/parserkt/argp/ArgParserBy.kt) By delegates and `backRun`/`addSub` wrapper to dynamic typed `ArgParser`. __focus__: `reversed` (for `[...] a b` desctruct), `By`(used as namespace) `.res`,
    `By.Flag`/`By.ParsedArg<T,R>`(`.wrap`), `By.Param.multiply`, `ArgParser4.reversed`/`Arg<Str>.addNopConvert`(in ParserTricks)
- [ParserTricks](src/commonMain/kotlin/org/parserkt/argp/ParserTricks.kt) Tricks using this framework (contributions are welcome). __focus__: `addHelpSubcommand`, `Arg<T>.env`+`Arg<Str>.getEnv` (!overload for JVM), `Arg<T>.wrapXXX`

## Thanks

Thanks to the creators of Python's [argparse](https://docs.python.org/3/library/argparse.html) module, which provided the initial inspiration for this library.

Thanks also to the language design team behind Kotlin (not [kotlinx-cli](https://github.com/Kotlin/kotlinx-cli), which disappointed me!!).

Thanks to [xenomachina's argparser](https://github.com/xenomachina/kotlin-argparser), where I copied this section from :P

And to [AJ Alt's CliKT](https://github.com/ajalt/clikt), which inspired me to make the banner animation

repository: ParserKt/ArgParser

repo_name: ParserKt/ArgParser


text:
# やめて！おねえさん死んじゃう！！

<https://www.youtube.com/watch?v=Q4gTV4r0zRs>

# Onesan - The bruteforce feature selector

## REQUIREMENTS

- Python 3
- scikit-learn
- tqdm

# Instalaltion

`pip install .`

# License

MIT

# Usage

```python
from onesan import onesan

# prepare the training and validation dataset
X = feature matrix # numpy.array
Y = target vector # numpy.array

# create onesan
robot = onesan(X, Y,
               train_size=0.9, # divide to x0.9 for training, x0.1 for validation
               n_onesan=8 # number of parallel processes, 1 by default
        ) # if classifier was not specified, onesan will use linear-SVM as a classifier by default

# Good luck! Onesan!!!!
result = onesan.run()

print(result)
'''
returns list of list
[
  [1, '0000...01', accuracy_1],
  [2, '0000...10', accuracy_2],
  ...,
  [2^d - 1, '1111...11', accuracy]
]
'''
```

# Reference
## Onesan

### initializer
`__init__(self, X, Y, train_size=0.8, n_onesan=1, evaluator=DefaultEvaluator, classifier=None, classifier_param=None)`

`n_onesan` specifies a number of onesans.  If `n_onesan == 1`, Onesan would run alone.
If `n_onesan >= 2`, Onesan would fission into child processes and runs almost `n_onesan` times faster.

`evaluator` specifies the evaluation metrics for resulting classification performance. `evaluator` takes callable object
which takes 2 arguments, true label `t` and prediction `y`.
`sklearn.metrics.precision_recall_fscore_support` will be chosen by default.

We can specify the classifier onesan uses.
The `classifier` must have `fit` and `predict` method to training and validation
the model.
`classifier` shold inherit `sklearn.base.BaseEstimator`.

# Author

Aiga SUZUKI<EMAIL_ADDRESS>

repository: tochikuji/Onesan

gha_language: Python

repo_name: tochikuji/Onesan


text:
---
layout: post
title: "Weekly Challenge #149 and A Fix, Maybe, to #148"
author: "Dave Jacoby"
date: "2022-01-26 22:27:55 -0500"
categories: ""
---

### Fixing an Old Task

Abigail read my blog post and pointed out that the given first correct answer of [#148 Task 2](https://theweeklychallenge.org/blog/perl-weekly-challenge-148/), `(2,1,5)` was not showing up, and when he ran my `test_ardano` function against it, it didn't return `1`, but rather `1.00000000000000000011`.

I think the _only_ time I regularly do math like this is in the Challenge, which is good because it makes me use ideas I don't touch regularly, but it does get me in places I can't negotiate out of. It's a known thing that IEEE 754 math has hairy edge cases, and I'm _guessing_ that I'm hanging up on that. I changed my `cuberoot` function to limit the number of significant digits —

```perl
sub cuberoot ($n ) { return sprintf '%.06f', $n**( 1 / 3 ) }
```

— but that seems like a hackish _"just make it work!"_ solution rather than really understanding where the problem is and fixing that. I admit that. When the Reviews come around, I'll have to read to see the better Cardano Triplets solutions.

Thanks to Abigail for pointing out the problem.

### TASK #1 › Fibonacci Digit Sum

> Submitted by: Roger Bell_West
> Given an input $N, generate the first $N numbers for which the sum of their digits is a Fibonacci number.

I got this to an acceptable point fairly quickly. I use `split` to separate the numbers into digits, `sum0` from List::Util because I am always paranoid about empty strings and a function that finds the Fibonacci number that is not less than the given number, which would be the `sum0` of the digits. If the function returns a number that _is_ sum, then there we go! We append it to an array, and stop looking when the array is big enough.

#### Show Me The Code!

```perl
#!/usr/bin/env perl

use strict;
use warnings;
use feature qw{ say postderef signatures state };
no warnings qw{ experimental };

use Getopt::Long;
use List::Util qw{ sum0 max };

my $N = 20;
GetOptions( 'n=i' => \$N, );

my @fib = first_60_fib();
my %fib = map { $_ => 1 } @fib;
my @x;

my $n = 0;
while ( scalar @x < $N ) {
    my $sd = sum_of_digits($n);
    my $f  = $fib{$sd} || 0;
    push @x, $n if $f;
    $n++;
}
say join ' ', @x;

sub first_60_fib() {
    my @n;
    push @n, 0;
    push @n, 1;
    while ( scalar @n < 60 ) {
        push @n, $n[-1] + $n[-2];
    }
    return @n;
}

sub sum_of_digits ( $n ) {
    return sum0 split //, $n;
}
```

```text
$ ./ch-1.pl -n 30
0 1 2 3 5 8 10 11 12 14 17 20 21 23 26 30 32 35 41 44 49 50 53 58 62 67 71 76 80 85
```

### TASK #2 › Largest Square

> Submitted by: Roger Bell_West
> Given a number base, derive the largest perfect square with no repeated digits and return it as a string. (For base>10, use ‘A’..‘Z’.)

This is giving me problems.

There are parts that are fairly simple. You get the 36 characters we can get with `my @range = ( 0 .. 9, 'A' .. 'Z' )`, and you can get the right characters for any base with `my @range_by_base = @range[0..$base-1]`. The highest possible correct number becomes `join '', reverse @range_by_base`.

I found that many of the Base Conversion modules convert from and to common CS-related bases — 2, 4, 8, 16, 32, etc. — but for this task, we want to convert into and out of any base, and I found that [Math::BaseCalc](https://metacpan.org/pod/Math::BaseCalc) does that well.

Using `state`, I made functions that convert back and forth, and hold onto the numbers, so we don't have to re-generate `100` in base 19 twice. (In writing this, I'm second-guessing the utility of that, but I've done the cool thing, so eh?)

But there's still going from **9,876,543,210** to **1**, in the case of base 10. I am doing it with a for loop and an implicit 10-million-entry list, and that's killing me. I think that a while loop instead, like `while ($n > 1) { $n-- }` might be it. In fact, it's looking promising (and not segfaulting) as I write this. When and if I solve it, I'll blog it separately.

#### If you have any questions or comments, I would be glad to hear it. Ask me on [Twitter](https://twitter.com/jacobydave) or [make an issue on my blog repo.](https://github.com/jacoby/jacoby.github.io)


text:
# webgl-editor

[![Build Status]
(https://semaphoreci.com/api/v1/projects/6da4ddc8-c4f1-464e-a3f7-8147ee5b645c/566643/badge.svg)]
(https://semaphoreci.com/metropolislights/webgl-editor)

## 3D modeling made easy with Polymer and three.js

### Introduction

This project aims to to make 3D content creation **easy** and **accessible** to
everyone by leveraging modern web technologies in order to provide a simplified
UI for people who are considering working with 3D content as a career or hobby.
It is heavily inspired by the work of [arodic](https://github.com/arodic).

To view a demo of the editor in action, click
[here](http://webgleditor.herokuapp.com/).

### Quick start

To install all the required dependencies, run:

```sh
npm install
```

To serve the application on `http://localhost:8080/`, run:

```sh
npm start
```

Also, linting using [JSCS](http://jscs.info/) can be performed with `npm run
lint`.

repository: junglelan/webgl-editor

repo_name: junglelan/webgl-editor


text:
---
layout: page
title: anvi-get-enriched-functions-per-pan-group [program]
categories: [anvio]
comments: false
image:
  featurerelative: ../../../images/header.png
  display: true
---

A program that takes a pangenome, and a categorical layers additional data item, and generates a table describing functions that are enriched in those groups. If requested, a functional occurrence table across genomes is also generated.

See **[program help menu](../../../../vignette#anvi-get-enriched-functions-per-pan-group)** or go back to the **[main page](../../)** of anvi'o programs and artifacts.

{% include _toc.html %}

{% capture network_path %}{{ "network.json" }}{% endcapture %}
{% capture network_height %}{{ 300 }}{% endcapture %}
{% include _project-anvio-graph.html %}

## Can provide

[functional-enrichment-txt](../../artifacts/functional-enrichment-txt)

## Can consume

[misc-data-layers](../../artifacts/misc-data-layers)  [pan-db](../../artifacts/pan-db)  [genomes-storage-db](../../artifacts/genomes-storage-db)

## Usage

This program returns a **matrix of functions that are enriched within specific groups in your pangenome**.

You provide a [pan-db](/software/anvio/help/main/artifacts/pan-db) and [genomes-storage-db](/software/anvio/help/main/artifacts/genomes-storage-db) pair, as well as a [misc-data-layers](/software/anvio/help/main/artifacts/misc-data-layers) that stores categorical data, and the program will consider each of the categories their own 'pan-group'. It will then find functions that are enriched in that group (i.e., functions that are associated with gene clusters that are characteristic of the genomes in that group). It returns this output as a [functional-enrichment-txt](/software/anvio/help/main/artifacts/functional-enrichment-txt)

{:.notice}
Note that your [genomes-storage-db](/software/anvio/help/main/artifacts/genomes-storage-db) must have at least one functional annotation source for this to work.

This helps you highlight functions or pathways that separate a specific pan-group and determine the functional core of your pangenome. For example, in the *Prochlorococcus* pangenome (the one used in [the pangenomics tutorial, where you can find morei info about this program](http://merenlab.org/2016/11/08/pangenomics-v2/#making-sense-of-functions-in-your-pangenome)), this program finds that `Exonuclease VII` is enriched in the low-light pan-group. The output file provides various statistics about how confident the program is in making this association.

### How does it work?

What this program does can be broken down into three steps:

1. Determining the pan-groups. Firstly, the program uses a [misc-data-layers](/software/anvio/help/main/artifacts/misc-data-layers) (containing categorical, not numerical, data) to split the pangenome into several groups. For example, in the pangenome tutorial, this was the low-light and high-light groups.
2.  Determine the "functional associations" for each of your gene clusters. In short, this is collecting the functional annotations for all of the genes in each cluster and assigning the one that appears most frequently to represent the entire cluster.
3. Looking at the functional associations and their relative levels of abundance across the pan-groups. Specifically, it looks at the level that a particular gene cluster's functional association is unique to a single pan-group and the percent of genomes it appears in in each pan-group. This is what is reported in the output matrix, a [functional-enrichment-txt](/software/anvio/help/main/artifacts/functional-enrichment-txt)

If you're still curious, check out [Alon's behind the scenes post](http://merenlab.org/2016/11/08/pangenomics-v2/#making-sense-of-functions-in-your-pangenome), which goes into a lot more detail.

### Okay, cool. Let's talk parameters.

Here is the simplest run of this program:

anvi-get-enriched-functions-per-pan-group -p [pan-db](/software/anvio/help/main/artifacts/pan-db)\
                                          -g [genomes-storage-db](/software/anvio/help/main/artifacts/genomes-storage-db) \
                                          -o [functional-enrichment-txt](/software/anvio/help/main/artifacts/functional-enrichment-txt) \
                                          --category-variable CATEGORY

The parameter `--category-variable` gives the name of the categorical [misc-data-layers](/software/anvio/help/main/artifacts/misc-data-layers) that you want to use to define your pan-groups. Note that this will consider all items not in a category in their own 'ungrouped' pan-group; you can ignore those items with the flag `--exlcude-ungrouped`

You can choose to not group together gene clusters with the same function by adding the parameter `--include-gc-identity-as-function` and setting the annotation source ot `IDENTITY`

#### Defining a Functional Annotation Source

You also have the option to only use functional annotations from a specific source, like so:

anvi-get-enriched-functions-per-pan-group -p [pan-db](/software/anvio/help/main/artifacts/pan-db)\
                                          -g [genomes-storage-db](/software/anvio/help/main/artifacts/genomes-storage-db) \
                                          -o [functional-enrichment-txt](/software/anvio/help/main/artifacts/functional-enrichment-txt) \
                                          --category-variable CATEGORY \
                                          --annotation-source COG_FUNCTION

Use the parameter `--list-annotation-sources` to list the available annotation sources in your [pan-db](/software/anvio/help/main/artifacts/pan-db).

#### Additional Output

You can also output a functional occurance table, which describes the number of times each of your functional associations occurs in each genome you're looking at. You can interact more with this data by using [anvi-matrix-to-newick](/software/anvio/help/main/programs/anvi-matrix-to-newick).

You can find more information about this [here](http://merenlab.org/2016/11/08/pangenomics-v2/#creating-a-quick-pangenome-with-functions).

{:.notice}
Edit [this file](https://github.com/merenlab/anvio/tree/master/anvio/docs/programs/anvi-get-enriched-functions-per-pan-group.md) to update this information.

## Additional Resources

* [An example usage of the program in the context of the Prochlorococcus metapangenome from Delmont and Eren 2018 is included in the pangenomics tutorial](http://merenlab.org/2016/11/08/pangenomics-v2/)

* [An older version of this program was used in this publication by Benjamin Tully](https://www.nature.com/articles/s41467-018-07840-4)

{:.notice}
Are you aware of resources that may help users better understand the utility of this program? Please feel free to edit [this file](https://github.com/merenlab/anvio/tree/master/bin/anvi-get-enriched-functions-per-pan-group) on GitHub. If you are not sure how to do that, find the `__resources__` tag in [this file](https://github.com/merenlab/anvio/blob/master/bin/anvi-interactive) to see an example.

repository: Jessica-Pan/web

repo_name: Jessica-Pan/web


text:
# follettodellaluce3
Small BOT constantly polling a remote HTTP address, checking for a specific substring, and alerting on telegram for on/off transients. Used to monitor electric power at my home from a remote server. Written in .net core.

## How to run
Copy Config-template.cs to Config.cs, remove the lines starting with '#' and fill all the constants in the file with the appropriate values.

Run the project - whatever way you choose, but a ``dotnet run`` should be enough any platform -- tested on Linux and macOS.

## How to deploy as a systemd service on Linux

* Use ``dotnet publish`` to create a dll file.
* Edit ``fdl3.service`` file; pay attention to all entries in ``[Service]`` section, specially user related ones.
* ``sudo cp fdl3.service /etc/systemd/system/fdl3.service``
* ``sudo systemctl enable fdl3.service``
* Start with ``sudo systemctl start fdl3.service`` and stop with ``sudo systemctl stop fdl3.service``
* Use ``sudo journalctl -fu fdl3.service`` to view the systemd logs regarding this service


text:
# [Unofficial Harry Potter Facts](http://alexa.amazon.com/#skills/amzn1.ask.skill.636b4041-22d2-4546-a47d-63cc4c217cab)
![0 stars](../../images/ic_star_border_black_18dp_1x.png)![0 stars](../../images/ic_star_border_black_18dp_1x.png)![0 stars](../../images/ic_star_border_black_18dp_1x.png)![0 stars](../../images/ic_star_border_black_18dp_1x.png)![0 stars](../../images/ic_star_border_black_18dp_1x.png) 0

To use the Unofficial Harry Potter Facts skill, try saying...

* *Alexa, open unofficial harry potter facts*

* *Alexa, tell unofficial harry potter facts to give me a Harry Potter fact*

* *Alexa, tell unofficial harry potter facts to give me some information*

This skill will help you know some cool facts about the Harry Potter books and movies. Go on and ask one from your device today!

Please note that I am a Harry Potter fan and am publishing this skill as an individual, and am no way related to Harry Potter books publication houses, Harry Potter film production studios or J.K.Rowling.

***

### Skill Details

* **Invocation Name:** unofficial harry potter facts
* **Category:** null
* **ID:** amzn1.ask.skill.636b4041-22d2-4546-a47d-63cc4c217cab
* **ASIN:** B01KPE8MR8
* **Author:** Dharmil Chandarana
* **Release Date:** September 8, 2016 @ 02:33:39
* **In-App Purchasing:** No


text:
# ABV Predict

This is the second part of capstone project in Turing College.
Model was trained on https://www.brewersfriend.com/ parameters:
IBU, SRM, OG, FG and can predict ABV of a beer.

**Table of content:**
* [Introduction](#introduction)
* [Modeling](#modeling)
* [Technologies Used](#technologies)
* [License](#license)

### Introduction

Beer brewers have scrambled  in recent years to produce new variations of the beer styles.
As such, the purest definition of beer styles has been considerably stretched. When brewing your own beer
there is no telling exactly what ABV will be present. Predicting ABV of yet to be beer can be
useful when producing in big quantities.

### Modeling

The model and its accompanying methods were created and trained using Jupyter Notebook in the Models directory.

### Usage

```/predict``` - Send a POST request to get the model prediction in JSON format.
```/last_requests``` - Route to return most recent requests and responses in
JSON format. Returns 10 as default but can be any number if specified.

You can send the requests using a tool like
Postman or you can do it with programming language. Here is a Python example:
```
import json
import requests

data = json.dumps(
{
    "inputs": [
        {
            "OG": 1.055,
            "FG": 1.013,
            "SMR": 19.44,
            "IBU": 4.83
        }
    ]
})

response = requests.get("http://<IP_ADDRESS>:5000/last_requests", json.dumps(data))
print (f"response: {json.loads(response.content)}")

```

### Technologies
For the used packages and technologies view the [requirements.txt](requirements.txt) file.

## License

[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

repository: Tsukinome/Abv-predict

repo_name: Tsukinome/Abv-predict


text:
+++
title = "Lord, open my lips, and my mouth shall declare your praise"
description = "Lenten Reflections 2020"
date = "2020-03-03"
categories = [
    "Tuesday",
]
menu = "main"
+++

```
Tuesday of the First Week of Lent Year A 2020
Isaiah 55:10-11
Psalms 34:4-5, 6-7, 16-17, 18-19
Matthew 6:7-15

```

I have come to better understand my relationship with God in terms of trust. Not only can God’s people trust in God **but God wants to trust us**.

The first reading in Isaiah today tells us that we can trust God’s word to be a fertile and fruitful seed that will achieve God’s ends.  But it seems to me that it works because God trusts us to sow that seed and to eat of its fruits.  **I think that means we must participate in a relationship with God in God’s word for it to work**.

I can see the same thing in the Psalm today. God rescues those in distress, but the Lord invites us to look to the Lord and call upon God’s name in times of fear and distress; **to participate in a relationship of trust that is evidenced in radiant joy even in the midst of distress at the hands of evildoers**. In these verses, I read that we can trust that God considers the just worthy of care and will rescue us from spiritual distress.

>We can trust that God hears us. Most of us are pretty sure of that.  That is why we pray. But our prayers shouldn’t be just about asking, they should also be about listening for instructions on how we can be rescued.

It seems to me that Jesus makes that point clear. We are invited to pray to God like a Father that we trust to know what we need before we ask. And yet, it seems to me that like, an earthly Father, God wants to be able to trust us to not just be on the take.

>Good parenting is about building relationships with children that help them make good decisions and building trust that they will be able to do that.

The Lord’s Prayer is not just a prayer asking for our daily bread in the sense of the food we need to sustain our bodies. I think it also is a prayer for the spiritual bread that sustains our faith.  And while God invites us to ask for rescue from the distress of temptation and our trespasses against others, Jesus is also telling us about a relationship in which God expects us to also forgive those who trespass against us. That is probably the most difficult thing for all of us to do and I think that is why Jesus clarified that petition further.

He added a conditional.  “If” is a big word here. “If” you forgive, you will be forgiven. “If” you do not forgive, you will not be forgiven. I think Jesus is telling us here that the word of God is more fertile and fruitful in achieving God’s ends in this world _if_ God can trust us **to participate in a relationship of responsibility with God**.

>I don’t think this prayer is intended to condemn us so much as it is a frank conversation with a God who loves us, but who expects something from us.

So, the question for us today is _**can God trust us to help achieve God’s will for this world?**_

That should be our Lenten theme for this year.


text:
# Kappanoid
A pure JavaScript Arkanoid clone inspired by [Juice it or lose it—a talk by Martin Jonasson and Petri Purho](https://www.youtube.com/watch?v=Fy0aCDmgnxg).

Play the online version [here](https://integeruser.github.io/misc/Kappanoid/)!

## Setup
To facilitate development the code was split into multiple JavaScript files, to be merged in a single `kappanoid.js` using the provided `Makefile`. Then, to play the game, open `index.html` in your favorite browser.

## Key Bindings
| Key                               | Action                        |
| --------------------------------- | ----------------------------- |
| `SPACEBAR`                        | Insert coin / Release ball from paddle / Activate power-up effect / Advance to next level (when the current level is complete) |
| `1` to `8`                        | Toggle each setting on/off    |
| `P`                               | Toggle pause on/off           |
| `D`                               | Toggle debug mode on/off      |
| (If debug mode is active)         |                               |
| `L`                               | Spawn debug particles         |
| `R`                               | Restart level                 |
| `N`                               | Advance to next level         |
| `U`                               | Set time scale to 1           |
| `I`                               | Set time scale to 0.5         |
| `O`                               | Set time scale to 0.15        |

## Credits

### Easing functions ###
[http://www.robertpenner.com/easing/](http://www.robertpenner.com/easing/)

Open source under the BSD License.

Copyright © 2001 Robert Penner
All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
Neither the name of the author nor the names of contributors may be used to endorse or promote products derived from this software without specific prior written permission.

### Collision detection functions ###
Ericson, Christer. *Real-time collision detection*. CRC Press, 2004.

### Emulogic font ###
[http://www.freakyfonts.de](http://www.freakyfonts.de)

"Emulogic" - Truetype Font
Copyright (c) 2004 by ck! [Freaky Fonts].
All rights reserved.

### Juicy Breakout ###
[https://github.com/grapefrukt/juicy-breakout](https://github.com/grapefrukt/juicy-breakout)

Copyright (c) 2012 Martin Jonasson, Petri Purho

This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions:

1. The origin of this software must not be misrepresented; you must not
claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.

repository: xire-/Kappanoid

detected_licenses: Zlib BSD-3-Clause MIT

repo_name: xire-/Kappanoid


text:
# StockBot
A Personal ChatBot to assist you with Stock Trading.

Team Project for Stock Market Prediction!

We prepared a stock bot to answer questions related to the stock data. It would guide an investor before making the final decision to invest in a stock by predicting the future prices using LSTM and providing sentiments for a stock.

My contributions were majorly towards creating a baseline LSTM model and further optimizing it to achieve the best predictions with minimal errors.


text:
---
layout: post
title: "OsSYT-5"
description: ""
category: genes
tags: [pollen, drought, tolerance, drought tolerance, stress, stomatal, drought stress]
---

* **Information**
    + Symbol: OsSYT-5
    + MSU: [LOC_Os07g22640](http://rice.uga.edu/cgi-bin/ORF_infopage.cgi?orf=LOC_Os07g22640)
    + RAPdb: [Os07g0409100](https://rapdb.dna.affrc.go.jp/locus/?name=Os07g0409100)

* **Publication**
    + [Enhancement of drought tolerance in rice by silencing of the OsSYT-5 gene.](http://www.ncbi.nlm.nih.gov/pubmed?term=Enhancement of drought tolerance in rice by silencing of the OsSYT-5 gene.%5BTitle%5D), 2021, PLoS One.

* **Genbank accession number**

* **Key message**
    + Transgenic lines with suppressed OsSYT-5 gene expression exhibited higher pollen viability and produced more grains compared to the wild type at both normal and drought stress conditions
    + Enhancement of drought tolerance in rice by silencing of the OsSYT-5 gene.
    + In the water deficit experiment, the transgenic lines with a silenced OsSYT-5 gene exhibited symptoms of drought stress seven days later than the wild type
    + Transgenic lines with suppressed expression of the OsSYT-5 gene exhibited an enhanced photosynthetic rate but reduced stomatal conductance and transpiration during water deficit stress
    + The silencing of the OsSYT-5 gene affected the expression of several genes associated with ABA-related stress signaling in the transgenic rice plants

* **Connection**

[//]: # * **Key figures**


text:
# Oresoftare / XML.js

## <i> Stream XML and parse to JavaScript objects </i>

#### Read from a file, or use a readable stream.

```javascript

import {XMLParser} from<EMAIL_ADDRESS>
fs.createReadStream(file).pipe(new XMLParser()).once('result', function(result){
     // your XML is now a JS object
});

```

### Now if you want to stream chunks of JS objects

```javascript

fs.createReadStream(file).pipe(new XMLParser({key: 'foobar'})).on('jschunk', function(c){
     // represents a Node instance in your data
});

```

### Just pass in a file path:

The library will create a read stream for you.

```javascript

new XMLParser({file}).once('result', function(c){
     // c represents a Node instance in your data
});

```


text:
# firestore_ui

[![pub package](https://img.shields.io/pub/v/firestore_ui.svg)](https://pub.dartlang.org/packages/firestore_ui)

This project started as a [Pull Request](https://github.com/flutter/plugins/pull/757) to the official [cloud_firestore](https://pub.dartlang.org/packages/cloud_firestore) plugin, but unfortunately they are still polishing the main features and this had to be postponed.

But fear not, my fellow Cloud Firestore users, this is a package that extracted the main code from that PR and now it's available to use!

Check out the example for more info, it should be pretty straight forward since it's just a port of [firebase_database](https://pub.dartlang.org/packages/firebase_database)'s version.

## Getting Started

For help getting started with Flutter, view our online [documentation](https://flutter.io/).

For help on editing package code, view the [documentation](https://flutter.io/developing-packages/).


text:
# basic-lru

<sup>**Social Media Photo by [Mr Cup / Fabien Barral](https://unsplash.com/@iammrcup) on [Unsplash](https://unsplash.com/)**</sup>

[![Build Status](https://travis-ci.com/WebReflection/basic-lru.svg?branch=master)](https://travis-ci.com/WebReflection/basic-lru) [![Coverage Status](https://coveralls.io/repos/github/WebReflection/basic-lru/badge.svg?branch=master)](https://coveralls.io/github/WebReflection/basic-lru?branch=master)

A fast and lightweight, as in [684 bytes](https://unpkg.com/basic-lru), Map based LRU implementation.

```js
import LRU from 'basic-lru';
const LRU = require('basic-lru');
// https://unpkg.com/basic-lru to have LRU globally

// new LRU(maxSize)
const lru = new LRU(100);

// new LRU({max}) or new LRU({maxSize})
const lru = new LRU({max: 1000});

// new LRU({maxAge}) in milliseconds
const lru = new LRU({maxAge: 1000});

// variants
const lru = new LRU({max: 100, maxAge: 1000});
const lru = new LRU({maxSize: 100, maxAge: 1000});
```

### About

This module is a drop-in replacement for any [Map](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map) instance, and it's mostly 100% compatible with [lru](https://github.com/chriso/lru), [lru-cache](https://github.com/isaacs/node-lru-cache), [quick-lru](https://github.com/sindresorhus/quick-lru), and [lru-map](https://github.com/bchociej/lru-map) modules.

Differently from other modules, this one has the least amount of LOC, zero dependencies, and it's based on _ES2015_ class capability to extend the native `Map`.

### The Map Extend Differences

The only difference from a real Map, beside implementing a classic LRU cache, is the `peek(key)` method, to access an entry without flagging its access time anyhow, and borrowed from other libraries, plus a constructor, also borrowed from other libraries, that accepts either an integer, or an options object with `max`, or `maxSize`, and a `maxAge` property, where all of these are optional too.

license: ISC

repository: WebReflection/basic-lru

repo_name: WebReflection/basic-lru


text:
---
title: About the google_compute_interconnect resource
platform: gcp
---

## Syntax
A `google_compute_interconnect` is used to test a Google Interconnect resource

## Examples
```
describe google_compute_interconnect(project: 'chef-gcp-inspec') do
  it { should exist }
end
```

## Properties
Properties that can be accessed from the `google_compute_interconnect` resource:

  * `admin_enabled`: Administrative status of the interconnect. When this is set to true, the Interconnect is functional and can carry traffic. When set to false, no packets can be carried over the interconnect and no BGP routes are exchanged over it. By default, the status is set to true.

  * `creation_timestamp`: Creation timestamp in RFC3339 text format.This field is deprecated.

  * `description`: A description about the purpose of the outage.

  * `location`: URL of the InterconnectLocation object that represents where this connection is to be provisioned.

  * `id`: The unique identifier for the resource.

  * `name`: Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.

  * `noc_contact_email`: Email address to contact the customer NOC for operations and maintenance notifications regarding this Interconnect. If specified, this will be used for notifications in addition to all other forms described, such as Stackdriver logs alerting and Cloud Notifications.

  * `peer_ip_address`: IP address configured on the customer side of the Interconnect link. The customer should configure this IP address during turnup when prompted by Google NOC. This can be used only for ping tests.

  * `google_ip_address`: IP address configured on the customer side of the Interconnect link. The customer should configure this IP address during turnup when prompted by Google NOC. This can be used only for ping tests.

  * `client_operation_id`: The value of requestId if you provided it in the request. Not present otherwise.

  * `google_reference_id`: Google reference ID to be used when raising support tickets with Google or otherwise to debug backend connectivity issues.

  * `provisioned_link_count`: Number of links actually provisioned in this interconnect.

  * `customer_name`: Customer name, to put in the Letter of Authorization as the party authorized to request a crossconnect.

  * `requested_link_count`: Customer name, to put in the Letter of Authorization as the party authorized to request a crossconnect.

  * `operational_status`: The current status of this Interconnect's functionality, which can take one of the following values: * OS_ACTIVE: A valid Interconnect, which is turned up and is ready to use. Attachments may be provisioned on this Interconnect. * OS_UNPROVISIONED: An Interconnect that has not completed turnup. No attachments may be provisioned on this Interconnect. * OS_UNDER_MAINTENANCE: An Interconnect that is undergoing internal maintenance. No attachments may be provisioned or updated on this Interconnect.
  Possible values:
    * OS_ACTIVE
    * OS_UNPROVISIONED
    * OS_UNDER_MAINTENANCE

  * `link_type`: Type of link requested, which can take one of the following values: * LINK_TYPE_ETHERNET_10G_LR: A 10G Ethernet with LR optics * LINK_TYPE_ETHERNET_100G_LR: A 100G Ethernet with LR optics. Note that this field indicates the speed of each of the links in the bundle, not the speed of the entire bundle.
  Possible values:
    * LINK_TYPE_ETHERNET_10G_LR
    * LINK_TYPE_ETHERNET_100G_LR

  * `interconnect_type`: Type of interconnect, which can take one of the following values: * PARTNER: A partner-managed interconnection shared between customers though a partner. * DEDICATED: A dedicated physical interconnection with the customer. Note that a value IT_PRIVATE has been deprecated in favor of DEDICATED.
  Possible values:
    * PARTNER
    * DEDICATED

  * `interconnect_attachments`: A list of the URLs of all InterconnectAttachments configured to use this Interconnect.

  * `expected_outages`: A list of outages expected for this Interconnect.

    * `name`: Unique identifier for this outage notification.

    * `description`: A description about the purpose of the outage.

    * `source`: The party that generated this notification, which can take the following value: * GOOGLE: this notification as generated by Google. Note that the value of NSRC_GOOGLE has been deprecated in favor of GOOGLE.
    Possible values:
      * GOOGLE

    * `state`: State of this notification, which can take one of the following values: * ACTIVE: This outage notification is active. The event could be in the past, present, or future.See startTime and endTime for scheduling. * CANCELLED: The outage associated with this notification was cancelled before the outage was due to start. * COMPLETED: The outage associated with this notification is complete. Note that the versions of this enum prefixed with "NS_" have been deprecated in favor of the unprefixed values.
    Possible values:
      * ACTIVE
      * CANCELLED
      * COMPLETED

    * `issue_type`: Form this outage is expected to take, which can take one of the following values: * OUTAGE: The Interconnect may be completely out of service for some or all of the specified window. * PARTIAL_OUTAGE: Some circuits comprising the Interconnect as a whole should remain up, but with reduced bandwidth. Note that the versions of this enum prefixed with "IT_" have been deprecated in favor of the unprefixed values.
    Possible values:
      * OUTAGE
      * PARTIAL_OUTAGE

    * `affected_circuits`: If issueType is IT_PARTIAL_OUTAGE, a list of the Google-side circuit IDs that will be affected.

    * `start_time`: Scheduled start time for the outage (milliseconds since Unix epoch).

    * `end_time`: Scheduled end time for the outage (milliseconds since Unix epoch).

  * `circuit_infos`: A list of CircuitInfo objects, that describe the individual circuits in this LAG.

    * `google_circuit_id`: Google-assigned unique ID for this circuit. Assigned at circuit turn-up.

    * `google_demarc_id`: Google-assigned unique ID for this circuit. Assigned at circuit turn-up.

    * `customer_demarc_id`: Customer-side demarc ID for this circuit.

  * `satisfies_pzs`: Set to true if the resource satisfies the zone separation organization policy constraints and false otherwise. Defaults to false if the field is not present.'

## GCP Permissions

Ensure the [Compute Engine API](https://console.cloud.google.com/apis/library/compute.googleapis.com/) is enabled for the current project.

repository: inspec/inspec-gcp

branch_name: refs/heads/main

gha_language: Ruby

gha_license_id: NOASSERTION

repo_name: inspec/inspec-gcp


text:
# jLambdaDog
(Apologies for the silly name )

Java library for sending Datadog metrics from AWS Lambda via Cloudwatch logs. See https://docs.datadoghq.com/integrations/amazon_lambda/ for details.

Track counters, gauges and histograms.

Essentially it automates this:

```
To send custom metrics to Datadog from your Lambda logs, print a log line from your Lambda, using the following format:

MONITORING|<unix_epoch_timestamp>|<value>|<metric_type>|<metric_name>|#<tag_list>
Where:

MONITORING signals to the Datadog integration that it should collect this log entry.

<unix_epoch_timestamp> is in seconds, not milliseconds.

<value> MUST be a number (i.e. integer or float).

<metric_type> is count, gauge, histogram, or check.

<metric_name> uniquely identifies your metric and adheres to the metric naming policy.

<tag_list> is optional, comma separated, and must be preceded by #. The tag function_name:<name_of_the_function> is automatically applied to custom metrics.

Note: The sum for each timestamp is used for counts and the last value for a given timestamp is used for gauges. It is not recommended to print a log statement every time you increment a metric, as this increases the time it takes to parse your logs. Continually update the value of the metric in your code, and print one log statement for that metric before the function finishes.

```

# How to use?

Initialise your DatadogLambdaMetricRegistry instance with default tags and set of Histogram expansions, both optional.
```java
import com.github.frankfarrell.jlambdadog.*;

public class MyHandler implements RequestStreamHandler {

    private final DatadogLambdaMetricRegistry registry;

    public MyHandler() throws IOException {
        this.registry = new DatadogLambdaMetricRegistry();

        //or set the default tags for all metrics
        this.registry = new DatadogLambdaMetricRegistry(getDefaultTags());

        //or set the tags and the set of expansions for histograms
        final EnumSet<Expansion> expansions = EnumSet.of(Expansion.MEDIAN);
        this.registry = new DatadogLambdaMetricRegistry(getDefaultTags(), expansions);
    }

    @Override
    public void handleRequest(InputStream input, OutputStream output, Context context) throws IOException {

        //Do some work

        //Increment a counter
        registry.increment("my.lovely.counter", 4L);

        //time some method
        final long startTime = System.currentTimeMillis();
        //Some work here
        final long endTime = System.currentTimeMillis();
        final long duration = applicationEndTime - applicationStartTime;

        //Track it in an in memory histogram -> Use this if you are processing events in batches
        registry.sample("my.lovely.sample", duration);

        //Track it as a gauge -> Use this for once off measured events, or if the timestamp of the event is important
        registry.gauge("my.lovely.gauge", duration, Instant.now().getEpochSecond());

        //TODO, yet to be implemented
        //Track it as a histogram -> Use this for once off measured events, or if the timestamp of the event is important
        registry.histogram("my.lovely.historgam", duration);

        //Make sure you call this at the end or at any time you want to print metrics.
        registry.printMetrics();
    }

    private Map<String, String> getDefaultTags(){
        final Map<String, String> tags = new HashMap<>();
        tags.put("aws_region", System.getenv("AWS_REGION")); //Good practice to use Env variables for this sort of thing
        return tags;
    }
}

```

# Dependencies

The only dependency is `com.codahale.metrics:metrics-core`

repository: frankfarrell/jlambdadog

repo_name: frankfarrell/jlambdadog


text:
# dorms.42.us.org

[![RN-Version](https://img.shields.io/badge/react.js-16.3.2-01babc.svg)](https://github.com/facebook/react/releases/tag/v16.3.2)
[![GitHub Stars](https://img.shields.io/github/stars/jraleman/nostromo-dorms.svg)](https://github.com/jraleman/dorms.42.us.org/stars)
[![GitHub Issues](https://img.shields.io/github/issues/jraleman/nostromo-dorms.svg)](https://github.com/jraleman/ndorms.42.us.org/issues)
[![Slack](https://img.shields.io/badge/slack-open-yellow.svg)](https://42siliconvalley.slack.com)

![project-logo](resources/project-logo.png)

## About

...

Take a look at: [https://dorms.42.us.org](https://dorms.42.us.org)

## Dependencies

This project uses the following technologies:

- Bootstrap
- Google Maps
- Font Awesome
- Animsition
- Cheet.js
- Smoothscroll
- jQuery
  - jQuery.fullPage
  - jQuery.lazyloadanything
  - jQuery.pagepilling

Thanks to these teams, the world is a better place :)

## Project Structure

The idea of having a good project structure is to have a cross platform
project, to maximize code reuse, keep the configurations out of the code,
and minimize the component state.

This is the main idea for the source code:

```
dorms.42.us.org/
├── css/
│   ├── animate.css
|  ...
│   └── style.css
├── images/
    ├── favicon.css
│   └── ...
├── fonts/
│   ├── fontawesome-webfont3e6e.eot
|  ...
│   └── poppins-regular-webfont.woff2
├── js/
│   ├── bootstrap.min.js
|  ...
│   └── wow.min.js
└── index.html

```

## Style Guide

Anything related to graphic design, such as colors, fonts,
metrics... goes here.

### Colors

![#01babc](http://via.placeholder.com/150/01babc/000000?text=primary)
![#80dcdd](http://via.placeholder.com/150/80dcdd/000000?text=highlight)
![#222222](http://via.placeholder.com/150/222222/ffffff?text=darkish)
![#eeeeee](http://via.placeholder.com/150/eeeeee/000000?text=lightish)

### Fonts

...

## Extras

Just for fun!

### Easter Eggs

- Konami code. `8-)`
- My cat. `:3`
- Kwame's dog. `:<`
- Best dish in the history of mankind. `:)`

## Acknowledgment

This project uses the following assets:

### [Paul Theme's Banhaus](http://paul-themes.com/html/bauhaus/preview/).

This is a really awesome theme. It's very well organized and documented.

- Theme icon as project icon.

## Support

...

### Contribute

We really, really appreciate any contribution, as long as me and 42 School
Silicon Valley accepts the pull request. If you need help on how to
get started, please follow [this guideline](CONTRIBUTING.md).

## License

This project is under the MIT License. Meaning that you can use, copy, modify,
merge, publish, distribute, sub-license, and/or sell copies of the final
products. See the [LICENSE](LICENSE) file for more details.

gha_language: JavaScript


text:
---
layout: default
title: Contact
---

# Contact

eRegulations is an [open source](/technology/#open-source-and-contributing)
project with contributions from both individuals and agencies of the United
States government. As such, general inquires and curiosities can be directed
to the whole group by opening an
[issue](https://github.com/eregs/eregs.github.io/issues/new) in our GitHub
repository.

That said, if you are interested in working with GSA's
[18F](https://18f.gsa.gov) for hosting and customization, contact Will
Sullivan at [will.sullivan@gsa.gov](mailto:will.sullivan@gsa.gov).


text:
*This document is part of a series of notes for CS4051 Human factors that can be found [here](https://github.com/nating/personal-notes/blob/master/fourth-year/human-factors/notes)*

## Usability Testing

Usability involves recording performance of typical users doing typical tasks.

*"Usability is applied experimentation."*

**Usability Testing**:
* Is done to improve products.
* Has only a few participants.
* Informs design.
* Is not usually replicable.
* Has conditions controlled as much as possible.
* Has a planned procedure.
* Has its results reported back to developers.

With Usability Testing, the focus is on:
* The time it takes users to complete a task.
* The amount of errors that are made completing tasks.
* The types of errors that are made completing tasks.

Usability Testing is done in a **Usability Lab** or some other controlled space.

An emphasis is put on selecting representative users and developing representative tasks.

Usually only 5-10 users are selected and the tasks last no longer than 30 minutes.

The test conditions should be the same for every participant.

Some types of data that can be recorded during Usability Testing include:
* Time to complete a task
* Time to complete a task after a specified time away from the product
* Number and type of errors per task
* Number of errors per unit time
* Number of navigations to online help or manuals
* Number of users making a particular error
* Number of users completing a task successfully
* Eye Fixations & Scan Path

Usability Testing find the current level of performance which becomes the minimum acceptable level of performance.

The amount of participants depends on:
* The schedule
* The availability of participants
* The cost of running tests

*"Some experts argue that testing should continue until no new insights are gained."*

There are three types of **Experimental Design**: Different-Participants, Same-Participants & Matched-Participants.

**Matched Participants** is where participants are matched based on *"expertise, gender, etc."* across the change in condition of the experiment.

Here are the advantages & disadvantages of the different types of experimental design:

|Design|Advantages|Disadvantages|
|---|---|---|
|Different|The order doesn't effect the experiment|Different subjects introduce biases|
|Same|There are fewer participants & no differences|The ordering of the experiment may bias it|
|Matched|The order doesn't matter, but there are less differences between subjects|Can not be sure of perfect matching|

repository: nating/personal-notes

gha_language: Haskell

repo_name: nating/personal-notes


text:
# uci_covid_modeling

This github contains code for generating situation reports on the dynamics and future trends of COVID-19 in Orange County, CA. The manuscript associated with this work is [here](https://arxiv.org/abs/2009.02654), and the current Orange County situation report is [available here](https://damonbayer.github.io/uci_covid_modeling2/).

## Navigation
Files used to generate website pages are stored in the [analysis folder](https://github.com/damonbayer/uci_covid_modeling2/tree/main/analysis). Each of the `yyyy-mm-dd_yyyy-mm-dd.Rmd` files follow the same format defined in the [analysis template](https://github.com/damonbayer/uci_covid_modeling2/blob/main/code/analysis_template.Rmd).

Functions used in website generation, modeling, and processing are stored in the [code folder](https://github.com/damonbayer/uci_covid_modeling2/tree/main/code).

Aggregated data used as the model input are available in the [data folder](https://github.com/damonbayer/uci_covid_modeling2/tree/main/data)

## Data
We use data aggregated from data from provided by Orange County, California Health Care Agency. Crucially, we exclude repeat tests given to patients who have tested positive for COVID-19 (which happens when patients are hospitalized). Our data may not match publicly available sources.

## Methodology
Our analysis relies on a mechanistic six compartment model of the COVID-19 pandemic. We then use Bayesian inference to provide inference on key disease dynamics and make predictions on future observed cases and deaths. Further descriptions of the model are available in the manuscript linked above.

We use the [stemr](https://github.com/fintzij/stemr/) package for our Bayesian inference. See the [stemr code](https://github.com/damonbayer/uci_covid_modeling2/blob/main/code/fit_new_model.R) for modeling and inference details.

To replicate our analysis, use the code from any of `yyyy-mm-dd_yyyy-mm-dd.Rmd` files in the [analysis folder](https://github.com/damonbayer/uci_covid_modeling2/tree/main/analysis).

To conduct your own analysis of COVID-19 trends using our model you will need the following data:

1. Daily number of reported cases
2. Daily number of tests (viral not antibody)
3. Daily number of reported deaths

Due to reporting delays, we recommend limiting the end date of your data set to well before the actual end date of available data, as past counts are often updated retroactively weeks later. In our analysis we then condensed this daily data into three day periods. You can adjust this as needed. You will also need to specify a population size. It is likely you will want to adjust the priors for initial conditions.

## Citation
Fintzi J, Bayer D, Goldstein I, Lumbard K, Ricotta E, Warner S, Busch LM, Strich JR, Chertow DS, Parker DM, Boden-Albala B, Dratch A, Chhuon R, Quick N, Zahn M, Minin VN. Using multiple data streams to estimate and forecast SARS-CoV-2 transmission dynamics, with application to the virus spread in Orange County, California, https://arxiv.org/abs/2009.02654.

gha_language: R


text:
This directory contains complex Polymer web components for Web UI. They may be
shared between Settings, login, stand alone dialogs, etc.

These components are allowed to use I18nBehavior. The Web UI hosting these
components is expected to provide loadTimeData with any necessary strings.
TODO(stevenjb/dschuyler): Add support for i18n{} substitution.

These components may also use chrome and extension APIs, e.g. chrome.send
(through a browser proxy) or chrome.settingsPrivate. The C++ code hosting the
component is expected to handle these calls.

For simpler components with no I18n or chrome dependencies, see cr_elements.

See [build_webui()](https://chromium.googlesource.com/chromium/src/+/refs/heads/main/docs/webui_build_configuration.md#build_webui)
as well as example from existing cr_components/ subfolders, for the recommended
way of building individual cr_components/.

cr_components/ that have a dedicated ts_library() or build_webui() target should
not use relative paths to other files in ui/webui/resources/, and users of these
components must add a dependency on the ts_library target to use the component.

repository: chromium/chromium

repo_name: chromium/chromium


text:
+++
# Project title.
title = "Aerial Cactus Identification"

# Date this page was created.
date = 2019-12-25T00:00:00

# Project summary to display on homepage.
summary = "Approaches and code for identifying cacti from satellite images"

# Tags: can be used for filtering projects.
# Example: `tags = ["machine-learning", "deep-learning"]`
tags = ["Deep Learning" , "Computer Vision"]

# Optional external URL for project (replaces project detail page).
external_link = ""

# Slides (optional).
#   Associate this project with Markdown slides.
#   Simply enter your slide deck's filename without extension.
#   E.g. `slides = "example-slides"` references
#   `content/slides/example-slides.md`.
#   Otherwise, set `slides = ""`.
slides = ""

# Links (optional).
url_pdf = ""
url_slides = ""
url_video = ""
url_code = ""

# Custom links (optional).
#   Uncomment line below to enable. For multiple links, use the form `[{...}, {...}, {...}]`.

# Featured image
# To use, add an image named `featured.jpg/png` to your project's folder.
[image]
  # Caption (optional)
  caption = ""

  # Focal point (optional)
  # Options: Smart, Center, TopLeft, Top, TopRight, Left, Right, BottomLeft, Bottom, BottomRight
  focal_point = "TopLeft"
+++

This was one my of very first competitions. While doing [Practical Deep Learning for Coders](https://course.fast.ai/), this competition provided a good source of practise. It was a binary classification problem. The goal for this competition was to determine whether the given satellite image contained a columnur cactus.

I used this dataset for two purposes :

1. To implement and test [ArcFace](https://arxiv.org/pdf/1801.07698.pdf) using pytorch.
2. To get placed into a high LeaderBoard position in the competition using FastAI.

## Approach

### EDA
According to the dataset details, the images were taken from the air. The images are low-res, some of them rotated to arbitrary angles and some zoomed. From visual inspection, the cacti are somewhat easy to spot because of their unique texture and stick-like shape. The class imbalance is not severe, can be handled by data augmentation.

![image](data_print.png)

### Data split and Transforms
#### Split
As the class imbalance was not servere, the data could be split into train/valid set at random.
#### Transforms
Following Transforms were applied with 75% probability to augment the data, then the images were resized to 128*128. Test time augmentation was not applied.

1. Horizontal Flip
2. Vertical Flip
3. Left and Right rotation upto 10°
4. Upto 110% zoom

### Hyperparameters
#### ArcFace

1. s = 64
2. m = 0.0
3. Adam Optimizer with fixed lr = 1e-3

#### Competition Classifiers
##### Densenet169
1. Frozen model, Adam optimizer with maximum lr = 7.5e-3.
2. CyclirLR scheduler
3. Unfrozen model, Adam optimizer with maximum lr = 1e-6.

##### Resnet101
1. Frozen model, Adam optimizer with maximum lr = 9e-3.
2. CyclirLR scheduler
3. Unfrozen model, Adam optimizer with maximum lr = 1e-6.

### Model Performance
I used DenseNet169 and Resnet101 for Leaderboard and ArcFace for research purposes.

### ArcFace
ArcFace was applied on the Resnet101 backbone. Implemented from scratch in pytorch. With embedding dimension = 2048 and scale_factor (s) = 64, accuracy follows :

![image](arcface.png)

Further experimentation using additional linear layers can boost the results. Then again, this approach is designed for one-shot learning. Worse performance in Binary Classification is quite understandable.
#### DenseNet169
Densenet169 needs more time to converge because of its enormous size and paramters.

| epoch 	| train_loss 	| valid_loss 	| error_rate 	| accuracy 	|  time 	|
|:-----:	|:----------:	|:----------:	|:----------:	|:--------:	|:-----:	|
|   0   	|  0.059754  	|  0.004154  	|  0.000000  	| 1.000000 	| 01:35 	|
|   1   	|  0.062731  	|  0.000837  	|  0.000000  	| 1.000000 	| 01:29 	|
|   2   	|  0.019187  	|  0.003954  	|  0.000000  	| 1.000000 	| 01:29 	|
|   3   	|  0.009922  	|  0.000457  	|  0.000000  	| 1.000000 	| 01:26 	|
|   4   	|  0.004491  	|  0.000055  	|  0.000000  	| 1.000000 	| 01:27 	|
#### Resnet101
Resnet101 needed less time to converge.

| epoch 	| train_loss 	| valid_loss 	| error_rate 	| accuracy 	|  time 	|
|:-----:	|:----------:	|:----------:	|:--------:	|:----------:	|:--------:	|
|   0   	|  0.063169  	|  0.033260  	|  0.011429  	| 0.988571 	| 01:17 	|
|   1   	|  0.034835  	|  0.002770  	|  0.000000  	| 1.000000 	| 01:15 	|
|   2   	|  0.024171  	|  0.002123  	|  0.000000  	| 1.000000 	| 01:15 	|
|   3   	|  0.014281  	|  0.006416  	|  0.005714  	| 0.994286 	| 01:14 	|
|   4   	|  0.006923  	|  0.002465  	|  0.000000  	| 1.000000 	| 01:13 	|

## Competition Standings

My models acheived perfect accuracy score in the public leaderboard.
<form action="https://github.com/abyaadrafid/Aerial-Cactus-Identification">
    <input type="submit" formtarget = "_blank" value="Github Repo" />
</form>

repository: abyaadrafid/academic-kickstart

repo_name: abyaadrafid/academic-kickstart


text:
# My Creative Resume
This is a submission for Scholar Jet's Akmai Creative Resume submission.

## How to run
### git clone
### npm install
### npm run watch
It should be running on localhost:3000
**Tech used:** HTML, SASS

# Social
#### Personal Github: https://www.github.com/rizelbobb
#### Linkedin: https://www.linkedin.com/in/rizel-bobb-semple/
#### Twitter: https://www.twitter.com/rizelbobb
#### Instagram : foreverizel_codes

repository: foreverizel/scholar-jet

repo_name: foreverizel/scholar-jet


text:
- data: [jokecamp/FootballData](https://github.com/jokecamp/FootballData/tree/master/football-data.co.uk) (raw data), wikipedia page (result table)
- tool: `pymc`
- setup for mcmc:
    - not specified
    - tried 200,000 iterations, 40,000 burn-in and 20 thinning interval (autocorrelation issue)
    - simplification in the model that assuming both mu attack and mu def follow a zero-mean normal.

## replication - 07-08 Serie A data

**diagnostics**

- diagnostics (- autocorrelation? 90% HDI (zero included)?)
    - home court effect
    - att mu and tau
    - def mu and tau
    - skipped diagnostics of att and def

- average def vs average attack

top teams with + att and - def (although counter-intuitive)

milan better att better def but lower ranking ;)

this is just the posterior mean, we can take a further look at highest posterior denstity interval for att

though not very obvious, some team in the middle tend to have similar HPD intervals. and the top 4 teams stand out. and this suggests the possbility of shrinkage.

next, we are going to simulate for 1 season and compare the results with real data

not very accurate right?

maybe this results are  just by chance, what about simulation for 1000 times?

still, actual goal they scored are higher than the simulated results
on the other hand, overestimate the goal for in bottom teams

this could be caused by our previous simplification in priors.

just for fun, we

> There's nothing inherently good or bad about shrinkage in hierarchical models. Shrinkage is just the mathematical consequence of the model choice. Just as you can choose to model a trend with a line or a quadratic or an exponential, you choose to model data with various hierarchies of parameters. We choose a model to achieve both descriptive adequacy and theoretical meaningfulness. If a particular choice of hierarchical model seems to produce too much shrinkage in some of the parameters, it means that somehow the hierarchy did not capture your prior knowledge because the posterior seems to violate your prior knowledge in ways unjustifiable from the data.
> Hierarchical models are supposed to express prior knowledge about how subsets of data are related. If the various subsets can truly be thought of as representing a higher level, then it makes perfect sense to put the subsets under a hierarchy and use all the the subsets to mutually inform the higher level and simultaneously constrain the lower-level estimates. The higher level estimate essentially constitutes a prior for each of the lower-level parameters.

- on premier league 2015-2016 when the leichester city won the title what a miracle!
- basically we did not change anything except the data but there is something extra i need to point out
- i know comparing different teams from differ years can cause some unhappiness especially among diehard sports fans, but we are trying to understand the football playing style from these data
- ok teams, mediocre attack and mediocre defense, survive the relegation, but you if  have bad D, you are in danger. best team have pretty good attack and defense. but for those team who go to europa league in the end, their playing style are pretty different: manUTd is good at defense but really bad at offence, liverpool and west ham are good at attacking style,  southampton is balanced.
- but if you take a look again at serie A data about ten years ago. you wil find out that most team are more densive-oriented, aggressive teams are so rare. only Inter in the bottom right corner might be the only one that count. but we cannot say those teams from Serie A ten years ago are worse than english teams nowadays. You know, time flies, lots of things changed in the past 10 years. the philosophy of football is different, attacking style is more popular, and counter-attack is considered as conservative.
- anyways, that's what we all have done.

repository: Reginald-Lee/biji-ben

repo_name: Reginald-Lee/biji-ben


text:
# Unity DOTS Genetic Neural Network

This project is inspired by Genetic Neural Network https://github.com/iambackit/COPS_AI.
However, it has been completely reworked for DOTS. Some common features may be recognised.

Link to Unity forum thread with a discussion https://forum.unity.com/threads/open-source-genetic-neural-network-f1cars.1061879/
Link to YouTube vid https://www.youtube.com/watch?v=vFFk4b2Xm0o

![Watch the video](https://forum.unity.com/attachments/upload_2021-2-21_17-34-10-png.800219/)

## Motivation

Well, I love AI stuff, that should be plenty of the reason :)
But what I wanted to achieve, is to stray away a bit from Unity ML utilities, which is only working on dev machines and requires python, to do training.
I want to be able to train AI at runtime as well, maybe even by players during game play.
Depending on the desired project.
I have been playing with different NNs, but all have been written, using classical OOP paradigm.
But I really wanted have NN in DOTS for long time already.
So hence here is my motivation.

## What to expect

After opening the project scene, multiple maps will be visible.
Additional maps can be added, or removed.
Each map is based on a prefab. It contains barriers, checkpoints, and car spawner points.

* Barriers basically limit where cars can go.
* Checkpoints allow each car to gain a score, which contributes to learning.
* Car spawner points spawn cars at its position, with some additional random position and rotation. Rotation of the checkpoint, will spawn cars facing the local X axis. More points can be added, or removed as needed per each map.

Maps can have different barriers configuration and have variation position and orientations of checkpoints.

## Training

Project comes with a partially pretrained set of brains, based on 320 cars.
The training took around 45 min.
After running further training, the car should arrive at the end of the map, within a few generations.
Data sets can be marked in a manager Game Object, to be saved and loaded.

## Cars

Each car has LIDAR, which casts rays in front of the car, 180 degrees.
Results are passed into NN.
Steering and throttle, is determined by the car controller system.
Values can be further tweaked. Cars behaviour is rather rough, with the main goal, to prove the concept.

![Watch the video](https://forum.unity.com/attachments/upload_2021-2-21_3-48-28-png.799946/)

## Game Object Manager with conversion to entity

GO Manager contains a range of settings, allowing to define, how training will be proceeded.
It allows to define, how various new generations will be, based on parents.
Manager is converted to entity at runtime and can be viewed via Entity Debugger.
Changing settings, may require at current state, stop and run game again.
Manager is just an example and can be further modified.
It is responsible for managing two sets of populations, current and previous (parents).
Hence, if the target population is 320, the total visible population will be 620, but active and trained will be 320.
The duration of training is based on the preset time and alive brains.
If time runs out (30 sec (starting time is lower)), or no alive population is present, generation will be finalised and a new generation will start.
If a car hits a barrier, it becomes inhibited, until the next generation. Score is evaluated and then is spawned again at spawn point.

![Watch the video](https://forum.unity.com/attachments/upload_2021-2-21_17-35-46-png.800222/)

## Genetic Neural Network

Each generation spawns a set of entities, in this case cars.
Each entity holds its own brain, with its own net settings. See Entity Debugger for details.
This NN uses 3 layers, input, hidden and output.

* Input layer is taking 9 LIDAR raycasts as input, speed and skidding factors. Total 11 neurons.
* Hidden layer has the same amount of neurons as input. But can be changed in an example manager.
* Output layer returns throttle and steering values, ranging 0.0 to 1.0.
* Weights count are multiplication of previous and next layer.

When a new generation is initialized, it first crossovers with the previous generation. Then mutation is applied, based on settings of an example manager.

## What definatelly is still missing

* ~~Cars should be marked, or indicated, that they have finished training. For example, when they hit a wall, they should change color. I.e. to semi transparent.~~
* Manger input for saving / loading file path with brains. For now is hard coded.
* Support for multiple independet managers. (Not tested, partially implemented).

## Things to know

First generation is always random, regardless if it is read from file, or not.
The Second generation is the first one, which contributes into training.

## Requirements
Unity 2020.1.3 or later.

## Known issues

* Sometimes at initial runtime, cars seem to ignore Unity physics collisions. Don't know the reason at this point. Usually a few generations later, all gets fine.
* Viewing scene and game at the same time, while training is running, may slow down the simulation.
* Spawning too many cars at the same spawner, may introduce lag and significant slowdown, due to Unity Physics collision system. Best way to prevent it, is to add more spawn points in different places, or spawn more maps with points. Number of cars will be distributed across all points. Keep in mind, to keep the size of the population, as a multiplier of the number of spawners. Otherwise error may throw out. Desired number of cars per spawns, is around 300 or below.
* Example Manager System for handling new generations is far from being optimal. It may drop FPS for few framse. But otherwise, I obsererve quite decent performance as of this rather rough work.

## Support

If you appricate my work, please star my repo. Many thanks :)


text:
psd
===

[![Build status](https://circleci.com/gh/chinedufn/psd.svg?style=shield&circle-token=:circle-token)](https://circleci.com/gh/chinedufn/psd) [![docs](https://docs.rs/psd/badge.svg)](https://docs.rs/psd)

> A Rust API for parsing and working with PSD files.

## Live Demo

The `psd` crate can be compiled to WebAssembly and used in a browser.

[In the live demo you can visualize a PSD in the browser](https://chinedufn.github.io/psd/drag-drop-demo/),
toggle layers on and off and drag and drop a new PSD into the demo.

![Demo screenshot](./examples/drag-drop-browser/demo-screenshot.png)

Check out the [examples/drag-drop-browser](examples/drag-drop-browser) directory for instructions on running the demo locally.

## The Psd Book

The _WIP_ [The Psd Book](https://chinedufn.github.io/psd) will contain information about getting started with the `psd` crate,
a description of the architecture and information on how to get started.

## API Docs

Check out the [API documentation](https://chinedufn.github.io/psd/api/psd) to see everything that you can currently access.

## Background / Initial Motivation

I'm working on a game and part of my asset compilation process was a script that did the following:

1. Iterate over all PSD files

2. Export every PSD into a PNG, ignoring any layers that begin with an `_`

3. Combine PNGs into a texture atlas

For a couple of years I was using `imagemagick` to power step 2, but after getting a new laptop and upgrading `imagemagick` versions it stopped working.

After a bit of Googling I couldn't land on a solution for my problem so I decided to make this crate.

My approach was to support as much of the PSD spec as I needed, so there might be bits of information that you'd like to make use of that aren't currently supported.

That said, if there's anything missing that you need [please feel very free to open an issue](https://github.com/chinedufn/psd/issues)!

## Usage

```rust
use psd::{ColorMode, Psd, PsdChannelCompression};

fn main () {
    // .. Get a byte slice of PSD file data somehow ..
    let psd = include_bytes!("./my-psd-file.psd");

    let psd = Psd::from_bytes(psd).unwrap();

    assert_eq!(psd.color_mode(), ColorMode::Rgb);

    // For this PSD the final combined image is RleCompressed
    assert_eq!(psd.compression(), &PsdChannelCompression::RleCompressed);

    assert_eq!(psd.width(), 500);
    assert_eq!(psd.height(), 500);

    // Get the combined final image for the PSD.
    let final_image: Vec<u8> = psd.rgba();

    for layer in psd.layers().iter() {
        let name = layer.name();

        let pixels: Vec<u8> = layer.rgba().unwrap();
    }

    let green_layer = psd.layer_by_name("Green Layer").unwrap();

    // In this layer the red channel is uncompressed
    assert_eq!(green_layer.compression(&PsdChannelKind::Red).unwrap(), PsdChannelCompression::RawData);

    // In this layer the green channel is RLE compressed
    assert_eq!(green_layer.compression(&PsdChannelKind::Green).unwrap(), PsdChannelCompression::RleCompressed);

    // Combine the PSD layers top to bottom, ignoring any layers that begin with an `_`
    let pixels: Vec<u8> = psd.flatten_layers_rgba(&|(_idx, layer)| {
        !layer.name().starts_with("_")
    }).unwrap();
}
```

## See Also

- [PSD specification](https://www.adobe.com/devnet-apps/photoshop/fileformatashtml/) - the basis of our API

## License

MIT

repository: chinedufn/psd

repo_name: chinedufn/psd


text:
# ChatBot

*A lab report by Bo Fang*

## In this Report

To submit your lab, fork [this repository](https://github.com/FAR-Lab/IDD-Fa18-Lab6). You'll need to upload any code you change into your fork, as well as upload a video of a friend or classmate using your chatbot.

## Make the ChatBot your own

**Describe what changes you made to the baseline chatbot here. Don't forget to push your modified code to this repository.**

**I made an Insomnia bot. I just updated the sentences of chat bot, tried to lead the user to last hint: count 1 to 1000. By making them feel boring to help them fall asleep :)**

```
  /// These are the main statments that make up the conversation.
  if (questionNum == 0) {
    answer = 'Hello ' + input + ' :-)'; // output response
    waitTime = 5000;
    question = 'What\'s the time now?'; // load next question
  } else if (questionNum == 1) {
    answer = 'Really, It\'s already ' + input + ' ? So that means you don\'t have much time to sleep tonight...'; // output response
    waitTime = 5000;
    question = 'What\'s the last time you had a good sleep?'; // load next question
  } else if (questionNum == 2) {
    answer = 'Since ' + input + ' ? That is really a long time ago.';
    waitTime = 5000;
    question = 'Oh btw, whats your favorite color?'; // load next question
  } else if (questionNum == 3) {
    answer = 'Ok, ' + input + ' it is.';
    socket.emit('changeBG', input.toLowerCase());
    waitTime = 5000;
    question = 'Do you want me to help you out?'; // load next question
  } else if (questionNum == 4) {
    if (input.toLowerCase() === 'yes' || input === 1) {
      answer = 'Perfect!';
      waitTime = 5000;
      question = 'So there is a easy way......want to know what it is?';
    } else if (input.toLowerCase() === 'no' || input === 0) {
      socket.emit('changeFont', 'white'); /// we really should look up the inverse of what we said befor.
      answer = ''
      question = 'U sure? I\'m really good at it. Do you want me to help you out?';
      waitTime = 0;
      questionNum--; // Here we go back in the question number this can end up in a loop
    } else {
      question = 'Do you want me to help you out?'; // load next question
      answer = 'I did not understand you. Could you please answer "yes" or "no"?'
      questionNum--;
      waitTime = 5000;
    }
    // load next question
  } else {
    answer = 'Now try to count from 1 to 1000'; // output response
    waitTime = 0;
    question = '';
  }

```

## Record someone trying out your ChatBot

**Using a phone or other video device, record someone trying out your ChatBot. Upload that video to this repository and link to it here!**

**[Link](https://youtu.be/vAEi6xt-EIg)**

---
Starter code by [David Goedicke](mailto:da.goedicke@gmail.com), closely based on work by [Nikolas<EMAIL_ADDRESS>and [Captain Anonymous](https://codepen.io/anon/pen/PEVYXz), who forked original work by [Ian Tairea](https://codepen.io/mrtairea/pen/yJapwv).