text:
## Introduction

What follows is a tutorial that walks developers through the steps of writing custom code for an iOS or tvOS application using P2UX. Developers should be familiar with the Xcode integrated development environment for MacOS and either the Swift or the Objective-C programming languages for custom coding.

Topics include customizable View Controllers, UI controls, and Screens/Panels.

!!! note "Terminology"
    Throughout the P2UX documentation the “developer” refers to you, the reader who is developing an app with P2UX. The “designer” refers to the individual whose principal job is to create the appearance and style of the app and its visual components. “PRL” refers to the P2UX Rendering Library for iOS, which controls the creation and workflow of content created for the P2UX platform.

!!! note "Coding examples and code additions"
    In the coding examples below and throughout the documentation, changes and additions to be made by the developer are rendered with a blue highlight.

*P2UX versus the standard Xcode environment*

P2UX based applications for iOS are easy to customize and extend. Since the P2UX iOS rendering library is based on the native UIKit and other iOS primitives, writing custom business logic and integrating custom controls works much the same as it does when writing iOS applications using Xcode.
With the P2UX platform, Storyboards and XIB based User Interface (UI) definitions are no longer required. Instead, applications use P2UX Portable UX Bundles (PUB) either as embedded or dynamically accessed resources. Additionally, P2UX provides hooks to developers that allow them access to all of the components of P2UX, as well as the ability to fully customize instances of the application.

!!! note "Create a P2UX enabled project first"
    This document assumes a P2UX enabled Xcode project has already been created. See [Quick Start](quickstart.md) for steps to create a project.

## P2UX and Xcode

*Objective-C or Swift*

P2UX native rendering libraries for iOS can be extended using either Objective-C or Swift. Developers are free to choose one or the other of these coding languages at any stage during the development process. The instructions below provide explicit reference to the proper use of either language in each applicable step that follows.

## Adding Custom Behaviors

If desired, customizable behaviors can be added to the project code.

A subclass of the `P2UXAppBehavior` class is the starting point for customizing the behavior of the application. From this class, all other parts of the application can be customized. (Common customized behaviors include creation of a Custom Control or overriding a particular View Controller.)

In Objective-C, create a header and module file for your project to store the customized behaviors. The easiest way to do is by making a ==New File== in your project –  a ==Cocoa Touch Class==, which in this example is called `SampleBehavior`.  In Xcode, create a new class from the drop down box labeled ==Subclass of:== and enter ==P2UXAppBehavior== in the field.
![project wizard](images/quickstartios/image9.png)
This will create two files: `SampleBehavior.h` and `SampleBehavior.m`.

``` hl_lines="1"
@import P2UXApp;
@interface SampleBehavior : P2UXAppBehavior
@end
```

Put any customized behaviors within the implementation here. (Behaviors available for customization are found within the P2UXApp framework, under the file `P2UXAppBehavior`.)

In addition, update `AppDelegate.m` to include the custom behaviors.

To do this, `AppDelegate` must include an instance of the method createBehavior from `P2UXAppCreatorDelegate` protocol. (This will override any default behaviors.) Also, import the `SampleBehavior.h` file so that this class can be instantiated.

Edit `AppDelegate.m` to look like this:
``` hl_lines="2 19 20 21 22"
#import "AppDelegate.h"
#import "SampleBehavior.h"
@interface AppDelegate ()
@end
@implementation AppDelegate
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
    NSString* appKey;
    appKey = @"xxxxx";
    NSDictionary *opts;
#if DEBUG
    opts = @{P2UXAppCreator_Opt_Env: P2UXAppCreator_Opt_Env_Stage};
#endif
    NSDictionary *resources = @[@{P2UXApp_PackageAttrib_FormFactor: [NSNumber numberWithInteger:P2UXFormFactor_Phone], P2UXApp_PackageAttrib_Type:P2UXApp_PackageType_Static, P2UXApp_PackageAttrib_Package:@"phone_pub",P2UXApp_PackageAttrib_Update:P2UXApp_PackageUpdate_None}];

    [P2UXAppCreator createApplicationWithKey:appKey opts:opts resources:resources delegate:self];
    return YES;
}

- (P2UXAppBehavior*) createBehaviorForApplication:(NSString *)appid
{
    return [[SampleBehavior alloc] init];
}
@end
```

If working in Swift, create a swift file for your project to store new behaviors.

Create a ==New File== in your project – a ==Swift File==, in this example called `SampleBehavior`. In Xcode, create a new class from the drop down box labeled ==Subclass of:== and enter ==P2UXAppBehavior== in the field.

Edit the `SampleBehavior.swift` file to look like this:
``` hl_lines="2"
import UIKit
import P2UXApp
class SampleBehavior: P2UXAppBehavior {

// override methods here

}
```

Place any customized behaviors within the implementation. Behaviors available for customization are found within the P2UXApp framework, under the file `P2UXAppBehavior`.

Next, update `AppDelegate.swift` to include the custom behaviors.

To do this, `AppDelegate` must must include an instance of the method `createBehavior` from the `P2UXAppCreatorDelegate` protocol. (This will override any default behaviors.)

Edit `AppDelegate.swift` to look like this:
``` hl_lines="29 30 31"
import UIKit
import P2UXApp
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate, P2UXAppCreatorDelegate {
    var window: UIWindow?
    func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
        let appKey = "xxxxx";
        var opts : [AnyHashable : Any];
#if DEBUG
        opts = [
            P2UXAppCreator_Opt_Env: P2UXAppCreator_Opt_Env_Stage,
            P2UXAppCreator_Opt_LogLevel: P2UXCoreLogLevel.verbose.rawValue as
            NSNumber
        ]
#endif
        var phoneResources: [AnyHashable : Any] = [
            P2UXApp_PackageAttrib_FormFactor: P2UXFormFactor.phone,
            P2UXApp_PackageAttrib_Type: P2UXApp_PackageType_Static,
            P2UXApp_PackageAttrib_Package: "phone_pub",
            P2UXApp_PackageAttrib_Update: P2UXApp_PackageUpdate_None
        ]

        var resources : [Any] = [
            phoneResources
        ]
        P2UXAppCreator.createApplication(withKey: appKey, opts: opts,
        resources: resources, delegate: self)
    }
    func createBehavior(forApplication appid: String) -> P2UXAppBehavior {
        return SampleBehavior();
    }
}
```

## Adding Custom View Controllers

Just like writing traditional Storyboard based iOS applications, writing custom code to interact with the User Interface is done using a subclass of `UIViewController`. Instead of subclassing directly from `UIViewController`, P2UX provides the class `P2UXViewController`, which itself is a subclass of `UIViewController` with a few added helper methods that interface with P2UX generated controls and events.

*The `P2UXViewController` subclass*

Since the P2UX UI is not based on Storyboards, connecting custom methods for each button click action is unnecessary. Instead, the user can override the methods of the `P2UXViewController` class to handle button click and other UI events. (In all other respects, writing code for customized Screen and Panel behavior is the same as for Storyboard-based content.)

The name of a chosen View Controller, such as a Screen or Panel, is the value used to identify the item when the P2UX rendering library creates an instance of this object. (To create an instance of a `P2UXViewController` for a Screen, for example, override the `P2UXAppBehavior` method `createViewControllerWithDef`.) The `def` parameter passed to this method contains the member variable `systemType` that identifies the Screen that is being created. From this object, the developer determines the requested Screen and the specific `P2UXViewController` subclass to be instantiated.

Objective-C example: creating a custom `P2UXViewController`

``` Objective-C
#import "SampleBehavior.h"
#import "SampleViewController.h"
@import P2UXApp;

@implementation SampleBehavior

- (P2UXViewController*) createViewControllerWithDef:(P2UXDefinition*)def
    	 cache:(BOOL)cache index:(id)index data:(id)data
     	 viewDelegate:(id<P2UXViewContainerDelegate>)viewDelegate  {

	// Determine which screen is being requested, the systemType of the P2UXDefinition class has the name of the screen as given in Builder
    if ([def.systemType isEqualToString:@”home”])
	{
    	// This is our custom home screen controller instance
    	return [[MyHomeController alloc] initWithView:def behavior:self cache:cache index:index data:data viewDelegate:viewDelegate];
	}
	// Make sure to call the superclass if a instance is not created
	return [super createViewControllerWithDef:def cache:cache index:index data:data viewDelegate:viewDelegate];
}
@end
```

Swift example: creating a custom `P2UXViewController`

``` Swift
override func createViewController(withDef def: P2UXDefinition!, cache: Bool, index: Any!, data: Any!, viewDelegate: P2UXViewContainerDelegate!) -> P2UXViewController! {

    // Determine which screen is being requested, the systemType of the P2UXDefinition class has the name of the screen as given in Builder
    if def.systemType == "home" {
        // This is our custom home screen controller instance
        return MyHomeController(view: def, behavior: self, cache: cache, index: index, data: data, viewDelegate: viewDelegate)
    }
    // Make sure to call the superclass if a instance is not created
    return super.createViewController(withDef: def, cache: cache, index: index, data: data, viewDelegate: viewDelegate);
}
```

The `P2UXViewController` view instance managed by your controller is created automatically based on the `P2UXDefinition`.

Just as Screens can have custom `UIViewController` instances to override their behavior, so too can Panels. The `UIViewController` based subclass `P2UXPanelController` manages Panel instances. To create a custom `P2UXPanelController` instance, override the `P2UXAppBehavior` method `createPanelControllerWithDef` and return an instance of a `P2UXPanelController` subclass.

Objective-C example: creating a custom P2UXPanelController

``` Objective-C
- (P2UXViewController*) createPanelControllerWithDef:(P2UXDefinition*)def
      cache:(BOOL)cache index:(id)index data:(id)data
      viewDelegate:(id<P2UXViewContainerDelegate>)viewDelegate {

   // Determine which screen is being requested, the systemType of the P2UXDefinition class has the name of the screen as given in Builder
   if ([def.systemType isEqualToString:@”userprofile”]) {
      // This is our custom panel controller instance
      return [[UserProfilePanelController alloc] initWithView:def behavior:self cache:cache index:index data:data viewDelegate:viewDelegate];
   }
   // Make sure to call the superclass if a instance is not created
   return [super createPanelControllerWithDef:def cache:cache
      index:index data:data viewDelegate:viewDelegate];
}
```

Swift example: creating a custom P2UXPanelController

``` Swift
override func createPanelController(withDef def: P2UXDefinition!,
      cache: Bool, index: Any!, data: Any!,
      viewDelegate: P2UXViewContainerDelegate!) -> P2UXViewController! {

   // Determine which screen is being requested, the systemType of the
   // P2UXDefinition class has the name of the screen as given in Builder
   if def.systemType == "userprofile" {
       // This is our custom panel controller instance
       return UserProfilePanelController(view: def, behavior: self, cache: cache, index: index, data: data, viewDelegate: viewDelegate)
   }

   return super.createPanelController(withDef: def, cache: cache, index: index, data: data, viewDelegate: viewDelegate);
}
```

##Accessing Control Instances from `P2UXViewController`

To access instances of controls, `P2UXViewController` provides a helper method, `controlWithElementSystemTypeOrId`. This method takes the name or ID of the desired control and returns access to the control instance.

