text:
# SellingPartnerApiForFeeds.FeedsApi

All URIs are relative to *https://sellingpartnerapi-na.amazon.com/*

Method | HTTP request | Description
------------- | ------------- | -------------
[**cancelFeed**](FeedsApi.md#cancelFeed) | **DELETE** /feeds/2020-09-04/feeds/{feedId} |
[**createFeed**](FeedsApi.md#createFeed) | **POST** /feeds/2020-09-04/feeds |
[**createFeedDocument**](FeedsApi.md#createFeedDocument) | **POST** /feeds/2020-09-04/documents |
[**getFeed**](FeedsApi.md#getFeed) | **GET** /feeds/2020-09-04/feeds/{feedId} |
[**getFeedDocument**](FeedsApi.md#getFeedDocument) | **GET** /feeds/2020-09-04/documents/{feedDocumentId} |
[**getFeeds**](FeedsApi.md#getFeeds) | **GET** /feeds/2020-09-04/feeds |

# **cancelFeed**
> CancelFeedResponse cancelFeed(feedId)

Cancels the feed that you specify. Only feeds with processingStatus=IN_QUEUE can be cancelled. Cancelled feeds are returned in subsequent calls to the getFeed and getFeeds operations.  **Usage Plan:**  | Rate (requests per second) | Burst | | ---- | ---- | | 0.0222 | 10 |  For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.

### Example
```javascript
import SellingPartnerApiForFeeds from 'selling_partner_api_for_feeds';

let apiInstance = new SellingPartnerApiForFeeds.FeedsApi();
let feedId = "feedId_example"; // String | The identifier for the feed. This identifier is unique only in combination with a seller ID.

apiInstance.cancelFeed(feedId, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **feedId** | **String**| The identifier for the feed. This identifier is unique only in combination with a seller ID. |

### Return type

[**CancelFeedResponse**](CancelFeedResponse.md)

### Authorization

No authorization required

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: application/json

# **createFeed**
> CreateFeedResponse createFeed(body)

Creates a feed. Encrypt and upload the contents of the feed document before calling this operation.  **Usage Plan:**  | Rate (requests per second) | Burst | | ---- | ---- | | 0.0083 | 15 |  For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.

### Example
```javascript
import SellingPartnerApiForFeeds from 'selling_partner_api_for_feeds';

let apiInstance = new SellingPartnerApiForFeeds.FeedsApi();
let body = new SellingPartnerApiForFeeds.CreateFeedSpecification(); // CreateFeedSpecification |

apiInstance.createFeed(body, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **body** | [**CreateFeedSpecification**](CreateFeedSpecification.md)|  |

### Return type

[**CreateFeedResponse**](CreateFeedResponse.md)

### Authorization

No authorization required

### HTTP request headers

 - **Content-Type**: application/json
 - **Accept**: application/json

# **createFeedDocument**
> CreateFeedDocumentResponse createFeedDocument(body)

Creates a feed document for the feed type that you specify. This operation returns encryption details for encrypting the contents of the document, as well as a presigned URL for uploading the encrypted feed document contents. It also returns a feedDocumentId value that you can pass in with a subsequent call to the createFeed operation.  **Usage Plan:**  | Rate (requests per second) | Burst | | ---- | ---- | | 0.0083 | 15 |  For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.

### Example
```javascript
import SellingPartnerApiForFeeds from 'selling_partner_api_for_feeds';

let apiInstance = new SellingPartnerApiForFeeds.FeedsApi();
let body = new SellingPartnerApiForFeeds.CreateFeedDocumentSpecification(); // CreateFeedDocumentSpecification |

apiInstance.createFeedDocument(body, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **body** | [**CreateFeedDocumentSpecification**](CreateFeedDocumentSpecification.md)|  |

### Return type

[**CreateFeedDocumentResponse**](CreateFeedDocumentResponse.md)

### Authorization

No authorization required

### HTTP request headers

 - **Content-Type**: application/json
 - **Accept**: application/json

# **getFeed**
> GetFeedResponse getFeed(feedId)

Returns feed details (including the resultDocumentId, if available) for the feed that you specify.  **Usage Plan:**  | Rate (requests per second) | Burst | | ---- | ---- | | 2.0 | 15 |  For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.

### Example
```javascript
import SellingPartnerApiForFeeds from 'selling_partner_api_for_feeds';

let apiInstance = new SellingPartnerApiForFeeds.FeedsApi();
let feedId = "feedId_example"; // String | The identifier for the feed. This identifier is unique only in combination with a seller ID.

apiInstance.getFeed(feedId, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **feedId** | **String**| The identifier for the feed. This identifier is unique only in combination with a seller ID. |

### Return type

[**GetFeedResponse**](GetFeedResponse.md)

### Authorization

No authorization required

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: application/json

# **getFeedDocument**
> GetFeedDocumentResponse getFeedDocument(feedDocumentId)

Returns the information required for retrieving a feed document's contents. This includes a presigned URL for the feed document as well as the information required to decrypt the document's contents.  **Usage Plan:**  | Rate (requests per second) | Burst | | ---- | ---- | | 0.0222 | 10 |  For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.

### Example
```javascript
import SellingPartnerApiForFeeds from 'selling_partner_api_for_feeds';

let apiInstance = new SellingPartnerApiForFeeds.FeedsApi();
let feedDocumentId = "feedDocumentId_example"; // String | The identifier of the feed document.

apiInstance.getFeedDocument(feedDocumentId, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **feedDocumentId** | **String**| The identifier of the feed document. |

### Return type

[**GetFeedDocumentResponse**](GetFeedDocumentResponse.md)

### Authorization

No authorization required

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: application/json

# **getFeeds**
> GetFeedsResponse getFeeds(opts)

Returns feed details for the feeds that match the filters that you specify.  **Usage Plan:**  | Rate (requests per second) | Burst | | ---- | ---- | | 0.0222 | 10 |  For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.

### Example
```javascript
import SellingPartnerApiForFeeds from 'selling_partner_api_for_feeds';

let apiInstance = new SellingPartnerApiForFeeds.FeedsApi();
let opts = {
  'feedTypes': ["feedTypes_example"], // [String] | A list of feed types used to filter feeds. When feedTypes is provided, the other filter parameters (processingStatuses, marketplaceIds, createdSince, createdUntil) and pageSize may also be provided. Either feedTypes or nextToken is required.
  'marketplaceIds': ["marketplaceIds_example"], // [String] | A list of marketplace identifiers used to filter feeds. The feeds returned will match at least one of the marketplaces that you specify.
  'pageSize': 10, // Number | The maximum number of feeds to return in a single call.
  'processingStatuses': ["processingStatuses_example"], // [String] | A list of processing statuses used to filter feeds.
  'createdSince': new Date("2013-10-20T19:20:30+01:00"), // Date | The earliest feed creation date and time for feeds included in the response, in ISO 8601 format. The default is 90 days ago. Feeds are retained for a maximum of 90 days.
  'createdUntil': new Date("2013-10-20T19:20:30+01:00"), // Date | The latest feed creation date and time for feeds included in the response, in ISO 8601 format. The default is now.
  'nextToken': "nextToken_example" // String | A string token returned in the response to your previous request. nextToken is returned when the number of results exceeds the specified pageSize value. To get the next page of results, call the getFeeds operation and include this token as the only parameter. Specifying nextToken with any other parameters will cause the request to fail.
};
apiInstance.getFeeds(opts, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **feedTypes** | [**[String]**](String.md)| A list of feed types used to filter feeds. When feedTypes is provided, the other filter parameters (processingStatuses, marketplaceIds, createdSince, createdUntil) and pageSize may also be provided. Either feedTypes or nextToken is required. | [optional]
 **marketplaceIds** | [**[String]**](String.md)| A list of marketplace identifiers used to filter feeds. The feeds returned will match at least one of the marketplaces that you specify. | [optional]
 **pageSize** | **Number**| The maximum number of feeds to return in a single call. | [optional] [default to 10]
 **processingStatuses** | [**[String]**](String.md)| A list of processing statuses used to filter feeds. | [optional]
 **createdSince** | **Date**| The earliest feed creation date and time for feeds included in the response, in ISO 8601 format. The default is 90 days ago. Feeds are retained for a maximum of 90 days. | [optional]
 **createdUntil** | **Date**| The latest feed creation date and time for feeds included in the response, in ISO 8601 format. The default is now. | [optional]
 **nextToken** | **String**| A string token returned in the response to your previous request. nextToken is returned when the number of results exceeds the specified pageSize value. To get the next page of results, call the getFeeds operation and include this token as the only parameter. Specifying nextToken with any other parameters will cause the request to fail. | [optional]

### Return type

[**GetFeedsResponse**](GetFeedsResponse.md)

### Authorization

No authorization required

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: application/json

repository: clousale/amazon-sp-api-javascript

repo_name: clousale/amazon-sp-api-javascript


text:
# Python Code and Test Generation Datasets

This folder contains two notebooks.

One will download the HumanEval and MBPP datasets used for Microsoft CodeT for
tuning a model for Python code generation from function docstrings, augment the
data into prompt and solution pairs and write them to `.jsonl` files.

The other will download the data used for Microsoft CodeT for tuning a model for
Python test generation from corresponding function docstrings, augment the data
into prompt and solution pairs and write them to `.jsonl` files.

All datasets are then uploaded to HuggingFace Hub, the code generation data is
uploaded separately from the test generation data.

## Requirements

Both notebooks require the library `requests`.

repository: LAION-AI/Open-Assistant

branch_name: refs/heads/main

extension: md

gha_language: Python

license_type: permissive

repo_name: LAION-AI/Open-Assistant


text:
# Speaker

```text
material-4.0/Hardware/Speaker
```

```text
include('material-4.0/Hardware/Speaker')
```

|icon|element|
|---|---|
|![](Speaker.png)|![](Speaker.element.png)|

## element
### Load remotely
```plantuml
@startuml
' configures the library
!global $LIB_BASE_LOCATION="https://raw.githubusercontent.com/tmorin/plantuml-libs/master/dist"
' loads the library
!include $LIB_BASE_LOCATION/bootstrap.puml
' loads the material-4.0 bootstrap
include('material-4.0/bootstrap')
' loads the Speaker element
include('material-4.0/Hardware/Speaker')
Speaker('speaker', 'Speaker', 'an optional tech field')
@enduml
```
### Load locally
```plantuml
@startuml
' configures the library
!global $INCLUSION_MODE="local"
!global $LIB_BASE_LOCATION="../.."
' loads the library
!include $LIB_BASE_LOCATION/bootstrap.puml
' loads the material-4.0 bootstrap
include('material-4.0/bootstrap')
' loads the Speaker element
include('material-4.0/Hardware/Speaker')
Speaker('speaker', 'Speaker', 'an optional tech field')
@enduml
```

license: MIT

repository: neerajppraveen/plantuml-libs

branch_name: refs/heads/master

repo_name: neerajppraveen/plantuml-libs


text:
# Creating a custom theme

- [Base theme](#base-theme)
- [Overriding the base theme](#overriding-base-theme)
- [Using the theme from a component](#theme-from-component)
- [Using the theme from a helper](#theme-from-helper)

## Base theme

The `titan-core` module contains a `defaultThemeProvider.js` file, which defines the fonts, colors, spacing, and other aspects of the application's design. This ensures that the design is consistent across all components.

```javascript
export default {
  palette: {
    primary: '#ce5300',
    success: '#43a047',
    danger: '#d32f2f',
    backgroundPrimary: '#f5f5f5',
    backgroundInversePrimary: '#212121'
  },
  typography: {

  },
  spacing: {

  }
}
```

## Overriding the base theme

You can customize the default theme when you initialize the titan app inside of `~/src/index.tsx`. For example, if you would like to override the application's primary color, you can use the following:

```javascript
import { getTitanInstance } from 'titan-core'

const app = getTitanInstance()
app.setTheme({
  palette: {
    primary: "#006600"
  }
})

ReactDOM.render(app.mount(), document.getElementById('root'))
```

The primary palette color was initially `#ce5300`. The custom theme changes it to `#006600`. Note that any default theme options that are not explicitly overwritten will keep their default values as defined by the `titan-core` module.

> **Note**: You can also add your own custom theme options, which will be accessible anywhere you reference the theme.

## Using the theme from a component

You can easily access the theme through the `WithTheme` component, which injects a `titanTheme` property into your component.

```jsx harmony
import React from 'react'
import WithTheme from 'titan-core/components/WithTheme'

class MyComponent extends React.Component {
    render () {
      const styles = {
        color: this.props.theme.palette.primary
      }

      return (
        <p style={styles}>Hello world</p>
      )
    }
}

export default WithTheme(MyComponent)
```

## Using the theme from a helper

If you need to access the theme from a non-component, you can access it from the titan app instance.

```javascript
import { getTitanInstance } from 'titan-core'

const app = getTitanInstance()
const primaryColor = app.getTheme().palette.primary
```

repository: unkso/titan-app

gha_language: JavaScript

gha_license_id: MIT

repo_name: unkso/titan-app


text:
# class_eval v.s. instance_eval

* Use `MyClass.class_eval` to define a instance method of `MyClass`
* Use `MyClass.instance_eval` to define a class method of `MyClass`

---
## instance_eval: Getting instance variable from object
Remeber everyhing in ruby is object. A Ruby object contains a hashtable of instance variable, `klass/super` pointers and flags.

Let's look at this class
```Ruby
class People
  def initialize(name)
      @name
  end
end

lucas = People.new('lucas')
```

Now if I want access the `@name` of `lucas`, I can't just do `lucas.name`, as I don't have reader method for `@name` defined

But what I can do is
```Ruby
lucas.instance_eval { @name } # => 'lucas'
```
What is does is, find the `@name` instance variable from `lucas` object, and return it

---
## instance_eval: Define class method

Let's make this a bit more complicated
```Ruby
lucas.instance_eval do
  def name
    @name
  end
end

lucas.name # => 'lucas'
People.new.name # => undefined method 'name'
```
Now you are adding a method to access the instance variable of `lucas` object.
Where should that method live ? It can not live in the same object where `@name` lives, hence, can not live in `lucas`. In fact, it lives in the singleton classs of `lucas`.
That's why when you created a different `People` instance, it won't have access to `name` method.

Ok, now let's look at this code
```Ruby
People.instance_eval do
  def hi
    put 'hi'
  end
end

People.new.hi # => `method not defined`
People.hi # => 'hi'
```
Remeber everyhing in Ruby is a object. Class `People` is also an object/instance of class `Class`.
When you do `People.instance_eval`, you are adding a method to `People`'s singleton class. Hence, the method become a class method of `People` class.

---
## What does class_eval do

`class_eval` add a method to the calling object(`self`), the caller must be a class object.
How ruby knows that? As we mentioned eariler, ruby object use flags to determine the object type.

Let's back on our previous example of  `People`
Now I want to make all `people` be able to expose their name, What I can do ?
```
People.class_eval do
  def name
    @name
  end
end
```
It actually add the `name` method to the class Object `People`, not the singleton class of `People`.
Hence, it become an instance method in `People` class.

path: /class_eval v.s. instance_eval.md

filename: class_eval v.s. instance_eval.md


text:
---
layout: leftnav-page-content
title: Contemporary China
permalink: /china/know/overview-of-china/contemporary-china/
breadcrumb: Contemporary China
collection_name: china-know-overview
---

This is a selection of resources on Contemporary China available from the [NLB catalogue](http://catalogue.nlb.gov.sg/){:target="_blank"} or the Internet and is not meant to be an exhaustive list. If you know of or come across more useful resources, please drop us a [note](mailto:ref@nlb.gov.sg){:target="_blank"} so that we can share them with our readers.

### **NLB print and digital resources**

[**Modern China: Society, culture and literature**](http://eservice.nlb.gov.sg/item_holding.aspx?bid=203868566){:target="_blank"}

Explore China’s transformation since 1978 through this book, which discusses the evolution of China’s demographic profile, cultural identity, marriages, its history of communism, economic reforms and more. It also highlights the social changes taking place in China as reflected in Chinese literature and media.

All rights reserved, Abingdon, Oxon; New York, NY: Routledge, 2019.

[**China in the local and global economy: History, geography, politics and sustainability**](http://eservice.nlb.gov.sg/item_holding.aspx?bid=203858654){:target="_blank"}

Read about China’s transformation over the last 50 years in this book, which explores China’s historical and contemporary economic and geopolitical links to other parts of the world. The articles contributed by scholars from China, Japan and Europe also examine China’s institutions, infrastructure and demography.

All rights reserved, London; New York: Routledge, 2019.

[**Governance innovation and policy change: Recalibrations of Chinese politics under Xi Jinping**](http://eservice.nlb.gov.sg/item_holding.aspx?bid=203810307){:target="_blank"}

Gain insights in to China’s governance and policy changes under Xi Jinping’s leadership from this book. The contributions from China specialists also discuss the impact of public participation and public opinions on the making of public policy at the local level.

All rights reserved, Lahham, Maryland: Lexington Books, 2018.

[**Reform and development in China: After 40 years**](http://eservice.nlb.gov.sg/item_holding.aspx?bid=203863424){:target="_blank"}

Develop an understanding of China’s reform and liberalisation in the political, social and economic spheres. Topics discussed in this volume include public policy satisfaction in urban China, poverty reduction strategies in rural China and the rise of green industries.

All rights reserved, Singapore: World Scientific, 2019.

[**Destined for war: Can America and China escape Thucydides’s trap?**](http://eservice.nlb.gov.sg/item_holding.aspx?bid=202937590){:target="_blank"}

Allison examines the US-China relations through the lens of the Thucydides Trap, which refers to war breaking out when a rising power threatens to destabilise an established power. The author also documents the strides which both countries have made in the past to keep the peace and the actions needed to avoid escalating tensions in the future.

All rights reserved, Brunswick, Vic.: Scribe Publications, 2017.

[**Developing China: The remarkable impact of foreign direct investment**](http://eservice.nlb.gov.sg/item_holding.aspx?bid=202743512){:target="_blank"}

Enright focuses on the critical role which foreign direct investment has played in the economic growth and development of China in tandem with its market liberalism policies and property rights reforms, transforming China’s once feeble economy to become the world’s second largest economy today.

All rights reserved, London; New York: Routledge, Taylor & Francis Group, 2017.

[**China’s contingencies and globalization**](http://eservice.nlb.gov.sg/item_holding.aspx?bid=202839827){:target="_blank"}

The essays in this volume provide multiple perspectives on issues such as the Chinese globalisation strategy, China’s governance policies in relation to social movements, labour protests and migrant workers and the impact of China’s religious policies on social stability.

All rights reserved, London: Routledge, 2017.

[**China’s political system**](http://eservice.nlb.gov.sg/item_holding.aspx?bid=202864696){:target="_blank"}

This book provides a comprehensive overview and analysis of China’s political system. It discusses the influence of Chinese politics on its economic achievements and the adaptability of the Chinese political regime to changing economic, technological, social and global conditions.

All rights reserved, Lanham, Maryland: Rowman & Littlefield, 2017.

[**Cracking the China conundrum: Why conventional economic wisdom is wrong**](http://eservice.nlb.gov.sg/item_holding.aspx?bid=202972534){:target="_blank"}

Huang attempts to set the record straight on populist views of China’s economic, political and foreign policy issues. He analyses the contributing factors for China’s national debt, trade and investment relations with the West and the prevalence of corruption which transpired during China’s pursuit of economic liberalism.

All rights reserved, New York: Oxford University Press, 2017.

[**Family life in China**](http://eservice.nlb.gov.sg/item_holding.aspx?bid=202740074){:target="_blank"}

*Family life in China* reveals the changing framework for family life in today’s Chinese society, discussing issues such as kinship, friendship, multigenerational family structure, ethnic diversity, courtship and marriage, parenting philosophy and intergenerational uncertainties.

All rights reserved, Malden, MA: Polity Press, 2017.

[**China and India: History, culture, cooperation and competition**](http://eservice.nlb.gov.sg/item_holding.aspx?bid=202749895){:target="_blank"}

The essays by scholars and academicians from China and India help to paint an encompassing picture of the history, culture, political relations and economic functionalities of both countries.

All rights reserved, Thousand Oaks, California: SAGE Publications, 2016.

[**China’s governance puzzle: Enabling transparency and participation in a single-party state**](http://eservice.nlb.gov.sg/item_holding.aspx?bid=202858319){:target="_blank"}

Read about how China’s governance reforms have led to greater government transparency and increased public participation in policymaking. Learn about the impetus behind these reforms and the scope of their significance to Chinese civil society.

All rights reserved, Cambridge, United Kingdom ; New York, NY, USA : Cambridge University Press, 2017.

[**Understanding Chinese society: Changes and transformations**](http://eservice.nlb.gov.sg/item_holding.aspx?bid=202433967){:target="_blank"}

Different facets of Chinese society are analysed in this book, with topics covering Chinese family and kinship, the emergence of the new middle class, consumerism, medical tourism, delayed marriage, popular culture and media in post-reform China.

All rights reserved, Singapore; New Jersey: World Scientific Publishing Co. Pte. Ltd, 2016.

[**China-South Korea relations in the new era: Challenges and opportunities**](http://eservice.nlb.gov.sg/item_holding.aspx?bid=203003665){:target="_blank"}

Ye provides an analytical review of the changing dynamics in the bilateral relations between China and South Korea as seen from both historical and theoretical perspectives. He also highlights the domestic politics of both countries which have seen the involvement and influence of a more vocal citizenry on state policies.

All rights reserved, Lanham, Maryland: Lexington Books, 2017.

[**Japan-China relations in the modern era**](http://eservice.nlb.gov.sg/item_holding.aspx?bid=202864723){:target="_blank"}

Gain a deeper understanding of the past, present and projected future of China’s bilateral relations with Japan in this book. The contributions are from Japanese scholars and are valuable for researchers studying Japan-Sino relations.

All rights reserved, Abingdon, Oxon; New York, NY: Routledge, 2017.

[**China’s foreign aid: 60 years in retrospect**](http://eservice.nlb.gov.sg/item_holding.aspx?bid=202929013){:target="_blank"}

Gain insights to the evolution of China’s foreign aid policy and mechanisms over the past 60 years and learn about China’s aid to Africa, Southeast and Central Asian countries, Latin America and the Caribbean region in this book. Written by Chinese scholars, the book argues that the administration of foreign aid to other countries has enabled China to strengthen its economic and political ties with many developing countries.

All rights reserved, Singapore: Springer, 2017.

[**Young China hand**](https://nlb.overdrive.com/media/2840905){:target="_blank"}

Be inducted into the world of private equity in China through this nail-biting suspense thriller, which has an Ivy-league educated protagonist from Singapore matching (and losing) wits against his nemesis, a veteran duck farmer-turned CEO in China. Witten by authors who have lived and worked for over a decade in China, this book delivers insights to how real business is done in China.

Retrieved from OverDrive. (*myLibrary* ID is required to access this ebook.)

[**The China challenge: Shaping the choices of a rising power**](https://nlb.overdrive.com/media/2308298){:target="_blank"}

Christensen provides a new perspective on US-China relations and shows how China has become a regional leader with sufficient clout to cause instability in East Asia and to make an forceful impact on world economics, politics and security issues.

Retrieved from OverDrive. (*myLibrary* ID is required to access this ebook.)

[**Let 100 voices speak: How the Internet is transforming China and changing everything**](http://eresources.nlb.gov.sg/main/Browse?startsWith=P){:target="_blank"}

Carter reveals how the Internet is enabling creative expression, social engagement and political discourse to flourish via Weibo (the Chinese version of Twitter) and the underground Internet in China.

Retrieved from ProQuest Ebook Central. (*myLibrary* ID is required to access this ebook.)

[**China: Behind the miracle**](https://nlb.overdrive.com/media/3013896){:target="_blank"}

Dawra traces the success of China’s economy, which has enabled the fivefold increase in its per capita income in the three decades since Deng Xiaoping’s leadership. She also discusses the future of China’s continued growth in the light of its economic restructuring and policies supporting urbanisation, innovation in agriculture and manufacturing and the development of rural regions in central, southern and western China.

Retrieved from OverDrive. (*myLibrary* ID is required to access this ebook.)

[**The Internet, social media and a changing China**](http://eresources.nlb.gov.sg/main/Browse?startsWith=P){:target="_blank"}

Gain new insights to the social media revolution which has transformed how Chinese authorities communicate with the public and enabled Chinese citizens to engage with each other, share information and express opinions in the borderless cyberspace.

Retrieved from ProQuest Ebook Central. (*myLibrary* ID is required to access this ebook.)

[**Unmade in China: The hidden truth about China’s economic miracle**](https://nlb.overdrive.com/media/2355728){:target="_blank"}

Haft takes a close look at the US-China trade relationship in this book. He examines how the risks posed by the unregulated manufacturing industry in China has led to increased opportunities in the US, with China shifting from its role as an exporter of “made-in-China” products to becoming a major importer of American goods.

Retrieved from OverDrive. (*myLibrary* ID is required to access this ebook.)

[**China’s futures: PRC elites debate economics, politics, and foreign policy**](http://eresources.nlb.gov.sg/main/Browse?startsWith=P){:target="_blank"}

Find out how China’s movers and shakers assess the future of China from five angles – economy, politics, communication and the Internet, foreign policy strategy and global power rivalry.

Retrieved from ProQuest Ebook Central. (*myLibrary* ID is required to access this ebook.)

[**Children in China**](https://nlb.overdrive.com/media/2697143){:target="_blank"}

China’s government policies over the past decades have shaped the lives of the current generation today. Naftali explores issues such as the impact of the one-child policy and rural-urban migration trends which have impinged upon children’s education and development in both rural and city areas.

Retrieved from OverDrive. (*myLibrary* ID is required to access this ebook.)

[**Population in China**](https://nlb.overdrive.com/media/2786351){:target="_blank"}

In recent years, China has been experiencing a decline in fertility and mortality rates and an increase in the influx of rural-urban migration. China’s decades-long population policies have impacted the gender ratio and the country has to tackle the current problems of a rapidly ageing population and the heightened inequality between rural and urban residents.

Retrieved from OverDrive. (*myLibrary* ID is required to access this ebook.)

[**The power of culture: Encounters between China and the United States**](http://eresources.nlb.gov.sg/main/Browse?startsWith=P){:target="_blank"}

With contributions from mainly Chinese academics from Chinese universities and research institutes and several Western scholars, this volume explores the cultural dimensions of the Sino-American relationship alongside China’s growing international influence and power.

Retrieved from ProQuest Ebook Central. (*myLibrary* ID is required to access this ebook.)

[**China under Xi Jinping: Its economic challenges and foreign policy initiatives**](http://eresources.nlb.gov.sg/main/Browse?startsWith=P){:target="_blank"}

The essays in this book written by leading Chinese scholars in the fields of international relations and political economy discuss the policies enacted by Xi Jinping, China’s current leader and analyse how these policies influence China’s governance, economy and foreign relations strategy.

Retrieved from ProQuest Ebook Central. (*myLibrary* *ID* is required to access this ebook.)

[**China update series: China’s new sources of economic growth, volume 1: Reform, resources and climate change**](http://eresources.nlb.gov.sg/main/Browse?startsWith=P){:target="_blank"}

Learn about the fallout of China’s demographic changes on its labour force and the factors which have contributed to the decline in China’s total factor productivity and growth in its capital stock from this book.

Retrieved from ProQuest Ebook Central. (*myLibrary* ID is required to access this ebook.)

[**China’s domestic transformation in a global context**](http://eresources.nlb.gov.sg/main/Browse?startsWith=P){:target="_blank"}

Read about the structural transformations occurring in many pockets of China’s domestic economy, from prioritizing government expenditure on education and research and development to energy and financial market reforms. Woven into the discussion is China’s strategy for participation in international trade policy negotiations.

Retrieved from ProQuest Ebook Central. (*myLibrary* ID is required to access this ebook.)

[**China’s local governance in perspective: Instruments of central government control**](http://eresources.nlb.gov.sg/main/Browse?startsWith=E){:target="_blank"}

Due to its sheer population size and land mass, China’s central government has had to design and deploy various strategies to govern even the most remote regions within its borders. This article discusses the seven dimensions of government control, which involve institutions, allocation of resources, personnel management, administrative monitoring, exertion of authority over local sectors and use of the military.

Retrieved from EBSCOHost Databases. (*myLibrary* ID is required to access this database.)

[**Gender and migration: Employment of rural migrants in South China’s factories**](http://eresources.nlb.gov.sg/main/Browse?startsWith=P){:target="_blank"}

This study uncovers the trend for rural women to secure factory employment more successfully compared with their male counterparts. From the factories’ perspective, women are considered to be more efficient and careful workers, while males are associated with “carelessness”, “laziness”, “violence” and “conflict”.

Retrieved from ProQuest Central. (*myLibrary* ID is required to access this database.)

[**Human capital and China’s future growth**](http://eresources.nlb.gov.sg/main/Browse?startsWith=P){:target="_blank"}

Focusing on human capital, this article discusses the prospects for China’s economic growth. It examines China’s hukou policy which demarcates China’s labour force into two distinct camps of rural and urban workers and documents the progress which China has made in raising the education levels of its population.

Retrieved from ProQuest Central. (*myLibrary* ID is required to access this database.)

[**Sustainability strategies of China’s economic growth model**](http://eresources.nlb.gov.sg/main/Browse?startsWith=P){:target="_blank"}

This article explores the links between China’s economic progress, CO2 emissions, China’s dependence on heavy industrial output and concerns about environmental sustainability in its industrial energy-intensive sectors.

Retrieved from ProQuest Central. (*myLibrary* ID is required to access this database.)

[**Filial obligation in contemporary China: Evolution of the culture-system**](http://eresources.nlb.gov.sg/main/Browse?startsWith=E){:target="_blank"}

Despite changing cultural and social mores in China and the rise of ‘individualisation’ (shifting from collective needs to self-realisation and self-interest), filial piety still functions as an important familial obligation among Chinese families. The paper posits that the absence of a social welfare system will ensure the propagation of interdependent relations between parents and children.

Retrieved from EBSCOHost Databases. (*myLibrary* ID is required to access this database.)

[**Leadership and the mandate of heaven: Political risk in China**](http://eresources.nlb.gov.sg/main/Browse?startsWith=P){:target="_blank"}

Read this article to get an overall perspective of the possible derailers hindering China’s future prospects after having enjoyed over three decades of economic growth and social progress. It also highlights the problems China faces at present, such as income inequality, labour shortage due to its long-standing one-child policy, rising debt and environmental pollution.

Retrieved from ProQuest Central. (*myLibrary* ID is required to access this database.)

[**Policy response to low fertility in China: Too little, too late?**](http://eresources.nlb.gov.sg/main/Browse?startsWith=E){:target="_blank"}

This four-page article details China’s declining fertility levels which began manifesting in the 1970s, before the one-child policy was implemented in 1980. Despite the total lifting of the one-child rule in November 2015, the number of births in China has only increased marginally. The author suggests that the Chinese government should introduce policies that will make it easier for citizens to have children and offer schemes to provide financial and healthcare support for its greying population.

Retrieved from EBSCOHost Databases. (*myLibrary* ID is required to access this database.)

[**Young China hand**](https://nlb.overdrive.com/media/2840905){:target="_blank"}

Be inducted into the world of private equity in China through this nail-biting suspense thriller, which has an Ivy-league educated protagonist from Singapore matching (and losing) wits against his nemesis, a veteran duck farmer-turned CEO in China. Witten by authors who have lived and worked for over a decade in China, this book delivers insights to how real business is done in China.

Retrieved from OverDrive. (*myLibrary* ID is required to access this ebook.)

---

### **You may also like**

[**Chasing the Chinese dream: Aspirations and dilemmas of China’s new affluent consumer class**](http://www.oliverwyman.com/content/dam/oliver-wyman/v2/publications/2017/jun/Chasing-The-Chinese-Dream.pdf){:target="_blank"}

Read about the aspirations and consumer pursuits of the Chinese mass affluent population (individuals with RMB 650,000 to 6 million investable assets) in this 22-page report. This segment of the Chinese population is expected to reach 33 million in 2020 from the current 15 million recorded in 2015. The report also highlights the shift towards wealth and lifestyle, rising discontent due to the soaring cost of living and fresh opportunities for businesses and wealth managers in this new paradigm of domestic consumer spending.

[**China’s economic rise: History, trends, challenges, and implications for the United States**](https://fas.org/sgp/crs/row/RL33534.pdf){:target="_blank"}

This report traces the advent of economic reforms and trade liberalisation in China which began 36 years ago and its current economic structure today. It also discusses the challenges which China faces in sustaining a rapidly growing economy and the Chinese government’s plan to implement sweeping economic reforms.

[**OECD Economic Surveys China. April 2019**](https://www.oecd.org/economy/surveys/China-2019-OECD-economic-survey-overview.pdf){:target="_blank"}

This report gives a detailed overview of the current state of China’s economy which is doing well but appears to be slowing down. The Chinese government is allocating sizeable funds on research and development to boost corporate dynamism and performance and the report recommends ensuring inclusive growth by improving the labour market opportunities for citizens.

[**The real origins of the U.S.-China Cold War**](https://foreignpolicy.com/2019/06/02/the-real-origins-of-the-u-s-china-cold-war-big-think-communism/){:target="_blank"}

This article analyses the reasons behind the current cold war between the US and China and the genesis of the decline in their bilateral relationship. The article concludes that shifting power dynamics and differences in political regimes forms the basis which has shaped a 40-year tussle over power, influence and global order.

[**Why China must wake up to demographic reality**](https://www.scmp.com/news/china/economy/article/2130737/why-china-must-wake-demographic-reality){:target="_blank"}

China’s long growth potential may be hampered by its rapidly ageing population, coupled with a shortage of workers and students. Despite the introduction of the two-child policy, rising incomes have resulted in Chinese couples being less willing to have children, mirroring their counterparts in Japan and Germany.

[**Evolution of Sino-Japanese Relations: Implications for Northeast Asia and Beyond**](https://www.e-ir.info/2019/04/10/evolution-of-sino-japanese-relations-implications-for-northeast-asia-and-beyond/){:target="_blank"}

China and Japan are two large economic giants in East Asia with a rivalry stemming from historical and cultural differences. This article focuses on the stability of Sino-Japanese relations over the next few years with an analysis of their contest for military, cyber and socio-economic power as well as territorial control in East Asia.

repository: GohLeeKim/nlb-eoa

repo_name: GohLeeKim/nlb-eoa


text:
#  Fit Food

## Table of Contents

- [About the Project](#about-the-project)
- [Wireframes](#Wireframes)
- [User Stories](#User-Stories)
- [Domain Modeling](#Domain-Modeling)
- [Contributing](#contributing)
- [License](#license)
- [Contact](#contact)

# About the Project

Our project is focused on providing the best way to access healthy food for a better life.
Through our recipes application, the user will get several suggestions for delicious recipes within the appropriate calorie limits based on the raw food materials available to the user.

**MVP** :
1. Provide healthy food recipes based on search and filter tools.
2. Provide the user with caloric calculation service
3. Providing the service of preserving your favorite recipes for later reference

To see more on the project requirements, click on [this.link](requirements.md).

# Wireframes

## Home page

![home01](/wireframe/HOME-01.png)

![home02](/wireframe/HOME-02.png)

![home03](/wireframe/HOME-03.png)

## Calorie calculator

![calc01](/wireframe/CalorieCalculator-01.png)

![calc02](/wireframe/CalorieCalculator-02.png)

## Recipe page

![recipe](/wireframe/RecipePage.png)

## Search Result page

![recipe](/wireframe/SearchResult.png)

# User Stories

[Project management board](https://trello.com/b/G0hz543R/fit-food)

# Domain Modeling

![domain](/wireframe/domainModeling.PNG)

# Contribution :

- [Yahya Abu Khalil](https://github.com/AbuKhalil95)
- [Roukia Salahi](https://github.com/roukiaSalahi)
- [Daoud Nazek](https://github.com/daoudnazek)
- [Abdallah Safi](https://github.com/AbdallahSafi)

# License

Distributed under the MIT License. See [LICENSE](https://www.mit.edu/~amini/LICENSE.md) for more information.

repository: asac-elite/Fit-Food

gha_language: CSS

repo_name: asac-elite/Fit-Food


text:
webppl [![Build Status](https://travis-ci.org/probmods/webppl.svg?branch=dev)](https://travis-ci.org/probmods/webppl) [![Dependency Status](https://david-dm.org/probmods/webppl.svg)](https://david-dm.org/probmods/webppl)
======

Probabilistic programming for the web

## Quick start

Install using [nodejs](http://nodejs.org):

    npm install -g webppl

Run webppl programs:

    webppl myprogram.wppl

Upgrade webppl:

    npm update -g webppl

## License

webppl is released under the [MIT License](LICENSE.md).

## Contributions

We encourage you to contribute to webppl! Check out our [guidelines for contributors](CONTRIBUTING.md).

## Installation from GitHub

    git clone https://github.com/probmods/webppl.git
    cd webppl
    npm install
    npm install -g nodeunit grunt-cli

To use the `webppl` command line tool from any directory, add the webppl directory to your `$PATH`.

## Usage

Running webppl programs:

    webppl examples/geometric.wppl

Compiling webppl programs to Javascript:

    webppl examples/geometric.wppl --compile --out geometric.js

The compiled file can be run using nodejs:

    node geometric.js

## Development

Before committing changes, run grunt (which runs tests and linting):

    grunt

If grunt doesn't succeed, the [continuous integration tests](https://travis-ci.org/probmods/webppl) will fail as well.

To only run the tests, do:

    npm test

To only run the linter:

    grunt gjslint

For more semantic linting, try:

    grunt hint

If gjslint complains about style errors (like indentation), you can fix many of them automatically using:

    grunt fixjsstyle

To compile webppl for use in browser, run:

    npm install -g browserify
    browserify -t brfs src/main.js > compiled/webppl.js

## Debugging

To debug WebPPL programs running in Chrome, enable [pause on JavaScript exceptions](https://developer.chrome.com/devtools/docs/javascript-debugging#pause-on-exceptions) in the Chrome debugger. To debug WebPPL programs running in nodejs, use node-inspector as follows:

    // 1. Install node-inspector (only need to do this once)
    npm install -g node-inspector

    // 2. Compile your webppl program to Javascript
    webppl my-program.wppl --compile --out my-program.js

    // 3. Add "debugger;" statements to my-program.js to indicate breakpoints

    // 4. Run your compiled program in debug mode (will pause automatically)
    node --debug-brk my-program.js

    // 5. (In separate terminal:) Load node inspector, resume program execution in node-inspector
    node-inspector

## Using external functions

### WebPPL code

You can automatically prepend a webppl file `myLibrary.wppl` to your code using the following command:

    webppl myFile.wppl --require-wppl myLibrary.wppl

### Javascript functions and libraries

Using the example of reading and writing CSV files:

1. Install any node modules you want to use:

        npm install -g babyparse

2. Write a Javascript file that exports the functions you want to use:

        // simpleCSV.js

        var fs = require('fs');
        var babyparse = require('babyparse');

        function readCSV(filename){
          return babyparse.parse(fs.readFileSync(filename, 'utf8'));
        };

        function writeCSV(jsonCSV, filename){
          fs.writeFileSync(filename, babyparse.unparse(jsonCSV) + "\n");
        }

        module.exports = {
          readCSV: readCSV,
          writeCSV: writeCSV
        };

2. Write a WebPPL file that uses your new functions (with module qualifier):

        // csvTest.wppl

        var myCSVdata = simpleCSV.readCSV('myinput.csv');
        var myNewData = myCSVdata.data.concat([["foo", 3], ["bar", 10]]);
        simpleCSV.writeCSV(myNewData, 'myoutput.csv');

3. Run your WebPPL file with `require` command line flag:

        webppl csvTest.wppl --require-js ./simpleCSV.js

### Additional header files

Sometimes, it is useful to define external functions that are able to access the store, continuation, and address arguments that are present at any point in a webppl program but usually not exposed to the user. Let's use the example of a function that makes the current address available in WebPPL:

1. Write a Javascript file that exports the functions you want to use:

        // addressHeader.js

        function myGetAddress(store, k, address){
          return k(store, address);
        };

        module.exports = {
          myGetAddress: myGetAddress
        };

2. Write a WebPPL file that uses your new functions (without module qualifier):

        // addressTest.wppl

        var foo = function(){
          var bar = function(){
            console.log(myGetAddress());
          }
          bar()
        }

        foo()

3. Run your WebPPL file with `require-header` command line flag:

        webppl addressTest.wppl --require-header ./addressHeader.js

## Updating the npm package

1. Update version in dev:

        git checkout dev
        npm version patch  // or minor, or major; prints new version number
        git add package.json
        git commit -m "Update npm version"

2. Merge into master

        git checkout master
        git merge dev
        grunt

3. Create git tag for new version

        git tag v0.0.1 // use version printed by "npm version" command above

4. Push to remotes and npm

        git push origin dev
        git push origin master
        git push origin v0.0.1  // again, use version printed by "npm version" command above
        npm publish

repository: s-marshall/webppl

branch_name: refs/heads/dev

repo_name: s-marshall/webppl


text:
# Finances for Quarter 2 (April 1 - June 30) 2022:

## Donations:

Bitcoin (BTC): None

Monero (XMR): 0.14495 XMR worth ~16.02€ at the time of publishing (Monero price ~110.39€)

Ethereum (ETH): None

Litecoin (LTC): 0.10539963 LTC worth ~5.05€ at the time of publishing (Litecoin price ~47.95€)

## Expenses:

### VPSs (from January 1 to June 30) (technically paid on July 3, 2022):

```
Old VPS (kept until March 2022): 4€ x 3 months = 12€

Main VPS: 5.88€ x 6 months = 35.28€

Test VPS: 4.79€ x 6 months = 28€

Transaction fees handling (agreed with Perflyst to be 1€/month for all our VPS): 1€ x 6 months = 6€

Human error from November 2021: -5.64€

Total: 75.64€
```

0.685 XMR worth ~75.64€ at the time of payment

### The VPSs have been migrated to non-KYC/cryptocurrency only provider during the month of June 2022.

New Main VPS (paid for 3 months - until August 31, 2022): 0.00153849 BTC worth ~57.53€ (~60$) at the time of payment

Test VPS: (paid for 3 months - until September 14, 2022): 0.00123403 BTC worth ~25.88€ (~797.34 ₴) at the time of payment

## Current funds:

Bitcoin (BTC): 0.30031594 BTC worth ~5,498.21€ at the time of publishing (Bitcoin price ~18,265.89€)

Monero (XMR):  7.293371546804 XMR worth ~809.04€ at the time of publishing (Monero price ~110.39€)

Ethereum (ETH): None

Litecoin (LTC): 0.40954503 LTC worth ~19.63€ at the time of publishing (Litecoin price ~47.95€)

repository: iv-org/transparency

repo_name: iv-org/transparency


text:
# pyqwikswitch library
[![Build Status](https://travis-ci.com/kellerza/pyqwikswitch.svg?branch=master)](https://travis-ci.com/kellerza/pyqwikswitch)
QwikSwitch USB Modem library for Python 3

  See http://www.qwikswitch.co.za for more information on the Qwikswitch devices.

  The library contains threaded and async interfaces and supports relays, buttons, LED dimmers and decoding of various [sensors](https://github.com/kellerza/pyqwikswitch/blob/master/pyqwikswitch/qwikswitch.py#L277)

##  QSUsb class

* Get a list of all devices & values. *(http://localhost:2020/&device)*

  `QSUsb.devices()`

  ```
  [{"id": "@0c26e0","name": "buitelig","type": "rel","val": "ON",
        "time": "1460146507","rssi": "45%"},
    .....]
  ```

* Long poll *(http://localhost:8080/&listen)* for device changes and
    button presses. This is non-blocking and should be stopped manually (`.stop()`)

  `QSUsb.listen(callback)`

* Set a specific device according to ID. (dim 5%) or 100 (on) *(http://localhost:8080/@0ac2f0=5)*

  `QSUsb.set(id, value)`

  Dimmers values can be adjusted to get a more linear behaviour by setting `dim_adj` between 1 - 2

## Example usage

See [example.py](./example.py) for a basic usage and tests though the synchronous interface

repository: kellerza/pyqwikswitch

repo_name: kellerza/pyqwikswitch


text:
# SSPQ
Spatial Shift Point-Wise Quantization code open

# introduction
This repository is related with the paper Spatial Shift Point-Wise Quantization.
The main idea is
 - substitute the spatial operation to active shift operation
 - apply inverted residual block structure as introduced by the paper all you need is a few shifts - https://arxiv.org/abs/1903.05285 .
 - quantize 1x1 point-wise convolution part by using dorefa-net.
 - keep the quantization bit for activation over 4-bit since quantization under 4-bit occur unstablility of convergence.

# our experimental Results for SSPQ 50
This figure shows the SSPQ 50 light-weight model performance in the metric of accuracy and model size.
![performance](https://github.com/Eunhui-Kim/SSPQ/blob/main/Fig4-s.png)

# pre-requisite
Note that this code is tested only in the environment decribed below. Mismatched versions does not guarantee correct execution.

 - Ubuntu kernel ver. 4.15.0-117-generic #118~16.04.1
 - Cuda 10.0
 - cudnn 7.6.5
 - Tensorflow 1.15.3
 - Tensorpack
 - g++ 7.5.0
 - python 3.7
 - install https://github.com/Eunhui-Kim/custom-op-for-shiftNet

   After the test works fine, at first

 - put the shift2d.py in the tensorpack models path.
   in my case, the tensorpack models is
   $HOME/.local/lib/python3.7/site-packages/tensorpack/models/

# Testing
  sspq50 model for imagenet dataset,
  1) put 'imagenet-resnet-QresIBShift.py, resnet_model2.py, with imagenet_utils.py and dorefa.py of tensorpack file together in the tensorpack example path
  2) run
  python imagenet-resnet-QresIBShift.py --mode QresIBShift --data $Imagenet_Path --batch 256 --depth 50

repository: Eunhui-Kim/SSPQ

repo_name: Eunhui-Kim/SSPQ


text:
# Demo.AspNetCore.WebSockets

Sample project for demonstrating low-level WebSocket protocol aspects in ASP.NET Core:

- [Lifetime & Prematurely closed connections](https://www.tpeczek.com/2018/02/back-to-websockets-fundamentals-in.html)
- [Subprotocol negotiation](https://www.tpeczek.com/2017/06/websocket-subprotocol-negotiation-in.html)
- [Cross-Site WebSocket Hijacking protection](https://www.tpeczek.com/2017/07/preventing-cross-site-websocket.html)
- [Per-message compression](https://www.tpeczek.com/2021/09/websocket-per-message-compression-in.html)

## Donating

My blog and open source projects are result of my passion for software development, but they require a fair amount of my personal time. If you got value from any of the content I create, then I would appreciate your support by [buying me a coffee](https://www.buymeacoffee.com/tpeczek).

## Copyright and License

Copyright © 2017 - 2021 Tomasz Pęczek

Licensed under the [MIT License](https://github.com/tpeczek/Demo.AspNetCore.WebSockets/blob/master/LICENSE.md)


text:
This is a cross-platform MOSEK installer for Python PIP supporting Python 2.7+ and Python 3.3+.

To install the latest revision of the package do
```
pip install --user git+http://github.com/MOSEK/Mosek.pip
```
If you wish to install the MOSEK 7,1, you need to install the 7.1 specific branch:
```
pip install --user<EMAIL_ADDRESS>```

Specific releases can be installed as
```
pip install --user https://github.com/MOSEK/Mosek.pip/archive/7.1.45.tar.gz
```

The links can be used with both Python 2 and 3.

If you are installing using Miniconda, PyEnv or another locally installed Python, you should leave out the `--user` argument.


text:
If you are able to abstract out common build and deployment scripts into a base image and the application image `Dockerfile` instructions end up always being the same, you can simplify it even further again using what is called an onbuild image.

This is a special type of base image which includes a set of instructions in the `Dockerfile`, which instead of being executed when the base image is being built, are executed at the start of building any derived image which uses the base image.

Change to the `~/python-onbuild-v1` sub directory:

```execute
cd ~/python-onbuild-v1
```

View the contents of the `Dockerfile`:

```execute
cat Dockerfile
```

It should contain:

```
FROM python-base:v4

ONBUILD COPY --chown=1001:0 . /opt/app-root/

ONBUILD RUN assemble-image

ONBUILD CMD [ "start-container" ]

ONBUILD EXPOSE 8080
```

These are the instructions we had in the `Dockerfile` for the Flask application, but where except for the `FROM` instruction, each is prefixed with `ONBUILD`.

Build the base image. Note that when doing this we are supplying to `podman build` the `--format docker` option. This is because `ONBUILD` is not part of the OCI specification for portable container images, and instead is a feature of the original `docker` image format.

```execute
podman build --format docker -t python-onbuild:v1 .
```

These `ONBUILD` instructions will be recorded in the container image manifest, but no action is take at the time the base image is built.

Change to the `~/flask-app-v9` sub directory.

```execute
cd ~/flask-app-v9
```

View the contents of the `Dockerfile` we have now.

```execute
cat Dockerfile
```

All it contains is:

```
FROM python-onbuild:v1
```

Beyond specifying the base image, there are no additional instructions.

Build the image though:

```execute
podman build --format docker --no-cache -t flask-app .
```

and you will see that the instructions from the base image which were prefixed with `ONBUILD` were executed in the context of building the derived image instead.

Thus, the application source files were copied from the directory where the subsequent build is run.

Run the container image:

```execute
podman run --rm -p 8080:8080 flask-app
```

and make a web request:

```execute-2
curl http://localhost:8080
```

The applications works just as it did before.

Stop the container:

```execute-2
podman kill -s TERM `podman ps -ql`
```

Although the `ONBUILD` feature is interesting, that it is not part of the OCI specification it may not be supported by container platforms that support building images for you. Only use it and become dependent on it if you know that your target platforms will support it.

repository: vgrme/lab-building-images

repo_name: vgrme/lab-building-images


text:
# Announcement Service

Announcement Service basically handles all announcement related activities for the web app.

## Rest API

| API Endpoint | Request Type | Description |
| --- | --- | --- |
| /announcements/all | GET | Get all announcements available inside database |
| /announcements/all/page?limit=[VALUE]&offset=[VALUE] | GET | Get all announcements available inside database by page |
| /announcements/{id} | GET | Get announcement by ID |
| /announcements/{id} | DELETE | Delete announcement by ID |
| /announcements/{id} | PUT | Update announcement by ID |
| /announcements/new | POST | request body json = {Announcement Object}. Create a new announcement, store in database and notify web app of new announcement via websocket |
| /announcements/latest | GET | Get all active announcements |

## Scheduled Jobs

| Method | Description |
| --- | --- |
| cleanUpAnnouncementActiveFlag | periodically clean up announcements' active flag in database |

repository: awarenessxz/java-web-app

repo_name: awarenessxz/java-web-app


text:
**Version: dev**

## datamon label

Commands to manage labels for a repo

### Synopsis

Commands to manage labels for a repo.

A label is a name given to a bundle, analogous to a tag in git.

There's one such map per repo, so in particular, setting a label or uploading a bundle
with a label that already exists overwrites the commit hash previously associated with the
label:  There can be at most one commit hash associated with a label.  Conversely,
multiple labels can refer to the same bundle via its commit hash (bundle ID).

### Examples

```
Latest
production
```

### Options

```
      --format string   Pretty-print datamon objects using a Go template. Use '{{ printf "%#v" . }}' to explore available fields
  -h, --help            help for label
      --skip-auth       Skip authentication against google (gcs credentials remains required)
```

### Options inherited from parent commands

```
      --config string             Set the config backend store to use (bucket name: do not set the scheme, e.g. 'gs://')
      --context string            Set the context for datamon (default "dev")
      --loglevel string           The logging level. Levels by increasing order of verbosity: none, error, warn, info, debug (default "info")
      --metrics                   Toggle telemetry and metrics collection
      --metrics-password string   Password to connect to the metrics collector backend. Overrides any password set in URL
      --metrics-url string        Fully qualified URL to an influxdb metrics collector, with optional user and password
      --metrics-user string       User to connect to the metrics collector backend. Overrides any user set in URL
      --upgrade                   Upgrades the current version then carries on with the specified command
```

### SEE ALSO

* [datamon](datamon.md)	 - Datamon helps build ML pipelines
* [datamon label get](datamon_label_get.md)	 - Get bundle info by label
* [datamon label list](datamon_label_list.md)	 - List labels
* [datamon label set](datamon_label_set.md)	 - Set labels

repository: oneconcern/datamon

gha_language: Go

repo_name: oneconcern/datamon


text:
---
title: Command Line
draft: false
weight: 4
---

# Introduction to the command-line interface

> For readers at home: this chapter is covered in the [Your new friend: Command Line](https://www.youtube.com/watch?v=jvZLWhkzX-8) video.

It's exciting, right?! You'll write your first line of code in just a few minutes! :)

__Let us introduce you to your first new friend: the command line!__

The following steps will show you how to use the black window all hackers use. It might look a bit scary at first but really it's just a prompt waiting for commands from you.

> **Note** Please note that throughout this book we use the terms 'directory' and 'folder' interchangeably but they are one and the same thing.

## What is the command line?

The window, which is usually called the __command line__ or __command-line interface__, is a text-based application for viewing, handling, and manipulating files on your computer. It's much like Windows Explorer or Finder on the Mac, but without the graphical interface. Other names for the command line are: *cmd*, *CLI*, *prompt*, *console* or *terminal*.

## Open the command-line interface

To start some experiments we need to open our command-line interface first.

<!--sec data-title="Opening: Windows" data-id="windows_prompt" data-collapse=true ces-->

Depending on your version of Windows and your keyboard, one of the following should open a command window (you may have to experiment a bit, but you don't have to try all of these suggestions):
- Go to the Start menu or screen, and enter "Command Prompt" in the search field.
- Go to Start menu → Windows System → Command Prompt.
- Go to Start menu → All Programs → Accessories → Command Prompt.
- Go to the Start screen, hover your mouse in the lower-left corner of the screen, and click the down arrow that appears (on a touch screen, instead flick up from the bottom of the screen). The Apps page should open. Click on Command Prompt in the Windows System section.
- Hold the special Windows key on your keyboard and press the "X" key. Choose "Command Prompt" from the pop-up menu.
- Hold the Windows key and press the "R" key to get a "Run" window. Type "cmd" in the box, and click the OK key.

![Type cmd in the Run window](/images/windows-plus-r.png)

Later in this tutorial, you will need to have two command windows open at the same time. However, on some versions of Windows, if you already have one command window open and you try to open a second one using the same method, it will instead point you to the command window you already have open. Try it now on your computer and see what happens! If you only get one command window, try one of the other methods in the list above. At least one of them should result in a new command window being opened.

<!--endsec-->

<!--sec data-title="Opening: OS X" data-id="OSX_prompt" data-collapse=true ces-->

Go to Applications → Utilities → Terminal.

<!--endsec-->

<!--sec data-title="Opening: Linux" data-id="linux_prompt" data-collapse=true ces-->

It's probably under Applications → Accessories → Terminal, or Applications → System → Terminal, but that may depend on your system. If it's not there, you can try to Google it. :)

<!--endsec-->

## Prompt

You now should see a white or black window that is waiting for your commands.

<!--sec data-title="Prompt: OS X and Linux" data-id="OSX_Linux_prompt" data-collapse=true ces-->

If you're on Mac or Linux, you probably see a `$`, like this:

{{< code bash "command-line" >}}
$
{{< /code >}}
<!--endsec-->

<!--sec data-title="Prompt: Windows" data-id="windows_prompt2" data-collapse=true ces-->

On Windows, you probably see a `>`, like this:

{{< code bash "command-line" >}}
>
{{< /code >}}

Take a look at the Linux section just above now -- you'll see something more like that when you get to PythonAnywhere later in the tutorial.

<!--endsec-->

Each command will be prepended by a `$` or `>` and one space, but you should not type it. Your computer will do it for you. :)

> Just a small note: in your case there may be something like `C:\Users\ola>` or `Olas-MacBook-Air:~ ola$` before the prompt sign, and this is 100% OK.

The part up to and including the `$` or the `>` is called the *command line prompt*, or *prompt* for short. It prompts you to input something there.

In the tutorial, when we want you to type in a command, we will include the `$` or `>`, and occasionally more to the left. Ignore the left part and only type in the command, which starts after the prompt.

## Your first command (YAY!)

Let's start by typing this command:

<!--sec data-title="Your first command: OS X and Linux" data-id="OSX_Linux_whoami" data-collapse=true ces-->

{{< code bash "command-line" >}}
$ whoami
{{< /code >}}

<!--endsec-->

<!--sec data-title="Your first command: Windows" data-id="windows_whoami" data-collapse=true ces-->

{{< code bash "command-line" >}}
> whoami
{{< /code >}}

<!--endsec-->

And then hit `enter`. This is our result:

{{< code bash "command-line" >}}
$ whoami
olasitarska
{{< /code >}}

As you can see, the computer has just printed your username. Neat, huh? :)

> Try to type each command; do not copy-paste. You'll remember more this way!

## Basics

Each operating system has a slightly different set of commands for the command line, so make sure to follow instructions for your operating system. Let's try this, shall we?

### Current directory

It'd be nice to know where are we now, right? Let's see. Type this command and hit `enter`:

<!--sec data-title="Current directory: OS X and Linux" data-id="OSX_Linux_pwd" data-collapse=true ces-->

{{< code bash "command-line" >}}
$ pwd
/Users/olasitarska
{{< /code >}}

> Note: 'pwd' stands for 'print working directory'.

<!--endsec-->

<!--sec data-title="Current directory: Windows" data-id="windows_cd" data-collapse=true ces-->

{{< code bash "command-line" >}}
> cd
C:\Users\olasitarska
{{< /code >}}
> Note: 'cd' stands for 'change directory'. With powershell you can use pwd just like on Linux or Mac OS X.

<!--endsec-->

You'll probably see something similar on your machine. Once you open the command line you usually start at your user's home directory.

---

### Learn more about a command

Many commands you can type at the command prompt have built-in help that you can display and read! For example, to learn more about the current directory command:

<!--sec data-title="Command help: OS X and Linux" data-id="OSX_Linux_man" data-collapse=true ces-->

OS X and Linux have a `man` command, which gives you help on commands. Try `man pwd` and see what it says, or put `man` before other commands to see their help. The output of `man` is normally paged. Use the space bar to move to the next page, and `q` to quit looking at the help.

<!--endsec-->

<!--sec data-title="Command Help: Windows" data-id="windows_help" data-collapse=true ces-->

Adding a `/?` suffix to most commands will print the help page. You may need to scroll your command window up to see it all. Try `cd /?`.

<!--endsec-->

### List files and directories

So what's in it? It'd be cool to find out. Let's see:

<!--sec data-title="List files and directories: OS X and Linux" data-id="OSX_Linux_ls" data-collapse=true ces-->

{{< code bash "command-line" >}}
$ ls
Applications
Desktop
Downloads
Music
...
{{< /code >}}
<!--endsec-->

<!--sec data-title="List files and directories: Windows" data-id="windows_dir" data-collapse=true ces-->

{{< code bash "command-line" >}}
> dir
 Directory of C:\Users\olasitarska
05/08/2014 07:28 PM <DIR>      Applications
05/08/2014 07:28 PM <DIR>      Desktop
05/08/2014 07:28 PM <DIR>      Downloads
05/08/2014 07:28 PM <DIR>      Music
...
{{< /code >}}
> Note: In powershell you can also use 'ls' like on Linux and Mac OS X.
<!--endsec-->

---

### Change current directory

Now, let's go to our Desktop directory:

<!--sec data-title="Change current directory: OS X" data-id="OSX_move_to" data-collapse=true ces-->

{{< code bash "command-line" >}}
$ cd Desktop
{{< /code >}}
<!--endsec-->

<!--sec data-title="Change current directory: Linux" data-id="Linux_move_to" data-collapse=true ces-->

{{< code bash "command-line" >}}
$ cd Desktop
{{< /code >}}

Note that
the directory name "Desktop" might be translated
to the language of your Linux account.
If that's the case, you'll need to replace `Desktop`
with the translated name;
for example, `Schreibtisch` for German.

<!--endsec-->

<!--sec data-title="Change current directory: Windows" data-id="windows_move_to" data-collapse=true ces-->

{{< code bash "command-line" >}}
> cd Desktop
{{< /code >}}
<!--endsec-->

Check if it's really changed:

<!--sec data-title="Check if changed: OS X and Linux" data-id="OSX_Linux_pwd2" data-collapse=true ces-->

{{< code bash "command-line" >}}
$ pwd
/Users/olasitarska/Desktop
{{< /code >}}
<!--endsec-->

<!--sec data-title="Check if changed: Windows" data-id="windows_cd2" data-collapse=true ces-->

{{< code bash "command-line" >}}
> cd
C:\Users\olasitarska\Desktop
{{< /code >}}
<!--endsec-->

Here it is!

> PRO tip: if you type `cd D` and then hit `tab` on your keyboard, the command line will automatically fill in the rest of the name so you can navigate faster. If there is more than one folder starting with "D", hit the `tab` key twice to get a list of options.

---

### Create directory

How about creating a practice directory on your desktop? You can do it this way:

<!--sec data-title="Create directory: OS X and Linux" data-id="OSX_Linux_mkdir" data-collapse=true ces-->

{{< code bash "command-line" >}}
$ mkdir practice
{{< /code >}}
<!--endsec-->

<!--sec data-title="Create directory: Windows" data-id="windows_mkdir" data-collapse=true ces-->

{{< code bash "command-line" >}}
> mkdir practice
{{< /code >}}
<!--endsec-->

This little command will create a folder with the name `practice` on your desktop. You can check if it's there by looking on your Desktop or by running a `ls` or `dir` command! Try it. :)

> PRO tip: If you don't want to type the same commands over and over, try pressing the `up arrow` and `down arrow` on your keyboard to cycle through recently used commands.

---

### Exercise!

A small challenge for you: in your newly created `practice` directory, create a directory called `test`. (Use the `cd` and `mkdir` commands.)

#### Solution:

<!--sec data-title="Exercise solution: OS X and Linux" data-id="OSX_Linux_test_dir" data-collapse=true ces-->

{{< code bash "command-line" >}}
$ cd practice
$ mkdir test
$ ls
test
{{< /code >}}
<!--endsec-->

<!--sec data-title="Exercise solution: Windows" data-id="windows_test_dir" data-collapse=true ces-->

{{< code bash "command-line" >}}
> cd practice
> mkdir test
> dir
05/08/2014 07:28 PM <DIR>      test
{{< /code >}}
<!--endsec-->

Congrats! :)

---

### Clean up

We don't want to leave a mess, so let's remove everything we did until that point.

First, we need to get back to Desktop:

<!--sec data-title="Clean up: OS X and Linux" data-id="OSX_Linux_back" data-collapse=true ces-->

{{< code bash "command-line" >}}
$ cd ..
{{< /code >}}
<!--endsec-->

<!--sec data-title="Clean up: Windows" data-id="windows_back" data-collapse=true ces-->

{{< code bash "command-line" >}}
> cd ..
{{< /code >}}
<!--endsec-->

Using `..` with the `cd` command will change your current directory to the parent directory (that is, the directory that contains your current directory).

Check where you are:

<!--sec data-title="Check location: OS X and Linux" data-id="OSX_Linux_pwd3" data-collapse=true ces-->

{{< code bash "command-line" >}}
$ pwd
/Users/olasitarska/Desktop
{{< /code >}}
<!--endsec-->

<!--sec data-title="Check location: Windows" data-id="windows_cd3" data-collapse=true ces-->

{{< code bash "command-line" >}}
> cd
C:\Users\olasitarska\Desktop
{{< /code >}}
<!--endsec-->

Now time to delete the `practice` directory:

> __Attention__: Deleting files using `del`, `rmdir` or `rm` is irrecoverable, meaning _the deleted files will be gone forever_! So be very careful with this command.

<!--sec data-title="Delete directory: Windows Powershell, OS X and Linux" data-id="OSX_Linux_rm" data-collapse=true ces-->

{{< code bash "command-line" >}}
$ rm -r practice
{{< /code >}}
<!--endsec-->

<!--sec data-title="Delete directory: Windows Command Prompt" data-id="windows_rmdir" data-collapse=true ces-->

{{< code bash "command-line" >}}
> rmdir /S practice
practice, Are you sure <Y/N>? Y
{{< /code >}}
<!--endsec-->

Done! To be sure it's actually deleted, let's check it:

<!--sec data-title="Check deletion: OS X and Linux" data-id="OSX_Linux_ls2" data-collapse=true ces-->

{{< code bash "command-line" >}}
$ ls
{{< /code >}}
<!--endsec-->

<!--sec data-title="Check deletion: Windows" data-id="windows_dir2" data-collapse=true ces-->

{{< code bash "command-line" >}}
> dir
{{< /code >}}
<!--endsec-->

### Exit

That's it for now! You can safely close the command line now. Let's do it the hacker way, alright? :)

<!--sec data-title="Exit: OS X and Linux" data-id="OSX_Linux_exit" data-collapse=true ces-->

{{< code bash "command-line" >}}
$ exit
{{< /code >}}
<!--endsec-->

<!--sec data-title="Exit: Windows" data-id="windows_exit" data-collapse=true ces-->

{{< code bash "command-line" >}}
> exit
{{< /code >}}
<!--endsec-->

Cool, huh? :)

## Summary

 Here is a summary of some useful commands:

Command (Windows) | Command (Mac OS / Linux) | Description                | Example
----------------- | ------------------------ | -------------------------- | ---------------------------------------------
exit              | exit                     | close the window           | **exit**
cd                | cd                       | change directory           | **cd test**
cd                | pwd                      | show the current directory | **cd** (Windows) or **pwd** (Mac OS / Linux)
dir               | ls                       | list directories/files     | **dir**
copy              | cp                       | copy file                  | **copy c:\test\test.txt c:\windows\test.txt**
move              | mv                       | move file                  | **move c:\test\test.txt c:\windows\test.txt**
mkdir             | mkdir                    | create a new directory     | **mkdir testdirectory**
rmdir (or del)    | rm                       | delete a file              | **del c:\test\test.txt**
rmdir /S          | rm -r                    | delete a directory         | **rm -r testdirectory**
[CMD] /?          | man [CMD]                | get help for a command     | **cd /?** (Windows) or **man cd** (Mac OS / Linux)

These are just a very few of the commands you can run in your command line, but you're not going to use anything more than that today.

If you're curious, [ss64.com](http://ss64.com) contains a complete reference of commands for all operating systems.

## Ready?

Let's dive into Python!


text:
## Basic Usage

1. Launch Grafana & Graphite:

   ```
   $ docker-compose up -d
   ```

2. Explore available dashboards:

   ```
   $ open http://localhost:3000/

   # login with admin/admin
   ```

3. Power off when done:

   ```
   $ docker-compose down
   ```

## Fresh Restart

This will purge all data and configuration changes, and restart Graphite and Grafana:
```
$ reset-all.sh
```

## Customizing Graphite

After startup, you can explore and adjust the current Graphite configuration in `./graphite/conf`.
Configuration changes remain effective after restarts, but they will be purged by `reset-all.sh`.
At the first start, i.e., if the configuration directory is empty, Graphite will reset the configuration to the default.

If you want to change the default configuration, put your adjusted configuration files into `./graphite/default_conf`.
Changes to the default configuration will not be purged by `reset-all.sh`.

The following changes have been made to the default configuration:
- `storage-aggregation.conf`: Removed a section that would aggregate metrics ending in `.count` using `sum`.
  Such metrics will be aggregated by using the `avg` function instead.
  **Rationale:** Codahale `Meter`s and `Counter`s will report metrics ending in `.count` containing the total number of events measured.
  Such metrics need to be aggregated with the `avg` function, as they reflect the total number of events (as opposed to the delta w.r.t. the last report).

- `storage-aggregation.conf`: Changed the default `xFilesFactor` from `0.3` to `0.0`.
  **Rationale:** If a metric is reported only once per minute, Graphite would discard the metric values after the first aggregation step.

- `storage-schemas.conf`: Changed the default retention schedule to `10s:7d,1m:30d,10m:1800d`.

## Customizing Grafana

The easiest way to customize Grafana is through the web ui.
Changes will be persisted to the Grafana db and remain effective after restarts.

You can also import dashboards programmatically:
1. Export the dashboard to a json file through the Grafana UI. (Go to the dashboard, share, export, ...)
2. Put the dashboard file into `./grafana/dashboards`
3. Restart: `docker-compose restart`.

repository: digital-asset/canton

gha_language: Scala

repo_name: digital-asset/canton


text:
# canonical_domain

Allows for rack apps to manipulate the request host into a 'canonical domain'
which is stable across the various environments the app is run in. See below
for why this could be useful.

## Use Case

Lets say you want to build a Rails app that acts differently when accessed via
different domains (such as a CMS that manages content of different sites with
the same database).

These kinds of apps are usually a pain to get up and running in development
because normally you'd just hit `http://localhost:3000` and be on your way.

But because your app is inspecting `request.host` to do different things, you'll
have to end up putting lines into your `/etc/hosts` in order to trick your app
into thinking it's running under an expected domain name:

    <IP_ADDRESS> myapp.com

This is a bummer because then you'd have to remove those lines again every time
you want to see the real site. With canonical_domain, you could instead add this
to `/etc/hosts`:

    <IP_ADDRESS> myapp.com.local

Along with using the middleware like so:

    use CanonicalDomain::Middleware, '', '.local'

This way, when you access your app at `myapp.com.local`, you can reference the
'canonical domain' in the rack environment:

    request.env['canonical_domain.domain'] # => 'myapp.com'

With the canonical domain stable across the different environments of your app,
you are free to use it to scope Rails routes, use production DB snapshots in
development, etc.

## Installation

Nothing fancy! Just add `gem 'canonical_domain'` to your app's Gemfile, or
install using rubygems: `gem install canonical_domain`

## Usage

### Rails

`CanonicalDomain::Middleware` is injected into your app's middleware stack
automatically.

Use `config.canonical_domain.host_prefix` and `.host_suffix` to control how the
request host is transformed into the canonical domain. These will be stripped
from the request host to generate the canonical domain, e.g:

    # config/application.rb
    config.canonical_domain.host_prefix = 'myapp.'
    config.canonical_domain.host_suffix = ''

    # config/environments/development.rb
    config.canonical_domain.host_suffix = '.local'

    # inside a controller or view:
    request.host # => 'myapp.foobar.com.local'
    request.env['canonical_domain.domain'] # => 'foobar.com'

### Other rack apps

Add CanonicalDomain::Middleware to your middleware stack with host_prefix and
_suffix parameters like so:

    Rack::Builder.new do |builder|
      builder.use CanonicalDomain::Middleware, 'myapp.', '.local'
      builder.run MyApp
    end

## Todo

- Rename to something better, ideas:
    * MultiHost
    * OmniHost
    * polygamist
    * twoface
- Come up with better words for translation between canonical and
  environment-specific hosts:
    * Mogrify
    * mangle
    * munge
    * environmentalize
    * dress / undress
    * specificalize
- Provide activemodel plugin: `has_canonical_domain :domain`, which creates
  reader method.
- Provide more flexible options for transforming the host into the request host.
- Use the [ghost](https://github.com/bjeanes/ghost) gem to automatically manage
  locally accessible domain names.

## Contributing

1. Fork it
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Added some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create new Pull Request


text:
# Setting up a Rust development environment

## Install OpenSSL

Follow instructions for [setting up OpenSSL](https://docs.rs/openssl/0.10.28/openssl/). For Ubuntu users, the following
command works.

```bash
sudo apt-get install pkg-config libssl-dev
```

## Install Protobuf

Use following instructions to install the protobuf compiler on Ubuntu or similar Linux platforms.

```
$ wget https://github.com/protocolbuffers/protobuf/releases/download/v3.11.4/protobuf-all-3.11.4.tar.gz
$ tar xzf protobuf-all-3.11.4.tar.gz
$ cd protobuf-3.11.4
$ ./configure
$ make
$ sudo make install
$ sudo ldconfig
```

MacOS user can install with `brew`

```
$ brew install protobuf
```

repository: msathis/ballista

repo_name: msathis/ballista


text:
# MIRAI [![codecov](https://codecov.io/gh/facebookexperimental/MIRAI/branch/main/graph/badge.svg?token=q4jzL09Ahl)](https://codecov.io/gh/facebookexperimental/MIRAI) [![deps.rs](https://deps.rs/repo/github/facebookexperimental/MIRAI/status.svg)](https://deps.rs/repo/github/facebookexperimental/MIRAI)
MIRAI is an abstract interpreter for the [Rust](https://www.rust-lang.org/) compiler's [mid-level intermediate
representation](https://github.com/rust-lang/rfcs/blob/main/text/1211-mir.md) (MIR).
It is intended to become a widely used static analysis tool for Rust.

## Using MIRAI

You'll need to install MIRAI as described here for [MacOS and Windows](https://github.com/facebookexperimental/MIRAI/blob/main/documentation/InstallationGuide.md)
and here for [Linux](https://github.com/facebookexperimental/MIRAI/blob/main/documentation/Linux.md).

To run MIRAI, use cargo with `RUSTC_WRAPPER` set to `mirai`.
Use `rustup override set nightly-YYYY-MM-DD` to make Cargo use the same version of Rust as MIRAI. See the above installation
instruction to determine which version to use. If you forget to do that or use the wrong version,
you'll see an error message complaining about a dynamic load library not being found.

The easiest way to get started is to first build your project in the normal way (with one exception:
 set `RUSTFLAGS="-Z always_encode_mir"` to force the rust compiler to include MIR into its compiled output).
Refer to [this link](https://doc.rust-lang.org/1.30.0/book/2018-edition/ch01-00-getting-started.html) for details
on compiling a cargo project.
When there are no compile errors,
no lint errors and no test failures, you can proceed to the next step and run MIRAI. For example:
```
touch src/lib.rs
RUSTFLAGS="-Z always_encode_mir" RUSTC_WRAPPER=mirai cargo build
```

The touch command (which needs to reference a real file in your project) forces Cargo to re-run rustc and to not assume
that its cached error messages are still correct.

This will likely produce some warnings, which you can then fix by adding annotations declared in this
[crate](https://crates.io/crates/mirai-annotations). Keep re-touching and running cargo build as above until
there are no more warnings.

At this stage your code will be better documented and more readable. Perhaps you'll also have found and fixed a few bugs.

You can use the environment variable `MIRAI_FLAGS` to get cargo to provide command line options to MIRAI. The value is a
string which can contain any of the following flags:

- `--test_only`: instructs MIRAI to analyze only test methods in your crate. You must also provide the `--tests`
  option to the `cargo build` command to include those tests actually into your build.
- `--diag=default|verify|library|paranoid`: configures level of diagnostics. With `default` MIRAI
   will not report errors which are potential 'false positives'. With `verify` it will point out
   functions that may contain such errors. With `library` it will require explicit preconditions.
   With `paranoid` it will flag any issue that may be an error.
- `--single_func <name>`: the name of a specific function you want to analyze.
- `--body_analysis_timeout <seconds>`: the maximum number of seconds to spend analyzing a function body.
- `--call_graph_config <path_to_config>`: path to configuration file for call graph generator (see [Call Graph Generator documentation](documentation/CallGraph.md)). No call graph will be generated if this is not specified.
- `--`: any arguments after this marker are passed on to rustc.

You can get some insight into the inner workings of MIRAI by setting the verbosity level of log output to one of
`warn`, `info`, `debug`, or `trace`, via the environment variable `MIRAI_LOG`.

## Using MIRAI together with the Rust design by contracts crate

Support for MIRAI is available in the [design by contracts crate](https://gitlab.com/karroffel/contracts).
See the [shopping cart example](https://github.com/facebookexperimental/MIRAI/blob/main/examples/shopping_cart/src/main.rs) for usage.

## Developing MIRAI
See the [developer guide](https://github.com/facebookexperimental/MIRAI/blob/main/documentation//DeveloperGuide.md)
for instructions on how to build, run and debug MIRAI.

## Full documentation
* [Overview of project](https://github.com/facebookexperimental/MIRAI/blob/main/documentation/Overview.md).
* [Architecture](https://github.com/facebookexperimental/MIRAI/blob/main/documentation/Architecture.md).
* [Design discussions](https://github.com/facebookexperimental/MIRAI/blob/main/documentation/DesignDiscussions.md).
* [Further reading](https://github.com/facebookexperimental/MIRAI/blob/main/documentation/FurtherReading.md).

## Road map
* Stabilize MIRAI and get rid of crashing bugs.
* Summaries for intrinsics and standard library functions without MIR.

## Join the MIRAI community
<!-- * Website:
* Facebook page:
* Mailing list
* irc:  -->
See the [CONTRIBUTING](https://github.com/facebookexperimental/MIRAI/blob/main/CONTRIBUTING.md) file for how to help out.

## License
MIRAI is MIT licensed, as found in the [LICENSE](https://github.com/facebookexperimental/MIRAI/blob/main/LICENSE) file.

repository: steveyko/MIRAI

repo_name: steveyko/MIRAI


text:
# Spring Data Rest CRM
Little example project, a simple CRM developed with Spring Data Rest.

## Description
This example project takes a very simple CRM system with just two entities (Customer and Appointment) as
base to showcase some spring boot components. The usage is shown with the implementation of six user stories,
describt later.

The project is based on the latest release of [Spring Boot](https://projects.spring.io/spring-boot/) (1.4.1)
and uses [Spring Boot Data JPA](https://spring.io/guides/gs/accessing-data-jpa/) for data mapping.
The data is stored in the underlaying [H2](http://www.h2database.com/) in memory database.
On top of all that, [Spring Data Rest](http://projects.spring.io/spring-data-rest/) provide access
to the data via a REST frontend. For human access to the REST API the installed
[HAL browser](https://github.com/mikekelly/hal-browser) extends and visualizes the frontend as browser
application.

This implementation provides
[HATEOAS (Hypertext As The Engine Of Application State)](https://en.wikipedia.org/wiki/HATEOAS) the highest
level of maturity in the [Richardson Maturity Model](http://martinfowler.com/articles/richardsonMaturityModel.html).

## Lessons learned
### Backend
The backend implementation is super easy, no boilerplate code, just an interface for the repository. The
trickiest part are special queries!

### Client
The client code was more difficult! There is only few documentation for
[Spring Traverson](http://docs.spring.io/autorepo/docs/spring-hateoas/0.20.x/reference/html/#client), which
can be used to navigate in and read from the REST API. After some learning this client is very powerful.

To create, update or delete one has to work with another tool, like in the test cases with the Spring
TestRestTemplate in a normal client you can probably use the Spring RestTemplate. In some cases you can hand
in object you want to save, in others you have to send a map with the fields. That handling is not very
intuitive!

It's sad there isn't a simple client that provides CRUD functionality and can work with the HATEOAS
structure, yet.

## Run
You can start the CRM with the following command:
```shell
mvn clean spring-boot:run
```
Wait a view seconds and you will see an output like
```
....Started CrmApplication in 15.368 seconds (JVM running for 25.137)
```

Now you can point your browser to [http://localhost:8080/](http://localhost:8080/) and surf the rest
endpoints via the integrated [HAL browser](https://github.com/mikekelly/hal-browser).

## User Stories
Some user story example implementations can be found in the tests folder (*src/test/java*)
under the package *net.troja.application*:
* UserStory1Test - as an audiologist I want to create my customers
* UserStory2Test - as an audiologist I want to create appointments with a customer
* UserStory3Test - as an audiologist I want to create appointments with a customer
* UserStory4Test - as an audiologist I want to see an overview of the next week’s appointments
* UserStory5Test - as a customer I want to see my next appointment
* UserStory6Test - as a customer I want to rate my last appointment

## Tests
To run the tests, execute the following command:
```shell
mvn clean test
```

repository: suhaib-askar/spring-data-rest-crm

repo_name: suhaib-askar/spring-data-rest-crm


text:
# pokedex
Want to know more about your favorite Pokemon? This Pokedex's robust database displays your favorite pokemon's bio, attack power and evolution forms!

Utilizes Pokemon RESTful API, Collection Views as well as AVAudioPlayer.

![simulator screen shot oct 14 2016 1 21 49 pm](https://cloud.githubusercontent.com/assets/21269767/19396496/5c9ed8dc-9211-11e6-9b4e-ece57681a882.png)
![simulator screen shot oct 14 2016 1 22 43 pm](https://cloud.githubusercontent.com/assets/21269767/19396499/5df1a2c8-9211-11e6-9fc9-88bc31295062.png)

## Licensing
* Pokedex is licensed under [the MIT License](https://github.com/duliodenis/pokedex/blob/master/LICENSE)

repository: Shenrobi/pokedex

repo_name: Shenrobi/pokedex