commit stringlengths 40 40 | old_file stringlengths 4 237 | new_file stringlengths 4 237 | old_contents stringlengths 1 4.24k | new_contents stringlengths 5 4.84k | subject stringlengths 15 778 | message stringlengths 16 6.86k | lang stringlengths 1 30 | license stringclasses 13 values | repos stringlengths 5 116k | config stringlengths 1 30 | content stringlengths 105 8.72k |
|---|---|---|---|---|---|---|---|---|---|---|---|
adacbd2f35d25b82ace8c0c1c007b3c2a981c9a3 | src/threads/part4/AtomicCounter.cpp | src/threads/part4/AtomicCounter.cpp |
struct AtomicCounter {
std::atomic<int> value;
void increment(){
++value;
}
void decrement(){
--value;
}
int get(){
return value.load();
}
};
int main(){
AtomicCounter counter;
std::vector<std::thread> threads;
for(int i = 0; i < 10; ++i){
threads.push_back(std::thread([&counter](){
for(int i = 0; i < 500; ++i){
counter.increment();
}
}));
}
for(auto& thread : threads){
thread.join();
}
std::cout << counter.get() << std::endl;
return 0;
}
|
struct AtomicCounter {
std::atomic<int> value;
AtomicCounter() : value(0) {}
void increment(){
++value;
}
void decrement(){
--value;
}
int get(){
return value.load();
}
};
int main(){
AtomicCounter counter;
std::vector<std::thread> threads;
for(int i = 0; i < 10; ++i){
threads.push_back(std::thread([&counter](){
for(int i = 0; i < 500; ++i){
counter.increment();
}
}));
}
for(auto& thread : threads){
thread.join();
}
std::cout << counter.get() << std::endl;
return 0;
}
| Make sure std::atomic is initialized correctly | Make sure std::atomic is initialized correctly
G++ seems to have some issues with default initialization of
std::atomic
| C++ | mit | wichtounet/articles,HankFaan/articles | c++ | ## Code Before:
struct AtomicCounter {
std::atomic<int> value;
void increment(){
++value;
}
void decrement(){
--value;
}
int get(){
return value.load();
}
};
int main(){
AtomicCounter counter;
std::vector<std::thread> threads;
for(int i = 0; i < 10; ++i){
threads.push_back(std::thread([&counter](){
for(int i = 0; i < 500; ++i){
counter.increment();
}
}));
}
for(auto& thread : threads){
thread.join();
}
std::cout << counter.get() << std::endl;
return 0;
}
## Instruction:
Make sure std::atomic is initialized correctly
G++ seems to have some issues with default initialization of
std::atomic
## Code After:
struct AtomicCounter {
std::atomic<int> value;
AtomicCounter() : value(0) {}
void increment(){
++value;
}
void decrement(){
--value;
}
int get(){
return value.load();
}
};
int main(){
AtomicCounter counter;
std::vector<std::thread> threads;
for(int i = 0; i < 10; ++i){
threads.push_back(std::thread([&counter](){
for(int i = 0; i < 500; ++i){
counter.increment();
}
}));
}
for(auto& thread : threads){
thread.join();
}
std::cout << counter.get() << std::endl;
return 0;
}
|
77cbfef9dbba761ce90abd3f95b4354787d2040a | README.md | README.md |
Basic principle:
Imagine RxJava has version `x.y.z` — RxJavaProGuardRules version will be `x.y.z.n` where `n` is minor patch version of ProGuard rules for the concrete version of RxJava!
Example: RxJava `1.0.14`, RxJavaProGuardRules `1.0.14.0`. Easy breezy :)
------------
####Download
Latest release: `compile com.artemzin.rxjava:proguard-rules:1.0.14.0`
You can find all releases on [Maven Central](http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22com.artemzin.rxjava%22%20AND%20a%3A%22proguard-rules%22).
You can find [file with ProGuard rules here](rxjava-proguard-rules/proguard-rules.txt).
------------
Contact me: https://twitter.com/artem_zin
|
Versioning principle:
Imagine RxJava has version `x.y.z` — RxJavaProGuardRules version will be `x.y.z.n` where `n` is minor patch version of ProGuard rules for the concrete version of RxJava!
Example: RxJava `1.0.14`, RxJavaProGuardRules `1.0.14.0`. Easy breezy :)
------------
####Download
```groovy
compile 'io.reactivex:rxjava:1.0.14'
compile 'com.artemzin.rxjava:proguard-rules:1.0.14.0'
```
You can find all releases on [Maven Central](http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22com.artemzin.rxjava%22%20AND%20a%3A%22proguard-rules%22), and here is [the file with ProGuard rules](rxjava-proguard-rules/proguard-rules.txt).
------------
https://twitter.com/artem_zin
| Improve Download section in the readme again! | Improve Download section in the readme again! | Markdown | apache-2.0 | artem-zinnatullin/RxJavaProGuardRules | markdown | ## Code Before:
Basic principle:
Imagine RxJava has version `x.y.z` — RxJavaProGuardRules version will be `x.y.z.n` where `n` is minor patch version of ProGuard rules for the concrete version of RxJava!
Example: RxJava `1.0.14`, RxJavaProGuardRules `1.0.14.0`. Easy breezy :)
------------
####Download
Latest release: `compile com.artemzin.rxjava:proguard-rules:1.0.14.0`
You can find all releases on [Maven Central](http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22com.artemzin.rxjava%22%20AND%20a%3A%22proguard-rules%22).
You can find [file with ProGuard rules here](rxjava-proguard-rules/proguard-rules.txt).
------------
Contact me: https://twitter.com/artem_zin
## Instruction:
Improve Download section in the readme again!
## Code After:
Versioning principle:
Imagine RxJava has version `x.y.z` — RxJavaProGuardRules version will be `x.y.z.n` where `n` is minor patch version of ProGuard rules for the concrete version of RxJava!
Example: RxJava `1.0.14`, RxJavaProGuardRules `1.0.14.0`. Easy breezy :)
------------
####Download
```groovy
compile 'io.reactivex:rxjava:1.0.14'
compile 'com.artemzin.rxjava:proguard-rules:1.0.14.0'
```
You can find all releases on [Maven Central](http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22com.artemzin.rxjava%22%20AND%20a%3A%22proguard-rules%22), and here is [the file with ProGuard rules](rxjava-proguard-rules/proguard-rules.txt).
------------
https://twitter.com/artem_zin
|
9d7bb0ae1c73c35a9150c84789b442b3a2ccdca8 | apps/home/templates/index.jade | apps/home/templates/index.jade | extends ../../../components/layout/layouts/blank
block container
include ../../../components/logged_out_nav/templates/header
.Home.js-home
section.HomeSection.HomeHero.js-section
include ./sections/hero
section.HomeSection.js-section.js-fold
include ./sections/platform_for_organizing
section.HomeSection.js-section
include ./sections/connect_ideas
section.HomeSection.js-section
include ./sections/explore_and_collaborate
section.HomeSection.js-section
include ./sections/get_started
include ../../../components/logged_out_nav/templates/footer
block scripts
script( src= asset('/assets/home.js') )
| extends ../../../components/layout/layouts/blank
block meta
script( type="application/ld+json" ).
{
"@context": "http://schema.org",
"@type": "WebSite",
"url": "https://www.are.na/",
"potentialAction": {
"@type": "SearchAction",
"target": "https://www.are.na/search/{search_term_string}",
"query-input": "required name=search_term_string"
}
}
block container
include ../../../components/logged_out_nav/templates/header
.Home.js-home
section.HomeSection.HomeHero.js-section
include ./sections/hero
section.HomeSection.js-section.js-fold
include ./sections/platform_for_organizing
section.HomeSection.js-section
include ./sections/connect_ideas
section.HomeSection.js-section
include ./sections/explore_and_collaborate
section.HomeSection.js-section
include ./sections/get_started
include ../../../components/logged_out_nav/templates/footer
block scripts
script( src= asset('/assets/home.js') )
| Add search box structured data | Add search box structured data
| Jade | mit | aredotna/ervell,aredotna/ervell,aredotna/ervell,aredotna/ervell,aredotna/ervell | jade | ## Code Before:
extends ../../../components/layout/layouts/blank
block container
include ../../../components/logged_out_nav/templates/header
.Home.js-home
section.HomeSection.HomeHero.js-section
include ./sections/hero
section.HomeSection.js-section.js-fold
include ./sections/platform_for_organizing
section.HomeSection.js-section
include ./sections/connect_ideas
section.HomeSection.js-section
include ./sections/explore_and_collaborate
section.HomeSection.js-section
include ./sections/get_started
include ../../../components/logged_out_nav/templates/footer
block scripts
script( src= asset('/assets/home.js') )
## Instruction:
Add search box structured data
## Code After:
extends ../../../components/layout/layouts/blank
block meta
script( type="application/ld+json" ).
{
"@context": "http://schema.org",
"@type": "WebSite",
"url": "https://www.are.na/",
"potentialAction": {
"@type": "SearchAction",
"target": "https://www.are.na/search/{search_term_string}",
"query-input": "required name=search_term_string"
}
}
block container
include ../../../components/logged_out_nav/templates/header
.Home.js-home
section.HomeSection.HomeHero.js-section
include ./sections/hero
section.HomeSection.js-section.js-fold
include ./sections/platform_for_organizing
section.HomeSection.js-section
include ./sections/connect_ideas
section.HomeSection.js-section
include ./sections/explore_and_collaborate
section.HomeSection.js-section
include ./sections/get_started
include ../../../components/logged_out_nav/templates/footer
block scripts
script( src= asset('/assets/home.js') )
|
f36a1bb6c9229615d1cc498c02fb7df066e7cd1c | app/main/views/_templates.py | app/main/views/_templates.py | templates = [
{
'type': 'sms',
'name': 'Confirmation',
'body': 'Lasting power of attorney: We’ve received your application. Applications take between 8 and 10 weeks to process.' # noqa
},
{
'type': 'sms',
'name': 'Reminder',
'body': 'Vehicle tax: Your vehicle tax for ((registration number)) expires on ((date)). Tax your vehicle at www.gov.uk/vehicle-tax' # noqa
},
{
'type': 'sms',
'name': 'Warning',
'body': 'Vehicle tax: Your vehicle tax for ((registration number)) has expired. Tax your vehicle at www.gov.uk/vehicle-tax' # noqa
},
{
'type': 'email',
'name': 'Application alert 06/2016',
'subject': 'Your lasting power of attorney application',
'body': """Dear ((name)),
When you’ve made your lasting power of attorney (LPA), you need to register it \
with the Office of the Public Guardian (OPG).
You can apply to register your LPA yourself if you’re able to make your own decisions.
Your attorney can also register it for you. You’ll be told if they do and you can \
object to the registration.
It takes between 8 and 10 weeks to register an LPA if there are no mistakes in the application.
"""
},
{
'type': 'sms',
'name': 'Air quality alert',
'body': 'Air pollution levels will be ((level)) in ((region)) tomorrow.'
},
]
| templates = [
{
'type': 'sms',
'name': 'Confirmation with details Jan 2016',
'body': '((name)), we’ve received your ((thing)). We’ll contact you again within 1 week.'
},
{
'type': 'sms',
'name': 'Confirmation Jan 2016',
'body': 'We’ve received your payment. We’ll contact you again within 1 week.'
}
]
| Make SMS templates plausible for hack day | Make SMS templates plausible for hack day
This commit replaces the previous SMS templates.
I’ve written a couple of new ones which are plausible for developers on the
hack day:
- one with placeholders
- one without
| Python | mit | alphagov/notifications-admin,gov-cjwaszczuk/notifications-admin,alphagov/notifications-admin,gov-cjwaszczuk/notifications-admin,alphagov/notifications-admin,gov-cjwaszczuk/notifications-admin,gov-cjwaszczuk/notifications-admin,alphagov/notifications-admin | python | ## Code Before:
templates = [
{
'type': 'sms',
'name': 'Confirmation',
'body': 'Lasting power of attorney: We’ve received your application. Applications take between 8 and 10 weeks to process.' # noqa
},
{
'type': 'sms',
'name': 'Reminder',
'body': 'Vehicle tax: Your vehicle tax for ((registration number)) expires on ((date)). Tax your vehicle at www.gov.uk/vehicle-tax' # noqa
},
{
'type': 'sms',
'name': 'Warning',
'body': 'Vehicle tax: Your vehicle tax for ((registration number)) has expired. Tax your vehicle at www.gov.uk/vehicle-tax' # noqa
},
{
'type': 'email',
'name': 'Application alert 06/2016',
'subject': 'Your lasting power of attorney application',
'body': """Dear ((name)),
When you’ve made your lasting power of attorney (LPA), you need to register it \
with the Office of the Public Guardian (OPG).
You can apply to register your LPA yourself if you’re able to make your own decisions.
Your attorney can also register it for you. You’ll be told if they do and you can \
object to the registration.
It takes between 8 and 10 weeks to register an LPA if there are no mistakes in the application.
"""
},
{
'type': 'sms',
'name': 'Air quality alert',
'body': 'Air pollution levels will be ((level)) in ((region)) tomorrow.'
},
]
## Instruction:
Make SMS templates plausible for hack day
This commit replaces the previous SMS templates.
I’ve written a couple of new ones which are plausible for developers on the
hack day:
- one with placeholders
- one without
## Code After:
templates = [
{
'type': 'sms',
'name': 'Confirmation with details Jan 2016',
'body': '((name)), we’ve received your ((thing)). We’ll contact you again within 1 week.'
},
{
'type': 'sms',
'name': 'Confirmation Jan 2016',
'body': 'We’ve received your payment. We’ll contact you again within 1 week.'
}
]
|
b7bf71f5c3e9165097dbd111d0fb88cafa48a780 | test.Dockerfile | test.Dockerfile | FROM ubuntu:16.04
ENV LC_ALL=C.UTF-8
ENV LANG=C.UTF-8
ENV NPM_CONFIG_LOGLEVEL warn
RUN apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
build-essential \
curl \
ca-certificates \
shellcheck \
libffi-dev \
python \
python-dev \
python-pip \
python-pkg-resources \
python3 \
python3-dev \
python3-setuptools \
python3-pip \
python3-pkg-resources \
git \
libssl-dev \
openssh-client \
&& pip3 install -U pip tox
RUN curl -sL https://deb.nodesource.com/setup_6.x | bash - \
&& apt-get install -y nodejs \
&& npm install -g \
jscs eslint csslint sass-lint jsonlint stylelint \
eslint-plugin-react eslint-plugin-react-native \
babel-eslint \
&& rm -rf /var/lib/apt/list/* /tmp/* /var/tmp/*
| FROM ubuntu:16.04
ENV LC_ALL=C.UTF-8
ENV LANG=C.UTF-8
ENV NPM_CONFIG_LOGLEVEL warn
RUN echo 'deb http://ppa.launchpad.net/fkrull/deadsnakes/ubuntu xenial main' > /etc/apt/sources.list.d/fkrull-ubuntu-deadsnakes-xenial.list \
&& apt-key adv --keyserver keyserver.ubuntu.com --recv-keys DB82666C \
&& curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | bash \
&& apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
build-essential \
curl \
ca-certificates \
shellcheck \
libffi-dev \
python \
python-dev \
python-pip \
python-pkg-resources \
python3 \
python3-dev \
python3-setuptools \
python3-pip \
python3-pkg-resources \
python3.6 \
python3.6-dev \
git \
git-lfs \
libssl-dev \
openssh-client \
&& pip3 install -U pip tox
RUN curl -sL https://deb.nodesource.com/setup_6.x | bash - \
&& apt-get install -y nodejs \
&& npm install -g \
jscs eslint csslint sass-lint jsonlint stylelint \
eslint-plugin-react eslint-plugin-react-native \
babel-eslint \
&& rm -rf /var/lib/apt/list/* /tmp/* /var/tmp/*
| Install Python3.6 and git-lfs in CI. | Install Python3.6 and git-lfs in CI.
| unknown | mit | bosondata/badwolf,bosondata/badwolf,bosondata/badwolf | unknown | ## Code Before:
FROM ubuntu:16.04
ENV LC_ALL=C.UTF-8
ENV LANG=C.UTF-8
ENV NPM_CONFIG_LOGLEVEL warn
RUN apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
build-essential \
curl \
ca-certificates \
shellcheck \
libffi-dev \
python \
python-dev \
python-pip \
python-pkg-resources \
python3 \
python3-dev \
python3-setuptools \
python3-pip \
python3-pkg-resources \
git \
libssl-dev \
openssh-client \
&& pip3 install -U pip tox
RUN curl -sL https://deb.nodesource.com/setup_6.x | bash - \
&& apt-get install -y nodejs \
&& npm install -g \
jscs eslint csslint sass-lint jsonlint stylelint \
eslint-plugin-react eslint-plugin-react-native \
babel-eslint \
&& rm -rf /var/lib/apt/list/* /tmp/* /var/tmp/*
## Instruction:
Install Python3.6 and git-lfs in CI.
## Code After:
FROM ubuntu:16.04
ENV LC_ALL=C.UTF-8
ENV LANG=C.UTF-8
ENV NPM_CONFIG_LOGLEVEL warn
RUN echo 'deb http://ppa.launchpad.net/fkrull/deadsnakes/ubuntu xenial main' > /etc/apt/sources.list.d/fkrull-ubuntu-deadsnakes-xenial.list \
&& apt-key adv --keyserver keyserver.ubuntu.com --recv-keys DB82666C \
&& curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | bash \
&& apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
build-essential \
curl \
ca-certificates \
shellcheck \
libffi-dev \
python \
python-dev \
python-pip \
python-pkg-resources \
python3 \
python3-dev \
python3-setuptools \
python3-pip \
python3-pkg-resources \
python3.6 \
python3.6-dev \
git \
git-lfs \
libssl-dev \
openssh-client \
&& pip3 install -U pip tox
RUN curl -sL https://deb.nodesource.com/setup_6.x | bash - \
&& apt-get install -y nodejs \
&& npm install -g \
jscs eslint csslint sass-lint jsonlint stylelint \
eslint-plugin-react eslint-plugin-react-native \
babel-eslint \
&& rm -rf /var/lib/apt/list/* /tmp/* /var/tmp/*
|
22d5c7e3baccf7683153252c10f7850f901e826d | README.md | README.md |
The pelican-hyde is a [Pelican](https://github.com/getpelican) theme inspired on the beautiful [Hyde](http://hyde.getpoole.com/) Jekyll theme
You can see a live demo [here](http://jvanz.github.io/)

Pull requests are welcome
|
The pelican-hyde is a [Pelican](https://github.com/getpelican) theme inspired on the beautiful [Hyde](http://hyde.getpoole.com/) Jekyll theme
You can see a live demo [here](https://blog.inndy.tw/)

Pull requests are welcome
| Update demo URL to my blog | Update demo URL to my blog
| Markdown | mit | Inndy/pelican-hyde | markdown | ## Code Before:
The pelican-hyde is a [Pelican](https://github.com/getpelican) theme inspired on the beautiful [Hyde](http://hyde.getpoole.com/) Jekyll theme
You can see a live demo [here](http://jvanz.github.io/)

Pull requests are welcome
## Instruction:
Update demo URL to my blog
## Code After:
The pelican-hyde is a [Pelican](https://github.com/getpelican) theme inspired on the beautiful [Hyde](http://hyde.getpoole.com/) Jekyll theme
You can see a live demo [here](https://blog.inndy.tw/)

Pull requests are welcome
|
577d5569807a7cbbb1ce23fbc226d4d02ca747c2 | src/browser/logger.js | src/browser/logger.js | import * as sqlectron from 'sqlectron-core';
import config from './config';
// Hack solution to ignore console.error from dtrace imported by bunyan
/* eslint no-console:0 */
const realConsoleError = console.error;
console.error = () => {};
const { createLogger } = require('bunyan');
console.error = realConsoleError;
const dataConfig = config.get();
const loggerConfig = {
app: 'sqlectron-gui',
name: 'sqlectron-gui',
level: dataConfig.log.level,
};
if (dataConfig.log.file) {
loggerConfig.streams = [{ path: dataConfig.log.path }];
}
const logger = createLogger(loggerConfig);
// Set custom logger for sqlectron-core
sqlectron.setLogger((namespace) => logger.child({ namespace: `sqlectron-core:${namespace}` }));
export default (namespace) => logger.child({ namespace });
| import * as sqlectron from 'sqlectron-core';
import config from './config';
// Hack solution to ignore console.error from dtrace imported by bunyan
/* eslint no-console:0 */
const realConsoleError = console.error;
console.error = () => {};
const { createLogger } = require('bunyan');
console.error = realConsoleError;
const dataConfig = config.get();
const loggerConfig = {
app: 'sqlectron-gui',
name: 'sqlectron-gui',
level: dataConfig.log.level,
streams: [],
};
if (dataConfig.log.console) {
loggerConfig.streams.push({ stream: process.stdout });
}
if (dataConfig.log.file) {
loggerConfig.streams.push({ path: dataConfig.log.path });
}
const logger = createLogger(loggerConfig);
// Set custom logger for sqlectron-core
sqlectron.setLogger((namespace) => logger.child({ namespace: `sqlectron-core:${namespace}` }));
export default (namespace) => logger.child({ namespace });
| Fix log to allow use console and file at same time | Fix log to allow use console and file at same time
| JavaScript | mit | sqlectron/sqlectron-gui,sqlectron/sqlectron-gui,sqlectron/sqlectron-gui,sqlectron/sqlectron-gui | javascript | ## Code Before:
import * as sqlectron from 'sqlectron-core';
import config from './config';
// Hack solution to ignore console.error from dtrace imported by bunyan
/* eslint no-console:0 */
const realConsoleError = console.error;
console.error = () => {};
const { createLogger } = require('bunyan');
console.error = realConsoleError;
const dataConfig = config.get();
const loggerConfig = {
app: 'sqlectron-gui',
name: 'sqlectron-gui',
level: dataConfig.log.level,
};
if (dataConfig.log.file) {
loggerConfig.streams = [{ path: dataConfig.log.path }];
}
const logger = createLogger(loggerConfig);
// Set custom logger for sqlectron-core
sqlectron.setLogger((namespace) => logger.child({ namespace: `sqlectron-core:${namespace}` }));
export default (namespace) => logger.child({ namespace });
## Instruction:
Fix log to allow use console and file at same time
## Code After:
import * as sqlectron from 'sqlectron-core';
import config from './config';
// Hack solution to ignore console.error from dtrace imported by bunyan
/* eslint no-console:0 */
const realConsoleError = console.error;
console.error = () => {};
const { createLogger } = require('bunyan');
console.error = realConsoleError;
const dataConfig = config.get();
const loggerConfig = {
app: 'sqlectron-gui',
name: 'sqlectron-gui',
level: dataConfig.log.level,
streams: [],
};
if (dataConfig.log.console) {
loggerConfig.streams.push({ stream: process.stdout });
}
if (dataConfig.log.file) {
loggerConfig.streams.push({ path: dataConfig.log.path });
}
const logger = createLogger(loggerConfig);
// Set custom logger for sqlectron-core
sqlectron.setLogger((namespace) => logger.child({ namespace: `sqlectron-core:${namespace}` }));
export default (namespace) => logger.child({ namespace });
|
09c9aaf33523613db7ba763fec0a62d12d0d9807 | composer.json | composer.json | {
"name": "moxie-leean/wp-endpoints-post",
"description": "Generic but customisable post endpoint to expose post content via WP-API",
"keywords": ["wordpress", "api"],
"homepage": "https://github.com/moxie-leean/wp-endpoints-post",
"type": "library",
"license": "MIT",
"authors": [
{
"name": "Adam Fenton",
"email": "devs@getmoxied.net"
}
],
"require": {
"php": ">=5.4",
"moxie-leean/wp-acf": "dev-master"
},
"autoload": {
"psr-4": {
"Leean\\Endpoints\\": "src/"
}
},
"require-dev": {
"squizlabs/php_codesniffer": "2.*",
"wp-coding-standards/wpcs": "dev-master"
},
"scripts": {
"installSniffer": [
"./vendor/bin/phpcs --config-set installed_paths vendor/wp-coding-standards/wpcs/",
"./vendor/bin/phpcs --config-set default_standard ./codesniffer.ruleset.xml",
"./vendor/bin/phpcs --config-set show_progress 0",
"./vendor/bin/phpcs --config-set colors 1"
],
"post-install-cmd": [ "@installSnifferj" ],
"post-update-cmd": [ "@installSniffer" ],
"ci": [
"phpcs src/*.php src/**/*.php"
]
}
}
| {
"name": "moxie-leean/wp-endpoints-post",
"description": "Generic but customisable post endpoint to expose post content via WP-API",
"keywords": ["wordpress", "api"],
"homepage": "https://github.com/moxie-leean/wp-endpoints-post",
"type": "library",
"license": "MIT",
"authors": [
{
"name": "Adam Fenton",
"email": "devs@getmoxied.net"
}
],
"require": {
"php": ">=5.4",
"moxie-leean/wp-acf": "dev-master"
},
"autoload": {
"psr-4": {
"Leean\\Endpoints\\": "src/"
}
},
"require-dev": {
"squizlabs/php_codesniffer": "2.*",
"wp-coding-standards/wpcs": "0.9.9"
},
"scripts": {
"installSniffer": [
"./vendor/bin/phpcs --config-set installed_paths vendor/wp-coding-standards/wpcs/",
"./vendor/bin/phpcs --config-set default_standard ./codesniffer.ruleset.xml",
"./vendor/bin/phpcs --config-set show_progress 0",
"./vendor/bin/phpcs --config-set colors 1"
],
"post-install-cmd": [ "@installSniffer" ],
"post-update-cmd": [ "@installSniffer" ],
"ci": [
"phpcs src/*.php src/**/*.php"
]
}
}
| Fix typos and lock dependencies | Fix typos and lock dependencies
| JSON | mit | moxie-leean/wp-endpoints-view | json | ## Code Before:
{
"name": "moxie-leean/wp-endpoints-post",
"description": "Generic but customisable post endpoint to expose post content via WP-API",
"keywords": ["wordpress", "api"],
"homepage": "https://github.com/moxie-leean/wp-endpoints-post",
"type": "library",
"license": "MIT",
"authors": [
{
"name": "Adam Fenton",
"email": "devs@getmoxied.net"
}
],
"require": {
"php": ">=5.4",
"moxie-leean/wp-acf": "dev-master"
},
"autoload": {
"psr-4": {
"Leean\\Endpoints\\": "src/"
}
},
"require-dev": {
"squizlabs/php_codesniffer": "2.*",
"wp-coding-standards/wpcs": "dev-master"
},
"scripts": {
"installSniffer": [
"./vendor/bin/phpcs --config-set installed_paths vendor/wp-coding-standards/wpcs/",
"./vendor/bin/phpcs --config-set default_standard ./codesniffer.ruleset.xml",
"./vendor/bin/phpcs --config-set show_progress 0",
"./vendor/bin/phpcs --config-set colors 1"
],
"post-install-cmd": [ "@installSnifferj" ],
"post-update-cmd": [ "@installSniffer" ],
"ci": [
"phpcs src/*.php src/**/*.php"
]
}
}
## Instruction:
Fix typos and lock dependencies
## Code After:
{
"name": "moxie-leean/wp-endpoints-post",
"description": "Generic but customisable post endpoint to expose post content via WP-API",
"keywords": ["wordpress", "api"],
"homepage": "https://github.com/moxie-leean/wp-endpoints-post",
"type": "library",
"license": "MIT",
"authors": [
{
"name": "Adam Fenton",
"email": "devs@getmoxied.net"
}
],
"require": {
"php": ">=5.4",
"moxie-leean/wp-acf": "dev-master"
},
"autoload": {
"psr-4": {
"Leean\\Endpoints\\": "src/"
}
},
"require-dev": {
"squizlabs/php_codesniffer": "2.*",
"wp-coding-standards/wpcs": "0.9.9"
},
"scripts": {
"installSniffer": [
"./vendor/bin/phpcs --config-set installed_paths vendor/wp-coding-standards/wpcs/",
"./vendor/bin/phpcs --config-set default_standard ./codesniffer.ruleset.xml",
"./vendor/bin/phpcs --config-set show_progress 0",
"./vendor/bin/phpcs --config-set colors 1"
],
"post-install-cmd": [ "@installSniffer" ],
"post-update-cmd": [ "@installSniffer" ],
"ci": [
"phpcs src/*.php src/**/*.php"
]
}
}
|
c713d163c0fb324ed0f22328e155cc796f9441dd | pkgs/tools/package-management/opkg/default.nix | pkgs/tools/package-management/opkg/default.nix | {stdenv, fetchurl, pkgconfig, curl, gpgme}:
stdenv.mkDerivation {
name = "opkg-0.1.8";
src = fetchurl {
url = http://opkg.googlecode.com/files/opkg-0.1.8.tar.gz;
sha256 = "0q0w7hmc6zk7pnddamd5v8d76qnh3043lzh5np24jbb6plqbz57z";
};
buildInputs = [ pkgconfig curl gpgme ];
}
| { stdenv, fetchurl, pkgconfig, curl, gpgme }:
stdenv.mkDerivation rec {
version = "0.2.2";
name = "opkg-${version}";
src = fetchurl {
url = "http://downloads.yoctoproject.org/releases/opkg/opkg-${version}.tar.gz";
sha256 = "0ax10crp2grrpl20gl5iqfw37d5qz6h790lyyv2ali45agklqmda";
};
buildInputs = [ pkgconfig curl gpgme ];
meta = with stdenv.lib; {
description = "A lightweight package management system based upon ipkg";
homepage = http://code.google.com/p/opkg/;
license = licenses.gpl2;
platforms = platforms.linux;
maintainers = with maintainers; [ pSub ];
};
}
| Update opkg to latest version, adpot it and add meta-information. | Update opkg to latest version, adpot it and add meta-information.
| Nix | mit | triton/triton,SymbiFlow/nixpkgs,triton/triton,NixOS/nixpkgs,SymbiFlow/nixpkgs,SymbiFlow/nixpkgs,SymbiFlow/nixpkgs,SymbiFlow/nixpkgs,triton/triton,triton/triton,NixOS/nixpkgs,triton/triton,NixOS/nixpkgs,NixOS/nixpkgs,NixOS/nixpkgs,NixOS/nixpkgs,SymbiFlow/nixpkgs,triton/triton,NixOS/nixpkgs,SymbiFlow/nixpkgs,NixOS/nixpkgs,triton/triton,NixOS/nixpkgs,SymbiFlow/nixpkgs,SymbiFlow/nixpkgs,SymbiFlow/nixpkgs,NixOS/nixpkgs,SymbiFlow/nixpkgs,SymbiFlow/nixpkgs,NixOS/nixpkgs,NixOS/nixpkgs,NixOS/nixpkgs,NixOS/nixpkgs,triton/triton,SymbiFlow/nixpkgs,NixOS/nixpkgs | nix | ## Code Before:
{stdenv, fetchurl, pkgconfig, curl, gpgme}:
stdenv.mkDerivation {
name = "opkg-0.1.8";
src = fetchurl {
url = http://opkg.googlecode.com/files/opkg-0.1.8.tar.gz;
sha256 = "0q0w7hmc6zk7pnddamd5v8d76qnh3043lzh5np24jbb6plqbz57z";
};
buildInputs = [ pkgconfig curl gpgme ];
}
## Instruction:
Update opkg to latest version, adpot it and add meta-information.
## Code After:
{ stdenv, fetchurl, pkgconfig, curl, gpgme }:
stdenv.mkDerivation rec {
version = "0.2.2";
name = "opkg-${version}";
src = fetchurl {
url = "http://downloads.yoctoproject.org/releases/opkg/opkg-${version}.tar.gz";
sha256 = "0ax10crp2grrpl20gl5iqfw37d5qz6h790lyyv2ali45agklqmda";
};
buildInputs = [ pkgconfig curl gpgme ];
meta = with stdenv.lib; {
description = "A lightweight package management system based upon ipkg";
homepage = http://code.google.com/p/opkg/;
license = licenses.gpl2;
platforms = platforms.linux;
maintainers = with maintainers; [ pSub ];
};
}
|
b321c4a9298e8fabe6165896c46985803ab9b65a | modules/performanceplatform/files/check-directory-freshness.sh | modules/performanceplatform/files/check-directory-freshness.sh |
CHECK_DIRECTORY="$1"
if [ ! -d "${CHECK_DIRECTORY}" ]; then
echo "Not a valid directory: ${CHECK_DIRECTORY}"
exit 1
fi
files_found=$(find "${CHECK_DIRECTORY}" -mtime -1.125 -type f ! -empty)
if [ "${files_found}" = "" ]; then
echo "No new files found in ${CHECK_DIRECTORY}"
exit 1
fi
echo "New files found: ${files_found}"
exit 0
|
CHECK_DIRECTORY="$1"
if [ ! -d "${CHECK_DIRECTORY}" ]; then
echo "Error checking directory (doesn't exit): ${CHECK_DIRECTORY}"
exit 2
fi
files_found=$(find "${CHECK_DIRECTORY}" -mtime -1.125 -type f ! -empty)
if [ "${files_found}" = "" ]; then
echo "No new files found in ${CHECK_DIRECTORY}"
exit 2
fi
echo "OK, new files found: ${files_found}"
exit 0
| Make backup checks CRITICAL not WARNING | Make backup checks CRITICAL not WARNING
Also improve the message emitted when that happens.
| Shell | mit | alphagov/pp-puppet,alphagov/pp-puppet,alphagov/pp-puppet,alphagov/pp-puppet | shell | ## Code Before:
CHECK_DIRECTORY="$1"
if [ ! -d "${CHECK_DIRECTORY}" ]; then
echo "Not a valid directory: ${CHECK_DIRECTORY}"
exit 1
fi
files_found=$(find "${CHECK_DIRECTORY}" -mtime -1.125 -type f ! -empty)
if [ "${files_found}" = "" ]; then
echo "No new files found in ${CHECK_DIRECTORY}"
exit 1
fi
echo "New files found: ${files_found}"
exit 0
## Instruction:
Make backup checks CRITICAL not WARNING
Also improve the message emitted when that happens.
## Code After:
CHECK_DIRECTORY="$1"
if [ ! -d "${CHECK_DIRECTORY}" ]; then
echo "Error checking directory (doesn't exit): ${CHECK_DIRECTORY}"
exit 2
fi
files_found=$(find "${CHECK_DIRECTORY}" -mtime -1.125 -type f ! -empty)
if [ "${files_found}" = "" ]; then
echo "No new files found in ${CHECK_DIRECTORY}"
exit 2
fi
echo "OK, new files found: ${files_found}"
exit 0
|
da878925ae63d38d70997c7e6cead40a165b2d32 | test/yt/audit_test.rb | test/yt/audit_test.rb | require 'test_helper'
require 'yt/audit'
class Yt::AuditTest < Minitest::Test
def test_channel_audit
audit = Yt::Audit.new(channel_id: 'UCKM-eG7PBcw3flaBvd0q2TQ')
result = audit.run
assert_equal 'Info Cards', result[0].title
assert_equal 2, result[0].valid_count
assert_equal 4, result[0].total_count
assert_equal 'Brand Anchoring', result[1].title
assert_equal 2, result[1].valid_count
assert_equal 4, result[1].total_count
assert_equal 'Subscribe Annotations', result[2].title
assert_equal 2, result[2].valid_count
assert_equal 4, result[2].total_count
assert_equal 'YouTube Association', result[3].title
assert_equal 2, result[3].valid_count
assert_equal 4, result[3].total_count
assert_equal 'Possible End Card Annotations', result[4].title
assert_equal 1, result[4].valid_count
assert_equal 4, result[4].total_count
assert_equal 'Playlist Description', result[5].title
assert_equal 1, result[5].valid_count
assert_equal 2, result[5].total_count
end
def test_ring_channel_info_cards
audit = Yt::Audit.new(channel_id: 'UCSDG3M0e2mGX9_qtHEtzj2Q')
result = audit.run
assert_equal 'Info Cards', result[0].title
assert_equal 0, result[0].valid_count
assert_equal 10, result[0].total_count
end
end
| require 'test_helper'
require 'yt/audit'
class Yt::AuditTest < Minitest::Test
def test_channel_audit
audit = Yt::Audit.new(channel_id: 'UCKM-eG7PBcw3flaBvd0q2TQ')
result = audit.run
assert_equal 'Info Cards', result[0].title
assert_equal 2, result[0].valid_count
assert_equal 5, result[0].total_count
assert_equal 'Brand Anchoring', result[1].title
assert_equal 3, result[1].valid_count
assert_equal 5, result[1].total_count
assert_equal 'Subscribe Annotations', result[2].title
assert_equal 2, result[2].valid_count
assert_equal 5, result[2].total_count
assert_equal 'YouTube Association', result[3].title
assert_equal 2, result[3].valid_count
assert_equal 5, result[3].total_count
assert_equal 'Possible End Card Annotations', result[4].title
assert_equal 1, result[4].valid_count
assert_equal 5, result[4].total_count
assert_equal 'Playlist Description', result[5].title
assert_equal 1, result[5].valid_count
assert_equal 2, result[5].total_count
end
end
| Remove Ring channel test case (change custom sample channel) | Remove Ring channel test case (change custom sample channel)
It was Branding annotation subclassing Card annotation
on yt-annotation gem. Add Branding Card to our sample channel.
| Ruby | mit | Fullscreen/yt-audit,Fullscreen/yt-audit | ruby | ## Code Before:
require 'test_helper'
require 'yt/audit'
class Yt::AuditTest < Minitest::Test
def test_channel_audit
audit = Yt::Audit.new(channel_id: 'UCKM-eG7PBcw3flaBvd0q2TQ')
result = audit.run
assert_equal 'Info Cards', result[0].title
assert_equal 2, result[0].valid_count
assert_equal 4, result[0].total_count
assert_equal 'Brand Anchoring', result[1].title
assert_equal 2, result[1].valid_count
assert_equal 4, result[1].total_count
assert_equal 'Subscribe Annotations', result[2].title
assert_equal 2, result[2].valid_count
assert_equal 4, result[2].total_count
assert_equal 'YouTube Association', result[3].title
assert_equal 2, result[3].valid_count
assert_equal 4, result[3].total_count
assert_equal 'Possible End Card Annotations', result[4].title
assert_equal 1, result[4].valid_count
assert_equal 4, result[4].total_count
assert_equal 'Playlist Description', result[5].title
assert_equal 1, result[5].valid_count
assert_equal 2, result[5].total_count
end
def test_ring_channel_info_cards
audit = Yt::Audit.new(channel_id: 'UCSDG3M0e2mGX9_qtHEtzj2Q')
result = audit.run
assert_equal 'Info Cards', result[0].title
assert_equal 0, result[0].valid_count
assert_equal 10, result[0].total_count
end
end
## Instruction:
Remove Ring channel test case (change custom sample channel)
It was Branding annotation subclassing Card annotation
on yt-annotation gem. Add Branding Card to our sample channel.
## Code After:
require 'test_helper'
require 'yt/audit'
class Yt::AuditTest < Minitest::Test
def test_channel_audit
audit = Yt::Audit.new(channel_id: 'UCKM-eG7PBcw3flaBvd0q2TQ')
result = audit.run
assert_equal 'Info Cards', result[0].title
assert_equal 2, result[0].valid_count
assert_equal 5, result[0].total_count
assert_equal 'Brand Anchoring', result[1].title
assert_equal 3, result[1].valid_count
assert_equal 5, result[1].total_count
assert_equal 'Subscribe Annotations', result[2].title
assert_equal 2, result[2].valid_count
assert_equal 5, result[2].total_count
assert_equal 'YouTube Association', result[3].title
assert_equal 2, result[3].valid_count
assert_equal 5, result[3].total_count
assert_equal 'Possible End Card Annotations', result[4].title
assert_equal 1, result[4].valid_count
assert_equal 5, result[4].total_count
assert_equal 'Playlist Description', result[5].title
assert_equal 1, result[5].valid_count
assert_equal 2, result[5].total_count
end
end
|
b25451ded86bab0ed28424131e1a826b4479c69f | rules/core/constants.js | rules/core/constants.js | 'use strict';
const COMPOSITION_METHODS = ['compose', 'flow', 'flowRight', 'pipe'];
const FOREACH_METHODS = ['forEach', 'forEachRight', 'each', 'eachRight', 'forIn', 'forInRight', 'forOwn', 'forOwnRight'];
const SIDE_EFFECT_METHODS = FOREACH_METHODS.concat(['bindAll']);
module.exports = {
COMPOSITION_METHODS,
FOREACH_METHODS,
SIDE_EFFECT_METHODS
};
| 'use strict';
const COMPOSITION_METHODS = ['compose', 'flow', 'flowRight', 'pipe'];
const FOREACH_METHODS = ['forEach', 'forEachRight', 'each', 'eachRight', 'forIn', 'forInRight', 'forOwn', 'forOwnRight'];
const SIDE_EFFECT_METHODS = FOREACH_METHODS.concat(['bindAll', 'defer', 'delay']);
module.exports = {
COMPOSITION_METHODS,
FOREACH_METHODS,
SIDE_EFFECT_METHODS
};
| Add defer and delay as side-effect methods | Add defer and delay as side-effect methods
| JavaScript | mit | jfmengels/eslint-plugin-lodash-fp | javascript | ## Code Before:
'use strict';
const COMPOSITION_METHODS = ['compose', 'flow', 'flowRight', 'pipe'];
const FOREACH_METHODS = ['forEach', 'forEachRight', 'each', 'eachRight', 'forIn', 'forInRight', 'forOwn', 'forOwnRight'];
const SIDE_EFFECT_METHODS = FOREACH_METHODS.concat(['bindAll']);
module.exports = {
COMPOSITION_METHODS,
FOREACH_METHODS,
SIDE_EFFECT_METHODS
};
## Instruction:
Add defer and delay as side-effect methods
## Code After:
'use strict';
const COMPOSITION_METHODS = ['compose', 'flow', 'flowRight', 'pipe'];
const FOREACH_METHODS = ['forEach', 'forEachRight', 'each', 'eachRight', 'forIn', 'forInRight', 'forOwn', 'forOwnRight'];
const SIDE_EFFECT_METHODS = FOREACH_METHODS.concat(['bindAll', 'defer', 'delay']);
module.exports = {
COMPOSITION_METHODS,
FOREACH_METHODS,
SIDE_EFFECT_METHODS
};
|
7e0dbfe4f5984849089b682ffb9fd31727bb1a65 | gulpfile.js | gulpfile.js | var gulp = require('gulp');
var mocha = require('gulp-mocha');
var babel = require("gulp-babel");
var TESTS = 'test/*.js';
var REPORTER = 'dot';
gulp.task("default", ["babel"]);
gulp.task('test', function(){
return gulp.src(TESTS, {read: false})
.pipe(mocha({
slow: 500,
reporter: REPORTER,
bail: true
}))
.once('error', function(){
process.exit(1);
})
.once('end', function(){
process.exit();
});
});
// By default, individual js files are transformed by babel and exported to /dist
gulp.task("babel", function(){
return gulp.src(["lib/*.js","lib/transports/*.js"], { base: 'lib' })
.pipe(babel({ "presets": ["es2015"] }))
.pipe(gulp.dest("dist"));
});
| var gulp = require('gulp');
var mocha = require('gulp-mocha');
var babel = require("gulp-babel");
var TESTS = 'test/*.js';
var REPORTER = 'dot';
gulp.task("default", ["transpile"]);
gulp.task('test', function(){
return gulp.src(TESTS, {read: false})
.pipe(mocha({
slow: 500,
reporter: REPORTER,
bail: true
}))
.once('error', function(){
process.exit(1);
})
.once('end', function(){
process.exit();
});
});
// By default, individual js files are transformed by babel and exported to /dist
gulp.task("transpile", function(){
return gulp.src(["lib/*.js","lib/transports/*.js"], { base: 'lib' })
.pipe(babel({ "presets": ["es2015"] }))
.pipe(gulp.dest("dist"));
});
| Rename babel to transpile for consistency with socket.io repo | Rename babel to transpile for consistency with socket.io repo
| JavaScript | mit | nkzawa/engine.io,kapouer/engine.io,socketio/engine.io,socketio/engine.io | javascript | ## Code Before:
var gulp = require('gulp');
var mocha = require('gulp-mocha');
var babel = require("gulp-babel");
var TESTS = 'test/*.js';
var REPORTER = 'dot';
gulp.task("default", ["babel"]);
gulp.task('test', function(){
return gulp.src(TESTS, {read: false})
.pipe(mocha({
slow: 500,
reporter: REPORTER,
bail: true
}))
.once('error', function(){
process.exit(1);
})
.once('end', function(){
process.exit();
});
});
// By default, individual js files are transformed by babel and exported to /dist
gulp.task("babel", function(){
return gulp.src(["lib/*.js","lib/transports/*.js"], { base: 'lib' })
.pipe(babel({ "presets": ["es2015"] }))
.pipe(gulp.dest("dist"));
});
## Instruction:
Rename babel to transpile for consistency with socket.io repo
## Code After:
var gulp = require('gulp');
var mocha = require('gulp-mocha');
var babel = require("gulp-babel");
var TESTS = 'test/*.js';
var REPORTER = 'dot';
gulp.task("default", ["transpile"]);
gulp.task('test', function(){
return gulp.src(TESTS, {read: false})
.pipe(mocha({
slow: 500,
reporter: REPORTER,
bail: true
}))
.once('error', function(){
process.exit(1);
})
.once('end', function(){
process.exit();
});
});
// By default, individual js files are transformed by babel and exported to /dist
gulp.task("transpile", function(){
return gulp.src(["lib/*.js","lib/transports/*.js"], { base: 'lib' })
.pipe(babel({ "presets": ["es2015"] }))
.pipe(gulp.dest("dist"));
});
|
6786238d5c0040121540ff17d3d95a33270d650f | roles/developer-devops/defaults/main.yml | roles/developer-devops/defaults/main.yml | ---
default_npm_packages:
- n
- letsencrypt-cli
default_brew_packages:
- python
- certbot
- ruby
- docker
- s3cmd
- libmaxminddb
- tor
- privoxy
- docker-machine
default_gem_packages:
- librarian-chef
- knife-solo
- capistrano
default_pip_packages:
- awscli
- docker-compose
default_cask_packages:
- virtualbox
- vagrant
| ---
default_npm_packages:
- n
- letsencrypt-cli
default_brew_packages:
- python
- certbot
- dehydrated
- ruby
- docker
- s3cmd
- libmaxminddb
- tor
- privoxy
- docker-machine
default_gem_packages:
- librarian-chef
- knife-solo
- capistrano
default_pip_packages:
- awscli
- docker-compose
default_cask_packages:
- virtualbox
- vagrant
| Add dehydrated for let's encrypt | Add dehydrated for let's encrypt
| YAML | mit | luishdez/osx-playbook,ansible-macos/macos-playbook,ansible-macos/macos-playbook | yaml | ## Code Before:
---
default_npm_packages:
- n
- letsencrypt-cli
default_brew_packages:
- python
- certbot
- ruby
- docker
- s3cmd
- libmaxminddb
- tor
- privoxy
- docker-machine
default_gem_packages:
- librarian-chef
- knife-solo
- capistrano
default_pip_packages:
- awscli
- docker-compose
default_cask_packages:
- virtualbox
- vagrant
## Instruction:
Add dehydrated for let's encrypt
## Code After:
---
default_npm_packages:
- n
- letsencrypt-cli
default_brew_packages:
- python
- certbot
- dehydrated
- ruby
- docker
- s3cmd
- libmaxminddb
- tor
- privoxy
- docker-machine
default_gem_packages:
- librarian-chef
- knife-solo
- capistrano
default_pip_packages:
- awscli
- docker-compose
default_cask_packages:
- virtualbox
- vagrant
|
b6d5f0551a53cc9d97a8b5f634ec54cd9b85bf00 | setup.py | setup.py | __author__ = 'Oliver Ratzesberger <https://github.com/fxstein>'
__copyright__ = 'Copyright (C) 2015 Oliver Ratzesberger'
__license__ = 'Apache License, Version 2.0'
# Make sure we have access to SentientHome commons
import os
print 'Checking node.js presence:'
if 0 != os.system('node -v'):
print 'node.js not present on system. Exiting...'
quit()
print 'Installing node.js dependencies:'
if 0 != os.system('npm install home'):
print 'Error installing node.js home module. Exiting...'
quit()
if 0 != os.system('npm install iniparser'):
print 'Error installing node.js iniparser module. Exiting...'
quit()
print 'Finished installing dependencies.'
| __author__ = 'Oliver Ratzesberger <https://github.com/fxstein>'
__copyright__ = 'Copyright (C) 2015 Oliver Ratzesberger'
__license__ = 'Apache License, Version 2.0'
# Make sure we have access to SentientHome commons
import os
print 'Checking node.js presence:'
if 0 != os.system('node -v'):
print 'node.js not present on system. Exiting...'
quit()
print 'Installing node.js dependencies:'
if 0 != os.system('npm install home'):
print 'Error installing node.js home module. Exiting...'
quit()
if 0 != os.system('npm install iniparser'):
print 'Error installing node.js iniparser module. Exiting...'
quit()
print 'Installing Python3 dependencies'
if 0 != os.system('pip3 install asyncio'):
print 'Error installing python3 asyncio package. Exiting...'
quit()
if 0 != os.system('pip3 install aiohttp'):
print 'Error installing python3 aiohttp package. Exiting...'
quit()
print 'Finished installing dependencies.'
| Add installation of some python 3 packages | Add installation of some python 3 packages
| Python | apache-2.0 | fxstein/SentientHome | python | ## Code Before:
__author__ = 'Oliver Ratzesberger <https://github.com/fxstein>'
__copyright__ = 'Copyright (C) 2015 Oliver Ratzesberger'
__license__ = 'Apache License, Version 2.0'
# Make sure we have access to SentientHome commons
import os
print 'Checking node.js presence:'
if 0 != os.system('node -v'):
print 'node.js not present on system. Exiting...'
quit()
print 'Installing node.js dependencies:'
if 0 != os.system('npm install home'):
print 'Error installing node.js home module. Exiting...'
quit()
if 0 != os.system('npm install iniparser'):
print 'Error installing node.js iniparser module. Exiting...'
quit()
print 'Finished installing dependencies.'
## Instruction:
Add installation of some python 3 packages
## Code After:
__author__ = 'Oliver Ratzesberger <https://github.com/fxstein>'
__copyright__ = 'Copyright (C) 2015 Oliver Ratzesberger'
__license__ = 'Apache License, Version 2.0'
# Make sure we have access to SentientHome commons
import os
print 'Checking node.js presence:'
if 0 != os.system('node -v'):
print 'node.js not present on system. Exiting...'
quit()
print 'Installing node.js dependencies:'
if 0 != os.system('npm install home'):
print 'Error installing node.js home module. Exiting...'
quit()
if 0 != os.system('npm install iniparser'):
print 'Error installing node.js iniparser module. Exiting...'
quit()
print 'Installing Python3 dependencies'
if 0 != os.system('pip3 install asyncio'):
print 'Error installing python3 asyncio package. Exiting...'
quit()
if 0 != os.system('pip3 install aiohttp'):
print 'Error installing python3 aiohttp package. Exiting...'
quit()
print 'Finished installing dependencies.'
|
5692b15c86ec22d5e53e1b919509fe2fc2c96922 | spec/dummy/app/helpers/styleguide_helper.rb | spec/dummy/app/helpers/styleguide_helper.rb | module StyleguideHelper
def ui_component_example_call(name, example)
if example.key?(:attributes)
formatted_attributes = JSON.pretty_generate(example[:attributes]).gsub(/"([^"]+)":/, '\1:')
"ui_component('#{name}', #{formatted_attributes})"
else
example.values.first
end
end
def ui_component_execute_example_call(name, example)
if example.key?(:attributes)
eval ui_component_example_call(name, example) # rubocop:disable Lint/Eval
elsif example.key?(:slim)
Slim::Template.new { example.values.last }.render(self).html_safe
else
fail "Not sure what to do with '#{example.keys.first}' kind of example"
end
end
end
| module StyleguideHelper
def ui_component_example_call(name, example)
if example.key?(:attributes)
formatted_attributes = JSON.pretty_generate(example[:attributes]).gsub(/"([^"]+)":/, '\1:')
"ui_component('#{name}', #{formatted_attributes})"
else
example[:slim]
end
end
def ui_component_execute_example_call(name, example)
if example.key?(:attributes)
eval ui_component_example_call(name, example) # rubocop:disable Lint/Eval
elsif example.key?(:slim)
Slim::Template.new { example.values.last }.render(self).html_safe
else
fail "Not sure what to do with '#{example.keys.first}' kind of example"
end
end
end
| Use :slim key for non-attribute examples | Use :slim key for non-attribute examples
| Ruby | mit | ad2games/ui_components,ad2games/ui_components,ad2games/ui_components | ruby | ## Code Before:
module StyleguideHelper
def ui_component_example_call(name, example)
if example.key?(:attributes)
formatted_attributes = JSON.pretty_generate(example[:attributes]).gsub(/"([^"]+)":/, '\1:')
"ui_component('#{name}', #{formatted_attributes})"
else
example.values.first
end
end
def ui_component_execute_example_call(name, example)
if example.key?(:attributes)
eval ui_component_example_call(name, example) # rubocop:disable Lint/Eval
elsif example.key?(:slim)
Slim::Template.new { example.values.last }.render(self).html_safe
else
fail "Not sure what to do with '#{example.keys.first}' kind of example"
end
end
end
## Instruction:
Use :slim key for non-attribute examples
## Code After:
module StyleguideHelper
def ui_component_example_call(name, example)
if example.key?(:attributes)
formatted_attributes = JSON.pretty_generate(example[:attributes]).gsub(/"([^"]+)":/, '\1:')
"ui_component('#{name}', #{formatted_attributes})"
else
example[:slim]
end
end
def ui_component_execute_example_call(name, example)
if example.key?(:attributes)
eval ui_component_example_call(name, example) # rubocop:disable Lint/Eval
elsif example.key?(:slim)
Slim::Template.new { example.values.last }.render(self).html_safe
else
fail "Not sure what to do with '#{example.keys.first}' kind of example"
end
end
end
|
937607003d6d1ef8b1b12344fc6259109c9ae915 | .github/workflows/build-amdvlk-docker.yml | .github/workflows/build-amdvlk-docker.yml | name: Build AMDVLK for LLPC
on:
schedule:
- cron: "0 */12 * * *"
jobs:
build-and-push-amdvlk:
name: Branch ${{ matrix.branch }}, base image ${{ matrix.base-image }}, config ${{ matrix.config }}
runs-on: ${{ matrix.host-os }}
strategy:
matrix:
host-os: ["ubuntu-latest"]
base-image: ["gcr.io/stadia-open-source/amdvlk_dev_release:nightly"]
branch: [dev]
config: [Release]
generator: [Ninja]
steps:
- name: Checkout LLPC
run: |
git clone https://github.com/${GITHUB_REPOSITORY}.git .
git checkout ${GITHUB_SHA}
- name: Setup Google Cloud CLI
uses: GoogleCloudPlatform/github-actions/setup-gcloud@master
with:
version: '270.0.0'
service_account_email: ${{ secrets.GCR_USER }}
service_account_key: ${{ secrets.GCR_KEY }}
- name: Setup Docker to use the GCR
run: |
gcloud auth configure-docker
- name: Build and Test AMDVLK with Docker
run: docker build . --file docker/amdvlk.Dockerfile
--build-arg BRANCH="${{ matrix.branch }}"
--build-arg CONFIG="${{ matrix.config }}"
--build-arg GENERATOR="${{ matrix.generator }}"
--tag ${{ matrix.base-image }}
- name: Push the new image
run: |
docker push ${{ matrix.base-image }}
| name: Build AMDVLK for LLPC
on:
schedule:
- cron: "0 */12 * * *"
jobs:
build-and-push-amdvlk:
name: Branch ${{ matrix.branch }}, base image ${{ matrix.base-image }}, config ${{ matrix.config }}
if: github.repository == 'GPUOpen-Drivers/llpc'
runs-on: ${{ matrix.host-os }}
strategy:
matrix:
host-os: ["ubuntu-latest"]
base-image: ["gcr.io/stadia-open-source/amdvlk_dev_release:nightly"]
branch: [dev]
config: [Release]
generator: [Ninja]
steps:
- name: Checkout LLPC
run: |
git clone https://github.com/${GITHUB_REPOSITORY}.git .
git checkout ${GITHUB_SHA}
- name: Setup Google Cloud CLI
uses: GoogleCloudPlatform/github-actions/setup-gcloud@master
with:
version: '270.0.0'
service_account_email: ${{ secrets.GCR_USER }}
service_account_key: ${{ secrets.GCR_KEY }}
- name: Setup Docker to use the GCR
run: |
gcloud auth configure-docker
- name: Build and Test AMDVLK with Docker
run: docker build . --file docker/amdvlk.Dockerfile
--build-arg BRANCH="${{ matrix.branch }}"
--build-arg CONFIG="${{ matrix.config }}"
--build-arg GENERATOR="${{ matrix.generator }}"
--tag ${{ matrix.base-image }}
- name: Push the new image
run: |
docker push ${{ matrix.base-image }}
| Build amdvlk base image on the main repo only | [CI] Build amdvlk base image on the main repo only
Based on
https://github.community/t5/GitHub-Actions/Run-scheduled-workflows-only-from-the-main-repository/m-p/45855#M6361.
| YAML | mit | googlestadia/llpc,GPUOpen-Drivers/llpc,googlestadia/llpc,GPUOpen-Drivers/llpc,googlestadia/llpc,GPUOpen-Drivers/llpc,googlestadia/llpc,GPUOpen-Drivers/llpc,GPUOpen-Drivers/llpc,googlestadia/llpc | yaml | ## Code Before:
name: Build AMDVLK for LLPC
on:
schedule:
- cron: "0 */12 * * *"
jobs:
build-and-push-amdvlk:
name: Branch ${{ matrix.branch }}, base image ${{ matrix.base-image }}, config ${{ matrix.config }}
runs-on: ${{ matrix.host-os }}
strategy:
matrix:
host-os: ["ubuntu-latest"]
base-image: ["gcr.io/stadia-open-source/amdvlk_dev_release:nightly"]
branch: [dev]
config: [Release]
generator: [Ninja]
steps:
- name: Checkout LLPC
run: |
git clone https://github.com/${GITHUB_REPOSITORY}.git .
git checkout ${GITHUB_SHA}
- name: Setup Google Cloud CLI
uses: GoogleCloudPlatform/github-actions/setup-gcloud@master
with:
version: '270.0.0'
service_account_email: ${{ secrets.GCR_USER }}
service_account_key: ${{ secrets.GCR_KEY }}
- name: Setup Docker to use the GCR
run: |
gcloud auth configure-docker
- name: Build and Test AMDVLK with Docker
run: docker build . --file docker/amdvlk.Dockerfile
--build-arg BRANCH="${{ matrix.branch }}"
--build-arg CONFIG="${{ matrix.config }}"
--build-arg GENERATOR="${{ matrix.generator }}"
--tag ${{ matrix.base-image }}
- name: Push the new image
run: |
docker push ${{ matrix.base-image }}
## Instruction:
[CI] Build amdvlk base image on the main repo only
Based on
https://github.community/t5/GitHub-Actions/Run-scheduled-workflows-only-from-the-main-repository/m-p/45855#M6361.
## Code After:
name: Build AMDVLK for LLPC
on:
schedule:
- cron: "0 */12 * * *"
jobs:
build-and-push-amdvlk:
name: Branch ${{ matrix.branch }}, base image ${{ matrix.base-image }}, config ${{ matrix.config }}
if: github.repository == 'GPUOpen-Drivers/llpc'
runs-on: ${{ matrix.host-os }}
strategy:
matrix:
host-os: ["ubuntu-latest"]
base-image: ["gcr.io/stadia-open-source/amdvlk_dev_release:nightly"]
branch: [dev]
config: [Release]
generator: [Ninja]
steps:
- name: Checkout LLPC
run: |
git clone https://github.com/${GITHUB_REPOSITORY}.git .
git checkout ${GITHUB_SHA}
- name: Setup Google Cloud CLI
uses: GoogleCloudPlatform/github-actions/setup-gcloud@master
with:
version: '270.0.0'
service_account_email: ${{ secrets.GCR_USER }}
service_account_key: ${{ secrets.GCR_KEY }}
- name: Setup Docker to use the GCR
run: |
gcloud auth configure-docker
- name: Build and Test AMDVLK with Docker
run: docker build . --file docker/amdvlk.Dockerfile
--build-arg BRANCH="${{ matrix.branch }}"
--build-arg CONFIG="${{ matrix.config }}"
--build-arg GENERATOR="${{ matrix.generator }}"
--tag ${{ matrix.base-image }}
- name: Push the new image
run: |
docker push ${{ matrix.base-image }}
|
806a19cad3c73023b623ddfdef1467e06fdfd612 | lib/react_components/hello_world.cjsx | lib/react_components/hello_world.cjsx | Link = require('react-router').Link
module.exports = React.createClass
displayName: 'HelloWorld'
render: ->
<div>
<h1>Hello world!</h1>
<p>You're looking at the <a href="https://github.com/KyleAMathews/coffee-react-quickstart">Coffeescript React Quickstart</a> project by <a href="https://twitter.com/kylemathews">Kyle Mathews</a>.</p>
<p>It has a number of nice goodies included like:</p>
<ul>
<li>Full Coffeescript support provided by <a href="https://github.com/jsdf/coffee-react-transform">coffee-react-transform</a></li>
<li>Live reloading for both CSS <em>and</em> Javascript! This really speeds up your development. Live reload of Javascript enabled by the <a href="https://github.com/gaearon/react-hot-loader">react-hot-loader</a> project.</li>
<li>Gulpfile with both development and production tasks to simplify building your project.</li>
<li>Starter Sass project with sensible defaults. Check them out on the <Link to="styleguide">styleguide page</Link></li>
</ul>
</div>
| Link = require('react-router').Link
module.exports = React.createClass
displayName: 'HelloWorld'
render: ->
<div>
<h1>Hello world!</h1>
<p>You're looking at the <a href="https://github.com/KyleAMathews/coffee-react-quickstart">Coffeescript React Quickstart</a> project by <a href="https://twitter.com/kylemathews">Kyle Mathews</a>.</p>
<p>It has a number of nice goodies included like:</p>
<ul>
<li>Live reloading for both CSS <em>and</em> Javascript! This really speeds up your development. Live reloading is powered by the <a href="http://webpack.github.io/">Webpack module bundler</a> and the <a href="https://github.com/gaearon/react-hot-loader">react-hot-loader</a> projects.</li>
<li>Full Coffeescript for React support provided by <a href="https://github.com/jsdf/coffee-react-transform">coffee-react-transform</a></li>
<li>Amazing URL-driven-development (UDD) with the <a href="https://github.com/rackt/react-router">react-router project</a></li>
<li>Uses Gulp for building CSS and Javascript. Run `cult watch` for rebuilding css/js on the fly while developing and `cult build` to create minified versions to deploy to production.</li>
<li>Starter Sass project with sensible defaults. Check them out on the <Link to="styleguide">styleguide page</Link></li>
<li>Uses the best of breed grid system <a href="http://susy.oddbird.net/">Susy</a>.</li>
</ul>
</div>
| Add list of 'batteries included' for demo page | Add list of 'batteries included' for demo page
| CoffeeScript | mit | VinSpee/webpacker,KyleAMathews/coffee-react-quickstart,duncanchen/coffee-react-quickstart,w01fgang/coffee-react-quickstart,mariopeixoto/todo-flux,methyl/react-typeahead-example,locomote/tycoon,ZECTBynmo/coffee-react-quickstart,josesanch/coffee-react-quickstart,ZECTBynmo/coffee-react-quickstart,KyleAMathews/coffee-react-quickstart,w01fgang/coffee-react-quickstart,josesanch/coffee-react-quickstart,josesanch/coffee-react-quickstart,w01fgang/coffee-react-quickstart,dabbott/react-scrollview-wip,KyleAMathews/coffee-react-quickstart,mariopeixoto/todo-flux,locomote/tycoon,dabbott/react-scrollview-wip,ZECTBynmo/coffee-react-quickstart,duncanchen/coffee-react-quickstart,methyl/react-typeahead-example,locomote/tycoon,duncanchen/coffee-react-quickstart,dabbott/react-scrollview-wip | coffeescript | ## Code Before:
Link = require('react-router').Link
module.exports = React.createClass
displayName: 'HelloWorld'
render: ->
<div>
<h1>Hello world!</h1>
<p>You're looking at the <a href="https://github.com/KyleAMathews/coffee-react-quickstart">Coffeescript React Quickstart</a> project by <a href="https://twitter.com/kylemathews">Kyle Mathews</a>.</p>
<p>It has a number of nice goodies included like:</p>
<ul>
<li>Full Coffeescript support provided by <a href="https://github.com/jsdf/coffee-react-transform">coffee-react-transform</a></li>
<li>Live reloading for both CSS <em>and</em> Javascript! This really speeds up your development. Live reload of Javascript enabled by the <a href="https://github.com/gaearon/react-hot-loader">react-hot-loader</a> project.</li>
<li>Gulpfile with both development and production tasks to simplify building your project.</li>
<li>Starter Sass project with sensible defaults. Check them out on the <Link to="styleguide">styleguide page</Link></li>
</ul>
</div>
## Instruction:
Add list of 'batteries included' for demo page
## Code After:
Link = require('react-router').Link
module.exports = React.createClass
displayName: 'HelloWorld'
render: ->
<div>
<h1>Hello world!</h1>
<p>You're looking at the <a href="https://github.com/KyleAMathews/coffee-react-quickstart">Coffeescript React Quickstart</a> project by <a href="https://twitter.com/kylemathews">Kyle Mathews</a>.</p>
<p>It has a number of nice goodies included like:</p>
<ul>
<li>Live reloading for both CSS <em>and</em> Javascript! This really speeds up your development. Live reloading is powered by the <a href="http://webpack.github.io/">Webpack module bundler</a> and the <a href="https://github.com/gaearon/react-hot-loader">react-hot-loader</a> projects.</li>
<li>Full Coffeescript for React support provided by <a href="https://github.com/jsdf/coffee-react-transform">coffee-react-transform</a></li>
<li>Amazing URL-driven-development (UDD) with the <a href="https://github.com/rackt/react-router">react-router project</a></li>
<li>Uses Gulp for building CSS and Javascript. Run `cult watch` for rebuilding css/js on the fly while developing and `cult build` to create minified versions to deploy to production.</li>
<li>Starter Sass project with sensible defaults. Check them out on the <Link to="styleguide">styleguide page</Link></li>
<li>Uses the best of breed grid system <a href="http://susy.oddbird.net/">Susy</a>.</li>
</ul>
</div>
|
d849bd2da09ce5be089e9ccb451faa2624cca477 | scripts/cask-remove-old-versions.sh | scripts/cask-remove-old-versions.sh |
set i = 0
for folder in /opt/homebrew-cask/Caskroom/*
do
for version in $folder/*
do
let "i++"
done
if [ $i -gt 1 ]; then
# sort by time so NR>2 skips "total" & current version
echo "Removing old cask $folder..."
ls -lt $folder | awk -v d="$folder/" '(NR>2) {print d $9}' | xargs -L1 rm -fr
fi
let "i=0"
done
echo "Done!"
|
set i = 0
for folder in /usr/local/Caskroom/*
do
for version in $folder/*
do
let "i++"
done
if [ $i -gt 1 ]; then
# sort by time so NR>2 skips "total" & current version
echo "Removing old cask $folder..."
ls -lt $folder | awk -v d="$folder/" '(NR>2) {print d $9}' | xargs -L1 rm -fr
fi
let "i=0"
done
echo "Done!"
| Change folder for Caskroom to /usr/local/Caskroom | Change folder for Caskroom to /usr/local/Caskroom
| Shell | apache-2.0 | daveshaheen/system-setup | shell | ## Code Before:
set i = 0
for folder in /opt/homebrew-cask/Caskroom/*
do
for version in $folder/*
do
let "i++"
done
if [ $i -gt 1 ]; then
# sort by time so NR>2 skips "total" & current version
echo "Removing old cask $folder..."
ls -lt $folder | awk -v d="$folder/" '(NR>2) {print d $9}' | xargs -L1 rm -fr
fi
let "i=0"
done
echo "Done!"
## Instruction:
Change folder for Caskroom to /usr/local/Caskroom
## Code After:
set i = 0
for folder in /usr/local/Caskroom/*
do
for version in $folder/*
do
let "i++"
done
if [ $i -gt 1 ]; then
# sort by time so NR>2 skips "total" & current version
echo "Removing old cask $folder..."
ls -lt $folder | awk -v d="$folder/" '(NR>2) {print d $9}' | xargs -L1 rm -fr
fi
let "i=0"
done
echo "Done!"
|
d20347f4a57bb195291ebc79fc1ca0858b3f1d65 | PyLunch/pylunch/specials/models.py | PyLunch/pylunch/specials/models.py | from django.db import models
MAX_PRICE_FORMAT = {
'max_digits': 5,
'decimal_places': 2
}
SPECIAL_TYPES = (
('LU', 'Lunch'),
('BR', 'Breakfast'),
('DI', 'Dinner'),
)
MAX_RESTAURANT_NAME_LENGTH = 50
MAX_DESCRIPTION_LENGTH = 500
class Restaurant(models.Model):
name = models.CharField(max_length=MAX_RESTAURANT_NAME_LENGTH)
description = models.CharField(max_length=MAX_DESCRIPTION_LENGTH)
class Special(models.Model):
restaurant = models.ForeignKey(Restaurant)
description = models.CharField(max_length=MAX_DESCRIPTION_LENGTH)
special_type = models.CharField(max_length=2, choices=SPECIAL_TYPES)
special_price = models.DecimalField(**MAX_PRICE_FORMAT)
normal_price = models.DecimalField(**MAX_PRICE_FORMAT) | from django.db import models
MAX_PRICE_FORMAT = {
'max_digits': 5,
'decimal_places': 2
}
SPECIAL_TYPES = (
('LU', 'Lunch'),
('BR', 'Breakfast'),
('DI', 'Dinner'),
)
MAX_RESTAURANT_NAME_LENGTH = 50
MAX_DESCRIPTION_LENGTH = 500
class Restaurant(models.Model):
name = models.CharField(max_length=MAX_RESTAURANT_NAME_LENGTH)
description = models.CharField(max_length=MAX_DESCRIPTION_LENGTH)
def __unicode__(self):
return self.name
class Special(models.Model):
restaurant = models.ForeignKey(Restaurant)
description = models.CharField(max_length=MAX_DESCRIPTION_LENGTH)
special_type = models.CharField(max_length=2, choices=SPECIAL_TYPES)
special_price = models.DecimalField(**MAX_PRICE_FORMAT)
normal_price = models.DecimalField(**MAX_PRICE_FORMAT)
valid_from = models.DateField()
valid_until = models.DateField()
def __unicode__(self):
return "%s: %s" % (self.restaurant.name, self.description) | Add fields to Special model | Add fields to Special model
| Python | unlicense | wiehan-a/pylunch | python | ## Code Before:
from django.db import models
MAX_PRICE_FORMAT = {
'max_digits': 5,
'decimal_places': 2
}
SPECIAL_TYPES = (
('LU', 'Lunch'),
('BR', 'Breakfast'),
('DI', 'Dinner'),
)
MAX_RESTAURANT_NAME_LENGTH = 50
MAX_DESCRIPTION_LENGTH = 500
class Restaurant(models.Model):
name = models.CharField(max_length=MAX_RESTAURANT_NAME_LENGTH)
description = models.CharField(max_length=MAX_DESCRIPTION_LENGTH)
class Special(models.Model):
restaurant = models.ForeignKey(Restaurant)
description = models.CharField(max_length=MAX_DESCRIPTION_LENGTH)
special_type = models.CharField(max_length=2, choices=SPECIAL_TYPES)
special_price = models.DecimalField(**MAX_PRICE_FORMAT)
normal_price = models.DecimalField(**MAX_PRICE_FORMAT)
## Instruction:
Add fields to Special model
## Code After:
from django.db import models
MAX_PRICE_FORMAT = {
'max_digits': 5,
'decimal_places': 2
}
SPECIAL_TYPES = (
('LU', 'Lunch'),
('BR', 'Breakfast'),
('DI', 'Dinner'),
)
MAX_RESTAURANT_NAME_LENGTH = 50
MAX_DESCRIPTION_LENGTH = 500
class Restaurant(models.Model):
name = models.CharField(max_length=MAX_RESTAURANT_NAME_LENGTH)
description = models.CharField(max_length=MAX_DESCRIPTION_LENGTH)
def __unicode__(self):
return self.name
class Special(models.Model):
restaurant = models.ForeignKey(Restaurant)
description = models.CharField(max_length=MAX_DESCRIPTION_LENGTH)
special_type = models.CharField(max_length=2, choices=SPECIAL_TYPES)
special_price = models.DecimalField(**MAX_PRICE_FORMAT)
normal_price = models.DecimalField(**MAX_PRICE_FORMAT)
valid_from = models.DateField()
valid_until = models.DateField()
def __unicode__(self):
return "%s: %s" % (self.restaurant.name, self.description) |
4d7c1fec37943558ccc8bf6a17860b2a86fe1941 | gee_asset_manager/batch_copy.py | gee_asset_manager/batch_copy.py | import ee
import os
import csv
import logging
def copy(source, destination):
with open(source, 'r') as f:
reader = csv.reader(f)
for line in reader:
name = line[0]
gme_id = line[1]
gme_path = 'GME/images/' + gme_id
ee_path = os.path.join(destination, name)
logging.info('Copying asset %s to %s', gme_path, ee_path)
ee.data.copyAsset(gme_path, ee_path)
if __name__ == '__main__':
ee.Initialize()
assets = '/home/tracek/Data/consbio2016/test.csv'
with open(assets, 'r') as f:
reader = csv.reader(f) | import ee
import os
import csv
import logging
def copy(source, destination):
with open(source, 'r') as f:
reader = csv.reader(f)
for line in reader:
name = line[0]
gme_id = line[1]
gme_path = 'GME/images/' + gme_id
ee_path = os.path.join(destination, name)
logging.info('Copying asset %s to %s', gme_path, ee_path)
try:
ee.data.copyAsset(gme_path, ee_path)
except ee.EEException as e:
with open('failed_batch_copy.csv', 'w') as fout:
fout.write('%s,%s,%s,%s', name, gme_id, ee_path,e)
if __name__ == '__main__':
ee.Initialize()
assets = '/home/tracek/Data/consbio2016/test.csv'
with open(assets, 'r') as f:
reader = csv.reader(f) | Add exception handling to batch copy | Add exception handling to batch copy
| Python | apache-2.0 | tracek/gee_asset_manager | python | ## Code Before:
import ee
import os
import csv
import logging
def copy(source, destination):
with open(source, 'r') as f:
reader = csv.reader(f)
for line in reader:
name = line[0]
gme_id = line[1]
gme_path = 'GME/images/' + gme_id
ee_path = os.path.join(destination, name)
logging.info('Copying asset %s to %s', gme_path, ee_path)
ee.data.copyAsset(gme_path, ee_path)
if __name__ == '__main__':
ee.Initialize()
assets = '/home/tracek/Data/consbio2016/test.csv'
with open(assets, 'r') as f:
reader = csv.reader(f)
## Instruction:
Add exception handling to batch copy
## Code After:
import ee
import os
import csv
import logging
def copy(source, destination):
with open(source, 'r') as f:
reader = csv.reader(f)
for line in reader:
name = line[0]
gme_id = line[1]
gme_path = 'GME/images/' + gme_id
ee_path = os.path.join(destination, name)
logging.info('Copying asset %s to %s', gme_path, ee_path)
try:
ee.data.copyAsset(gme_path, ee_path)
except ee.EEException as e:
with open('failed_batch_copy.csv', 'w') as fout:
fout.write('%s,%s,%s,%s', name, gme_id, ee_path,e)
if __name__ == '__main__':
ee.Initialize()
assets = '/home/tracek/Data/consbio2016/test.csv'
with open(assets, 'r') as f:
reader = csv.reader(f) |
389909938d77ac8ee7227c70b918010f11bececd | README.md | README.md | Integration of Dark Lumos into your Angular application is done in 2 setps.
#### Step 1) environment.ts
A section named `featureFlag` must be added to your `enviroment.ts` file.
```TypeScript
featureFlag: {
apiUri: http://darklumos.io/api/
}
```
Key | Description
--- | ---
apiUri | The uri of the Dark Lumos API
#### Step 2) app.modules.ts
Import the `DarkLumosFeatureFlagsModule` and provide the `FeatureFlagConfig`
```TypeScript
imports: [
...
DarkLumosFeatureFlagModule
],
providers: [
...
{ provide: FeatureFlagConfig, useValue: <FeaturFlagConfig>environment.featureFlag }
]
```
## Using in the template
Feature flags can be used to section off a chuck of template. To do this just add the `*ngFeatureFlag` attribute, with the value of your feature flag name in single quotes, to the element you would like to feature flag. You can also set the feature flag to hide an element when the feature flag is on by adding `; Hidden: true` to the attribute's value.
Below are a few examples.
```html
<div *ngFeatureFlag="'Fizzbuzz'">
<span>Fizzbuzz shown when enabled</span>
</div>
<div *ngFeatureFlag="'Foobar'; Hidden: true">
<span>Foobar hidden if enabled</span>
</div>
``` | Integration of Dark Lumos into your Angular application is done in 2 setps.
#### Step 1) environment.ts
A section named `featureFlag` must be added to your `enviroment.ts` file.
```TypeScript
featureFlag: {
apiUri: http://darklumos.io/api/,
tenantId: 'abc1234',
clientId: 'foobar'
}
```
Key | Description
--- | ---
apiUri | The uri of the Dark Lumos API
tenantId | Your tenant id
clientId | The client id of the application
#### Step 2) app.modules.ts
Import the `DarkLumosFeatureFlagsModule` and provide the `FeatureFlagConfig`
```TypeScript
imports: [
...
DarkLumosFeatureFlagModule
],
providers: [
...
{ provide: FeatureFlagConfig, useValue: <FeaturFlagConfig>environment.featureFlag }
]
```
## Using in the template
Feature flags can be used to section off a chuck of template. To do this just add the `*ngFeatureFlag` attribute, with the value of your feature flag name in single quotes, to the element you would like to feature flag. You can also set the feature flag to hide an element when the feature flag is on by adding `; Hidden: true` to the attribute's value.
Below are a few examples.
```html
<div *ngFeatureFlag="'Fizzbuzz'">
<span>Fizzbuzz shown when enabled</span>
</div>
<div *ngFeatureFlag="'Foobar'; Hidden: true">
<span>Foobar hidden if enabled</span>
</div>
``` | Update readme with new values. | Update readme with new values.
| Markdown | mit | Incognitus-Io/ngFeatureFlags,Incognitus-Io/ngFeatureFlags | markdown | ## Code Before:
Integration of Dark Lumos into your Angular application is done in 2 setps.
#### Step 1) environment.ts
A section named `featureFlag` must be added to your `enviroment.ts` file.
```TypeScript
featureFlag: {
apiUri: http://darklumos.io/api/
}
```
Key | Description
--- | ---
apiUri | The uri of the Dark Lumos API
#### Step 2) app.modules.ts
Import the `DarkLumosFeatureFlagsModule` and provide the `FeatureFlagConfig`
```TypeScript
imports: [
...
DarkLumosFeatureFlagModule
],
providers: [
...
{ provide: FeatureFlagConfig, useValue: <FeaturFlagConfig>environment.featureFlag }
]
```
## Using in the template
Feature flags can be used to section off a chuck of template. To do this just add the `*ngFeatureFlag` attribute, with the value of your feature flag name in single quotes, to the element you would like to feature flag. You can also set the feature flag to hide an element when the feature flag is on by adding `; Hidden: true` to the attribute's value.
Below are a few examples.
```html
<div *ngFeatureFlag="'Fizzbuzz'">
<span>Fizzbuzz shown when enabled</span>
</div>
<div *ngFeatureFlag="'Foobar'; Hidden: true">
<span>Foobar hidden if enabled</span>
</div>
```
## Instruction:
Update readme with new values.
## Code After:
Integration of Dark Lumos into your Angular application is done in 2 setps.
#### Step 1) environment.ts
A section named `featureFlag` must be added to your `enviroment.ts` file.
```TypeScript
featureFlag: {
apiUri: http://darklumos.io/api/,
tenantId: 'abc1234',
clientId: 'foobar'
}
```
Key | Description
--- | ---
apiUri | The uri of the Dark Lumos API
tenantId | Your tenant id
clientId | The client id of the application
#### Step 2) app.modules.ts
Import the `DarkLumosFeatureFlagsModule` and provide the `FeatureFlagConfig`
```TypeScript
imports: [
...
DarkLumosFeatureFlagModule
],
providers: [
...
{ provide: FeatureFlagConfig, useValue: <FeaturFlagConfig>environment.featureFlag }
]
```
## Using in the template
Feature flags can be used to section off a chuck of template. To do this just add the `*ngFeatureFlag` attribute, with the value of your feature flag name in single quotes, to the element you would like to feature flag. You can also set the feature flag to hide an element when the feature flag is on by adding `; Hidden: true` to the attribute's value.
Below are a few examples.
```html
<div *ngFeatureFlag="'Fizzbuzz'">
<span>Fizzbuzz shown when enabled</span>
</div>
<div *ngFeatureFlag="'Foobar'; Hidden: true">
<span>Foobar hidden if enabled</span>
</div>
``` |
74c95f1ec13807a542900eefcd4a7ab02f891a88 | build.sbt | build.sbt | name := "gu-who"
version := "1.0-SNAPSHOT"
libraryDependencies ++= Seq(
jdbc,
anorm,
cache,
"org.kohsuke" % "github-api" % "1.50-SNAPSHOT",
"com.github.scala-incubator.io" %% "scala-io-file" % "0.4.2",
"org.eclipse.jgit" % "org.eclipse.jgit" % "3.2.0.201312181205-r",
"com.madgag" %% "scala-git" % "1.11.1",
"com.madgag" %% "scala-git-test" % "1.11.1" % "test"
)
resolvers += "Local Maven Repository" at "file://"+Path.userHome.absolutePath+"/.m2/repository"
play.Project.playScalaSettings
| name := "gu-who"
version := "1.0-SNAPSHOT"
libraryDependencies ++= Seq(
jdbc,
anorm,
cache,
"com.madgag" % "github-api" % "1.49.99.0.1",
"com.github.scala-incubator.io" %% "scala-io-file" % "0.4.2",
"org.eclipse.jgit" % "org.eclipse.jgit" % "3.2.0.201312181205-r",
"com.madgag" %% "scala-git" % "1.11.1",
"com.madgag" %% "scala-git-test" % "1.11.1" % "test"
)
resolvers += "Local Maven Repository" at "file://"+Path.userHome.absolutePath+"/.m2/repository"
play.Project.playScalaSettings
| Use released fork of github-api | Use released fork of github-api
I've published a small fork of the github-api, which includes these
pull-requests we need:
https://github.com/kohsuke/github-api/pull/66 - org member paging
https://github.com/kohsuke/github-api/pull/68 - org-member filtering
| Scala | apache-2.0 | guardian/gu-who,jamesoram/gu-who,BanzaiMan/gu-who | scala | ## Code Before:
name := "gu-who"
version := "1.0-SNAPSHOT"
libraryDependencies ++= Seq(
jdbc,
anorm,
cache,
"org.kohsuke" % "github-api" % "1.50-SNAPSHOT",
"com.github.scala-incubator.io" %% "scala-io-file" % "0.4.2",
"org.eclipse.jgit" % "org.eclipse.jgit" % "3.2.0.201312181205-r",
"com.madgag" %% "scala-git" % "1.11.1",
"com.madgag" %% "scala-git-test" % "1.11.1" % "test"
)
resolvers += "Local Maven Repository" at "file://"+Path.userHome.absolutePath+"/.m2/repository"
play.Project.playScalaSettings
## Instruction:
Use released fork of github-api
I've published a small fork of the github-api, which includes these
pull-requests we need:
https://github.com/kohsuke/github-api/pull/66 - org member paging
https://github.com/kohsuke/github-api/pull/68 - org-member filtering
## Code After:
name := "gu-who"
version := "1.0-SNAPSHOT"
libraryDependencies ++= Seq(
jdbc,
anorm,
cache,
"com.madgag" % "github-api" % "1.49.99.0.1",
"com.github.scala-incubator.io" %% "scala-io-file" % "0.4.2",
"org.eclipse.jgit" % "org.eclipse.jgit" % "3.2.0.201312181205-r",
"com.madgag" %% "scala-git" % "1.11.1",
"com.madgag" %% "scala-git-test" % "1.11.1" % "test"
)
resolvers += "Local Maven Repository" at "file://"+Path.userHome.absolutePath+"/.m2/repository"
play.Project.playScalaSettings
|
8775e644e183235d502659a6574003ede85c4c84 | doc/source/index.rst | doc/source/index.rst | .. cinder-specs documentation master file
======================================
Volume Service Specifications (cinder)
======================================
Queens approved specs:
.. toctree::
:glob:
:maxdepth: 1
specs/queens/*
Pike approved specs:
.. toctree::
:glob:
:maxdepth: 1
specs/pike/*
Ocata approved specs:
.. toctree::
:glob:
:maxdepth: 1
specs/ocata/*
Newton approved specs:
.. toctree::
:glob:
:maxdepth: 1
specs/newton/*
Mitaka approved specs:
.. toctree::
:glob:
:maxdepth: 1
specs/mitaka/*
Liberty approved specs:
.. toctree::
:glob:
:maxdepth: 1
specs/liberty/*
Kilo approved specs:
.. toctree::
:glob:
:maxdepth: 1
specs/kilo/*
Juno approved specs:
.. toctree::
:glob:
:maxdepth: 1
specs/juno/*
=============
Volume V2 API
=============
.. toctree::
:glob:
:maxdepth: 1
specs/api/v2/*
==================
Indices and tables
==================
* :ref:`search`
| .. cinder-specs documentation master file
======================================
Volume Service Specifications (cinder)
======================================
Rocky approved specs:
.. toctree::
:glob:
:maxdepth: 1
specs/rocky/*
Queens approved specs:
.. toctree::
:glob:
:maxdepth: 1
specs/queens/*
Pike approved specs:
.. toctree::
:glob:
:maxdepth: 1
specs/pike/*
Ocata approved specs:
.. toctree::
:glob:
:maxdepth: 1
specs/ocata/*
Newton approved specs:
.. toctree::
:glob:
:maxdepth: 1
specs/newton/*
Mitaka approved specs:
.. toctree::
:glob:
:maxdepth: 1
specs/mitaka/*
Liberty approved specs:
.. toctree::
:glob:
:maxdepth: 1
specs/liberty/*
Kilo approved specs:
.. toctree::
:glob:
:maxdepth: 1
specs/kilo/*
Juno approved specs:
.. toctree::
:glob:
:maxdepth: 1
specs/juno/*
=============
Volume V2 API
=============
.. toctree::
:glob:
:maxdepth: 1
specs/api/v2/*
==================
Indices and tables
==================
* :ref:`search`
| Add Rocky support in doc | Add Rocky support in doc
Update index.rst file to support rendering
rst files in rocky folder.
Change-Id: I7cc17dafaf832330f7d5ecea6c811df39d51d503
| reStructuredText | apache-2.0 | openstack/cinder-specs | restructuredtext | ## Code Before:
.. cinder-specs documentation master file
======================================
Volume Service Specifications (cinder)
======================================
Queens approved specs:
.. toctree::
:glob:
:maxdepth: 1
specs/queens/*
Pike approved specs:
.. toctree::
:glob:
:maxdepth: 1
specs/pike/*
Ocata approved specs:
.. toctree::
:glob:
:maxdepth: 1
specs/ocata/*
Newton approved specs:
.. toctree::
:glob:
:maxdepth: 1
specs/newton/*
Mitaka approved specs:
.. toctree::
:glob:
:maxdepth: 1
specs/mitaka/*
Liberty approved specs:
.. toctree::
:glob:
:maxdepth: 1
specs/liberty/*
Kilo approved specs:
.. toctree::
:glob:
:maxdepth: 1
specs/kilo/*
Juno approved specs:
.. toctree::
:glob:
:maxdepth: 1
specs/juno/*
=============
Volume V2 API
=============
.. toctree::
:glob:
:maxdepth: 1
specs/api/v2/*
==================
Indices and tables
==================
* :ref:`search`
## Instruction:
Add Rocky support in doc
Update index.rst file to support rendering
rst files in rocky folder.
Change-Id: I7cc17dafaf832330f7d5ecea6c811df39d51d503
## Code After:
.. cinder-specs documentation master file
======================================
Volume Service Specifications (cinder)
======================================
Rocky approved specs:
.. toctree::
:glob:
:maxdepth: 1
specs/rocky/*
Queens approved specs:
.. toctree::
:glob:
:maxdepth: 1
specs/queens/*
Pike approved specs:
.. toctree::
:glob:
:maxdepth: 1
specs/pike/*
Ocata approved specs:
.. toctree::
:glob:
:maxdepth: 1
specs/ocata/*
Newton approved specs:
.. toctree::
:glob:
:maxdepth: 1
specs/newton/*
Mitaka approved specs:
.. toctree::
:glob:
:maxdepth: 1
specs/mitaka/*
Liberty approved specs:
.. toctree::
:glob:
:maxdepth: 1
specs/liberty/*
Kilo approved specs:
.. toctree::
:glob:
:maxdepth: 1
specs/kilo/*
Juno approved specs:
.. toctree::
:glob:
:maxdepth: 1
specs/juno/*
=============
Volume V2 API
=============
.. toctree::
:glob:
:maxdepth: 1
specs/api/v2/*
==================
Indices and tables
==================
* :ref:`search`
|
4f3b9b7632a8d41945f6e3f8861563e591e3998d | etc/compile/compile.sh | etc/compile/compile.sh |
set -Eex
DIR="$(cd "$(dirname "${0}")/../.." && pwd)"
cd "${DIR}"
pwd
BINARY="${1}"
LD_FLAGS="${2}"
PROFILE="${3}"
TMP="$(mktemp -d -p . build.XXXXXXXXXX)"
CGO_ENABLED=0 GOOS=linux go build \
-installsuffix netgo \
-tags netgo \
-o ${TMP}/${BINARY} \
-ldflags "${LD_FLAGS}" \
-gcflags "all=-trimpath=$GOPATH" \
src/server/cmd/${BINARY}/main.go
echo "LD_FLAGS=$LD_FLAGS"
# When creating profile binaries, we dont want to detach or do docker ops
if [ -z ${PROFILE} ]
then
cp Dockerfile.${BINARY} ${TMP}/Dockerfile
if [ ${BINARY} = "worker" ]; then
cp ./etc/worker/* ${TMP}/
fi
cp /etc/ssl/certs/ca-certificates.crt ${TMP}/ca-certificates.crt
docker build ${DOCKER_BUILD_FLAGS} -t pachyderm_${BINARY} ${TMP}
docker tag pachyderm_${BINARY}:latest pachyderm/${BINARY}:latest
docker tag pachyderm_${BINARY}:latest pachyderm/${BINARY}:local
else
cd ${TMP}
tar cf - ${BINARY}
fi
rm -rf "${TMP}"
|
set -Eex
DIR="$(cd "$(dirname "${0}")/../.." && pwd)"
cd "${DIR}"
pwd
BINARY="${1}"
LD_FLAGS="${2}"
PROFILE="${3}"
TMP=docker_build_${BINARY}.tmpdir
mkdir -p "${TMP}"
CGO_ENABLED=0 GOOS=linux go build \
-installsuffix netgo \
-tags netgo \
-o ${TMP}/${BINARY} \
-ldflags "${LD_FLAGS}" \
-gcflags "all=-trimpath=$GOPATH" \
src/server/cmd/${BINARY}/main.go
echo "LD_FLAGS=$LD_FLAGS"
# When creating profile binaries, we dont want to detach or do docker ops
if [ -z ${PROFILE} ]
then
cp Dockerfile.${BINARY} ${TMP}/Dockerfile
if [ ${BINARY} = "worker" ]; then
cp ./etc/worker/* ${TMP}/
fi
cp /etc/ssl/certs/ca-certificates.crt ${TMP}/ca-certificates.crt
docker build ${DOCKER_BUILD_FLAGS} -t pachyderm_${BINARY} ${TMP}
docker tag pachyderm_${BINARY}:latest pachyderm/${BINARY}:latest
docker tag pachyderm_${BINARY}:latest pachyderm/${BINARY}:local
else
cd ${TMP}
tar cf - ${BINARY}
fi
rm -rf "${TMP}"
| Use consistent output dir (that depends on binary) | Use consistent output dir (that depends on binary)
| Shell | apache-2.0 | pachyderm/pfs,pachyderm/pfs,pachyderm/pfs | shell | ## Code Before:
set -Eex
DIR="$(cd "$(dirname "${0}")/../.." && pwd)"
cd "${DIR}"
pwd
BINARY="${1}"
LD_FLAGS="${2}"
PROFILE="${3}"
TMP="$(mktemp -d -p . build.XXXXXXXXXX)"
CGO_ENABLED=0 GOOS=linux go build \
-installsuffix netgo \
-tags netgo \
-o ${TMP}/${BINARY} \
-ldflags "${LD_FLAGS}" \
-gcflags "all=-trimpath=$GOPATH" \
src/server/cmd/${BINARY}/main.go
echo "LD_FLAGS=$LD_FLAGS"
# When creating profile binaries, we dont want to detach or do docker ops
if [ -z ${PROFILE} ]
then
cp Dockerfile.${BINARY} ${TMP}/Dockerfile
if [ ${BINARY} = "worker" ]; then
cp ./etc/worker/* ${TMP}/
fi
cp /etc/ssl/certs/ca-certificates.crt ${TMP}/ca-certificates.crt
docker build ${DOCKER_BUILD_FLAGS} -t pachyderm_${BINARY} ${TMP}
docker tag pachyderm_${BINARY}:latest pachyderm/${BINARY}:latest
docker tag pachyderm_${BINARY}:latest pachyderm/${BINARY}:local
else
cd ${TMP}
tar cf - ${BINARY}
fi
rm -rf "${TMP}"
## Instruction:
Use consistent output dir (that depends on binary)
## Code After:
set -Eex
DIR="$(cd "$(dirname "${0}")/../.." && pwd)"
cd "${DIR}"
pwd
BINARY="${1}"
LD_FLAGS="${2}"
PROFILE="${3}"
TMP=docker_build_${BINARY}.tmpdir
mkdir -p "${TMP}"
CGO_ENABLED=0 GOOS=linux go build \
-installsuffix netgo \
-tags netgo \
-o ${TMP}/${BINARY} \
-ldflags "${LD_FLAGS}" \
-gcflags "all=-trimpath=$GOPATH" \
src/server/cmd/${BINARY}/main.go
echo "LD_FLAGS=$LD_FLAGS"
# When creating profile binaries, we dont want to detach or do docker ops
if [ -z ${PROFILE} ]
then
cp Dockerfile.${BINARY} ${TMP}/Dockerfile
if [ ${BINARY} = "worker" ]; then
cp ./etc/worker/* ${TMP}/
fi
cp /etc/ssl/certs/ca-certificates.crt ${TMP}/ca-certificates.crt
docker build ${DOCKER_BUILD_FLAGS} -t pachyderm_${BINARY} ${TMP}
docker tag pachyderm_${BINARY}:latest pachyderm/${BINARY}:latest
docker tag pachyderm_${BINARY}:latest pachyderm/${BINARY}:local
else
cd ${TMP}
tar cf - ${BINARY}
fi
rm -rf "${TMP}"
|
c70fcd73f74e6661ea6e3ace041dd5cd4ad4776f | elements/backbone-collection-renderer.html | elements/backbone-collection-renderer.html | <link rel="import" href="../vendors/polymer/polymer.html">
<dom-module id="backbone-collection-renderer">
<template>
<content id="content"></content>
</template>
</dom-module>
<script>
Polymer({
is: 'backbone-collection-renderer',
properties: {
collection: {
type: Object,
observer: '_onCollectionChange'
},
models: {
type: Array,
value: function() {return [];}
}
},
_onCollectionChange: function(next, prev) {
if (prev) {
prev.off(null, null, this); // Remove all callbacks with this context
}
next.on("add remove change reset", this.renderModelsToTemplate, this);
var el = Polymer.dom(this).node.querySelector(".content");
el.items = next.models;
this.renderModelsToTemplate();
},
renderModelsToTemplate: function() {
var _this = this;
this.splice('models', 0, this.models.length);
this.collection.each(function(model) {
_this.push('models', model);
});
},
ready: function() {
}
});
</script>
| <link rel="import" href="../vendors/polymer/polymer.html">
<dom-module id="backbone-collection-renderer">
<template>
<content id="content"></content>
</template>
</dom-module>
<script>
Polymer({
is: 'backbone-collection-renderer',
properties: {
collection: {
type: Object,
observer: '_onCollectionChange'
},
models: {
type: Array,
value: function() {return [];}
}
},
_onCollectionChange: function(next, prev) {
if (prev) {
prev.off(null, null, this); // Remove all callbacks with this context
}
next.on("add remove change reset", this.renderModelsToTemplate, this);
this.renderModelsToTemplate();
},
renderModelsToTemplate: function() {
var el = Polymer.dom(this).node.querySelector(".content");
if (el) {
if (!el.items) {
el.items = [];
}
el.splice('items', 0, el.items.length);
this.collection.each(function(model) {
el.push('items', model);
});
}
}
});
</script>
| Fix bcr rendering new items | Fix bcr rendering new items
| HTML | mit | RedBulli/LiveSnooker,RedBulli/LiveSnooker,RedBulli/LiveSnooker | html | ## Code Before:
<link rel="import" href="../vendors/polymer/polymer.html">
<dom-module id="backbone-collection-renderer">
<template>
<content id="content"></content>
</template>
</dom-module>
<script>
Polymer({
is: 'backbone-collection-renderer',
properties: {
collection: {
type: Object,
observer: '_onCollectionChange'
},
models: {
type: Array,
value: function() {return [];}
}
},
_onCollectionChange: function(next, prev) {
if (prev) {
prev.off(null, null, this); // Remove all callbacks with this context
}
next.on("add remove change reset", this.renderModelsToTemplate, this);
var el = Polymer.dom(this).node.querySelector(".content");
el.items = next.models;
this.renderModelsToTemplate();
},
renderModelsToTemplate: function() {
var _this = this;
this.splice('models', 0, this.models.length);
this.collection.each(function(model) {
_this.push('models', model);
});
},
ready: function() {
}
});
</script>
## Instruction:
Fix bcr rendering new items
## Code After:
<link rel="import" href="../vendors/polymer/polymer.html">
<dom-module id="backbone-collection-renderer">
<template>
<content id="content"></content>
</template>
</dom-module>
<script>
Polymer({
is: 'backbone-collection-renderer',
properties: {
collection: {
type: Object,
observer: '_onCollectionChange'
},
models: {
type: Array,
value: function() {return [];}
}
},
_onCollectionChange: function(next, prev) {
if (prev) {
prev.off(null, null, this); // Remove all callbacks with this context
}
next.on("add remove change reset", this.renderModelsToTemplate, this);
this.renderModelsToTemplate();
},
renderModelsToTemplate: function() {
var el = Polymer.dom(this).node.querySelector(".content");
if (el) {
if (!el.items) {
el.items = [];
}
el.splice('items', 0, el.items.length);
this.collection.each(function(model) {
el.push('items', model);
});
}
}
});
</script>
|
5504dde1cc940fc8f55ff1bcba7ae225ad9759c1 | account_invoice_subcontractor/models/hr.py | account_invoice_subcontractor/models/hr.py |
from odoo import api, fields, models
class HrEmployee(models.Model):
_inherit = "hr.employee"
@api.model
def _get_subcontractor_type(self):
return [
("trainee", "Trainee"),
("internal", "Internal"),
("external", "External"),
]
subcontractor_company_id = fields.Many2one(
"res.company", string="Subcontractor Company"
)
subcontractor_type = fields.Selection(
string="Subcontractor Type", selection="_get_subcontractor_type", required=True
)
commission_rate = fields.Float(
help="Rate in % for the commission on subcontractor work", default=10.00
)
|
from odoo import api, fields, models
class HrEmployee(models.Model):
_inherit = "hr.employee"
@api.model
def _get_subcontractor_type(self):
return [
("trainee", "Trainee"),
("internal", "Internal"),
("external", "External"),
]
subcontractor_company_id = fields.Many2one(
"res.company", string="Subcontractor Company"
)
subcontractor_type = fields.Selection(
string="Subcontractor Type",
selection="_get_subcontractor_type",
required=True,
default="internal",
)
commission_rate = fields.Float(
help="Rate in % for the commission on subcontractor work", default=10.00
)
| FIX set default subcontractor type on employee | FIX set default subcontractor type on employee
| Python | agpl-3.0 | akretion/subcontractor | python | ## Code Before:
from odoo import api, fields, models
class HrEmployee(models.Model):
_inherit = "hr.employee"
@api.model
def _get_subcontractor_type(self):
return [
("trainee", "Trainee"),
("internal", "Internal"),
("external", "External"),
]
subcontractor_company_id = fields.Many2one(
"res.company", string="Subcontractor Company"
)
subcontractor_type = fields.Selection(
string="Subcontractor Type", selection="_get_subcontractor_type", required=True
)
commission_rate = fields.Float(
help="Rate in % for the commission on subcontractor work", default=10.00
)
## Instruction:
FIX set default subcontractor type on employee
## Code After:
from odoo import api, fields, models
class HrEmployee(models.Model):
_inherit = "hr.employee"
@api.model
def _get_subcontractor_type(self):
return [
("trainee", "Trainee"),
("internal", "Internal"),
("external", "External"),
]
subcontractor_company_id = fields.Many2one(
"res.company", string="Subcontractor Company"
)
subcontractor_type = fields.Selection(
string="Subcontractor Type",
selection="_get_subcontractor_type",
required=True,
default="internal",
)
commission_rate = fields.Float(
help="Rate in % for the commission on subcontractor work", default=10.00
)
|
fbb4e5eb339fcdcc4a74f051cf6095cb6c7cb296 | README.rdoc | README.rdoc | = Project Overview
Project overview is a plugin designed to bring better project visibility for
teams that deal with multiple projects on a daily basis. It is useful for teams
with multiple projects each in different stages.
https://raw.github.com/mbasset/project_overview/master/doc/example1.png
== Customizations
The plugin contains some simple mechanisms to help configure the plugin to match
your teams style of management.
Stale days:: The number of days that a project goes without activity before
being considered stale.
Exclude projects:: Excludes these projects entirely from being disabled on the
project overview page.
== Installation
Navigate to your {REDMINE_ROOT}/plugins and <tt>git clone git://github.com/mbasset/project_overview.git</tt>
After the repo is cloned run the following tasks on your {REDMINE_ROOT}:
* <tt>bundle install</tt>
* <tt>bundle exec rake redmine:plugins NAME=project_overview RAILS_ENV=production</tt> # or development
Restart your redmine and navigate to Administration > Plugins for configuration options
== License
Project overview is released under the MIT License agreement.
| = Project Overview
Project overview is a plugin designed to bring better project visibility for
teams that deal with multiple projects on a daily basis. It is useful for teams
with multiple projects each in different stages.
https://raw.github.com/mbasset/project_overview/master/doc/example1.png
== Customizations
The plugin contains some simple mechanisms to help configure the plugin to match
your teams style of management.
=== Project Settings
Stale enabled:: Whether to enable or disable stale project classifcations.
Number stale days:: The number of days that a project goes without activity before being considered stale.
Exclude projects:: Excludes these projects entirely from being disabled on the project overview page.
=== Team Settings
Number inactive days:: The number of days before a team member is considered inactive.
== Installation
Navigate to your {REDMINE_ROOT}/plugins and <tt>git clone git://github.com/mbasset/project_overview.git</tt>
After the repo is cloned run the following tasks on your {REDMINE_ROOT}:
(1) <tt>bundle install</tt>
(2) <tt>bundle exec rake redmine:plugins NAME=project_overview RAILS_ENV=production</tt>
Restart your redmine and navigate to Administration > Plugins for configuration options
== Contributions
All feedback and contributions are welcome. Simply issue a pull request or create a new issue.
== License
Project overview is released under the MIT License agreement.
| Add in new plugin options to the readme. | Add in new plugin options to the readme.
| RDoc | mit | mbasset/project_overview,mbasset/project_overview,mbasset/project_overview | rdoc | ## Code Before:
= Project Overview
Project overview is a plugin designed to bring better project visibility for
teams that deal with multiple projects on a daily basis. It is useful for teams
with multiple projects each in different stages.
https://raw.github.com/mbasset/project_overview/master/doc/example1.png
== Customizations
The plugin contains some simple mechanisms to help configure the plugin to match
your teams style of management.
Stale days:: The number of days that a project goes without activity before
being considered stale.
Exclude projects:: Excludes these projects entirely from being disabled on the
project overview page.
== Installation
Navigate to your {REDMINE_ROOT}/plugins and <tt>git clone git://github.com/mbasset/project_overview.git</tt>
After the repo is cloned run the following tasks on your {REDMINE_ROOT}:
* <tt>bundle install</tt>
* <tt>bundle exec rake redmine:plugins NAME=project_overview RAILS_ENV=production</tt> # or development
Restart your redmine and navigate to Administration > Plugins for configuration options
== License
Project overview is released under the MIT License agreement.
## Instruction:
Add in new plugin options to the readme.
## Code After:
= Project Overview
Project overview is a plugin designed to bring better project visibility for
teams that deal with multiple projects on a daily basis. It is useful for teams
with multiple projects each in different stages.
https://raw.github.com/mbasset/project_overview/master/doc/example1.png
== Customizations
The plugin contains some simple mechanisms to help configure the plugin to match
your teams style of management.
=== Project Settings
Stale enabled:: Whether to enable or disable stale project classifcations.
Number stale days:: The number of days that a project goes without activity before being considered stale.
Exclude projects:: Excludes these projects entirely from being disabled on the project overview page.
=== Team Settings
Number inactive days:: The number of days before a team member is considered inactive.
== Installation
Navigate to your {REDMINE_ROOT}/plugins and <tt>git clone git://github.com/mbasset/project_overview.git</tt>
After the repo is cloned run the following tasks on your {REDMINE_ROOT}:
(1) <tt>bundle install</tt>
(2) <tt>bundle exec rake redmine:plugins NAME=project_overview RAILS_ENV=production</tt>
Restart your redmine and navigate to Administration > Plugins for configuration options
== Contributions
All feedback and contributions are welcome. Simply issue a pull request or create a new issue.
== License
Project overview is released under the MIT License agreement.
|
74a2fb4af98f98c80aa175167ad9cf4c18ee8f42 | examples/aws-ecs-alb/instance-profile-policy.json | examples/aws-ecs-alb/instance-profile-policy.json | {
"Version": "2012-10-17",
"Statement": [
{
"Sid": "ecsInstanceRole",
"Effect": "Allow",
"Action": [
"ecs:DeregisterContainerInstance",
"ecs:DiscoverPollEndpoint",
"ecs:Poll",
"ecs:RegisterContainerInstance",
"ecs:Submit*"
],
"Resource": [
"*"
]
},
{
"Sid": "allowLoggingToCloudWatch",
"Effect": "Allow",
"Action": [
"logs:CreateLogStream",
"logs:PutLogEvents"
],
"Resource": [
"${app_log_group_arn}",
"${ecs_log_group_arn}"
]
}
]
}
| {
"Version": "2012-10-17",
"Statement": [
{
"Sid": "ecsInstanceRole",
"Effect": "Allow",
"Action": [
"ecs:DeregisterContainerInstance",
"ecs:DiscoverPollEndpoint",
"ecs:Poll",
"ecs:RegisterContainerInstance",
"ecs:Submit*",
"ecs:StartTelemetrySession"
],
"Resource": [
"*"
]
},
{
"Sid": "allowLoggingToCloudWatch",
"Effect": "Allow",
"Action": [
"logs:CreateLogStream",
"logs:PutLogEvents"
],
"Resource": [
"${app_log_group_arn}",
"${ecs_log_group_arn}"
]
}
]
}
| Allow metrics collection in ECS/ALB example policy | examples: Allow metrics collection in ECS/ALB example policy
| JSON | mpl-2.0 | charles-at-geospock/terraform-provider-aws,ashinohara/terraform-provider-aws,nbaztec/terraform-provider-aws,Ninir/terraform-provider-aws,Ninir/terraform-provider-aws,ClementCunin/terraform-provider-aws,kjmkznr/terraform-provider-aws,ClementCunin/terraform-provider-aws,kjmkznr/terraform-provider-aws,nbaztec/terraform-provider-aws,terraform-providers/terraform-provider-aws,terraform-providers/terraform-provider-aws,nbaztec/terraform-provider-aws,Ninir/terraform-provider-aws,ClementCunin/terraform-provider-aws,ashinohara/terraform-provider-aws,terraform-providers/terraform-provider-aws,ashinohara/terraform-provider-aws,charles-at-geospock/terraform-provider-aws,nbaztec/terraform-provider-aws,ashinohara/terraform-provider-aws,charles-at-geospock/terraform-provider-aws,kjmkznr/terraform-provider-aws,Ninir/terraform-provider-aws,ClementCunin/terraform-provider-aws,terraform-providers/terraform-provider-aws,charles-at-geospock/terraform-provider-aws,kjmkznr/terraform-provider-aws | json | ## Code Before:
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "ecsInstanceRole",
"Effect": "Allow",
"Action": [
"ecs:DeregisterContainerInstance",
"ecs:DiscoverPollEndpoint",
"ecs:Poll",
"ecs:RegisterContainerInstance",
"ecs:Submit*"
],
"Resource": [
"*"
]
},
{
"Sid": "allowLoggingToCloudWatch",
"Effect": "Allow",
"Action": [
"logs:CreateLogStream",
"logs:PutLogEvents"
],
"Resource": [
"${app_log_group_arn}",
"${ecs_log_group_arn}"
]
}
]
}
## Instruction:
examples: Allow metrics collection in ECS/ALB example policy
## Code After:
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "ecsInstanceRole",
"Effect": "Allow",
"Action": [
"ecs:DeregisterContainerInstance",
"ecs:DiscoverPollEndpoint",
"ecs:Poll",
"ecs:RegisterContainerInstance",
"ecs:Submit*",
"ecs:StartTelemetrySession"
],
"Resource": [
"*"
]
},
{
"Sid": "allowLoggingToCloudWatch",
"Effect": "Allow",
"Action": [
"logs:CreateLogStream",
"logs:PutLogEvents"
],
"Resource": [
"${app_log_group_arn}",
"${ecs_log_group_arn}"
]
}
]
}
|
3a5cbdbe4a79efd59114ca11f86e282aee0eac5c | tests/trunk_aware.py | tests/trunk_aware.py | import functools
import sys
import nose
from preparation.resources.Resource import trunks_registered, applied_modifiers, resource_by_trunk
__author__ = 'moskupols'
_multiprocess_shared_ = True
_all_trunks = set(trunks_registered())
_trunk_filter = _all_trunks
def trunk_parametrized(trunks=set(trunks_registered())):
def decorate(tester):
@functools.wraps(tester)
def generate_tests(*args):
for t in _trunk_filter & trunks:
yield (tester, t) + args
return generate_tests
return decorate
@functools.lru_cache()
def asset_cache(trunk):
return tuple(applied_modifiers(resource_by_trunk(trunk)()))
def main(args=None):
global _trunk_filter
if args is None:
args = sys.argv
_trunk_filter = _all_trunks & set(args)
if len(_trunk_filter) == 0:
_trunk_filter = _all_trunks
args = [arg for arg in args if arg not in _trunk_filter]
nose.main(argv=args)
| import functools
import sys
import nose
from preparation.resources.Resource import trunks_registered, applied_modifiers, resource_by_trunk
__author__ = 'moskupols'
_multiprocess_shared_ = True
_all_trunks = set(trunks_registered())
_trunk_filter = _all_trunks
def trunk_parametrized(trunks=set(trunks_registered())):
def decorate(tester):
@functools.wraps(tester)
def generate_tests(*args):
for t in _trunk_filter & trunks:
yield (tester, t) + args
return generate_tests
return decorate
@functools.lru_cache()
def asset_cache(trunk):
return tuple(applied_modifiers(resource_by_trunk(trunk)()))
def main(args=None):
global _trunk_filter
if args is None:
args = sys.argv
include = _all_trunks & set(args)
exclude_percented = set('%' + t for t in _all_trunks) & set(args)
exclude = set(e[1:] for e in exclude_percented)
if len(include) == 0:
include = _all_trunks
_trunk_filter = include - exclude
args = [arg for arg in args if arg not in include | exclude_percented]
nose.main(argv=args)
| Add ability to exclude trunks by passing % before it | Add ability to exclude trunks by passing % before it
For example, ./run_nose -v %FilmTitles %BookTitles
| Python | mit | hatbot-team/hatbot_resources | python | ## Code Before:
import functools
import sys
import nose
from preparation.resources.Resource import trunks_registered, applied_modifiers, resource_by_trunk
__author__ = 'moskupols'
_multiprocess_shared_ = True
_all_trunks = set(trunks_registered())
_trunk_filter = _all_trunks
def trunk_parametrized(trunks=set(trunks_registered())):
def decorate(tester):
@functools.wraps(tester)
def generate_tests(*args):
for t in _trunk_filter & trunks:
yield (tester, t) + args
return generate_tests
return decorate
@functools.lru_cache()
def asset_cache(trunk):
return tuple(applied_modifiers(resource_by_trunk(trunk)()))
def main(args=None):
global _trunk_filter
if args is None:
args = sys.argv
_trunk_filter = _all_trunks & set(args)
if len(_trunk_filter) == 0:
_trunk_filter = _all_trunks
args = [arg for arg in args if arg not in _trunk_filter]
nose.main(argv=args)
## Instruction:
Add ability to exclude trunks by passing % before it
For example, ./run_nose -v %FilmTitles %BookTitles
## Code After:
import functools
import sys
import nose
from preparation.resources.Resource import trunks_registered, applied_modifiers, resource_by_trunk
__author__ = 'moskupols'
_multiprocess_shared_ = True
_all_trunks = set(trunks_registered())
_trunk_filter = _all_trunks
def trunk_parametrized(trunks=set(trunks_registered())):
def decorate(tester):
@functools.wraps(tester)
def generate_tests(*args):
for t in _trunk_filter & trunks:
yield (tester, t) + args
return generate_tests
return decorate
@functools.lru_cache()
def asset_cache(trunk):
return tuple(applied_modifiers(resource_by_trunk(trunk)()))
def main(args=None):
global _trunk_filter
if args is None:
args = sys.argv
include = _all_trunks & set(args)
exclude_percented = set('%' + t for t in _all_trunks) & set(args)
exclude = set(e[1:] for e in exclude_percented)
if len(include) == 0:
include = _all_trunks
_trunk_filter = include - exclude
args = [arg for arg in args if arg not in include | exclude_percented]
nose.main(argv=args)
|
e55b9fe0ce459a1090b1f67c6de671e0eec6f0d1 | war/resources/help/project-config/slave.html | war/resources/help/project-config/slave.html | <div>
Sometimes a project can only be successfully built on a particular slave
(or master). If so, this option forces Hudson to always build this project
on a specific computer.
Otherwise, uncheck the box so that Hudson can schedule builds on available
nodes, which results in faster turn-around time.
<p>
This option is also useful when you'd like to make sure that a project can
be built on a particular node.
</div> | <div>
Sometimes a project can only be successfully built on a particular slave
(or master). If so, this option forces Hudson to always build this project
on a specific computer.
If there is a group of machines that the job can be built on, you can specify
that label as the node to tie on, which will cause Hudson to build the
project on any of the machines with that label.
<p>
Otherwise, uncheck the box so that Hudson can schedule builds on available
nodes, which results in faster turn-around time.
<p>
This option is also useful when you'd like to make sure that a project can
be built on a particular node.
</div> | Improve the help text for tied nodes in the job configuration page to document that jobs can be tied to labels. FIXED HUDSON-2139 | Improve the help text for tied nodes in the job configuration page to document
that jobs can be tied to labels. FIXED HUDSON-2139
git-svn-id: 28f34f9aa52bc55a5ddd5be9e183c5cccadc6ee4@21066 71c3de6d-444a-0410-be80-ed276b4c234a
| HTML | mit | jenkinsci/jenkins,arunsingh/jenkins,godfath3r/jenkins,patbos/jenkins,SenolOzer/jenkins,ndeloof/jenkins,jcsirot/jenkins,morficus/jenkins,alvarolobato/jenkins,iterate/coding-dojo,hashar/jenkins,everyonce/jenkins,6WIND/jenkins,csimons/jenkins,vvv444/jenkins,jtnord/jenkins,singh88/jenkins,escoem/jenkins,recena/jenkins,stephenc/jenkins,Wilfred/jenkins,Wilfred/jenkins,v1v/jenkins,stefanbrausch/hudson-main,shahharsh/jenkins,stephenc/jenkins,deadmoose/jenkins,soenter/jenkins,synopsys-arc-oss/jenkins,dennisjlee/jenkins,viqueen/jenkins,jenkinsci/jenkins,tfennelly/jenkins,my7seven/jenkins,github-api-test-org/jenkins,guoxu0514/jenkins,amruthsoft9/Jenkis,batmat/jenkins,mattclark/jenkins,aquarellian/jenkins,ErikVerheul/jenkins,khmarbaise/jenkins,SenolOzer/jenkins,ns163/jenkins,vijayto/jenkins,khmarbaise/jenkins,ChrisA89/jenkins,shahharsh/jenkins,lordofthejars/jenkins,my7seven/jenkins,NehemiahMi/jenkins,1and1/jenkins,pselle/jenkins,scoheb/jenkins,lindzh/jenkins,my7seven/jenkins,Krasnyanskiy/jenkins,ErikVerheul/jenkins,CodeShane/jenkins,thomassuckow/jenkins,paulmillar/jenkins,damianszczepanik/jenkins,iqstack/jenkins,olivergondza/jenkins,elkingtonmcb/jenkins,jzjzjzj/jenkins,jglick/jenkins,DoctorQ/jenkins,keyurpatankar/hudson,protazy/jenkins,dennisjlee/jenkins,tastatur/jenkins,amruthsoft9/Jenkis,mdonohue/jenkins,ns163/jenkins,aquarellian/jenkins,vivek/hudson,FTG-003/jenkins,wangyikai/jenkins,292388900/jenkins,MichaelPranovich/jenkins_sc,ndeloof/jenkins,mcanthony/jenkins,rsandell/jenkins,jpbriend/jenkins,msrb/jenkins,daniel-beck/jenkins,gorcz/jenkins,christ66/jenkins,maikeffi/hudson,viqueen/jenkins,wangyikai/jenkins,jzjzjzj/jenkins,pjanouse/jenkins,recena/jenkins,iterate/coding-dojo,recena/jenkins,lvotypko/jenkins2,iterate/coding-dojo,ndeloof/jenkins,NehemiahMi/jenkins,tastatur/jenkins,amuniz/jenkins,alvarolobato/jenkins,ydubreuil/jenkins,jzjzjzj/jenkins,patbos/jenkins,Wilfred/jenkins,aldaris/jenkins,verbitan/jenkins,albers/jenkins,paulmillar/jenkins,mattclark/jenkins,evernat/jenkins,MarkEWaite/jenkins,h4ck3rm1k3/jenkins,rashmikanta-1984/jenkins,albers/jenkins,verbitan/jenkins,Jimilian/jenkins,andresrc/jenkins,FTG-003/jenkins,godfath3r/jenkins,lvotypko/jenkins,tfennelly/jenkins,liorhson/jenkins,pselle/jenkins,DoctorQ/jenkins,MadsNielsen/jtemp,kzantow/jenkins,SenolOzer/jenkins,synopsys-arc-oss/jenkins,varmenise/jenkins,jglick/jenkins,svanoort/jenkins,pselle/jenkins,pselle/jenkins,azweb76/jenkins,jcarrothers-sap/jenkins,jhoblitt/jenkins,mdonohue/jenkins,iqstack/jenkins,godfath3r/jenkins,gorcz/jenkins,hplatou/jenkins,vvv444/jenkins,nandan4/Jenkins,msrb/jenkins,guoxu0514/jenkins,aheritier/jenkins,mrobinet/jenkins,daniel-beck/jenkins,csimons/jenkins,ikedam/jenkins,daspilker/jenkins,akshayabd/jenkins,oleg-nenashev/jenkins,kzantow/jenkins,paulmillar/jenkins,jcsirot/jenkins,aldaris/jenkins,jtnord/jenkins,lilyJi/jenkins,olivergondza/jenkins,kohsuke/hudson,liupugong/jenkins,MichaelPranovich/jenkins_sc,Jimilian/jenkins,csimons/jenkins,sathiya-mit/jenkins,mrobinet/jenkins,guoxu0514/jenkins,lvotypko/jenkins,dariver/jenkins,Wilfred/jenkins,aquarellian/jenkins,lvotypko/jenkins2,goldchang/jenkins,morficus/jenkins,vijayto/jenkins,vlajos/jenkins,elkingtonmcb/jenkins,amuniz/jenkins,thomassuckow/jenkins,jk47/jenkins,liupugong/jenkins,gitaccountforprashant/gittest,v1v/jenkins,brunocvcunha/jenkins,recena/jenkins,1and1/jenkins,samatdav/jenkins,jk47/jenkins,mattclark/jenkins,ajshastri/jenkins,SenolOzer/jenkins,elkingtonmcb/jenkins,ErikVerheul/jenkins,guoxu0514/jenkins,nandan4/Jenkins,lvotypko/jenkins3,Ykus/jenkins,alvarolobato/jenkins,paulwellnerbou/jenkins,jglick/jenkins,goldchang/jenkins,amruthsoft9/Jenkis,rlugojr/jenkins,ikedam/jenkins,liupugong/jenkins,FarmGeek4Life/jenkins,jtnord/jenkins,soenter/jenkins,thomassuckow/jenkins,kohsuke/hudson,chbiel/jenkins,iqstack/jenkins,jzjzjzj/jenkins,singh88/jenkins,evernat/jenkins,v1v/jenkins,intelchen/jenkins,1and1/jenkins,rashmikanta-1984/jenkins,tfennelly/jenkins,hudson/hudson-2.x,pjanouse/jenkins,tastatur/jenkins,brunocvcunha/jenkins,vijayto/jenkins,viqueen/jenkins,jhoblitt/jenkins,singh88/jenkins,ydubreuil/jenkins,ikedam/jenkins,amuniz/jenkins,Vlatombe/jenkins,nandan4/Jenkins,hudson/hudson-2.x,mcanthony/jenkins,vjuranek/jenkins,MadsNielsen/jtemp,lvotypko/jenkins3,gitaccountforprashant/gittest,godfath3r/jenkins,vlajos/jenkins,vlajos/jenkins,goldchang/jenkins,deadmoose/jenkins,Ykus/jenkins,noikiy/jenkins,batmat/jenkins,jhoblitt/jenkins,MadsNielsen/jtemp,ndeloof/jenkins,stefanbrausch/hudson-main,keyurpatankar/hudson,DanielWeber/jenkins,iterate/coding-dojo,stephenc/jenkins,everyonce/jenkins,vjuranek/jenkins,mdonohue/jenkins,varmenise/jenkins,everyonce/jenkins,deadmoose/jenkins,aduprat/jenkins,sathiya-mit/jenkins,AustinKwang/jenkins,evernat/jenkins,jhoblitt/jenkins,intelchen/jenkins,damianszczepanik/jenkins,aduprat/jenkins,huybrechts/hudson,scoheb/jenkins,thomassuckow/jenkins,gusreiber/jenkins,liupugong/jenkins,mdonohue/jenkins,paulmillar/jenkins,evernat/jenkins,bpzhang/jenkins,gusreiber/jenkins,mcanthony/jenkins,morficus/jenkins,lordofthejars/jenkins,maikeffi/hudson,pjanouse/jenkins,ydubreuil/jenkins,hashar/jenkins,damianszczepanik/jenkins,Vlatombe/jenkins,mpeltonen/jenkins,jpbriend/jenkins,aduprat/jenkins,Jimilian/jenkins,sathiya-mit/jenkins,jpederzolli/jenkins-1,Wilfred/jenkins,pantheon-systems/jenkins,MichaelPranovich/jenkins_sc,rashmikanta-1984/jenkins,viqueen/jenkins,liorhson/jenkins,seanlin816/jenkins,deadmoose/jenkins,verbitan/jenkins,fbelzunc/jenkins,FTG-003/jenkins,lindzh/jenkins,rlugojr/jenkins,Vlatombe/jenkins,Jochen-A-Fuerbacher/jenkins,jenkinsci/jenkins,svanoort/jenkins,aquarellian/jenkins,synopsys-arc-oss/jenkins,samatdav/jenkins,paulwellnerbou/jenkins,noikiy/jenkins,maikeffi/hudson,luoqii/jenkins,gorcz/jenkins,wangyikai/jenkins,SebastienGllmt/jenkins,h4ck3rm1k3/jenkins,KostyaSha/jenkins,1and1/jenkins,evernat/jenkins,arcivanov/jenkins,6WIND/jenkins,noikiy/jenkins,abayer/jenkins,mdonohue/jenkins,my7seven/jenkins,jhoblitt/jenkins,dennisjlee/jenkins,jzjzjzj/jenkins,SebastienGllmt/jenkins,bkmeneguello/jenkins,aldaris/jenkins,oleg-nenashev/jenkins,noikiy/jenkins,DanielWeber/jenkins,gusreiber/jenkins,hplatou/jenkins,samatdav/jenkins,Jimilian/jenkins,hemantojhaa/jenkins,vivek/hudson,vvv444/jenkins,aheritier/jenkins,mcanthony/jenkins,jpbriend/jenkins,andresrc/jenkins,recena/jenkins,bkmeneguello/jenkins,godfath3r/jenkins,albers/jenkins,FTG-003/jenkins,gorcz/jenkins,hemantojhaa/jenkins,ydubreuil/jenkins,protazy/jenkins,paulwellnerbou/jenkins,soenter/jenkins,dariver/jenkins,ErikVerheul/jenkins,intelchen/jenkins,jenkinsci/jenkins,lilyJi/jenkins,jpbriend/jenkins,Jimilian/jenkins,verbitan/jenkins,rsandell/jenkins,dennisjlee/jenkins,yonglehou/jenkins,ikedam/jenkins,AustinKwang/jenkins,lvotypko/jenkins3,abayer/jenkins,fbelzunc/jenkins,kzantow/jenkins,dariver/jenkins,vivek/hudson,hudson/hudson-2.x,lvotypko/jenkins3,pantheon-systems/jenkins,lvotypko/jenkins2,arcivanov/jenkins,iqstack/jenkins,jcsirot/jenkins,CodeShane/jenkins,varmenise/jenkins,mattclark/jenkins,amuniz/jenkins,h4ck3rm1k3/jenkins,gusreiber/jenkins,vivek/hudson,jtnord/jenkins,gusreiber/jenkins,FarmGeek4Life/jenkins,godfath3r/jenkins,AustinKwang/jenkins,tangkun75/jenkins,synopsys-arc-oss/jenkins,pjanouse/jenkins,duzifang/my-jenkins,jk47/jenkins,lvotypko/jenkins,maikeffi/hudson,keyurpatankar/hudson,albers/jenkins,mcanthony/jenkins,MarkEWaite/jenkins,SebastienGllmt/jenkins,FarmGeek4Life/jenkins,dbroady1/jenkins,MadsNielsen/jtemp,seanlin816/jenkins,akshayabd/jenkins,patbos/jenkins,liorhson/jenkins,damianszczepanik/jenkins,jhoblitt/jenkins,mdonohue/jenkins,Vlatombe/jenkins,NehemiahMi/jenkins,batmat/jenkins,sathiya-mit/jenkins,bpzhang/jenkins,dariver/jenkins,khmarbaise/jenkins,elkingtonmcb/jenkins,wuwen5/jenkins,huybrechts/hudson,evernat/jenkins,aduprat/jenkins,liorhson/jenkins,akshayabd/jenkins,lindzh/jenkins,lvotypko/jenkins,maikeffi/hudson,jcarrothers-sap/jenkins,chbiel/jenkins,daniel-beck/jenkins,mdonohue/jenkins,my7seven/jenkins,vjuranek/jenkins,kohsuke/hudson,everyonce/jenkins,synopsys-arc-oss/jenkins,ikedam/jenkins,azweb76/jenkins,arcivanov/jenkins,ns163/jenkins,amruthsoft9/Jenkis,lvotypko/jenkins2,kohsuke/hudson,CodeShane/jenkins,Krasnyanskiy/jenkins,thomassuckow/jenkins,stephenc/jenkins,yonglehou/jenkins,bkmeneguello/jenkins,github-api-test-org/jenkins,azweb76/jenkins,rsandell/jenkins,MadsNielsen/jtemp,luoqii/jenkins,olivergondza/jenkins,vvv444/jenkins,FTG-003/jenkins,ikedam/jenkins,duzifang/my-jenkins,intelchen/jenkins,wuwen5/jenkins,jpbriend/jenkins,KostyaSha/jenkins,vvv444/jenkins,msrb/jenkins,lvotypko/jenkins2,MadsNielsen/jtemp,dbroady1/jenkins,hashar/jenkins,Jochen-A-Fuerbacher/jenkins,scoheb/jenkins,petermarcoen/jenkins,protazy/jenkins,lilyJi/jenkins,seanlin816/jenkins,duzifang/my-jenkins,jglick/jenkins,292388900/jenkins,aquarellian/jenkins,MarkEWaite/jenkins,lvotypko/jenkins3,Ykus/jenkins,patbos/jenkins,ndeloof/jenkins,lvotypko/jenkins3,daniel-beck/jenkins,liorhson/jenkins,liorhson/jenkins,dbroady1/jenkins,christ66/jenkins,Ykus/jenkins,singh88/jenkins,nandan4/Jenkins,verbitan/jenkins,iqstack/jenkins,Wilfred/jenkins,Krasnyanskiy/jenkins,yonglehou/jenkins,dbroady1/jenkins,protazy/jenkins,FarmGeek4Life/jenkins,aldaris/jenkins,rashmikanta-1984/jenkins,jcsirot/jenkins,SebastienGllmt/jenkins,viqueen/jenkins,mrobinet/jenkins,daniel-beck/jenkins,wuwen5/jenkins,petermarcoen/jenkins,mpeltonen/jenkins,azweb76/jenkins,synopsys-arc-oss/jenkins,mpeltonen/jenkins,elkingtonmcb/jenkins,scoheb/jenkins,hplatou/jenkins,jpederzolli/jenkins-1,CodeShane/jenkins,github-api-test-org/jenkins,seanlin816/jenkins,Jimilian/jenkins,SebastienGllmt/jenkins,christ66/jenkins,luoqii/jenkins,NehemiahMi/jenkins,vijayto/jenkins,arcivanov/jenkins,varmenise/jenkins,gusreiber/jenkins,6WIND/jenkins,ChrisA89/jenkins,huybrechts/hudson,daniel-beck/jenkins,ns163/jenkins,chbiel/jenkins,abayer/jenkins,yonglehou/jenkins,noikiy/jenkins,arunsingh/jenkins,andresrc/jenkins,ErikVerheul/jenkins,wangyikai/jenkins,scoheb/jenkins,SebastienGllmt/jenkins,amuniz/jenkins,duzifang/my-jenkins,escoem/jenkins,morficus/jenkins,oleg-nenashev/jenkins,jcsirot/jenkins,dbroady1/jenkins,soenter/jenkins,ikedam/jenkins,jcarrothers-sap/jenkins,hemantojhaa/jenkins,mrooney/jenkins,292388900/jenkins,escoem/jenkins,scoheb/jenkins,seanlin816/jenkins,seanlin816/jenkins,vijayto/jenkins,khmarbaise/jenkins,pantheon-systems/jenkins,AustinKwang/jenkins,thomassuckow/jenkins,github-api-test-org/jenkins,vivek/hudson,tangkun75/jenkins,jtnord/jenkins,hudson/hudson-2.x,duzifang/my-jenkins,singh88/jenkins,hashar/jenkins,varmenise/jenkins,damianszczepanik/jenkins,stefanbrausch/hudson-main,292388900/jenkins,akshayabd/jenkins,alvarolobato/jenkins,iqstack/jenkins,fbelzunc/jenkins,huybrechts/hudson,pselle/jenkins,alvarolobato/jenkins,pantheon-systems/jenkins,Krasnyanskiy/jenkins,escoem/jenkins,jk47/jenkins,varmenise/jenkins,csimons/jenkins,SenolOzer/jenkins,goldchang/jenkins,abayer/jenkins,wuwen5/jenkins,kzantow/jenkins,lordofthejars/jenkins,ErikVerheul/jenkins,arunsingh/jenkins,keyurpatankar/hudson,stephenc/jenkins,goldchang/jenkins,luoqii/jenkins,hashar/jenkins,deadmoose/jenkins,bpzhang/jenkins,ns163/jenkins,ydubreuil/jenkins,rsandell/jenkins,elkingtonmcb/jenkins,christ66/jenkins,patbos/jenkins,rsandell/jenkins,DanielWeber/jenkins,iterate/coding-dojo,everyonce/jenkins,msrb/jenkins,singh88/jenkins,stephenc/jenkins,FTG-003/jenkins,jpbriend/jenkins,mrooney/jenkins,fbelzunc/jenkins,gitaccountforprashant/gittest,NehemiahMi/jenkins,chbiel/jenkins,Ykus/jenkins,pjanouse/jenkins,hemantojhaa/jenkins,noikiy/jenkins,tfennelly/jenkins,fbelzunc/jenkins,christ66/jenkins,jcarrothers-sap/jenkins,vlajos/jenkins,ndeloof/jenkins,lvotypko/jenkins,lordofthejars/jenkins,hplatou/jenkins,mrooney/jenkins,morficus/jenkins,synopsys-arc-oss/jenkins,guoxu0514/jenkins,gorcz/jenkins,azweb76/jenkins,v1v/jenkins,mrobinet/jenkins,KostyaSha/jenkins,brunocvcunha/jenkins,andresrc/jenkins,kohsuke/hudson,6WIND/jenkins,albers/jenkins,my7seven/jenkins,vlajos/jenkins,Krasnyanskiy/jenkins,Vlatombe/jenkins,v1v/jenkins,jpbriend/jenkins,mpeltonen/jenkins,daspilker/jenkins,KostyaSha/jenkins,daspilker/jenkins,rlugojr/jenkins,olivergondza/jenkins,lvotypko/jenkins,jzjzjzj/jenkins,protazy/jenkins,mpeltonen/jenkins,wangyikai/jenkins,292388900/jenkins,kohsuke/hudson,varmenise/jenkins,yonglehou/jenkins,pselle/jenkins,DoctorQ/jenkins,escoem/jenkins,bpzhang/jenkins,MadsNielsen/jtemp,tangkun75/jenkins,jzjzjzj/jenkins,morficus/jenkins,csimons/jenkins,ChrisA89/jenkins,samatdav/jenkins,svanoort/jenkins,wuwen5/jenkins,CodeShane/jenkins,tastatur/jenkins,recena/jenkins,dariver/jenkins,rsandell/jenkins,tfennelly/jenkins,vijayto/jenkins,petermarcoen/jenkins,DanielWeber/jenkins,tastatur/jenkins,amruthsoft9/Jenkis,aduprat/jenkins,v1v/jenkins,batmat/jenkins,stephenc/jenkins,ydubreuil/jenkins,msrb/jenkins,gitaccountforprashant/gittest,shahharsh/jenkins,ns163/jenkins,escoem/jenkins,batmat/jenkins,jpederzolli/jenkins-1,singh88/jenkins,gitaccountforprashant/gittest,arunsingh/jenkins,abayer/jenkins,stefanbrausch/hudson-main,stefanbrausch/hudson-main,lvotypko/jenkins2,pantheon-systems/jenkins,rashmikanta-1984/jenkins,NehemiahMi/jenkins,iqstack/jenkins,brunocvcunha/jenkins,hudson/hudson-2.x,chbiel/jenkins,ErikVerheul/jenkins,vijayto/jenkins,jk47/jenkins,jtnord/jenkins,arunsingh/jenkins,aduprat/jenkins,SebastienGllmt/jenkins,petermarcoen/jenkins,lvotypko/jenkins2,FarmGeek4Life/jenkins,dbroady1/jenkins,bkmeneguello/jenkins,msrb/jenkins,wuwen5/jenkins,viqueen/jenkins,ChrisA89/jenkins,pantheon-systems/jenkins,brunocvcunha/jenkins,soenter/jenkins,viqueen/jenkins,andresrc/jenkins,lordofthejars/jenkins,scoheb/jenkins,aduprat/jenkins,abayer/jenkins,jcarrothers-sap/jenkins,AustinKwang/jenkins,jenkinsci/jenkins,azweb76/jenkins,arcivanov/jenkins,gitaccountforprashant/gittest,Jochen-A-Fuerbacher/jenkins,dariver/jenkins,thomassuckow/jenkins,hudson/hudson-2.x,keyurpatankar/hudson,maikeffi/hudson,ajshastri/jenkins,patbos/jenkins,ajshastri/jenkins,DanielWeber/jenkins,jcsirot/jenkins,daspilker/jenkins,jglick/jenkins,amruthsoft9/Jenkis,paulmillar/jenkins,intelchen/jenkins,vlajos/jenkins,lordofthejars/jenkins,iterate/coding-dojo,DoctorQ/jenkins,rlugojr/jenkins,rsandell/jenkins,DoctorQ/jenkins,1and1/jenkins,ajshastri/jenkins,shahharsh/jenkins,ydubreuil/jenkins,bkmeneguello/jenkins,liupugong/jenkins,wuwen5/jenkins,duzifang/my-jenkins,protazy/jenkins,huybrechts/hudson,guoxu0514/jenkins,stefanbrausch/hudson-main,batmat/jenkins,olivergondza/jenkins,daniel-beck/jenkins,h4ck3rm1k3/jenkins,kohsuke/hudson,MichaelPranovich/jenkins_sc,hplatou/jenkins,patbos/jenkins,escoem/jenkins,andresrc/jenkins,alvarolobato/jenkins,6WIND/jenkins,Krasnyanskiy/jenkins,intelchen/jenkins,DanielWeber/jenkins,sathiya-mit/jenkins,damianszczepanik/jenkins,MichaelPranovich/jenkins_sc,arunsingh/jenkins,kohsuke/hudson,AustinKwang/jenkins,akshayabd/jenkins,1and1/jenkins,paulwellnerbou/jenkins,FTG-003/jenkins,alvarolobato/jenkins,Jochen-A-Fuerbacher/jenkins,oleg-nenashev/jenkins,brunocvcunha/jenkins,luoqii/jenkins,abayer/jenkins,huybrechts/hudson,tastatur/jenkins,FarmGeek4Life/jenkins,mrooney/jenkins,mattclark/jenkins,jk47/jenkins,hashar/jenkins,aheritier/jenkins,paulmillar/jenkins,hemantojhaa/jenkins,duzifang/my-jenkins,goldchang/jenkins,mpeltonen/jenkins,github-api-test-org/jenkins,christ66/jenkins,soenter/jenkins,pjanouse/jenkins,MichaelPranovich/jenkins_sc,seanlin816/jenkins,lilyJi/jenkins,jenkinsci/jenkins,liupugong/jenkins,elkingtonmcb/jenkins,Ykus/jenkins,lindzh/jenkins,shahharsh/jenkins,Vlatombe/jenkins,csimons/jenkins,huybrechts/hudson,verbitan/jenkins,everyonce/jenkins,KostyaSha/jenkins,paulwellnerbou/jenkins,lvotypko/jenkins,aheritier/jenkins,jenkinsci/jenkins,akshayabd/jenkins,NehemiahMi/jenkins,DanielWeber/jenkins,wangyikai/jenkins,samatdav/jenkins,goldchang/jenkins,rlugojr/jenkins,ajshastri/jenkins,tangkun75/jenkins,ajshastri/jenkins,Jochen-A-Fuerbacher/jenkins,goldchang/jenkins,tangkun75/jenkins,ChrisA89/jenkins,albers/jenkins,rashmikanta-1984/jenkins,lilyJi/jenkins,bpzhang/jenkins,Jochen-A-Fuerbacher/jenkins,petermarcoen/jenkins,aldaris/jenkins,lindzh/jenkins,MarkEWaite/jenkins,aldaris/jenkins,olivergondza/jenkins,mcanthony/jenkins,svanoort/jenkins,lvotypko/jenkins3,jzjzjzj/jenkins,pantheon-systems/jenkins,mrobinet/jenkins,recena/jenkins,jcarrothers-sap/jenkins,maikeffi/hudson,shahharsh/jenkins,khmarbaise/jenkins,h4ck3rm1k3/jenkins,maikeffi/hudson,brunocvcunha/jenkins,paulwellnerbou/jenkins,svanoort/jenkins,soenter/jenkins,6WIND/jenkins,lindzh/jenkins,amuniz/jenkins,protazy/jenkins,tangkun75/jenkins,liupugong/jenkins,rsandell/jenkins,aheritier/jenkins,h4ck3rm1k3/jenkins,Ykus/jenkins,jk47/jenkins,github-api-test-org/jenkins,hemantojhaa/jenkins,noikiy/jenkins,tfennelly/jenkins,292388900/jenkins,jtnord/jenkins,KostyaSha/jenkins,evernat/jenkins,mpeltonen/jenkins,KostyaSha/jenkins,luoqii/jenkins,ChrisA89/jenkins,CodeShane/jenkins,mrobinet/jenkins,SenolOzer/jenkins,hemantojhaa/jenkins,rashmikanta-1984/jenkins,verbitan/jenkins,bkmeneguello/jenkins,oleg-nenashev/jenkins,oleg-nenashev/jenkins,jpederzolli/jenkins-1,chbiel/jenkins,v1v/jenkins,6WIND/jenkins,daspilker/jenkins,tangkun75/jenkins,my7seven/jenkins,mrooney/jenkins,tfennelly/jenkins,vjuranek/jenkins,fbelzunc/jenkins,DoctorQ/jenkins,KostyaSha/jenkins,aldaris/jenkins,github-api-test-org/jenkins,vivek/hudson,FarmGeek4Life/jenkins,khmarbaise/jenkins,arcivanov/jenkins,ChrisA89/jenkins,shahharsh/jenkins,petermarcoen/jenkins,olivergondza/jenkins,paulwellnerbou/jenkins,jcarrothers-sap/jenkins,azweb76/jenkins,vivek/hudson,amruthsoft9/Jenkis,dennisjlee/jenkins,gorcz/jenkins,andresrc/jenkins,vjuranek/jenkins,hashar/jenkins,stefanbrausch/hudson-main,github-api-test-org/jenkins,amuniz/jenkins,pselle/jenkins,yonglehou/jenkins,dbroady1/jenkins,lordofthejars/jenkins,hplatou/jenkins,aheritier/jenkins,bpzhang/jenkins,csimons/jenkins,dennisjlee/jenkins,tastatur/jenkins,Vlatombe/jenkins,nandan4/Jenkins,MarkEWaite/jenkins,iterate/coding-dojo,MarkEWaite/jenkins,mcanthony/jenkins,damianszczepanik/jenkins,dariver/jenkins,morficus/jenkins,aheritier/jenkins,wangyikai/jenkins,daspilker/jenkins,rlugojr/jenkins,jcsirot/jenkins,jglick/jenkins,jenkinsci/jenkins,jpederzolli/jenkins-1,ajshastri/jenkins,yonglehou/jenkins,vivek/hudson,dennisjlee/jenkins,vvv444/jenkins,deadmoose/jenkins,luoqii/jenkins,Jochen-A-Fuerbacher/jenkins,292388900/jenkins,bkmeneguello/jenkins,lindzh/jenkins,Krasnyanskiy/jenkins,sathiya-mit/jenkins,vlajos/jenkins,gusreiber/jenkins,DoctorQ/jenkins,keyurpatankar/hudson,keyurpatankar/hudson,svanoort/jenkins,1and1/jenkins,nandan4/Jenkins,fbelzunc/jenkins,CodeShane/jenkins,paulmillar/jenkins,akshayabd/jenkins,jpederzolli/jenkins-1,kzantow/jenkins,hplatou/jenkins,MarkEWaite/jenkins,arcivanov/jenkins,nandan4/Jenkins,MarkEWaite/jenkins,jpederzolli/jenkins-1,oleg-nenashev/jenkins,h4ck3rm1k3/jenkins,godfath3r/jenkins,rlugojr/jenkins,mattclark/jenkins,kzantow/jenkins,jcarrothers-sap/jenkins,ndeloof/jenkins,daspilker/jenkins,samatdav/jenkins,Wilfred/jenkins,christ66/jenkins,vjuranek/jenkins,keyurpatankar/hudson,daniel-beck/jenkins,gorcz/jenkins,arunsingh/jenkins,deadmoose/jenkins,vvv444/jenkins,damianszczepanik/jenkins,petermarcoen/jenkins,gorcz/jenkins,DoctorQ/jenkins,shahharsh/jenkins,sathiya-mit/jenkins,bpzhang/jenkins,jglick/jenkins,batmat/jenkins,guoxu0514/jenkins,ikedam/jenkins,mrooney/jenkins,lilyJi/jenkins,svanoort/jenkins,Jimilian/jenkins,mrooney/jenkins,mattclark/jenkins,gitaccountforprashant/gittest,lilyJi/jenkins,pjanouse/jenkins,liorhson/jenkins,jhoblitt/jenkins,MichaelPranovich/jenkins_sc,chbiel/jenkins,khmarbaise/jenkins,samatdav/jenkins,aquarellian/jenkins,intelchen/jenkins,SenolOzer/jenkins,albers/jenkins,msrb/jenkins,mrobinet/jenkins,kzantow/jenkins,aquarellian/jenkins,AustinKwang/jenkins,vjuranek/jenkins,everyonce/jenkins,ns163/jenkins | html | ## Code Before:
<div>
Sometimes a project can only be successfully built on a particular slave
(or master). If so, this option forces Hudson to always build this project
on a specific computer.
Otherwise, uncheck the box so that Hudson can schedule builds on available
nodes, which results in faster turn-around time.
<p>
This option is also useful when you'd like to make sure that a project can
be built on a particular node.
</div>
## Instruction:
Improve the help text for tied nodes in the job configuration page to document
that jobs can be tied to labels. FIXED HUDSON-2139
git-svn-id: 28f34f9aa52bc55a5ddd5be9e183c5cccadc6ee4@21066 71c3de6d-444a-0410-be80-ed276b4c234a
## Code After:
<div>
Sometimes a project can only be successfully built on a particular slave
(or master). If so, this option forces Hudson to always build this project
on a specific computer.
If there is a group of machines that the job can be built on, you can specify
that label as the node to tie on, which will cause Hudson to build the
project on any of the machines with that label.
<p>
Otherwise, uncheck the box so that Hudson can schedule builds on available
nodes, which results in faster turn-around time.
<p>
This option is also useful when you'd like to make sure that a project can
be built on a particular node.
</div> |
7ed7a3aa5d9fdf08b7645bffabbe6b1c8029a129 | CHANGELOG.md | CHANGELOG.md | All notable changes to this project will be documented in this file.
Adheres to [Semantic Versioning](http://semver.org/).
---
## 1.0.2 (TBD)
* TBD
## [1.0.1](https://github.com/ngageoint/geopackage-tiff-java/releases/tag/1.0.1) (03-02-2017)
* LZW Compression modified to handle non contiguous table codes
## [1.0.0](https://github.com/ngageoint/geopackage-tiff-java/releases/tag/1.0.0) (10-04-2016)
* Initial Release
| All notable changes to this project will be documented in this file.
Adheres to [Semantic Versioning](http://semver.org/).
---
## 1.0.2 (TBD)
* Handle fewer SampleFormat values are specified than SamplesPerPixel. Defaults to 1 (unsigned integer data).
## [1.0.1](https://github.com/ngageoint/geopackage-tiff-java/releases/tag/1.0.1) (03-02-2017)
* LZW Compression modified to handle non contiguous table codes
## [1.0.0](https://github.com/ngageoint/geopackage-tiff-java/releases/tag/1.0.0) (10-04-2016)
* Initial Release
| Handle fewer SampleFormat values are specified than SamplesPerPixel. Defaults to 1 (unsigned integer data). | Handle fewer SampleFormat values are specified than SamplesPerPixel. Defaults to 1 (unsigned integer data).
| Markdown | mit | ngageoint/geopackage-tiff-java | markdown | ## Code Before:
All notable changes to this project will be documented in this file.
Adheres to [Semantic Versioning](http://semver.org/).
---
## 1.0.2 (TBD)
* TBD
## [1.0.1](https://github.com/ngageoint/geopackage-tiff-java/releases/tag/1.0.1) (03-02-2017)
* LZW Compression modified to handle non contiguous table codes
## [1.0.0](https://github.com/ngageoint/geopackage-tiff-java/releases/tag/1.0.0) (10-04-2016)
* Initial Release
## Instruction:
Handle fewer SampleFormat values are specified than SamplesPerPixel. Defaults to 1 (unsigned integer data).
## Code After:
All notable changes to this project will be documented in this file.
Adheres to [Semantic Versioning](http://semver.org/).
---
## 1.0.2 (TBD)
* Handle fewer SampleFormat values are specified than SamplesPerPixel. Defaults to 1 (unsigned integer data).
## [1.0.1](https://github.com/ngageoint/geopackage-tiff-java/releases/tag/1.0.1) (03-02-2017)
* LZW Compression modified to handle non contiguous table codes
## [1.0.0](https://github.com/ngageoint/geopackage-tiff-java/releases/tag/1.0.0) (10-04-2016)
* Initial Release
|
7106d1f35c58ac7e267edb5f911f6f3e88b8c231 | src/components/EntryDetails.coffee | src/components/EntryDetails.coffee |
React = require "react"
PureMixin = require "react-pure-render/mixin"
{ NAMES, CSS_CLASSES } = require "../constants/Categories"
{ div, p, h3, button, span, i } = React.DOM
module.exports = React.createClass
displayName: "EntryDetails"
mixins: [ PureMixin ]
render: ->
{ entry } = @props
clz = CSS_CLASSES[entry.categories?[0]]
div className: "entry-detail #{clz}",
div className: "category",
span null, NAMES[entry.categories?[0]]
div null,
h3 null, entry.title
p null, entry.description
p null, entry.homepage
p null, entry.phone
div null,
button
onClick: @props.onClose
className: "pure-button",
i className: "fa fa-chevron-left"
"zurück"
button
onClick: @props.onEdit
className: "pure-button",
i className: "fa fa-pencil"
"bearbeiten"
|
React = require "react"
PureMixin = require "react-pure-render/mixin"
{ NAMES, CSS_CLASSES } = require "../constants/Categories"
{ div, p, h3, button, span, i, a } = React.DOM
module.exports = React.createClass
displayName: "EntryDetails"
mixins: [ PureMixin ]
render: ->
{ entry } = @props
clz = CSS_CLASSES[entry.categories?[0]]
div className: "entry-detail #{clz}",
div className: "category",
span null, NAMES[entry.categories?[0]]
div null,
h3 null, entry.title
p null, entry.description
p null, a href: entry.homepage, entry.homepage
p null, entry.phone
div null,
button
onClick: @props.onClose
className: "pure-button",
i className: "fa fa-chevron-left"
"zurück"
button
onClick: @props.onEdit
className: "pure-button",
i className: "fa fa-pencil"
"bearbeiten"
| Make Homepage field clickable/a hyperlink | fix(details): Make Homepage field clickable/a hyperlink
| CoffeeScript | agpl-3.0 | sebokopter/kartevonmorgen,regenduft/kartevonmorgen,flosse/kartevonmorgen,flosse/kartevonmorgen,regenduft/kartevonmorgen | coffeescript | ## Code Before:
React = require "react"
PureMixin = require "react-pure-render/mixin"
{ NAMES, CSS_CLASSES } = require "../constants/Categories"
{ div, p, h3, button, span, i } = React.DOM
module.exports = React.createClass
displayName: "EntryDetails"
mixins: [ PureMixin ]
render: ->
{ entry } = @props
clz = CSS_CLASSES[entry.categories?[0]]
div className: "entry-detail #{clz}",
div className: "category",
span null, NAMES[entry.categories?[0]]
div null,
h3 null, entry.title
p null, entry.description
p null, entry.homepage
p null, entry.phone
div null,
button
onClick: @props.onClose
className: "pure-button",
i className: "fa fa-chevron-left"
"zurück"
button
onClick: @props.onEdit
className: "pure-button",
i className: "fa fa-pencil"
"bearbeiten"
## Instruction:
fix(details): Make Homepage field clickable/a hyperlink
## Code After:
React = require "react"
PureMixin = require "react-pure-render/mixin"
{ NAMES, CSS_CLASSES } = require "../constants/Categories"
{ div, p, h3, button, span, i, a } = React.DOM
module.exports = React.createClass
displayName: "EntryDetails"
mixins: [ PureMixin ]
render: ->
{ entry } = @props
clz = CSS_CLASSES[entry.categories?[0]]
div className: "entry-detail #{clz}",
div className: "category",
span null, NAMES[entry.categories?[0]]
div null,
h3 null, entry.title
p null, entry.description
p null, a href: entry.homepage, entry.homepage
p null, entry.phone
div null,
button
onClick: @props.onClose
className: "pure-button",
i className: "fa fa-chevron-left"
"zurück"
button
onClick: @props.onEdit
className: "pure-button",
i className: "fa fa-pencil"
"bearbeiten"
|
f08f169ebd77bb901169880e435f226d85e025ae | app/models/event.rb | app/models/event.rb | class Event < ApplicationRecord
has_many :shifts, dependent: :destroy
validates :shift_length, :address, presence: true
end
| class Event < ApplicationRecord
has_many :shifts, dependent: :destroy
validates :shift_length, :address, presence: true
accepts_nested_attributes_for :shifts
end
| Implement nested shift attribute acceptance | Implement nested shift attribute acceptance
| Ruby | agpl-3.0 | where2help/where2help,where2help/where2help,where2help/where2help | ruby | ## Code Before:
class Event < ApplicationRecord
has_many :shifts, dependent: :destroy
validates :shift_length, :address, presence: true
end
## Instruction:
Implement nested shift attribute acceptance
## Code After:
class Event < ApplicationRecord
has_many :shifts, dependent: :destroy
validates :shift_length, :address, presence: true
accepts_nested_attributes_for :shifts
end
|
6f0a8dfc4d710a5e1695bf485ca7985a470ac324 | jobs/rabbitmq-server/templates/users.erb | jobs/rabbitmq-server/templates/users.erb | <% if_p('rabbitmq-server.administrators.management.username') do |username| %>
RMQ_OPERATOR_USERNAME="<%= username %>"
RMQ_OPERATOR_USERNAME="${RMQ_OPERATOR_USERNAME:?must be set}"
<% end %>
<% if_p('rabbitmq-server.administrators.management.password') do |password| %>
RMQ_OPERATOR_PASSWORD="<%= password %>"
RMQ_OPERATOR_PASSWORD="${RMQ_OPERATOR_PASSWORD:?must be set}"
<% end %>
RMQ_BROKER_USERNAME="<%= p('rabbitmq-server.administrators.broker.username') %>"
RMQ_BROKER_USERNAME="${RMQ_BROKER_USERNAME:?must be set}"
RMQ_BROKER_PASSWORD="<%= p('rabbitmq-server.administrators.broker.password') %>"
| <% if_p('rabbitmq-server.administrators.management.username') do |username| %>
RMQ_OPERATOR_USERNAME="<%= Shellwords.escape(username) %>"
RMQ_OPERATOR_USERNAME="${RMQ_OPERATOR_USERNAME:?must be set}"
<% end %>
<% if_p('rabbitmq-server.administrators.management.password') do |password| %>
RMQ_OPERATOR_PASSWORD="<%= Shellwords.escape(password) %>"
RMQ_OPERATOR_PASSWORD="${RMQ_OPERATOR_PASSWORD:?must be set}"
<% end %>
RMQ_BROKER_USERNAME="<%= p('rabbitmq-server.administrators.broker.username') %>"
RMQ_BROKER_USERNAME="${RMQ_BROKER_USERNAME:?must be set}"
RMQ_BROKER_PASSWORD="<%= Shellwords.escape(p('rabbitmq-server.administrators.broker.password')) %>"
| Use Shellescape to prevent special characters/bash injection | Use Shellescape to prevent special characters/bash injection
[#139274045]
| HTML+ERB | apache-2.0 | pivotal-cf/cf-rabbitmq-release,pivotal-cf/cf-rabbitmq-release,pivotal-cf/cf-rabbitmq-release,pivotal-cf/cf-rabbitmq-release | html+erb | ## Code Before:
<% if_p('rabbitmq-server.administrators.management.username') do |username| %>
RMQ_OPERATOR_USERNAME="<%= username %>"
RMQ_OPERATOR_USERNAME="${RMQ_OPERATOR_USERNAME:?must be set}"
<% end %>
<% if_p('rabbitmq-server.administrators.management.password') do |password| %>
RMQ_OPERATOR_PASSWORD="<%= password %>"
RMQ_OPERATOR_PASSWORD="${RMQ_OPERATOR_PASSWORD:?must be set}"
<% end %>
RMQ_BROKER_USERNAME="<%= p('rabbitmq-server.administrators.broker.username') %>"
RMQ_BROKER_USERNAME="${RMQ_BROKER_USERNAME:?must be set}"
RMQ_BROKER_PASSWORD="<%= p('rabbitmq-server.administrators.broker.password') %>"
## Instruction:
Use Shellescape to prevent special characters/bash injection
[#139274045]
## Code After:
<% if_p('rabbitmq-server.administrators.management.username') do |username| %>
RMQ_OPERATOR_USERNAME="<%= Shellwords.escape(username) %>"
RMQ_OPERATOR_USERNAME="${RMQ_OPERATOR_USERNAME:?must be set}"
<% end %>
<% if_p('rabbitmq-server.administrators.management.password') do |password| %>
RMQ_OPERATOR_PASSWORD="<%= Shellwords.escape(password) %>"
RMQ_OPERATOR_PASSWORD="${RMQ_OPERATOR_PASSWORD:?must be set}"
<% end %>
RMQ_BROKER_USERNAME="<%= p('rabbitmq-server.administrators.broker.username') %>"
RMQ_BROKER_USERNAME="${RMQ_BROKER_USERNAME:?must be set}"
RMQ_BROKER_PASSWORD="<%= Shellwords.escape(p('rabbitmq-server.administrators.broker.password')) %>"
|
75ab3be99f17e3dff3d28a7c1a0d921f4feaa84f | playbooks/ansible.cfg | playbooks/ansible.cfg | [defaults]
# Additional plugins
lookup_plugins = plugins/lookups
gathering = smart
hostfile = inventory
host_key_checking = False
# Setting forks should be based on your system. The Ansible defaults to 5,
# the os-lxc-hosts assumes that you have a system that can support
# OpenStack, thus it has been conservatively been set to 15
forks = 15
# Set color options
nocolor = 0
# SSH timeout
timeout = 120
# ssh_retry connection plugin
connection_plugins = plugins/connection_plugins
transport = ssh_retry
# [ssh_retry]
# retries = 3
[ssh_connection]
pipelining = True
| [defaults]
# Additional plugins
lookup_plugins = plugins/lookups
gathering = smart
hostfile = inventory
host_key_checking = False
# Setting forks should be based on your system. The Ansible defaults to 5,
# the os-lxc-hosts assumes that you have a system that can support
# OpenStack, thus it has been conservatively been set to 15
forks = 15
# Set color options
nocolor = 0
# SSH timeout
timeout = 120
# ssh_retry connection plugin
connection_plugins = plugins/connection_plugins
transport = ssh_retry
# [ssh_retry]
# retries = 3
[ssh_connection]
pipelining = True
ssh_args = -o ControlMaster=auto -o ControlPersist=60s -o TCPKeepAlive=yes -o ServerAliveInterval=5 -o ServerAliveCountMax=3
| Add SSH options for connection reliability | Add SSH options for connection reliability
Adding ssh alive options to increase connection reliability.
Change-Id: I2ef059c4edbfedba4daed9ca65ab90e50503c035
| INI | apache-2.0 | cloudnull/os-ansible-deployment,cfarquhar/openstack-ansible,yanyao/openstack-deployment-liberty,sigmavirus24/os-ansible-deployment,yanyao/newton,yanyao/openstack-ansible,jpmontez/os-ansible-deployment,sti-jans/openstack-ansible,yanyao/openstack-ansible,wenhuizhang/os-ansible-deployment,achekunov/openstack-ansible,BjoernT/os-ansible-deployment,metral/os-ansible-deployment,stackforge/os-ansible-deployment,d34dh0r53/os-ansible-deployment,AlphaStaxLLC/os-ansible-deployment,open-switch/infra_openstack-ansible,yanyao/openstack-deployment,mrda/openstack-ansible,robb-romans/openstack-ansible,VaneCloud/openstack-ansible,yanyao/openstack-deployment-liberty,mrda/openstack-ansible,bunchc/openstack-ansible,yanyao/newton,major/os-ansible-deployment,yanyao/openstack-deployment-liberty,open-switch/infra_openstack-ansible,d34dh0r53/os-ansible-deployment,dhanunjaya/os-ansible-deployment,AlphaStaxLLC/os-ansible-deployment,BjoernT/openstack-ansible,pombredanne/os-ansible-deployment,cloudnull/os-ansible-deployment,openstack/openstack-ansible,dhanunjaya/os-ansible-deployment,sigmavirus24/os-ansible-deployment,metral/os-ansible-deployment,miguelgrinberg/os-ansible-deployment,wenhuizhang/os-ansible-deployment,weezer/openstack-ansible,mrda/openstack-ansible,os-cloud/os-ansible-deployment,manuelfelipe/openstack-ansible,Logan2211/openstack-ansible,stackforge/os-ansible-deployment,pombredanne/os-ansible-deployment,weezer/openstack-ansible,open-switch/infra_openstack-ansible,AlphaStaxLLC/os-ansible-deployment,VaneCloud/openstack-ansible,major/openstack-ansible,jpmontez/openstack-ansible,bunchc/openstack-ansible,shane-c/openstack-ansible,jpmontez/os-ansible-deployment,mancdaz/openstack-ansible,manuelfelipe/openstack-ansible,yanyao/openstack-deployment,robb-romans/openstack-ansible,achekunov/openstack-ansible,BjoernT/os-ansible-deployment,openstack/openstack-ansible,BjoernT/openstack-ansible,sacharya/os-ansible-deployment,achekunov/openstack-ansible,major/os-ansible-deployment,jpmontez/openstack-ansible,git-harry/os-ansible-deployment,sigmavirus24/openstack-ansible,sigmavirus24/openstack-ansible,manuelfelipe/openstack-ansible,antonym/openstack-ansible,sacharya/os-ansible-deployment,antonym/openstack-ansible,git-harry/os-ansible-deployment,miguelgrinberg/os-ansible-deployment,shane-c/openstack-ansible,yanyao/openstack-deployment,git-harry/os-ansible-deployment,os-cloud/os-ansible-deployment,yanyao/openstack-deployment,jpmontez/openstack-ansible,mancdaz/openstack-ansible,BjoernT/os-ansible-deployment,sti-jans/openstack-ansible,shane-c/openstack-ansible,Logan2211/openstack-ansible,sti-jans/openstack-ansible,antonym/openstack-ansible,jpmontez/os-ansible-deployment,major/openstack-ansible,cfarquhar/openstack-ansible,pombredanne/os-ansible-deployment,VaneCloud/openstack-ansible | ini | ## Code Before:
[defaults]
# Additional plugins
lookup_plugins = plugins/lookups
gathering = smart
hostfile = inventory
host_key_checking = False
# Setting forks should be based on your system. The Ansible defaults to 5,
# the os-lxc-hosts assumes that you have a system that can support
# OpenStack, thus it has been conservatively been set to 15
forks = 15
# Set color options
nocolor = 0
# SSH timeout
timeout = 120
# ssh_retry connection plugin
connection_plugins = plugins/connection_plugins
transport = ssh_retry
# [ssh_retry]
# retries = 3
[ssh_connection]
pipelining = True
## Instruction:
Add SSH options for connection reliability
Adding ssh alive options to increase connection reliability.
Change-Id: I2ef059c4edbfedba4daed9ca65ab90e50503c035
## Code After:
[defaults]
# Additional plugins
lookup_plugins = plugins/lookups
gathering = smart
hostfile = inventory
host_key_checking = False
# Setting forks should be based on your system. The Ansible defaults to 5,
# the os-lxc-hosts assumes that you have a system that can support
# OpenStack, thus it has been conservatively been set to 15
forks = 15
# Set color options
nocolor = 0
# SSH timeout
timeout = 120
# ssh_retry connection plugin
connection_plugins = plugins/connection_plugins
transport = ssh_retry
# [ssh_retry]
# retries = 3
[ssh_connection]
pipelining = True
ssh_args = -o ControlMaster=auto -o ControlPersist=60s -o TCPKeepAlive=yes -o ServerAliveInterval=5 -o ServerAliveCountMax=3
|
0c2960744fd9b5a58e92722bbe5d189d79f69b1f | package.json | package.json | {
"name": "pipes",
"version": "0.1.0",
"description": "Tool for moving data to the cloud: e.g. Salesforce to Cloud",
"main": "server.js",
"scripts": {
"postinstall2": "bower cache clean && bower install"
},
"repository": "https://github.com/ibm-cds-labs/pipes",
"keywords": [
"dataworks",
"Salesforce",
"dashDb",
"Cloudant",
"Data Movement"
],
"dependencies": {
"express": "^4.10.6",
"cloudant": "^1.0.0",
"body-parser": "^1.11.0",
"errorhandler": "~1.3.6",
"lodash": "~3.9.3",
"async": "^1.2.1",
"cfenv": "*",
"jsforce": "^1.4.1",
"morgan": "^1.6.0",
"when": "~3.7.3",
"moment": "^2.10.3",
"jsonfile": "^2.2.1",
"request": "~2.58.0",
"colors": "*"
},
"devDependencies": {
"mocha": "*",
"http-proxy": "*"
},
"author": "david_taieb@us.ibm.com",
"license": "IBM",
"readmeFilename": "README.md"
}
| {
"name": "pipes",
"version": "0.1.0",
"description": "Tool for moving data to the cloud: e.g. Salesforce to Cloud",
"main": "server.js",
"scripts": {
"postinstall2": "bower cache clean && bower install"
},
"repository": "https://github.com/ibm-cds-labs/pipes",
"keywords": [
"dataworks",
"Salesforce",
"dashDb",
"Cloudant",
"Data Movement"
],
"dependencies": {
"async": "^1.2.1",
"body-parser": "^1.11.0",
"bower": "^1.4.1",
"cfenv": "*",
"cloudant": "^1.0.0",
"colors": "*",
"errorhandler": "~1.3.6",
"express": "^4.10.6",
"jsforce": "^1.4.1",
"jsonfile": "^2.2.1",
"lodash": "~3.9.3",
"moment": "^2.10.3",
"morgan": "^1.6.0",
"request": "~2.58.0",
"when": "~3.7.3"
},
"devDependencies": {
"mocha": "*",
"http-proxy": "*"
},
"author": "david_taieb@us.ibm.com",
"license": "IBM",
"readmeFilename": "README.md"
}
| Install Bower locally into project | Install Bower locally into project
| JSON | apache-2.0 | ibm-cds-labs/pipes,ibm-cds-labs/pipes,mikebroberg/pipes,mikebroberg/pipes | json | ## Code Before:
{
"name": "pipes",
"version": "0.1.0",
"description": "Tool for moving data to the cloud: e.g. Salesforce to Cloud",
"main": "server.js",
"scripts": {
"postinstall2": "bower cache clean && bower install"
},
"repository": "https://github.com/ibm-cds-labs/pipes",
"keywords": [
"dataworks",
"Salesforce",
"dashDb",
"Cloudant",
"Data Movement"
],
"dependencies": {
"express": "^4.10.6",
"cloudant": "^1.0.0",
"body-parser": "^1.11.0",
"errorhandler": "~1.3.6",
"lodash": "~3.9.3",
"async": "^1.2.1",
"cfenv": "*",
"jsforce": "^1.4.1",
"morgan": "^1.6.0",
"when": "~3.7.3",
"moment": "^2.10.3",
"jsonfile": "^2.2.1",
"request": "~2.58.0",
"colors": "*"
},
"devDependencies": {
"mocha": "*",
"http-proxy": "*"
},
"author": "david_taieb@us.ibm.com",
"license": "IBM",
"readmeFilename": "README.md"
}
## Instruction:
Install Bower locally into project
## Code After:
{
"name": "pipes",
"version": "0.1.0",
"description": "Tool for moving data to the cloud: e.g. Salesforce to Cloud",
"main": "server.js",
"scripts": {
"postinstall2": "bower cache clean && bower install"
},
"repository": "https://github.com/ibm-cds-labs/pipes",
"keywords": [
"dataworks",
"Salesforce",
"dashDb",
"Cloudant",
"Data Movement"
],
"dependencies": {
"async": "^1.2.1",
"body-parser": "^1.11.0",
"bower": "^1.4.1",
"cfenv": "*",
"cloudant": "^1.0.0",
"colors": "*",
"errorhandler": "~1.3.6",
"express": "^4.10.6",
"jsforce": "^1.4.1",
"jsonfile": "^2.2.1",
"lodash": "~3.9.3",
"moment": "^2.10.3",
"morgan": "^1.6.0",
"request": "~2.58.0",
"when": "~3.7.3"
},
"devDependencies": {
"mocha": "*",
"http-proxy": "*"
},
"author": "david_taieb@us.ibm.com",
"license": "IBM",
"readmeFilename": "README.md"
}
|
eb69f0df4da588f51599a40fd238a1d849341884 | tox.ini | tox.ini | [tox]
envlist = py26, py27, py32, py33, pypy
[testenv]
deps =
pytest >= 2.3.0
pytest-cov >= 1.6
commands = py.test --durations=5 {posargs:DEFAULTS}
| [tox]
envlist = py26, py27, py32, py33, pypy
[testenv]
deps =
pytest >= 2.3.0
pytest-cov >= 1.6
commands = py.test {posargs:--durations=5}
| Fix wrong use of posargs | Fix wrong use of posargs
| INI | mit | samuelmaudo/wand,dahlia/wand,pellaeon/wand,WangHong-yang/wand,bpc/wand | ini | ## Code Before:
[tox]
envlist = py26, py27, py32, py33, pypy
[testenv]
deps =
pytest >= 2.3.0
pytest-cov >= 1.6
commands = py.test --durations=5 {posargs:DEFAULTS}
## Instruction:
Fix wrong use of posargs
## Code After:
[tox]
envlist = py26, py27, py32, py33, pypy
[testenv]
deps =
pytest >= 2.3.0
pytest-cov >= 1.6
commands = py.test {posargs:--durations=5}
|
26848b1c303b98b7c0ddeefb8c68c5f5bf78927e | README.md | README.md |
JavaScript framework for SolarNetwork using D3.
# Building
You must have `npm` installed.
```sh
npm install # install dependencies
```
Then you can run
```sh
npm run build
```
to build the main JavaScript file, including a minified version. To build just the
full, non-minified version you can run
```sh
npm run build:dev
```
|
JavaScript framework for SolarNetwork using D3.
**Note** this repo has been superseded by
[sn-api-core-js](https://github.com/SolarNetwork/sn-api-core-js) and will no
longer be maintained.
# Building
You must have `npm` installed.
```sh
npm install # install dependencies
```
Then you can run
```sh
npm run build
```
to build the main JavaScript file, including a minified version. To build just the
full, non-minified version you can run
```sh
npm run build:dev
```
| Add not on replacement repo. | Add not on replacement repo.
| Markdown | apache-2.0 | SolarNetwork/solarnetwork-d3,SolarNetwork/solarnetwork-d3 | markdown | ## Code Before:
JavaScript framework for SolarNetwork using D3.
# Building
You must have `npm` installed.
```sh
npm install # install dependencies
```
Then you can run
```sh
npm run build
```
to build the main JavaScript file, including a minified version. To build just the
full, non-minified version you can run
```sh
npm run build:dev
```
## Instruction:
Add not on replacement repo.
## Code After:
JavaScript framework for SolarNetwork using D3.
**Note** this repo has been superseded by
[sn-api-core-js](https://github.com/SolarNetwork/sn-api-core-js) and will no
longer be maintained.
# Building
You must have `npm` installed.
```sh
npm install # install dependencies
```
Then you can run
```sh
npm run build
```
to build the main JavaScript file, including a minified version. To build just the
full, non-minified version you can run
```sh
npm run build:dev
```
|
1bb9fd476dfda0941f87923f617a544e5113f9d9 | blueprints/ember-cli-moment-transform/index.js | blueprints/ember-cli-moment-transform/index.js | /* jshint node: true */
'use strict';
module.exports = {
normalizeEntityName: function() {
// this prevents an error when the entityName is
// not specified (since that doesn't actually matter
// to us
},
afterInstall: function() {
return this.addBowerPackageToProject('ember-cli-moment-shim');
}
};
| /* jshint node: true */
'use strict';
module.exports = {
normalizeEntityName: function() {
// this prevents an error when the entityName is
// not specified (since that doesn't actually matter
// to us
},
afterInstall: function() {
return this.addAddonToProject('ember-cli-moment-shim', '^0.7.2');
}
};
| Fix installation of ember-cli-moment-shim addon | Fix installation of ember-cli-moment-shim addon
Because the addon was added as a Bower dependency, it caused version conflicts with some of the Bower dependencies of my Ember app. However, its Bower dependencies are only needed for developing (and testing) the addon.
See https://github.com/jasonmit/ember-cli-moment-shim/commit/20e54c0679afc6c63a046fe710e7984a46164e99#commitcomment-15483140. | JavaScript | mit | pk4media/ember-cli-moment-transform,pk4media/ember-cli-moment-transform | javascript | ## Code Before:
/* jshint node: true */
'use strict';
module.exports = {
normalizeEntityName: function() {
// this prevents an error when the entityName is
// not specified (since that doesn't actually matter
// to us
},
afterInstall: function() {
return this.addBowerPackageToProject('ember-cli-moment-shim');
}
};
## Instruction:
Fix installation of ember-cli-moment-shim addon
Because the addon was added as a Bower dependency, it caused version conflicts with some of the Bower dependencies of my Ember app. However, its Bower dependencies are only needed for developing (and testing) the addon.
See https://github.com/jasonmit/ember-cli-moment-shim/commit/20e54c0679afc6c63a046fe710e7984a46164e99#commitcomment-15483140.
## Code After:
/* jshint node: true */
'use strict';
module.exports = {
normalizeEntityName: function() {
// this prevents an error when the entityName is
// not specified (since that doesn't actually matter
// to us
},
afterInstall: function() {
return this.addAddonToProject('ember-cli-moment-shim', '^0.7.2');
}
};
|
1e7b867564fd1a8d07b9e78739f8bbb6a4bb3117 | projects/igniteui-angular/src/lib/action-strip/index.ts | projects/igniteui-angular/src/lib/action-strip/index.ts | export * from './action-strip.module';
| export { IgxGridActionsBaseDirective } from './grid-actions/grid-actions-base.directive';
export { IgxGridEditingActionsComponent } from './grid-actions/grid-editing-actions.component';
export { IgxGridPinningActionsComponent } from './grid-actions/grid-pinning-actions.component';
export { IgxActionStripComponent } from './action-strip.component';
export * from './action-strip.module';
| Revert - "Remove not needed exports" | chore(*): Revert - "Remove not needed exports"
This reverts commit 200c9dc5bc933910ed72761ec820f06478465e3c.
| TypeScript | mit | Infragistics/zero-blocks,Infragistics/zero-blocks,Infragistics/zero-blocks | typescript | ## Code Before:
export * from './action-strip.module';
## Instruction:
chore(*): Revert - "Remove not needed exports"
This reverts commit 200c9dc5bc933910ed72761ec820f06478465e3c.
## Code After:
export { IgxGridActionsBaseDirective } from './grid-actions/grid-actions-base.directive';
export { IgxGridEditingActionsComponent } from './grid-actions/grid-editing-actions.component';
export { IgxGridPinningActionsComponent } from './grid-actions/grid-pinning-actions.component';
export { IgxActionStripComponent } from './action-strip.component';
export * from './action-strip.module';
|
0cacabeee4086f91022755d0b1ee453716164fda | tests/topkeys/CMakeLists.txt | tests/topkeys/CMakeLists.txt | add_executable(memcached_topkeys_test topkeys_test.cc)
target_link_libraries(memcached_topkeys_test memcached_daemon gtest gtest_main)
add_sanitizers(memcached_topkeys_test)
add_test(NAME memcached_topkeys_test
WORKING_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
COMMAND memcached_topkeys_test)
if (NOT WIN32)
add_executable(memcached_topkeys_benchmark topkeys_benchmark.cc)
target_link_libraries(memcached_topkeys_benchmark memcached_daemon benchmark)
endif (NOT WIN32)
| add_executable(memcached_topkeys_test topkeys_test.cc)
target_link_libraries(memcached_topkeys_test memcached_daemon gtest gtest_main)
add_sanitizers(memcached_topkeys_test)
add_test(NAME memcached_topkeys_test
WORKING_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
COMMAND memcached_topkeys_test)
if (NOT WIN32)
add_executable(memcached_topkeys_benchmark topkeys_benchmark.cc)
target_link_libraries(memcached_topkeys_benchmark memcached_daemon benchmark)
add_sanitizers(memcached_topkeys_benchmark)
endif (NOT WIN32)
| Add "add_sanitizers()" for the topkeys benchmark | Add "add_sanitizers()" for the topkeys benchmark
Change-Id: I4efa59b5709f8b8e5df5c7a850f3bc4e597cc665
Reviewed-on: http://review.couchbase.org/93620
Tested-by: Build Bot <80754af91bfb6d1073585b046fe0a474ce868509@couchbase.com>
Reviewed-by: Trond Norbye <60edd2ef23891a753f231b0c6f161dc634079a93@gmail.com>
| Text | bsd-3-clause | daverigby/kv_engine,daverigby/kv_engine,daverigby/kv_engine,daverigby/kv_engine | text | ## Code Before:
add_executable(memcached_topkeys_test topkeys_test.cc)
target_link_libraries(memcached_topkeys_test memcached_daemon gtest gtest_main)
add_sanitizers(memcached_topkeys_test)
add_test(NAME memcached_topkeys_test
WORKING_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
COMMAND memcached_topkeys_test)
if (NOT WIN32)
add_executable(memcached_topkeys_benchmark topkeys_benchmark.cc)
target_link_libraries(memcached_topkeys_benchmark memcached_daemon benchmark)
endif (NOT WIN32)
## Instruction:
Add "add_sanitizers()" for the topkeys benchmark
Change-Id: I4efa59b5709f8b8e5df5c7a850f3bc4e597cc665
Reviewed-on: http://review.couchbase.org/93620
Tested-by: Build Bot <80754af91bfb6d1073585b046fe0a474ce868509@couchbase.com>
Reviewed-by: Trond Norbye <60edd2ef23891a753f231b0c6f161dc634079a93@gmail.com>
## Code After:
add_executable(memcached_topkeys_test topkeys_test.cc)
target_link_libraries(memcached_topkeys_test memcached_daemon gtest gtest_main)
add_sanitizers(memcached_topkeys_test)
add_test(NAME memcached_topkeys_test
WORKING_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
COMMAND memcached_topkeys_test)
if (NOT WIN32)
add_executable(memcached_topkeys_benchmark topkeys_benchmark.cc)
target_link_libraries(memcached_topkeys_benchmark memcached_daemon benchmark)
add_sanitizers(memcached_topkeys_benchmark)
endif (NOT WIN32)
|
7211687668fd100a798be74aa4a6d452a8e18603 | src/main/scala/org/grimrose/sqlap22/IndexController.scala | src/main/scala/org/grimrose/sqlap22/IndexController.scala | package org.grimrose.sqlap22
import java.nio.charset.StandardCharsets
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.web.bind.annotation.{RequestMapping, RestController}
import scala.io.Source
@RestController
class IndexController {
@Autowired
var slideConverter: SlideConverter = null
@RequestMapping(Array("/"))
def index() = {
val title = "SQLアンチパターン 22章"
val markdown = loadMarkdown.getOrElse("")
slideConverter.bind(title, markdown).getBytes(StandardCharsets.UTF_8)
}
def loadMarkdown: Option[String] = {
try {
val source = Source.fromURL(getClass.getResource("/slide.md"), StandardCharsets.UTF_8.toString)
try {
Some(source.mkString)
}
finally {
source.close()
}
} catch {
case e: Exception => None
}
}
}
| package org.grimrose.sqlap22
import java.nio.charset.StandardCharsets
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.web.bind.annotation.{RequestMapping, RestController}
import scala.io.Source
@RestController
class IndexController @Autowired()(val slideConverter: SlideConverter) {
@RequestMapping(Array("/"))
def index() = {
val title = "SQLアンチパターン 22章"
val markdown = loadMarkdown.getOrElse("")
slideConverter.bind(title, markdown).getBytes(StandardCharsets.UTF_8)
}
def loadMarkdown: Option[String] = {
try {
val source = Source.fromURL(getClass.getResource("/slide.md"), StandardCharsets.UTF_8.toString)
try {
Some(source.mkString)
}
finally {
source.close()
}
} catch {
case e: Exception => None
}
}
}
| Fix change to constructor injection | Fix change to constructor injection
| Scala | mit | grimrose/SQL-Antipatterns-22 | scala | ## Code Before:
package org.grimrose.sqlap22
import java.nio.charset.StandardCharsets
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.web.bind.annotation.{RequestMapping, RestController}
import scala.io.Source
@RestController
class IndexController {
@Autowired
var slideConverter: SlideConverter = null
@RequestMapping(Array("/"))
def index() = {
val title = "SQLアンチパターン 22章"
val markdown = loadMarkdown.getOrElse("")
slideConverter.bind(title, markdown).getBytes(StandardCharsets.UTF_8)
}
def loadMarkdown: Option[String] = {
try {
val source = Source.fromURL(getClass.getResource("/slide.md"), StandardCharsets.UTF_8.toString)
try {
Some(source.mkString)
}
finally {
source.close()
}
} catch {
case e: Exception => None
}
}
}
## Instruction:
Fix change to constructor injection
## Code After:
package org.grimrose.sqlap22
import java.nio.charset.StandardCharsets
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.web.bind.annotation.{RequestMapping, RestController}
import scala.io.Source
@RestController
class IndexController @Autowired()(val slideConverter: SlideConverter) {
@RequestMapping(Array("/"))
def index() = {
val title = "SQLアンチパターン 22章"
val markdown = loadMarkdown.getOrElse("")
slideConverter.bind(title, markdown).getBytes(StandardCharsets.UTF_8)
}
def loadMarkdown: Option[String] = {
try {
val source = Source.fromURL(getClass.getResource("/slide.md"), StandardCharsets.UTF_8.toString)
try {
Some(source.mkString)
}
finally {
source.close()
}
} catch {
case e: Exception => None
}
}
}
|
d123a6fae46cedafeae851cea968b2179674d9d4 | ReactCommon/hermes/inspector/tools/sandcastle/setup.sh | ReactCommon/hermes/inspector/tools/sandcastle/setup.sh |
set -x
set -e
set -o pipefail
THIS_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
ROOT_DIR=$(cd "$THIS_DIR" && hg root)
# Buck by default uses clang-3.6 from /opt/local/bin.
# Override it to use system clang.
export PATH="/usr/bin:$PATH"
# Enter xplat
cd "$ROOT_DIR"/xplat || exit 1
# Setup env
export TITLE
TITLE=$(hg log -l 1 --template "{desc|strip|firstline}")
export REV
REV=$(hg log -l 1 --template "{node}")
export AUTHOR
AUTHOR=$(hg log -l 1 --template "{author|emailuser}")
if [ -n "$SANDCASTLE" ]; then
source automation/setup_buck.sh
fi
|
set -x
set -e
set -o pipefail
THIS_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
ROOT_DIR=$(cd "$THIS_DIR" && hg root)
# Enter xplat
cd "$ROOT_DIR"/xplat || exit 1
# Setup env
export TITLE
TITLE=$(hg log -l 1 --template "{desc|strip|firstline}")
export REV
REV=$(hg log -l 1 --template "{node}")
export AUTHOR
AUTHOR=$(hg log -l 1 --template "{author|emailuser}")
if [ -n "$SANDCASTLE" ]; then
source automation/setup_buck.sh
fi
| Stop forcing /usr/bin to the front of the path | Stop forcing /usr/bin to the front of the path
Summary:
This messes with python version selection. At least based on
the comments, it is no longer needed, as /opt/local/bin appears to be
empty on my devserver and on a sandcastle host.
D32337004 revealed the problem. T105920600 has some more context. I couldn't repro locally, so D32451858 is a control (which I expect to fail tests) to confirm that this fixes the test failures.
#utd-hermes
Reviewed By: neildhar
Differential Revision: D32451851
fbshipit-source-id: 4c9c04571154d9ce4e5a3059d98e043865b76f78
| Shell | mit | facebook/react-native,janicduplessis/react-native,facebook/react-native,janicduplessis/react-native,facebook/react-native,javache/react-native,facebook/react-native,javache/react-native,facebook/react-native,janicduplessis/react-native,facebook/react-native,facebook/react-native,janicduplessis/react-native,javache/react-native,javache/react-native,javache/react-native,javache/react-native,facebook/react-native,javache/react-native,facebook/react-native,javache/react-native,janicduplessis/react-native,janicduplessis/react-native,janicduplessis/react-native,javache/react-native,janicduplessis/react-native | shell | ## Code Before:
set -x
set -e
set -o pipefail
THIS_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
ROOT_DIR=$(cd "$THIS_DIR" && hg root)
# Buck by default uses clang-3.6 from /opt/local/bin.
# Override it to use system clang.
export PATH="/usr/bin:$PATH"
# Enter xplat
cd "$ROOT_DIR"/xplat || exit 1
# Setup env
export TITLE
TITLE=$(hg log -l 1 --template "{desc|strip|firstline}")
export REV
REV=$(hg log -l 1 --template "{node}")
export AUTHOR
AUTHOR=$(hg log -l 1 --template "{author|emailuser}")
if [ -n "$SANDCASTLE" ]; then
source automation/setup_buck.sh
fi
## Instruction:
Stop forcing /usr/bin to the front of the path
Summary:
This messes with python version selection. At least based on
the comments, it is no longer needed, as /opt/local/bin appears to be
empty on my devserver and on a sandcastle host.
D32337004 revealed the problem. T105920600 has some more context. I couldn't repro locally, so D32451858 is a control (which I expect to fail tests) to confirm that this fixes the test failures.
#utd-hermes
Reviewed By: neildhar
Differential Revision: D32451851
fbshipit-source-id: 4c9c04571154d9ce4e5a3059d98e043865b76f78
## Code After:
set -x
set -e
set -o pipefail
THIS_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
ROOT_DIR=$(cd "$THIS_DIR" && hg root)
# Enter xplat
cd "$ROOT_DIR"/xplat || exit 1
# Setup env
export TITLE
TITLE=$(hg log -l 1 --template "{desc|strip|firstline}")
export REV
REV=$(hg log -l 1 --template "{node}")
export AUTHOR
AUTHOR=$(hg log -l 1 --template "{author|emailuser}")
if [ -n "$SANDCASTLE" ]; then
source automation/setup_buck.sh
fi
|
fd8d6b669bde7464e86dc01b64c75fba3cf288bc | src/ggrc/assets/mustache/components/assessment/attachments-list.mustache | src/ggrc/assets/mustache/components/assessment/attachments-list.mustache | {{!
Copyright (C) 2017 Google Inc.
Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>
}}
<h6>Evidence</h6>
{{#is_allowed 'update' instance context='for'}}
{{{render_hooks "Request.gdrive_evidence_storage"}}}
<div class="attach-file-info">(you can upload up to 10 files in a single batch)</div>
{{/is_allowed}}
{{^if_null instance._mandatory_attachment_msg}}
<div class="alert alert-info alert-dismissible" role="alert">
{{instance._mandatory_attachment_msg}}
<button type="button" class="close" data-dismiss="alert" aria-label="Close">×</button>
</div>
{{/if_null}}
<mapping-tree-view
parent-instance="instance"
mapping="instance.class.info_pane_options.evidence.mapping"
item-template="instance.class.info_pane_options.evidence.show_view"
>
</mapping-tree-view>
| {{!
Copyright (C) 2017 Google Inc.
Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>
}}
<h6>Evidence</h6>
{{#if_mapping_ready "audits" instance}}
{{#is_allowed 'update' instance context='for'}}
{{{render_hooks "Request.gdrive_evidence_storage"}}}
<div class="attach-file-info">(you can upload up to 10 files in a single batch)</div>
{{/is_allowed}}
{{/if_mapping_ready}}
{{^if_null instance._mandatory_attachment_msg}}
<div class="alert alert-info alert-dismissible" role="alert">
{{instance._mandatory_attachment_msg}}
<button type="button" class="close" data-dismiss="alert" aria-label="Close">×</button>
</div>
{{/if_null}}
<mapping-tree-view
parent-instance="instance"
mapping="instance.class.info_pane_options.evidence.mapping"
item-template="instance.class.info_pane_options.evidence.show_view"
>
</mapping-tree-view>
| Fix duplicate of Attach button on assessment's info pane | Fix duplicate of Attach button on assessment's info pane
| HTML+Django | apache-2.0 | plamut/ggrc-core,plamut/ggrc-core,VinnieJohns/ggrc-core,selahssea/ggrc-core,AleksNeStu/ggrc-core,selahssea/ggrc-core,AleksNeStu/ggrc-core,selahssea/ggrc-core,VinnieJohns/ggrc-core,VinnieJohns/ggrc-core,selahssea/ggrc-core,AleksNeStu/ggrc-core,plamut/ggrc-core,VinnieJohns/ggrc-core,plamut/ggrc-core,AleksNeStu/ggrc-core | html+django | ## Code Before:
{{!
Copyright (C) 2017 Google Inc.
Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>
}}
<h6>Evidence</h6>
{{#is_allowed 'update' instance context='for'}}
{{{render_hooks "Request.gdrive_evidence_storage"}}}
<div class="attach-file-info">(you can upload up to 10 files in a single batch)</div>
{{/is_allowed}}
{{^if_null instance._mandatory_attachment_msg}}
<div class="alert alert-info alert-dismissible" role="alert">
{{instance._mandatory_attachment_msg}}
<button type="button" class="close" data-dismiss="alert" aria-label="Close">×</button>
</div>
{{/if_null}}
<mapping-tree-view
parent-instance="instance"
mapping="instance.class.info_pane_options.evidence.mapping"
item-template="instance.class.info_pane_options.evidence.show_view"
>
</mapping-tree-view>
## Instruction:
Fix duplicate of Attach button on assessment's info pane
## Code After:
{{!
Copyright (C) 2017 Google Inc.
Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>
}}
<h6>Evidence</h6>
{{#if_mapping_ready "audits" instance}}
{{#is_allowed 'update' instance context='for'}}
{{{render_hooks "Request.gdrive_evidence_storage"}}}
<div class="attach-file-info">(you can upload up to 10 files in a single batch)</div>
{{/is_allowed}}
{{/if_mapping_ready}}
{{^if_null instance._mandatory_attachment_msg}}
<div class="alert alert-info alert-dismissible" role="alert">
{{instance._mandatory_attachment_msg}}
<button type="button" class="close" data-dismiss="alert" aria-label="Close">×</button>
</div>
{{/if_null}}
<mapping-tree-view
parent-instance="instance"
mapping="instance.class.info_pane_options.evidence.mapping"
item-template="instance.class.info_pane_options.evidence.show_view"
>
</mapping-tree-view>
|
68ca7906fb09e4862e91b97bcd3caecb90aa2c3c | README.md | README.md | three.js
========
#### JavaScript 3D library ####
The aim of the project is to create a lightweight 3D library with a very low level of complexity — in other words, for dummies. The library provides <canvas>, <svg>, CSS3D and WebGL renderers.
[Examples](http://threejs.org/examples/) — [Documentation](http://threejs.org/docs/) — [Migrating](https://github.com/mrdoob/three.js/wiki/Migration) — [Help](http://stackoverflow.com/questions/tagged/three.js)
### Usage ###
Download the [minified library](http://threejs.org/build/three.min.js) and include it in your html.
Alternatively see [how to build the library yourself](https://github.com/mrdoob/three.js/wiki/build.py,-or-how-to-generate-a-compressed-Three.js-file).
```html
<script src="js/three.min.js"></script>
```
This code creates a scene, a camera, and a geometric cube, and it adds the cube to the scene. It then creates a `WebGL` renderer for the scene and camera, and it adds that viewport to the document.body element. Finally it animates the cube within the scene for the camera.
```html
<script>
var scene, camera, renderer;
var geometry, material, mesh;
init();
animate();
function init() {
scene = new THREE.Scene();
camera = new THREE.PerspectiveCamera( 75, window.innerWidth / window.innerHeight, 1, 10000 );
camera.position.z = 1000;
geometry = new THREE.BoxGeometry( 200, 200, 200 );
material = new THREE.MeshBasicMaterial( { color: 0xff0000, wireframe: true } );
mesh = new THREE.Mesh( geometry, material );
scene.add( mesh );
renderer = new THREE.WebGLRenderer();
renderer.setSize( window.innerWidth, window.innerHeight );
document.body.appendChild( renderer.domElement );
}
function animate() {
requestAnimationFrame( animate );
mesh.rotation.x += 0.01;
mesh.rotation.y += 0.02;
renderer.render( scene, camera );
}
</script>
```
If everything went well you should see [this](http://jsfiddle.net/hfj7gm6t/).
### Change log ###
[releases](https://github.com/mrdoob/three.js/releases)
| Doom Clone three.js
========
| Update readme to reflect project. | Update readme to reflect project. | Markdown | mit | GastonBeaucage/three.js,GastonBeaucage/three.js,GastonBeaucage/three.js,GastonBeaucage/three.js,GastonBeaucage/three.js,GastonBeaucage/three.js | markdown | ## Code Before:
three.js
========
#### JavaScript 3D library ####
The aim of the project is to create a lightweight 3D library with a very low level of complexity — in other words, for dummies. The library provides <canvas>, <svg>, CSS3D and WebGL renderers.
[Examples](http://threejs.org/examples/) — [Documentation](http://threejs.org/docs/) — [Migrating](https://github.com/mrdoob/three.js/wiki/Migration) — [Help](http://stackoverflow.com/questions/tagged/three.js)
### Usage ###
Download the [minified library](http://threejs.org/build/three.min.js) and include it in your html.
Alternatively see [how to build the library yourself](https://github.com/mrdoob/three.js/wiki/build.py,-or-how-to-generate-a-compressed-Three.js-file).
```html
<script src="js/three.min.js"></script>
```
This code creates a scene, a camera, and a geometric cube, and it adds the cube to the scene. It then creates a `WebGL` renderer for the scene and camera, and it adds that viewport to the document.body element. Finally it animates the cube within the scene for the camera.
```html
<script>
var scene, camera, renderer;
var geometry, material, mesh;
init();
animate();
function init() {
scene = new THREE.Scene();
camera = new THREE.PerspectiveCamera( 75, window.innerWidth / window.innerHeight, 1, 10000 );
camera.position.z = 1000;
geometry = new THREE.BoxGeometry( 200, 200, 200 );
material = new THREE.MeshBasicMaterial( { color: 0xff0000, wireframe: true } );
mesh = new THREE.Mesh( geometry, material );
scene.add( mesh );
renderer = new THREE.WebGLRenderer();
renderer.setSize( window.innerWidth, window.innerHeight );
document.body.appendChild( renderer.domElement );
}
function animate() {
requestAnimationFrame( animate );
mesh.rotation.x += 0.01;
mesh.rotation.y += 0.02;
renderer.render( scene, camera );
}
</script>
```
If everything went well you should see [this](http://jsfiddle.net/hfj7gm6t/).
### Change log ###
[releases](https://github.com/mrdoob/three.js/releases)
## Instruction:
Update readme to reflect project.
## Code After:
Doom Clone three.js
========
|
4e33e61df3ed90af75f6e1fc9d1496e5f916d2a3 | tests/hello.txt | tests/hello.txt | insert 0 hello 1
search 0 1
search 1 0
remove 0 0 | insert 0 hello
insert 1 how
insert 2 are
insert 3 you
insert 4 today
insert 5 sir
insert 6 ?
sync
search 0 1
search 2 1
search 3 1
search 1 1
search 4 1
search 5 1
search 7 0
remove 6
sync
print
sync
search 6 0
search 5 1
sync
remove 0 | Update test to support concurrency | Update test to support concurrency
| Text | mit | potay/FreeTables,potay/FreeTables | text | ## Code Before:
insert 0 hello 1
search 0 1
search 1 0
remove 0 0
## Instruction:
Update test to support concurrency
## Code After:
insert 0 hello
insert 1 how
insert 2 are
insert 3 you
insert 4 today
insert 5 sir
insert 6 ?
sync
search 0 1
search 2 1
search 3 1
search 1 1
search 4 1
search 5 1
search 7 0
remove 6
sync
print
sync
search 6 0
search 5 1
sync
remove 0 |
44cd13488fc706e01f00461dba83d56fc36c7411 | README.md | README.md |
A fully RESTful server implementation for CodeIgniter using one library, one
config file and one controller.
## Sponsored by: Coding Futures
## Requirements
1. PHP 5.1+
2. CodeIgniter 2.0-dev (for 1.7.x support download v2.2 from Downloads tab)
## Usage
Coming soon. Take a look at application/controllers/api/example.php for
hints until the default controller demo is built and ready.
I haven't got around to writing any documentation specifically for this project
but you can read my NetTuts article which covers it's usage along with the REST Client lib.
<http://net.tutsplus.com/tutorials/php/working-with-restful-services-in-codeigniter-2/>
|
A fully RESTful server implementation for CodeIgniter using one library, one
config file and one controller.
## Sponsored by: Coding Futures
## Requirements
1. PHP 5.1+
2. CodeIgniter 2.0-dev (for 1.7.x support download v2.2 from Downloads tab)
## Usage
Coming soon. Take a look at application/controllers/api/example.php for
hints until the default controller demo is built and ready.
I haven't got around to writing any documentation specifically for this project
but you can read my NetTuts article which covers it's usage along with the REST Client lib.
[NetTuts: Working with RESTful Services in CodeIgniter](http://net.tutsplus.com/tutorials/php/working-with-restful-services-in-codeigniter-2/)
## Donations
If my REST Server has helped you out, or you'd like me to do some custom work on it, [please sponsor me](http://pledgie.com/campaigns/8328)
so I can keep working on this and other CodeIgniter projects for you all. | Put my e-cup on the floor. | Put my e-cup on the floor.
| Markdown | mit | ppardo/codeigniter-restserver,avido/codeigniter-restserver,pravinhirmukhe/codeigniter-restserver,adrianha/codeigniter-restserver,jdenoc/services-codeigniter,urandu/codeigniter-restserver,tpsumeta/codeigniter-restserver,chriskacerguis/codeigniter-restserver,lagaisse/codeigniter-restserver,Hanisch-IT/codeigniter-restserver,herderwu/codeigniter-restserver,Niko-r/codeigniter-restserver,kenjis/codeigniter-restserver,rajrathore/codeigniter-restserver,mychaelgo/codeigniter-restserver,ratones/codeigniter-restserver,chrisky13biz/codeigniter-restserver,urandu/codeigniter-restserver,EricFu728/codeigniter-restserver,AdilSarwarNU/codeigniter-restserver,jahanzaibbahadur/codeigniter-restserver,Drunkenpilot/codeigniter-restserver,Adslive/codeigniter-restserver,jagandecapri/codeigniter-restserver,nayosx/codeigniter-restserver,cmrunton/codeigniter-restserver,joeparihar/codeigniter-restserver,ratones/codeigniter-restserver,marciocamello/codeigniter-restserver,rogeriotaques/codeigniter-restserver,softwarespot/codeigniter-restserver,Niko-r/codeigniter-restserver,lweb20/codeigniter-restserver,Rashid-Asif/codeigniter-restserver,mychaelgo/codeigniter-restserver,lweb20/codeigniter-restserver,summermk/codeigniter-restserver,liang179/codeigniter-restserver,ppardo/codeigniter-restserver,alex-arriaga/codeigniter-restserver,jahanzaibbahadur/codeigniter-restserver,chriskacerguis/codeigniter-restserver,hermanwahyudi/codeigniter-restserver,nicolaeturcan/codeigniter-restserver,jjmpsp/codeigniter-restserver,nayosx/codeigniter-restserver,cmrunton/codeigniter-restserver,wmarquardt/codeigniter-restserver,prasanthjanga/codeigniter-restserver,smtion/codeigniter-restserver,Tjoosten/codeigniter-restserver,smtion/codeigniter-restserver,softwarespot/codeigniter-restserver,Tjoosten/codeigniter-restserver,Adslive/codeigniter-restserver,AdilSarwarNU/codeigniter-restserver,rogeriotaques/codeigniter-restserver,kenjis/codeigniter-restserver,EricFu728/codeigniter-restserver,yinlianwei/codeigniter-restserver,rajrathore/codeigniter-restserver,adrianha/codeigniter-restserver,lweb20/codeigniter-restserver,sergiojaviermoyano/codeigniter-restserver,ares242/codeigniter-restserver,ivantcholakov/codeigniter-restserver,sergiojaviermoyano/codeigniter-restserver,yinlianwei/codeigniter-restserver,ares242/codeigniter-restserver,liang179/codeigniter-restserver,jdenoc/services-codeigniter,pravinhirmukhe/codeigniter-restserver,summermk/codeigniter-restserver,hermanwahyudi/codeigniter-restserver,Ye-Yong-Chi/codeigniter-restserver,herderwu/codeigniter-restserver,Hanisch-IT/codeigniter-restserver,wmarquardt/codeigniter-restserver,marciocamello/codeigniter-restserver,nguyenanhnhan/codeigniter-restserver,alex-arriaga/codeigniter-restserver,Drunkenpilot/codeigniter-restserver,nguyenanhnhan/codeigniter-restserver,royergarci/codeigniter-restserver,ivantcholakov/codeigniter-restserver,Ye-Yong-Chi/codeigniter-restserver,fawwaz/ngantay_server,ivantcholakov/codeigniter-restserver,nguyenanhnhan/codeigniter-restserver,avido/codeigniter-restserver,jjmpsp/codeigniter-restserver,lagaisse/codeigniter-restserver,Rashid-Asif/codeigniter-restserver,joeparihar/codeigniter-restserver,tpsumeta/codeigniter-restserver,teslamint/codeigniter-restserver,chrisky13biz/codeigniter-restserver,nicolaeturcan/codeigniter-restserver,royergarci/codeigniter-restserver,prasanthjanga/codeigniter-restserver,jdenoc/services,jagandecapri/codeigniter-restserver,fawwaz/ngantay_server | markdown | ## Code Before:
A fully RESTful server implementation for CodeIgniter using one library, one
config file and one controller.
## Sponsored by: Coding Futures
## Requirements
1. PHP 5.1+
2. CodeIgniter 2.0-dev (for 1.7.x support download v2.2 from Downloads tab)
## Usage
Coming soon. Take a look at application/controllers/api/example.php for
hints until the default controller demo is built and ready.
I haven't got around to writing any documentation specifically for this project
but you can read my NetTuts article which covers it's usage along with the REST Client lib.
<http://net.tutsplus.com/tutorials/php/working-with-restful-services-in-codeigniter-2/>
## Instruction:
Put my e-cup on the floor.
## Code After:
A fully RESTful server implementation for CodeIgniter using one library, one
config file and one controller.
## Sponsored by: Coding Futures
## Requirements
1. PHP 5.1+
2. CodeIgniter 2.0-dev (for 1.7.x support download v2.2 from Downloads tab)
## Usage
Coming soon. Take a look at application/controllers/api/example.php for
hints until the default controller demo is built and ready.
I haven't got around to writing any documentation specifically for this project
but you can read my NetTuts article which covers it's usage along with the REST Client lib.
[NetTuts: Working with RESTful Services in CodeIgniter](http://net.tutsplus.com/tutorials/php/working-with-restful-services-in-codeigniter-2/)
## Donations
If my REST Server has helped you out, or you'd like me to do some custom work on it, [please sponsor me](http://pledgie.com/campaigns/8328)
so I can keep working on this and other CodeIgniter projects for you all. |
ed6cba24deeb657b39254420ab82d5a28e305013 | input/docs/usage/basic-usage.md | input/docs/usage/basic-usage.md | ---
Order: 10
Title: Basic usage
---
To use Pull Request Code Analysis in your Cake file you need to import the core addin:
```csharp
#addin "Cake.Prca"
```
Also you need to import at least one issue provider and pull request system.
In the following example the issue provider for reading warnings from MsBuild log files
and support for TFS pull requests is imported:
```csharp
#addin "Cake.Prca.Issues.MsBuild"
#addin "Cake.Prca.PullRequests.Tfs"
```
Finally you can define a task where you call the core addin with the desired issue provider and pull request system:
```csharp
Task("prca").Does(() =>
{
var repoRootFolder = new DirectoryPath("c:\repo");
ReportCodeAnalysisIssuesToPullRequest(
MsBuildCodeAnalysisFromFilePath(
@"C:\build\msbuild.log",
MsBuildXmlFileLoggerFormat,
repoRootFolder),
TfsPullRequests(
new Uri("http://myserver:8080/tfs/defaultcollection/myproject/_git/myrepository"),
"refs/heads/feature/myfeature",
PrcaAuthenticationNtlm()),
repoRootFolder);
});
``` | ---
Order: 10
Title: Basic usage
---
To use Pull Request Code Analysis in your Cake file you need to import the core addin:
```csharp
#addin "Cake.Prca"
```
Also you need to import at least one issue provider and pull request system.
In the following example the issue provider for reading warnings from MsBuild log files
and support for TFS pull requests is imported:
```csharp
#addin "Cake.Prca.Issues.MsBuild"
#addin "Cake.Prca.PullRequests.Tfs"
```
Finally you can define a task where you call the core addin with the desired issue provider and pull request system:
```csharp
Task("prca").Does(() =>
{
var repoRootFolder = new DirectoryPath("c:\repo");
ReportCodeAnalysisIssuesToPullRequest(
MsBuildCodeAnalysisFromFilePath(
@"C:\build\msbuild.log",
MsBuildXmlFileLoggerFormat,
repoRootFolder),
TfsPullRequests(
new Uri("http://myserver:8080/tfs/defaultcollection/myproject/_git/myrepository"),
"refs/heads/feature/myfeature",
PrcaAuthenticationNtlm()),
repoRootFolder);
});
```
:::{.alert .alert-info}
Please note that you need at least Cake 0.16.2 to use Pull Request Code Analysis.
:::
| Add note for min Cake version | Add note for min Cake version
| Markdown | mit | cake-contrib/Cake.Prca.Website,cake-contrib/Cake.Prca.Website | markdown | ## Code Before:
---
Order: 10
Title: Basic usage
---
To use Pull Request Code Analysis in your Cake file you need to import the core addin:
```csharp
#addin "Cake.Prca"
```
Also you need to import at least one issue provider and pull request system.
In the following example the issue provider for reading warnings from MsBuild log files
and support for TFS pull requests is imported:
```csharp
#addin "Cake.Prca.Issues.MsBuild"
#addin "Cake.Prca.PullRequests.Tfs"
```
Finally you can define a task where you call the core addin with the desired issue provider and pull request system:
```csharp
Task("prca").Does(() =>
{
var repoRootFolder = new DirectoryPath("c:\repo");
ReportCodeAnalysisIssuesToPullRequest(
MsBuildCodeAnalysisFromFilePath(
@"C:\build\msbuild.log",
MsBuildXmlFileLoggerFormat,
repoRootFolder),
TfsPullRequests(
new Uri("http://myserver:8080/tfs/defaultcollection/myproject/_git/myrepository"),
"refs/heads/feature/myfeature",
PrcaAuthenticationNtlm()),
repoRootFolder);
});
```
## Instruction:
Add note for min Cake version
## Code After:
---
Order: 10
Title: Basic usage
---
To use Pull Request Code Analysis in your Cake file you need to import the core addin:
```csharp
#addin "Cake.Prca"
```
Also you need to import at least one issue provider and pull request system.
In the following example the issue provider for reading warnings from MsBuild log files
and support for TFS pull requests is imported:
```csharp
#addin "Cake.Prca.Issues.MsBuild"
#addin "Cake.Prca.PullRequests.Tfs"
```
Finally you can define a task where you call the core addin with the desired issue provider and pull request system:
```csharp
Task("prca").Does(() =>
{
var repoRootFolder = new DirectoryPath("c:\repo");
ReportCodeAnalysisIssuesToPullRequest(
MsBuildCodeAnalysisFromFilePath(
@"C:\build\msbuild.log",
MsBuildXmlFileLoggerFormat,
repoRootFolder),
TfsPullRequests(
new Uri("http://myserver:8080/tfs/defaultcollection/myproject/_git/myrepository"),
"refs/heads/feature/myfeature",
PrcaAuthenticationNtlm()),
repoRootFolder);
});
```
:::{.alert .alert-info}
Please note that you need at least Cake 0.16.2 to use Pull Request Code Analysis.
:::
|
c0db58ecaaf34160167b3e5ca4b6361d595a965f | README.md | README.md | This is an sligthly modifed version of the [52North SOS 4.0.](0https://wiki.52north.org/bin/view/SensorWeb/SensorObservationServiceIVDocumentation) which implements the
OGC Sensor Observation Service (SOS) standard version 2.0.0. It aims to adapt 52North SOS implementation to fullfill the needs of the Redch project.
## AMQP Service extension
This SOS implementation has been extended to properly suit the requirements of our use case. A new extension has been added in order to provide a RabbitMQ client. It is a wrapper of the official RabbitMQ client.
Contained in the `amqp-service` project submodule, wihtin the `extensions` module, it comes with an example properties file which can be found in `src/main/resources` folder. These properties are the following:
# URL of the RabbitMQ server
redch.amqp.host=192.168.0.20
# Name of the exchange to where the observations should be published
redch.amqp.exchange=observations
An updated copy of this file must be stored in the $HOME folder of the user responsible for the execution of the Java web application, with the name of `redch.properties`
## Integration
This service has been integrated with the SOS by using a subclass of the corresponding request handler. As we are interested to push every observation received to a queue, we have extend `ObservationsPostRequestHandler` in `RedchObservationsPostRequestHandler` of the rest binding.
|
This is an sligthly modifed version of the [52North SOS 4.0.](0https://wiki.52north.org/bin/view/SensorWeb/SensorObservationServiceIVDocumentation) which implements the
[OGC Sensor Observation Service (SOS)](http://www.opengeospatial.org/standards/sos) standard version 2.0.0. It aims to adapt 52North SOS implementation to fullfill the needs of the Redch project.
## AMQP Service extension
This SOS implementation has been extended to properly suit the requirements of our use case. A new extension has been added in order to provide a RabbitMQ client. It is a wrapper of the official RabbitMQ client.
Contained in the `amqp-service` project submodule, wihtin the `extensions` module, it comes with an example properties file which can be found in `src/main/resources` folder. These properties are the following:
# URL of the RabbitMQ server
redch.amqp.host=192.168.0.20
# Name of the exchange to where the observations should be published
redch.amqp.exchange=observations
An updated copy of this file must be stored in the $HOME folder of the user responsible for the execution of the Java web application, with the name of `redch.properties`
## Integration
This service has been integrated with the SOS by using a subclass of the corresponding request handler. As we are interested to push every observation received to a queue, we have extend `ObservationsPostRequestHandler` in `RedchObservationsPostRequestHandler` of the rest binding.
| Add link and meaningful title | Add link and meaningful title
| Markdown | apache-2.0 | sauloperez/sos,sauloperez/sos,sauloperez/sos | markdown | ## Code Before:
This is an sligthly modifed version of the [52North SOS 4.0.](0https://wiki.52north.org/bin/view/SensorWeb/SensorObservationServiceIVDocumentation) which implements the
OGC Sensor Observation Service (SOS) standard version 2.0.0. It aims to adapt 52North SOS implementation to fullfill the needs of the Redch project.
## AMQP Service extension
This SOS implementation has been extended to properly suit the requirements of our use case. A new extension has been added in order to provide a RabbitMQ client. It is a wrapper of the official RabbitMQ client.
Contained in the `amqp-service` project submodule, wihtin the `extensions` module, it comes with an example properties file which can be found in `src/main/resources` folder. These properties are the following:
# URL of the RabbitMQ server
redch.amqp.host=192.168.0.20
# Name of the exchange to where the observations should be published
redch.amqp.exchange=observations
An updated copy of this file must be stored in the $HOME folder of the user responsible for the execution of the Java web application, with the name of `redch.properties`
## Integration
This service has been integrated with the SOS by using a subclass of the corresponding request handler. As we are interested to push every observation received to a queue, we have extend `ObservationsPostRequestHandler` in `RedchObservationsPostRequestHandler` of the rest binding.
## Instruction:
Add link and meaningful title
## Code After:
This is an sligthly modifed version of the [52North SOS 4.0.](0https://wiki.52north.org/bin/view/SensorWeb/SensorObservationServiceIVDocumentation) which implements the
[OGC Sensor Observation Service (SOS)](http://www.opengeospatial.org/standards/sos) standard version 2.0.0. It aims to adapt 52North SOS implementation to fullfill the needs of the Redch project.
## AMQP Service extension
This SOS implementation has been extended to properly suit the requirements of our use case. A new extension has been added in order to provide a RabbitMQ client. It is a wrapper of the official RabbitMQ client.
Contained in the `amqp-service` project submodule, wihtin the `extensions` module, it comes with an example properties file which can be found in `src/main/resources` folder. These properties are the following:
# URL of the RabbitMQ server
redch.amqp.host=192.168.0.20
# Name of the exchange to where the observations should be published
redch.amqp.exchange=observations
An updated copy of this file must be stored in the $HOME folder of the user responsible for the execution of the Java web application, with the name of `redch.properties`
## Integration
This service has been integrated with the SOS by using a subclass of the corresponding request handler. As we are interested to push every observation received to a queue, we have extend `ObservationsPostRequestHandler` in `RedchObservationsPostRequestHandler` of the rest binding.
|
a7ef4b15ba922d887409ef27eeb7ad61dd0372a6 | lib/data/sequelize.js | lib/data/sequelize.js | Sequelize = require('sequelize')
pg = require('pg').native;
var databaseUrl = process.env.DATABASE_URL;
if (databaseUrl) {
var match = databaseUrl.match(/postgres:\/\/([^:]+):([^@]+)@([^:]+):(\d+)\/(.+)/);
var db = new Sequelize(match[5], match[1], match[2], {
dialect: 'postgres',
protocol: 'postgres',
port: match[4],
host: match[3],
logging: false,
native: true
});
} else {
throw new Error('DATABASE_URL env variable is required');
}
module.exports = db;
| var Sequelize = require('sequelize')
var pg = require('pg').native;
var config = require(__dirname+'/../../config/config.js');
var databaseUrl = config.get('DATABASE_URL');
if (databaseUrl) {
var match = databaseUrl.match(/postgres:\/\/([^:]+):([^@]+)@([^:]+):(\d+)\/(.+)/);
var db = new Sequelize(match[5], match[1], match[2], {
dialect: 'postgres',
protocol: 'postgres',
port: match[4],
host: match[3],
logging: false,
native: true
});
} else {
throw new Error('DATABASE_URL env variable is required');
}
module.exports = db;
| Read database url from config not environment. | [TASK] Read database url from config not environment.
| JavaScript | isc | xdv/gatewayd,zealord/gatewayd,Parkjeahwan/awegeeks,whotooktwarden/gatewayd,crazyquark/gatewayd,crazyquark/gatewayd,zealord/gatewayd,Parkjeahwan/awegeeks,xdv/gatewayd,whotooktwarden/gatewayd | javascript | ## Code Before:
Sequelize = require('sequelize')
pg = require('pg').native;
var databaseUrl = process.env.DATABASE_URL;
if (databaseUrl) {
var match = databaseUrl.match(/postgres:\/\/([^:]+):([^@]+)@([^:]+):(\d+)\/(.+)/);
var db = new Sequelize(match[5], match[1], match[2], {
dialect: 'postgres',
protocol: 'postgres',
port: match[4],
host: match[3],
logging: false,
native: true
});
} else {
throw new Error('DATABASE_URL env variable is required');
}
module.exports = db;
## Instruction:
[TASK] Read database url from config not environment.
## Code After:
var Sequelize = require('sequelize')
var pg = require('pg').native;
var config = require(__dirname+'/../../config/config.js');
var databaseUrl = config.get('DATABASE_URL');
if (databaseUrl) {
var match = databaseUrl.match(/postgres:\/\/([^:]+):([^@]+)@([^:]+):(\d+)\/(.+)/);
var db = new Sequelize(match[5], match[1], match[2], {
dialect: 'postgres',
protocol: 'postgres',
port: match[4],
host: match[3],
logging: false,
native: true
});
} else {
throw new Error('DATABASE_URL env variable is required');
}
module.exports = db;
|
1b1a5b57b1d4ff97faf4f02a6e84bd8f7bd2c673 | lib/dm-tags/tagging.rb | lib/dm-tags/tagging.rb | class Tagging
include DataMapper::Resource
property :id, Serial
property :taggable_id, Integer, :required => true
property :taggable_type, Class, :required => true
property :tag_context, String, :required => true
belongs_to :tag
def taggable
taggable_type.get!(taggable_id)
end
end
| class Tagging
include DataMapper::Resource
property :id, Serial
property :taggable_id, Integer, :required => true, :min => 1
property :taggable_type, Class, :required => true
property :tag_context, String, :required => true
belongs_to :tag
def taggable
taggable_type.get!(taggable_id)
end
end
| Support dm-constraints in explicitly defined FK | [dm-tags] Support dm-constraints in explicitly defined FK
| Ruby | mit | datamapper/dm-tags,komagata/dm-tags | ruby | ## Code Before:
class Tagging
include DataMapper::Resource
property :id, Serial
property :taggable_id, Integer, :required => true
property :taggable_type, Class, :required => true
property :tag_context, String, :required => true
belongs_to :tag
def taggable
taggable_type.get!(taggable_id)
end
end
## Instruction:
[dm-tags] Support dm-constraints in explicitly defined FK
## Code After:
class Tagging
include DataMapper::Resource
property :id, Serial
property :taggable_id, Integer, :required => true, :min => 1
property :taggable_type, Class, :required => true
property :tag_context, String, :required => true
belongs_to :tag
def taggable
taggable_type.get!(taggable_id)
end
end
|
ff8dbea43d1fb065eeb17a5b911d286356249c7c | _protected/framework/Layout/Form/Engine/PFBC/Element/Password.php | _protected/framework/Layout/Form/Engine/PFBC/Element/Password.php | <?php
/**
* We made many changes in this code.
* By pH7 (Pierre-Henry SORIA).
*/
namespace PFBC\Element;
use PH7\Framework\Mvc\Model\DbConfig;
class Password extends Textbox
{
public function render()
{
// Adding the password pattern
$this->attributes['pattern'] = '.{'.DbConfig::getSetting('minPasswordLength').','.DbConfig::getSetting('maxPasswordLength').'}';
// Adding the password type attribute
$this->attributes['type'] = 'password';
parent::render();
}
}
| <?php
/**
* We made many changes in this code.
* By pH7 (Pierre-Henry SORIA).
*/
namespace PFBC\Element;
class Password extends Textbox
{
public function render()
{
// Adding the password type attribute
$this->attributes['type'] = 'password';
parent::render();
}
}
| Remove the HTML5 pattenr as that PFBC field is present also on login forms and if the value if changed later (in admin panel) the users/admins wont be able to login anymore | Remove the HTML5 pattenr as that PFBC field is present also on login forms and if the value if changed later (in admin panel) the users/admins wont be able to login anymore
| PHP | mit | pH7Software/pH7-Social-Dating-CMS,pH7Software/pH7-Social-Dating-CMS,pH7Software/pH7-Social-Dating-CMS,pH7Software/pH7-Social-Dating-CMS | php | ## Code Before:
<?php
/**
* We made many changes in this code.
* By pH7 (Pierre-Henry SORIA).
*/
namespace PFBC\Element;
use PH7\Framework\Mvc\Model\DbConfig;
class Password extends Textbox
{
public function render()
{
// Adding the password pattern
$this->attributes['pattern'] = '.{'.DbConfig::getSetting('minPasswordLength').','.DbConfig::getSetting('maxPasswordLength').'}';
// Adding the password type attribute
$this->attributes['type'] = 'password';
parent::render();
}
}
## Instruction:
Remove the HTML5 pattenr as that PFBC field is present also on login forms and if the value if changed later (in admin panel) the users/admins wont be able to login anymore
## Code After:
<?php
/**
* We made many changes in this code.
* By pH7 (Pierre-Henry SORIA).
*/
namespace PFBC\Element;
class Password extends Textbox
{
public function render()
{
// Adding the password type attribute
$this->attributes['type'] = 'password';
parent::render();
}
}
|
9e564570e93c263daeed339c5db39184c67324b5 | example/DuckDuckGo/config.js | example/DuckDuckGo/config.js | module.exports = {
baseURL: 'https://duckduckgo.com/?kad=en_GB', // you don't need to add any query string to test your own website
// passing the language code is used only because DuckDuckGo adjusts to your default language, which may make the test fail
browser: 'firefox', // if you’d rather test with Chrome, you will need to install chromedriver
// read more at https://github.com/MattiSG/Watai/wiki/Testing-with-Chrome
// The above "browser" key is a shortcut, relying on browsers being installed in their default paths, and on a "standard" setup.
// If you want to set your browsers more specifically, you will need to fill the following "driverCapabilities" hash.
driverCapabilities: { // see all allowed values at http://code.google.com/p/selenium/wiki/DesiredCapabilities
// browserName: 'firefox',
// javascriptEnabled: false, // defaults to true when using the "browser" shortcut
// If your browsers are placed in a “non-default” path, set the paths to the **binaries** in the following keys:
// firefox_binary: '/Applications/Firefox.app/Contents/MacOS/firefox',
// 'chrome.binary': '/Applications/Google Chrome.app/Contents/MacOS/Google Chrome',
}
}
| module.exports = {
baseURL: 'https://duckduckgo.com',
browser: 'firefox', // if you’d rather test with Chrome, you will need to install chromedriver
// read more at https://github.com/MattiSG/Watai/wiki/Testing-with-Chrome
// The above "browser" key is a shortcut, relying on browsers being installed in their default paths, and on a "standard" setup.
// If you want to set your browsers more specifically, you will need to fill the following "driverCapabilities" hash.
driverCapabilities: { // see all allowed values at http://code.google.com/p/selenium/wiki/DesiredCapabilities
// browserName: 'firefox',
// javascriptEnabled: false, // defaults to true when using the "browser" shortcut
// If your browsers are placed in a “non-default” path, set the paths to the **binaries** in the following keys:
// firefox_binary: '/Applications/Firefox.app/Contents/MacOS/firefox',
// 'chrome.binary': '/Applications/Google Chrome.app/Contents/MacOS/Google Chrome',
}
}
| Remove now useless query string in DuckDuckGo example | Remove now useless query string in DuckDuckGo example | JavaScript | agpl-3.0 | MattiSG/Watai,MattiSG/Watai | javascript | ## Code Before:
module.exports = {
baseURL: 'https://duckduckgo.com/?kad=en_GB', // you don't need to add any query string to test your own website
// passing the language code is used only because DuckDuckGo adjusts to your default language, which may make the test fail
browser: 'firefox', // if you’d rather test with Chrome, you will need to install chromedriver
// read more at https://github.com/MattiSG/Watai/wiki/Testing-with-Chrome
// The above "browser" key is a shortcut, relying on browsers being installed in their default paths, and on a "standard" setup.
// If you want to set your browsers more specifically, you will need to fill the following "driverCapabilities" hash.
driverCapabilities: { // see all allowed values at http://code.google.com/p/selenium/wiki/DesiredCapabilities
// browserName: 'firefox',
// javascriptEnabled: false, // defaults to true when using the "browser" shortcut
// If your browsers are placed in a “non-default” path, set the paths to the **binaries** in the following keys:
// firefox_binary: '/Applications/Firefox.app/Contents/MacOS/firefox',
// 'chrome.binary': '/Applications/Google Chrome.app/Contents/MacOS/Google Chrome',
}
}
## Instruction:
Remove now useless query string in DuckDuckGo example
## Code After:
module.exports = {
baseURL: 'https://duckduckgo.com',
browser: 'firefox', // if you’d rather test with Chrome, you will need to install chromedriver
// read more at https://github.com/MattiSG/Watai/wiki/Testing-with-Chrome
// The above "browser" key is a shortcut, relying on browsers being installed in their default paths, and on a "standard" setup.
// If you want to set your browsers more specifically, you will need to fill the following "driverCapabilities" hash.
driverCapabilities: { // see all allowed values at http://code.google.com/p/selenium/wiki/DesiredCapabilities
// browserName: 'firefox',
// javascriptEnabled: false, // defaults to true when using the "browser" shortcut
// If your browsers are placed in a “non-default” path, set the paths to the **binaries** in the following keys:
// firefox_binary: '/Applications/Firefox.app/Contents/MacOS/firefox',
// 'chrome.binary': '/Applications/Google Chrome.app/Contents/MacOS/Google Chrome',
}
}
|
bc1a3ad59b732d9dc6ee3c04cebbc813a0f7543a | examples/fs-coroutines.lua | examples/fs-coroutines.lua | local FS = require('fs');
local Fiber = require('fiber')
Fiber.new(function (resume, wait)
print("opening...")
FS.open("license.txt", "r", "0644", resume)
local err, fd = wait()
p("on_open", {err=err,fd=fd})
print("fstatting...")
FS.fstat(fd, resume)
local err, stat = wait()
p("stat", {err=err,stat=stat})
print("reading...")
local offset = 0
repeat
FS.read(fd, offset, 72, resume)
local err, chunk, length = wait()
p("on_read", {err=err,chunk=chunk, offset=offset, length=length})
offset = offset + length
until length == 0
print("closing...")
FS.close(fd, resume)
local err = wait()
p("on_close", {err=err})
end)
Fiber.new(function (resume, wait)
print("scanning directory...")
FS.readdir(".", resume)
local err, files = wait()
p("on_open", {err=err,files=files})
end)
| local FS = require('fs');
local Timer = require('timer');
local Fiber = require('fiber')
Fiber.new(function (resume, wait)
print("opening...")
FS.open("license.txt", "r", "0644", resume)
local err, fd = wait()
p("on_open", {err=err,fd=fd})
print("fstatting...")
FS.fstat(fd, resume)
local err, stat = wait()
p("stat", {err=err,stat=stat})
print("reading...")
local offset = 0
repeat
FS.read(fd, offset, 72, resume)
local err, chunk, length = wait()
p("on_read", {err=err,chunk=chunk, offset=offset, length=length})
offset = offset + length
until length == 0
print("pausing...")
Timer.set_timeout(400, resume)
wait()
print("closing...")
FS.close(fd, resume)
local err = wait()
p("on_close", {err=err})
end)
Fiber.new(function (resume, wait)
print("scanning directory...")
FS.readdir(".", resume)
local err, files = wait()
p("on_open", {err=err,files=files})
end)
| Add timeout in the coroutine mix to show it's not just FS operations | Add timeout in the coroutine mix to show it's not just FS operations
Change-Id: I38e0d3af708d89aa3b158a3a1dfff0635f59da0b
| Lua | apache-2.0 | GabrielNicolasAvellaneda/luvit-upstream,GabrielNicolasAvellaneda/luvit-upstream,boundary/luvit,rjeli/luvit,sousoux/luvit,DBarney/luvit,sousoux/luvit,kaustavha/luvit,zhaozg/luvit,rjeli/luvit,AndrewTsao/luvit,connectFree/lev,sousoux/luvit,boundary/luvit,DBarney/luvit,bsn069/luvit,bsn069/luvit,kaustavha/luvit,luvit/luvit,sousoux/luvit,DBarney/luvit,sousoux/luvit,boundary/luvit,brimworks/luvit,boundary/luvit,sousoux/luvit,boundary/luvit,AndrewTsao/luvit,bsn069/luvit,luvit/luvit,boundary/luvit,rjeli/luvit,AndrewTsao/luvit,GabrielNicolasAvellaneda/luvit-upstream,zhaozg/luvit,DBarney/luvit,kaustavha/luvit,rjeli/luvit,connectFree/lev,GabrielNicolasAvellaneda/luvit-upstream | lua | ## Code Before:
local FS = require('fs');
local Fiber = require('fiber')
Fiber.new(function (resume, wait)
print("opening...")
FS.open("license.txt", "r", "0644", resume)
local err, fd = wait()
p("on_open", {err=err,fd=fd})
print("fstatting...")
FS.fstat(fd, resume)
local err, stat = wait()
p("stat", {err=err,stat=stat})
print("reading...")
local offset = 0
repeat
FS.read(fd, offset, 72, resume)
local err, chunk, length = wait()
p("on_read", {err=err,chunk=chunk, offset=offset, length=length})
offset = offset + length
until length == 0
print("closing...")
FS.close(fd, resume)
local err = wait()
p("on_close", {err=err})
end)
Fiber.new(function (resume, wait)
print("scanning directory...")
FS.readdir(".", resume)
local err, files = wait()
p("on_open", {err=err,files=files})
end)
## Instruction:
Add timeout in the coroutine mix to show it's not just FS operations
Change-Id: I38e0d3af708d89aa3b158a3a1dfff0635f59da0b
## Code After:
local FS = require('fs');
local Timer = require('timer');
local Fiber = require('fiber')
Fiber.new(function (resume, wait)
print("opening...")
FS.open("license.txt", "r", "0644", resume)
local err, fd = wait()
p("on_open", {err=err,fd=fd})
print("fstatting...")
FS.fstat(fd, resume)
local err, stat = wait()
p("stat", {err=err,stat=stat})
print("reading...")
local offset = 0
repeat
FS.read(fd, offset, 72, resume)
local err, chunk, length = wait()
p("on_read", {err=err,chunk=chunk, offset=offset, length=length})
offset = offset + length
until length == 0
print("pausing...")
Timer.set_timeout(400, resume)
wait()
print("closing...")
FS.close(fd, resume)
local err = wait()
p("on_close", {err=err})
end)
Fiber.new(function (resume, wait)
print("scanning directory...")
FS.readdir(".", resume)
local err, files = wait()
p("on_open", {err=err,files=files})
end)
|
328ea6f8048b26ba0a2eb70462a01731be042bf4 | haskell/README.md | haskell/README.md | <img src="https://raw.githubusercontent.com/rtoal/polyglot/master/resources/haskell-logo-64.png">
# Haskell Examples
To get Haskell:
```
brew install ghc
```
To run the tests:
```
./test.sh
```
# Haskell Resources
* [Awesome Haskell](https://github.com/krispo/awesome-haskell)
* [Haskell Home Page](https://www.haskell.org/)
* [Haskell Docs Page](https://www.haskell.org/documentation)
* [Haskell Wiki](https://wiki.haskell.org/Haskell)
* [Haskell 2010 Language Report](https://www.haskell.org/onlinereport/haskell2010/)
* [Learn You a Haskell For Great Good](http://learnyouahaskell.com/)
* [Gentle Introduction To Haskell](https://www.haskell.org/tutorial/)
| <img src="https://raw.githubusercontent.com/rtoal/polyglot/master/resources/haskell-logo-64.png">
# Haskell Examples
To get Haskell:
```
brew install ghc
```
To run the tests:
```
./test.sh
```
# Haskell Resources
* [Awesome Haskell](https://github.com/krispo/awesome-haskell)
* [Haskell Home Page](https://www.haskell.org/)
* [Haskell Docs Page](https://www.haskell.org/documentation)
* [Haskell Wiki](https://wiki.haskell.org/Haskell)
* [Haskell 2010 Language Report](https://www.haskell.org/onlinereport/haskell2010/)
* [Learn You a Haskell For Great Good](http://learnyouahaskell.com/)
* [Gentle Introduction To Haskell](https://www.haskell.org/tutorial/)
* [Exceptions Best Practices in Haskell](https://www.fpcomplete.com/blog/2016/11/exceptions-best-practices-haskell)
| Add a new Haskell resource | Add a new Haskell resource
| Markdown | mit | rtoal/polyglot,rtoal/polyglot,rtoal/polyglot,rtoal/ple,rtoal/ple,rtoal/ple,rtoal/polyglot,rtoal/ple,rtoal/ple,rtoal/ple,rtoal/ple,rtoal/ple,rtoal/polyglot,rtoal/ple,rtoal/polyglot,rtoal/polyglot,rtoal/polyglot,rtoal/ple,rtoal/ple,rtoal/polyglot,rtoal/polyglot,rtoal/ple,rtoal/polyglot,rtoal/polyglot,rtoal/polyglot,rtoal/ple,rtoal/ple,rtoal/polyglot,rtoal/ple,rtoal/polyglot,rtoal/ple | markdown | ## Code Before:
<img src="https://raw.githubusercontent.com/rtoal/polyglot/master/resources/haskell-logo-64.png">
# Haskell Examples
To get Haskell:
```
brew install ghc
```
To run the tests:
```
./test.sh
```
# Haskell Resources
* [Awesome Haskell](https://github.com/krispo/awesome-haskell)
* [Haskell Home Page](https://www.haskell.org/)
* [Haskell Docs Page](https://www.haskell.org/documentation)
* [Haskell Wiki](https://wiki.haskell.org/Haskell)
* [Haskell 2010 Language Report](https://www.haskell.org/onlinereport/haskell2010/)
* [Learn You a Haskell For Great Good](http://learnyouahaskell.com/)
* [Gentle Introduction To Haskell](https://www.haskell.org/tutorial/)
## Instruction:
Add a new Haskell resource
## Code After:
<img src="https://raw.githubusercontent.com/rtoal/polyglot/master/resources/haskell-logo-64.png">
# Haskell Examples
To get Haskell:
```
brew install ghc
```
To run the tests:
```
./test.sh
```
# Haskell Resources
* [Awesome Haskell](https://github.com/krispo/awesome-haskell)
* [Haskell Home Page](https://www.haskell.org/)
* [Haskell Docs Page](https://www.haskell.org/documentation)
* [Haskell Wiki](https://wiki.haskell.org/Haskell)
* [Haskell 2010 Language Report](https://www.haskell.org/onlinereport/haskell2010/)
* [Learn You a Haskell For Great Good](http://learnyouahaskell.com/)
* [Gentle Introduction To Haskell](https://www.haskell.org/tutorial/)
* [Exceptions Best Practices in Haskell](https://www.fpcomplete.com/blog/2016/11/exceptions-best-practices-haskell)
|
8b16c0836fa5b2c3c7880509b9a22210cd856d5f | lib/cloudflair/api/zone/settings/development_mode.rb | lib/cloudflair/api/zone/settings/development_mode.rb | require 'cloudflair/communication'
module Cloudflair
class DevelopmentMode
include Cloudflair::Communication
attr_accessor :zone_id
patchable_fields :value
def path
"/zones/#{zone_id}/settings/development_mode"
end
def initialize(zone_id)
@zone_id = zone_id
end
end
end
| require 'cloudflair/communication'
module Cloudflair
class DevelopmentMode
include Cloudflair::Communication
attr_accessor :zone_id
patchable_fields :value
def initialize(zone_id)
@zone_id = zone_id
end
private
def path
"/zones/#{zone_id}/settings/development_mode"
end
end
end
| Make private what must not be public | Make private what must not be public
| Ruby | mit | ninech/cloudflair,ninech/cloudflair | ruby | ## Code Before:
require 'cloudflair/communication'
module Cloudflair
class DevelopmentMode
include Cloudflair::Communication
attr_accessor :zone_id
patchable_fields :value
def path
"/zones/#{zone_id}/settings/development_mode"
end
def initialize(zone_id)
@zone_id = zone_id
end
end
end
## Instruction:
Make private what must not be public
## Code After:
require 'cloudflair/communication'
module Cloudflair
class DevelopmentMode
include Cloudflair::Communication
attr_accessor :zone_id
patchable_fields :value
def initialize(zone_id)
@zone_id = zone_id
end
private
def path
"/zones/#{zone_id}/settings/development_mode"
end
end
end
|
09aacfec409971a17cb1714bdf2276190911fa47 | gulp/.eslintrc.json | gulp/.eslintrc.json | {
"env": {
"es6": true,
"node": true
},
"rules": {
"import/no-extraneous-dependencies": [
"error",
{
"devDependencies": true,
"optionalDependencies": false,
"peerDependencies": false
}
],
"import/prefer-default-export": ["off"]
}
}
| {
"env": {
"es6": true,
"node": true
},
"parserOptions": {
"project": "../tsconfig.json"
},
"rules": {
"import/no-extraneous-dependencies": [
"error",
{
"devDependencies": true,
"optionalDependencies": false,
"peerDependencies": false
}
],
"import/prefer-default-export": ["off"]
}
}
| Add reference to tsconfig in parent directory to fix IDE error. | Add reference to tsconfig in parent directory to fix IDE error.
| JSON | mit | oxyno-zeta/react-editable-json-tree,oxyno-zeta/react-editable-json-tree,oxyno-zeta/react-editable-json-tree | json | ## Code Before:
{
"env": {
"es6": true,
"node": true
},
"rules": {
"import/no-extraneous-dependencies": [
"error",
{
"devDependencies": true,
"optionalDependencies": false,
"peerDependencies": false
}
],
"import/prefer-default-export": ["off"]
}
}
## Instruction:
Add reference to tsconfig in parent directory to fix IDE error.
## Code After:
{
"env": {
"es6": true,
"node": true
},
"parserOptions": {
"project": "../tsconfig.json"
},
"rules": {
"import/no-extraneous-dependencies": [
"error",
{
"devDependencies": true,
"optionalDependencies": false,
"peerDependencies": false
}
],
"import/prefer-default-export": ["off"]
}
}
|
66523147c9afa3f4629082e96f391463660f94f2 | .github/ISSUE_TEMPLATE/1-leak.md | .github/ISSUE_TEMPLATE/1-leak.md | ---
name: "\U0001F424Leak in your app"
about: Use Stack Overflow instead
title: "\U0001F649 [This issue will be immediately closed]"
labels: 'Close immediately'
assignees: ''
---
🛑 𝙎𝙏𝙊𝙋
This issue tracker is not for help with memory leaks detected by LeakCanary in your own app.
To fix a leak:
* First, learn the fundamentals: https://github.com/square/leakcanary#fundamentals
* Then, create a Stack Overflow question: http://stackoverflow.com/questions/tagged/leakcanary
| ---
name: "\U0001F424Leak in your app"
about: Use Stack Overflow instead
title: "\U0001F649 [This issue will be immediately closed]"
labels: 'Close immediately'
assignees: ''
---
🛑 𝙎𝙏𝙊𝙋
This issue tracker is not for help with memory leaks detected by LeakCanary in your own app.
To fix a leak:
* First, learn the fundamentals: https://square.github.io/leakcanary/fundamentals/
* Then, create a Stack Overflow question: https://stackoverflow.com/questions/tagged/leakcanary
| Fix links in app leak issue template | Fix links in app leak issue template
| Markdown | apache-2.0 | square/leakcanary,square/leakcanary,square/leakcanary | markdown | ## Code Before:
---
name: "\U0001F424Leak in your app"
about: Use Stack Overflow instead
title: "\U0001F649 [This issue will be immediately closed]"
labels: 'Close immediately'
assignees: ''
---
🛑 𝙎𝙏𝙊𝙋
This issue tracker is not for help with memory leaks detected by LeakCanary in your own app.
To fix a leak:
* First, learn the fundamentals: https://github.com/square/leakcanary#fundamentals
* Then, create a Stack Overflow question: http://stackoverflow.com/questions/tagged/leakcanary
## Instruction:
Fix links in app leak issue template
## Code After:
---
name: "\U0001F424Leak in your app"
about: Use Stack Overflow instead
title: "\U0001F649 [This issue will be immediately closed]"
labels: 'Close immediately'
assignees: ''
---
🛑 𝙎𝙏𝙊𝙋
This issue tracker is not for help with memory leaks detected by LeakCanary in your own app.
To fix a leak:
* First, learn the fundamentals: https://square.github.io/leakcanary/fundamentals/
* Then, create a Stack Overflow question: https://stackoverflow.com/questions/tagged/leakcanary
|
aff1d7a3c56d028cec435ed6d57c6e6768737115 | app/views/standups/index.html.erb | app/views/standups/index.html.erb | <h1>Choose a Standup</h1>
<table>
<% @standups.each do |standup| %>
<tr>
<td><h1><%= link_to standup.title, standup %></h1></td>
<td class='pull-right'><%= link_to 'Edit', edit_standup_path(standup) %></td>
</tr>
<% end %>
</table>
<div>
<%= link_to('New Standup', new_standup_path) %>
</div>
| <div class="container">
<div class="hero-unit">
<h2>Choose a Standup</h2>
<table>
<% @standups.each do |standup| %>
<tr>
<td><h3><%= link_to standup.title, standup %></h3></td>
<td class='pull-right'><%= link_to 'Edit', edit_standup_path(standup) %></td>
</tr>
<% end %>
</table>
<div>
<%= link_to('New Standup »'.html_safe, new_standup_path, class: 'btn btn-primary btn-large') %>
</div>
</div>
</div>
| Make the standup index just a little bit prettier | Make the standup index just a little bit prettier
| HTML+ERB | mit | pivotal/whiteboard,mikeymc/whiteboard,mikeymc/whiteboard,pivotal/whiteboard,mikeymc/whiteboard,pivotal/whiteboard,mikeymc/whiteboard,pivotal/whiteboard | html+erb | ## Code Before:
<h1>Choose a Standup</h1>
<table>
<% @standups.each do |standup| %>
<tr>
<td><h1><%= link_to standup.title, standup %></h1></td>
<td class='pull-right'><%= link_to 'Edit', edit_standup_path(standup) %></td>
</tr>
<% end %>
</table>
<div>
<%= link_to('New Standup', new_standup_path) %>
</div>
## Instruction:
Make the standup index just a little bit prettier
## Code After:
<div class="container">
<div class="hero-unit">
<h2>Choose a Standup</h2>
<table>
<% @standups.each do |standup| %>
<tr>
<td><h3><%= link_to standup.title, standup %></h3></td>
<td class='pull-right'><%= link_to 'Edit', edit_standup_path(standup) %></td>
</tr>
<% end %>
</table>
<div>
<%= link_to('New Standup »'.html_safe, new_standup_path, class: 'btn btn-primary btn-large') %>
</div>
</div>
</div>
|
9e73a033c8058671e590f3bd4f91d777979bd439 | recipes/pycodestyle/meta.yaml | recipes/pycodestyle/meta.yaml | {% set name = "pycodestyle" %}
{% set version = "2.2.0" %}
{%set compress_type = "tar.gz" %}
{%set hash_type = "sha256" %}
{%set hash_val = "df81dc3293e0123e2e8d1f2aaf819600e4ae287d8b3af8b72181af50257e5d9a" %}
{%set build_num = "0" %}
package:
name: {{ name|lower }}
version: {{ version }}
source:
fn: {{ name }}-{{ version }}.{{ compress_type }}
url: https://pypi.io/packages/source/{{ name[0] }}/{{ name }}/{{ name }}-{{ version }}.{{ compress_type }}
{{ hash_type }}: {{ hash_val }}
build:
entry_points:
- pycodestyle = pycodestyle:_main
number: {{ build_num }}
script: python setup.py install --single-version-externally-managed --record=record.txt
requirements:
build:
- python
- setuptools
run:
- python
test:
commands:
- pycodestyle --help
- pycodestyle --version
about:
home: https://pycodestyle.readthedocs.io/
license: MIT
license_family: MIT
summary: 'Python style guide checker'
doc_url: https://pycodestyle.readthedocs.io/
dev_url: https://github.com/PyCQA/pycodestyle
| {% set name = "pycodestyle" %}
{% set version = "2.3.0" %}
{%set compress_type = "tar.gz" %}
{%set hash_type = "sha256" %}
{%set hash_val = "a5910db118cf7e66ff92fb281a203c19ca2b5134620dd2538a794e636253863b" %}
{%set build_num = "0" %}
package:
name: {{ name|lower }}
version: {{ version }}
source:
fn: {{ name }}-{{ version }}.{{ compress_type }}
url: https://pypi.io/packages/source/{{ name[0] }}/{{ name }}/{{ name }}-{{ version }}.{{ compress_type }}
{{ hash_type }}: {{ hash_val }}
build:
entry_points:
- pycodestyle = pycodestyle:_main
number: {{ build_num }}
script: python setup.py install --single-version-externally-managed --record=record.txt
requirements:
build:
- python
- setuptools
run:
- python
test:
commands:
- pycodestyle --help
- pycodestyle --version
about:
home: https://pycodestyle.readthedocs.io/
license: MIT
license_family: MIT
summary: 'Python style guide checker'
doc_url: https://pycodestyle.readthedocs.io/
dev_url: https://github.com/PyCQA/pycodestyle
| Update pycodestyle recipe to version 2.3.0 | Update pycodestyle recipe to version 2.3.0
| YAML | bsd-3-clause | jjhelmus/berryconda,jjhelmus/berryconda,jjhelmus/berryconda,jjhelmus/berryconda,jjhelmus/berryconda | yaml | ## Code Before:
{% set name = "pycodestyle" %}
{% set version = "2.2.0" %}
{%set compress_type = "tar.gz" %}
{%set hash_type = "sha256" %}
{%set hash_val = "df81dc3293e0123e2e8d1f2aaf819600e4ae287d8b3af8b72181af50257e5d9a" %}
{%set build_num = "0" %}
package:
name: {{ name|lower }}
version: {{ version }}
source:
fn: {{ name }}-{{ version }}.{{ compress_type }}
url: https://pypi.io/packages/source/{{ name[0] }}/{{ name }}/{{ name }}-{{ version }}.{{ compress_type }}
{{ hash_type }}: {{ hash_val }}
build:
entry_points:
- pycodestyle = pycodestyle:_main
number: {{ build_num }}
script: python setup.py install --single-version-externally-managed --record=record.txt
requirements:
build:
- python
- setuptools
run:
- python
test:
commands:
- pycodestyle --help
- pycodestyle --version
about:
home: https://pycodestyle.readthedocs.io/
license: MIT
license_family: MIT
summary: 'Python style guide checker'
doc_url: https://pycodestyle.readthedocs.io/
dev_url: https://github.com/PyCQA/pycodestyle
## Instruction:
Update pycodestyle recipe to version 2.3.0
## Code After:
{% set name = "pycodestyle" %}
{% set version = "2.3.0" %}
{%set compress_type = "tar.gz" %}
{%set hash_type = "sha256" %}
{%set hash_val = "a5910db118cf7e66ff92fb281a203c19ca2b5134620dd2538a794e636253863b" %}
{%set build_num = "0" %}
package:
name: {{ name|lower }}
version: {{ version }}
source:
fn: {{ name }}-{{ version }}.{{ compress_type }}
url: https://pypi.io/packages/source/{{ name[0] }}/{{ name }}/{{ name }}-{{ version }}.{{ compress_type }}
{{ hash_type }}: {{ hash_val }}
build:
entry_points:
- pycodestyle = pycodestyle:_main
number: {{ build_num }}
script: python setup.py install --single-version-externally-managed --record=record.txt
requirements:
build:
- python
- setuptools
run:
- python
test:
commands:
- pycodestyle --help
- pycodestyle --version
about:
home: https://pycodestyle.readthedocs.io/
license: MIT
license_family: MIT
summary: 'Python style guide checker'
doc_url: https://pycodestyle.readthedocs.io/
dev_url: https://github.com/PyCQA/pycodestyle
|
7efc3b2f382b97a864330d07ca58fd3da0b707a7 | packages/data-ui-theme/README.md | packages/data-ui-theme/README.md | This package exports theme variables that can be used by other packages. On the roadmap is a more comprehensive theme for non-svg data-ui elements.
`npm install --save @data-ui/theme`
```js
import { font, svgFont, label, size, color, chartTheme } from `@data-ui/theme`;
```
| This package exports theme variables that can be used by other packages. On the roadmap is a more comprehensive theme for non-svg data-ui elements.
`npm install --save @data-ui/theme`
```js
import { font, svgFont, label, size, color, chartTheme, allColors } from `@data-ui/theme`;
```
| Update readme to include allColors export | Update readme to include allColors export | Markdown | mit | williaster/data-ui,williaster/data-ui | markdown | ## Code Before:
This package exports theme variables that can be used by other packages. On the roadmap is a more comprehensive theme for non-svg data-ui elements.
`npm install --save @data-ui/theme`
```js
import { font, svgFont, label, size, color, chartTheme } from `@data-ui/theme`;
```
## Instruction:
Update readme to include allColors export
## Code After:
This package exports theme variables that can be used by other packages. On the roadmap is a more comprehensive theme for non-svg data-ui elements.
`npm install --save @data-ui/theme`
```js
import { font, svgFont, label, size, color, chartTheme, allColors } from `@data-ui/theme`;
```
|
351f05983d9e9878ae2284c9ed39a4234a2e6115 | app/views/layouts/application.html.erb | app/views/layouts/application.html.erb | <!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>there's a board</title>
<%= stylesheet_link_tag 'application', media: 'all' %>
<%= javascript_include_tag 'application' %>
<%= csrf_meta_tags %>
<link href="https://fonts.googleapis.com/css?family=Roboto:400,300,100,500,700,900" rel="stylesheet" type="text/css">
<link href="/assets/css/icomoon/styles.css" rel="stylesheet" type="text/css">
</head>
<body>
<%= render partial: "shared/nav" %>
<%= yield %>
</body>
</html>
<script id="mentor-template" type="text/x-handlebars-template">
{{#each .}}
<li class="media">
<a href="#" class="media-left"><img src="{{ image }}" class="img-sm img-circle" alt=""></a>
<div class="media-body">
<p class="media-heading text-semibold">{{ name }}</p>
</div>
</li>
{{/each}}
</script> | <!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>there's a board</title>
<%= stylesheet_link_tag 'application', media: 'all' %>
<%= javascript_include_tag 'application' %>
<%= csrf_meta_tags %>
<link href="https://fonts.googleapis.com/css?family=Roboto:400,300,100,500,700,900" rel="stylesheet" type="text/css">
<link href="/assets/css/icomoon/styles.css" rel="stylesheet" type="text/css">
</head>
<body>
<%= render partial: "shared/nav" %>
<%= yield %>
<!-- edit user modal-->
<div id="edit_user_modal" class="modal fade">
<div class="modal-dialog modal-sm">
<div class="modal-content">
</div>
</div>
</div>
<!--/edit user modal-->
</body>
</html>
<script id="mentor-template" type="text/x-handlebars-template">
{{#each .}}
<li class="media">
<a href="#" class="media-left"><img src="{{ image }}" class="img-sm img-circle" alt=""></a>
<div class="media-body">
<p class="media-heading text-semibold">{{ name }}</p>
</div>
</li>
{{/each}}
</script> | Add edit-user-modal to main layout | Add edit-user-modal to main layout
| HTML+ERB | mit | theresaboard/theres-a-board,theresaboard/theres-a-board,theresaboard/theres-a-board | html+erb | ## Code Before:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>there's a board</title>
<%= stylesheet_link_tag 'application', media: 'all' %>
<%= javascript_include_tag 'application' %>
<%= csrf_meta_tags %>
<link href="https://fonts.googleapis.com/css?family=Roboto:400,300,100,500,700,900" rel="stylesheet" type="text/css">
<link href="/assets/css/icomoon/styles.css" rel="stylesheet" type="text/css">
</head>
<body>
<%= render partial: "shared/nav" %>
<%= yield %>
</body>
</html>
<script id="mentor-template" type="text/x-handlebars-template">
{{#each .}}
<li class="media">
<a href="#" class="media-left"><img src="{{ image }}" class="img-sm img-circle" alt=""></a>
<div class="media-body">
<p class="media-heading text-semibold">{{ name }}</p>
</div>
</li>
{{/each}}
</script>
## Instruction:
Add edit-user-modal to main layout
## Code After:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>there's a board</title>
<%= stylesheet_link_tag 'application', media: 'all' %>
<%= javascript_include_tag 'application' %>
<%= csrf_meta_tags %>
<link href="https://fonts.googleapis.com/css?family=Roboto:400,300,100,500,700,900" rel="stylesheet" type="text/css">
<link href="/assets/css/icomoon/styles.css" rel="stylesheet" type="text/css">
</head>
<body>
<%= render partial: "shared/nav" %>
<%= yield %>
<!-- edit user modal-->
<div id="edit_user_modal" class="modal fade">
<div class="modal-dialog modal-sm">
<div class="modal-content">
</div>
</div>
</div>
<!--/edit user modal-->
</body>
</html>
<script id="mentor-template" type="text/x-handlebars-template">
{{#each .}}
<li class="media">
<a href="#" class="media-left"><img src="{{ image }}" class="img-sm img-circle" alt=""></a>
<div class="media-body">
<p class="media-heading text-semibold">{{ name }}</p>
</div>
</li>
{{/each}}
</script> |
32cd17daba96606c8241400284cea909b25a1036 | resources/assets/es6/places.js | resources/assets/es6/places.js | //places.js
import addMap from './mapbox-utils';
import getIcon from './edit-place-icon';
let div = document.querySelector('.map');
let map = addMap(div);
let selectElem = document.querySelector('select[name="icon"]');
selectElem.addEventListener('click', function () {
let source = map.getSource('points');
let newIcon = getIcon();
if (source._data.features[0].properties.icon != newIcon) {
source._data.features[0].properties.icon = newIcon;
map.getSource('points').setData(source._data);
}
});
| //places.js
import addMap from './mapbox-utils';
import getIcon from './edit-place-icon';
let div = document.querySelector('.map');
let map = addMap(div);
let isDragging;
let isCursorOverPoint;
let canvas = map.getCanvasContainer();
let selectElem = document.querySelector('select[name="icon"]');
selectElem.addEventListener('click', function () {
let newIcon = getIcon();
let source = map.getSource('points');
if (source._data.features[0].properties.icon != newIcon) {
source._data.features[0].properties.icon = newIcon;
map.getSource('points').setData(source._data);
}
});
function updateFormCoords(coords) {
let latInput = document.querySelector('#latitude');
let lonInput = document.querySelector('#longitude');
latInput.value = coords.lat.toPrecision(6);
lonInput.value = coords.lng.toPrecision(6);
}
function mouseDown() {
if (!isCursorOverPoint) return;
isDragging = true;
// Set a cursor indicator
canvas.style.cursor = 'grab';
// Mouse events
map.on('mousemove', onMove);
map.once('mouseup', onUp);
}
function onMove(e) {
if (!isDragging) return;
let coords = e.lngLat;
let source = map.getSource('points');
// Set a UI indicator for dragging.
canvas.style.cursor = 'grabbing';
// Update the Point feature in `geojson` coordinates
// and call setData to the source layer `point` on it.
source._data.features[0].geometry.coordinates = [coords.lng, coords.lat];
map.getSource('points').setData(source._data);
}
function onUp(e) {
if (!isDragging) return;
let coords = e.lngLat;
// Print the coordinates of where the point had
// finished being dragged to on the map.
updateFormCoords(coords);
canvas.style.cursor = '';
isDragging = false;
// Unbind mouse events
map.off('mousemove', onMove);
}
// When the cursor enters a feature in the point layer, prepare for dragging.
map.on('mouseenter', 'points', function() {
canvas.style.cursor = 'move';
isCursorOverPoint = true;
map.dragPan.disable();
});
map.on('mouseleave', 'points', function() {
canvas.style.cursor = '';
isCursorOverPoint = false;
map.dragPan.enable();
});
map.on('mousedown', mouseDown);
| Update code to edit a place, we can move the marker around | Update code to edit a place, we can move the marker around
| JavaScript | cc0-1.0 | jonnybarnes/jonnybarnes.uk,jonnybarnes/jonnybarnes.uk,jonnybarnes/jonnybarnes.uk | javascript | ## Code Before:
//places.js
import addMap from './mapbox-utils';
import getIcon from './edit-place-icon';
let div = document.querySelector('.map');
let map = addMap(div);
let selectElem = document.querySelector('select[name="icon"]');
selectElem.addEventListener('click', function () {
let source = map.getSource('points');
let newIcon = getIcon();
if (source._data.features[0].properties.icon != newIcon) {
source._data.features[0].properties.icon = newIcon;
map.getSource('points').setData(source._data);
}
});
## Instruction:
Update code to edit a place, we can move the marker around
## Code After:
//places.js
import addMap from './mapbox-utils';
import getIcon from './edit-place-icon';
let div = document.querySelector('.map');
let map = addMap(div);
let isDragging;
let isCursorOverPoint;
let canvas = map.getCanvasContainer();
let selectElem = document.querySelector('select[name="icon"]');
selectElem.addEventListener('click', function () {
let newIcon = getIcon();
let source = map.getSource('points');
if (source._data.features[0].properties.icon != newIcon) {
source._data.features[0].properties.icon = newIcon;
map.getSource('points').setData(source._data);
}
});
function updateFormCoords(coords) {
let latInput = document.querySelector('#latitude');
let lonInput = document.querySelector('#longitude');
latInput.value = coords.lat.toPrecision(6);
lonInput.value = coords.lng.toPrecision(6);
}
function mouseDown() {
if (!isCursorOverPoint) return;
isDragging = true;
// Set a cursor indicator
canvas.style.cursor = 'grab';
// Mouse events
map.on('mousemove', onMove);
map.once('mouseup', onUp);
}
function onMove(e) {
if (!isDragging) return;
let coords = e.lngLat;
let source = map.getSource('points');
// Set a UI indicator for dragging.
canvas.style.cursor = 'grabbing';
// Update the Point feature in `geojson` coordinates
// and call setData to the source layer `point` on it.
source._data.features[0].geometry.coordinates = [coords.lng, coords.lat];
map.getSource('points').setData(source._data);
}
function onUp(e) {
if (!isDragging) return;
let coords = e.lngLat;
// Print the coordinates of where the point had
// finished being dragged to on the map.
updateFormCoords(coords);
canvas.style.cursor = '';
isDragging = false;
// Unbind mouse events
map.off('mousemove', onMove);
}
// When the cursor enters a feature in the point layer, prepare for dragging.
map.on('mouseenter', 'points', function() {
canvas.style.cursor = 'move';
isCursorOverPoint = true;
map.dragPan.disable();
});
map.on('mouseleave', 'points', function() {
canvas.style.cursor = '';
isCursorOverPoint = false;
map.dragPan.enable();
});
map.on('mousedown', mouseDown);
|
26dc96d1a5058900e458c2424d1676d723ae6c54 | .travis.yml | .travis.yml | language: go
go:
- 1.6
- 1.7
- master
install:
- go get github.com/fatih/color
- go get github.com/boltdb/bolt | language: go
go:
- 1.6
- 1.7
- master
install:
- go get github.com/fatih/color
- go get github.com/boltdb/bolt
script: go test | Add Travis script for test | Add Travis script for test
| YAML | mit | qkraudghgh/mango | yaml | ## Code Before:
language: go
go:
- 1.6
- 1.7
- master
install:
- go get github.com/fatih/color
- go get github.com/boltdb/bolt
## Instruction:
Add Travis script for test
## Code After:
language: go
go:
- 1.6
- 1.7
- master
install:
- go get github.com/fatih/color
- go get github.com/boltdb/bolt
script: go test |
4af63e93bb712667decea0e764ed1f6a0fa91cd9 | cmd/sirius-cloud/main.go | cmd/sirius-cloud/main.go | package main
import (
"github.com/kayex/sirius"
"github.com/kayex/sirius/config"
"github.com/kayex/sirius/extension"
"golang.org/x/net/context"
)
func main() {
cfg := config.FromEnv()
rmt := sirius.NewRemote(cfg.Remote.URL, cfg.Remote.Token)
users, err := rmt.GetUsers()
if err != nil {
panic(err)
}
l := extension.NewStaticLoader(cfg)
s := sirius.NewService(l)
s.Start(context.TODO(), users)
}
| package main
import (
"github.com/kayex/sirius"
"github.com/kayex/sirius/config"
"github.com/kayex/sirius/extension"
"golang.org/x/net/context"
)
func main() {
cfg := config.FromEnv()
rmt := sirius.NewRemote(cfg.Remote.URL, cfg.Remote.Token)
users, err := rmt.GetUsers()
if err != nil {
panic(err)
}
ld := extension.NewStaticLoader(cfg)
sync := sirius.NewMQTTSync(rmt, cfg.MQTT.Config, cfg.MQTT.Topic)
s := sirius.NewService(ld).WithSync(sync)
s.Start(context.Background(), users)
}
| Use MQTT sync in sirius-cloud | Use MQTT sync in sirius-cloud
| Go | mit | kayex/sirius | go | ## Code Before:
package main
import (
"github.com/kayex/sirius"
"github.com/kayex/sirius/config"
"github.com/kayex/sirius/extension"
"golang.org/x/net/context"
)
func main() {
cfg := config.FromEnv()
rmt := sirius.NewRemote(cfg.Remote.URL, cfg.Remote.Token)
users, err := rmt.GetUsers()
if err != nil {
panic(err)
}
l := extension.NewStaticLoader(cfg)
s := sirius.NewService(l)
s.Start(context.TODO(), users)
}
## Instruction:
Use MQTT sync in sirius-cloud
## Code After:
package main
import (
"github.com/kayex/sirius"
"github.com/kayex/sirius/config"
"github.com/kayex/sirius/extension"
"golang.org/x/net/context"
)
func main() {
cfg := config.FromEnv()
rmt := sirius.NewRemote(cfg.Remote.URL, cfg.Remote.Token)
users, err := rmt.GetUsers()
if err != nil {
panic(err)
}
ld := extension.NewStaticLoader(cfg)
sync := sirius.NewMQTTSync(rmt, cfg.MQTT.Config, cfg.MQTT.Topic)
s := sirius.NewService(ld).WithSync(sync)
s.Start(context.Background(), users)
}
|
fff0b4af89e02ff834221ef056b7dcb979dc6cd7 | webpay/webpay.py | webpay/webpay.py | from .api import Account, Charges, Customers
import requests
class WebPay:
def __init__(self, key, api_base = 'https://api.webpay.jp/v1'):
self.key = key
self.api_base = api_base
self.account = Account(self)
self.charges = Charges(self)
self.customers = Customers(self)
def post(self, path, params):
r = requests.post(self.api_base + path, auth = (self.key, ''), params = params)
return r.json()
def get(self, path, params = {}):
r = requests.get(self.api_base + path, auth = (self.key, ''), params = params)
return r.json()
def delete(self, path, params = {}):
r = requests.delete(self.api_base + path, auth = (self.key, ''), params = params)
return r.json()
| from .api import Account, Charges, Customers
import requests
import json
class WebPay:
def __init__(self, key, api_base = 'https://api.webpay.jp/v1'):
self.key = key
self.api_base = api_base
self.account = Account(self)
self.charges = Charges(self)
self.customers = Customers(self)
def post(self, path, params):
r = requests.post(self.api_base + path, auth = (self.key, ''), data = json.dumps(params))
return r.json()
def get(self, path, params = {}):
r = requests.get(self.api_base + path, auth = (self.key, ''), params = params)
return r.json()
def delete(self, path, params = {}):
r = requests.delete(self.api_base + path, auth = (self.key, ''), data = json.dumps(params))
return r.json()
| Use JSON for other than GET request | Use JSON for other than GET request
Because internal dict parameters is not handled as expected.
>>> payload = {'key1': 'value1', 'key2': 'value2', 'set': {'a': 'x', 'b': 'y'}}
>>> r = requests.post("http://httpbin.org/post", data=payload)
>>> r.json()
{...
'form': {'key2': 'value2', 'key1': 'value1', 'set': ['a', 'b']}
...}
| Python | mit | yamaneko1212/webpay-python | python | ## Code Before:
from .api import Account, Charges, Customers
import requests
class WebPay:
def __init__(self, key, api_base = 'https://api.webpay.jp/v1'):
self.key = key
self.api_base = api_base
self.account = Account(self)
self.charges = Charges(self)
self.customers = Customers(self)
def post(self, path, params):
r = requests.post(self.api_base + path, auth = (self.key, ''), params = params)
return r.json()
def get(self, path, params = {}):
r = requests.get(self.api_base + path, auth = (self.key, ''), params = params)
return r.json()
def delete(self, path, params = {}):
r = requests.delete(self.api_base + path, auth = (self.key, ''), params = params)
return r.json()
## Instruction:
Use JSON for other than GET request
Because internal dict parameters is not handled as expected.
>>> payload = {'key1': 'value1', 'key2': 'value2', 'set': {'a': 'x', 'b': 'y'}}
>>> r = requests.post("http://httpbin.org/post", data=payload)
>>> r.json()
{...
'form': {'key2': 'value2', 'key1': 'value1', 'set': ['a', 'b']}
...}
## Code After:
from .api import Account, Charges, Customers
import requests
import json
class WebPay:
def __init__(self, key, api_base = 'https://api.webpay.jp/v1'):
self.key = key
self.api_base = api_base
self.account = Account(self)
self.charges = Charges(self)
self.customers = Customers(self)
def post(self, path, params):
r = requests.post(self.api_base + path, auth = (self.key, ''), data = json.dumps(params))
return r.json()
def get(self, path, params = {}):
r = requests.get(self.api_base + path, auth = (self.key, ''), params = params)
return r.json()
def delete(self, path, params = {}):
r = requests.delete(self.api_base + path, auth = (self.key, ''), data = json.dumps(params))
return r.json()
|
950a1b85c89cfcd11b399e8cdbdbd90fa0c0fd44 | data/rubygems.yml | data/rubygems.yml |
actioncable: rails/rails
actionmailer: rails/rails
actionpack: rails/rails
actionview: rails/rails
activejob: rails/rails
activemodel: rails/rails
activerecord: rails/rails
activesupport: rails/rails
capistrano: capistrano/capistrano
coffee-script-source: jashkenas/coffeescript
railties: rails/rails
redis-rack: redis-store/redis-rack
serverspec: mizzy/serverspec
unicorn: defunkt/unicorn
|
actioncable: rails/rails
actionmailer: rails/rails
actionpack: rails/rails
actionview: rails/rails
activejob: rails/rails
activemodel: rails/rails
activerecord: rails/rails
activesupport: rails/rails
capistrano: capistrano/capistrano
coffee-script-source: jashkenas/coffeescript
mixlib-archive: chef/mixlib-archive
railties: rails/rails
redis-rack: redis-store/redis-rack
serverspec: mizzy/serverspec
unicorn: defunkt/unicorn
| Add mixlib-archive to the gem dictionary | :wrench: Add mixlib-archive to the gem dictionary
| YAML | mit | masutaka/compare_linker | yaml | ## Code Before:
actioncable: rails/rails
actionmailer: rails/rails
actionpack: rails/rails
actionview: rails/rails
activejob: rails/rails
activemodel: rails/rails
activerecord: rails/rails
activesupport: rails/rails
capistrano: capistrano/capistrano
coffee-script-source: jashkenas/coffeescript
railties: rails/rails
redis-rack: redis-store/redis-rack
serverspec: mizzy/serverspec
unicorn: defunkt/unicorn
## Instruction:
:wrench: Add mixlib-archive to the gem dictionary
## Code After:
actioncable: rails/rails
actionmailer: rails/rails
actionpack: rails/rails
actionview: rails/rails
activejob: rails/rails
activemodel: rails/rails
activerecord: rails/rails
activesupport: rails/rails
capistrano: capistrano/capistrano
coffee-script-source: jashkenas/coffeescript
mixlib-archive: chef/mixlib-archive
railties: rails/rails
redis-rack: redis-store/redis-rack
serverspec: mizzy/serverspec
unicorn: defunkt/unicorn
|
ad861e5a854a89881bcc3cfc7978791b708de375 | tooth.gemspec | tooth.gemspec | Gem::Specification.new do |s|
s.name = 'tooth'
s.version = '0.2.1'
s.date = '2013-12-11'
s.description = 'Simple page objects for Capybara. All tooth-generated methods return Capybara Elements so that you can use these familiar objects for your needs.'
s.summary = 'Simple page objects for Capybara'
s.authors = ['Aliaksei Kliuchnikau']
s.email = 'aliaksei.kliuchnikau@gmail.com'
s.files = ["lib/tooth.rb"]
s.homepage = 'https://github.com/kliuchnikau/tooth'
s.add_dependency('capybara', '>= 2.0.0')
s.add_development_dependency('rspec')
s.add_development_dependency('sinatra')
end
| Gem::Specification.new do |s|
s.name = 'tooth'
s.version = '0.2.2'
s.date = '2013-12-11'
s.description = 'Simple page objects for Capybara. All tooth-generated methods return Capybara Elements so that you can use these familiar objects for your needs.'
s.summary = 'Simple page objects for Capybara'
s.authors = ['Aliaksei Kliuchnikau']
s.email = 'aliaksei.kliuchnikau@gmail.com'
s.files = Dir.glob("lib/**/*")
s.homepage = 'https://github.com/kliuchnikau/tooth'
s.add_dependency('capybara', '>= 2.0.0')
s.add_development_dependency('rspec')
s.add_development_dependency('sinatra')
end
| Include all lib content as gem files | Include all lib content as gem files
| Ruby | apache-2.0 | kliuchnikau/tooth | ruby | ## Code Before:
Gem::Specification.new do |s|
s.name = 'tooth'
s.version = '0.2.1'
s.date = '2013-12-11'
s.description = 'Simple page objects for Capybara. All tooth-generated methods return Capybara Elements so that you can use these familiar objects for your needs.'
s.summary = 'Simple page objects for Capybara'
s.authors = ['Aliaksei Kliuchnikau']
s.email = 'aliaksei.kliuchnikau@gmail.com'
s.files = ["lib/tooth.rb"]
s.homepage = 'https://github.com/kliuchnikau/tooth'
s.add_dependency('capybara', '>= 2.0.0')
s.add_development_dependency('rspec')
s.add_development_dependency('sinatra')
end
## Instruction:
Include all lib content as gem files
## Code After:
Gem::Specification.new do |s|
s.name = 'tooth'
s.version = '0.2.2'
s.date = '2013-12-11'
s.description = 'Simple page objects for Capybara. All tooth-generated methods return Capybara Elements so that you can use these familiar objects for your needs.'
s.summary = 'Simple page objects for Capybara'
s.authors = ['Aliaksei Kliuchnikau']
s.email = 'aliaksei.kliuchnikau@gmail.com'
s.files = Dir.glob("lib/**/*")
s.homepage = 'https://github.com/kliuchnikau/tooth'
s.add_dependency('capybara', '>= 2.0.0')
s.add_development_dependency('rspec')
s.add_development_dependency('sinatra')
end
|
f28cdd010c6b5c5beec631f7a977f58c18e70811 | electron-builder.json | electron-builder.json | {
"appId": "io.lbry.LBRY",
"mac": {
"category": "public.app-category.entertainment",
},
"dmg": {
"iconSize": 128,
"contents": [
{
"x": 115,
"y": 164
},
{
"x": 387,
"y": 164,
"type": "link",
"path": "/Applications"
}
],
"window": {
"x": 200,
"y": 200,
"width": 500,
"height": 300
},
"background": "build/background.png"
},
"protocols": [
{
"name": "lbry",
"schemes": ["lbry"],
"role": "Viewer"
}
],
"linux": {
"target": "deb",
"desktop": {
"MimeType": "x-scheme-handler/lbry",
"Exec": "/opt/LBRY/lbry %U"
}
},
"deb": {
"depends": [
"gconf2",
"gconf-service",
"libnotify4",
"libappindicator1",
"libxtst6",
"libnss3",
"libsecret-1-0"
]
},
"artifactName": "${productName}_${version}_${arch}.${ext}"
}
| {
"appId": "io.lbry.LBRY",
"mac": {
"category": "public.app-category.entertainment",
},
"dmg": {
"iconSize": 128,
"contents": [
{
"x": 115,
"y": 164
},
{
"x": 387,
"y": 164,
"type": "link",
"path": "/Applications"
}
],
"window": {
"x": 200,
"y": 200,
"width": 500,
"height": 300
},
"background": "build/background.png"
},
"protocols": [
{
"name": "lbry",
"schemes": ["lbry"],
"role": "Viewer"
}
],
"linux": {
"target": "deb",
"desktop": {
"MimeType": "x-scheme-handler/lbry",
"Exec": "/opt/LBRY/lbry %U"
}
},
"deb": {
"depends": [
"gconf2",
"gconf-service",
"libnotify4",
"libappindicator1",
"libxtst6",
"libnss3",
"libsecret-1-0"
]
},
"nsis": {
"perMachine": true
},
"artifactName": "${productName}_${version}_${arch}.${ext}"
}
| Move Windows installation path back to Program Files | Move Windows installation path back to Program Files
| JSON | mit | lbryio/lbry-electron,lbryio/lbry-electron,lbryio/lbry-electron,lbryio/lbry-app,lbryio/lbry-app | json | ## Code Before:
{
"appId": "io.lbry.LBRY",
"mac": {
"category": "public.app-category.entertainment",
},
"dmg": {
"iconSize": 128,
"contents": [
{
"x": 115,
"y": 164
},
{
"x": 387,
"y": 164,
"type": "link",
"path": "/Applications"
}
],
"window": {
"x": 200,
"y": 200,
"width": 500,
"height": 300
},
"background": "build/background.png"
},
"protocols": [
{
"name": "lbry",
"schemes": ["lbry"],
"role": "Viewer"
}
],
"linux": {
"target": "deb",
"desktop": {
"MimeType": "x-scheme-handler/lbry",
"Exec": "/opt/LBRY/lbry %U"
}
},
"deb": {
"depends": [
"gconf2",
"gconf-service",
"libnotify4",
"libappindicator1",
"libxtst6",
"libnss3",
"libsecret-1-0"
]
},
"artifactName": "${productName}_${version}_${arch}.${ext}"
}
## Instruction:
Move Windows installation path back to Program Files
## Code After:
{
"appId": "io.lbry.LBRY",
"mac": {
"category": "public.app-category.entertainment",
},
"dmg": {
"iconSize": 128,
"contents": [
{
"x": 115,
"y": 164
},
{
"x": 387,
"y": 164,
"type": "link",
"path": "/Applications"
}
],
"window": {
"x": 200,
"y": 200,
"width": 500,
"height": 300
},
"background": "build/background.png"
},
"protocols": [
{
"name": "lbry",
"schemes": ["lbry"],
"role": "Viewer"
}
],
"linux": {
"target": "deb",
"desktop": {
"MimeType": "x-scheme-handler/lbry",
"Exec": "/opt/LBRY/lbry %U"
}
},
"deb": {
"depends": [
"gconf2",
"gconf-service",
"libnotify4",
"libappindicator1",
"libxtst6",
"libnss3",
"libsecret-1-0"
]
},
"nsis": {
"perMachine": true
},
"artifactName": "${productName}_${version}_${arch}.${ext}"
}
|
6c8f21c21315e70b17532916b1b78e72bdf0e4b9 | src/javascript/binary/common_functions/currency_to_symbol.js | src/javascript/binary/common_functions/currency_to_symbol.js | function format_money(currency, amount) {
var symbol = format_money.map[currency];
if (symbol === undefined) {
return currency + ' ' + amount;
}
return symbol + amount;
}
// Taken with modifications from:
// https://github.com/bengourley/currency-symbol-map/blob/master/map.js
// When we need to handle more currencies please look there.
format_money.map = {
"USD": "$",
"GBP": "£",
"AUD": "A$",
"EUR": "€",
"JPY": "¥",
};
if (typeof module !== 'undefined') {
module.exports = {
format_money: format_money,
};
}
| function format_money(currency, amount) {
if(currency === 'JPY') { // remove decimal points for JPY
amount = amount.replace(/\.\d+$/, '');
}
var symbol = format_money.map[currency];
if (symbol === undefined) {
return currency + ' ' + amount;
}
return symbol + amount;
}
// Taken with modifications from:
// https://github.com/bengourley/currency-symbol-map/blob/master/map.js
// When we need to handle more currencies please look there.
format_money.map = {
"USD": "$",
"GBP": "£",
"AUD": "A$",
"EUR": "€",
"JPY": "¥",
};
if (typeof module !== 'undefined') {
module.exports = {
format_money: format_money,
};
}
| Add if for JPY amount | Add if for JPY amount
| JavaScript | apache-2.0 | ashkanx/binary-static,teo-binary/binary-static,kellybinary/binary-static,binary-static-deployed/binary-static,kellybinary/binary-static,raunakkathuria/binary-static,negar-binary/binary-static,4p00rv/binary-static,binary-com/binary-static,teo-binary/binary-static,binary-com/binary-static,ashkanx/binary-static,binary-static-deployed/binary-static,fayland/binary-static,raunakkathuria/binary-static,4p00rv/binary-static,teo-binary/binary-static,fayland/binary-static,fayland/binary-static,4p00rv/binary-static,ashkanx/binary-static,raunakkathuria/binary-static,fayland/binary-static,binary-static-deployed/binary-static,kellybinary/binary-static,negar-binary/binary-static,negar-binary/binary-static,teo-binary/binary-static,binary-com/binary-static | javascript | ## Code Before:
function format_money(currency, amount) {
var symbol = format_money.map[currency];
if (symbol === undefined) {
return currency + ' ' + amount;
}
return symbol + amount;
}
// Taken with modifications from:
// https://github.com/bengourley/currency-symbol-map/blob/master/map.js
// When we need to handle more currencies please look there.
format_money.map = {
"USD": "$",
"GBP": "£",
"AUD": "A$",
"EUR": "€",
"JPY": "¥",
};
if (typeof module !== 'undefined') {
module.exports = {
format_money: format_money,
};
}
## Instruction:
Add if for JPY amount
## Code After:
function format_money(currency, amount) {
if(currency === 'JPY') { // remove decimal points for JPY
amount = amount.replace(/\.\d+$/, '');
}
var symbol = format_money.map[currency];
if (symbol === undefined) {
return currency + ' ' + amount;
}
return symbol + amount;
}
// Taken with modifications from:
// https://github.com/bengourley/currency-symbol-map/blob/master/map.js
// When we need to handle more currencies please look there.
format_money.map = {
"USD": "$",
"GBP": "£",
"AUD": "A$",
"EUR": "€",
"JPY": "¥",
};
if (typeof module !== 'undefined') {
module.exports = {
format_money: format_money,
};
}
|
e035c93b2add48011e10f21247ed93f0c60edcfc | src/HttpHistory/History.php | src/HttpHistory/History.php | <?php declare(strict_types=1);
namespace Behapi\HttpHistory;
use IteratorAggregate;
use Psr\Http\Message\RequestInterface;
use Psr\Http\Message\ResponseInterface;
use Http\Client\Common\Plugin\Journal;
use Http\Client\Exception;
use Http\Client\Exception\HttpException;
use function end;
use function reset;
use function count;
final class History implements Journal, IteratorAggregate
{
/** @var Tuple[] */
private $tuples = [];
/** {@inheritDoc} */
public function addSuccess(RequestInterface $request, ResponseInterface $response)
{
$this->tuples[] = new Tuple($request, $response);
}
/** {@inheritDoc} */
public function addFailure(RequestInterface $request, Exception $exception)
{
$response = $exception instanceof HttpException
? $exception->getResponse()
: null;
$this->tuples[] = new Tuple($request, $response);
}
public function getLastResponse(): ResponseInterface
{
if (1 > count($this->tuples)) {
throw new NoResponse;
}
/** @var Tuple $tuple */
$tuple = end($this->tuples);
reset($this->tuples);
return $tuple->getResponse();
}
/** @return iterable<Tuple> */
public function getIterator(): iterable
{
yield from $this->tuples;
return count($this->tuples);
}
public function reset(): void
{
$this->tuples = [];
}
}
| <?php declare(strict_types=1);
namespace Behapi\HttpHistory;
use IteratorAggregate;
use Psr\Http\Message\RequestInterface;
use Psr\Http\Message\ResponseInterface;
use Http\Client\Common\Plugin\Journal;
use Http\Client\Exception;
use Http\Client\Exception\HttpException;
use function end;
use function reset;
use function count;
final class History implements Journal, IteratorAggregate
{
/** @var Tuple[] */
private $tuples = [];
/** {@inheritDoc} */
public function addSuccess(RequestInterface $request, ResponseInterface $response)
{
$this->tuples[] = new Tuple($request, $response);
}
/** {@inheritDoc} */
public function addFailure(RequestInterface $request, Exception $exception)
{
$response = $exception instanceof HttpException
? $exception->getResponse()
: null;
$this->tuples[] = new Tuple($request, $response);
}
public function getLastResponse(): ResponseInterface
{
if (1 > count($this->tuples)) {
throw new NoResponse;
}
/** @var Tuple $tuple */
$tuple = end($this->tuples);
reset($this->tuples);
$response = $tuple->getResponse();
if (null === $response) {
throw new NoResponse;
}
return $response;
}
/** @return iterable<Tuple> */
public function getIterator(): iterable
{
yield from $this->tuples;
return count($this->tuples);
}
public function reset(): void
{
$this->tuples = [];
}
}
| Throw an exception if no response in http tuple | Throw an exception if no response in http tuple
| PHP | mit | Taluu/Behapi | php | ## Code Before:
<?php declare(strict_types=1);
namespace Behapi\HttpHistory;
use IteratorAggregate;
use Psr\Http\Message\RequestInterface;
use Psr\Http\Message\ResponseInterface;
use Http\Client\Common\Plugin\Journal;
use Http\Client\Exception;
use Http\Client\Exception\HttpException;
use function end;
use function reset;
use function count;
final class History implements Journal, IteratorAggregate
{
/** @var Tuple[] */
private $tuples = [];
/** {@inheritDoc} */
public function addSuccess(RequestInterface $request, ResponseInterface $response)
{
$this->tuples[] = new Tuple($request, $response);
}
/** {@inheritDoc} */
public function addFailure(RequestInterface $request, Exception $exception)
{
$response = $exception instanceof HttpException
? $exception->getResponse()
: null;
$this->tuples[] = new Tuple($request, $response);
}
public function getLastResponse(): ResponseInterface
{
if (1 > count($this->tuples)) {
throw new NoResponse;
}
/** @var Tuple $tuple */
$tuple = end($this->tuples);
reset($this->tuples);
return $tuple->getResponse();
}
/** @return iterable<Tuple> */
public function getIterator(): iterable
{
yield from $this->tuples;
return count($this->tuples);
}
public function reset(): void
{
$this->tuples = [];
}
}
## Instruction:
Throw an exception if no response in http tuple
## Code After:
<?php declare(strict_types=1);
namespace Behapi\HttpHistory;
use IteratorAggregate;
use Psr\Http\Message\RequestInterface;
use Psr\Http\Message\ResponseInterface;
use Http\Client\Common\Plugin\Journal;
use Http\Client\Exception;
use Http\Client\Exception\HttpException;
use function end;
use function reset;
use function count;
final class History implements Journal, IteratorAggregate
{
/** @var Tuple[] */
private $tuples = [];
/** {@inheritDoc} */
public function addSuccess(RequestInterface $request, ResponseInterface $response)
{
$this->tuples[] = new Tuple($request, $response);
}
/** {@inheritDoc} */
public function addFailure(RequestInterface $request, Exception $exception)
{
$response = $exception instanceof HttpException
? $exception->getResponse()
: null;
$this->tuples[] = new Tuple($request, $response);
}
public function getLastResponse(): ResponseInterface
{
if (1 > count($this->tuples)) {
throw new NoResponse;
}
/** @var Tuple $tuple */
$tuple = end($this->tuples);
reset($this->tuples);
$response = $tuple->getResponse();
if (null === $response) {
throw new NoResponse;
}
return $response;
}
/** @return iterable<Tuple> */
public function getIterator(): iterable
{
yield from $this->tuples;
return count($this->tuples);
}
public function reset(): void
{
$this->tuples = [];
}
}
|
40be8e0e80b26db6b71efe38ec1876e12080551e | layouts/_default/single.html | layouts/_default/single.html | {{ partial "header" . }}
<article>
<header>
<h1>{{ .Title }}</h1>
<h6>{{ .Date.Format "Mon, Jan 2, 2006" }}</h6>
</header>
{{ .Content }}
<hr/>
</article>
{{ partial "footer" . }}
| {{ partial "header" . }}
<article>
<header>
<h1>{{ .Title }}</h1>
<h6>{{ .Date.Format "Mon, Jan 2, 2006" }}</h6>
</header>
{{ .Content }}
<hr/>
<div class="row">
<div class="col">
{{ if .PrevInSection }}
<a href="{{.PrevInSection.Permalink}}">
{{- .PrevInSection.Title -}}
</a>
{{ end }}
</div>
<div class="col">
{{ if .NextInSection }}
<a href="{{.NextInSection.Permalink}}">
{{- .NextInSection.Title -}}
</a>
{{ end }}
</div>
</div>
</article>
{{ partial "footer" . }}
| Add initial navigation between post | Add initial navigation between post
| HTML | mit | yursan9/manis-hugo-theme,yursan9/manis-hugo-theme | html | ## Code Before:
{{ partial "header" . }}
<article>
<header>
<h1>{{ .Title }}</h1>
<h6>{{ .Date.Format "Mon, Jan 2, 2006" }}</h6>
</header>
{{ .Content }}
<hr/>
</article>
{{ partial "footer" . }}
## Instruction:
Add initial navigation between post
## Code After:
{{ partial "header" . }}
<article>
<header>
<h1>{{ .Title }}</h1>
<h6>{{ .Date.Format "Mon, Jan 2, 2006" }}</h6>
</header>
{{ .Content }}
<hr/>
<div class="row">
<div class="col">
{{ if .PrevInSection }}
<a href="{{.PrevInSection.Permalink}}">
{{- .PrevInSection.Title -}}
</a>
{{ end }}
</div>
<div class="col">
{{ if .NextInSection }}
<a href="{{.NextInSection.Permalink}}">
{{- .NextInSection.Title -}}
</a>
{{ end }}
</div>
</div>
</article>
{{ partial "footer" . }}
|
29ba72ed142b8fbb07f7ea78bb609e0efb71caed | lib/git_compound/repository/remote_file/github_strategy.rb | lib/git_compound/repository/remote_file/github_strategy.rb | require 'net/http'
require 'uri'
module GitCompound
module Repository
class RemoteFile
# Git archive strategy
#
class GithubStrategy < RemoteFileStrategy
GITHUB_URI = 'https://raw.githubusercontent.com'
GITHUB_PATTERN = 'git@github.com:\/|https:\/\/github.com\/'
def initialize(source, ref, file)
super
@uri = github_uri
@response = http_response(@uri)
end
def contents
raise FileUnreachableError unless reachable?
raise FileNotFoundError unless exists?
@response.body
end
def reachable?
@source.match(/#{GITHUB_PATTERN}/) ? true : false
end
def exists?
@response.code == 200.to_s
end
private
def github_uri
github_location = @source.sub(/^#{GITHUB_PATTERN}/, '')
file_uri = "#{GITHUB_URI}/#{github_location}/#{@ref}/#{@file}"
URI.parse(file_uri)
end
def http_response(uri)
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
http.open_timeout = 4
http.read_timeout = 4
params = { 'User-Agent' => 'git_compound' }
req = Net::HTTP::Get.new(uri.request_uri, params)
http.request(req)
end
end
end
end
end
| require 'net/http'
require 'uri'
module GitCompound
module Repository
class RemoteFile
# Git archive strategy
#
class GithubStrategy < RemoteFileStrategy
GITHUB_URI = 'https://raw.githubusercontent.com'
GITHUB_PATTERN = 'git@github.com:\/|https:\/\/github.com\/'
def initialize(source, ref, file)
super
@uri = github_uri
end
def contents
raise FileUnreachableError unless reachable?
raise FileNotFoundError unless exists?
@response.body
end
def reachable?
@source.match(/#{GITHUB_PATTERN}/) ? true : false
end
def exists?
@response ||= http_response(@uri)
@response.code == 200.to_s
end
private
def github_uri
github_location = @source.sub(/^#{GITHUB_PATTERN}/, '')
file_uri = "#{GITHUB_URI}/#{github_location}/#{@ref}/#{@file}"
URI.parse(file_uri)
end
def http_response(uri)
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
http.open_timeout = 4
http.read_timeout = 4
params = { 'User-Agent' => 'git_compound' }
req = Net::HTTP::Get.new(uri.request_uri, params)
http.request(req)
end
end
end
end
end
| Reduce github remote file strategy initialization overhead | Reduce github remote file strategy initialization overhead
| Ruby | mit | grzesiek/git_compound,grzesiek/git_compound,tmaczukin/git_compound,tmaczukin/git_compound | ruby | ## Code Before:
require 'net/http'
require 'uri'
module GitCompound
module Repository
class RemoteFile
# Git archive strategy
#
class GithubStrategy < RemoteFileStrategy
GITHUB_URI = 'https://raw.githubusercontent.com'
GITHUB_PATTERN = 'git@github.com:\/|https:\/\/github.com\/'
def initialize(source, ref, file)
super
@uri = github_uri
@response = http_response(@uri)
end
def contents
raise FileUnreachableError unless reachable?
raise FileNotFoundError unless exists?
@response.body
end
def reachable?
@source.match(/#{GITHUB_PATTERN}/) ? true : false
end
def exists?
@response.code == 200.to_s
end
private
def github_uri
github_location = @source.sub(/^#{GITHUB_PATTERN}/, '')
file_uri = "#{GITHUB_URI}/#{github_location}/#{@ref}/#{@file}"
URI.parse(file_uri)
end
def http_response(uri)
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
http.open_timeout = 4
http.read_timeout = 4
params = { 'User-Agent' => 'git_compound' }
req = Net::HTTP::Get.new(uri.request_uri, params)
http.request(req)
end
end
end
end
end
## Instruction:
Reduce github remote file strategy initialization overhead
## Code After:
require 'net/http'
require 'uri'
module GitCompound
module Repository
class RemoteFile
# Git archive strategy
#
class GithubStrategy < RemoteFileStrategy
GITHUB_URI = 'https://raw.githubusercontent.com'
GITHUB_PATTERN = 'git@github.com:\/|https:\/\/github.com\/'
def initialize(source, ref, file)
super
@uri = github_uri
end
def contents
raise FileUnreachableError unless reachable?
raise FileNotFoundError unless exists?
@response.body
end
def reachable?
@source.match(/#{GITHUB_PATTERN}/) ? true : false
end
def exists?
@response ||= http_response(@uri)
@response.code == 200.to_s
end
private
def github_uri
github_location = @source.sub(/^#{GITHUB_PATTERN}/, '')
file_uri = "#{GITHUB_URI}/#{github_location}/#{@ref}/#{@file}"
URI.parse(file_uri)
end
def http_response(uri)
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
http.open_timeout = 4
http.read_timeout = 4
params = { 'User-Agent' => 'git_compound' }
req = Net::HTTP::Get.new(uri.request_uri, params)
http.request(req)
end
end
end
end
end
|
44cc6453a7d8423a9581753502a93ddea789ef98 | README.md | README.md |
This repository contains a Workflow for [Alfred 2][alfred2] that allows you to easily open the documentation of your [TeX distribution][mactex].
It makes use of your local LaTeX installation, so searching the documentation is really fast and does not depends on websites such as [texdoc.net](texdocnet).
## Installation
Installation is pretty easy:
1. Download [TeXdoc.alfredworkflow](TeXdoc.alfredworkflow) from this repository.
2. Open the workflow and install it in Alfred.
## Usage
To use the workflow, type `td` in your Alfred, followed by the name of the documentation you want to consult.

Internally, the [texdoc][texdoc] command is used to query the documentation present on your local computer.
Hence, the query in the figure above will open the documentation of [texdoc][texdoc] in your default viewer.
[alfred2]: https://www.alfredapp.com
[mactex]: https://tug.org/mactex/
[texdoc]: https://www.tug.org/texdoc/
[texdocnet]: http://texdoc.net
|
This repository contains a Workflow for [Alfred 2][alfred2] that allows you to easily open the documentation of your [TeX distribution][mactex].
It makes use of your local LaTeX installation, so searching the documentation is really fast and does not depends on websites such as [texdoc.net](texdocnet).
## Installation
Installation is pretty easy:
1. Download [TeXdoc.alfredworkflow](TeXdoc.alfredworkflow) from this repository.
2. Open the workflow and install it in Alfred.
## Usage
To use the workflow, type `td` in your Alfred, followed by the name of the documentation you want to consult.

Internally, the [texdoc][texdoc] command is used to query the documentation present on your local computer.
Hence, the query in the figure above will open the documentation of [texdoc][texdoc] in your default viewer.
## Links
- [Alfred forum topic](http://www.alfredforum.com/topic/8705-texdoc-workflow/)
- [Packal page](http://www.packal.org/workflow/texdoc)
[alfred2]: https://www.alfredapp.com
[mactex]: https://tug.org/mactex/
[texdoc]: https://www.tug.org/texdoc/
[texdocnet]: http://texdoc.net
| Add links to packal + alfred forum | Add links to packal + alfred forum
| Markdown | bsd-3-clause | egeerardyn/alfred-texdoc | markdown | ## Code Before:
This repository contains a Workflow for [Alfred 2][alfred2] that allows you to easily open the documentation of your [TeX distribution][mactex].
It makes use of your local LaTeX installation, so searching the documentation is really fast and does not depends on websites such as [texdoc.net](texdocnet).
## Installation
Installation is pretty easy:
1. Download [TeXdoc.alfredworkflow](TeXdoc.alfredworkflow) from this repository.
2. Open the workflow and install it in Alfred.
## Usage
To use the workflow, type `td` in your Alfred, followed by the name of the documentation you want to consult.

Internally, the [texdoc][texdoc] command is used to query the documentation present on your local computer.
Hence, the query in the figure above will open the documentation of [texdoc][texdoc] in your default viewer.
[alfred2]: https://www.alfredapp.com
[mactex]: https://tug.org/mactex/
[texdoc]: https://www.tug.org/texdoc/
[texdocnet]: http://texdoc.net
## Instruction:
Add links to packal + alfred forum
## Code After:
This repository contains a Workflow for [Alfred 2][alfred2] that allows you to easily open the documentation of your [TeX distribution][mactex].
It makes use of your local LaTeX installation, so searching the documentation is really fast and does not depends on websites such as [texdoc.net](texdocnet).
## Installation
Installation is pretty easy:
1. Download [TeXdoc.alfredworkflow](TeXdoc.alfredworkflow) from this repository.
2. Open the workflow and install it in Alfred.
## Usage
To use the workflow, type `td` in your Alfred, followed by the name of the documentation you want to consult.

Internally, the [texdoc][texdoc] command is used to query the documentation present on your local computer.
Hence, the query in the figure above will open the documentation of [texdoc][texdoc] in your default viewer.
## Links
- [Alfred forum topic](http://www.alfredforum.com/topic/8705-texdoc-workflow/)
- [Packal page](http://www.packal.org/workflow/texdoc)
[alfred2]: https://www.alfredapp.com
[mactex]: https://tug.org/mactex/
[texdoc]: https://www.tug.org/texdoc/
[texdocnet]: http://texdoc.net
|
b1201b1be5ad4a8ae39baad5c2e2ffecf878e15e | app/assets/javascripts/entities/order.coffee | app/assets/javascripts/entities/order.coffee | @CodequestManager.module "Entities", (Entities, App, Backbone, Marionette, $, _) ->
Entities.Order = Backbone.Model.extend
urlRoot: ->
"/orders"
parse: (data) ->
data.dishes = new Entities.Dishes data.dishes
data.dishes.order = this
data
currentUserOrdered: ->
@get('dishes').where(user_id: App.currentUser.id).length isnt 0
changeStatus: ->
$.ajax
type: 'PUT'
url: "#{@url()}/change_status"
success: (data) =>
@set({status: data.status})
App.vent.trigger 'reload:current:user' if data.status is 'delivered'
@get('dishes').reset(data.dishes, parse: true)
total: ->
(@get('dishes').total()+parseFloat(@get('shipping'))).toFixed(2)
successPath: ->
if @get('from_today')
"/orders/today/#{@id}"
else
"/orders/#{@id}"
Entities.Orders = Backbone.Collection.extend
model: Entities.Order
url: '/orders'
page: 1
more: ->
@page += 1
@fetch
data:
page: @page
remove: false
success: (collection, data) =>
@trigger 'all:fetched' if data.length < App.pageSize
| @CodequestManager.module "Entities", (Entities, App, Backbone, Marionette, $, _) ->
Entities.Order = Backbone.Model.extend
urlRoot: ->
"/orders"
parse: (data) ->
data.dishes = new Entities.Dishes data.dishes
data.dishes.order = this
data
currentUserOrdered: ->
@get('dishes').where(user_id: App.currentUser.id).length isnt 0
changeStatus: ->
$.ajax
type: 'PUT'
url: "#{@url()}/change_status"
success: (data) =>
@set(@parse(data))
App.vent.trigger 'reload:current:user' if data.status is 'delivered'
total: ->
(@get('dishes').total()+parseFloat(@get('shipping'))).toFixed(2)
successPath: ->
if @get('from_today')
"/orders/today/#{@id}"
else
"/orders/#{@id}"
Entities.Orders = Backbone.Collection.extend
model: Entities.Order
url: '/orders'
page: 1
more: ->
@page += 1
@fetch
data:
page: @page
remove: false
success: (collection, data) =>
@trigger 'all:fetched' if data.length < App.pageSize
| Reset the whole model when the status is changed | Reset the whole model when the status is changed
| CoffeeScript | mit | lunchiatto/web,lunchiatto/web,lunchiatto/web,lunchiatto/web | coffeescript | ## Code Before:
@CodequestManager.module "Entities", (Entities, App, Backbone, Marionette, $, _) ->
Entities.Order = Backbone.Model.extend
urlRoot: ->
"/orders"
parse: (data) ->
data.dishes = new Entities.Dishes data.dishes
data.dishes.order = this
data
currentUserOrdered: ->
@get('dishes').where(user_id: App.currentUser.id).length isnt 0
changeStatus: ->
$.ajax
type: 'PUT'
url: "#{@url()}/change_status"
success: (data) =>
@set({status: data.status})
App.vent.trigger 'reload:current:user' if data.status is 'delivered'
@get('dishes').reset(data.dishes, parse: true)
total: ->
(@get('dishes').total()+parseFloat(@get('shipping'))).toFixed(2)
successPath: ->
if @get('from_today')
"/orders/today/#{@id}"
else
"/orders/#{@id}"
Entities.Orders = Backbone.Collection.extend
model: Entities.Order
url: '/orders'
page: 1
more: ->
@page += 1
@fetch
data:
page: @page
remove: false
success: (collection, data) =>
@trigger 'all:fetched' if data.length < App.pageSize
## Instruction:
Reset the whole model when the status is changed
## Code After:
@CodequestManager.module "Entities", (Entities, App, Backbone, Marionette, $, _) ->
Entities.Order = Backbone.Model.extend
urlRoot: ->
"/orders"
parse: (data) ->
data.dishes = new Entities.Dishes data.dishes
data.dishes.order = this
data
currentUserOrdered: ->
@get('dishes').where(user_id: App.currentUser.id).length isnt 0
changeStatus: ->
$.ajax
type: 'PUT'
url: "#{@url()}/change_status"
success: (data) =>
@set(@parse(data))
App.vent.trigger 'reload:current:user' if data.status is 'delivered'
total: ->
(@get('dishes').total()+parseFloat(@get('shipping'))).toFixed(2)
successPath: ->
if @get('from_today')
"/orders/today/#{@id}"
else
"/orders/#{@id}"
Entities.Orders = Backbone.Collection.extend
model: Entities.Order
url: '/orders'
page: 1
more: ->
@page += 1
@fetch
data:
page: @page
remove: false
success: (collection, data) =>
@trigger 'all:fetched' if data.length < App.pageSize
|
36712afaaba718dfd8bb89a2312a6d5d49764dfc | os/os_x/installs/main.sh | os/os_x/installs/main.sh |
main() {
local workingDirectory="$(pwd)" \
&& cd "$(dirname $BASH_SOURCE[0])"
source ./install_xcode.sh
source ./install_homebrew.sh
source ./install_homebrew_formulae.sh
source ./install_homebrew_versions_formulae.sh
source ./install_homebrew_casks.sh
source ./install_homebrew_alternate_casks.sh
source ./install_homebrew_web_font_tools.sh
update_and_upgrade
source ./cleanup.sh
cd "$workingDirectory"
}
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Main
main
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Cleanup
unset main
|
main() {
local workingDirectory="$(pwd)" \
&& cd "$(dirname $BASH_SOURCE[0])"
source ./install_xcode.sh
source ./install_homebrew.sh
source ./install_homebrew_formulae.sh
source ./install_homebrew_versions_formulae.sh
source ./install_homebrew_casks.sh
source ./install_homebrew_alternate_casks.sh
source ./install_homebrew_web_font_tools.sh
update
source ./cleanup.sh
cd "$workingDirectory"
}
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Main
main
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Cleanup
unset main
| Split utils into separate files for organisation. Rejigged the install process slightly to better cater for already downloaded dotfiles. Added steps to the OS update methods | Split utils into separate files for organisation. Rejigged the install process slightly to better cater for already downloaded dotfiles. Added steps to the OS update methods
| Shell | mit | mattkingston/dotfiles | shell | ## Code Before:
main() {
local workingDirectory="$(pwd)" \
&& cd "$(dirname $BASH_SOURCE[0])"
source ./install_xcode.sh
source ./install_homebrew.sh
source ./install_homebrew_formulae.sh
source ./install_homebrew_versions_formulae.sh
source ./install_homebrew_casks.sh
source ./install_homebrew_alternate_casks.sh
source ./install_homebrew_web_font_tools.sh
update_and_upgrade
source ./cleanup.sh
cd "$workingDirectory"
}
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Main
main
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Cleanup
unset main
## Instruction:
Split utils into separate files for organisation. Rejigged the install process slightly to better cater for already downloaded dotfiles. Added steps to the OS update methods
## Code After:
main() {
local workingDirectory="$(pwd)" \
&& cd "$(dirname $BASH_SOURCE[0])"
source ./install_xcode.sh
source ./install_homebrew.sh
source ./install_homebrew_formulae.sh
source ./install_homebrew_versions_formulae.sh
source ./install_homebrew_casks.sh
source ./install_homebrew_alternate_casks.sh
source ./install_homebrew_web_font_tools.sh
update
source ./cleanup.sh
cd "$workingDirectory"
}
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Main
main
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Cleanup
unset main
|
ad680bd902f8e3c85da082769e4f2c09ea5620fa | lib/mongo_session_store/mongoid_store.rb | lib/mongo_session_store/mongoid_store.rb | require 'mongoid'
require 'mongo_session_store/mongo_store_base'
module ActionDispatch
module Session
class MongoidStore < MongoStoreBase
class Session
include Mongoid::Document
include Mongoid::Timestamps
store_in :collection => MongoSessionStore.collection_name
field :_id, :type => String
field :data, :type => Moped::BSON::Binary, :default => Moped::BSON::Binary.new(:generic, Marshal.dump({}))
attr_accessible :_id, :data
end
private
def pack(data)
Moped::BSON::Binary.new(:generic, Marshal.dump(data))
end
end
end
end
MongoidStore = ActionDispatch::Session::MongoidStore
| require 'mongoid'
require 'mongo_session_store/mongo_store_base'
module ActionDispatch
module Session
class MongoidStore < MongoStoreBase
BINARY_CLASS = defined?(Moped::BSON::Binary) ? Moped::BSON::Binary : BSON::Binary
class Session
include Mongoid::Document
include Mongoid::Timestamps
store_in :collection => MongoSessionStore.collection_name
field :_id, :type => String
field :data, :type => BINARY_CLASS, :default => -> { marshaled_binary({}) }
attr_accessible :_id, :data if respond_to?(:attr_accessible)
def marshaled_binary(data)
self.class.marshaled_binary(data)
end
def self.marshaled_binary(data)
if BINARY_CLASS.to_s == 'BSON::Binary'
BSON::Binary.new(Marshal.dump(data), :generic)
else
Moped::BSON::Binary.new(:generic, Marshal.dump(data))
end
end
end
private
def pack(data)
session_class.marshaled_binary(data)
end
def unpack(packed)
return nil unless packed
Marshal.load(extract_data(packed))
end
def extract_data(packed)
if packed.class.to_s == 'BSON::Binary'
packed.data
else
packed.to_s
end
end
end
end
end
MongoidStore = ActionDispatch::Session::MongoidStore
| Fix MongoidStore for Mongoid 4 while remaining Mongoid 3 compatible. | Fix MongoidStore for Mongoid 4 while remaining Mongoid 3 compatible.
| Ruby | mit | mongoid/mongo_session_store,mongoid/mongo_session_store | ruby | ## Code Before:
require 'mongoid'
require 'mongo_session_store/mongo_store_base'
module ActionDispatch
module Session
class MongoidStore < MongoStoreBase
class Session
include Mongoid::Document
include Mongoid::Timestamps
store_in :collection => MongoSessionStore.collection_name
field :_id, :type => String
field :data, :type => Moped::BSON::Binary, :default => Moped::BSON::Binary.new(:generic, Marshal.dump({}))
attr_accessible :_id, :data
end
private
def pack(data)
Moped::BSON::Binary.new(:generic, Marshal.dump(data))
end
end
end
end
MongoidStore = ActionDispatch::Session::MongoidStore
## Instruction:
Fix MongoidStore for Mongoid 4 while remaining Mongoid 3 compatible.
## Code After:
require 'mongoid'
require 'mongo_session_store/mongo_store_base'
module ActionDispatch
module Session
class MongoidStore < MongoStoreBase
BINARY_CLASS = defined?(Moped::BSON::Binary) ? Moped::BSON::Binary : BSON::Binary
class Session
include Mongoid::Document
include Mongoid::Timestamps
store_in :collection => MongoSessionStore.collection_name
field :_id, :type => String
field :data, :type => BINARY_CLASS, :default => -> { marshaled_binary({}) }
attr_accessible :_id, :data if respond_to?(:attr_accessible)
def marshaled_binary(data)
self.class.marshaled_binary(data)
end
def self.marshaled_binary(data)
if BINARY_CLASS.to_s == 'BSON::Binary'
BSON::Binary.new(Marshal.dump(data), :generic)
else
Moped::BSON::Binary.new(:generic, Marshal.dump(data))
end
end
end
private
def pack(data)
session_class.marshaled_binary(data)
end
def unpack(packed)
return nil unless packed
Marshal.load(extract_data(packed))
end
def extract_data(packed)
if packed.class.to_s == 'BSON::Binary'
packed.data
else
packed.to_s
end
end
end
end
end
MongoidStore = ActionDispatch::Session::MongoidStore
|
c476cb5cf1bead63f19871fa1db9769e236fbe09 | siren_files.py | siren_files.py | source_files = ['check_siren.py', 'colours', 'credits', 'dataview', 'dijkstra_4',
'displayobject', 'displaytable', 'editini', 'flexiplot', 'floaters',
'getmap', 'getmerra2', 'getmodels', 'grid', 'indexweather', 'inisyntax',
'makegrid', 'makeweatherfiles',
'newstation', 'plotweather', 'powerclasses',
'powermatch', 'powermodel', 'powerplot', 'sammodels', 'samrun',
'senutils', 'siren', 'sirenicons', 'sirenm', 'sirenupd', 'ssc',
'station', 'superpower', 'towns', 'turbine', 'updateswis',
'viewresource', 'visualise', 'wascene', 'worldwindow', 'zoompan',
'getfiles.ini', 'about.html', 'credits.html', 'help.html',
'makeweatherfiles.html', 'SIREN_notes.html', 'siren_versions.csv',
'siren_files.py', 'compare_to_siren.git.py']
version_files = ['flexiplot', 'getmap', 'getmerra2', 'indexweather', 'makegrid',
'makeweatherfiles',
'powermatch', 'powerplot', 'siren', 'sirenm', 'sirenupd',
'updateswis']
| source_files = ['check_siren.py', 'colours', 'credits', 'dataview', 'dijkstra_4',
'displayobject', 'displaytable', 'editini', 'flexiplot', 'floaters',
'getmap', 'getmerra2', 'getmodels', 'grid', 'indexweather', 'inisyntax',
'makegrid', 'makeweatherfiles',
'newstation', 'plotweather', 'powerclasses',
'powermatch', 'powermodel', 'powerplot', 'sammodels', 'samrun',
'senutils', 'siren', 'sirenicons', 'sirenm', 'sirenupd', 'ssc',
'station', 'superpower', 'towns', 'turbine', 'updateswis',
'viewresource', 'visualise', 'wascene', 'worldwindow', 'zoompan',
'getfiles.ini', 'about.html', 'credits.html', 'help.html',
'SIREN_notes.html', 'siren_versions.csv',
'siren_files.py', 'compare_to_siren.git.py']
version_files = ['flexiplot', 'getmap', 'getmerra2', 'indexweather', 'makegrid',
'makeweatherfiles',
'powermatch', 'powerplot', 'siren', 'sirenm', 'sirenupd',
'template', 'updateswis']
| Remove makeweatherfiles, add template for Windows version file | Remove makeweatherfiles, add template for Windows version file
| Python | agpl-3.0 | ozsolarwind/siren,ozsolarwind/siren | python | ## Code Before:
source_files = ['check_siren.py', 'colours', 'credits', 'dataview', 'dijkstra_4',
'displayobject', 'displaytable', 'editini', 'flexiplot', 'floaters',
'getmap', 'getmerra2', 'getmodels', 'grid', 'indexweather', 'inisyntax',
'makegrid', 'makeweatherfiles',
'newstation', 'plotweather', 'powerclasses',
'powermatch', 'powermodel', 'powerplot', 'sammodels', 'samrun',
'senutils', 'siren', 'sirenicons', 'sirenm', 'sirenupd', 'ssc',
'station', 'superpower', 'towns', 'turbine', 'updateswis',
'viewresource', 'visualise', 'wascene', 'worldwindow', 'zoompan',
'getfiles.ini', 'about.html', 'credits.html', 'help.html',
'makeweatherfiles.html', 'SIREN_notes.html', 'siren_versions.csv',
'siren_files.py', 'compare_to_siren.git.py']
version_files = ['flexiplot', 'getmap', 'getmerra2', 'indexweather', 'makegrid',
'makeweatherfiles',
'powermatch', 'powerplot', 'siren', 'sirenm', 'sirenupd',
'updateswis']
## Instruction:
Remove makeweatherfiles, add template for Windows version file
## Code After:
source_files = ['check_siren.py', 'colours', 'credits', 'dataview', 'dijkstra_4',
'displayobject', 'displaytable', 'editini', 'flexiplot', 'floaters',
'getmap', 'getmerra2', 'getmodels', 'grid', 'indexweather', 'inisyntax',
'makegrid', 'makeweatherfiles',
'newstation', 'plotweather', 'powerclasses',
'powermatch', 'powermodel', 'powerplot', 'sammodels', 'samrun',
'senutils', 'siren', 'sirenicons', 'sirenm', 'sirenupd', 'ssc',
'station', 'superpower', 'towns', 'turbine', 'updateswis',
'viewresource', 'visualise', 'wascene', 'worldwindow', 'zoompan',
'getfiles.ini', 'about.html', 'credits.html', 'help.html',
'SIREN_notes.html', 'siren_versions.csv',
'siren_files.py', 'compare_to_siren.git.py']
version_files = ['flexiplot', 'getmap', 'getmerra2', 'indexweather', 'makegrid',
'makeweatherfiles',
'powermatch', 'powerplot', 'siren', 'sirenm', 'sirenupd',
'template', 'updateswis']
|
f33b3e2803c51cee20979ed76014cb514c3d3b8e | spec/bson/min_key_spec.rb | spec/bson/min_key_spec.rb | require "spec_helper"
describe BSON::MinKey do
describe "#__bson_encode__" do
let(:min_key) do
described_class.new
end
let(:buffer) do
BSON::Buffer.new
end
let(:encoded) do
min_key.__bson_encode__("key", buffer)
end
it "returns the buffer" do
expect(encoded).to eq(buffer)
end
it "returns the same buffer instance" do
expect(encoded).to eql(buffer)
end
it "encodes the field/min key pair to the buffer" do
expect(encoded.bytes).to eq("\xFFkey\x00")
end
end
end
| require "spec_helper"
describe BSON::MinKey do
describe "#__bson_encode__" do
let(:min_key) do
described_class.new
end
let(:buffer) do
BSON::Buffer.new
end
let(:encoded) do
min_key.__bson_encode__("key", buffer)
end
it "returns the buffer" do
expect(encoded).to eq(buffer)
end
it "returns the same buffer instance" do
expect(encoded).to eql(buffer)
end
it "encodes the field/min key pair to the buffer" do
expect(encoded.bytes).to eq("#{BSON::Types::MIN_KEY}key\x00")
end
end
end
| Fix ruby head encoding issue | Fix ruby head encoding issue
| Ruby | apache-2.0 | durran/bson,durran/bson | ruby | ## Code Before:
require "spec_helper"
describe BSON::MinKey do
describe "#__bson_encode__" do
let(:min_key) do
described_class.new
end
let(:buffer) do
BSON::Buffer.new
end
let(:encoded) do
min_key.__bson_encode__("key", buffer)
end
it "returns the buffer" do
expect(encoded).to eq(buffer)
end
it "returns the same buffer instance" do
expect(encoded).to eql(buffer)
end
it "encodes the field/min key pair to the buffer" do
expect(encoded.bytes).to eq("\xFFkey\x00")
end
end
end
## Instruction:
Fix ruby head encoding issue
## Code After:
require "spec_helper"
describe BSON::MinKey do
describe "#__bson_encode__" do
let(:min_key) do
described_class.new
end
let(:buffer) do
BSON::Buffer.new
end
let(:encoded) do
min_key.__bson_encode__("key", buffer)
end
it "returns the buffer" do
expect(encoded).to eq(buffer)
end
it "returns the same buffer instance" do
expect(encoded).to eql(buffer)
end
it "encodes the field/min key pair to the buffer" do
expect(encoded.bytes).to eq("#{BSON::Types::MIN_KEY}key\x00")
end
end
end
|
7a355a7940026df45c914d26d88d669a147f185f | src/main/ts/ephox/bridge/components/dialog/ImageTools.ts | src/main/ts/ephox/bridge/components/dialog/ImageTools.ts | import { ValueSchema, FieldSchema, FieldProcessorAdt } from '@ephox/boulder';
import { Result } from '@ephox/katamari';
import { FormComponent, FormComponentApi, formComponentFields } from './FormComponent';
import { Blob } from '@ephox/dom-globals';
export interface ImageToolsState {
blob: Blob;
url: string;
};
export interface ImageToolsApi extends FormComponentApi {
type: 'imagetools';
currentState: ImageToolsState;
}
export interface ImageTools extends FormComponent {
type: 'imagetools';
currentState: ImageToolsState;
}
export const imageToolsFields: FieldProcessorAdt[] = formComponentFields.concat([
FieldSchema.strict('currentState')
]);
export const imageToolsSchema = ValueSchema.objOf(imageToolsFields);
export const imageToolsDataProcessor = ValueSchema.string;
export const createImageTools = (spec: ImageToolsApi): Result<ImageTools, ValueSchema.SchemaError<any>> => {
return ValueSchema.asRaw<ImageTools>('imagetools', imageToolsSchema, spec);
};
| import { ValueSchema, FieldSchema, FieldProcessorAdt } from '@ephox/boulder';
import { Result } from '@ephox/katamari';
import { FormComponent, FormComponentApi, formComponentFields } from './FormComponent';
import { Blob } from '@ephox/dom-globals';
export interface ImageToolsState {
blob: Blob;
url: string;
};
export interface ImageToolsApi extends FormComponentApi {
type: 'imagetools';
currentState: ImageToolsState;
}
export interface ImageTools extends FormComponent {
type: 'imagetools';
currentState: ImageToolsState;
}
export const imageToolsFields: FieldProcessorAdt[] = formComponentFields.concat([
FieldSchema.strictOf('currentState', ValueSchema.objOf([
FieldSchema.strict('blob'),
FieldSchema.strictString('url')
]))
]);
export const imageToolsSchema = ValueSchema.objOf(imageToolsFields);
export const imageToolsDataProcessor = ValueSchema.string;
export const createImageTools = (spec: ImageToolsApi): Result<ImageTools, ValueSchema.SchemaError<any>> => {
return ValueSchema.asRaw<ImageTools>('imagetools', imageToolsSchema, spec);
};
| Extend value requirements for imagetools currentState property | TINY-2603: Extend value requirements for imagetools currentState property
| TypeScript | lgpl-2.1 | TeamupCom/tinymce,FernCreek/tinymce,tinymce/tinymce,FernCreek/tinymce,tinymce/tinymce,TeamupCom/tinymce,tinymce/tinymce,FernCreek/tinymce | typescript | ## Code Before:
import { ValueSchema, FieldSchema, FieldProcessorAdt } from '@ephox/boulder';
import { Result } from '@ephox/katamari';
import { FormComponent, FormComponentApi, formComponentFields } from './FormComponent';
import { Blob } from '@ephox/dom-globals';
export interface ImageToolsState {
blob: Blob;
url: string;
};
export interface ImageToolsApi extends FormComponentApi {
type: 'imagetools';
currentState: ImageToolsState;
}
export interface ImageTools extends FormComponent {
type: 'imagetools';
currentState: ImageToolsState;
}
export const imageToolsFields: FieldProcessorAdt[] = formComponentFields.concat([
FieldSchema.strict('currentState')
]);
export const imageToolsSchema = ValueSchema.objOf(imageToolsFields);
export const imageToolsDataProcessor = ValueSchema.string;
export const createImageTools = (spec: ImageToolsApi): Result<ImageTools, ValueSchema.SchemaError<any>> => {
return ValueSchema.asRaw<ImageTools>('imagetools', imageToolsSchema, spec);
};
## Instruction:
TINY-2603: Extend value requirements for imagetools currentState property
## Code After:
import { ValueSchema, FieldSchema, FieldProcessorAdt } from '@ephox/boulder';
import { Result } from '@ephox/katamari';
import { FormComponent, FormComponentApi, formComponentFields } from './FormComponent';
import { Blob } from '@ephox/dom-globals';
export interface ImageToolsState {
blob: Blob;
url: string;
};
export interface ImageToolsApi extends FormComponentApi {
type: 'imagetools';
currentState: ImageToolsState;
}
export interface ImageTools extends FormComponent {
type: 'imagetools';
currentState: ImageToolsState;
}
export const imageToolsFields: FieldProcessorAdt[] = formComponentFields.concat([
FieldSchema.strictOf('currentState', ValueSchema.objOf([
FieldSchema.strict('blob'),
FieldSchema.strictString('url')
]))
]);
export const imageToolsSchema = ValueSchema.objOf(imageToolsFields);
export const imageToolsDataProcessor = ValueSchema.string;
export const createImageTools = (spec: ImageToolsApi): Result<ImageTools, ValueSchema.SchemaError<any>> => {
return ValueSchema.asRaw<ImageTools>('imagetools', imageToolsSchema, spec);
};
|
5ab65686acd49817f4029c9a3df85fa5fcb504f1 | src/meta-domain.js | src/meta-domain.js | import { merge } from './utils'
import { RESET, PATCH, ADD_DOMAIN } from './lifecycle'
export default function MetaDomain(_, repo) {
this.repo = repo
}
MetaDomain.prototype = {
reset(state, data) {
let filtered = this.repo.domains.sanitize(data)
return merge(state, this.repo.getInitialState(), filtered)
},
patch(state, data) {
let filtered = this.repo.domains.sanitize(data)
return merge(state, filtered)
},
addDomain(state) {
return merge(this.repo.getInitialState(), state)
},
register() {
return {
[RESET]: this.reset,
[PATCH]: this.patch,
[ADD_DOMAIN]: this.addDomain
}
}
}
| import { merge } from './utils'
import { RESET, PATCH, ADD_DOMAIN } from './lifecycle'
/**
* @fileoverview Every Microcosm includes MetaDomain. It provides the
* plumbing required for lifecycle methods like `reset` and `patch`.
*/
class MetaDomain {
setup(repo) {
this.repo = repo
}
/**
* Build a new Microcosm state object.
* @param {Object} oldState
* @param {Object} newState
*/
reset(oldState, newState) {
let filtered = this.repo.domains.sanitize(newState)
return merge(oldState, this.repo.getInitialState(), filtered)
}
/**
* Merge a state object into the current Microcosm state.
* @param {Object} oldState
* @param {Object} newState
*/
patch(oldState, newState) {
let filtered = this.repo.domains.sanitize(newState)
return merge(oldState, filtered)
}
/**
* Update the initial state whenever a new domain is added to a
* repo.
* @param {Object} oldState
*/
addDomain(oldState) {
return merge(this.repo.getInitialState(), oldState)
}
register() {
return {
[RESET]: this.reset,
[PATCH]: this.patch,
[ADD_DOMAIN]: this.addDomain
}
}
}
export default MetaDomain
| Use ES6 class syntax for MetaDomain. Add documentation. | Use ES6 class syntax for MetaDomain. Add documentation.
Related issues:
https://github.com/vigetlabs/microcosm/issues/305
| JavaScript | mit | leobauza/microcosm,vigetlabs/microcosm,vigetlabs/microcosm,leobauza/microcosm,vigetlabs/microcosm,leobauza/microcosm | javascript | ## Code Before:
import { merge } from './utils'
import { RESET, PATCH, ADD_DOMAIN } from './lifecycle'
export default function MetaDomain(_, repo) {
this.repo = repo
}
MetaDomain.prototype = {
reset(state, data) {
let filtered = this.repo.domains.sanitize(data)
return merge(state, this.repo.getInitialState(), filtered)
},
patch(state, data) {
let filtered = this.repo.domains.sanitize(data)
return merge(state, filtered)
},
addDomain(state) {
return merge(this.repo.getInitialState(), state)
},
register() {
return {
[RESET]: this.reset,
[PATCH]: this.patch,
[ADD_DOMAIN]: this.addDomain
}
}
}
## Instruction:
Use ES6 class syntax for MetaDomain. Add documentation.
Related issues:
https://github.com/vigetlabs/microcosm/issues/305
## Code After:
import { merge } from './utils'
import { RESET, PATCH, ADD_DOMAIN } from './lifecycle'
/**
* @fileoverview Every Microcosm includes MetaDomain. It provides the
* plumbing required for lifecycle methods like `reset` and `patch`.
*/
class MetaDomain {
setup(repo) {
this.repo = repo
}
/**
* Build a new Microcosm state object.
* @param {Object} oldState
* @param {Object} newState
*/
reset(oldState, newState) {
let filtered = this.repo.domains.sanitize(newState)
return merge(oldState, this.repo.getInitialState(), filtered)
}
/**
* Merge a state object into the current Microcosm state.
* @param {Object} oldState
* @param {Object} newState
*/
patch(oldState, newState) {
let filtered = this.repo.domains.sanitize(newState)
return merge(oldState, filtered)
}
/**
* Update the initial state whenever a new domain is added to a
* repo.
* @param {Object} oldState
*/
addDomain(oldState) {
return merge(this.repo.getInitialState(), oldState)
}
register() {
return {
[RESET]: this.reset,
[PATCH]: this.patch,
[ADD_DOMAIN]: this.addDomain
}
}
}
export default MetaDomain
|
4f4c5602c52d00867ca2109dc08533f6fcd49f9f | migrations/2016-05-04.0.txdb.nocontracthash.sql | migrations/2016-05-04.0.txdb.nocontracthash.sql | DROP INDEX utxos_asset_id_contract_hash_idx;
ALTER TABLE utxos DROP contract_hash;
DROP VIEW IF EXISTS utxos_status;
CREATE VIEW utxos_status AS
SELECT u.tx_hash,
u.index,
u.asset_id,
u.amount,
u.created_at,
u.metadata,
u.script,
(b.tx_hash IS NOT NULL) AS confirmed
FROM (utxos u
LEFT JOIN blocks_utxos b ON (((u.tx_hash = b.tx_hash) AND (u.index = b.index))));
| DROP INDEX utxos_asset_id_contract_hash_idx;
DROP VIEW IF EXISTS utxos_status;
ALTER TABLE utxos DROP contract_hash;
CREATE VIEW utxos_status AS
SELECT u.tx_hash,
u.index,
u.asset_id,
u.amount,
u.created_at,
u.metadata,
u.script,
(b.tx_hash IS NOT NULL) AS confirmed
FROM (utxos u
LEFT JOIN blocks_utxos b ON (((u.tx_hash = b.tx_hash) AND (u.index = b.index))));
| Drop items in dependency order | migrations: Drop items in dependency order
Addresses chain/chainprv#858
Closes chain/chainprv#860.
Reviewers: da39a3ee5e6b4b0d3255bfef95601890afd80709@kr
| SQL | agpl-3.0 | chain/chain,chain/chain,chain/chain,chain/chain,chain/chain,chain/chain | sql | ## Code Before:
DROP INDEX utxos_asset_id_contract_hash_idx;
ALTER TABLE utxos DROP contract_hash;
DROP VIEW IF EXISTS utxos_status;
CREATE VIEW utxos_status AS
SELECT u.tx_hash,
u.index,
u.asset_id,
u.amount,
u.created_at,
u.metadata,
u.script,
(b.tx_hash IS NOT NULL) AS confirmed
FROM (utxos u
LEFT JOIN blocks_utxos b ON (((u.tx_hash = b.tx_hash) AND (u.index = b.index))));
## Instruction:
migrations: Drop items in dependency order
Addresses chain/chainprv#858
Closes chain/chainprv#860.
Reviewers: da39a3ee5e6b4b0d3255bfef95601890afd80709@kr
## Code After:
DROP INDEX utxos_asset_id_contract_hash_idx;
DROP VIEW IF EXISTS utxos_status;
ALTER TABLE utxos DROP contract_hash;
CREATE VIEW utxos_status AS
SELECT u.tx_hash,
u.index,
u.asset_id,
u.amount,
u.created_at,
u.metadata,
u.script,
(b.tx_hash IS NOT NULL) AS confirmed
FROM (utxos u
LEFT JOIN blocks_utxos b ON (((u.tx_hash = b.tx_hash) AND (u.index = b.index))));
|
cfc1fb2968c4e6a9e88693c1eab0ecbc210e548c | CHANGES.rst | CHANGES.rst | Changelog
=========
Version 0.4.0
-------------
Release on March 20, 2017.
- Encoding of map types was changed according to the `Nirum serialization
specification`__. [:issue:`66`]
- Added :mod:`nirum.datastructures` module and
:class:`~nirum.datastructures.Map` which is an immutable dictionary.
[:issue:`66`]
- Added :class:`nirum.datastructures.List` which is an immutable list.
[:issue:`49`]
- Aliased :class:`~nirum.datastructures.Map` as ``map_type``, and
:class:`~nirum.datastructures.List` as ``list_type`` to avoid name
conflict with user-defined types.
Version 0.4.1
-------------
Release on May 2nd, 2017.
- Compare type with its abstract type in :func:`nirum.validate.validate_type`.
__ https://github.com/spoqa/nirum/blob/f1629787f45fef17eeab8b4f030c34580e0446b8/docs/serialization.md
| Changelog
=========
Version 0.4.1
-------------
Release on May 2nd, 2017.
- Compare type with its abstract type in :func:`nirum.validate.validate_type`.
Version 0.4.0
-------------
Release on March 20, 2017.
- Encoding of map types was changed according to the `Nirum serialization
specification`__. [:issue:`66`]
- Added :mod:`nirum.datastructures` module and
:class:`~nirum.datastructures.Map` which is an immutable dictionary.
[:issue:`66`]
- Added :class:`nirum.datastructures.List` which is an immutable list.
[:issue:`49`]
- Aliased :class:`~nirum.datastructures.Map` as ``map_type``, and
:class:`~nirum.datastructures.List` as ``list_type`` to avoid name
conflict with user-defined types.
__ https://github.com/spoqa/nirum/blob/f1629787f45fef17eeab8b4f030c34580e0446b8/docs/serialization.md
| Change order of change log | Change order of change log
| reStructuredText | mit | spoqa/nirum-python,spoqa/nirum-python | restructuredtext | ## Code Before:
Changelog
=========
Version 0.4.0
-------------
Release on March 20, 2017.
- Encoding of map types was changed according to the `Nirum serialization
specification`__. [:issue:`66`]
- Added :mod:`nirum.datastructures` module and
:class:`~nirum.datastructures.Map` which is an immutable dictionary.
[:issue:`66`]
- Added :class:`nirum.datastructures.List` which is an immutable list.
[:issue:`49`]
- Aliased :class:`~nirum.datastructures.Map` as ``map_type``, and
:class:`~nirum.datastructures.List` as ``list_type`` to avoid name
conflict with user-defined types.
Version 0.4.1
-------------
Release on May 2nd, 2017.
- Compare type with its abstract type in :func:`nirum.validate.validate_type`.
__ https://github.com/spoqa/nirum/blob/f1629787f45fef17eeab8b4f030c34580e0446b8/docs/serialization.md
## Instruction:
Change order of change log
## Code After:
Changelog
=========
Version 0.4.1
-------------
Release on May 2nd, 2017.
- Compare type with its abstract type in :func:`nirum.validate.validate_type`.
Version 0.4.0
-------------
Release on March 20, 2017.
- Encoding of map types was changed according to the `Nirum serialization
specification`__. [:issue:`66`]
- Added :mod:`nirum.datastructures` module and
:class:`~nirum.datastructures.Map` which is an immutable dictionary.
[:issue:`66`]
- Added :class:`nirum.datastructures.List` which is an immutable list.
[:issue:`49`]
- Aliased :class:`~nirum.datastructures.Map` as ``map_type``, and
:class:`~nirum.datastructures.List` as ``list_type`` to avoid name
conflict with user-defined types.
__ https://github.com/spoqa/nirum/blob/f1629787f45fef17eeab8b4f030c34580e0446b8/docs/serialization.md
|
0f9bd27e77037a938a57168c697ef21c9cbd3153 | spec/support/custom_matchers.rb | spec/support/custom_matchers.rb | RSpec::Matchers.define :be_now do
match do |actual|
actual.to_i == Time.zone.now.to_i
end
failure_message_for_should do |actual|
actual = 'nil' unless actual
"expected that #{actual} would be now (#{Time.zone.now})"
end
failure_message_for_should_not do |actual|
actual = 'nil' unless actual
"expected that #{actual} would not be now (#{Time.zone.now})"
end
end
RSpec::Matchers.define :be_at do |expected|
match do |actual|
actual.to_i == DateTime.parse(expected).to_i
end
failure_message_for_should do |actual|
actual = 'nil' unless actual
"expected that #{actual} would be #{expected}"
end
failure_message_for_should_not do |actual|
actual = 'nil' unless actual
"expected that #{actual} would not be #{expected}"
end
end
| RSpec::Matchers.define :be_now do
match do |actual|
actual.to_i == Time.zone.now.to_i
end
failure_message_for_should do |actual|
actual = 'nil' unless actual
"expected that #{actual} (#{actual.to_i}) would be now (#{Time.zone.now}, #{Time.zone.now.to_i})"
end
failure_message_for_should_not do |actual|
actual = 'nil' unless actual
"expected that #{actual} (#{actual.to_i}) would not be now (#{Time.zone.now}, #{Time.zone.now.to_i})"
end
end
RSpec::Matchers.define :be_at do |expected|
match do |actual|
actual.to_i == DateTime.parse(expected).to_i
end
failure_message_for_should do |actual|
actual = 'nil' unless actual
"expected that #{actual} (#{actual.to_i}) would be #{expected} (#{expected.to_i})"
end
failure_message_for_should_not do |actual|
actual = 'nil' unless actual
"expected that #{actual} (#{actual.to_i}) would not be #{expected} (#{expected.to_i})"
end
end
| Improve failure messages for be_now and be_at | Improve failure messages for be_now and be_at
| Ruby | mit | adamstegman/photo_albums,adamstegman/photo_albums | ruby | ## Code Before:
RSpec::Matchers.define :be_now do
match do |actual|
actual.to_i == Time.zone.now.to_i
end
failure_message_for_should do |actual|
actual = 'nil' unless actual
"expected that #{actual} would be now (#{Time.zone.now})"
end
failure_message_for_should_not do |actual|
actual = 'nil' unless actual
"expected that #{actual} would not be now (#{Time.zone.now})"
end
end
RSpec::Matchers.define :be_at do |expected|
match do |actual|
actual.to_i == DateTime.parse(expected).to_i
end
failure_message_for_should do |actual|
actual = 'nil' unless actual
"expected that #{actual} would be #{expected}"
end
failure_message_for_should_not do |actual|
actual = 'nil' unless actual
"expected that #{actual} would not be #{expected}"
end
end
## Instruction:
Improve failure messages for be_now and be_at
## Code After:
RSpec::Matchers.define :be_now do
match do |actual|
actual.to_i == Time.zone.now.to_i
end
failure_message_for_should do |actual|
actual = 'nil' unless actual
"expected that #{actual} (#{actual.to_i}) would be now (#{Time.zone.now}, #{Time.zone.now.to_i})"
end
failure_message_for_should_not do |actual|
actual = 'nil' unless actual
"expected that #{actual} (#{actual.to_i}) would not be now (#{Time.zone.now}, #{Time.zone.now.to_i})"
end
end
RSpec::Matchers.define :be_at do |expected|
match do |actual|
actual.to_i == DateTime.parse(expected).to_i
end
failure_message_for_should do |actual|
actual = 'nil' unless actual
"expected that #{actual} (#{actual.to_i}) would be #{expected} (#{expected.to_i})"
end
failure_message_for_should_not do |actual|
actual = 'nil' unless actual
"expected that #{actual} (#{actual.to_i}) would not be #{expected} (#{expected.to_i})"
end
end
|
8890992f24cef11f29d90d726161bdb2545201b4 | lib/grocer/connection.rb | lib/grocer/connection.rb | require 'grocer'
require 'grocer/no_gateway_error'
require 'grocer/no_port_error'
require 'grocer/ssl_connection'
module Grocer
class Connection
attr_reader :certificate, :passphrase, :gateway, :port, :retries
def initialize(options = {})
@certificate = options.fetch(:certificate) { nil }
@passphrase = options.fetch(:passphrase) { nil }
@gateway = options.fetch(:gateway) { fail NoGatewayError }
@port = options.fetch(:port) { fail NoPortError }
@retries = options.fetch(:retries) { 3 }
end
def read(size = nil, buf = nil)
with_connection do
ssl.read(size, buf)
end
end
def write(content)
with_connection do
ssl.write(content)
end
end
def connect
ssl.connect unless ssl.connected?
end
private
def ssl
@ssl_connection ||= build_connection
end
def build_connection
Grocer::SSLConnection.new(certificate: certificate,
passphrase: passphrase,
gateway: gateway,
port: port)
end
def destroy_connection
return unless @ssl_connection
@ssl_connection.disconnect rescue nil
@ssl_connection = nil
end
def with_connection
attempts = 1
begin
ssl.connect unless ssl.connected?
yield
rescue StandardError, Errno::EPIPE
raise unless attempts < retries
destroy_connection
attempts += 1
retry
end
end
end
end
| require 'grocer'
require 'grocer/no_gateway_error'
require 'grocer/no_port_error'
require 'grocer/ssl_connection'
module Grocer
class Connection
attr_reader :certificate, :passphrase, :gateway, :port, :retries
def initialize(options = {})
@certificate = options.fetch(:certificate) { nil }
@passphrase = options.fetch(:passphrase) { nil }
@gateway = options.fetch(:gateway) { fail NoGatewayError }
@port = options.fetch(:port) { fail NoPortError }
@retries = options.fetch(:retries) { 3 }
end
def read(size = nil, buf = nil)
with_connection do
ssl.read(size, buf)
end
end
def write(content)
with_connection do
ssl.write(content)
end
end
def connect
ssl.connect unless ssl.connected?
end
private
def ssl
@ssl_connection ||= build_connection
end
def build_connection
Grocer::SSLConnection.new(certificate: certificate,
passphrase: passphrase,
gateway: gateway,
port: port)
end
def destroy_connection
return unless @ssl_connection
@ssl_connection.disconnect rescue nil
@ssl_connection = nil
end
def with_connection
attempts = 1
begin
connect
yield
rescue StandardError, Errno::EPIPE
raise unless attempts < retries
destroy_connection
attempts += 1
retry
end
end
end
end
| Remove one extra branch point | Remove one extra branch point
| Ruby | mit | rockarloz/grocer,utx-tex/grocer,dfried/grocer,RobotsAndPencils/grocer,grocer/grocer,ping4/grocer | ruby | ## Code Before:
require 'grocer'
require 'grocer/no_gateway_error'
require 'grocer/no_port_error'
require 'grocer/ssl_connection'
module Grocer
class Connection
attr_reader :certificate, :passphrase, :gateway, :port, :retries
def initialize(options = {})
@certificate = options.fetch(:certificate) { nil }
@passphrase = options.fetch(:passphrase) { nil }
@gateway = options.fetch(:gateway) { fail NoGatewayError }
@port = options.fetch(:port) { fail NoPortError }
@retries = options.fetch(:retries) { 3 }
end
def read(size = nil, buf = nil)
with_connection do
ssl.read(size, buf)
end
end
def write(content)
with_connection do
ssl.write(content)
end
end
def connect
ssl.connect unless ssl.connected?
end
private
def ssl
@ssl_connection ||= build_connection
end
def build_connection
Grocer::SSLConnection.new(certificate: certificate,
passphrase: passphrase,
gateway: gateway,
port: port)
end
def destroy_connection
return unless @ssl_connection
@ssl_connection.disconnect rescue nil
@ssl_connection = nil
end
def with_connection
attempts = 1
begin
ssl.connect unless ssl.connected?
yield
rescue StandardError, Errno::EPIPE
raise unless attempts < retries
destroy_connection
attempts += 1
retry
end
end
end
end
## Instruction:
Remove one extra branch point
## Code After:
require 'grocer'
require 'grocer/no_gateway_error'
require 'grocer/no_port_error'
require 'grocer/ssl_connection'
module Grocer
class Connection
attr_reader :certificate, :passphrase, :gateway, :port, :retries
def initialize(options = {})
@certificate = options.fetch(:certificate) { nil }
@passphrase = options.fetch(:passphrase) { nil }
@gateway = options.fetch(:gateway) { fail NoGatewayError }
@port = options.fetch(:port) { fail NoPortError }
@retries = options.fetch(:retries) { 3 }
end
def read(size = nil, buf = nil)
with_connection do
ssl.read(size, buf)
end
end
def write(content)
with_connection do
ssl.write(content)
end
end
def connect
ssl.connect unless ssl.connected?
end
private
def ssl
@ssl_connection ||= build_connection
end
def build_connection
Grocer::SSLConnection.new(certificate: certificate,
passphrase: passphrase,
gateway: gateway,
port: port)
end
def destroy_connection
return unless @ssl_connection
@ssl_connection.disconnect rescue nil
@ssl_connection = nil
end
def with_connection
attempts = 1
begin
connect
yield
rescue StandardError, Errno::EPIPE
raise unless attempts < retries
destroy_connection
attempts += 1
retry
end
end
end
end
|
24bb5014fd8518952dcff9b52f7f2e4e0c87da63 | docs/gen_modules/tslearn.metrics.rst | docs/gen_modules/tslearn.metrics.rst | .. _mod-metrics:
tslearn.metrics
===============
.. automodule:: tslearn.metrics
.. rubric:: Functions
.. autosummary::
:toctree: metrics
:template: function.rst
cdist_dtw
cdist_gak
dtw
dtw_path
dtw_path_from_metric
dtw_limited_warping_length
dtw_path_limited_warping_length
subsequence_path
subsequence_cost_matrix
dtw_subsequence_path
lcss
lcss_path
lcss_path_from_metric
gak
soft_dtw
soft_dtw_alignment
cdist_soft_dtw
cdist_soft_dtw_normalized
lb_envelope
lb_keogh
sigma_gak
gamma_soft_dtw
| .. _mod-metrics:
tslearn.metrics
===============
.. automodule:: tslearn.metrics
.. rubric:: Functions
.. autosummary::
:toctree: metrics
:template: function.rst
cdist_dtw
cdist_gak
ctw
ctw_path
dtw
dtw_path
dtw_path_from_metric
dtw_limited_warping_length
dtw_path_limited_warping_length
subsequence_path
subsequence_cost_matrix
dtw_subsequence_path
lcss
lcss_path
lcss_path_from_metric
gak
soft_dtw
soft_dtw_alignment
cdist_soft_dtw
cdist_soft_dtw_normalized
lb_envelope
lb_keogh
sigma_gak
gamma_soft_dtw
| Add docs for CTW variants | Add docs for CTW variants
| reStructuredText | bsd-2-clause | rtavenar/tslearn | restructuredtext | ## Code Before:
.. _mod-metrics:
tslearn.metrics
===============
.. automodule:: tslearn.metrics
.. rubric:: Functions
.. autosummary::
:toctree: metrics
:template: function.rst
cdist_dtw
cdist_gak
dtw
dtw_path
dtw_path_from_metric
dtw_limited_warping_length
dtw_path_limited_warping_length
subsequence_path
subsequence_cost_matrix
dtw_subsequence_path
lcss
lcss_path
lcss_path_from_metric
gak
soft_dtw
soft_dtw_alignment
cdist_soft_dtw
cdist_soft_dtw_normalized
lb_envelope
lb_keogh
sigma_gak
gamma_soft_dtw
## Instruction:
Add docs for CTW variants
## Code After:
.. _mod-metrics:
tslearn.metrics
===============
.. automodule:: tslearn.metrics
.. rubric:: Functions
.. autosummary::
:toctree: metrics
:template: function.rst
cdist_dtw
cdist_gak
ctw
ctw_path
dtw
dtw_path
dtw_path_from_metric
dtw_limited_warping_length
dtw_path_limited_warping_length
subsequence_path
subsequence_cost_matrix
dtw_subsequence_path
lcss
lcss_path
lcss_path_from_metric
gak
soft_dtw
soft_dtw_alignment
cdist_soft_dtw
cdist_soft_dtw_normalized
lb_envelope
lb_keogh
sigma_gak
gamma_soft_dtw
|
5d3fe703e04ebd4e7667aa1959861fd57bbeb7a9 | CMakeLists.txt | CMakeLists.txt | cmake_minimum_required(VERSION 2.6)
project(INDEXEDCORPUS)
if (NOT CMAKE_CONFIGURATION_TYPES AND NOT CMAKE_BUILD_TYPE)
set (CMAKE_BUILD_TYPE Release)
endif (NOT CMAKE_CONFIGURATION_TYPES AND NOT CMAKE_BUILD_TYPE)
include_directories(${INDEXEDCORPUS_SOURCE_DIR})
find_package(Qt4 COMPONENTS QtCore REQUIRED)
INCLUDE(${QT_USE_FILE})
find_package(ZLIB REQUIRED)
if(ZLIB_FOUND)
include_directories(${ZLIB_INCLUDE_DIRS})
endif()
add_library(corpus STATIC
src/ActCorpusReader/ActCorpusReader.cpp
src/DzIstreamBuf/DzIstreamBuf.cpp
src/IndexedCorpusReader/IndexedCorpusReader.cpp
src/IndexedCorpusWriter/IndexedCorpusWriter.cpp
src/util/textfile/textfile.cpp
src/util/base64.cpp
src/DzOstream/DzOstream.cpp
src/DzOstreamBuf/DzOstreamBuf.cpp
src/IndexNamePair/IndexNamePair.cpp
src/DzIstream/DzIstream.cpp
)
| cmake_minimum_required(VERSION 2.6)
project(INDEXEDCORPUS)
if (NOT CMAKE_CONFIGURATION_TYPES AND NOT CMAKE_BUILD_TYPE)
set (CMAKE_BUILD_TYPE Release)
endif (NOT CMAKE_CONFIGURATION_TYPES AND NOT CMAKE_BUILD_TYPE)
include_directories(${INDEXEDCORPUS_SOURCE_DIR})
find_package(Qt4 COMPONENTS QtCore REQUIRED)
INCLUDE(${QT_USE_FILE})
find_package(ZLIB REQUIRED)
if(ZLIB_FOUND)
include_directories(${ZLIB_INCLUDE_DIRS})
endif()
add_library(corpus SHARED
src/ActCorpusReader/ActCorpusReader.cpp
src/DzIstreamBuf/DzIstreamBuf.cpp
src/IndexedCorpusReader/IndexedCorpusReader.cpp
src/IndexedCorpusWriter/IndexedCorpusWriter.cpp
src/util/textfile/textfile.cpp
src/util/base64.cpp
src/DzOstream/DzOstream.cpp
src/DzOstreamBuf/DzOstreamBuf.cpp
src/IndexNamePair/IndexNamePair.cpp
src/DzIstream/DzIstream.cpp
)
target_link_libraries(corpus ${QT_LIBRARIES})
target_link_libraries(corpus ${ZLIB_LIBRARIES})
| Build indexedcorpus as a shared library. | Build indexedcorpus as a shared library.
| Text | lgpl-2.1 | evdmade01/alpinocorpus,evdmade01/alpinocorpus,rug-compling/alpinocorpus,rug-compling/alpinocorpus,rug-compling/alpinocorpus | text | ## Code Before:
cmake_minimum_required(VERSION 2.6)
project(INDEXEDCORPUS)
if (NOT CMAKE_CONFIGURATION_TYPES AND NOT CMAKE_BUILD_TYPE)
set (CMAKE_BUILD_TYPE Release)
endif (NOT CMAKE_CONFIGURATION_TYPES AND NOT CMAKE_BUILD_TYPE)
include_directories(${INDEXEDCORPUS_SOURCE_DIR})
find_package(Qt4 COMPONENTS QtCore REQUIRED)
INCLUDE(${QT_USE_FILE})
find_package(ZLIB REQUIRED)
if(ZLIB_FOUND)
include_directories(${ZLIB_INCLUDE_DIRS})
endif()
add_library(corpus STATIC
src/ActCorpusReader/ActCorpusReader.cpp
src/DzIstreamBuf/DzIstreamBuf.cpp
src/IndexedCorpusReader/IndexedCorpusReader.cpp
src/IndexedCorpusWriter/IndexedCorpusWriter.cpp
src/util/textfile/textfile.cpp
src/util/base64.cpp
src/DzOstream/DzOstream.cpp
src/DzOstreamBuf/DzOstreamBuf.cpp
src/IndexNamePair/IndexNamePair.cpp
src/DzIstream/DzIstream.cpp
)
## Instruction:
Build indexedcorpus as a shared library.
## Code After:
cmake_minimum_required(VERSION 2.6)
project(INDEXEDCORPUS)
if (NOT CMAKE_CONFIGURATION_TYPES AND NOT CMAKE_BUILD_TYPE)
set (CMAKE_BUILD_TYPE Release)
endif (NOT CMAKE_CONFIGURATION_TYPES AND NOT CMAKE_BUILD_TYPE)
include_directories(${INDEXEDCORPUS_SOURCE_DIR})
find_package(Qt4 COMPONENTS QtCore REQUIRED)
INCLUDE(${QT_USE_FILE})
find_package(ZLIB REQUIRED)
if(ZLIB_FOUND)
include_directories(${ZLIB_INCLUDE_DIRS})
endif()
add_library(corpus SHARED
src/ActCorpusReader/ActCorpusReader.cpp
src/DzIstreamBuf/DzIstreamBuf.cpp
src/IndexedCorpusReader/IndexedCorpusReader.cpp
src/IndexedCorpusWriter/IndexedCorpusWriter.cpp
src/util/textfile/textfile.cpp
src/util/base64.cpp
src/DzOstream/DzOstream.cpp
src/DzOstreamBuf/DzOstreamBuf.cpp
src/IndexNamePair/IndexNamePair.cpp
src/DzIstream/DzIstream.cpp
)
target_link_libraries(corpus ${QT_LIBRARIES})
target_link_libraries(corpus ${ZLIB_LIBRARIES})
|
9787e7689e8c45b01ce1801901873f9ab538445c | swagger_to_sdk_config.json | swagger_to_sdk_config.json | {
"$schema": "https://raw.githubusercontent.com/lmazuel/swagger-to-sdk/master/swagger_to_sdk_config.schema.json",
"meta": {
"autorest_options": {
"version": "preview",
"use": "@microsoft.azure/autorest.python@~3.0.56",
"python": "",
"python-mode": "update",
"sdkrel:python-sdks-folder": "./sdk/.",
"multiapi": ""
},
"repotag": "azure-sdk-for-python",
"version": "0.2.0"
},
"projects": {
"batch": {
"build_dir": "azure-batch",
"markdown": "specification/batch/data-plane/readme.md",
"wrapper_filesOrDirs": [
"azure-batch/azure/batch/batch_auth.py"
]
}
}
}
| {
"$schema": "https://raw.githubusercontent.com/lmazuel/swagger-to-sdk/master/swagger_to_sdk_config.schema.json",
"meta": {
"autorest_options": {
"version": "preview",
"use": "@microsoft.azure/autorest.python@~3.0.56",
"python": "",
"python-mode": "update",
"sdkrel:python-sdks-folder": "./sdk/.",
"multiapi": ""
},
"repotag": "azure-sdk-for-python",
"version": "0.2.0"
}
}
| Kill project section for good | Kill project section for good | JSON | mit | Azure/azure-sdk-for-python,Azure/azure-sdk-for-python,Azure/azure-sdk-for-python,Azure/azure-sdk-for-python | json | ## Code Before:
{
"$schema": "https://raw.githubusercontent.com/lmazuel/swagger-to-sdk/master/swagger_to_sdk_config.schema.json",
"meta": {
"autorest_options": {
"version": "preview",
"use": "@microsoft.azure/autorest.python@~3.0.56",
"python": "",
"python-mode": "update",
"sdkrel:python-sdks-folder": "./sdk/.",
"multiapi": ""
},
"repotag": "azure-sdk-for-python",
"version": "0.2.0"
},
"projects": {
"batch": {
"build_dir": "azure-batch",
"markdown": "specification/batch/data-plane/readme.md",
"wrapper_filesOrDirs": [
"azure-batch/azure/batch/batch_auth.py"
]
}
}
}
## Instruction:
Kill project section for good
## Code After:
{
"$schema": "https://raw.githubusercontent.com/lmazuel/swagger-to-sdk/master/swagger_to_sdk_config.schema.json",
"meta": {
"autorest_options": {
"version": "preview",
"use": "@microsoft.azure/autorest.python@~3.0.56",
"python": "",
"python-mode": "update",
"sdkrel:python-sdks-folder": "./sdk/.",
"multiapi": ""
},
"repotag": "azure-sdk-for-python",
"version": "0.2.0"
}
}
|
fe625970c82996ca08908a19d0930ce05ddf49dd | db/delta/91-wowza_dvr.sql | db/delta/91-wowza_dvr.sql | --
ALTER TABLE `storages` ADD `wowza_dvr` tinyint default 0;
ALTER TABLE `storages` CHANGE `flussonic_server` `flussonic_dvr` tinyint default 0;
ALTER TABLE `itv` ADD `wowza_dvr` tinyint default 0;
--//@UNDO
ALTER TABLE `storages` DROP `wowza_dvr`;
ALTER TABLE `storages` CHANGE `flussonic_dvr` `flussonic_server` tinyint default 0;
ALTER TABLE `itv` DROP `wowza_dvr`;
-- | --
ALTER TABLE `storages` ADD `wowza_dvr` tinyint default 0;
ALTER TABLE `storages` CHANGE `flussonic_server` `flussonic_dvr` tinyint default 0;
--//@UNDO
ALTER TABLE `storages` DROP `wowza_dvr`;
ALTER TABLE `storages` CHANGE `flussonic_dvr` `flussonic_server` tinyint default 0;
-- | Fix wowza_dvr in itv table | Fix wowza_dvr in itv table
| SQL | mit | saydulk/stalker_portal,saydulk/stalker_portal,saydulk/stalker_portal,saydulk/stalker_portal,saydulk/stalker_portal | sql | ## Code Before:
--
ALTER TABLE `storages` ADD `wowza_dvr` tinyint default 0;
ALTER TABLE `storages` CHANGE `flussonic_server` `flussonic_dvr` tinyint default 0;
ALTER TABLE `itv` ADD `wowza_dvr` tinyint default 0;
--//@UNDO
ALTER TABLE `storages` DROP `wowza_dvr`;
ALTER TABLE `storages` CHANGE `flussonic_dvr` `flussonic_server` tinyint default 0;
ALTER TABLE `itv` DROP `wowza_dvr`;
--
## Instruction:
Fix wowza_dvr in itv table
## Code After:
--
ALTER TABLE `storages` ADD `wowza_dvr` tinyint default 0;
ALTER TABLE `storages` CHANGE `flussonic_server` `flussonic_dvr` tinyint default 0;
--//@UNDO
ALTER TABLE `storages` DROP `wowza_dvr`;
ALTER TABLE `storages` CHANGE `flussonic_dvr` `flussonic_server` tinyint default 0;
-- |
a4409967c2f097422dcc6c00e83b210031ccc162 | slushfile.js | slushfile.js | var gulp = require('gulp');
gulp.task('default', function(done){
gulp.src(__dirname + '/template/**')
.pipe(gulp.dest('./'))
.on('end', function () {
done();
});
}); | var gulp = require('gulp');
gulp.task('default', function(done){
gulp.src(__dirname + '/template/**', {dot: true})
.pipe(gulp.dest('./'))
.on('end', function () {
done();
});
}); | Fix for .bowerrc not being copied | Fix for .bowerrc not being copied
| JavaScript | mit | adam-lynch/slush-slides | javascript | ## Code Before:
var gulp = require('gulp');
gulp.task('default', function(done){
gulp.src(__dirname + '/template/**')
.pipe(gulp.dest('./'))
.on('end', function () {
done();
});
});
## Instruction:
Fix for .bowerrc not being copied
## Code After:
var gulp = require('gulp');
gulp.task('default', function(done){
gulp.src(__dirname + '/template/**', {dot: true})
.pipe(gulp.dest('./'))
.on('end', function () {
done();
});
}); |
1ed9001d60282334a47da4083335777af0d9a784 | lib/tentd-admin/views/layout.slim | lib/tentd-admin/views/layout.slim | doctype html
head
meta name="viewport" content="width=device-width, initial-scale=1.0"
link rel="stylesheet" type="text/css" href=asset_path("application.css")
script src=asset_path("application.js")
body
.navbar.navbar-static-top
.navbar-inner
.brand
- if current_user
a href==current_user.entity = current_user.entity.sub(%r{\Ahttps?://([^/]+).*?\z}) { |m| $1 }
- else
a href='https://tent.is' Tent.is
ul.nav
- if current_user
li
a href==current_user.entity Posts
li
a href=full_path('/followers') Followers
li
a href=full_path('/followings') Following
li.active
a href=full_path('/admin') Account
- else
li
a href='https://tent.is/blog' Blog
ul.nav.pull-right
- if current_user
li
a href=full_path('/signout') Signout
- else
li
a href='https://tent.is/login' Login
li
a href='https://tent.is/signup' Signup
.container
== yield
| doctype html
head
meta name="viewport" content="width=device-width, initial-scale=1.0"
link rel="stylesheet" type="text/css" href=asset_path("application.css")
script src=asset_path("application.js")
body
.navbar.navbar-static-top
.navbar-inner
.brand
- if current_user
a href==current_user.entity = current_user.entity.sub(%r{\Ahttps?://([^/]+).*?\z}) { |m| $1 }
- else
a href='https://tent.is' Tent.is
ul.nav
- if current_user
li
a href==current_user.entity Posts
li
a href==full_path("/entities/#{URI.encode_www_form_component(current_user.entity)}") View Profile
li
a href=full_path('/followers') Followers
li
a href=full_path('/followings') Following
li.active
a href=full_path('/admin') Account
- else
li
a href='https://tent.is/blog' Blog
ul.nav.pull-right
- if current_user
li
a href=full_path('/signout') Signout
- else
li
a href='https://tent.is/login' Login
li
a href='https://tent.is/signup' Signup
.container
== yield
| Update nav: add view profile link | Update nav: add view profile link
| Slim | bsd-3-clause | tent/tentd-admin,tent/tentd-admin | slim | ## Code Before:
doctype html
head
meta name="viewport" content="width=device-width, initial-scale=1.0"
link rel="stylesheet" type="text/css" href=asset_path("application.css")
script src=asset_path("application.js")
body
.navbar.navbar-static-top
.navbar-inner
.brand
- if current_user
a href==current_user.entity = current_user.entity.sub(%r{\Ahttps?://([^/]+).*?\z}) { |m| $1 }
- else
a href='https://tent.is' Tent.is
ul.nav
- if current_user
li
a href==current_user.entity Posts
li
a href=full_path('/followers') Followers
li
a href=full_path('/followings') Following
li.active
a href=full_path('/admin') Account
- else
li
a href='https://tent.is/blog' Blog
ul.nav.pull-right
- if current_user
li
a href=full_path('/signout') Signout
- else
li
a href='https://tent.is/login' Login
li
a href='https://tent.is/signup' Signup
.container
== yield
## Instruction:
Update nav: add view profile link
## Code After:
doctype html
head
meta name="viewport" content="width=device-width, initial-scale=1.0"
link rel="stylesheet" type="text/css" href=asset_path("application.css")
script src=asset_path("application.js")
body
.navbar.navbar-static-top
.navbar-inner
.brand
- if current_user
a href==current_user.entity = current_user.entity.sub(%r{\Ahttps?://([^/]+).*?\z}) { |m| $1 }
- else
a href='https://tent.is' Tent.is
ul.nav
- if current_user
li
a href==current_user.entity Posts
li
a href==full_path("/entities/#{URI.encode_www_form_component(current_user.entity)}") View Profile
li
a href=full_path('/followers') Followers
li
a href=full_path('/followings') Following
li.active
a href=full_path('/admin') Account
- else
li
a href='https://tent.is/blog' Blog
ul.nav.pull-right
- if current_user
li
a href=full_path('/signout') Signout
- else
li
a href='https://tent.is/login' Login
li
a href='https://tent.is/signup' Signup
.container
== yield
|
1084db5fd038969673cb1cd9056df58ff2f63556 | lib/aerosol/cli.rb | lib/aerosol/cli.rb | require 'rubygems'
require 'slugger_deploys'
require 'clamp'
class SluggerDeploys::AbstractCommand < Clamp::Command
option ['-f', '--file'], 'FILE', 'deploys file to read', :default => 'deploys.rb', :attribute_name => :file
def execute
if File.exist?(file)
SluggerDeploys.load_file = file
else
raise 'Could not find a deploys file!'
end
end
end
class SluggerDeploys::SshCommand < SluggerDeploys::AbstractCommand
option ['-r', '--run'], :flag, 'run first ssh command', :attribute_name => :run_first
parameter 'DEPLOY', 'the deploy to list commands for', :attribute_name => :deploy_name
def execute
super
if deploy = SluggerDeploys.deploy(deploy_name.to_sym)
ssh_commands = deploy.generate_ssh_commands
raise 'No instances to ssh too!' if ssh_commands.empty?
ssh_commands.each do |ssh_command|
puts ssh_command
end
if run_first?
system(ssh_commands.first)
end
end
end
end
class SluggerDeploys::AutoScalingCommand < SluggerDeploys::AbstractCommand
parameter 'AUTOSCALING_GROUP', 'the auto scaling group to create', :attribute_name => :autoscaling_name
def execute
super
if autoscaling = SluggerDeploys.auto_scaling(autoscaling_name.to_sym)
autoscaling.create
end
end
end
class SluggerDeploys::Cli < SluggerDeploys::AbstractCommand
subcommand ['ssh', 's'], 'Print ssh commands for latest running instances', SluggerDeploys::SshCommand
subcommand ['autoscaling', 'as'], 'Create autoscaling group', SluggerDeploys::AutoScalingCommand
end
| require 'rubygems'
require 'aerosol'
require 'clamp'
class Aerosol::AbstractCommand < Clamp::Command
option ['-f', '--file'], 'FILE', 'aerosol file to read', :default => 'aerosol.rb', :attribute_name => :file
def execute
if File.exist?(file)
Aerosol.load_file = file
else
raise 'Could not find an aerosol file!'
end
end
end
class Aerosol::SshCommand < Aerosol::AbstractCommand
option ['-r', '--run'], :flag, 'run first ssh command', :attribute_name => :run_first
parameter 'DEPLOY', 'the deploy to list commands for', :attribute_name => :deploy_name
def execute
super
if deploy = Aerosol.deploy(deploy_name.to_sym)
ssh_commands = deploy.generate_ssh_commands
raise 'No instances to ssh too!' if ssh_commands.empty?
ssh_commands.each do |ssh_command|
puts ssh_command
end
if run_first?
system(ssh_commands.first)
end
end
end
end
class Aerosol::Cli < Aerosol::AbstractCommand
subcommand ['ssh', 's'], 'Print ssh commands for latest running instances', Aerosol::SshCommand
end
| Switch to Aerosol. Make just SSH for now | Switch to Aerosol. Make just SSH for now
| Ruby | mit | swipely/aerosol | ruby | ## Code Before:
require 'rubygems'
require 'slugger_deploys'
require 'clamp'
class SluggerDeploys::AbstractCommand < Clamp::Command
option ['-f', '--file'], 'FILE', 'deploys file to read', :default => 'deploys.rb', :attribute_name => :file
def execute
if File.exist?(file)
SluggerDeploys.load_file = file
else
raise 'Could not find a deploys file!'
end
end
end
class SluggerDeploys::SshCommand < SluggerDeploys::AbstractCommand
option ['-r', '--run'], :flag, 'run first ssh command', :attribute_name => :run_first
parameter 'DEPLOY', 'the deploy to list commands for', :attribute_name => :deploy_name
def execute
super
if deploy = SluggerDeploys.deploy(deploy_name.to_sym)
ssh_commands = deploy.generate_ssh_commands
raise 'No instances to ssh too!' if ssh_commands.empty?
ssh_commands.each do |ssh_command|
puts ssh_command
end
if run_first?
system(ssh_commands.first)
end
end
end
end
class SluggerDeploys::AutoScalingCommand < SluggerDeploys::AbstractCommand
parameter 'AUTOSCALING_GROUP', 'the auto scaling group to create', :attribute_name => :autoscaling_name
def execute
super
if autoscaling = SluggerDeploys.auto_scaling(autoscaling_name.to_sym)
autoscaling.create
end
end
end
class SluggerDeploys::Cli < SluggerDeploys::AbstractCommand
subcommand ['ssh', 's'], 'Print ssh commands for latest running instances', SluggerDeploys::SshCommand
subcommand ['autoscaling', 'as'], 'Create autoscaling group', SluggerDeploys::AutoScalingCommand
end
## Instruction:
Switch to Aerosol. Make just SSH for now
## Code After:
require 'rubygems'
require 'aerosol'
require 'clamp'
class Aerosol::AbstractCommand < Clamp::Command
option ['-f', '--file'], 'FILE', 'aerosol file to read', :default => 'aerosol.rb', :attribute_name => :file
def execute
if File.exist?(file)
Aerosol.load_file = file
else
raise 'Could not find an aerosol file!'
end
end
end
class Aerosol::SshCommand < Aerosol::AbstractCommand
option ['-r', '--run'], :flag, 'run first ssh command', :attribute_name => :run_first
parameter 'DEPLOY', 'the deploy to list commands for', :attribute_name => :deploy_name
def execute
super
if deploy = Aerosol.deploy(deploy_name.to_sym)
ssh_commands = deploy.generate_ssh_commands
raise 'No instances to ssh too!' if ssh_commands.empty?
ssh_commands.each do |ssh_command|
puts ssh_command
end
if run_first?
system(ssh_commands.first)
end
end
end
end
class Aerosol::Cli < Aerosol::AbstractCommand
subcommand ['ssh', 's'], 'Print ssh commands for latest running instances', Aerosol::SshCommand
end
|
b937b0beb394bf974a3b2232c4060fb11a2d0e70 | yala/setup.cfg | yala/setup.cfg | [yala]
isort args = --recursive --check
pylint args = --msg-template="{path}:{msg} ({msg_id}, {symbol}):{line}:{column}"
radon cc args = --min D
radon mi args = --min D
| [yala]
isort args = --recursive --check
pylint args = --msg-template="{path}:{msg} ({msg_id}, {symbol}):{line}:{column}" --disable=duplicate-code
radon cc args = --min D
radon mi args = --min D
| Disable pylint duplicate code detection | Disable pylint duplicate code detection
It was breaking the parser
| INI | mit | cemsbr/yala,cemsbr/yala | ini | ## Code Before:
[yala]
isort args = --recursive --check
pylint args = --msg-template="{path}:{msg} ({msg_id}, {symbol}):{line}:{column}"
radon cc args = --min D
radon mi args = --min D
## Instruction:
Disable pylint duplicate code detection
It was breaking the parser
## Code After:
[yala]
isort args = --recursive --check
pylint args = --msg-template="{path}:{msg} ({msg_id}, {symbol}):{line}:{column}" --disable=duplicate-code
radon cc args = --min D
radon mi args = --min D
|
2cbb59b035bca222921eaa59f735eb693d9884c6 | src/com/obidea/semantika/cli2/command/CommandFactory.java | src/com/obidea/semantika/cli2/command/CommandFactory.java | package com.obidea.semantika.cli2.command;
public class CommandFactory
{
public static Command create(String command) throws Exception
{
if (command.startsWith(Command.SELECT)) {
return new SelectCommand(command);
}
else if (command.startsWith(Command.SET_PREFIX)) {
return new SetPrefixCommand(command);
}
else if (command.startsWith(Command.SHOW_PREFIXES)) {
return new ShowPrefixesCommand(command);
}
throw new Exception("Unknown command"); //$NON-NLS-1$
}
}
| package com.obidea.semantika.cli2.command;
public class CommandFactory
{
public static Command create(String command) throws Exception
{
if (startsWith(command, Command.SELECT)) {
return new SelectCommand(command);
}
else if (startsWith(command, Command.SET_PREFIX)) {
return new SetPrefixCommand(command);
}
else if (startsWith(command, Command.SHOW_PREFIXES)) {
return new ShowPrefixesCommand(command);
}
throw new Exception("Unknown command"); //$NON-NLS-1$
}
private static boolean startsWith(String command, String keyword)
{
return command.startsWith(keyword) || command.startsWith(keyword.toUpperCase());
}
}
| Set the string comparison to ignore letter cases. | Set the string comparison to ignore letter cases. | Java | apache-2.0 | obidea/semantika-cli2 | java | ## Code Before:
package com.obidea.semantika.cli2.command;
public class CommandFactory
{
public static Command create(String command) throws Exception
{
if (command.startsWith(Command.SELECT)) {
return new SelectCommand(command);
}
else if (command.startsWith(Command.SET_PREFIX)) {
return new SetPrefixCommand(command);
}
else if (command.startsWith(Command.SHOW_PREFIXES)) {
return new ShowPrefixesCommand(command);
}
throw new Exception("Unknown command"); //$NON-NLS-1$
}
}
## Instruction:
Set the string comparison to ignore letter cases.
## Code After:
package com.obidea.semantika.cli2.command;
public class CommandFactory
{
public static Command create(String command) throws Exception
{
if (startsWith(command, Command.SELECT)) {
return new SelectCommand(command);
}
else if (startsWith(command, Command.SET_PREFIX)) {
return new SetPrefixCommand(command);
}
else if (startsWith(command, Command.SHOW_PREFIXES)) {
return new ShowPrefixesCommand(command);
}
throw new Exception("Unknown command"); //$NON-NLS-1$
}
private static boolean startsWith(String command, String keyword)
{
return command.startsWith(keyword) || command.startsWith(keyword.toUpperCase());
}
}
|
f151b399d960a2ed24daf59e00a62f678757b906 | base/src/lib.rs | base/src/lib.rs | extern crate num_traits;
#[macro_use]
extern crate log;
pub mod math;
pub mod world;
| //! Functionality used by both the plantex server and the plantex client.
//!
//! - the `math` module reexports everything from the `cgmath` crate and
//! defines a few own type
//! - the world module is all about saving and managing the game world
//!
extern crate num_traits;
#[macro_use]
extern crate log;
pub mod math;
pub mod world;
| Add a short root module documentation | Add a short root module documentation
| Rust | apache-2.0 | adRichter/plantex,adRichter/plantex | rust | ## Code Before:
extern crate num_traits;
#[macro_use]
extern crate log;
pub mod math;
pub mod world;
## Instruction:
Add a short root module documentation
## Code After:
//! Functionality used by both the plantex server and the plantex client.
//!
//! - the `math` module reexports everything from the `cgmath` crate and
//! defines a few own type
//! - the world module is all about saving and managing the game world
//!
extern crate num_traits;
#[macro_use]
extern crate log;
pub mod math;
pub mod world;
|
ae9b50b72d69a06c47cff0bc78d58346399b65d3 | hdbscan/__init__.py | hdbscan/__init__.py | from .hdbscan_ import HDBSCAN, hdbscan
from .robust_single_linkage_ import RobustSingleLinkage, robust_single_linkage
| from .hdbscan_ import HDBSCAN, hdbscan
from .robust_single_linkage_ import RobustSingleLinkage, robust_single_linkage
from .prediction import approximate_predict, membership_vector, all_points_membership_vectors
| Add prediction functions to imports in init | Add prediction functions to imports in init
| Python | bsd-3-clause | scikit-learn-contrib/hdbscan,lmcinnes/hdbscan,lmcinnes/hdbscan,scikit-learn-contrib/hdbscan | python | ## Code Before:
from .hdbscan_ import HDBSCAN, hdbscan
from .robust_single_linkage_ import RobustSingleLinkage, robust_single_linkage
## Instruction:
Add prediction functions to imports in init
## Code After:
from .hdbscan_ import HDBSCAN, hdbscan
from .robust_single_linkage_ import RobustSingleLinkage, robust_single_linkage
from .prediction import approximate_predict, membership_vector, all_points_membership_vectors
|
f1e1439fa03db342d44eb19a0aafcc6ead54c9b1 | tox.ini | tox.ini | [tox]
envlist = py26,py27,pypy,flake8
skip_missing_interpreters = true
[testenv]
deps = pytest
commands = py.test {posargs}
[testenv:flake8]
deps = flake8
commands = flake8
skip_install = true
[flake8]
ignore = E501
exclude = build,dist,.git,.tox
[pytest]
addopts = --doctest-modules
testpaths = idiokit
| [tox]
envlist = py26,py27,pypy,flake8
skip_missing_interpreters = true
[testenv]
deps = pytest
commands = py.test {posargs}
[testenv:py26]
deps = unittest2
commands = unit2 discover
[testenv:flake8]
deps = flake8
commands = flake8
skip_install = true
[flake8]
ignore = E501,E722
exclude = build,dist,.git,.tox
[pytest]
addopts = --doctest-modules
testpaths = idiokit
| Use unittest2 for py26, ignore E722 for now | Use unittest2 for py26, ignore E722 for now
| INI | mit | abusesa/idiokit | ini | ## Code Before:
[tox]
envlist = py26,py27,pypy,flake8
skip_missing_interpreters = true
[testenv]
deps = pytest
commands = py.test {posargs}
[testenv:flake8]
deps = flake8
commands = flake8
skip_install = true
[flake8]
ignore = E501
exclude = build,dist,.git,.tox
[pytest]
addopts = --doctest-modules
testpaths = idiokit
## Instruction:
Use unittest2 for py26, ignore E722 for now
## Code After:
[tox]
envlist = py26,py27,pypy,flake8
skip_missing_interpreters = true
[testenv]
deps = pytest
commands = py.test {posargs}
[testenv:py26]
deps = unittest2
commands = unit2 discover
[testenv:flake8]
deps = flake8
commands = flake8
skip_install = true
[flake8]
ignore = E501,E722
exclude = build,dist,.git,.tox
[pytest]
addopts = --doctest-modules
testpaths = idiokit
|
18283ab3946dcb899a37aa0c5f33962798e09f50 | src/main/java/quadTree/Rectangle.java | src/main/java/quadTree/Rectangle.java | package quadTree;
public class Rectangle {
public float x1, x2, y1, y2;
public Rectangle() {
this(Float.POSITIVE_INFINITY, Float.POSITIVE_INFINITY, Float.NEGATIVE_INFINITY, Float.NEGATIVE_INFINITY);
};
public Rectangle(float _x1, float _y1, float _x2, float _y2) {
this.x1 = _x1;
this.y1 = _y1;
this.x2 = _x2;
this.y2 = _y2;
}
}
| package quadTree;
public class Rectangle {
public float x1, x2, y1, y2;
public Rectangle() {
this(Float.NEGATIVE_INFINITY, Float.NEGATIVE_INFINITY, Float.POSITIVE_INFINITY, Float.POSITIVE_INFINITY);
};
public Rectangle(float _x1, float _y1, float _x2, float _y2) {
this.x1 = _x1;
this.y1 = _y1;
this.x2 = _x2;
this.y2 = _y2;
}
}
| Update rectangle to make it obvious the expected dimensions. | Update rectangle to make it obvious the expected dimensions.
| Java | mit | smozely/QuadTree,smozely/QuadTree | java | ## Code Before:
package quadTree;
public class Rectangle {
public float x1, x2, y1, y2;
public Rectangle() {
this(Float.POSITIVE_INFINITY, Float.POSITIVE_INFINITY, Float.NEGATIVE_INFINITY, Float.NEGATIVE_INFINITY);
};
public Rectangle(float _x1, float _y1, float _x2, float _y2) {
this.x1 = _x1;
this.y1 = _y1;
this.x2 = _x2;
this.y2 = _y2;
}
}
## Instruction:
Update rectangle to make it obvious the expected dimensions.
## Code After:
package quadTree;
public class Rectangle {
public float x1, x2, y1, y2;
public Rectangle() {
this(Float.NEGATIVE_INFINITY, Float.NEGATIVE_INFINITY, Float.POSITIVE_INFINITY, Float.POSITIVE_INFINITY);
};
public Rectangle(float _x1, float _y1, float _x2, float _y2) {
this.x1 = _x1;
this.y1 = _y1;
this.x2 = _x2;
this.y2 = _y2;
}
}
|
845c6dc392ed034057857abc5a4d814c458d0bbf | app/models/chart.go | app/models/chart.go | package models
import (
"time"
"github.com/jinzhu/now"
"github.com/qor/qor-example/db"
)
type Chart struct {
Total string
Date time.Time
}
/*
date format 2015-01-23
*/
func GetChartData(table, start, end string) (res []Chart) {
startdate, err := time.Parse("2006-01-02", start)
if err != nil {
return
}
enddate, err := time.Parse("2006-01-02", end)
if err != nil || enddate.UnixNano() < startdate.UnixNano() {
enddate = now.EndOfDay()
} else {
enddate.AddDate(0, 0, 1)
}
db.DB.Table(table).Where("created_at > ? AND created_at < ?", startdate, enddate).Select("date(created_at) as date, count(1) as total").Group("date(created_at)").Scan(&res)
return
}
| package models
import (
"time"
"github.com/jinzhu/now"
"github.com/qor/qor-example/db"
)
type Chart struct {
Total string
Date time.Time
}
/*
date format 2015-01-23
*/
func GetChartData(table, start, end string) (res []Chart) {
startdate, err := now.Parse(start)
if err != nil {
return
}
enddate, err := now.Parse(end)
if err != nil || enddate.UnixNano() < startdate.UnixNano() {
enddate = now.EndOfDay()
} else {
enddate.AddDate(0, 0, 1)
}
db.DB.Table(table).Where("created_at > ? AND created_at < ?", startdate, enddate).Select("date(created_at) as date, count(*) as total").Group("date(created_at)").Scan(&res)
return
}
| Fix time zone problem by using now parse time | Fix time zone problem by using now parse time
| Go | mit | firestudios/qor-example,grengojbo/qor-example,qor/qor-example,grengojbo/qor-example,firestudios/qor-example,qor/qor-example,qor/qor-example,grengojbo/qor-example,firestudios/qor-example | go | ## Code Before:
package models
import (
"time"
"github.com/jinzhu/now"
"github.com/qor/qor-example/db"
)
type Chart struct {
Total string
Date time.Time
}
/*
date format 2015-01-23
*/
func GetChartData(table, start, end string) (res []Chart) {
startdate, err := time.Parse("2006-01-02", start)
if err != nil {
return
}
enddate, err := time.Parse("2006-01-02", end)
if err != nil || enddate.UnixNano() < startdate.UnixNano() {
enddate = now.EndOfDay()
} else {
enddate.AddDate(0, 0, 1)
}
db.DB.Table(table).Where("created_at > ? AND created_at < ?", startdate, enddate).Select("date(created_at) as date, count(1) as total").Group("date(created_at)").Scan(&res)
return
}
## Instruction:
Fix time zone problem by using now parse time
## Code After:
package models
import (
"time"
"github.com/jinzhu/now"
"github.com/qor/qor-example/db"
)
type Chart struct {
Total string
Date time.Time
}
/*
date format 2015-01-23
*/
func GetChartData(table, start, end string) (res []Chart) {
startdate, err := now.Parse(start)
if err != nil {
return
}
enddate, err := now.Parse(end)
if err != nil || enddate.UnixNano() < startdate.UnixNano() {
enddate = now.EndOfDay()
} else {
enddate.AddDate(0, 0, 1)
}
db.DB.Table(table).Where("created_at > ? AND created_at < ?", startdate, enddate).Select("date(created_at) as date, count(*) as total").Group("date(created_at)").Scan(&res)
return
}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.