Upon creating a new control, such as a new Button, Builder assigns it a “system type.” (Builder generates the system type from the designer’s name for the Button.) Later, the designer might decide to create an alternative variation of the Button. To prevent altering any existing controls, the developer should refer to the new version of the Button by its system type to eliminate overwriting or rewriting any code.

Objective-C example: accessing a control in a `P2UXViewController`

``` Objective-C
-(void) viewDidLoad {
   [super viewDidLoad];

   UIButton* btn = (UIButton*)[self controlWithElementSystemTypeOrId:@”show btn”];
   if (btn != nil) {
      btn.enabled = NO;
   }
}
```

Swift example: accessing a control in a `P2UXViewController`

``` Swift
override func viewDidLoad() {
   super.viewDidLoad()

   if let btn = self.control(withElementSystemTypeOrId: "show btn") as? UIButton {
      btn.isEnabled = false;
   }
}
```

##Handling Events from P2UXViewController

End-users of a completed app will interact with controls in a Screen or Panel to generate events. These interactions will, in turn, trigger actions. Typically the PRL handles events directly through event interactions set up in Builder. In some cases, additional custom code may be needed to trigger actions not directly supported by P2UX.

The PRL provides a chain of event handlers that propagate an event through different components. Handling events at any point in the propagation chain provides a way to trigger custom code and also (optionally) to stop the propagation of the event at any specific handler.

Event propagation follows a set pattern.

First, events are relayed to the `P2UXViewController` for the current Screen or Panel. Next, they pass to `P2UXAppBehavior`. Finally, events are handled by the custom instance of the `UIView` itself. If none of these components halt event propagation, the PRL will then handle any interactions defined for the event in Builder.

The `P2UXViewController` contains helper methods that handle a variety of events when they occur. These methods give the developer a chance to integrate any custom code needed from the basic event level without triggering any custom actions.

Most standard control events are routed through the `P2UXViewController` instance. Handling these events is a matter of overriding the appropriate event method in your `P2UXViewController` subclass. Event propagation can be allowed to continue or not depending on the return value from the event handler methods.

Objective-C example: handling a Button press event in `P2UXViewController` subclass

``` Objective-C
- (BOOL) handleButtonClick:(id)sender element:(P2UXElementInstance *)element {
    if ([element.systemType isEqualToString:@"okbtn"]) {
        // take some custom action here for the "okbtn"

        // return YES to indicate the event was handled and propagation
        // shouldn't continue
        return YES;
    }
    return NO;
}
```

Swift example: handling a Button press event in `P2UXViewController` subclass

``` Swift
override func handleButtonClick(_ sender: Any!, element: P2UXElementInstance!) -> Bool {
    if element.systemType == "okbtn" {
        // take some custom action here for the "okbtn"

        // return true to indicate the event was handled and propagation
        // shouldn't continue
        return true;
    }
    return false;
}
```

##Adding Custom UI Controls
UI Controls are the visual components of a Screen or Panel created in the Builder tool. These can be interactive, like Buttons or Sliders, or non-interactive, like Shapes or Text. Although P2UX offers many different UI Controls directly creatable and usable in Builder, a specific application may require developer-defined UI controls. Builder provides a Custom Control component that can be added to a Screen or Panel and then replaced using custom code.

Any `UIView` based control can be injected into your Screens and Panels via a Custom Control. This allows for existing custom controls or third party custom controls to be used with your P2UX based applications.

The PRL manages the size and position of any custom controls defined using Builder. To provide an instance of a custom control, override the method `createControlWithType` in your `P2UXAppBehavior` subclass and return the `UIView` subclassed instance of your control. The first parameter passed to this method, type, is the name of the control set when you created the custom control in Builder. P2UX will pass you the initial size to use with your Custom Control as well as a few other components that can be used to access any custom information created with your control in Builder.

The `elementInstance` parameter contains all the parameters specified using Builder for the control via its `itemSpec` member. Even though the parent `UIView` is passed to the create method, you should not add the instance of your `UIView` control to the parent as this is managed by P2UX when you return the instance of the control.

Objective-C example: creating a custom control in `P2UXAppBehavior` subclass:

``` Objective-C
- (UIView*) createControlWithType:(NSString *)type elementInstance:(P2UXElementInstance *)elementInstance frame:(CGRect)frame viewDelegate:(id<P2UXViewContainerDelegate>)viewDelegate index:(id)index data:(id)data parent:(UIView *)parent {

    if ([type isEqualToString:@"graphcontrol"]) {

        CustomGraph* graph = [[CustomGraph alloc] initWithFrame:frame];
        NSDictionary* graphOpts = [elementInstance.itemSpec objectForKey:@"graphopts"];
        if (graphOpts != nil) {
            // handle extra parameters here, for this example we defined an object
            // in the itemspec of the control
            // in Builder named 'graphopts' which has information specific to
            // our graph object
            graph.opts = graphOpts;
        }
        return graph;
    }
    return [super createControlWithType:type elementInstance:elementInstance frame:frame viewDelegate:viewDelegate index:index data:data parent:parent];
}
```

Swift example: creating a custom control in `P2UXAppBehavior` subclass:

``` Swift
override func createControl(withType type: String!, elementInstance: P2UXElementInstance!, frame: CGRect, viewDelegate: P2UXViewContainerDelegate!, index: Any!, data: Any!, parent: UIView!) -> UIView! {

    if type == "graphcontrol" {
        let graph : CustomGraph = CustomGraph(frame: frame);
        if let graphOpts = elementInstance.itemSpec["graphopts"] as? NSDictionary {
            // handle extra parameters here, for this example we defined an object
            // in the itemspec of the control
            // in Builder named 'graphopts' which has information specific to
            // our graph object
            graph.opts = graphOpts;
        }
        return graph;
    }
    return super.createControl(withType: type, elementInstance: elementInstance, frame: frame, viewDelegate: viewDelegate, index: index, data: data, parent: parent);
}
```

##Adding Custom Screens/Panels

In addition to using a `UIViewController` based class to override behavior for an application Screen or Panel, the actual Screen or Panel instance can also be overridden to provide any custom code needed for the hosted `UIView` itself.

P2UX will request an instance from `P2UXAppBehavior` when the Screen or Panel is created. If no instance is provided, P2UX will generate a standard instance of the Screen or Panel.

To provide a custom Screen instance, override the method `createScreenWithDef` from a `P2UXAppBehavior` subclass and return an instance of `P2UXScreen`. To provide a custom Panel instance, override the method `createPanelWithDef` and return an instance of `P2UXPanel`. (Both `P2UXScreen` and `P2UXPanel` are `UIView` based subclasses that add some additional helper methods. These methods make it easier to access screen components.)

Objective-C example: creating a custom Screen or Panel instance in P2UXAppBehavior subclass

``` Objective-C
// For custom Screen instances
-(P2UXScreen*) createScreenWithDef:(P2UXDefinition *)def rect:(CGRect)rect index:(id)index data:(id)data viewDelegate:(id<P2UXViewContainerDelegate>)viewDelegate {

    // If the screen “systemType” matches the name of the screen, return
    // the custom screen instance
    if ([def.systemType isEqualToString:@"home"]) {
        // Here we return an instance of HomeScreen which is a
        // subclass of P2UXScreen
        return [[HomeScreen alloc] initWithFrame:rect contents:def viewDelegate:viewDelegate index:index data:data];
    }
    return [super createScreenWithDef:def rect:rect index:index data:data viewDelegate:viewDelegate];
}

// For custom panel instances
- (P2UXPanel*) createPanelWithDef:(P2UXDefinition *)def rect:(CGRect)rect index:(id)index data:(id)data viewDelegate:(id<P2UXViewContainerDelegate>)viewDelegate {

    // if this is the userinfo panel, return the custom UserInfoPanel instance
    if ([def.systemType isEqualToString:@"userinfo"]) {
        return [[UserInfoPanel alloc] initWithFrame:rect contents:def viewDelegate:viewDelegate index:index data:data];
    }
    return [super createPanelWithDef:def rect:rect index:index data:data viewDelegate:viewDelegate];
}
```

Swift example: creating a custom Screen or Panel instance in `P2UXAppBehavior` subclass

``` Swift
// For custom Screen instances
override func createScreen(withDef def: P2UXDefinition!, rect: CGRect, index: Any!, data: Any!, viewDelegate: P2UXViewContainerDelegate!) -> P2UXScreen! {

    // If the screen “systemType” matches the name of the screen, return
    // the custom screen instance.
    if def.systemType == "home" {
       // Here we return an instance of HomeScreen which is a
       // subclass of P2UXScreen
       return HomeScreen(frame: rect, contents: def, viewDelegate: viewDelegate, index: index, data: data);
    }
    return super.createScreen(withDef: def, rect: rect, index: index, data: data, viewDelegate: viewDelegate);
}

// For custom panel instances
override func createPanel(withDef def: P2UXDefinition!, rect: CGRect, index: Any!, data: Any!, viewDelegate: P2UXViewContainerDelegate!) -> P2UXPanel! {

    // If the panel “systemType” matches the name of the screen, return
    // the custom panel instance.
    if def.systemType == "userinfo" {
           // Here we return an instance of HomeScreen which is a
           // subclass of P2UXScreen
           return UserInfoPanel(frame: rect, contents: def, viewDelegate: viewDelegate, index: index, data: data);
    }
    return super.createPanel(withDef: def, rect: rect, index: index, data: data, viewDelegate: viewDelegate);
}
```


text:
# ScyllaDB Alerts for GKE

## High compaction load alert
High compaction load can interfere with system behavior. If compaction load remains high, you may need to set the compaction share to a static level.

## High prepared statement eviction rate alert
If the prepared statement cache is being continuously evicted, it indicates an error in application prepared-statement usage logic. This can cause performance to degrade.

### Creating Notification Channels and User Labels

It is strongly recommended to add notification channels and user labels to the alert policies. The notification channel will set the notification destination if the alert policy is triggered. User labels are used for categorization, and can be used to indicate the severity level.

### User Labels

Supplying user labels could give extra identification information about the firing alert:

i.e.

```json
    "userLabels": {
        "Severity": "Warning"
    }
```

#### Notification Channels

The ID of the notification channel to be notified.

```json
    "notificationChannels": [
        "projects/project-id/notificationChannels/1234567"
    ]
```

branch_name: refs/heads/master

extension: md

gha_language: Python

license_type: permissive


text:
# gradle cookbook

Requirements
============

Platform
--------

* Ubuntu, Debian

Dependencies
------------

The following cookbooks are dependencies:

* Java - gradle requires the JVM to work.
* ark - Used to unpack and install the Gradle tarball.

Usage
=====

Simply include the recipe where you want Gradle to be installed.

Attributes
==========

* default[:gradle][:version] defaults to 1.5
* default[:gradle][:home] defaults to /usr/local/gradle
* default[:gradle][:url] the download url for the gradle binary zip
* default[:gradle][:checksum] the checksum for the gradle binary zip downloaded in the url

Recipes
=======

* default Will install Gradle into the proper location, modify PATH and define GRADLE_HOME.

Author
======

Olle Hallin<EMAIL_ADDRESS>


text:
# Snapbot
A snapchat batch bot

# About
This project is made up of two very simple batch scripts. It automates the process of opening and sending snaps.

# How to use
If you want to use the batch scripts, then you will need to have ADB in your PATH and have your phone connected to your PC via a cable capable of data transfer. It is also likely that you will have to manually calibrate the batch scripts screen tap locations as we probably have different screen sizes.

To use the snap send batch file, first go to the contact you will be sending the snaps and then hide the keyboard. After calibrating the script, just open the batch file and watch it run.

To use the snap open batch file, first connect go to the conversations list in Snapchat. After calibrating, open the script and watch it run.

repository: jontymorris/Snapbot

repo_name: jontymorris/Snapbot


text:
### [CVE-2008-4837](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2008-4837)
![](https://img.shields.io/static/v1?label=Product&message=n%2Fa&color=blue)
![](https://img.shields.io/static/v1?label=Version&message=n%2Fa&color=blue)
![](https://img.shields.io/static/v1?label=Vulnerability&message=n%2Fa&color=brighgreen)

### Description

Stack-based buffer overflow in Microsoft Office Word 2000 SP3, 2002 SP3, 2003 SP3, and 2007 Gold and SP1; Word Viewer 2003 Gold and SP3; Office Compatibility Pack for Word, Excel, and PowerPoint 2007 File Formats Gold and SP1; and Microsoft Works 8 allow remote attackers to execute arbitrary code via a crafted Word document that contains a malformed table property, which triggers memory corruption, aka "Word Memory Corruption Vulnerability."

### POC

#### Reference
- https://docs.microsoft.com/en-us/security-updates/securitybulletins/2008/ms08-072

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

license: MIT

repository: trickest/cve

branch_name: refs/heads/main

gha_language: HTML

gha_license_id: MIT

repo_name: trickest/cve


text:
# svnstats
Script that parses a verbose svn log. You can produce svn logs via

```sh
svn log -v >> svn.log
```
The script reads from the file *svn.log* and gives results in the form *(username, number_of_commits)*. It also
shows the top 15 most commited java classes in the repository like *(java_class, number_of_commits)*.

An example of the output:
```sh
user@system:$ runhaskell svnparse.hs
"Weekend commits:"
[("developerX",3), ("developerY",1)]
"Total commits:"
[("developerX",612), ("developerY",486)]
"Commits between 22:00 and 05:00"
[("developerY",31)]
"Top 15 changed java classes: "
("/project/trunk/app/AbstractView.java",83)
("/project/trunk/app/IsModule.java",74)
("/project/trunk/app/DashboardMessages.java",73)
("/project/trunk/app/StatisticsView.java",71)
("/project/trunk/app/UserDaoImpl.java",66)
("/project/trunk/app/AbstractUserPresenter.java",63)
("/project/trunk/app/StatisticsResource.java",63)
("/project/trunk/app/StatisticsPresenter.java",56)
("/project/trunk/app/DashboardModule.java",53)
("/project/trunk/app/PhotoResource.java",49)
("/project/trunk/app/AbstractConfigurator.java",49)
("/project/trunk/app/UserService.java",45)
("/project/trunk/app/UserRegistry.java",45)
("/project/trunk/app/UserWorkflow.java",45)
("/project/trunk/app/Main.java",44)
```

repository: hotlib/svnstats

repo_name: hotlib/svnstats


text:
# DeepCT and HDCT: Context-Aware Term Importance Estimation For First Stage Retrieval
This repository contains code for two of our papers:
- arXiv paper "Context-Aware Sentence/Passage Term Importance Estimation For First Stage Retrieval" [arXiv](https://arxiv.org/abs/1910.10687), 2019
- The WebConf2020 paper "Context-Aware Document Term Weighting for Ad-Hoc Search" [pdf](http://www.cs.cmu.edu/~zhuyund/papers/TheWebConf_2020_Dai.pdf), 2020

*Feb 19, 2019*: Checkout our new WebConf2020 paper ["Context-Aware Document Term Weighting for Ad-Hoc Search" ](http://www.cs.cmu.edu/~zhuyund/papers/TheWebConf_2020_Dai.pdf)! It presents HDCT, which extends DeepCT to support long documents and weakly-supervised training!

*Feb 19, 2019*: Data and instructions for HDCT will come soon.

Term frequency is a common method for identifying the importance of a term in a query or document. But it is a weak signal. This work proposes a Deep Contextualized Term Weighting framework that learns to map BERT's contextualized text representations to context-aware term weights for sentences and passages.

- DeepCT is a framwork for sentence/passage term weighting. When applied to **passages**, DeepCT-Index produces term weights that can be stored in an ordinary inverted index for passage retrieval. When applied to **query** text, DeepCT-Query generates a weighted bag-of-words query that emphasizes essential terms in the query.
- HDCT extends DeepCT to support long documents. It index **documents** into an ordinary inverted index for retrieval.

<img src="deepct.png" alt="Illustration of DeepCT" width="500"/>

## DATA 1:DeepCT Retrieved Results (Initial Rankings)

We released the top 1000 documents retrieved by DeepCT for the MS MARCO Passage Ranking dev/eval queries. You can use these as your initial document ranking for downstream re-ranking. The ranking files can be downloaded from [here](http://boston.lti.cs.cmu.edu/appendices/arXiv2019-DeepCT-Zhuyun-Dai/msmarco_rankings/).

## DATA 2: Weighted MS-MARCO Passage Files

If you want to use the DeepCT-Index weighted MS-MARCO passages (e.g., to build index & run experiments), download them here:
[Virtual Appendix/weighted_documents](http://boston.lti.cs.cmu.edu/appendices/arXiv2019-DeepCT-Zhuyun-Dai/weighted_documents/)

DeepCT generates a floating-point weight for every term: y_{t,d}. To turn it into an integer TF-like weight, we tested 2 different ways:

1. The paper used `TF_{DeepCT}(t, d) = round(y_{t,d} * 100)` (`sample_100_jsonl.zip`)
2. Later I use `TF_{DeepCT}(t, d) = round(sqrt(y_{t,d}) * 100)` (`sqrt_sample_100_jsonl.zip`). sqrt makes small values highe, e.g., sqrt(0.01)=0.1, so more terms will appear in the document.

Each line in the json file is the text of a weighted passage. We repeat every word TF_{DeepCT} times, so that these json files can be directly feed into [Anserini](https://github.com/castorini/anserini) to build inverted indexes.

`{"id": "2", "contents": "essay essay essay essay essay essay essay essay essay essay essay essay bomb bomb bomb bomb bomb bomb success manmade manmade possible project project project project project project project project project project project project project project project project project project project project project project project project project project project project project project project   atomic atomic atomic atomic atomic atomic making making making ..."}`

In the paper, we fine-tuned the BM25 parameters (k1, b) for all baselines and DeepCT-index methods. We recommend the following parameters:
- Baseline BM25: k1=0.6, b=0.8
- DeepCT: k1=10, b=0.9
- DeepCT-sqrt: k1=18, b=0.7
- Also see detaills in [issue#2](https://github.com/AdeDZY/DeepCT/issues/2).

## DATA 3: Other MS MARCO passage ranking task data for reproducing

To reproduce DeepCT-Index: The corpus, training files, checkpoints,and predictions can be downloaded from the [Virtual Appendix](http://boston.lti.cs.cmu.edu/appendices/arXiv2019-DeepCT-Zhuyun-Dai/)

1. `data`: MS MARCO passage ranking corpus, and pre-processed training files to train DeepCT.
2. `output`: the pre-trained DeepCT model (trained in MS MARCO)
3. `predictions`：the DeepCT predicted weights for the entire MS MARCO passage ranking corpus.

The tokenization will take a long time. Alternatively, you can download the preprocessed binary training/inference files (`output/train.tf_record`, `predictions/collection_pred_1/predict.tf_record`, `predictions/collection_pred_2/predict.tf_record`).  Comment out the `'file_based_convert_examples_to_features()'` function calles in `run_deepct.py` line 1061-1062,1112-1114.

## Run DeepCT 1: Train DeepCT

The source code uses
- Python 3
- Tensorflow 1.15.0

To use the sample training code, copy and decompress `data` in the [Virtual Appendix](http://boston.lti.cs.cmu.edu/appendices/arXiv2019-DeepCT-Zhuyun-Dai/) to the.`./data` under this repo.

```
export BERT_BASE_DIR=/bos/usr0/zhuyund/uncased_L-12_H-768_A-12
export TRAIN_DATA_FILE=./data/marco/myalltrain.relevant.docterm_recall
export OUTPUT_DIR=./output/marco/

python run_deepct.py \
  --task_name=marcodoc \
  --do_train=true \
  --do_eval=false \
  --do_predict=false \
  --data_dir=$TRAIN_DATA_FILE \
  --vocab_file=$BERT_BASE_DIR/vocab.txt \
  --bert_config_file=$BERT_BASE_DIR/bert_config.json \
  --init_checkpoint=$BERT_BASE_DIR/bert_model.ckpt \
  --max_seq_length=128 \
  --train_batch_size=16 \
  --learning_rate=2e-5 \
  --num_train_epochs=3.0 \
  --recall_field=title \
  --output_dir=$OUTPUT_DIR
```

`BERT_BASE_DIR`: The small, uncased BERT model released by Google.

`TRAIN_DATA_FILE`: a json file with the query term recall labels. It tooks like:

`{"query": "what kind of animals are in grasslands", "term_recall": {"grassland": 1, "animals": 1}, "doc": {"position": "1", "id": "4083643", "title": "Tropical grassland animals (which do not all occur in the same area) include giraffes, zebras, buffaloes, kangaroos, mice, moles, gophers, ground squirrels, snakes, worms, termites, beetles, lions, leopards, hyenas, and elephants."}}`

`term_recall` is the ground-truth term weight (see details in our paper). You can replace `term_recall` with any other ground-truth term weight labels.

`OUTPUT_DIR`: output folder for training. It will store the tokenized training file (train.tf_record) and the checkpoints (model.ckpt).

## Run DeepCT 2: Use DeepCT to Predict Term Weights (Inference)

 To use the sample training code, download and decompress `data` in the [Virtual Appendix](http://boston.lti.cs.cmu.edu/appendices/arXiv2019-DeepCT-Zhuyun-Dai/) to the.`./data` under this repo. Download the pre-trained DeepCT model (model.ckpt-65816 files) from `outputs` to `./output`.

(You can skip this step.  It looks like:

 `0 \t The presence of communication amid scientific minds was equally important to the success of the Manhattan Project as scientific intellect was. The only cloud hanging over the impressive achievement of the atomic researchers and engineers is what their success truly meant; hundreds of thousands of innocent lives obliterated.`

 `$OUTPUT_DIR`: output folder for testing. It will store the tokenized test file (predict.tf_record) and the predictions (test_results.tsv). test_results.tsv file looks like:

 `[CLS] 0.0       the -0.0023216241970658302      presence 0.0160924531519413     of 0.0003044793847948313      ...     ; -0.0012609917903319001        hundreds 0.000732177053578198   of -0.0018553155241534114       thousands 0.001125242910347879  of -0.0011851346353068948       innocent 0.004741794429719448   lives 0.015339942649006844      ob 0.006402325350791216 ##lite 0.0      ##rated 0.0     . -0.002221715170890093 [SEP] -0.0      [PAD] -0.0      [PAD] -0.0      [PAD] -0.0      [PAD] -0.0`

 ## Run DeepCT 3: Turn float-point term wegihts into TF-like index weights

Now we need to turn the above BERT outputs (`y`) into TF-like term index weights.

This methods implements (eq 4) in the paper: `TF_{DeepCT}(t,d) = round(y * N)`. Let us know if you found better ways!

Download our DeepCT predicted weights for the entire MS MARCO passage ranking corpus, from `prediction` in the [Virtual Appendix](http://boston.lti.cs.cmu.edu/appendices/arXiv2019-DeepCT-Zhuyun-Dai/

 Use `bert_term_sample_to_json.py` to:
 1. map test_result.tsv back to original document ids, and
 2. scale the weights into integers for indexing.

 ```
 usage: bert_term_sample_to_json.py [-h] [--output_format {tsv,json}]
                                   dataset_file prediction_file output_file m

positional arguments:
  dataset_file          Dataset tsv file (collection.tsv.1)
  prediction_file       DeepCT prediction file (test_result.tsv)
  output_file           Output File
  m                     scaling parameter > 0, recommend 100

optional arguments:
  -h, --help            show this help message and exit
  --output_format {tsv,json}
 ```

 The output files can be feed to indexing tools such as Anserini (used in paper), Indri, or Lucene to build index and run retrieval.
 Go to the original repository of [Anserini](https://github.com/castorini/anserini)

 For retrieval, it is critical to fine-tune the BM25/LM parameters (k1, b, \mu). See detaills in [issue#2](https://github.com/AdeDZY/DeepCT/issues/2).

repository: thakur-nandan/DeepCT

repo_name: thakur-nandan/DeepCT


text:
---
layout: post
title:  "Basic graph analytics (5)"
categories: [Network graph analysis]
---

## K-means clustering for figuring out a shape of community

When analyzing a graph, It is required to divide the network into community units as i explained in the previous post [here](https://angrykim.github.io/network%20graph%20analysis/2018/07/06/Basic-graph-analytics-(4).html)

When figuring out a marketing fruad case in a specific period,

One of my favorite ways to analyze network graphs is to conduct analysis on a community basis.

For instance, we normally analyze the data by user ID or log event.

As for community based analysis, It is based on community classes, not the user IDs or event IDs.

As you can see the following graph, It is an example network graph for a week data set.

The left picture is the network graph and the right is the same one with Modularity applied.

   - `The number of communities: 1,499`

   - `Modularity: 0.991`

Once we compute the modularity, What's the next step is to check the ratio of the events that the node has, with the following information, you should check whether it is a fraud or not.

#### - Checkpoint

1. Determine what kinds of event(pay, deposit, transfer, and etc) history we can find in the community like

   - `Transfer ratio`

        - The percentage of how many transfer events occurred in the community over the same period.

   - `Withdraw ratio`

        - The percentage of how many withdraw events occurred in the community over the same period.

   - `Deposit ratio`

        - The percentage of how many deposit events occurred in the community over the same period.

   - `Payment ratio`

        - The percentage of how many payment events occurred in the community over the same period.

   - `User Grade`

        - According to period of use, we can classify users into groups like "Light", "Midieum", and "Heavy".

2. Whether or not the nodes has same event sequence

If you have those information, I'm sure that you will be able to detect not only the community that

carried out **"marketing fraud"**, but also set rules to enable automatic detection.**

path: /_posts/Basic graph analytics (5).md

filename: Basic graph analytics (5).md


text:
Role Name
=========

This role can be used to install/configure a Quakelive dedicated server, with
modifications for clan The Wicked Net.

Requirements
------------

 * Debian 9 Host

Role Variables
--------------

Example Playbook
----------------

    - hosts: Servers
      roles:
         - role: ansible-quakelive

License
-------

BSD

Author Information
------------------

Frank Lazzarini <flazzarini at gmail.com>

repository: flazzarini/ansible-wickedquakelive

repo_name: flazzarini/ansible-wickedquakelive


text:
# Changelog

## [v4.0.1-0] - 2023-08-07

- Upgrade to grocy v4.0.1

## [v4.0.0-0] - 2023-07-29

- Upgrade to grocy v4.0.0

## [v3.3.2-8] - 2023-07-29

- Rebuild container imagers with Alpine 3.18.2

## [v3.3.2-7] - 2023-05-12

- Container publish workflow:
  - Cleanup: remove no-longer-applicable 'acs-report-enable' option from Anchore scan action config
  - Adjustment: re-order container scan and upload steps to avoid file clobbering
    - Note: if-and-when implemented, https://github.com/anchore/scan-action/issues/216 could provide an alternative
- Rebuild container imagers with Alpine 3.18.0

## [v3.3.2-6] - 2023-03-31

- Rebuild container imagers with Alpine 3.17.3

## [v3.3.2-5] - 2023-02-17

- Rebuild container imagers with Alpine 3.17.2

## [v3.3.2-4] - 2022-12-18

- Rebuild container imagers with Alpine 3.17.0 (#205)
  - Also removes PHP log volume mounts, since those volumes are no longer written to
- Fix an nginx 'alert' error that appeared when starting the frontend container (#204 - thank you, @RedlineTriad)

## [v3.3.2-3] - 2022-11-28

- Revert to Alpine 3.16.3 and PHP 8.0
  - PHP 8.1 isn't yet officially supported by Grocy, and Alpine 3.17.0 doesn't currently include PHP 8.0

## [v3.3.2-2] - 2022-11-27

- Rebuild container imagers with Alpine 3.17.0
- Configure restart policy 'unless-stopped' in docker-compose.yml

## [v3.3.2-1] - 2022-11-26

- Logging-related changes
  - Configure logging to stdout and stderr from application containers
  - Remove the nginx log storage volume from frontend containers

- Potentially impactful configuration changes in 'docker-compose.yml'
  - The default listen port for the frontend container has been updated to 8080

- Fixup: bring self-signed TLS certificate frontend container build up-to-date with Alpine 3.16.3
- Add README guidance for upgrading container versions
- Remove some no-longer-used Composer-related environment variables from the PHP container build
- Store separate copies of the nginx configuration for the 'frontend' and 'frontend-tls-selfsigned' containers in git

## [v3.3.2-0] - 2022-11-13

- Upgrade to grocy v3.3.2
- Cleanup: migrate back to Alpine-packaged distribution of composer (PHP package manager)

## [v3.3.1-7] - 2022-11-13

- Rebuild container imagers with Alpine 3.16.3
- Deprecate support for self-signed TLS certificates in frontend container (#183)

## [v3.3.1-6] - 2022-09-17

- Update GitHub Actions build workflow to use Ubuntu jammy

## [v3.3.1-5] - 2022-09-17

- Rebuild container images with Alpine 3.16.2

## [v3.3.1-4] - 2022-07-19

- Rebuild container images with Alpine 3.16.1

## [v3.3.1-3] - 2022-06-25 - 2022-07-19

- This release version was used to test changes to grocy-docker's GitHub Actions release process
- Container vulnerability scanning was successfully enabled as of 2022-07-19 (#173, #174, #175)

## [v3.3.1-2] - 2022-06-25

- Release process changes (#168)
  - Dynamically determine the grocy app version based on git tag (#169)
  - Publish images using two tags: the grocy app version, and the git tag (#170)
  - Temporarily remove Snyk container scanning support (#170)
    - This will move into the GitHub Actions workflows in future

## [v3.3.1-1] - 2022-06-25

- Fix: GitHub Actions container build version had not been updated to v3.3.1 (was: v3.3.0)
  - This means that Docker Hub image 2507e6e6f77a44cbe58915296aab590ee8bee501fb0d4605024e7dfbc7b5760c - tagged as v3.3.1 - in fact contains Grocy v3.3.0

## [v3.3.1-0] - 2022-06-13

- Upgrade to grocy v3.3.1

## [v3.3.0-1] - 2022-05-26

- Rebuild container images with Alpine 3.16.0

## [v3.3.0-0] - 2022-05-03

- Upgrade to grocy v3.3.0
- Rebuild container images with Alpine 3.15.4

## [v3.2.0-1] - 2022-03-20

- Rebuild container images with Alpine 3.15.1

## [v3.2.0-0] - 2022-02-11

- Upgrade to grocy v3.2.0

## [v3.1.3-1] - 2021-12-15

- Add continuous integration support for multi-architecture container builds
- Rebuild container images with Alpine 3.15.0

## [v3.1.3-0] - 2021-11-23

- Upgrade to grocy v3.1.3
- Rebuild container images with Alpine 3.14.3

## [v3.1.2-0] - 2021-10-05

- Upgrade to grocy v3.1.2
- Changes to the Makefile
  - The `build` target now only builds the image, but does not start it.
  - The `create` target (re)creates a pod for grocy, but does not start it.
  - The `run` target depends on `create` and then starts the created pod.
  - The host prefixes of the images are now set to match the official images on Docker hub and can be overriden using the IMAGE_PREFIX variable.
  - The image tags are now generated from `git describe`, but can be overridden using the IMAGE_TAG variable.
- Rebuild container images with Alpine 3.14.2

## [v3.1.1-1] - 2021-09-02

- Fixup: use correct GROCY_VERSION (v3.1.1) for backend in docker-compose.yml (thank you, @Kritzefitz)

## [v3.1.1-0] - 2021-08-21

- Upgrade to grocy v3.1.1

## [v3.1.0-0] - 2021-08-21

- Rebuild container images with Alpine 3.14.0
- Use more meaningful container names
  - 'grocy/grocy' becomes 'grocy/backend'
  - 'grocy/nginx' becomes 'grocy/frontend'
- Upgrade to grocy v3.1.0 and PHP8 (thank you, @HamburgerJungeJr)

## [v3.0.1-12] - 2021-08-21*

### Changed

- Rebuild container images to resolve CVE-2021-21705
- [Minor] Update snyk vulnerability scan

*This was a late release; this should have been released on 2021-07-18 per the changelog; unfortunately it was not, and this was only noticed today, 2021-08-21

## [v3.0.1-11] - 2021-05-02

### Changed

- Rebuild container images with new Alpine 3.13.5 release
- [Minor] Update snyk vulnerability scan

## [v3.0.1-10] - 2021-03-25

### Changed

- Rebuild container images with new Alpine 3.13.3 release
- [Minor] Update snyk vulnerability scan

## [v3.0.1-9] - 2020-02-18

### Added

- Experimental support for multi-architecture OCI image builds

### Changed

- Rebuild container images with new Alpine 3.13.2 release

## [v3.0.1-8] - 2020-01-29

### Changed

- Rebuild container images with new Alpine 3.13.1 release

## [v3.0.1-7] - 2020-01-15

### Changed

- Migrate to a release-initiated GitHub Actions workflow
- Consistency: remove custom naming from docker/login-action step

## [v3.0.1-6] - 2020-01-15

### Changed

- Really this time.

## [v3.0.1-5] - 2020-01-15

### Changed

- Remove `GITHUB_API_TOKEN` from container build arguments

## [v3.0.1-4] - 2020-01-15

### Changed

- Cleanup for GitHub Actions workflow

## [v3.0.1-3] - 2020-01-15

### Changed

- Fixup for GitHub Actions workflow: include image tag during 'docker-push' step

## [v3.0.1-2] - 2020-01-15

### Changed

- Rebuild container images with new Alpine 3.13.0 release

## [v3.0.1-1] - 2021-01-05

### Changed

- Upgrade to grocy release v3.0.1

## [v3.0.0-2] - 2021-01-02

### Added

- Docker Hub container upload automation using GitHub Actions

### Changed

- Supply PHP EXIF and LDAP library dependencies at build-time
- [Minor] Update snyk vulnerability scan
- [Minor] Refresh package-lock.json version, and remove container version suffix
- Run vulnerability scans using 'latest' container image tag

## [v3.0.0-1] - 2020-12-22

### Changed

- Upgrade to grocy release v3.0.0

## [v2.7.1-5] - 2020-12-22

### Changed

- Rebuild container images with new Alpine 3.12.3 release

## [v2.7.1-4] - 2020-09-02

### Changed

- Perform `apk update` prior to Alpine Linux package installation
- Rebuild container images with new Alpine 3.12.0 release

## [v2.7.1-3] - 2020-04-27

### Changed

- Rebuild container images with new Alpine 3.11.6 release

## [v2.7.1-2] - 2020-04-21

### Changed

- Rebuild nginx image with new Alpine 'openssl' package
- Was: 'OpenSSL 1.1.1d  10 Sep 2019'
- Now: 'OpenSSL 1.1.1g  21 Apr 2020 (Library: OpenSSL 1.1.1d  10 Sep 2019)'

## [v2.7.1-1] - 2020-04-18

### Added

- Upgrade to grocy release v2.7.1

## [v2.7.0-1] - 2020-04-17

### Added

- Upgrade to grocy release v2.7.0

## [v2.6.2-4] - 2020-04-07

### Removed

- Shared 'www-static' volume

## [v2.6.2-3] - 2020-04-06

### Changed

- Introduced a handful of Docker Hub image best-practices

## [v2.6.2-2] - 2020-04-04

### Changed

- Pull in upstream grocy v2.6.2 fix

## [v2.6.2-1] - 2020-04-04

### Changed

- Ensure that the application is bound to <IP_ADDRESS> by default

## [v2.6.2] - 2020-04-03

### Added

- Upgrade to grocy release v2.6.2
- Support for GitHub API tokens at build-time
- Log volumes added for grocy and nginx
- Optional support for OCI image builds

### Changed

- Breaking change: Image names are now: grocy/nginx, grocy/grocy
- Breaking change: Application database volume contents and name updated
- Image filesystems are read-only

repository: grocy/grocy-docker

gha_language: Dockerfile

repo_name: grocy/grocy-docker


text:
# XTCE Toolkit README #

The XTCE Toolkit provides both a native Java library and a Graphical User
Interface, based on that library, to support the OMG XML Telemetric and
Command Exchange (XTCE) standard.

The toolkit does not depend on any graphical interfaces.  Further, the
graphical user interface "xtceview" contains little to no business logic,
preferring to be a graphical wrapper around the toolkit package.  To
supplement this, a number of examples, sample databases, and schema
documentation are also included.

## Purpose ##

The XTCE Toolkit project supports the user community of the XTCE specification
by attempting to:

* Provide a program and platform independent viewer/editor for satellite
databases stored in XTCE format.  Visualization of large XML data sets is a
struggle without the assistance of a higher level tool.

* Provide an API that is relatively easy to use, with a minimum of training,
and does not otherwise require understanding of all of the internal complexity
of the XTCE specification.  The specification is very complex, which makes it
powerful enough to represent any program, but non quick or easy to use for
programmers.

* Provide a means to validate and/or "cross check" other satellite C2 systems
and tools by providing an internal encoder/decoder to enable round trip
conversion of Telemetry, Telecommand, Table, and various forms of Log or
Buffer data, when represented in the XTCE data model.

## Note On The Specification ##

This project is primarily aimed at supporting the XTCE 1.2 specification that
has yet to be released by the
Object Management Group Space Domain Task Force.  XTCE XML documents that
are compliant with the existing 1.1 specification will work with this library
in many cases, although some intervention may be required on elements which are
known to have spelling errors.  Enabling validation on the XML will report the
issues, should any exist during document loading.

The longer term strategy planned at present is to have this library/ui toolkit
automatically migrate XTCE 1.1 documents to XTCE 1.2 documents during the
loading process when the XTCE 1.2 specification is finalized.

## Key Features ##

* Supported by the author and tested regularly on Linux, Solaris, Mac OS/X,
and Windows platforms.
* Static Analysis by Coverity Scan for Open Source

* Telemetry Parameter access without needing to understand the XTCE data model,
relationships, references, or other complexities.
* Similar Telecommand and Argument access without needing to understand the
XTCE data model.
* Telemetry and Telecommand Container/Packet processing supporting most of the
XTCE schema complexity, reducing the output access to simple flattened
accessors such that the user need not understand or be aware of the
complexities of the XTCE data model.
* Extremely fast optimized searches for Parameters, Telecommands, and usage of
Parameters in Containers/Packets.
* Support for Streams and ability to link from Streams to specific
Containers/Packets.
* Ability to export from XTCE to other common formats, such as CSV, for use in
a spreadsheet.
* Regression tested using Java standard JUnit 4 classes.
* The toolkit and GUI are both conceived with idea of editing as well as
viewing in mind, although the edit features are only minimally complete.
* Round trip loading and saving operations while preserving comments and
formatting.
* The toolkit and GUI have both been proven on programs that utilize both CCSDS
Space Data Link and European ECSS Packet Utilization (PUS) standards.
* The toolkit and GUI are regularly used with satellite databases that
incorporate XInclude and in total are hundreds of megabytes in size.
Performance was a strong consideration in the design.
* I18/L10 Internationalization with support currently installed for both US
English and European French languages.
* An internal encoder and decoder for Parameters and Arguments that can serve
as a reference for other implementations of commutation and de-commutation
capabilities.
* XTCE 1.2 Release Candidate Schema support.

## Getting Started ##

The JAR file contains both the library and the graphical interface application.
It is self-executable with Java 7 or later.  In the event that Java 7 is used,
then the user will need to ensure that `jfxrt.jar` is on the `CLASSPATH`.  This
is used for the Help Menus, which may be the first capabilities desired.
Example launch scripts with Windows (.bat) and Unix (.sh) are provided in the
root of the source package.

A comprehensive API description in Javadoc is included in the JAR file and can
also be conveniently browsed from the Help Menu on the user interface under the
"On Toolkit API" Menu Item.

Example Satellite Databases are included for testing/browsing/evaluation and
are built-in.  Select those from the graphical interface File Menu under
the item "Open Example Database".  The database named "BogusSAT-2" is a good
place to start.

Note that the "BogusSAT-2" example has some deliberate schema errors inside.
This is part of the unit testing.  Later this will be refactored to isolate
those to the unit test databases also inside the package but not on the example
list in the menu.

## User Interface ##

The following image is a snapshot of the main user interface screen showing a
possible example representation of a CCSDS TM (Telemetry) Space Packet header.

## Building Toolkit and Application ##

### Maven and Java Versions ###

This project can be built using Java 8 or 11 using the Maven build system.

### Using NetBeans 8.x or Eclipse 4.7.x ###

The build system is based on Maven and the project can be imported in NetBeans
or Eclipse. Dependencies are resolved by Maven and no customization is
required.

### Building Manually ###

The project can be built manually using Maven:

```
mvn package
```
There are 4 Java JAR files emitted from the package goal.  The file named
xtcetools-version.jar contains everything.  The file
xtcetools-version-library.jar contains only the toolkit library without the
UI package.  In addition, a javadoc and sources set of jars is provided for
supporting IDEs.  A "FAT JAR" is also assembled if needed by the user.

The JaCoCo Java Code Coverage report is only scoped to the library portion and
can be found after the build in target/site/jacoco/index.html

### Execution Manually ###

**Java 8**

The jar containing the UI is self-executable and may be launched simply:

```
java -jar target/xtcetools-1.1.5.jar
```

## Maven Central Repository ##

If you choose to use Maven automatic downloads, the xtcetools package can be
declared in a pom.xml as a dependency without the need to download and build
the source here.

```
<dependency>
    <groupId>org.xtce</groupId>
    <artifactId>xtcetools</artifactId>
    <version>1.1.5</version>
</dependency>
```

## About The Author ##

The initial author of this software is an active member of the Task Force that
maintains the XTCE specification.

If this project interests you, perhaps these other projects that interest the
author would also be of interest to you.

* Comprehensive Open-architecture Solution for Mission Operations Systems (COSMOS)
  * Hawaii Space Flight Laboratory
  * Ball Aerospace
* Hummingbird
* Yet Another Mission Control System (YAMCS)
* NASA CFS Command and Data Dictionary Tool (CCDDT)

The author is aware of XTCE implementations provided by commercial spacecraft
command and control vendors.  This list will be updated as the author is made
aware of any additional implementations that are tested and deployed to the
marketplace.  For each of these two products, the author has significant
experience integrating and using the offerings.  Using this open source XTCE
toolkit and these products can assure a rapid integration of a spacecraft TT&C
database.

*
  Peraton OS/COMET Product
*
  L-3 Communications InControl Product
*
  Epoch and Quantum Products

repository: sparksustc/xtcetools

repo_name: sparksustc/xtcetools


text:
# PhD course in R programming

* **Course:** PhD course in R programming
* **Teachers:** [Nicolas Reigl](https://nreigl.github.io/), [Indrek Seppo](http://www.centar.ee/en/people/indrek-seppo/)

* **Class Times:**

|         	|                  	|         	|                  	|
|---------	|------------------	|---------	|------------------	|
| Fri. 9  	| Feb. 17:45-21:00 	| Sat. 10 	| Feb. 10:00-13:15 	|
| Fri. 16 	| Feb. 17:45-21:00 	| Sat. 17 	| Feb. 10:00-13:15 	|
| Fri. 2  	| Mar. 17:45-21:00 	| Sat. 3  	| Mar. 10:00-13:15 	|
| Fri. 9  	| Mar. 17:45-21:00 	| Sat. 10 	| Mar. 10:00-13:15 	|

* **Class Location:** SOC- 417, Department of Economics and Finance, Tallinn University of Technology, Akadeemia tee 3, Tallinn.

## Course Description

This is a course for PhD students at the [Department of Economics and Finance
](https://www.ttu.ee/institutes/department-of-economics-and-finance/) in introductory R programming.

## Course Overview

The course will cover everything needed to start working in R on your own.

 **Topics**

 - The basics of R and Rstudio
 - Grammar of graphics - ggplot2
 - Grammar of data manipulation - dplyr
 - R markdown
 - Basic econometric modelling in R

Topics will be demonstrated through live-code examples/slides, available through this repository.

## Teaching materials

1. Download the class slides by clicking the green _Clone or download_ button above. (Then click _Download Zip_ in the tab that appears).

## Evaluation

There will be no exam and no points given for the seminar course.

## Prerequisites

1. You need a laptop. No programming skills required.


text:
Attributes consist of a globally unique Attribute ID and a
(value)[Value-Type.md], which may be either a hard value (set to a value) or
constructed through [Functions](Function.md). [Pragma](Pragma.md) contain them,
[Links](Link.md) have them, and changes to them can signal the execution of
bound [Actions](Action.md).  They are the core behind the DRS model.

## Dynamic vs. Hard

A "hard" Attribute acts like a variable in a traditional programming language.
An [Action](Action.md) or external event may set this to a different value.

Dynamic Attributes have their values generated by a [Function](Function.md) that
may take other attributes as inputs.  These are reactive functions, in that any
changes to the Function inputs results in an immediate change to the Attribute.

## Globally Unique ID

Attributes have a globally unique ID.  This ID has a set of associated
meta-data.

* **Identifier** - the actual globally unique string identifier used when
 referencing the corresponding value in [Pragma](Pragma.md) and
 [Links](Link.md).
* **Single Type** - all Attributes must have the same
 [Value Type](Value-Type.md).
* **Commit Join Function** - when multiple changes from [Actions](Action.md)
 happen in the same simulation engine cycle, they must be reconciled in the
 _[commit](Pragma.md#Commit Memory Model)_ phase, which is done through a
 _commit join function_.
* **Link Binding** - indicates whether this attribute binds to Pragma or Links;
 it cannot be used for both.
* **Origin** - optionally, the Behaviour Group, Plugin, or other source that has
 ownership of the Attribute can assign additional meta-data to describe the
 Attribute.  Common settings are the source of the attribute, and what it's
 used for.

Because all Attribute IDs are globally unique, the engine makes a simplifying
assumption by declaring that all [Pragma](Pragma.md) have every Attribute ID;
unassigned Attribute Values have a default value of null.

## Change Signals

When the value of an Attribute on a [Pragma](Pragma.md) changes value, it
signals this change to all bound listeners.

* [Action](Action.md) - signals sent to an Action will schedule the Action to
 run after the value propagation phase completes.
* [Function](Function.md) - all Functions which have the specific bound
 Attribute value as input will execute in the value propagation phase to
 recalculate the value, which may in turn signal other dependent Attributes.

## Attributes on Links

A Link reference on a [Pragma](Pragma.md) may have bound Attributes.  These
allow for specific queries to be performed against the Links.


text:
# Changelog

All notable changes to this project will be documented in this file.

This file's format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).

## [Unreleased]

### Changed

### Added

### Fixed

## [8.0.0]

### Changed
- Change `StatsTracker`, `StatsLoggerBuilder` and `StatisticsLogger` to not be bound by `<T>`
  - Breaking change: `StatsLoggerBuilder` loses `with_log_interval()` and gains `fuse_with_log_interval<T>`,
    where `<T>` is a `StatisticsLogFormatter`. This method is only accessible with
    the `interval_logging` feature.
  - Breaking change: `StatsTracker::log_all()` now requires a `<T: StatisticsLogFormatter>` bound
    when called.

## [7.0.0]

### Changed

- The statistics interval logging function is behind a feature flag (`interval_logging`) this allows users of the crate who are simply using the derive macros or `xlog!` to not have to pull in a whole `tokio` runtime.
- `StatisticsLogger` creation API has changed:
    - Removed `StatsConfig` and `StatsConfigBuilder`
    - Added `StatsLoggerBuilder` with `fuse(logger)` to create the `StatisticsLogger`
    - Creating a `StatisticsLogger` must be done within a `tokio v1.0` runtime if the interval logging is enabled
- `slog_extlog` gains the `derive` feature which causes it to re-export the `#[derive(ExtLoggable)]` and `#[derive(SlogValue)]` macros meaning there's no need to depend explicitly on `slog_extlog_derive` any more

## [6.0.1]

### Fixed

- Correct dependency between derive and main crate

## [6.0.0]

### Changed

- Update to 1.0 versions of `syn` and `quote`
- Update to `tokio` 0.2 and `futures` 0.3

## [5.3.0]

### Changed

- `slog_test` test methods: don't panic if log is partially written in another thread, but leave partial data for next read.
  Technically this is a breaking change if you use `slog_test`, since
  methods `new_test_logger`, `read_json_values` and `logs_in_range` now accept
  only an `IoBuffer`. However in practice callers almost certainly passed an
  `IoBuffer` already.
- (Internal) Add comment to statics created through `define_stats` macro to prevent downstream clippy failures. Also add a `.cargo/config` turning on some common warnings (and fix up code, mainly comments).

## [5.2.1]

### Fixed

- Ensure that derive log level handling still works with `slog` 2.5.

## [5.2.0]

### Changed

- Update to 2018 edition.
- Update to latest `slog` - stop pinning to old version.

### Added

## [5.1.0]

### Added

- Add the `FixedGroups` attribute to `StatTrigger`, allowing for a compile-time constant value on
a metric.

## [5.0.0]

### Added

- Add the `BucketCounter` stat type for tracking stats grouped into numerical ranges.

## [4.1.0]

### Added

- Add a `DefaultLogger` for users who don't need statistics.
- Move repository homepage.

## [4.0.0]

### Changed

 - Some small but breaking changes to stats creation API.
   - No longer require an instance of the formatter type.
   - Take a list of `StatsDefinitions` so users can track stats from multiple crates in one place.

### Fixed
- Proper `Clone` support for `StatisticsLogger`

## [3.2.0] - 2018-04-25

### Added
- Add support for retrieving the current values of all stats.

## [3.1.0] - 2018-04-20

- Initial open source release.
- Versions 3.0.0 and earlier were proprietary.

repository: slog-rs/extlog

gha_language: Rust

repo_name: slog-rs/extlog


text:
A rule-based RSS and Atom parser
================================

This PHP library contains an extensible, rule based parser for RSS and Atom news feeds.
It's way of working is inpsired by [Alex Debril's feed-io](https://packagist.org/packages/debril/feed-io), but it's been
rewritten from scratch to be a bit cleaner and more easily extensible. It doesn't have all the features of the original,
but you can easily create new parsing standards or extend existing one without rummaging through the library code.

Requirements
------------

 * PHP 5.6+
 * [masterminds/html5](https://packagist.org/packages/masterminds/html5) 2.2+
 * [psr/log](https://packagist.org/packages/psr/log) 1.0+

Installation
------------

_FeedParser_ can be included in the usual way with composer:

```sh
    composer require benkle/feed-parser
```

Usage
-----

For a quick start you can instantiate the class `\Benkle\FeedParser\Reader` and directly fetch a feed:

```php
$reader = new \Benkle\FeedParser\Reader();
$feed = $reader->read(file_get_contents('http://xkcd.com/atom.xml'));

echo $feed->getTitle() . PHP_EOL;
foreach ($feed->getItems() as $item) {
    echo "\t" . $item->getTitle() . PHP_EOL;
}
```

### Create your own rules

_FeedParser_ is based on rules, which are organized on standards.

A rule can be any class implementing `\Benkle\FeedParser\Interfaces\RuleInterface`:

```php
class MyRule implements \Benkle\FeedParser\Interfaces\RuleInterface {
    public function canHandle(\DOMNode $node, \Benkle\FeedParser\Interfaces\NodeInterface $target)
    {
        return $node->nodeName == 'title' && $target instanceof \Benkle\FeedParser\Interfaces\ChannelInterface;
    }

    public function handle(\Benkle\FeedParser\Parser $parser, \DOMNode $node, \Benkle\FeedParser\Interfaces\NodeInterface $target)
    {
        /** \Benkle\FeedParser\Interfaces\ChannelInterface $target */
        $target->setTitle($node->nodeValue);
    }
}
```

Rules can be added to any standard via it's rule set, which is a priority ordered list:

```php
/** @var \Benkle\FeedParser\Interfaces\StandardInterface $standard */
foreach ($reader->getStandards() as $standard) {
    $standard->getRules()->add(new MyRule(), 5); // Rules are ordered by priority
}
```

But often you might want to aggregate all your rules in a standard. Standards are classes implementing `\Benkle\FeedParser\Interfaces\StandardInterface`:

```php
class MyStandard implements \Benkle\FeedParser\Interfaces\StandardInterface {
    use \Benkle\FeedParser\Traits\WithParserTrait;
    use \Benkle\FeedParser\Traits\WithRuleSetTrait;

    public function __construct()
    {
        $this->getRules()->add(new MyRule(), 5);
    }

    public function newFeed()
    {
        return new \Benkle\FeedParser\Feed();
    }

    public function getRootNode(\DOMDocument $dom)
    {
        return $dom->getElementsByTagName('feed')->item(0);
    }

    public function canHandle(\DOMDocument $dom)
    {
        return $dom->getElementsByTagName('feed')->length > 0;
    }
}
```

Adding a standard to a Reader is just as simple as adding a rule to a standard:

```php
$reader->getStandards()->add(new MyStandard(), 5);
```

Included standards are:

 * `Atom10Standard` for Atom 1.0
 * `RSS09Standard` for RSS 0.9
 * `RSS10Standard` for RSS 1.0
 * `RSS20Standard` for RSS 2.0

### Set your own DOM parser

This library uses the PHP DOM library classes for it's XML traversing. To use your own library you have to write a wrapper arround it implementing `\Benkle\FeedParser\Interfaces\DOMParserInterface`:

```php
$reader->setDomParser(new class implements \Benkle\FeedParser\Interfaces\DOMParserInterface {
    public function parse($source)
    {
        $parser = new \MyFancy\DomParser();
        return $parser->parse($source);
    }
});
```

_FeedParser_ already include a wrapper for the standard library, which is fast but fails when a feeds isn't valid XML, and for the [Masterminds HTML5 parser](https://packagist.org/packages/masterminds/html5), which is more fault tolerant, but also way slower. It also includes a meta wrapper which will try any number of other wrappers it is given, allowing you to balance speed and reliability:

```php
$reader->setDomParser(
    new \Benkle\FeedParser\DOMParsers\FallbackStackParser(
        new \Benkle\FeedParser\DOMParsers\PHPDOMParser(),
        new \Benkle\FeedParser\DOMParsers\MastermindsHTML5Parser()
    )
);
```

__Note:__ This Wrapper implements `Psr\Log\LoggerAwareInterface` and will write notices whenever any of it's protegé throws an exception!

### More control

If you need more control over what standards are loaded, and don't need file and http access, you can use the `\Benkle\FeedParser\BareReader` class:

```php
$reader = new \Benkle\FeedParser\BareReader();
$reader->setDomParser(new \Benkle\FeedParser\DOMParsers\PHPDOMParser());
$reader->getStandards()->add(new \Benkle\FeedParser\Standards\RSS\RSS20Standard());
```

TODO
----

 * Moved included class `PriorityList` to a utility package.

repository: benkle-libs/feed-parser

repo_name: benkle-libs/feed-parser


text:
---
title: Incompatible Changes in IntelliJ Platform and Plugins API 2017.*
---
<!-- Copyright 2000-2020 JetBrains s.r.o. and other contributors. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. -->

<!--
See the note on how to document new problems on the main page reference_guide/api_changes_list.md
-->

Please see [Incompatible API Changes](/reference_guide/api_changes_list.md) on how to verify compatibility.

> **NOTE** Changes from API marked with `org.jetbrains.annotations.ApiStatus.@Experimental`/`ScheduledForRemoval` are not listed here, as incompatible changes are to be expected.

## 2017.3

### Changes in IntelliJ Platform 2017.3

`com.intellij.internal.statistic.AbstractApplicationUsagesCollector` class removed
: This class isn't supposed to be used in regular plugins. Override `com.intellij.internal.statistic.AbstractProjectsUsagesCollector` instead if you're developing an IDE with its own statistics services.

`com.intellij.internal.statistic.UsagesCollector.doPersistProjectUsages` method removed
: This method isn't supposed to be used in regular plugins. There is no need to call this method anymore.

`org.apache.sanselan` package removed
: Use classes from `org.apache.commons.imaging` instead.

`com.intellij.psi.MultiplePsiFilesPerDocumentFileViewProvider.getLanguages` abstract method added
: Implementation of this class are supposed to have several languages so you need to implement this method explicitly and return them all.

`org.jetbrains.kotlin.idea.configuration.KotlinProjectConfigurator.changeCoroutineConfiguration` abstract method added
: You need to implement this method and add the logic for updating the configuration in your build system.

`org.jetbrains.kotlin.idea.configuration.KotlinProjectConfigurator.updateLanguageVersion` abstract method added
: You need to implement this method and add the logic for updating the configuration in your build system.

`org.jetbrains.kotlin.idea.configuration.KotlinProjectConfigurator.addLibraryDependency` abstract method added
: You need to implement this method and add the logic for updating the configuration in your build system.

### Changes in DataGrip and Database Tools Plugin 2017.3

`com.intellij.database.dataSource.DataSourceManager` class removed
: Use `com.intellij.database.psi.DbPsiFacade` instead.

`com.intellij.database.dataSource.DataSourceManagerEx` class removed
: Use `com.intellij.database.psi.DbPsiFacade` instead.

`com.intellij.database.dataSource.DataSource` class removed
: Use `com.intellij.database.psi.DbDataSource` and `com.intellij.database.model.DatabaseSystem` instead.

`com.intellij.database.psi.DbDataSource.getModel` method return type changed from `DbElement`-based model to `DasObject`-based model
: Use `com.intellij.database.psi.DbPsiFacade.findElement` to get the corresponding `com.intellij.database.psi.DbElement` wrapper when needed.

`com.intellij.database.view.DatabaseView.getTreeBuilder` method removed
: Use `LangDataKeys.PSI_ELEMENT_ARRAY.get(event)` to get Database view selection.

### Changes in PhpStorm and PHP Plugin 2017.3

`com.jetbrains.php.lang.psi.elements.Function.getReturnType()` method return type changed from `PsiElement` to `PhpReturnType`
: Before method had been returning a `com.jetbrains.php.lang.psi.elements.ClassReference`. Now method returns `com.jetbrains.php.lang.psi.elements.PhpReturnType`. Method `ReturnType.getClassReference()` can be used if you need just a `ClassReference`. If you need to get the `PhpType`, use `com.jetbrains.php.lang.psi.elements.Function.getReturnType.getType()` method instead.


text:
# React Cornerstone DICOM Viewer

This is a basic example showing how to use [cornerstrone.js](https://github.com/cornerstonejs/cornerstone) library along with React.js to show DICOM images.

## Live demo
https://shalkam.github.io/react-cornerstone-example/

## Development

### Clone the repository
- `git clone `
- `cd react-cornerstone-example`

### Install dependencies
- `yarn` or `npm install`

### Start the server
- `yarn start`

## Build
- `yarn build`
- Output will be in the `build` directory

repository: leic-github/react-cornerstone-example

repo_name: leic-github/react-cornerstone-example


text:
---
title: "Resistance to Phytophthora Blight of Pepper"
summary: "We screened a diverse panel of pepper cultivar and land races for resistance to *Phytophthora capsici*"
authors: [Camilo Parada]
tags: [Phytophthora, Resistance]
categories: [Phytophthora, Resistance]
date: 2021-03-01T08:00:20-07:00
lastmod: 2020-03-06T10:57:47+02:00

image:
  caption: ""
  focal_point: "Smart"
  preview_only: false

url_code: ""
url_pdf: ""
url_slides: ""
url_video: ""
featured: "true"

---

------

*Phytophthora capsici* causes crown, root, and fruit rot as well as foliar lesions in peppers. We conducted field trials in 2015 and 2016 to evaluate 32 commercial and experimental pepper cultivars against a mixed-isolate inoculum in North Carolina. Cultivars Martha-R and Meeting were classified as highly resistant to *P. capsici*.

![](field.png)

Greenhouse experiments were also conducted to determine the response of 48 pepper cultivars when inoculated individually with two isolates from North Carolina and an isolate from Michigan. *Phytophthora capsici* isolates exhibited different levels of virulence in pepper cultivars screened for resistance. Landraces CM334 and Fidel as well as the cultivars Martha-R, Meeting, and Intruder were categorized as highly resistant or resistant to the three isolates tested.

![](gh.png)

Today, host resistance remains a promising management strategy to control *P. capsici* in pepper, and our study highlighted the importance of accounting for pathogen diversity when screening for resistance.

repository: cahuparo/academic-chparada

repo_name: cahuparo/academic-chparada


text:
# phoneBookClient
This is the client for phoneBookServer, made with React, NextJS and Tailwindcss

## Requisites
- Have acces to instance of [peretch/phone_book_server](https://github.com/peretch/phoneBookServer) by http or https.
- Config parameters (`BASE_URL`, `API_PATH`) in `client/lib/constants.js`

## Commands
- Use `npm run dev` for testing with nodemon (by default it will run in port 3000).

repository: peretch/phoneBookClient

repo_name: peretch/phoneBookClient


text:
---
title: Download | SIP.js
layout: download
description: Get started now. Download production and development versions of the SIP.js library.
---

## Version 0.5.0

*Updated on 2014-04-25 - Git commit [41b58a8](https://github.com/onsip/SIP.js/commit/41b58a848829d1185e83491ec69dea265ad63138)*

* Development (uncompressed code, 656KB) sip-0.5.0.js
* Production (minified code, 208KB) sip-0.5.0.min.js
* Use Bower? Download this release with `bower install sip.js#0.5.0+bower`.

## Version devel

For the bleeding edge, please [download and build from source](//github.com/onsip/SIP.js).


text:
# Rock-Paper-Scissors-Lizard-Spock

This was my Rock-Paper-Scissors-Lizard-Spock submission for Coursera's Intro to Interactive Programming in Python course. It's a pretty simple program that models the game Rock-Paper-Scissors-Lizard-Spock, which is essentially Rock-Paper-Scissors but with two more options in order to make the game more interesting. In this version the player selects one of the five choices and the computer randomly selects a choice, after which the game prints out the results.

![A pic of the Rock-Paper-Scissors-Lizard-Spock game](https://raw.githubusercontent.com/znalbert/rice_university_coursera_iipp/master/01_rock_paper_scissors_lizard_spock/rpsls-game.png)

## How to Play

(TL;DR - Click the play button in the upper left [here](http://www.codeskulptor.org/#user41_ACCNSin33D_2.py).)

![Hit that play button in the upper left](https://raw.githubusercontent.com/znalbert/rice_university_coursera_iipp/master/01_rock_paper_scissors_lizard_spock/rpsls-play-button.png)

Currently, this code is intended for use with their [Codeskulptor](http://www.codeskulptor.org/) Python interpreter, and you can play my version [here](http://www.codeskulptor.org/#user41_ACCNSin33D_2.py). You just have to hit the "play" icon in the upper left corner.

Right now, the program just runs five times, with the player selecting one of each of the choices, and the computer randomly selecting a choice as well.  It prints out the results in the window on the right.

## Learning Objectives for This Project

#### Functions, logic, conditionals

This being the first project it was pretty simple and straight forward. You have functions using helper functions to determine that the user has given a valid input and then runs the game using modular arithmetic to determine the winner, which is then printed to the console.


text:
# -useful links
- https://docs.python.org/3/howto/functional.html
- https://github.com/FrancescoGiraud0/WOODProject/blob/master/functions/Test_AVG_gray.py
- https://publiclab.org/wiki/ndvi
- https://opensource.org/licenses/MIT
- https://www.flickr.com/photos/raspberrypi/
- https://projects.raspberrypi.org/en/projects/code-for-your-astro-pi-mission-space-lab-experiment
- https://astro-pi.org/media/Astro_Pi_Mission_Space_Lab_Guidelines_2020_21.pdf
- https://github.com/FrancescoGiraud0/WOODProject.git
- https://www.offthemap.travel/news/understanding-whale-migration/
- https://nationalzoo.si.edu/migratory-birds/migratory-birds-tracking-map

# -migrations and magnetic fields
- https://www.sciencealert.com/solar-storms-could-be-confusing-whale-navigation
- https://www.australiangeographic.com.au/topics/science-environment/2014/05/animal-magnetism-how-animals-use-earths-magnetic-field/
- https://www.deq.virginia.gov/Portals/0/DEQ/CoastalZoneManagement/FundsInitiativesProjects/task94-01-16b.pdf
- https://www.nationalgeographic.com/animals/2020/02/solar-storms-gray-whale-strandings-magnetic-sense/
- https://www.smithsonianmag.com/smart-news/solar-storms-might-throw-migrating-whales-course-180974278/

# machine learning

- https://www.digitalocean.com/community/tutorials/an-introduction-to-machine-learning
- https://www.tensorflow.org/tutorials/keras/classification
- https://machinelearningmastery.com/machine-learning-in-python-step-by-step
- https://www.pyimagesearch.com/2018/04/09/how-to-quickly-build-a-deep-learning-image-dataset/-
- https://www.digitalocean.com/community/tutorials/how-to-build-a-machine-learning-classifier-in-python-with-scikit-learn-
- https://www.digitalocean.com/community/tutorials/how-to-perform-neural-style-transfer-with-python-3-and-pytorch
- https://campus.datacamp.com/courses/introduction-to-deep-learning-in-python/basics-of-deep-learning-and-neural-networks?ex=1
- https://developers.google.com/machine-learning/crash-course
- https://www.datacamp.com/community/tutorials/tensorflow-tutorial
- https://www.tensorflow.org/tutorials
- https://jupyter.org
- https://medium.com/@codequsdotcom/learn-python-with-jupyter-notebook-from-scratch-3d6d7755290b
- https://www.accelebrate.com/library/tutorials/machine-learning-part1

repository: MyWay-AstroPi/MyWay

repo_name: MyWay-AstroPi/MyWay


text:
# Slide : dl-intro

A shallow introdcution to deep learning.

## Prelude

### Artificial neuron

- The basic building blocks
- A mathematical model to mimic biological neurons
- Map multiple inputs to one output

### Activition function

- Sigmoid function is a common choice
- Other choices include
	- tanh function \\(f(z) = \frac{\exp(x)-\exp(-x)}{\exp(x)+\exp(-x)}\\)
    - rectified linear function \\(f(z) = \max(0,x)\\)

### Neural network

- Hook many neurons together to get a neural network
- So defined input layer, hidden layer, output layer
- bias unit, input unit, hidden unit, output unit

### Forward propagation

- With these equations,  we can take advantage of fast linear algebra routines to perform calculations easily and quickly, if only we have the parameters.

### Training NNs

- Minimize the cost function / loss function
- A regularization term (also called a weight decay term) that tends to decrease the magnitude of the weights, and helps prevent overfitting
	- Weight decay parameter \\(\lambda\\) controls the relative importance of the two terms
- It's a non-convex function, gradient descent is susceptible to local optima
	- However, in practice gradient descent usually works fairly well

### Gradient descent

- It's hard to determine \\(\alpha\\), a convex optimization problem
- We can easily use any convex optimization algorithm (like LBGFS, which is much better than gradient descent algorithm) to update the parameters, if only we have all those partial derivatives.
- How to compute them efficiently?

### Backpropagation

- It's important to initialize the parameters randomly, rather than to all 0’s. If all the parameters start off at identical values, then all the hidden layer units will end up learning the same function of the input.

### NN seems promising

- No need for hand-crafted features

### Towards deeper NNs ?

- It's natural to increase the number of hidden layer. But why?

## Why go deep ?

### Visual cortex is hierarchical

- Cat's visual cortex (Hubel, 1962)
- Human visual system

### Different Levels of Abstraction

- Natural progression from low level to high level structure as seen in natural complexity
– Easier to monitor what is being learnt and to guide the machine to better subspaces
– A good lower level representation can be used for many distinct tasks

### Efficient representation

## Rolling in the deep

Rolling in the deep (在黑暗中翻滚)

### Deep neural networks

- Related to the multilayer perceptron
	- A multilayer perceptron (MLP) is a feedforward artificial neural network model that maps sets of input data onto a set of appropriate outputs. A MLP consists of multiple layers of nodes in a directed graph, with each layer fully connected to the next one. Except for the input nodes, each node is a neuron (or processing element) with a nonlinear activation function. MLP utilizes a supervised learning technique called backpropagation for training the network. MLP is a modification of the standard linear perceptron and can distinguish data that are not linearly separable.
	- The multilayer perceptron consists of three or more layers (an input and an output layer with one or more hidden layers) of nonlinearly-activating nodes and is thus considered a deep neural network.
- We'll talk about Softmax regression later

### Difficulty of training DNNs

- The brain can learn from unlabeled data
- If the last few layers in a neural network have a large enough number of neurons, it may be possible for them to model the labeled data alone without the help of the earlier layers. Hence, training the entire network at once with all the layers randomly initialized ends up giving similar performance to training a shallow network (the last few layers) on corrupted input (the result of the processing done by the earlier layers)

### Other models dominanted the world

- People turned to study "machine learning", which seems more insteresing
- Enemy #1 SVM and other algorithms, like boosting, developed fast in this period

### Hand-crafted visual features

- State-of-the-art visual features
- Until 2006

> 一位痴心的老先生Hinton，他坚持了下来，并最终（和其它人一起）提出了一个实际可行的深度学习框架。

- On the other hand, big data era was emerging. We need more powerful algorithms.

## Stacked autoencoder

### Autoencoder

- Suppose we have only a set of unlabeled training examples
- An autoencoder neural network is an unsupervised learning algorithm that applies backpropagation, setting the target values to be equal to the inputs
- The aim of an auto-encoder is to learn a compressed, distributed representation (encoding) for a set of data, typically for the purpose of dimensionality reduction.
- When the hidden layers are larger than the input layer, an autoencoder can potentially learn the identity function and become useless; however, experimental results have shown that such autoencoders might still learn useful features in this case.

### Sparse AE

- Even when the number of hidden units is large (perhaps even greater than the number of input pixels), we can still discover interesting structure, if we impose a sparsity constraint on the hidden units

### Stacked AE

- Multiple sparse autoencoder + Softmax regression
- Has the same problem existing in training DNNs

### Denoising AE

- Steps
	- Corrupt the input (e.g. set 25% of inputs to 0)
	- Reconstruct the uncorrupted input
	- Use uncorrupted encoding as input to next level
- More robust model

## Time to have an overview

## DBM & DBN

### RBM

- Bipartite graph, one visible layer and one hidden layer. "Restricted" indicates there is no edge within one layer.
- Given all visible variables v, all hidden variables are mutual independence. We could get the distribution of all h based on p(h|v), and get back v in turn based on p(v|h).
- Thus, h are just another representation of v

### CNN

- First successfully trained deep structure
- Before greedy layer-wise training

## Industry

### Microsoft

- Proposed the first successful deep learning models for speech recognition in 2009
- Made a new breakthrough in speech translation technology in 2012
- Plans to make skype translator alive within 2014

### Google

- Initially established by Andrew Ng, however he moved to lead AI group at Baidu
- Led by Jeff Dean and Geoffrey Hinton by now

## Challenges of Deep Learning

### Understanding

- Better theoretical understanding
- Convex learning is invariant to the order in which sample are presented
- Human learning isn't like that: we learn simple concepts before complex ones. The order in which we learn things matter.

## Scaling

### Model parallelism

An example of model parallelism in DistBelief. A five layer deep neural network with local connectivity is shown here, partitioned across four machines (blue rectangles). Only those nodes with edges that cross partition boundaries (thick lines) will need to have their state transmitted between machines. Even in cases where a node has multiple edges crossing a partition boundary, its state is only sent to the machine on the other side of that boundary once. Within each partition, computation for individual nodes will the parallelized across all available CPU cores.

### Data parallelism

Left: Downpour SGD. Model replicas asynchronously fetch parameters w and push gradients w to the parameter server. Right: Sandblaster L-BFGS. A single ‘coordinator’ sends small messages to replicas and the parameter server to orchestrate batch optimization.

repository: aidistan-archives/slide-dl-intro

repo_name: aidistan-archives/slide-dl-intro


text:
---
title: Lab
permalink: /docs/week1_lab/
---

###### Written by Josh Beto

## Problem Solving Tips
* If you get stuck on a part, skip to the parts you know and *abstract* the parts you do not know. *Abstract* means to understand what something does, but not think about how it is done.
* **Example:** You have a function ```bool isAcceptable(int x)```
* You need to remove elements within a ```vector<int> v``` that are considered not acceptable.
* You can simply call ```isAcceptable(int x)``` to check for which elements to remove even if you do not know how to write ```bool isAcceptable(int x)```

Be sure to unit test your functions!

## Program 1
Write a program to print out all *prime* numbers from 1 to 100

**Implement** the following functions:
* `bool isPrime(int n)` - returns true if number n is prime
* `void printPrimes(int n)` - prints all primes from 1 to n

## Program 2
Write a program that tests whether a `string` or `int` is a palindrome

**Implement** the following functions:
* `bool isPalindrome(const string &s)` - returns true if `string` is a palindrome i.e. racecar
* **Bonus:** `bool isPalindrome(int n)` - returns true if `int` is a palindrome i.e. 12321

## Program 3
Write a program that takes in two strings from the user and outputs whether they are anagrams i.e. cat and act are anagrams

**Implement** the following function:
* `bool isAnagram(const string &a, const string &s)` - returns true if the two strings are anagrams of each other, have the same **exact** letters


text:
# Serverless asp.net core on AWS Lambda

This repository contains sample code to show the basic building blocks
of an asp.net core web API deployed on AWS lambda using CDK.

## Repository Contents

### WebApiDemo
This folder contains a simple asp.net core 3.1 web api. It is based on the "Web API" template with just the required additions for running on AWS lambda.

### Cdk
This folder contains the AWS CDK code to deploy the asp.net core site to AWS lambda.
For more information on CDK and C#, see https://docs.aws.amazon.com/cdk/latest/guide/work-with-cdk-csharp.html

## Getting started

Prerequisites:
* Have AWS command line tools installed and configured
* Have AWS CDK tools installed and configured (see https://docs.aws.amazon.com/cdk/latest/guide/getting_started.html )

Steps to build and deploy the sample:
* Build the web app using  `dotnet build WebApiDemo`
* Build the CDK script using  `dotnet build WebApiDemo`
* Deploy the site to AWS using `cd Cdk && cdk deploy`
* You will see an output similar to this: `LambdaWebApiDemoStack.lburl = http://Lambd-lambd-29FADJC1E9PS-1063229254.eu-central-1.elb.amazonaws.com/WeatherForecast`
* Copy the Url shown and paste it into your browser. You will see the output of the sample API with some random weather forecast data.
* Inspect the created resources on AWS if you want to
* Remove the resources from AWS to save costs usind `cdk destroy` when you are done

repository: leovonwyss/dotnetcore-serverless-sample

repo_name: leovonwyss/dotnetcore-serverless-sample


text:
# MillionVis
Jean-Daniel Fekete

MillionVis is an information visualization software that can visualize
a large number of items using several popular 2D visualization
techniques.

MillionVis is not a product but a research project.  The source code
is available under the MIT License to promote sharing
and enhancing the program.

For more information, see the millionvis page at https://github.com/jdfekete/millionvis

For compilation issues, read the COMPILING file.

For a short manual on how to use the treemap2 program, read the
doc/index.html file.

repository: jdfekete/millionvis

repo_name: jdfekete/millionvis


text:
*(draft: this entire page)*

# Compiler Extensions
Compiler extensions are Macron packages that hook onto the compiler and perform arbitrary actions.

Compiler extensions are split into two kinds: pre-gen and post-gen. Pre-gen extensions are only applicable via the `-E`/`--extension` flag (Packages are searched in the current directory, then in the paths specified by the `MACRON_EXT_PATH` environment variable.)

Post-gen extensions can be added using the flag, or using the `ext_add` intrinsic.

*(draft)*

repository: macron-lang/specification

repo_name: macron-lang/specification


text:
# HACC NG2 Starter Kit
Angular2 Example and starter kit for HACC

We are using the Webpack and Angular2 starter kit as a base.

[https://github.com/AngularClass/angular2-webpack-starter](https://github.com/AngularClass/angular2-webpack-starter)

### Quick start

Running this starter kit requires the latest stable version of nodejs

Get the latest stable version by using [n2](https://www.npmjs.com/package/n2)

_the node package name in **n**_

```
npm i -g n
n stable
```
```bash

# clone or fork and clone your own fork
git clone --depth 1 https://github.com/devleague/hacc-ng2-starter-kit.git

# change directory into the project
cd hacc-ng2-starter-kit

# install npm dependencies
npm install

# start the server
npm start

# or start the server using Hot Module Replacement
npm run server:dev:hmr

```

go to [http://<IP_ADDRESS>:3000](http://<IP_ADDRESS>:3000) or [http://localhost:3000](http://localhost:3000) in your browser

# License
 [MIT](/LICENSE)


text:
---
title: Stateful Serverless through Durable Functions
hidden: true
tags: ["serverless", "azure", "azure-functions", "dotnet", "javascript"]
duration: 45 minutes
abstract: |
  You’re introducing Serverless as a component within your application architecture and it’s great at solving the processing-at-scale problems that you have. But there’s one sticking point, how do you handle an operation that takes more than a few seconds to run? What happens when we have an asynchronous operation that needs to complete before you can respond to the caller? We don’t want our Serverless code waiting, that’ll become expensive quickly, instead we want to sleep for a period of time. This is where event sourcing comes in, but do you want to be building your own orchestration engine or managing state across restarts?

  Enter Azure Durable Functions; Durable Functions allow you to orchestrate a workflow of functions that can start background jobs and then sleep until they are needed.

  From long running asynchronous operations in HTTP APIs to fan out, monitoring processes to human interaction, Durable Functions can be used to solve a variety of different problems without the need to build your own event sourcing platform.

  In this talk we’ll look at some of the patterns that Durable Functions helps to solve through a series of live coding exercises that you can take away and experiment with yourself and apply to your own problems.

audience:
  - People developing with Serverless (cloud agnostic)
  - People exploring the use-cases of Serverless

notes: |
  This talk intends to give an overview of Durable Functions and the problems they solve through a series of live demos.

  One of the demos I will use is a game I have on GitHub (and can be done using .NET, depending on the audience).

  Other demos will include:

  * Shopping cart management and inventory reduction
  * HTTP API with a long-running background job
  * Bulk data processing through fan out

resources:
  - name: Serverless Days Melbourne 2019
    link: https://www.youtube.com/watch?v=pqrrVIWCk6w
  - name: Sessionize link
    link: https://sessionize.com/s/aaron-powell/stateful_serverless_through_durable/23585
---

gha_language: CSS