commit stringlengths 40 40 | old_file stringlengths 4 184 | new_file stringlengths 4 184 | old_contents stringlengths 1 3.6k | new_contents stringlengths 5 3.38k | subject stringlengths 15 778 | message stringlengths 16 6.74k | lang stringclasses 201 values | license stringclasses 13 values | repos stringlengths 6 116k | config stringclasses 201 values | content stringlengths 137 7.24k | diff stringlengths 26 5.55k | diff_length int64 1 123 | relative_diff_length float64 0.01 89 | n_lines_added int64 0 108 | n_lines_deleted int64 0 106 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
d130e6373de4b79cd414d6b02e37eecce1aee97d | public/javascripts/app/views/gameController.js | public/javascripts/app/views/gameController.js | define([
'Backbone',
//Templates
'text!templates/project-page/closeGameTemplate.html'
], function(
Backbone,
//Template
closeGameTemplate
){
var GameController = Backbone.View.extend({
template: _.template(closeGameTemplate),
close: function(event){
var task = this.selectedTask.get('id');
socket.emit('close game', task);
},
killTask: function(){
var result = this.selectedTask.get('result');
this.selectedTask.destroy({data: 'result='+result});
},
render: function(){
var estimations = this.selectedTask.get('estimated') || [];
var time = this.selectedTask.get('time');
var total = _.countBy(estimations, function(estimation){
return estimation.card;
});
var max = _.max(total, function(point){return point;});
var result = _.compact(_.map(total, function(count, point){
return count === max ? point : false;
})).pop();
if(!estimations[0]){
estimations.push({
player: 'No one estimated',
card: '?'
});
}
if(time === '0'){
this.killTask();
}
this.selectedTask.set({result: result}, {silent: true});
this.$el.html(this.template({
estimations: estimations,
time: time,
result: result
}));
}
});
return GameController;
});
| define([
'Backbone',
//Templates
'text!templates/project-page/closeGameTemplate.html'
], function(
Backbone,
//Template
closeGameTemplate
){
var GameController = Backbone.View.extend({
template: _.template(closeGameTemplate),
close: function(event){
var task = this.selectedTask.get('id');
socket.emit('close game', task);
},
killTask: function(){
var task = this.selectedTask.get('id');
var kill = _.once(function(){
socket.emit('kill task', task);
});
kill();
},
render: function(){
var estimations = this.selectedTask.get('estimated') || [];
var time = this.selectedTask.get('time');
var total = _.countBy(estimations, function(estimation){
return estimation.card;
});
var max = _.max(total, function(point){return point;});
var result = _.compact(_.map(total, function(count, point){
return count === max ? point : false;
})).pop();
if(!estimations[0]){
estimations.push({
player: 'No one estimated',
card: '?'
});
}
if(time === '0'){
this.killTask();
}
this.selectedTask.set({result: result}, {silent: true});
this.$el.html(this.template({
estimations: estimations,
time: time,
result: result
}));
}
});
return GameController;
});
| Remove the task only once | Remove the task only once
| JavaScript | mit | tangosource/pokerestimate,tangosource/pokerestimate | javascript | ## Code Before:
define([
'Backbone',
//Templates
'text!templates/project-page/closeGameTemplate.html'
], function(
Backbone,
//Template
closeGameTemplate
){
var GameController = Backbone.View.extend({
template: _.template(closeGameTemplate),
close: function(event){
var task = this.selectedTask.get('id');
socket.emit('close game', task);
},
killTask: function(){
var result = this.selectedTask.get('result');
this.selectedTask.destroy({data: 'result='+result});
},
render: function(){
var estimations = this.selectedTask.get('estimated') || [];
var time = this.selectedTask.get('time');
var total = _.countBy(estimations, function(estimation){
return estimation.card;
});
var max = _.max(total, function(point){return point;});
var result = _.compact(_.map(total, function(count, point){
return count === max ? point : false;
})).pop();
if(!estimations[0]){
estimations.push({
player: 'No one estimated',
card: '?'
});
}
if(time === '0'){
this.killTask();
}
this.selectedTask.set({result: result}, {silent: true});
this.$el.html(this.template({
estimations: estimations,
time: time,
result: result
}));
}
});
return GameController;
});
## Instruction:
Remove the task only once
## Code After:
define([
'Backbone',
//Templates
'text!templates/project-page/closeGameTemplate.html'
], function(
Backbone,
//Template
closeGameTemplate
){
var GameController = Backbone.View.extend({
template: _.template(closeGameTemplate),
close: function(event){
var task = this.selectedTask.get('id');
socket.emit('close game', task);
},
killTask: function(){
var task = this.selectedTask.get('id');
var kill = _.once(function(){
socket.emit('kill task', task);
});
kill();
},
render: function(){
var estimations = this.selectedTask.get('estimated') || [];
var time = this.selectedTask.get('time');
var total = _.countBy(estimations, function(estimation){
return estimation.card;
});
var max = _.max(total, function(point){return point;});
var result = _.compact(_.map(total, function(count, point){
return count === max ? point : false;
})).pop();
if(!estimations[0]){
estimations.push({
player: 'No one estimated',
card: '?'
});
}
if(time === '0'){
this.killTask();
}
this.selectedTask.set({result: result}, {silent: true});
this.$el.html(this.template({
estimations: estimations,
time: time,
result: result
}));
}
});
return GameController;
});
| define([
'Backbone',
//Templates
'text!templates/project-page/closeGameTemplate.html'
], function(
Backbone,
//Template
closeGameTemplate
){
var GameController = Backbone.View.extend({
template: _.template(closeGameTemplate),
close: function(event){
var task = this.selectedTask.get('id');
socket.emit('close game', task);
},
killTask: function(){
- var result = this.selectedTask.get('result');
? ^^ ^^^ ^^^^^^
+ var task = this.selectedTask.get('id');
? ^^ ^ ^^
- this.selectedTask.destroy({data: 'result='+result});
+ var kill = _.once(function(){
+ socket.emit('kill task', task);
+ });
+
+ kill();
},
render: function(){
var estimations = this.selectedTask.get('estimated') || [];
var time = this.selectedTask.get('time');
var total = _.countBy(estimations, function(estimation){
return estimation.card;
});
var max = _.max(total, function(point){return point;});
var result = _.compact(_.map(total, function(count, point){
return count === max ? point : false;
})).pop();
if(!estimations[0]){
estimations.push({
player: 'No one estimated',
card: '?'
});
}
if(time === '0'){
this.killTask();
}
this.selectedTask.set({result: result}, {silent: true});
this.$el.html(this.template({
estimations: estimations,
time: time,
result: result
}));
}
});
return GameController;
}); | 8 | 0.121212 | 6 | 2 |
d782fe331dfbbf1c2cce88bd1dca1fd20131a374 | tests/test_helpers.sh | tests/test_helpers.sh |
readonly NORMAL=$(printf '\033[0m')
readonly BOLD=$(printf '\033[1m')
readonly RED=$(printf '\033[31m')
readonly GREEN=$(printf '\033[32m')
readonly ORANGE=$(printf '\033[33m')
function log_test()
{
echo -n "${BOLD}$1${NORMAL} ... "
}
function log_passed()
{
echo "${BOLD}${GREEN}✔ Passed${NORMAL}"
}
function log_failed()
{
echo "${BOLD}${RED}✘ Failed${NORMAL}"
}
source /usr/share/yunohost/helpers
for TEST_SUITE in $(ls test_helpers.d/*)
do
source $TEST_SUITE
done
TESTS=$(declare -F | grep ' ynhtest_' | awk '{print $3}')
for TEST in $TESTS
do
log_test $TEST
cd $(mktemp -d)
(app=ynhtest
YNH_APP_ID=$app
mkdir scripts
cd scripts
set -eu
$TEST
) > ./test.log 2>&1 \
&& log_passed \
|| { echo -e "\n----------"; cat ./test.log; echo -e "----------"; log_failed; }
done
|
readonly NORMAL=$(printf '\033[0m')
readonly BOLD=$(printf '\033[1m')
readonly RED=$(printf '\033[31m')
readonly GREEN=$(printf '\033[32m')
readonly ORANGE=$(printf '\033[33m')
function log_test()
{
echo -n "${BOLD}$1${NORMAL} ... "
}
function log_passed()
{
echo "${BOLD}${GREEN}✔ Passed${NORMAL}"
}
function log_failed()
{
echo "${BOLD}${RED}✘ Failed${NORMAL}"
}
source /usr/share/yunohost/helpers
for TEST_SUITE in $(ls test_helpers.d/*)
do
source $TEST_SUITE
done
TESTS=$(declare -F | grep ' ynhtest_' | awk '{print $3}')
global_result=0
for TEST in $TESTS
do
log_test $TEST
cd $(mktemp -d)
(app=ynhtest
YNH_APP_ID=$app
mkdir scripts
cd scripts
set -eu
$TEST
) > ./test.log 2>&1 \
&& log_passed \
|| { echo -e "\n----------"; cat ./test.log; echo -e "----------"; log_failed; global_result=1; }
done
exit $global_result
| Return exit code 1 when at least one test failed | Return exit code 1 when at least one test failed
| Shell | agpl-3.0 | YunoHost/moulinette-yunohost,YunoHost/yunohost,YunoHost/moulinette-yunohost,YunoHost/moulinette-yunohost,YunoHost/yunohost,YunoHost/yunohost,YunoHost/yunohost,YunoHost/moulinette-yunohost,YunoHost/moulinette-yunohost | shell | ## Code Before:
readonly NORMAL=$(printf '\033[0m')
readonly BOLD=$(printf '\033[1m')
readonly RED=$(printf '\033[31m')
readonly GREEN=$(printf '\033[32m')
readonly ORANGE=$(printf '\033[33m')
function log_test()
{
echo -n "${BOLD}$1${NORMAL} ... "
}
function log_passed()
{
echo "${BOLD}${GREEN}✔ Passed${NORMAL}"
}
function log_failed()
{
echo "${BOLD}${RED}✘ Failed${NORMAL}"
}
source /usr/share/yunohost/helpers
for TEST_SUITE in $(ls test_helpers.d/*)
do
source $TEST_SUITE
done
TESTS=$(declare -F | grep ' ynhtest_' | awk '{print $3}')
for TEST in $TESTS
do
log_test $TEST
cd $(mktemp -d)
(app=ynhtest
YNH_APP_ID=$app
mkdir scripts
cd scripts
set -eu
$TEST
) > ./test.log 2>&1 \
&& log_passed \
|| { echo -e "\n----------"; cat ./test.log; echo -e "----------"; log_failed; }
done
## Instruction:
Return exit code 1 when at least one test failed
## Code After:
readonly NORMAL=$(printf '\033[0m')
readonly BOLD=$(printf '\033[1m')
readonly RED=$(printf '\033[31m')
readonly GREEN=$(printf '\033[32m')
readonly ORANGE=$(printf '\033[33m')
function log_test()
{
echo -n "${BOLD}$1${NORMAL} ... "
}
function log_passed()
{
echo "${BOLD}${GREEN}✔ Passed${NORMAL}"
}
function log_failed()
{
echo "${BOLD}${RED}✘ Failed${NORMAL}"
}
source /usr/share/yunohost/helpers
for TEST_SUITE in $(ls test_helpers.d/*)
do
source $TEST_SUITE
done
TESTS=$(declare -F | grep ' ynhtest_' | awk '{print $3}')
global_result=0
for TEST in $TESTS
do
log_test $TEST
cd $(mktemp -d)
(app=ynhtest
YNH_APP_ID=$app
mkdir scripts
cd scripts
set -eu
$TEST
) > ./test.log 2>&1 \
&& log_passed \
|| { echo -e "\n----------"; cat ./test.log; echo -e "----------"; log_failed; global_result=1; }
done
exit $global_result
|
readonly NORMAL=$(printf '\033[0m')
readonly BOLD=$(printf '\033[1m')
readonly RED=$(printf '\033[31m')
readonly GREEN=$(printf '\033[32m')
readonly ORANGE=$(printf '\033[33m')
function log_test()
{
echo -n "${BOLD}$1${NORMAL} ... "
}
function log_passed()
{
echo "${BOLD}${GREEN}✔ Passed${NORMAL}"
}
function log_failed()
{
echo "${BOLD}${RED}✘ Failed${NORMAL}"
}
source /usr/share/yunohost/helpers
for TEST_SUITE in $(ls test_helpers.d/*)
do
source $TEST_SUITE
done
TESTS=$(declare -F | grep ' ynhtest_' | awk '{print $3}')
+ global_result=0
+
for TEST in $TESTS
do
log_test $TEST
cd $(mktemp -d)
(app=ynhtest
YNH_APP_ID=$app
mkdir scripts
cd scripts
set -eu
$TEST
) > ./test.log 2>&1 \
&& log_passed \
- || { echo -e "\n----------"; cat ./test.log; echo -e "----------"; log_failed; }
+ || { echo -e "\n----------"; cat ./test.log; echo -e "----------"; log_failed; global_result=1; }
? ++++++++++++++++
done
+
+ exit $global_result | 6 | 0.136364 | 5 | 1 |
28900b2ab84c7a3bd126053efe7c0162caa9fe44 | src/picker.js | src/picker.js |
var Picker = function(context) {
this.context = context;
}
Picker.prototype = {
pick: function(node, x, y, lx, ly) {
var ctx = this.context;
var tx = node.x || 0;
var ty = node.y || 0;
ctx.save();
ctx.translate(tx, ty);
// Apply transform to local coordinate values
lx -= tx;
ly -= ty;
var result = node.pick(ctx, x, y, lx, ly);
if (result) {
return node;
}
if (node.children) {
for (var i=node.children.length-1; i>=0; i--) {
result = this.pick(node.children[i], x, y, lx, ly);
if (result) {
break;
}
}
}
ctx.restore();
return result;
}
};
module.exports = Picker; |
var Picker = function(context) {
this.context = context;
}
Picker.prototype = {
pick: function(node, x, y, lx, ly) {
var ctx = this.context;
var tx = node.x || 0;
var ty = node.y || 0;
ctx.save();
ctx.translate(tx, ty);
// Apply transform to local coordinate values
lx -= tx;
ly -= ty;
var result = node.pick(ctx, x, y, lx, ly) && node;
if (!result && node.children) {
for (var i=node.children.length-1; i>=0; i--) {
result = this.pick(node.children[i], x, y, lx, ly);
if (result) {
break;
}
}
}
ctx.restore();
return result;
}
};
module.exports = Picker; | Fix early return failure to reset context | Fix early return failure to reset context
| JavaScript | mit | unchartedsoftware/pathjs | javascript | ## Code Before:
var Picker = function(context) {
this.context = context;
}
Picker.prototype = {
pick: function(node, x, y, lx, ly) {
var ctx = this.context;
var tx = node.x || 0;
var ty = node.y || 0;
ctx.save();
ctx.translate(tx, ty);
// Apply transform to local coordinate values
lx -= tx;
ly -= ty;
var result = node.pick(ctx, x, y, lx, ly);
if (result) {
return node;
}
if (node.children) {
for (var i=node.children.length-1; i>=0; i--) {
result = this.pick(node.children[i], x, y, lx, ly);
if (result) {
break;
}
}
}
ctx.restore();
return result;
}
};
module.exports = Picker;
## Instruction:
Fix early return failure to reset context
## Code After:
var Picker = function(context) {
this.context = context;
}
Picker.prototype = {
pick: function(node, x, y, lx, ly) {
var ctx = this.context;
var tx = node.x || 0;
var ty = node.y || 0;
ctx.save();
ctx.translate(tx, ty);
// Apply transform to local coordinate values
lx -= tx;
ly -= ty;
var result = node.pick(ctx, x, y, lx, ly) && node;
if (!result && node.children) {
for (var i=node.children.length-1; i>=0; i--) {
result = this.pick(node.children[i], x, y, lx, ly);
if (result) {
break;
}
}
}
ctx.restore();
return result;
}
};
module.exports = Picker; |
var Picker = function(context) {
this.context = context;
}
Picker.prototype = {
pick: function(node, x, y, lx, ly) {
var ctx = this.context;
var tx = node.x || 0;
var ty = node.y || 0;
ctx.save();
ctx.translate(tx, ty);
// Apply transform to local coordinate values
lx -= tx;
ly -= ty;
- var result = node.pick(ctx, x, y, lx, ly);
+ var result = node.pick(ctx, x, y, lx, ly) && node;
? ++++++++
- if (result) {
- return node;
- }
- if (node.children) {
+ if (!result && node.children) {
? +++++++++++
for (var i=node.children.length-1; i>=0; i--) {
result = this.pick(node.children[i], x, y, lx, ly);
if (result) {
break;
}
}
}
ctx.restore();
return result;
}
};
module.exports = Picker; | 7 | 0.170732 | 2 | 5 |
bb68475dbb2a4b33d2ac382fa0f1f697b9038adb | services/QuillDiagnostic/app/components/eslDiagnostic/titleCard.tsx | services/QuillDiagnostic/app/components/eslDiagnostic/titleCard.tsx | import React, { Component } from 'react';
const beginArrow = 'https://assets.quill.org/images/icons/begin_arrow.svg';
import translations from '../../libs/translations/index.js';
class TitleCard extends Component {
getContentHTML() {
let html = this.props.data.content ? this.props.data.content : translations.english[this.props.data.key];
if (this.props.language !== 'english') {
const textClass = this.props.language === 'arabic' ? 'right-to-left arabic-title-div' : '';
html += `<br/><div class="${textClass}">${translations[this.props.language][this.props.data.key]}</div>`;
}
return html;
}
getButtonText() {
let text = translations.english['continue button text']
if (this.props.language !== 'english') {
text += ` / ${translations[this.props.language]['continue button text']}`
}
return text
}
render() {
return (
<div className="landing-page">
<div className="landing-page-html" dangerouslySetInnerHTML={{ __html: this.getContentHTML(), }} />
<button className="button student-begin" onClick={this.props.nextQuestion}>
{this.getButtonText()}
<img className="begin-arrow" src={beginArrow} />
</button>
</div>
);
}
}
export default TitleCard;
| import React, { Component } from 'react';
const beginArrow = 'https://assets.quill.org/images/icons/begin_arrow.svg';
import translations from '../../libs/translations/index.js';
export interface ComponentProps {
data: any
language: string
nextQuestion(): void
}
class TitleCard extends Component<ComponentProps, any> {
getContentHTML() {
let html = this.props.data.content ? this.props.data.content : translations.english[this.props.data.key];
if (this.props.language !== 'english') {
const textClass = this.props.language === 'arabic' ? 'right-to-left arabic-title-div' : '';
html += `<br/><div class="${textClass}">${translations[this.props.language][this.props.data.key]}</div>`;
}
return html;
}
getButtonText() {
let text = translations.english['continue button text']
if (this.props.language !== 'english') {
text += ` / ${translations[this.props.language]['continue button text']}`
}
return text
}
render() {
return (
<div className="landing-page">
<div className="landing-page-html" dangerouslySetInnerHTML={{ __html: this.getContentHTML(), }} />
<button className="button student-begin" onClick={this.props.nextQuestion}>
{this.getButtonText()}
<img className="begin-arrow" src={beginArrow} />
</button>
</div>
);
}
}
export default TitleCard;
| Add prop declaration for titlecard tsx in esl diagnostic | Add prop declaration for titlecard tsx in esl diagnostic
| TypeScript | agpl-3.0 | empirical-org/Empirical-Core,empirical-org/Empirical-Core,empirical-org/Empirical-Core,empirical-org/Empirical-Core,empirical-org/Empirical-Core,empirical-org/Empirical-Core,empirical-org/Empirical-Core | typescript | ## Code Before:
import React, { Component } from 'react';
const beginArrow = 'https://assets.quill.org/images/icons/begin_arrow.svg';
import translations from '../../libs/translations/index.js';
class TitleCard extends Component {
getContentHTML() {
let html = this.props.data.content ? this.props.data.content : translations.english[this.props.data.key];
if (this.props.language !== 'english') {
const textClass = this.props.language === 'arabic' ? 'right-to-left arabic-title-div' : '';
html += `<br/><div class="${textClass}">${translations[this.props.language][this.props.data.key]}</div>`;
}
return html;
}
getButtonText() {
let text = translations.english['continue button text']
if (this.props.language !== 'english') {
text += ` / ${translations[this.props.language]['continue button text']}`
}
return text
}
render() {
return (
<div className="landing-page">
<div className="landing-page-html" dangerouslySetInnerHTML={{ __html: this.getContentHTML(), }} />
<button className="button student-begin" onClick={this.props.nextQuestion}>
{this.getButtonText()}
<img className="begin-arrow" src={beginArrow} />
</button>
</div>
);
}
}
export default TitleCard;
## Instruction:
Add prop declaration for titlecard tsx in esl diagnostic
## Code After:
import React, { Component } from 'react';
const beginArrow = 'https://assets.quill.org/images/icons/begin_arrow.svg';
import translations from '../../libs/translations/index.js';
export interface ComponentProps {
data: any
language: string
nextQuestion(): void
}
class TitleCard extends Component<ComponentProps, any> {
getContentHTML() {
let html = this.props.data.content ? this.props.data.content : translations.english[this.props.data.key];
if (this.props.language !== 'english') {
const textClass = this.props.language === 'arabic' ? 'right-to-left arabic-title-div' : '';
html += `<br/><div class="${textClass}">${translations[this.props.language][this.props.data.key]}</div>`;
}
return html;
}
getButtonText() {
let text = translations.english['continue button text']
if (this.props.language !== 'english') {
text += ` / ${translations[this.props.language]['continue button text']}`
}
return text
}
render() {
return (
<div className="landing-page">
<div className="landing-page-html" dangerouslySetInnerHTML={{ __html: this.getContentHTML(), }} />
<button className="button student-begin" onClick={this.props.nextQuestion}>
{this.getButtonText()}
<img className="begin-arrow" src={beginArrow} />
</button>
</div>
);
}
}
export default TitleCard;
| import React, { Component } from 'react';
const beginArrow = 'https://assets.quill.org/images/icons/begin_arrow.svg';
import translations from '../../libs/translations/index.js';
+ export interface ComponentProps {
+ data: any
+ language: string
+ nextQuestion(): void
+ }
+
- class TitleCard extends Component {
+ class TitleCard extends Component<ComponentProps, any> {
? +++++++++++++++++++++
getContentHTML() {
let html = this.props.data.content ? this.props.data.content : translations.english[this.props.data.key];
if (this.props.language !== 'english') {
const textClass = this.props.language === 'arabic' ? 'right-to-left arabic-title-div' : '';
html += `<br/><div class="${textClass}">${translations[this.props.language][this.props.data.key]}</div>`;
}
return html;
}
getButtonText() {
let text = translations.english['continue button text']
if (this.props.language !== 'english') {
text += ` / ${translations[this.props.language]['continue button text']}`
}
return text
}
render() {
return (
<div className="landing-page">
<div className="landing-page-html" dangerouslySetInnerHTML={{ __html: this.getContentHTML(), }} />
<button className="button student-begin" onClick={this.props.nextQuestion}>
{this.getButtonText()}
<img className="begin-arrow" src={beginArrow} />
</button>
</div>
);
}
}
export default TitleCard; | 8 | 0.216216 | 7 | 1 |
3c2abfb72e4c72883484b56960751796bf63ca04 | examples/pushjournal.yml | examples/pushjournal.yml | notifiers:
- type: pushbullet
key: "myapikey"
prepend_hostname: true
- type: smtp
host: smtp.mailgun.org
port: 587
use_tls: true
user: postmaster@mgmydomain.com.
password: mymailgunpassword
from: "Hostname <hostname@mydomain.com>"
to:
- admin@mydomain.com
filters:
- match: "\\[(.*?)\\] Peer Connection Initiated with \\[AF_INET\\](.+)"
title: "OpenVPN Login"
body: "{0} logged in from {1}"
- match: "Accepted publickey for (.*?) from (.*?) port (.*?) "
title: "SSH Login"
body: "Public key login of {0} from {1}:{2}"
notify_boot: true
| notifiers:
- type: pushbullet
key: "myapikey"
prepend_hostname: true
- type: smtp
host: smtp.mailgun.org
port: 587
use_tls: true
user: postmaster@mgmydomain.com.
password: mymailgunpassword
from: "Hostname <hostname@mydomain.com>"
to:
- admin@mydomain.com
filters:
- match: "\\[(.*?)\\] Peer Connection Initiated with \\[AF_INET\\](.+)"
title: "OpenVPN Login"
body: "{0} logged in from {1}"
- match: "Accepted publickey for (.*?) from (.*?) port (.*?) "
title: "SSH Login"
body: "Public key login of {0} from {1}:{2}"
notify_boot: true
show_public_ip: true # show the public IP address on boot notification
show_local_ips: true # show the list of local IP addresses on boot notification
| Add show_public_ip and show_local_ips to the example configuration file | Add show_public_ip and show_local_ips to the example configuration file
| YAML | bsd-3-clause | r-darwish/pushjournal | yaml | ## Code Before:
notifiers:
- type: pushbullet
key: "myapikey"
prepend_hostname: true
- type: smtp
host: smtp.mailgun.org
port: 587
use_tls: true
user: postmaster@mgmydomain.com.
password: mymailgunpassword
from: "Hostname <hostname@mydomain.com>"
to:
- admin@mydomain.com
filters:
- match: "\\[(.*?)\\] Peer Connection Initiated with \\[AF_INET\\](.+)"
title: "OpenVPN Login"
body: "{0} logged in from {1}"
- match: "Accepted publickey for (.*?) from (.*?) port (.*?) "
title: "SSH Login"
body: "Public key login of {0} from {1}:{2}"
notify_boot: true
## Instruction:
Add show_public_ip and show_local_ips to the example configuration file
## Code After:
notifiers:
- type: pushbullet
key: "myapikey"
prepend_hostname: true
- type: smtp
host: smtp.mailgun.org
port: 587
use_tls: true
user: postmaster@mgmydomain.com.
password: mymailgunpassword
from: "Hostname <hostname@mydomain.com>"
to:
- admin@mydomain.com
filters:
- match: "\\[(.*?)\\] Peer Connection Initiated with \\[AF_INET\\](.+)"
title: "OpenVPN Login"
body: "{0} logged in from {1}"
- match: "Accepted publickey for (.*?) from (.*?) port (.*?) "
title: "SSH Login"
body: "Public key login of {0} from {1}:{2}"
notify_boot: true
show_public_ip: true # show the public IP address on boot notification
show_local_ips: true # show the list of local IP addresses on boot notification
| notifiers:
- type: pushbullet
key: "myapikey"
prepend_hostname: true
- type: smtp
host: smtp.mailgun.org
port: 587
use_tls: true
user: postmaster@mgmydomain.com.
password: mymailgunpassword
from: "Hostname <hostname@mydomain.com>"
to:
- admin@mydomain.com
filters:
- match: "\\[(.*?)\\] Peer Connection Initiated with \\[AF_INET\\](.+)"
title: "OpenVPN Login"
body: "{0} logged in from {1}"
- match: "Accepted publickey for (.*?) from (.*?) port (.*?) "
title: "SSH Login"
body: "Public key login of {0} from {1}:{2}"
notify_boot: true
+ show_public_ip: true # show the public IP address on boot notification
+ show_local_ips: true # show the list of local IP addresses on boot notification | 2 | 0.095238 | 2 | 0 |
3fd033a0e5230085f1d75726ab4b18b88304982d | Cargo.toml | Cargo.toml | [package]
authors = ["Amelorate <ameilorate2@gmail.com>"]
description = "Serializes and psudo-deserializes structs implementing the Error trait."
license = "MIT"
name = "errorser"
readme = "README.md"
repository = "https://github.com/Ameliorate/errorser"
version = "1.0.1"
[dependencies]
bincode = "0.4.0"
clippy = "0.0.37"
rustc-serialize = "0.3.16"
serde = "0.6.11"
serde_json = "0.6.0"
serde_macros = "0.6.11"
| [package]
authors = ["Amelorate <ameilorate2@gmail.com>"]
description = "Serializes and psudo-deserializes structs implementing the Error trait."
license = "MIT"
name = "errorser"
readme = "README.md"
repository = "https://github.com/Ameliorate/errorser"
documentation = "https://crates.fyi/crates/errorser/"v
version = "1.0.1"
[dependencies]
bincode = "0.4.0"
clippy = "0.0.37"
rustc-serialize = "0.3.16"
serde = "0.6.11"
serde_json = "0.6.0"
serde_macros = "0.6.11"
| Add documentation link to cargo.toml | Add documentation link to cargo.toml
| TOML | mit | Ameliorate/errorser | toml | ## Code Before:
[package]
authors = ["Amelorate <ameilorate2@gmail.com>"]
description = "Serializes and psudo-deserializes structs implementing the Error trait."
license = "MIT"
name = "errorser"
readme = "README.md"
repository = "https://github.com/Ameliorate/errorser"
version = "1.0.1"
[dependencies]
bincode = "0.4.0"
clippy = "0.0.37"
rustc-serialize = "0.3.16"
serde = "0.6.11"
serde_json = "0.6.0"
serde_macros = "0.6.11"
## Instruction:
Add documentation link to cargo.toml
## Code After:
[package]
authors = ["Amelorate <ameilorate2@gmail.com>"]
description = "Serializes and psudo-deserializes structs implementing the Error trait."
license = "MIT"
name = "errorser"
readme = "README.md"
repository = "https://github.com/Ameliorate/errorser"
documentation = "https://crates.fyi/crates/errorser/"v
version = "1.0.1"
[dependencies]
bincode = "0.4.0"
clippy = "0.0.37"
rustc-serialize = "0.3.16"
serde = "0.6.11"
serde_json = "0.6.0"
serde_macros = "0.6.11"
| [package]
authors = ["Amelorate <ameilorate2@gmail.com>"]
description = "Serializes and psudo-deserializes structs implementing the Error trait."
license = "MIT"
name = "errorser"
readme = "README.md"
repository = "https://github.com/Ameliorate/errorser"
+ documentation = "https://crates.fyi/crates/errorser/"v
version = "1.0.1"
[dependencies]
bincode = "0.4.0"
clippy = "0.0.37"
rustc-serialize = "0.3.16"
serde = "0.6.11"
serde_json = "0.6.0"
serde_macros = "0.6.11" | 1 | 0.0625 | 1 | 0 |
cd5d5f8e0f5d94c2ebde3de9789ee80fb54c7949 | contrib/reference_template.json | contrib/reference_template.json | {
"/static/tool_js_booth.js" : null,
"/static/tool_js_credgen.js" : null,
"/static/tool_js.js" : null,
"/static/tool_js_pd.js" : null,
"/static/tool_js_questions.js" : null,
"/static/tool_js_shuffle.js" : null,
"/static/tool_js_tkeygen.js" : null,
"/static/tool_js_ttkeygen.js" : null,
"/static/booth.css" : null,
"/static/reset.css" : null,
"/static/site.css" : null,
"/static/style.css" : null,
"/static/styled-elements.css" : null,
"/static/superfish.css" : null,
"/static/encrypting.gif" : null,
"/static/logo.png" : null,
"/static/placeholder.png" : null,
"/vote.html" : {
"fr" : null,
"en" : null,
"de" : null,
"it" : null,
"ro" : null
}
}
| {
"/static/tool_js_booth.js" : null,
"/static/tool_js_credgen.js" : null,
"/static/tool_js.js" : null,
"/static/tool_js_pd.js" : null,
"/static/tool_js_questions.js" : null,
"/static/tool_js_shuffle.js" : null,
"/static/tool_js_tkeygen.js" : null,
"/static/tool_js_ttkeygen.js" : null,
"/static/booth.css" : null,
"/static/reset.css" : null,
"/static/site.css" : null,
"/static/style.css" : null,
"/static/styled-elements.css" : null,
"/static/superfish.css" : null,
"/static/encrypting.gif" : null,
"/static/logo.png" : null,
"/static/placeholder.png" : null,
"/vote.html" : {
"fr" : null,
"en" : null,
"de" : null,
"it" : null,
"ro" : null,
"nb" : null,
"es" : null,
"uk" : null,
"cs" : null,
"oc" : null,
"pt_BR" : null
}
}
| Update list of languages to monitor | Update list of languages to monitor
| JSON | agpl-3.0 | glondu/belenios,glondu/belenios,glondu/belenios,glondu/belenios,glondu/belenios | json | ## Code Before:
{
"/static/tool_js_booth.js" : null,
"/static/tool_js_credgen.js" : null,
"/static/tool_js.js" : null,
"/static/tool_js_pd.js" : null,
"/static/tool_js_questions.js" : null,
"/static/tool_js_shuffle.js" : null,
"/static/tool_js_tkeygen.js" : null,
"/static/tool_js_ttkeygen.js" : null,
"/static/booth.css" : null,
"/static/reset.css" : null,
"/static/site.css" : null,
"/static/style.css" : null,
"/static/styled-elements.css" : null,
"/static/superfish.css" : null,
"/static/encrypting.gif" : null,
"/static/logo.png" : null,
"/static/placeholder.png" : null,
"/vote.html" : {
"fr" : null,
"en" : null,
"de" : null,
"it" : null,
"ro" : null
}
}
## Instruction:
Update list of languages to monitor
## Code After:
{
"/static/tool_js_booth.js" : null,
"/static/tool_js_credgen.js" : null,
"/static/tool_js.js" : null,
"/static/tool_js_pd.js" : null,
"/static/tool_js_questions.js" : null,
"/static/tool_js_shuffle.js" : null,
"/static/tool_js_tkeygen.js" : null,
"/static/tool_js_ttkeygen.js" : null,
"/static/booth.css" : null,
"/static/reset.css" : null,
"/static/site.css" : null,
"/static/style.css" : null,
"/static/styled-elements.css" : null,
"/static/superfish.css" : null,
"/static/encrypting.gif" : null,
"/static/logo.png" : null,
"/static/placeholder.png" : null,
"/vote.html" : {
"fr" : null,
"en" : null,
"de" : null,
"it" : null,
"ro" : null,
"nb" : null,
"es" : null,
"uk" : null,
"cs" : null,
"oc" : null,
"pt_BR" : null
}
}
| {
"/static/tool_js_booth.js" : null,
"/static/tool_js_credgen.js" : null,
"/static/tool_js.js" : null,
"/static/tool_js_pd.js" : null,
"/static/tool_js_questions.js" : null,
"/static/tool_js_shuffle.js" : null,
"/static/tool_js_tkeygen.js" : null,
"/static/tool_js_ttkeygen.js" : null,
"/static/booth.css" : null,
"/static/reset.css" : null,
"/static/site.css" : null,
"/static/style.css" : null,
"/static/styled-elements.css" : null,
"/static/superfish.css" : null,
"/static/encrypting.gif" : null,
"/static/logo.png" : null,
"/static/placeholder.png" : null,
"/vote.html" : {
"fr" : null,
"en" : null,
"de" : null,
"it" : null,
- "ro" : null
+ "ro" : null,
? +
+ "nb" : null,
+ "es" : null,
+ "uk" : null,
+ "cs" : null,
+ "oc" : null,
+ "pt_BR" : null
}
} | 8 | 0.307692 | 7 | 1 |
cf22f4d3dcfa4dbf7fd89b83f8dc3aa6a31b48d5 | src/PushAPI_Get.php | src/PushAPI_Get.php | <?php
/**
* @file
* GET Apple News Article.
*/
namespace ChapterThree\AppleNews;
/**
* Document me.
*/
class PushAPI_Get extends PushAPI_Base {
protected function Debug($response) {
print_r($response);exit;
}
}
| <?php
/**
* @file
* GET Apple News Article.
*/
namespace ChapterThree\AppleNews;
/**
* Document me.
*/
class PushAPI_Get extends PushAPI_Base {
}
| Remove debugging from GET method. | Remove debugging from GET method.
| PHP | mit | chapter-three/AppleNewsAPI | php | ## Code Before:
<?php
/**
* @file
* GET Apple News Article.
*/
namespace ChapterThree\AppleNews;
/**
* Document me.
*/
class PushAPI_Get extends PushAPI_Base {
protected function Debug($response) {
print_r($response);exit;
}
}
## Instruction:
Remove debugging from GET method.
## Code After:
<?php
/**
* @file
* GET Apple News Article.
*/
namespace ChapterThree\AppleNews;
/**
* Document me.
*/
class PushAPI_Get extends PushAPI_Base {
}
| <?php
/**
* @file
* GET Apple News Article.
*/
namespace ChapterThree\AppleNews;
/**
* Document me.
*/
class PushAPI_Get extends PushAPI_Base {
- protected function Debug($response) {
- print_r($response);exit;
- }
-
} | 4 | 0.210526 | 0 | 4 |
fbfa39a31fd0d05c4a75a4f164852f4a9029cbf6 | apply.sh | apply.sh | set -e
# make sure modules are installed.
bundle exec librarian-puppet install
# run rake tasks
bundle exec rake
# apply stuff
sudo puppet apply --hiera_config=hiera.yaml --modulepath=modules:vendor/modules manifests/site.pp
| set -e
# make sure we have gems installed
bundle install
# make sure modules are installed.
bundle exec librarian-puppet install
# run rake tasks
bundle exec rake
# apply stuff
sudo puppet apply --hiera_config=hiera.yaml --modulepath=modules:vendor/modules manifests/site.pp
| Make sure gems are installed. | Make sure gems are installed.
| Shell | mit | rjw1/randomness-puppet,rjw1/randomness-puppet | shell | ## Code Before:
set -e
# make sure modules are installed.
bundle exec librarian-puppet install
# run rake tasks
bundle exec rake
# apply stuff
sudo puppet apply --hiera_config=hiera.yaml --modulepath=modules:vendor/modules manifests/site.pp
## Instruction:
Make sure gems are installed.
## Code After:
set -e
# make sure we have gems installed
bundle install
# make sure modules are installed.
bundle exec librarian-puppet install
# run rake tasks
bundle exec rake
# apply stuff
sudo puppet apply --hiera_config=hiera.yaml --modulepath=modules:vendor/modules manifests/site.pp
| set -e
+
+ # make sure we have gems installed
+ bundle install
# make sure modules are installed.
bundle exec librarian-puppet install
# run rake tasks
bundle exec rake
# apply stuff
sudo puppet apply --hiera_config=hiera.yaml --modulepath=modules:vendor/modules manifests/site.pp | 3 | 0.3 | 3 | 0 |
f9dd3e3a77e4d86ea8e3e3aa495fc0798f34936a | lib/textmarker.dart | lib/textmarker.dart | library textmarker;
import 'dart:html';
class TextMarker {
String targettext;
int startposition;
int endposition;
String textState; // were characters from start to end position typed correctly.
TextMarker(this.targettext,this.startposition, this.endposition,this.textState);
SpanElement textSpan(int start,end, String classname) {
var span = new SpanElement()
..classes.add(classname)
..text = targettext.substring(start,end);
return span;
}
}
| library textmarker;
import 'dart:html';
class TextMarker {
String targettext;
int startposition;
int endposition;
String textState; // were characters from start to end position typed correctly.
TextMarker(this.targettext,this.startposition, this.endposition,this.textState);
SpanElement textSpan(int start,end, String classname) {
var span = new SpanElement()
..classes.add(classname)
..text = targettext.substring(start,end);
return span;
}
SpanElement typedCorrectly(int start,end) {
return textSpan(start,end, 'typedcorrect');
}
SpanElement typedIncorrectly(int start,end) {
return textSpan(start,end, 'typedincorrect');
}
SpanElement yetToBeTyped(int start,end) {
return textSpan(start,end, 'nottyped');
}
}
| Add span functions for different textstates. | Add span functions for different textstates.
| Dart | bsd-3-clause | mswift42/workmantrainer,mswift42/workmantrainer | dart | ## Code Before:
library textmarker;
import 'dart:html';
class TextMarker {
String targettext;
int startposition;
int endposition;
String textState; // were characters from start to end position typed correctly.
TextMarker(this.targettext,this.startposition, this.endposition,this.textState);
SpanElement textSpan(int start,end, String classname) {
var span = new SpanElement()
..classes.add(classname)
..text = targettext.substring(start,end);
return span;
}
}
## Instruction:
Add span functions for different textstates.
## Code After:
library textmarker;
import 'dart:html';
class TextMarker {
String targettext;
int startposition;
int endposition;
String textState; // were characters from start to end position typed correctly.
TextMarker(this.targettext,this.startposition, this.endposition,this.textState);
SpanElement textSpan(int start,end, String classname) {
var span = new SpanElement()
..classes.add(classname)
..text = targettext.substring(start,end);
return span;
}
SpanElement typedCorrectly(int start,end) {
return textSpan(start,end, 'typedcorrect');
}
SpanElement typedIncorrectly(int start,end) {
return textSpan(start,end, 'typedincorrect');
}
SpanElement yetToBeTyped(int start,end) {
return textSpan(start,end, 'nottyped');
}
}
| library textmarker;
import 'dart:html';
class TextMarker {
String targettext;
int startposition;
int endposition;
String textState; // were characters from start to end position typed correctly.
TextMarker(this.targettext,this.startposition, this.endposition,this.textState);
SpanElement textSpan(int start,end, String classname) {
var span = new SpanElement()
..classes.add(classname)
..text = targettext.substring(start,end);
return span;
}
+ SpanElement typedCorrectly(int start,end) {
+ return textSpan(start,end, 'typedcorrect');
+ }
+ SpanElement typedIncorrectly(int start,end) {
+ return textSpan(start,end, 'typedincorrect');
+ }
+ SpanElement yetToBeTyped(int start,end) {
+ return textSpan(start,end, 'nottyped');
+ }
}
-
| 10 | 0.47619 | 9 | 1 |
6005028c3a91e73a8b31487fc4a49b17035cf30d | .travis.yml | .travis.yml | env:
global:
- NODEJS_VERSION='6.11.1'
matrix:
include:
- language: node_js
env: JOB='LINTING'
node_js: ${NODEJS_VERSION}
script: npm run lint
- language: node_js
node_js: ${NODEJS_VERSION}
env: JOB='UNIT'
script: npm run test-unit
- language: node_js
node_js: ${NODEJS_VERSION}
env: JOB='INTEGRATION'
script: npm run test-integration
- language: node_js
node_js: ${NODEJS_VERSION}
env: JOB='NPM SECURITY'
script: npm run test-npm-security
notifications:
email:
on_success: change
on_failure: always | env:
global:
- NODEJS_VERSION='6.11.1'
before_install:
- npm i -g npm@^6.0.0
matrix:
include:
- language: node_js
env: JOB='LINTING'
node_js: ${NODEJS_VERSION}
script: npm run lint
- language: node_js
node_js: ${NODEJS_VERSION}
env: JOB='UNIT'
script: npm run test-unit
- language: node_js
node_js: ${NODEJS_VERSION}
env: JOB='INTEGRATION'
script: npm run test-integration
- language: node_js
node_js: ${NODEJS_VERSION}
env: JOB='NPM SECURITY'
script: npm run test-npm-security
notifications:
email:
on_success: change
on_failure: always | Set npm to version6 in order to use npm audit feature | Set npm to version6 in order to use npm audit feature
| YAML | apache-2.0 | Kinvey/kinvey-task-receiver | yaml | ## Code Before:
env:
global:
- NODEJS_VERSION='6.11.1'
matrix:
include:
- language: node_js
env: JOB='LINTING'
node_js: ${NODEJS_VERSION}
script: npm run lint
- language: node_js
node_js: ${NODEJS_VERSION}
env: JOB='UNIT'
script: npm run test-unit
- language: node_js
node_js: ${NODEJS_VERSION}
env: JOB='INTEGRATION'
script: npm run test-integration
- language: node_js
node_js: ${NODEJS_VERSION}
env: JOB='NPM SECURITY'
script: npm run test-npm-security
notifications:
email:
on_success: change
on_failure: always
## Instruction:
Set npm to version6 in order to use npm audit feature
## Code After:
env:
global:
- NODEJS_VERSION='6.11.1'
before_install:
- npm i -g npm@^6.0.0
matrix:
include:
- language: node_js
env: JOB='LINTING'
node_js: ${NODEJS_VERSION}
script: npm run lint
- language: node_js
node_js: ${NODEJS_VERSION}
env: JOB='UNIT'
script: npm run test-unit
- language: node_js
node_js: ${NODEJS_VERSION}
env: JOB='INTEGRATION'
script: npm run test-integration
- language: node_js
node_js: ${NODEJS_VERSION}
env: JOB='NPM SECURITY'
script: npm run test-npm-security
notifications:
email:
on_success: change
on_failure: always | env:
global:
- NODEJS_VERSION='6.11.1'
+
+ before_install:
+ - npm i -g npm@^6.0.0
matrix:
include:
- language: node_js
env: JOB='LINTING'
node_js: ${NODEJS_VERSION}
script: npm run lint
- language: node_js
node_js: ${NODEJS_VERSION}
env: JOB='UNIT'
script: npm run test-unit
- language: node_js
node_js: ${NODEJS_VERSION}
env: JOB='INTEGRATION'
script: npm run test-integration
- language: node_js
node_js: ${NODEJS_VERSION}
env: JOB='NPM SECURITY'
script: npm run test-npm-security
notifications:
email:
on_success: change
on_failure: always | 3 | 0.096774 | 3 | 0 |
3288d96b1ed6785274d2f461d93aed9174a22320 | README.md | README.md |
kpt is a toolkit to help you manage, manipulate, customize, and apply Kubernetes Resource configuration data files.
- Fetch, update, and sync configuration files using git.
- Examine and modify configuration files.
- Generate, transform, validate configuration files using containerized functions.
- Apply configuration files to clusters.
## Installation
Binaries:
darwin:
wget https://storage.googleapis.com/kpt-dev/latest/darwin_amd64/kpt
chmod +x kpt
./kpt version
linux:
wget https://storage.googleapis.com/kpt-dev/latest/linux_amd64/kpt
chmod +x kpt
./kpt version
windows:
https://storage.googleapis.com/kpt-dev/latest/windows_amd64/kpt.exe
Source:
GO111MODULE=on go get -v github.com/GoogleContainerTools/kpt
### [Documentation](googlecontainertools.github.io/kpt)
See the [docs](docs/README.md) for more information on how to use `kpt`.
---------------------
|
kpt is a toolkit to help you manage, manipulate, customize, and apply Kubernetes Resource configuration data files.
- Fetch, update, and sync configuration files using git.
- Examine and modify configuration files.
- Generate, transform, validate configuration files using containerized functions.
- Apply configuration files to clusters.
## Installation
Download Binaries:
| Platform
| ------------------------
| [Linux (x64)][linux]
| [macOS (x64)][darwin]
| [Windows (x64)][windows]
Installation:
// For linux/mac
chmod +x kpt
./kpt version
Source:
GO111MODULE=on go get -v github.com/GoogleContainerTools/kpt
### [Documentation](googlecontainertools.github.io/kpt)
See the [docs](docs/README.md) for more information on how to use `kpt`.
---
[linux]: https://storage.googleapis.com/kpt-dev/latest/linux_amd64/kpt
[darwin]: https://storage.googleapis.com/kpt-dev/latest/darwin_amd64/kpt
[windows]: https://storage.googleapis.com/kpt-dev/latest/windows_amd64/kpt.exe
| Add download links for kpt binaries | Add download links for kpt binaries
| Markdown | apache-2.0 | GoogleContainerTools/kpt,GoogleContainerTools/kpt,GoogleContainerTools/kpt,GoogleContainerTools/kpt,GoogleContainerTools/kpt | markdown | ## Code Before:
kpt is a toolkit to help you manage, manipulate, customize, and apply Kubernetes Resource configuration data files.
- Fetch, update, and sync configuration files using git.
- Examine and modify configuration files.
- Generate, transform, validate configuration files using containerized functions.
- Apply configuration files to clusters.
## Installation
Binaries:
darwin:
wget https://storage.googleapis.com/kpt-dev/latest/darwin_amd64/kpt
chmod +x kpt
./kpt version
linux:
wget https://storage.googleapis.com/kpt-dev/latest/linux_amd64/kpt
chmod +x kpt
./kpt version
windows:
https://storage.googleapis.com/kpt-dev/latest/windows_amd64/kpt.exe
Source:
GO111MODULE=on go get -v github.com/GoogleContainerTools/kpt
### [Documentation](googlecontainertools.github.io/kpt)
See the [docs](docs/README.md) for more information on how to use `kpt`.
---------------------
## Instruction:
Add download links for kpt binaries
## Code After:
kpt is a toolkit to help you manage, manipulate, customize, and apply Kubernetes Resource configuration data files.
- Fetch, update, and sync configuration files using git.
- Examine and modify configuration files.
- Generate, transform, validate configuration files using containerized functions.
- Apply configuration files to clusters.
## Installation
Download Binaries:
| Platform
| ------------------------
| [Linux (x64)][linux]
| [macOS (x64)][darwin]
| [Windows (x64)][windows]
Installation:
// For linux/mac
chmod +x kpt
./kpt version
Source:
GO111MODULE=on go get -v github.com/GoogleContainerTools/kpt
### [Documentation](googlecontainertools.github.io/kpt)
See the [docs](docs/README.md) for more information on how to use `kpt`.
---
[linux]: https://storage.googleapis.com/kpt-dev/latest/linux_amd64/kpt
[darwin]: https://storage.googleapis.com/kpt-dev/latest/darwin_amd64/kpt
[windows]: https://storage.googleapis.com/kpt-dev/latest/windows_amd64/kpt.exe
|
kpt is a toolkit to help you manage, manipulate, customize, and apply Kubernetes Resource configuration data files.
- Fetch, update, and sync configuration files using git.
- Examine and modify configuration files.
- Generate, transform, validate configuration files using containerized functions.
- Apply configuration files to clusters.
## Installation
- Binaries:
+ Download Binaries:
- darwin:
+ | Platform
+ | ------------------------
+ | [Linux (x64)][linux]
+ | [macOS (x64)][darwin]
+ | [Windows (x64)][windows]
- wget https://storage.googleapis.com/kpt-dev/latest/darwin_amd64/kpt
+ Installation:
+
+ // For linux/mac
chmod +x kpt
+
./kpt version
-
- linux:
-
- wget https://storage.googleapis.com/kpt-dev/latest/linux_amd64/kpt
- chmod +x kpt
- ./kpt version
-
- windows:
-
- https://storage.googleapis.com/kpt-dev/latest/windows_amd64/kpt.exe
Source:
GO111MODULE=on go get -v github.com/GoogleContainerTools/kpt
+
### [Documentation](googlecontainertools.github.io/kpt)
See the [docs](docs/README.md) for more information on how to use `kpt`.
+ ---
- ---------------------
+ [linux]: https://storage.googleapis.com/kpt-dev/latest/linux_amd64/kpt
+ [darwin]: https://storage.googleapis.com/kpt-dev/latest/darwin_amd64/kpt
+ [windows]: https://storage.googleapis.com/kpt-dev/latest/windows_amd64/kpt.exe | 29 | 0.763158 | 15 | 14 |
5bc71b75711e3fd6764b5fc54e2929418ec2de19 | docker/docker-compose.yml | docker/docker-compose.yml | nginx:
image: spotscore/nginx-proxy
ports:
- "80:80"
volumes:
- /var/run/docker.sock:/tmp/docker.sock:ro
links:
- spotscore
spotscore:
image: spotscore/spotscore
ports:
- "3000:3000"
links:
- postgis
postgis:
image: spotscore/postgis
ports:
- "5432:5432"
| nginx:
image: spotscore/nginx-proxy
ports:
- "80:80"
volumes:
- /var/run/docker.sock:/tmp/docker.sock:ro
links:
- spotscore
spotscore:
image: spotscore/spotscore
ports:
- "3000:3000"
volumes:
- /code
links:
- postgis
postgis:
image: spotscore/postgis
ports:
- "5432:5432"
volumes:
- /var/lib/postgresql/data
| Add volumes when running containers | Add volumes when running containers
| YAML | bsd-2-clause | SpotScore/spotscore | yaml | ## Code Before:
nginx:
image: spotscore/nginx-proxy
ports:
- "80:80"
volumes:
- /var/run/docker.sock:/tmp/docker.sock:ro
links:
- spotscore
spotscore:
image: spotscore/spotscore
ports:
- "3000:3000"
links:
- postgis
postgis:
image: spotscore/postgis
ports:
- "5432:5432"
## Instruction:
Add volumes when running containers
## Code After:
nginx:
image: spotscore/nginx-proxy
ports:
- "80:80"
volumes:
- /var/run/docker.sock:/tmp/docker.sock:ro
links:
- spotscore
spotscore:
image: spotscore/spotscore
ports:
- "3000:3000"
volumes:
- /code
links:
- postgis
postgis:
image: spotscore/postgis
ports:
- "5432:5432"
volumes:
- /var/lib/postgresql/data
| nginx:
image: spotscore/nginx-proxy
ports:
- "80:80"
volumes:
- /var/run/docker.sock:/tmp/docker.sock:ro
links:
- spotscore
spotscore:
image: spotscore/spotscore
ports:
- "3000:3000"
+ volumes:
+ - /code
links:
- postgis
postgis:
image: spotscore/postgis
ports:
- "5432:5432"
+ volumes:
+ - /var/lib/postgresql/data | 4 | 0.222222 | 4 | 0 |
14e1f077de2f3c2487f1d1a27995ade77a9b7240 | .travis.yml | .travis.yml | language: python
python: 3.5
sudo: false
script:
- python manage.py test
after_success:
- pip install flake8 && flake8 .
| language: python
python: 3.5
sudo: false
install:
- pip install -r requirements.txt
- pip install flake8
before_script:
- flake8 .
script:
- python manage.py test
| Make flake8 actually cause errors on Travis | Make flake8 actually cause errors on Travis
| YAML | mpl-2.0 | frewsxcv/lop.farm,frewsxcv/lop.farm,frewsxcv/lop.farm | yaml | ## Code Before:
language: python
python: 3.5
sudo: false
script:
- python manage.py test
after_success:
- pip install flake8 && flake8 .
## Instruction:
Make flake8 actually cause errors on Travis
## Code After:
language: python
python: 3.5
sudo: false
install:
- pip install -r requirements.txt
- pip install flake8
before_script:
- flake8 .
script:
- python manage.py test
| language: python
python: 3.5
sudo: false
+ install:
+ - pip install -r requirements.txt
+ - pip install flake8
+ before_script:
+ - flake8 .
script:
- python manage.py test
- after_success:
- - pip install flake8 && flake8 . | 7 | 1 | 5 | 2 |
1af76d7bfd7ff5005e60416c51e2704ca47bda58 | Casks/gas-mask.rb | Casks/gas-mask.rb | cask :v1 => 'gas-mask' do
version '0.8.1'
sha256 'f384e973603088ed5afbe841ef7d5698262988c65a0437a9d8011dcb667fcc2e'
url "http://gmask.clockwise.ee/files/gas_mask_#{version}.zip"
appcast 'http://gmask.clockwise.ee/check_update/',
:sha256 => '2e4f5292999bddfc25245a9c10f98d7ac23d0717a1dd45436a00cf09be7f8d9b'
name 'Gas Mask'
homepage 'http://www.clockwise.ee/'
license :gpl
app 'Gas Mask.app'
end
| cask :v1 => 'gas-mask' do
version '0.8.3'
sha256 '907aa5979d1a902fa2582f5b6a4f2b1087e5f4e60cc9eb87594407d60fcd2d53'
url "http://gmask.clockwise.ee/files/gas_mask_#{version}.zip"
appcast 'http://gmask.clockwise.ee/check_update/',
:sha256 => '2e4f5292999bddfc25245a9c10f98d7ac23d0717a1dd45436a00cf09be7f8d9b'
name 'Gas Mask'
homepage 'http://www.clockwise.ee/'
license :gpl
app 'Gas Mask.app'
end
| Update Gas Mask to 0.8.3 | Update Gas Mask to 0.8.3
| Ruby | bsd-2-clause | afh/homebrew-cask,gerrypower/homebrew-cask,rajiv/homebrew-cask,ebraminio/homebrew-cask,thehunmonkgroup/homebrew-cask,malford/homebrew-cask,bosr/homebrew-cask,yutarody/homebrew-cask,thomanq/homebrew-cask,imgarylai/homebrew-cask,neverfox/homebrew-cask,sanchezm/homebrew-cask,napaxton/homebrew-cask,koenrh/homebrew-cask,cliffcotino/homebrew-cask,wickles/homebrew-cask,brianshumate/homebrew-cask,joschi/homebrew-cask,reitermarkus/homebrew-cask,samdoran/homebrew-cask,lcasey001/homebrew-cask,mishari/homebrew-cask,nathanielvarona/homebrew-cask,wmorin/homebrew-cask,jpmat296/homebrew-cask,mchlrmrz/homebrew-cask,Saklad5/homebrew-cask,timsutton/homebrew-cask,wickedsp1d3r/homebrew-cask,xyb/homebrew-cask,jawshooah/homebrew-cask,dictcp/homebrew-cask,mwean/homebrew-cask,albertico/homebrew-cask,onlynone/homebrew-cask,nrlquaker/homebrew-cask,winkelsdorf/homebrew-cask,dvdoliveira/homebrew-cask,reitermarkus/homebrew-cask,13k/homebrew-cask,neverfox/homebrew-cask,theoriginalgri/homebrew-cask,shonjir/homebrew-cask,skatsuta/homebrew-cask,tyage/homebrew-cask,Bombenleger/homebrew-cask,tan9/homebrew-cask,syscrusher/homebrew-cask,mauricerkelly/homebrew-cask,cblecker/homebrew-cask,bric3/homebrew-cask,nathancahill/homebrew-cask,blainesch/homebrew-cask,alebcay/homebrew-cask,linc01n/homebrew-cask,tjnycum/homebrew-cask,cfillion/homebrew-cask,stigkj/homebrew-caskroom-cask,zerrot/homebrew-cask,hanxue/caskroom,jaredsampson/homebrew-cask,mgryszko/homebrew-cask,Amorymeltzer/homebrew-cask,n0ts/homebrew-cask,gmkey/homebrew-cask,asins/homebrew-cask,jaredsampson/homebrew-cask,cedwardsmedia/homebrew-cask,scribblemaniac/homebrew-cask,gurghet/homebrew-cask,mishari/homebrew-cask,aguynamedryan/homebrew-cask,jalaziz/homebrew-cask,mattrobenolt/homebrew-cask,retrography/homebrew-cask,leipert/homebrew-cask,cfillion/homebrew-cask,guerrero/homebrew-cask,thii/homebrew-cask,artdevjs/homebrew-cask,mattrobenolt/homebrew-cask,malford/homebrew-cask,lcasey001/homebrew-cask,phpwutz/homebrew-cask,riyad/homebrew-cask,tedbundyjr/homebrew-cask,pkq/homebrew-cask,shoichiaizawa/homebrew-cask,inta/homebrew-cask,seanorama/homebrew-cask,0xadada/homebrew-cask,pacav69/homebrew-cask,FranklinChen/homebrew-cask,BenjaminHCCarr/homebrew-cask,wKovacs64/homebrew-cask,sscotth/homebrew-cask,reelsense/homebrew-cask,jconley/homebrew-cask,caskroom/homebrew-cask,victorpopkov/homebrew-cask,nightscape/homebrew-cask,axodys/homebrew-cask,lukasbestle/homebrew-cask,vigosan/homebrew-cask,tan9/homebrew-cask,josa42/homebrew-cask,inta/homebrew-cask,tedski/homebrew-cask,maxnordlund/homebrew-cask,squid314/homebrew-cask,shorshe/homebrew-cask,anbotero/homebrew-cask,gmkey/homebrew-cask,alexg0/homebrew-cask,reelsense/homebrew-cask,samnung/homebrew-cask,blainesch/homebrew-cask,jiashuw/homebrew-cask,winkelsdorf/homebrew-cask,hakamadare/homebrew-cask,larseggert/homebrew-cask,uetchy/homebrew-cask,JosephViolago/homebrew-cask,goxberry/homebrew-cask,lukeadams/homebrew-cask,mathbunnyru/homebrew-cask,sebcode/homebrew-cask,klane/homebrew-cask,jpmat296/homebrew-cask,casidiablo/homebrew-cask,My2ndAngelic/homebrew-cask,devmynd/homebrew-cask,shoichiaizawa/homebrew-cask,colindunn/homebrew-cask,alebcay/homebrew-cask,lucasmezencio/homebrew-cask,tjt263/homebrew-cask,ddm/homebrew-cask,13k/homebrew-cask,lifepillar/homebrew-cask,jgarber623/homebrew-cask,kpearson/homebrew-cask,colindunn/homebrew-cask,sosedoff/homebrew-cask,ksylvan/homebrew-cask,FranklinChen/homebrew-cask,psibre/homebrew-cask,skatsuta/homebrew-cask,kamilboratynski/homebrew-cask,robertgzr/homebrew-cask,decrement/homebrew-cask,amatos/homebrew-cask,arronmabrey/homebrew-cask,hyuna917/homebrew-cask,psibre/homebrew-cask,pacav69/homebrew-cask,winkelsdorf/homebrew-cask,ksato9700/homebrew-cask,muan/homebrew-cask,kteru/homebrew-cask,FinalDes/homebrew-cask,shonjir/homebrew-cask,renaudguerin/homebrew-cask,samnung/homebrew-cask,m3nu/homebrew-cask,deiga/homebrew-cask,elyscape/homebrew-cask,patresi/homebrew-cask,miku/homebrew-cask,timsutton/homebrew-cask,jalaziz/homebrew-cask,JikkuJose/homebrew-cask,sanyer/homebrew-cask,schneidmaster/homebrew-cask,mjdescy/homebrew-cask,gabrielizaias/homebrew-cask,bosr/homebrew-cask,kassi/homebrew-cask,williamboman/homebrew-cask,kassi/homebrew-cask,opsdev-ws/homebrew-cask,xtian/homebrew-cask,linc01n/homebrew-cask,daften/homebrew-cask,Amorymeltzer/homebrew-cask,tolbkni/homebrew-cask,rajiv/homebrew-cask,malob/homebrew-cask,boecko/homebrew-cask,ddm/homebrew-cask,mjgardner/homebrew-cask,dcondrey/homebrew-cask,moimikey/homebrew-cask,deiga/homebrew-cask,MichaelPei/homebrew-cask,thehunmonkgroup/homebrew-cask,patresi/homebrew-cask,My2ndAngelic/homebrew-cask,danielbayley/homebrew-cask,CameronGarrett/homebrew-cask,johndbritton/homebrew-cask,janlugt/homebrew-cask,mrmachine/homebrew-cask,goxberry/homebrew-cask,aguynamedryan/homebrew-cask,0rax/homebrew-cask,miguelfrde/homebrew-cask,colindean/homebrew-cask,n8henrie/homebrew-cask,yurikoles/homebrew-cask,mhubig/homebrew-cask,franklouwers/homebrew-cask,perfide/homebrew-cask,JacopKane/homebrew-cask,okket/homebrew-cask,yutarody/homebrew-cask,Cottser/homebrew-cask,renard/homebrew-cask,kteru/homebrew-cask,renard/homebrew-cask,markhuber/homebrew-cask,xcezx/homebrew-cask,morganestes/homebrew-cask,leipert/homebrew-cask,nathansgreen/homebrew-cask,fanquake/homebrew-cask,MerelyAPseudonym/homebrew-cask,paour/homebrew-cask,JacopKane/homebrew-cask,alexg0/homebrew-cask,anbotero/homebrew-cask,seanzxx/homebrew-cask,elnappo/homebrew-cask,ksylvan/homebrew-cask,asins/homebrew-cask,kesara/homebrew-cask,MircoT/homebrew-cask,joschi/homebrew-cask,paour/homebrew-cask,MoOx/homebrew-cask,faun/homebrew-cask,m3nu/homebrew-cask,KosherBacon/homebrew-cask,RJHsiao/homebrew-cask,tjnycum/homebrew-cask,blogabe/homebrew-cask,nrlquaker/homebrew-cask,tyage/homebrew-cask,yurikoles/homebrew-cask,bric3/homebrew-cask,jppelteret/homebrew-cask,reitermarkus/homebrew-cask,JikkuJose/homebrew-cask,jasmas/homebrew-cask,singingwolfboy/homebrew-cask,moogar0880/homebrew-cask,corbt/homebrew-cask,ywfwj2008/homebrew-cask,robertgzr/homebrew-cask,dictcp/homebrew-cask,bdhess/homebrew-cask,albertico/homebrew-cask,lifepillar/homebrew-cask,asbachb/homebrew-cask,CameronGarrett/homebrew-cask,xcezx/homebrew-cask,JacopKane/homebrew-cask,MoOx/homebrew-cask,mazehall/homebrew-cask,puffdad/homebrew-cask,otaran/homebrew-cask,diguage/homebrew-cask,shonjir/homebrew-cask,tsparber/homebrew-cask,doits/homebrew-cask,andrewdisley/homebrew-cask,esebastian/homebrew-cask,greg5green/homebrew-cask,uetchy/homebrew-cask,antogg/homebrew-cask,dictcp/homebrew-cask,decrement/homebrew-cask,elyscape/homebrew-cask,haha1903/homebrew-cask,imgarylai/homebrew-cask,Ephemera/homebrew-cask,stephenwade/homebrew-cask,malob/homebrew-cask,hakamadare/homebrew-cask,SentinelWarren/homebrew-cask,nathanielvarona/homebrew-cask,sjackman/homebrew-cask,Cottser/homebrew-cask,mazehall/homebrew-cask,hellosky806/homebrew-cask,fharbe/homebrew-cask,yurikoles/homebrew-cask,rogeriopradoj/homebrew-cask,Keloran/homebrew-cask,mgryszko/homebrew-cask,Fedalto/homebrew-cask,deiga/homebrew-cask,slack4u/homebrew-cask,tjt263/homebrew-cask,faun/homebrew-cask,KosherBacon/homebrew-cask,giannitm/homebrew-cask,koenrh/homebrew-cask,optikfluffel/homebrew-cask,kingthorin/homebrew-cask,deanmorin/homebrew-cask,puffdad/homebrew-cask,jeanregisser/homebrew-cask,cobyism/homebrew-cask,julionc/homebrew-cask,exherb/homebrew-cask,ianyh/homebrew-cask,michelegera/homebrew-cask,mjgardner/homebrew-cask,larseggert/homebrew-cask,mjgardner/homebrew-cask,colindean/homebrew-cask,AnastasiaSulyagina/homebrew-cask,flaviocamilo/homebrew-cask,markthetech/homebrew-cask,jangalinski/homebrew-cask,jedahan/homebrew-cask,jasmas/homebrew-cask,elnappo/homebrew-cask,jgarber623/homebrew-cask,gyndav/homebrew-cask,amatos/homebrew-cask,tolbkni/homebrew-cask,boecko/homebrew-cask,forevergenin/homebrew-cask,moogar0880/homebrew-cask,jellyfishcoder/homebrew-cask,riyad/homebrew-cask,vitorgalvao/homebrew-cask,jmeridth/homebrew-cask,sjackman/homebrew-cask,slack4u/homebrew-cask,timsutton/homebrew-cask,xyb/homebrew-cask,daften/homebrew-cask,corbt/homebrew-cask,adrianchia/homebrew-cask,stigkj/homebrew-caskroom-cask,napaxton/homebrew-cask,toonetown/homebrew-cask,Ngrd/homebrew-cask,kongslund/homebrew-cask,joshka/homebrew-cask,nathancahill/homebrew-cask,hyuna917/homebrew-cask,wKovacs64/homebrew-cask,jedahan/homebrew-cask,athrunsun/homebrew-cask,stonehippo/homebrew-cask,codeurge/homebrew-cask,neverfox/homebrew-cask,howie/homebrew-cask,artdevjs/homebrew-cask,xight/homebrew-cask,mathbunnyru/homebrew-cask,maxnordlund/homebrew-cask,mchlrmrz/homebrew-cask,adrianchia/homebrew-cask,okket/homebrew-cask,stonehippo/homebrew-cask,yuhki50/homebrew-cask,theoriginalgri/homebrew-cask,a1russell/homebrew-cask,SentinelWarren/homebrew-cask,cedwardsmedia/homebrew-cask,cprecioso/homebrew-cask,greg5green/homebrew-cask,haha1903/homebrew-cask,nshemonsky/homebrew-cask,tedski/homebrew-cask,inz/homebrew-cask,esebastian/homebrew-cask,xtian/homebrew-cask,mattrobenolt/homebrew-cask,otaran/homebrew-cask,exherb/homebrew-cask,BenjaminHCCarr/homebrew-cask,singingwolfboy/homebrew-cask,morganestes/homebrew-cask,devmynd/homebrew-cask,janlugt/homebrew-cask,joschi/homebrew-cask,Gasol/homebrew-cask,uetchy/homebrew-cask,hristozov/homebrew-cask,wickedsp1d3r/homebrew-cask,kongslund/homebrew-cask,FinalDes/homebrew-cask,sgnh/homebrew-cask,stephenwade/homebrew-cask,coeligena/homebrew-customized,rajiv/homebrew-cask,malob/homebrew-cask,hovancik/homebrew-cask,FredLackeyOfficial/homebrew-cask,nshemonsky/homebrew-cask,jeroenj/homebrew-cask,usami-k/homebrew-cask,michelegera/homebrew-cask,troyxmccall/homebrew-cask,nathanielvarona/homebrew-cask,samshadwell/homebrew-cask,optikfluffel/homebrew-cask,doits/homebrew-cask,jacobbednarz/homebrew-cask,troyxmccall/homebrew-cask,jeroenj/homebrew-cask,afh/homebrew-cask,ksato9700/homebrew-cask,claui/homebrew-cask,sohtsuka/homebrew-cask,xight/homebrew-cask,cprecioso/homebrew-cask,0rax/homebrew-cask,gyndav/homebrew-cask,andyli/homebrew-cask,yumitsu/homebrew-cask,hanxue/caskroom,wastrachan/homebrew-cask,sanyer/homebrew-cask,kronicd/homebrew-cask,forevergenin/homebrew-cask,andrewdisley/homebrew-cask,chrisfinazzo/homebrew-cask,rogeriopradoj/homebrew-cask,cobyism/homebrew-cask,mahori/homebrew-cask,wmorin/homebrew-cask,tangestani/homebrew-cask,jmeridth/homebrew-cask,n8henrie/homebrew-cask,kingthorin/homebrew-cask,coeligena/homebrew-customized,chrisfinazzo/homebrew-cask,a1russell/homebrew-cask,xight/homebrew-cask,JosephViolago/homebrew-cask,nightscape/homebrew-cask,feigaochn/homebrew-cask,mjdescy/homebrew-cask,scottsuch/homebrew-cask,perfide/homebrew-cask,cblecker/homebrew-cask,miguelfrde/homebrew-cask,mwean/homebrew-cask,rogeriopradoj/homebrew-cask,lantrix/homebrew-cask,diguage/homebrew-cask,gurghet/homebrew-cask,pkq/homebrew-cask,hellosky806/homebrew-cask,scribblemaniac/homebrew-cask,brianshumate/homebrew-cask,coeligena/homebrew-customized,mahori/homebrew-cask,feigaochn/homebrew-cask,williamboman/homebrew-cask,MircoT/homebrew-cask,gilesdring/homebrew-cask,vigosan/homebrew-cask,markthetech/homebrew-cask,zmwangx/homebrew-cask,danielbayley/homebrew-cask,mauricerkelly/homebrew-cask,mrmachine/homebrew-cask,miccal/homebrew-cask,sanyer/homebrew-cask,seanzxx/homebrew-cask,ninjahoahong/homebrew-cask,rickychilcott/homebrew-cask,chadcatlett/caskroom-homebrew-cask,imgarylai/homebrew-cask,jbeagley52/homebrew-cask,tedbundyjr/homebrew-cask,zmwangx/homebrew-cask,antogg/homebrew-cask,Fedalto/homebrew-cask,sscotth/homebrew-cask,ianyh/homebrew-cask,cobyism/homebrew-cask,sscotth/homebrew-cask,renaudguerin/homebrew-cask,n0ts/homebrew-cask,klane/homebrew-cask,ebraminio/homebrew-cask,cliffcotino/homebrew-cask,chrisfinazzo/homebrew-cask,joshka/homebrew-cask,moimikey/homebrew-cask,samshadwell/homebrew-cask,vin047/homebrew-cask,claui/homebrew-cask,jangalinski/homebrew-cask,jbeagley52/homebrew-cask,dvdoliveira/homebrew-cask,hovancik/homebrew-cask,kpearson/homebrew-cask,danielbayley/homebrew-cask,jgarber623/homebrew-cask,blogabe/homebrew-cask,athrunsun/homebrew-cask,asbachb/homebrew-cask,flaviocamilo/homebrew-cask,Ephemera/homebrew-cask,jacobbednarz/homebrew-cask,opsdev-ws/homebrew-cask,nrlquaker/homebrew-cask,kamilboratynski/homebrew-cask,muan/homebrew-cask,jiashuw/homebrew-cask,jalaziz/homebrew-cask,gilesdring/homebrew-cask,jeanregisser/homebrew-cask,usami-k/homebrew-cask,mahori/homebrew-cask,squid314/homebrew-cask,FredLackeyOfficial/homebrew-cask,sohtsuka/homebrew-cask,bdhess/homebrew-cask,zerrot/homebrew-cask,lumaxis/homebrew-cask,jawshooah/homebrew-cask,farmerchris/homebrew-cask,wickles/homebrew-cask,mlocher/homebrew-cask,guerrero/homebrew-cask,kingthorin/homebrew-cask,ywfwj2008/homebrew-cask,m3nu/homebrew-cask,mingzhi22/homebrew-cask,Saklad5/homebrew-cask,johnjelinek/homebrew-cask,ninjahoahong/homebrew-cask,tangestani/homebrew-cask,sebcode/homebrew-cask,syscrusher/homebrew-cask,schneidmaster/homebrew-cask,vitorgalvao/homebrew-cask,lantrix/homebrew-cask,franklouwers/homebrew-cask,howie/homebrew-cask,yutarody/homebrew-cask,jppelteret/homebrew-cask,wastrachan/homebrew-cask,optikfluffel/homebrew-cask,tjnycum/homebrew-cask,fanquake/homebrew-cask,arronmabrey/homebrew-cask,AnastasiaSulyagina/homebrew-cask,chuanxd/homebrew-cask,markhuber/homebrew-cask,kesara/homebrew-cask,hristozov/homebrew-cask,samdoran/homebrew-cask,blogabe/homebrew-cask,bcomnes/homebrew-cask,ericbn/homebrew-cask,Bombenleger/homebrew-cask,axodys/homebrew-cask,lukasbestle/homebrew-cask,josa42/homebrew-cask,tangestani/homebrew-cask,mikem/homebrew-cask,antogg/homebrew-cask,lukeadams/homebrew-cask,cblecker/homebrew-cask,wmorin/homebrew-cask,pkq/homebrew-cask,victorpopkov/homebrew-cask,shoichiaizawa/homebrew-cask,chadcatlett/caskroom-homebrew-cask,Keloran/homebrew-cask,dcondrey/homebrew-cask,Labutin/homebrew-cask,retrography/homebrew-cask,6uclz1/homebrew-cask,fharbe/homebrew-cask,rickychilcott/homebrew-cask,6uclz1/homebrew-cask,ericbn/homebrew-cask,mathbunnyru/homebrew-cask,andyli/homebrew-cask,yuhki50/homebrew-cask,mhubig/homebrew-cask,y00rb/homebrew-cask,singingwolfboy/homebrew-cask,sgnh/homebrew-cask,mlocher/homebrew-cask,hanxue/caskroom,nathansgreen/homebrew-cask,MerelyAPseudonym/homebrew-cask,stonehippo/homebrew-cask,gyndav/homebrew-cask,moimikey/homebrew-cask,lucasmezencio/homebrew-cask,a1russell/homebrew-cask,kkdd/homebrew-cask,ericbn/homebrew-cask,xakraz/homebrew-cask,esebastian/homebrew-cask,BenjaminHCCarr/homebrew-cask,mikem/homebrew-cask,andrewdisley/homebrew-cask,johndbritton/homebrew-cask,caskroom/homebrew-cask,Labutin/homebrew-cask,thomanq/homebrew-cask,phpwutz/homebrew-cask,mingzhi22/homebrew-cask,kesara/homebrew-cask,codeurge/homebrew-cask,thii/homebrew-cask,alebcay/homebrew-cask,gerrypower/homebrew-cask,diogodamiani/homebrew-cask,bcomnes/homebrew-cask,miccal/homebrew-cask,diogodamiani/homebrew-cask,seanorama/homebrew-cask,tsparber/homebrew-cask,chuanxd/homebrew-cask,mchlrmrz/homebrew-cask,adrianchia/homebrew-cask,gabrielizaias/homebrew-cask,xyb/homebrew-cask,alexg0/homebrew-cask,0xadada/homebrew-cask,ptb/homebrew-cask,kTitan/homebrew-cask,jconley/homebrew-cask,casidiablo/homebrew-cask,giannitm/homebrew-cask,y00rb/homebrew-cask,bric3/homebrew-cask,Ketouem/homebrew-cask,farmerchris/homebrew-cask,kkdd/homebrew-cask,ptb/homebrew-cask,RJHsiao/homebrew-cask,sosedoff/homebrew-cask,toonetown/homebrew-cask,Ngrd/homebrew-cask,Ketouem/homebrew-cask,scottsuch/homebrew-cask,julionc/homebrew-cask,josa42/homebrew-cask,JosephViolago/homebrew-cask,julionc/homebrew-cask,onlynone/homebrew-cask,deanmorin/homebrew-cask,kronicd/homebrew-cask,miccal/homebrew-cask,jellyfishcoder/homebrew-cask,sanchezm/homebrew-cask,yumitsu/homebrew-cask,miku/homebrew-cask,Amorymeltzer/homebrew-cask,johnjelinek/homebrew-cask,inz/homebrew-cask,stephenwade/homebrew-cask,joshka/homebrew-cask,lumaxis/homebrew-cask,Ephemera/homebrew-cask,kTitan/homebrew-cask,Gasol/homebrew-cask,MichaelPei/homebrew-cask,scribblemaniac/homebrew-cask,scottsuch/homebrew-cask,shorshe/homebrew-cask,paour/homebrew-cask,vin047/homebrew-cask,claui/homebrew-cask,xakraz/homebrew-cask | ruby | ## Code Before:
cask :v1 => 'gas-mask' do
version '0.8.1'
sha256 'f384e973603088ed5afbe841ef7d5698262988c65a0437a9d8011dcb667fcc2e'
url "http://gmask.clockwise.ee/files/gas_mask_#{version}.zip"
appcast 'http://gmask.clockwise.ee/check_update/',
:sha256 => '2e4f5292999bddfc25245a9c10f98d7ac23d0717a1dd45436a00cf09be7f8d9b'
name 'Gas Mask'
homepage 'http://www.clockwise.ee/'
license :gpl
app 'Gas Mask.app'
end
## Instruction:
Update Gas Mask to 0.8.3
## Code After:
cask :v1 => 'gas-mask' do
version '0.8.3'
sha256 '907aa5979d1a902fa2582f5b6a4f2b1087e5f4e60cc9eb87594407d60fcd2d53'
url "http://gmask.clockwise.ee/files/gas_mask_#{version}.zip"
appcast 'http://gmask.clockwise.ee/check_update/',
:sha256 => '2e4f5292999bddfc25245a9c10f98d7ac23d0717a1dd45436a00cf09be7f8d9b'
name 'Gas Mask'
homepage 'http://www.clockwise.ee/'
license :gpl
app 'Gas Mask.app'
end
| cask :v1 => 'gas-mask' do
- version '0.8.1'
? ^
+ version '0.8.3'
? ^
- sha256 'f384e973603088ed5afbe841ef7d5698262988c65a0437a9d8011dcb667fcc2e'
+ sha256 '907aa5979d1a902fa2582f5b6a4f2b1087e5f4e60cc9eb87594407d60fcd2d53'
url "http://gmask.clockwise.ee/files/gas_mask_#{version}.zip"
appcast 'http://gmask.clockwise.ee/check_update/',
:sha256 => '2e4f5292999bddfc25245a9c10f98d7ac23d0717a1dd45436a00cf09be7f8d9b'
name 'Gas Mask'
homepage 'http://www.clockwise.ee/'
license :gpl
app 'Gas Mask.app'
end | 4 | 0.307692 | 2 | 2 |
a58342269323a6e6a7a3c812c969c7af49016cd7 | SYNTAX.txt | SYNTAX.txt |
(( widgetName prop1, prop2 ... ))
[[ property ]] => (( _itemListView: property )) ID }]
{{ property }} => (( _itemValueView: property ))
{{ user owner }}
(( timeWidget date, location ))
{{ owner: user }}
(( Clock date location ))
MEETING
(( Agenda users time location )) |
(( widgetName prop1, prop2 ... ))
[[ property ]] => (( _itemListView: property )) ID }]
{{ property }} => (( _itemValueView: property ))
{{ property: type }} => (( _itemReferenceView: type, property ))
{{ user owner }}
(( timeWidget date, location ))
{{ owner: user }}
(( Clock date location ))
MEETING
(( Agenda users time location )) | Add syntax for creating property references (as opposed to property values) | Add syntax for creating property references (as opposed to property values)
| Text | mit | marcuswestin/fin | text | ## Code Before:
(( widgetName prop1, prop2 ... ))
[[ property ]] => (( _itemListView: property )) ID }]
{{ property }} => (( _itemValueView: property ))
{{ user owner }}
(( timeWidget date, location ))
{{ owner: user }}
(( Clock date location ))
MEETING
(( Agenda users time location ))
## Instruction:
Add syntax for creating property references (as opposed to property values)
## Code After:
(( widgetName prop1, prop2 ... ))
[[ property ]] => (( _itemListView: property )) ID }]
{{ property }} => (( _itemValueView: property ))
{{ property: type }} => (( _itemReferenceView: type, property ))
{{ user owner }}
(( timeWidget date, location ))
{{ owner: user }}
(( Clock date location ))
MEETING
(( Agenda users time location )) |
(( widgetName prop1, prop2 ... ))
[[ property ]] => (( _itemListView: property )) ID }]
{{ property }} => (( _itemValueView: property ))
+ {{ property: type }} => (( _itemReferenceView: type, property ))
{{ user owner }}
(( timeWidget date, location ))
{{ owner: user }}
(( Clock date location ))
MEETING
(( Agenda users time location )) | 1 | 0.045455 | 1 | 0 |
3b4e45a8545bd26d6a1ac749415120f0d1a636c5 | laundry-dude-led-sensor/laundry-dude-led-sensor.ino | laundry-dude-led-sensor/laundry-dude-led-sensor.ino |
// Serial speed
#define SERIAL_BAUDRATE 9600
#define LIGHTSENSOR_PIN 3
#define FETCH_INTERVAL 100
#define POST_INTERVAL 5000
const int numLedSamples = POST_INTERVAL / FETCH_INTERVAL;
int ledSamples[numLedSamples];
int ledSampleCounter = 0;
int light = 0;
// Software serial for XBee module
SoftwareSerial xbeeSerial(2, 3); // RX, TX
void setup() {
Serial.begin(SERIAL_BAUDRATE);
xbeeSerial.begin(SERIAL_BAUDRATE);
}
void loop() {
readLightsensor();
if (ledSampleCounter >= numLedSamples)
sendLightData();
delay(FETCH_INTERVAL);
}
void readLightsensor() {
int sample = analogRead(LIGHTSENSOR_PIN);
Serial.print("d:");Serial.println(sample);
ledSamples[ledSampleCounter] = sample;
ledSampleCounter++;
}
void sendLightData() {
float avg = 0.0f;
for (int i = 0; i < numLedSamples; i++)
avg += ledSamples[i];
avg /= numLedSamples;
xbeeSerial.print("l=");xbeeSerial.println(avg);
ledSampleCounter = 0;
}
|
// Serial speed
#define SERIAL_BAUDRATE 9600
#define LIGHTSENSOR_PIN 3
#define FETCH_INTERVAL 100
#define POST_INTERVAL 5000
const int numLedSamples = POST_INTERVAL / FETCH_INTERVAL;
int ledSamples[numLedSamples];
int ledSampleCounter = 0;
int light = 0;
// Software serial for XBee module
SoftwareSerial xbeeSerial(2, 3); // RX, TX
void setup() {
Serial.begin(SERIAL_BAUDRATE);
xbeeSerial.begin(SERIAL_BAUDRATE);
}
void loop() {
readLightsensor();
if (ledSampleCounter >= numLedSamples)
sendLightData();
delay(FETCH_INTERVAL);
}
void readLightsensor() {
ledSamples[ledSampleCounter] = analogRead(LIGHTSENSOR_PIN);
ledSampleCounter++;
ledSampleCounter %= numLedSamples;
}
void sendLightData() {
float avg = 0.0f;
for (int i = 0; i < numLedSamples; i++)
avg += ledSamples[i];
avg /= numLedSamples;
xbeeSerial.print("l=");xbeeSerial.println(avg);
}
| Implement LED data as ringbuffer. | [LedDude] Implement LED data as ringbuffer.
Signed-off-by: Juri Berlanda <5bfdca9e82c53adb0603ce7083f4ba4f2da5cacf@hotmail.com>
| Arduino | mit | j-be/laundry-dudes,j-be/laundry-dudes,j-be/laundry-dudes,j-be/laundry-dudes,j-be/laundry-dudes,j-be/laundry-dudes | arduino | ## Code Before:
// Serial speed
#define SERIAL_BAUDRATE 9600
#define LIGHTSENSOR_PIN 3
#define FETCH_INTERVAL 100
#define POST_INTERVAL 5000
const int numLedSamples = POST_INTERVAL / FETCH_INTERVAL;
int ledSamples[numLedSamples];
int ledSampleCounter = 0;
int light = 0;
// Software serial for XBee module
SoftwareSerial xbeeSerial(2, 3); // RX, TX
void setup() {
Serial.begin(SERIAL_BAUDRATE);
xbeeSerial.begin(SERIAL_BAUDRATE);
}
void loop() {
readLightsensor();
if (ledSampleCounter >= numLedSamples)
sendLightData();
delay(FETCH_INTERVAL);
}
void readLightsensor() {
int sample = analogRead(LIGHTSENSOR_PIN);
Serial.print("d:");Serial.println(sample);
ledSamples[ledSampleCounter] = sample;
ledSampleCounter++;
}
void sendLightData() {
float avg = 0.0f;
for (int i = 0; i < numLedSamples; i++)
avg += ledSamples[i];
avg /= numLedSamples;
xbeeSerial.print("l=");xbeeSerial.println(avg);
ledSampleCounter = 0;
}
## Instruction:
[LedDude] Implement LED data as ringbuffer.
Signed-off-by: Juri Berlanda <5bfdca9e82c53adb0603ce7083f4ba4f2da5cacf@hotmail.com>
## Code After:
// Serial speed
#define SERIAL_BAUDRATE 9600
#define LIGHTSENSOR_PIN 3
#define FETCH_INTERVAL 100
#define POST_INTERVAL 5000
const int numLedSamples = POST_INTERVAL / FETCH_INTERVAL;
int ledSamples[numLedSamples];
int ledSampleCounter = 0;
int light = 0;
// Software serial for XBee module
SoftwareSerial xbeeSerial(2, 3); // RX, TX
void setup() {
Serial.begin(SERIAL_BAUDRATE);
xbeeSerial.begin(SERIAL_BAUDRATE);
}
void loop() {
readLightsensor();
if (ledSampleCounter >= numLedSamples)
sendLightData();
delay(FETCH_INTERVAL);
}
void readLightsensor() {
ledSamples[ledSampleCounter] = analogRead(LIGHTSENSOR_PIN);
ledSampleCounter++;
ledSampleCounter %= numLedSamples;
}
void sendLightData() {
float avg = 0.0f;
for (int i = 0; i < numLedSamples; i++)
avg += ledSamples[i];
avg /= numLedSamples;
xbeeSerial.print("l=");xbeeSerial.println(avg);
}
|
// Serial speed
#define SERIAL_BAUDRATE 9600
#define LIGHTSENSOR_PIN 3
#define FETCH_INTERVAL 100
#define POST_INTERVAL 5000
const int numLedSamples = POST_INTERVAL / FETCH_INTERVAL;
int ledSamples[numLedSamples];
int ledSampleCounter = 0;
int light = 0;
// Software serial for XBee module
SoftwareSerial xbeeSerial(2, 3); // RX, TX
void setup() {
Serial.begin(SERIAL_BAUDRATE);
xbeeSerial.begin(SERIAL_BAUDRATE);
}
void loop() {
readLightsensor();
if (ledSampleCounter >= numLedSamples)
sendLightData();
delay(FETCH_INTERVAL);
}
void readLightsensor() {
+ ledSamples[ledSampleCounter] = analogRead(LIGHTSENSOR_PIN);
- int sample = analogRead(LIGHTSENSOR_PIN);
- Serial.print("d:");Serial.println(sample);
- ledSamples[ledSampleCounter] = sample;
ledSampleCounter++;
+ ledSampleCounter %= numLedSamples;
}
void sendLightData() {
float avg = 0.0f;
for (int i = 0; i < numLedSamples; i++)
avg += ledSamples[i];
avg /= numLedSamples;
xbeeSerial.print("l=");xbeeSerial.println(avg);
- ledSampleCounter = 0;
} | 6 | 0.122449 | 2 | 4 |
feabc4db34f6a1b15972f1c77306e83a53d61914 | src/AsyncCreatable.js | src/AsyncCreatable.js | import React from 'react';
import Select from './Select';
function reduce(obj, props = {}){
return Object.keys(obj)
.reduce((props, key) => {
const value = obj[key];
if (value !== undefined) props[key] = value;
return props;
}, props);
}
const AsyncCreatable = React.createClass({
displayName: 'AsyncCreatableSelect',
focus () {
this.select.focus();
},
render () {
return (
<Select.Async {...this.props}>
{(asyncProps) => (
<Select.Creatable {...this.props}>
{(creatableProps) => (
<Select
{...reduce(asyncProps, reduce(creatableProps, {}))}
onInputChange={(input) => {
creatableProps.onInputChange(input);
return asyncProps.onInputChange(input);
}}
ref={(ref) => {
this.select = ref;
creatableProps.ref(ref);
asyncProps.ref(ref);
}}
/>
)}
</Select.Creatable>
)}
</Select.Async>
);
}
});
module.exports = AsyncCreatable;
| import React from 'react';
import createClass from 'create-react-class';
import Select from './Select';
function reduce(obj, props = {}){
return Object.keys(obj)
.reduce((props, key) => {
const value = obj[key];
if (value !== undefined) props[key] = value;
return props;
}, props);
}
const AsyncCreatable = createClass({
displayName: 'AsyncCreatableSelect',
focus () {
this.select.focus();
},
render () {
return (
<Select.Async {...this.props}>
{(asyncProps) => (
<Select.Creatable {...this.props}>
{(creatableProps) => (
<Select
{...reduce(asyncProps, reduce(creatableProps, {}))}
onInputChange={(input) => {
creatableProps.onInputChange(input);
return asyncProps.onInputChange(input);
}}
ref={(ref) => {
this.select = ref;
creatableProps.ref(ref);
asyncProps.ref(ref);
}}
/>
)}
</Select.Creatable>
)}
</Select.Async>
);
}
});
module.exports = AsyncCreatable;
| Migrate rest of src overto createClass pkg | Migrate rest of src overto createClass pkg
| JavaScript | mit | submittable/react-select,serkanozer/react-select,OpenGov/react-select,mmpro/react-select,f-camacho/react-select,JedWatson/react-select,mobile5dev/react-select,JedWatson/react-select | javascript | ## Code Before:
import React from 'react';
import Select from './Select';
function reduce(obj, props = {}){
return Object.keys(obj)
.reduce((props, key) => {
const value = obj[key];
if (value !== undefined) props[key] = value;
return props;
}, props);
}
const AsyncCreatable = React.createClass({
displayName: 'AsyncCreatableSelect',
focus () {
this.select.focus();
},
render () {
return (
<Select.Async {...this.props}>
{(asyncProps) => (
<Select.Creatable {...this.props}>
{(creatableProps) => (
<Select
{...reduce(asyncProps, reduce(creatableProps, {}))}
onInputChange={(input) => {
creatableProps.onInputChange(input);
return asyncProps.onInputChange(input);
}}
ref={(ref) => {
this.select = ref;
creatableProps.ref(ref);
asyncProps.ref(ref);
}}
/>
)}
</Select.Creatable>
)}
</Select.Async>
);
}
});
module.exports = AsyncCreatable;
## Instruction:
Migrate rest of src overto createClass pkg
## Code After:
import React from 'react';
import createClass from 'create-react-class';
import Select from './Select';
function reduce(obj, props = {}){
return Object.keys(obj)
.reduce((props, key) => {
const value = obj[key];
if (value !== undefined) props[key] = value;
return props;
}, props);
}
const AsyncCreatable = createClass({
displayName: 'AsyncCreatableSelect',
focus () {
this.select.focus();
},
render () {
return (
<Select.Async {...this.props}>
{(asyncProps) => (
<Select.Creatable {...this.props}>
{(creatableProps) => (
<Select
{...reduce(asyncProps, reduce(creatableProps, {}))}
onInputChange={(input) => {
creatableProps.onInputChange(input);
return asyncProps.onInputChange(input);
}}
ref={(ref) => {
this.select = ref;
creatableProps.ref(ref);
asyncProps.ref(ref);
}}
/>
)}
</Select.Creatable>
)}
</Select.Async>
);
}
});
module.exports = AsyncCreatable;
| import React from 'react';
+ import createClass from 'create-react-class';
import Select from './Select';
function reduce(obj, props = {}){
return Object.keys(obj)
.reduce((props, key) => {
const value = obj[key];
if (value !== undefined) props[key] = value;
return props;
}, props);
}
- const AsyncCreatable = React.createClass({
? ------
+ const AsyncCreatable = createClass({
displayName: 'AsyncCreatableSelect',
focus () {
this.select.focus();
},
render () {
return (
<Select.Async {...this.props}>
{(asyncProps) => (
<Select.Creatable {...this.props}>
{(creatableProps) => (
<Select
{...reduce(asyncProps, reduce(creatableProps, {}))}
onInputChange={(input) => {
creatableProps.onInputChange(input);
return asyncProps.onInputChange(input);
}}
ref={(ref) => {
this.select = ref;
creatableProps.ref(ref);
asyncProps.ref(ref);
}}
/>
)}
</Select.Creatable>
)}
</Select.Async>
);
}
});
module.exports = AsyncCreatable; | 3 | 0.065217 | 2 | 1 |
610532ac6a9c652c54dcbe1ef558ddd726fc969b | pkgs/applications/audio/fluidsynth/default.nix | pkgs/applications/audio/fluidsynth/default.nix | { stdenv, fetchurl, alsaLib, glib, jackaudio, libsndfile, pkgconfig
, pulseaudio, cmake }:
stdenv.mkDerivation rec {
name = "fluidsynth-${version}";
version = "1.1.6";
src = fetchurl {
url = "mirror://sourceforge/fluidsynth/${name}.tar.bz2";
sha256 = "00gn93bx4cz9bfwf3a8xyj2by7w23nca4zxf09ll53kzpzglg2yj";
};
preBuild = stdenv.lib.optionalString stdenv.isDarwin ''
sed -i '40 i\
#include <CoreAudio/AudioHardware.h>\
#include <CoreAudio/AudioHardwareDeprecated.h>' \
src/drivers/fluid_coreaudio.c
'';
NIX_LDFLAGS = stdenv.lib.optionalString stdenv.isDarwin
"-framework CoreAudio";
buildInputs = [ cmake glib libsndfile pkgconfig ]
++ stdenv.lib.optionals (!stdenv.isDarwin) [ alsaLib pulseaudio jackaudio ];
meta = with stdenv.lib; {
description = "Real-time software synthesizer based on the SoundFont 2 specifications";
homepage = http://www.fluidsynth.org;
license = licenses.lgpl2;
maintainers = with maintainers; [ goibhniu lovek323 ];
platforms = platforms.unix;
};
}
| { stdenv, fetchurl, alsaLib, glib, jackaudio, libsndfile, pkgconfig
, pulseaudio }:
stdenv.mkDerivation rec {
name = "fluidsynth-${version}";
version = "1.1.6";
src = fetchurl {
url = "mirror://sourceforge/fluidsynth/${name}.tar.bz2";
sha256 = "00gn93bx4cz9bfwf3a8xyj2by7w23nca4zxf09ll53kzpzglg2yj";
};
preBuild = stdenv.lib.optionalString stdenv.isDarwin ''
sed -i '40 i\
#include <CoreAudio/AudioHardware.h>\
#include <CoreAudio/AudioHardwareDeprecated.h>' \
src/drivers/fluid_coreaudio.c
'';
NIX_LDFLAGS = stdenv.lib.optionalString stdenv.isDarwin
"-framework CoreAudio";
buildInputs = [ glib libsndfile pkgconfig ]
++ stdenv.lib.optionals (!stdenv.isDarwin) [ alsaLib pulseaudio jackaudio ];
meta = with stdenv.lib; {
description = "Real-time software synthesizer based on the SoundFont 2 specifications";
homepage = http://www.fluidsynth.org;
license = licenses.lgpl2;
maintainers = with maintainers; [ goibhniu lovek323 ];
platforms = platforms.unix;
};
}
| Revert "fluidsynth: switch to cmake build system" which causes mpd and calf to fail to detect fluidsynth. | Revert "fluidsynth: switch to cmake build system" which causes mpd and calf to fail to detect
fluidsynth.
This reverts commit cd16faa25738e1fd885279b0707e6a842e5479c8.
| Nix | mit | NixOS/nixpkgs,NixOS/nixpkgs,NixOS/nixpkgs,NixOS/nixpkgs,triton/triton,triton/triton,SymbiFlow/nixpkgs,NixOS/nixpkgs,NixOS/nixpkgs,NixOS/nixpkgs,SymbiFlow/nixpkgs,SymbiFlow/nixpkgs,NixOS/nixpkgs,triton/triton,SymbiFlow/nixpkgs,NixOS/nixpkgs,triton/triton,SymbiFlow/nixpkgs,SymbiFlow/nixpkgs,SymbiFlow/nixpkgs,NixOS/nixpkgs,NixOS/nixpkgs,SymbiFlow/nixpkgs,NixOS/nixpkgs,triton/triton,NixOS/nixpkgs,triton/triton,SymbiFlow/nixpkgs,SymbiFlow/nixpkgs,SymbiFlow/nixpkgs,triton/triton,SymbiFlow/nixpkgs,NixOS/nixpkgs,triton/triton,SymbiFlow/nixpkgs,NixOS/nixpkgs | nix | ## Code Before:
{ stdenv, fetchurl, alsaLib, glib, jackaudio, libsndfile, pkgconfig
, pulseaudio, cmake }:
stdenv.mkDerivation rec {
name = "fluidsynth-${version}";
version = "1.1.6";
src = fetchurl {
url = "mirror://sourceforge/fluidsynth/${name}.tar.bz2";
sha256 = "00gn93bx4cz9bfwf3a8xyj2by7w23nca4zxf09ll53kzpzglg2yj";
};
preBuild = stdenv.lib.optionalString stdenv.isDarwin ''
sed -i '40 i\
#include <CoreAudio/AudioHardware.h>\
#include <CoreAudio/AudioHardwareDeprecated.h>' \
src/drivers/fluid_coreaudio.c
'';
NIX_LDFLAGS = stdenv.lib.optionalString stdenv.isDarwin
"-framework CoreAudio";
buildInputs = [ cmake glib libsndfile pkgconfig ]
++ stdenv.lib.optionals (!stdenv.isDarwin) [ alsaLib pulseaudio jackaudio ];
meta = with stdenv.lib; {
description = "Real-time software synthesizer based on the SoundFont 2 specifications";
homepage = http://www.fluidsynth.org;
license = licenses.lgpl2;
maintainers = with maintainers; [ goibhniu lovek323 ];
platforms = platforms.unix;
};
}
## Instruction:
Revert "fluidsynth: switch to cmake build system" which causes mpd and calf to fail to detect
fluidsynth.
This reverts commit cd16faa25738e1fd885279b0707e6a842e5479c8.
## Code After:
{ stdenv, fetchurl, alsaLib, glib, jackaudio, libsndfile, pkgconfig
, pulseaudio }:
stdenv.mkDerivation rec {
name = "fluidsynth-${version}";
version = "1.1.6";
src = fetchurl {
url = "mirror://sourceforge/fluidsynth/${name}.tar.bz2";
sha256 = "00gn93bx4cz9bfwf3a8xyj2by7w23nca4zxf09ll53kzpzglg2yj";
};
preBuild = stdenv.lib.optionalString stdenv.isDarwin ''
sed -i '40 i\
#include <CoreAudio/AudioHardware.h>\
#include <CoreAudio/AudioHardwareDeprecated.h>' \
src/drivers/fluid_coreaudio.c
'';
NIX_LDFLAGS = stdenv.lib.optionalString stdenv.isDarwin
"-framework CoreAudio";
buildInputs = [ glib libsndfile pkgconfig ]
++ stdenv.lib.optionals (!stdenv.isDarwin) [ alsaLib pulseaudio jackaudio ];
meta = with stdenv.lib; {
description = "Real-time software synthesizer based on the SoundFont 2 specifications";
homepage = http://www.fluidsynth.org;
license = licenses.lgpl2;
maintainers = with maintainers; [ goibhniu lovek323 ];
platforms = platforms.unix;
};
}
| { stdenv, fetchurl, alsaLib, glib, jackaudio, libsndfile, pkgconfig
- , pulseaudio, cmake }:
? -------
+ , pulseaudio }:
stdenv.mkDerivation rec {
name = "fluidsynth-${version}";
version = "1.1.6";
src = fetchurl {
url = "mirror://sourceforge/fluidsynth/${name}.tar.bz2";
sha256 = "00gn93bx4cz9bfwf3a8xyj2by7w23nca4zxf09ll53kzpzglg2yj";
};
preBuild = stdenv.lib.optionalString stdenv.isDarwin ''
sed -i '40 i\
#include <CoreAudio/AudioHardware.h>\
#include <CoreAudio/AudioHardwareDeprecated.h>' \
src/drivers/fluid_coreaudio.c
'';
NIX_LDFLAGS = stdenv.lib.optionalString stdenv.isDarwin
"-framework CoreAudio";
- buildInputs = [ cmake glib libsndfile pkgconfig ]
? ------
+ buildInputs = [ glib libsndfile pkgconfig ]
++ stdenv.lib.optionals (!stdenv.isDarwin) [ alsaLib pulseaudio jackaudio ];
meta = with stdenv.lib; {
description = "Real-time software synthesizer based on the SoundFont 2 specifications";
homepage = http://www.fluidsynth.org;
license = licenses.lgpl2;
maintainers = with maintainers; [ goibhniu lovek323 ];
platforms = platforms.unix;
};
} | 4 | 0.121212 | 2 | 2 |
8a23b53c3842586d2cf23cbecd664167bd602a38 | .travis.yml | .travis.yml | language: go
go:
- "1.13.x"
- "1.14.x"
- master
before_install:
- go get github.com/mitchellh/gox
before_deploy:
- go get github.com/tcnksm/ghr
script: make all
deploy:
- provider: script
script: ./deploy.sh
skip_cleanup: true
on:
go: "1.14.x"
tags: true
| language: go
go:
- "1.13.x"
- "1.14.x"
- "1.15.x"
- master
before_install:
- go get github.com/mitchellh/gox
before_deploy:
- go get github.com/tcnksm/ghr
script: make all
deploy:
- provider: script
script: ./deploy.sh
skip_cleanup: true
on:
go: "1.14.x"
tags: true
| Build in Travis-CI with Go 1.15. | Build in Travis-CI with Go 1.15.
| YAML | apache-2.0 | VirusTotal/vt-cli,VirusTotal/vt-cli | yaml | ## Code Before:
language: go
go:
- "1.13.x"
- "1.14.x"
- master
before_install:
- go get github.com/mitchellh/gox
before_deploy:
- go get github.com/tcnksm/ghr
script: make all
deploy:
- provider: script
script: ./deploy.sh
skip_cleanup: true
on:
go: "1.14.x"
tags: true
## Instruction:
Build in Travis-CI with Go 1.15.
## Code After:
language: go
go:
- "1.13.x"
- "1.14.x"
- "1.15.x"
- master
before_install:
- go get github.com/mitchellh/gox
before_deploy:
- go get github.com/tcnksm/ghr
script: make all
deploy:
- provider: script
script: ./deploy.sh
skip_cleanup: true
on:
go: "1.14.x"
tags: true
| language: go
go:
- "1.13.x"
- "1.14.x"
+ - "1.15.x"
- master
before_install:
- go get github.com/mitchellh/gox
before_deploy:
- go get github.com/tcnksm/ghr
script: make all
deploy:
- provider: script
script: ./deploy.sh
skip_cleanup: true
on:
go: "1.14.x"
tags: true | 1 | 0.045455 | 1 | 0 |
fb3339b458f62aa6ab2aa4330e93cdcb8f6a3cec | cloud/gcp/chapter-1.md | cloud/gcp/chapter-1.md |
SORACOM を初めてお使いになる肩は、
|
SORACOM を初めてお使いになる方は、下記のページを参考にアカウントの作成・支払情報の設定・Air SIM の登録を行ってください。
- [SORACOM アカウントの作成](https://dev.soracom.io/jp/start/console/#account)
- [支払情報の設定](https://dev.soracom.io/jp/start/console/#payment)
- [Air SIM の登録](https://dev.soracom.io/jp/start/console/#registsim)
> 同一ページ内へのリンクとなります
| Add link to getting started guide | Add link to getting started guide
アカウント作成などは、Getting Started Guide へのリンクとする
| Markdown | apache-2.0 | soracom/handson,soracom/handson,soracom/handson | markdown | ## Code Before:
SORACOM を初めてお使いになる肩は、
## Instruction:
Add link to getting started guide
アカウント作成などは、Getting Started Guide へのリンクとする
## Code After:
SORACOM を初めてお使いになる方は、下記のページを参考にアカウントの作成・支払情報の設定・Air SIM の登録を行ってください。
- [SORACOM アカウントの作成](https://dev.soracom.io/jp/start/console/#account)
- [支払情報の設定](https://dev.soracom.io/jp/start/console/#payment)
- [Air SIM の登録](https://dev.soracom.io/jp/start/console/#registsim)
> 同一ページ内へのリンクとなります
|
- SORACOM を初めてお使いになる肩は、
+ SORACOM を初めてお使いになる方は、下記のページを参考にアカウントの作成・支払情報の設定・Air SIM の登録を行ってください。
+
+ - [SORACOM アカウントの作成](https://dev.soracom.io/jp/start/console/#account)
+ - [支払情報の設定](https://dev.soracom.io/jp/start/console/#payment)
+ - [Air SIM の登録](https://dev.soracom.io/jp/start/console/#registsim)
+
+ > 同一ページ内へのリンクとなります | 8 | 4 | 7 | 1 |
a9ee64c46477f6e79126e6cd50820afea26dbb45 | .circleci/build_node_module.sh | .circleci/build_node_module.sh | echo "=====>Install nvm"
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash
export NVM_DIR="${XDG_CONFIG_HOME/:-$HOME/.}nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
source ~/.bashrc
# Issue for MacOS: dyld: Library not loaded: /usr/local/opt/icu4c/lib/libicui18n.62.dylib
if [ $(uname) == "Darwin" ]; then
brew upgrade
fi
echo "=====>Change node version"
node --version
nvm install 8.9.4
nvm use 8.9.4
node --version
echo "=====>Build node module"
cd ledger-core-samples/nodejs
# Speed up module's build
export JOBS=8
yarn
mkdir tmp
node tests/basic-test.js
LIB_VERSION=$(node tests/lib-version.js)
if [ -z "$CIRCLE_TAG" ]; then
COMMIT_HASH=`echo $CIRCLE_SHA1 | cut -c 1-6`
LIB_VERSION="$LIB_VERSION-rc-$COMMIT_HASH"
fi
echo "export LIB_VERSION=$LIB_VERSION" >> $BASH_ENV
echo "=====> Libcore version"
echo $LIB_VERSION | echo "=====>Install nvm"
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash
export NVM_DIR="${XDG_CONFIG_HOME/:-$HOME/.}nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
source ~/.bashrc
# Issue for MacOS: dyld: Library not loaded: /usr/local/opt/icu4c/lib/libicui18n.62.dylib
if [ $(uname) == "Darwin" ]; then
brew unlink python@2
brew upgrade
fi
echo "=====>Change node version"
node --version
nvm install 8.9.4
nvm use 8.9.4
node --version
echo "=====>Build node module"
cd ledger-core-samples/nodejs
# Speed up module's build
export JOBS=8
yarn
mkdir tmp
node tests/basic-test.js
LIB_VERSION=$(node tests/lib-version.js)
if [ -z "$CIRCLE_TAG" ]; then
COMMIT_HASH=`echo $CIRCLE_SHA1 | cut -c 1-6`
LIB_VERSION="$LIB_VERSION-rc-$COMMIT_HASH"
fi
echo "export LIB_VERSION=$LIB_VERSION" >> $BASH_ENV
echo "=====> Libcore version"
echo $LIB_VERSION | Fix CI: unlink python2 to avoid MacOS random failures when initializing submodules | Fix CI: unlink python2 to avoid MacOS random failures when initializing submodules
| Shell | mit | LedgerHQ/lib-ledger-core,LedgerHQ/lib-ledger-core,LedgerHQ/lib-ledger-core,LedgerHQ/lib-ledger-core,LedgerHQ/lib-ledger-core,LedgerHQ/lib-ledger-core,LedgerHQ/lib-ledger-core | shell | ## Code Before:
echo "=====>Install nvm"
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash
export NVM_DIR="${XDG_CONFIG_HOME/:-$HOME/.}nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
source ~/.bashrc
# Issue for MacOS: dyld: Library not loaded: /usr/local/opt/icu4c/lib/libicui18n.62.dylib
if [ $(uname) == "Darwin" ]; then
brew upgrade
fi
echo "=====>Change node version"
node --version
nvm install 8.9.4
nvm use 8.9.4
node --version
echo "=====>Build node module"
cd ledger-core-samples/nodejs
# Speed up module's build
export JOBS=8
yarn
mkdir tmp
node tests/basic-test.js
LIB_VERSION=$(node tests/lib-version.js)
if [ -z "$CIRCLE_TAG" ]; then
COMMIT_HASH=`echo $CIRCLE_SHA1 | cut -c 1-6`
LIB_VERSION="$LIB_VERSION-rc-$COMMIT_HASH"
fi
echo "export LIB_VERSION=$LIB_VERSION" >> $BASH_ENV
echo "=====> Libcore version"
echo $LIB_VERSION
## Instruction:
Fix CI: unlink python2 to avoid MacOS random failures when initializing submodules
## Code After:
echo "=====>Install nvm"
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash
export NVM_DIR="${XDG_CONFIG_HOME/:-$HOME/.}nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
source ~/.bashrc
# Issue for MacOS: dyld: Library not loaded: /usr/local/opt/icu4c/lib/libicui18n.62.dylib
if [ $(uname) == "Darwin" ]; then
brew unlink python@2
brew upgrade
fi
echo "=====>Change node version"
node --version
nvm install 8.9.4
nvm use 8.9.4
node --version
echo "=====>Build node module"
cd ledger-core-samples/nodejs
# Speed up module's build
export JOBS=8
yarn
mkdir tmp
node tests/basic-test.js
LIB_VERSION=$(node tests/lib-version.js)
if [ -z "$CIRCLE_TAG" ]; then
COMMIT_HASH=`echo $CIRCLE_SHA1 | cut -c 1-6`
LIB_VERSION="$LIB_VERSION-rc-$COMMIT_HASH"
fi
echo "export LIB_VERSION=$LIB_VERSION" >> $BASH_ENV
echo "=====> Libcore version"
echo $LIB_VERSION | echo "=====>Install nvm"
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash
export NVM_DIR="${XDG_CONFIG_HOME/:-$HOME/.}nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
source ~/.bashrc
# Issue for MacOS: dyld: Library not loaded: /usr/local/opt/icu4c/lib/libicui18n.62.dylib
if [ $(uname) == "Darwin" ]; then
+ brew unlink python@2
brew upgrade
fi
echo "=====>Change node version"
node --version
nvm install 8.9.4
nvm use 8.9.4
node --version
echo "=====>Build node module"
cd ledger-core-samples/nodejs
# Speed up module's build
export JOBS=8
yarn
mkdir tmp
node tests/basic-test.js
LIB_VERSION=$(node tests/lib-version.js)
if [ -z "$CIRCLE_TAG" ]; then
COMMIT_HASH=`echo $CIRCLE_SHA1 | cut -c 1-6`
LIB_VERSION="$LIB_VERSION-rc-$COMMIT_HASH"
fi
echo "export LIB_VERSION=$LIB_VERSION" >> $BASH_ENV
echo "=====> Libcore version"
echo $LIB_VERSION | 1 | 0.027027 | 1 | 0 |
1c6cc2317668872b499e6d7a5318917f748da22b | apps/tools/components/send_invitation/index.coffee | apps/tools/components/send_invitation/index.coffee | Promise = require 'bluebird-q'
{ API_URL } = require('sharify').data
{ track } = require '../../../../lib/analytics.coffee'
Serializer = require '../../../../components/form/serializer.coffee'
module.exports = ($el) ->
$form = $el.find '.js-form'
$submit = $el.find '.js-submit'
$errors = $el.find '.js-errors'
$form.on 'submit', (e) ->
e.preventDefault()
serializer = new Serializer $form
label = $submit.text()
$submit
.prop 'disabled', true
.text 'Sending...'
Promise $.ajax
url: "#{API_URL}/invitees/invite"
type: 'POST'
data: serializer.data()
.then ->
$form.trigger 'reset'
$submit
.prop 'disabled', false
.text 'Sent!'
setTimeout (-> $submit.text label), 2500
track.submit 'Invitation sent from user'
.catch ({ responseJSON: { message, description }}) ->
$errors
.show()
.html """
#{message}<br>
#{description}
"""
$submit
.prop 'disabled', false
.text 'Error'
setTimeout ->
$submit.text label
$errors.empty()
, 5000
track.error 'Invitation not sent, try again.'
| Promise = require 'bluebird-q'
{ API_URL } = require('sharify').data
{ track } = require '../../../../lib/analytics.coffee'
Serializer = require '../../../../components/form/serializer.coffee'
module.exports = ($el) ->
$form = $el.find '.js-form'
$submit = $el.find '.js-submit'
$errors = $el.find '.js-errors'
submissionTimeout = null;
$form.on 'submit', (e) ->
e.preventDefault()
submissionTimeout && clearTimeout(submissionTimeout);
serializer = new Serializer $form
label = $submit.text()
$submit
.prop 'disabled', true
.text 'Sending...'
Promise $.ajax
url: "#{API_URL}/invitees/invite"
type: 'POST'
data: serializer.data()
.then ->
$form.trigger 'reset'
$submit
.prop 'disabled', false
.text 'Sent!'
submissionTimeout = setTimeout (-> $submit.text label), 2500
track.submit 'Invitation sent from user'
.catch ({ responseJSON: { message, description }}) ->
$errors
.show()
.html """
#{message}<br>
#{description}
"""
$submit
.prop 'disabled', false
.text 'Error'
submissionTimeout = setTimeout ->
$submit.text label
$errors.empty()
, 5000
track.error 'Invitation not sent, try again.'
.catch ->
$errors
.show()
.html """
Something went wrong, please contact <a href='mailto:info@are.na'>info@are.na</a> if the problem persists.
"""
$submit
.prop 'disabled', false
.text label
submissionTimeout = setTimeout ->
$errors.empty()
, 15000
track.error 'Invitation not sent: server error. Try again.'
| Add catch all error handling in case of AJAX fail response | Add catch all error handling in case of AJAX fail response
- Add `fail` block to form submission request promise chain.
- Add timeout tracking so that old requests dont clear timeouts set by subsequent requests.
| CoffeeScript | mit | aredotna/ervell,aredotna/ervell,aredotna/ervell,aredotna/ervell,aredotna/ervell | coffeescript | ## Code Before:
Promise = require 'bluebird-q'
{ API_URL } = require('sharify').data
{ track } = require '../../../../lib/analytics.coffee'
Serializer = require '../../../../components/form/serializer.coffee'
module.exports = ($el) ->
$form = $el.find '.js-form'
$submit = $el.find '.js-submit'
$errors = $el.find '.js-errors'
$form.on 'submit', (e) ->
e.preventDefault()
serializer = new Serializer $form
label = $submit.text()
$submit
.prop 'disabled', true
.text 'Sending...'
Promise $.ajax
url: "#{API_URL}/invitees/invite"
type: 'POST'
data: serializer.data()
.then ->
$form.trigger 'reset'
$submit
.prop 'disabled', false
.text 'Sent!'
setTimeout (-> $submit.text label), 2500
track.submit 'Invitation sent from user'
.catch ({ responseJSON: { message, description }}) ->
$errors
.show()
.html """
#{message}<br>
#{description}
"""
$submit
.prop 'disabled', false
.text 'Error'
setTimeout ->
$submit.text label
$errors.empty()
, 5000
track.error 'Invitation not sent, try again.'
## Instruction:
Add catch all error handling in case of AJAX fail response
- Add `fail` block to form submission request promise chain.
- Add timeout tracking so that old requests dont clear timeouts set by subsequent requests.
## Code After:
Promise = require 'bluebird-q'
{ API_URL } = require('sharify').data
{ track } = require '../../../../lib/analytics.coffee'
Serializer = require '../../../../components/form/serializer.coffee'
module.exports = ($el) ->
$form = $el.find '.js-form'
$submit = $el.find '.js-submit'
$errors = $el.find '.js-errors'
submissionTimeout = null;
$form.on 'submit', (e) ->
e.preventDefault()
submissionTimeout && clearTimeout(submissionTimeout);
serializer = new Serializer $form
label = $submit.text()
$submit
.prop 'disabled', true
.text 'Sending...'
Promise $.ajax
url: "#{API_URL}/invitees/invite"
type: 'POST'
data: serializer.data()
.then ->
$form.trigger 'reset'
$submit
.prop 'disabled', false
.text 'Sent!'
submissionTimeout = setTimeout (-> $submit.text label), 2500
track.submit 'Invitation sent from user'
.catch ({ responseJSON: { message, description }}) ->
$errors
.show()
.html """
#{message}<br>
#{description}
"""
$submit
.prop 'disabled', false
.text 'Error'
submissionTimeout = setTimeout ->
$submit.text label
$errors.empty()
, 5000
track.error 'Invitation not sent, try again.'
.catch ->
$errors
.show()
.html """
Something went wrong, please contact <a href='mailto:info@are.na'>info@are.na</a> if the problem persists.
"""
$submit
.prop 'disabled', false
.text label
submissionTimeout = setTimeout ->
$errors.empty()
, 15000
track.error 'Invitation not sent: server error. Try again.'
| Promise = require 'bluebird-q'
{ API_URL } = require('sharify').data
{ track } = require '../../../../lib/analytics.coffee'
Serializer = require '../../../../components/form/serializer.coffee'
module.exports = ($el) ->
$form = $el.find '.js-form'
$submit = $el.find '.js-submit'
$errors = $el.find '.js-errors'
+ submissionTimeout = null;
+
$form.on 'submit', (e) ->
e.preventDefault()
+
+ submissionTimeout && clearTimeout(submissionTimeout);
serializer = new Serializer $form
label = $submit.text()
$submit
.prop 'disabled', true
.text 'Sending...'
Promise $.ajax
url: "#{API_URL}/invitees/invite"
type: 'POST'
data: serializer.data()
.then ->
$form.trigger 'reset'
$submit
.prop 'disabled', false
.text 'Sent!'
- setTimeout (-> $submit.text label), 2500
+ submissionTimeout = setTimeout (-> $submit.text label), 2500
? ++++++++++++++++++++
track.submit 'Invitation sent from user'
.catch ({ responseJSON: { message, description }}) ->
$errors
.show()
.html """
#{message}<br>
#{description}
"""
$submit
.prop 'disabled', false
.text 'Error'
- setTimeout ->
+ submissionTimeout = setTimeout ->
$submit.text label
$errors.empty()
, 5000
track.error 'Invitation not sent, try again.'
+
+ .catch ->
+ $errors
+ .show()
+ .html """
+ Something went wrong, please contact <a href='mailto:info@are.na'>info@are.na</a> if the problem persists.
+ """
+
+ $submit
+ .prop 'disabled', false
+ .text label
+
+ submissionTimeout = setTimeout ->
+ $errors.empty()
+ , 15000
+
+ track.error 'Invitation not sent: server error. Try again.' | 25 | 0.454545 | 23 | 2 |
43696b102bada7408c5c8151e4ae87e5a2855337 | ds_binary_tree_ft.py | ds_binary_tree_ft.py | def binary_tree(r):
pass
def main():
pass
if __name__ == '__main__':
main()
| from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
def binary_tree(r):
"""Binary tree using list of list."""
return [r, [], []]
def insert_left(root, new_branch):
left_tree = root.pop(1)
if len(left_tree) > 1:
root.insert(1, [new_branch, left_tree, []])
else:
root.insert(1, [new_branch, [], []])
return root
def insert_right(root, new_branch):
right_tree = root.pop(2)
if len(right_tree) > 1:
root.insert(2, [new_branch, [], right_tree])
else:
root.insert(2, [new_branch, [], []])
return root
def get_root_value(root):
return root[0]
def set_root_value(root, new_val):
root[0] = new_val
def get_left_tree(root):
return root[1]
def get_right_tree(root):
return root[2]
def main():
root = binary_tree(3)
print('root: {}'.format(root))
insert_left(root, 4)
print('insert_left(root, 4): {}'.format(root))
insert_left(root, 5)
print('insert_left(root, 5): {}'.format(root))
insert_right(root, 6)
print('insert_right(root, 6): {}'.format(root))
insert_right(root, 7)
print('insert_right(root, 7): {}'.format(root))
left = get_left_tree(root)
print('get_left_tree(root): {}'.format(left))
set_root_value(left, 9)
print('set_root_value(left, 9): {}'.format(left))
print('root: {}'.format(root))
insert_left(left, 11)
print('insert_left(left, 11): {}'.format(left))
print('root: {}'.format(root))
print('Get right tree of right tree:')
print(get_right_tree(get_right_tree(root)))
if __name__ == '__main__':
main()
| Complete ds: binary_tree using ls of ls | Complete ds: binary_tree using ls of ls
| Python | bsd-2-clause | bowen0701/algorithms_data_structures | python | ## Code Before:
def binary_tree(r):
pass
def main():
pass
if __name__ == '__main__':
main()
## Instruction:
Complete ds: binary_tree using ls of ls
## Code After:
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
def binary_tree(r):
"""Binary tree using list of list."""
return [r, [], []]
def insert_left(root, new_branch):
left_tree = root.pop(1)
if len(left_tree) > 1:
root.insert(1, [new_branch, left_tree, []])
else:
root.insert(1, [new_branch, [], []])
return root
def insert_right(root, new_branch):
right_tree = root.pop(2)
if len(right_tree) > 1:
root.insert(2, [new_branch, [], right_tree])
else:
root.insert(2, [new_branch, [], []])
return root
def get_root_value(root):
return root[0]
def set_root_value(root, new_val):
root[0] = new_val
def get_left_tree(root):
return root[1]
def get_right_tree(root):
return root[2]
def main():
root = binary_tree(3)
print('root: {}'.format(root))
insert_left(root, 4)
print('insert_left(root, 4): {}'.format(root))
insert_left(root, 5)
print('insert_left(root, 5): {}'.format(root))
insert_right(root, 6)
print('insert_right(root, 6): {}'.format(root))
insert_right(root, 7)
print('insert_right(root, 7): {}'.format(root))
left = get_left_tree(root)
print('get_left_tree(root): {}'.format(left))
set_root_value(left, 9)
print('set_root_value(left, 9): {}'.format(left))
print('root: {}'.format(root))
insert_left(left, 11)
print('insert_left(left, 11): {}'.format(left))
print('root: {}'.format(root))
print('Get right tree of right tree:')
print(get_right_tree(get_right_tree(root)))
if __name__ == '__main__':
main()
| + from __future__ import absolute_import
+ from __future__ import division
+ from __future__ import print_function
+
+
def binary_tree(r):
- pass
+ """Binary tree using list of list."""
+ return [r, [], []]
+
+
+ def insert_left(root, new_branch):
+ left_tree = root.pop(1)
+ if len(left_tree) > 1:
+ root.insert(1, [new_branch, left_tree, []])
+ else:
+ root.insert(1, [new_branch, [], []])
+ return root
+
+ def insert_right(root, new_branch):
+ right_tree = root.pop(2)
+ if len(right_tree) > 1:
+ root.insert(2, [new_branch, [], right_tree])
+ else:
+ root.insert(2, [new_branch, [], []])
+ return root
+
+
+ def get_root_value(root):
+ return root[0]
+
+ def set_root_value(root, new_val):
+ root[0] = new_val
+
+ def get_left_tree(root):
+ return root[1]
+
+ def get_right_tree(root):
+ return root[2]
def main():
- pass
+ root = binary_tree(3)
+ print('root: {}'.format(root))
+
+ insert_left(root, 4)
+ print('insert_left(root, 4): {}'.format(root))
+
+ insert_left(root, 5)
+ print('insert_left(root, 5): {}'.format(root))
+
+ insert_right(root, 6)
+ print('insert_right(root, 6): {}'.format(root))
+
+ insert_right(root, 7)
+ print('insert_right(root, 7): {}'.format(root))
+
+ left = get_left_tree(root)
+ print('get_left_tree(root): {}'.format(left))
+
+ set_root_value(left, 9)
+ print('set_root_value(left, 9): {}'.format(left))
+ print('root: {}'.format(root))
+
+ insert_left(left, 11)
+ print('insert_left(left, 11): {}'.format(left))
+ print('root: {}'.format(root))
+
+ print('Get right tree of right tree:')
+ print(get_right_tree(get_right_tree(root)))
if __name__ == '__main__':
- main()
+ main() | 69 | 6.9 | 66 | 3 |
4a2fcb50d8a8551a910d9524cbf2ed4bba35042f | src/ChatBubble/index.tsx | src/ChatBubble/index.tsx | import * as React from 'react';
import ChatBubbleProps from './interface';
import styles from './styles';
const defaultBubbleStyles = {
userBubble: {},
chatbubble: {},
text: {},
};
export default class ChatBubble extends React.Component {
props;
constructor(props: ChatBubbleProps) {
super(props);
}
public render() {
const { bubblesCentered } = this.props;
let { bubbleStyles } = this.props;
bubbleStyles = bubbleStyles || defaultBubbleStyles;
const { userBubble, chatbubble, text } = bubbleStyles;
// message.id 0 is reserved for blue
const chatBubbleStyles =
this.props.message.id === 0
? {
...styles.chatbubble,
...bubblesCentered ? {} : styles.chatbubbleOrientationNormal,
...chatbubble,
...userBubble,
}
: {
...styles.chatbubble,
...styles.recipientChatbubble,
...bubblesCentered
? {}
: styles.recipientChatbubbleOrientationNormal,
...chatbubble,
...userBubble,
};
return (
<div
style={{
...styles.chatbubbleWrapper,
}}
>
<div style={chatBubbleStyles}>
<p style={{ ...styles.p, ...text }}>{this.props.message.message}</p>
</div>
</div>
);
}
}
export { ChatBubbleProps };
| import * as React from 'react';
import ChatBubbleProps from './interface';
import styles from './styles';
const defaultBubbleStyles = {
userBubble: {},
chatbubble: {},
text: {},
};
export default class ChatBubble extends React.Component {
props;
constructor(props: ChatBubbleProps) {
super(props);
}
public render() {
const { bubblesCentered } = this.props;
let { bubbleStyles } = this.props;
bubbleStyles = bubbleStyles || defaultBubbleStyles;
const { userBubble, chatbubble, text } = bubbleStyles;
// message.id 0 is reserved for blue
const chatBubbleStyles =
this.props.message.id === 0
? {
...styles.chatbubble,
...bubblesCentered ? {} : styles.chatbubbleOrientationNormal,
...chatbubble,
...userBubble,
}
: {
...styles.chatbubble,
...styles.recipientChatbubble,
...bubblesCentered
? {}
: styles.recipientChatbubbleOrientationNormal,
...userBubble,
...chatbubble,
};
return (
<div
style={{
...styles.chatbubbleWrapper,
}}
>
<div style={chatBubbleStyles}>
<p style={{ ...styles.p, ...text }}>{this.props.message.message}</p>
</div>
</div>
);
}
}
export { ChatBubbleProps };
| Make user bubble and chat bubble styles apply independently. | Make user bubble and chat bubble styles apply independently.
Currently, when I use 'bubbleStyles', the useBubble style is getting
applied to both userBubble and chatbubble. This commit fixes this
issue and applies the right styles to the right bubbles.
| TypeScript | mit | brandonmowat/react-chat-ui,brandonmowat/react-chat-ui | typescript | ## Code Before:
import * as React from 'react';
import ChatBubbleProps from './interface';
import styles from './styles';
const defaultBubbleStyles = {
userBubble: {},
chatbubble: {},
text: {},
};
export default class ChatBubble extends React.Component {
props;
constructor(props: ChatBubbleProps) {
super(props);
}
public render() {
const { bubblesCentered } = this.props;
let { bubbleStyles } = this.props;
bubbleStyles = bubbleStyles || defaultBubbleStyles;
const { userBubble, chatbubble, text } = bubbleStyles;
// message.id 0 is reserved for blue
const chatBubbleStyles =
this.props.message.id === 0
? {
...styles.chatbubble,
...bubblesCentered ? {} : styles.chatbubbleOrientationNormal,
...chatbubble,
...userBubble,
}
: {
...styles.chatbubble,
...styles.recipientChatbubble,
...bubblesCentered
? {}
: styles.recipientChatbubbleOrientationNormal,
...chatbubble,
...userBubble,
};
return (
<div
style={{
...styles.chatbubbleWrapper,
}}
>
<div style={chatBubbleStyles}>
<p style={{ ...styles.p, ...text }}>{this.props.message.message}</p>
</div>
</div>
);
}
}
export { ChatBubbleProps };
## Instruction:
Make user bubble and chat bubble styles apply independently.
Currently, when I use 'bubbleStyles', the useBubble style is getting
applied to both userBubble and chatbubble. This commit fixes this
issue and applies the right styles to the right bubbles.
## Code After:
import * as React from 'react';
import ChatBubbleProps from './interface';
import styles from './styles';
const defaultBubbleStyles = {
userBubble: {},
chatbubble: {},
text: {},
};
export default class ChatBubble extends React.Component {
props;
constructor(props: ChatBubbleProps) {
super(props);
}
public render() {
const { bubblesCentered } = this.props;
let { bubbleStyles } = this.props;
bubbleStyles = bubbleStyles || defaultBubbleStyles;
const { userBubble, chatbubble, text } = bubbleStyles;
// message.id 0 is reserved for blue
const chatBubbleStyles =
this.props.message.id === 0
? {
...styles.chatbubble,
...bubblesCentered ? {} : styles.chatbubbleOrientationNormal,
...chatbubble,
...userBubble,
}
: {
...styles.chatbubble,
...styles.recipientChatbubble,
...bubblesCentered
? {}
: styles.recipientChatbubbleOrientationNormal,
...userBubble,
...chatbubble,
};
return (
<div
style={{
...styles.chatbubbleWrapper,
}}
>
<div style={chatBubbleStyles}>
<p style={{ ...styles.p, ...text }}>{this.props.message.message}</p>
</div>
</div>
);
}
}
export { ChatBubbleProps };
| import * as React from 'react';
import ChatBubbleProps from './interface';
import styles from './styles';
const defaultBubbleStyles = {
userBubble: {},
chatbubble: {},
text: {},
};
export default class ChatBubble extends React.Component {
props;
constructor(props: ChatBubbleProps) {
super(props);
}
public render() {
const { bubblesCentered } = this.props;
let { bubbleStyles } = this.props;
bubbleStyles = bubbleStyles || defaultBubbleStyles;
const { userBubble, chatbubble, text } = bubbleStyles;
// message.id 0 is reserved for blue
const chatBubbleStyles =
this.props.message.id === 0
? {
...styles.chatbubble,
...bubblesCentered ? {} : styles.chatbubbleOrientationNormal,
...chatbubble,
...userBubble,
}
: {
...styles.chatbubble,
...styles.recipientChatbubble,
...bubblesCentered
? {}
: styles.recipientChatbubbleOrientationNormal,
+ ...userBubble,
...chatbubble,
- ...userBubble,
};
return (
<div
style={{
...styles.chatbubbleWrapper,
}}
>
<div style={chatBubbleStyles}>
<p style={{ ...styles.p, ...text }}>{this.props.message.message}</p>
</div>
</div>
);
}
}
export { ChatBubbleProps }; | 2 | 0.035088 | 1 | 1 |
7e355008d3bc810b84ca4818e4aeecf494a89d20 | assets/components/checkblock/js/inputs/checkblock.js | assets/components/checkblock/js/inputs/checkblock.js | // Wrap your stuff in this module pattern for dependency injection
(function ($, ContentBlocks) {
// Add your custom input to the fieldTypes object as a function
// The dom variable contains the injected field (from the template)
// and the data variable contains field information, properties etc.
ContentBlocks.fieldTypes.checkblock = function(dom, data) {
var input = {
// Some optional variables can be defined here
};
// Do something when the input is being loaded
input.init = function() {
}
// Get the data from this input, it has to be a simple object.
input.getData = function() {
return {
value:$(document.getElementById('checkblock_' + data.generated_id)).is(':checked')
}
}
// Always return the input variable.
return input;
}
})(vcJquery, ContentBlocks); | // Wrap your stuff in this module pattern for dependency injection
(function ($, ContentBlocks) {
// Add your custom input to the fieldTypes object as a function
// The dom variable contains the injected field (from the template)
// and the data variable contains field information, properties etc.
ContentBlocks.fieldTypes.checkblock = function(dom, data) {
var input = {
// Some optional variables can be defined here
};
// Do something when the input is being loaded
input.init = function() {
$(dom.find('#checkblock_' + data.generated_id)).prop('checked', data.value);
}
// Get the data from this input, it has to be a simple object.
input.getData = function() {
return {
value:$(dom.find('#checkblock_' + data.generated_id)).is(':checked')
}
}
// Always return the input variable.
return input;
}
})(vcJquery, ContentBlocks); | Fix checkboxes not ticking themselves | Fix checkboxes not ticking themselves
Closes #1
| JavaScript | mit | jpdevries/checkblock,jpdevries/checkblock | javascript | ## Code Before:
// Wrap your stuff in this module pattern for dependency injection
(function ($, ContentBlocks) {
// Add your custom input to the fieldTypes object as a function
// The dom variable contains the injected field (from the template)
// and the data variable contains field information, properties etc.
ContentBlocks.fieldTypes.checkblock = function(dom, data) {
var input = {
// Some optional variables can be defined here
};
// Do something when the input is being loaded
input.init = function() {
}
// Get the data from this input, it has to be a simple object.
input.getData = function() {
return {
value:$(document.getElementById('checkblock_' + data.generated_id)).is(':checked')
}
}
// Always return the input variable.
return input;
}
})(vcJquery, ContentBlocks);
## Instruction:
Fix checkboxes not ticking themselves
Closes #1
## Code After:
// Wrap your stuff in this module pattern for dependency injection
(function ($, ContentBlocks) {
// Add your custom input to the fieldTypes object as a function
// The dom variable contains the injected field (from the template)
// and the data variable contains field information, properties etc.
ContentBlocks.fieldTypes.checkblock = function(dom, data) {
var input = {
// Some optional variables can be defined here
};
// Do something when the input is being loaded
input.init = function() {
$(dom.find('#checkblock_' + data.generated_id)).prop('checked', data.value);
}
// Get the data from this input, it has to be a simple object.
input.getData = function() {
return {
value:$(dom.find('#checkblock_' + data.generated_id)).is(':checked')
}
}
// Always return the input variable.
return input;
}
})(vcJquery, ContentBlocks); | // Wrap your stuff in this module pattern for dependency injection
(function ($, ContentBlocks) {
// Add your custom input to the fieldTypes object as a function
// The dom variable contains the injected field (from the template)
// and the data variable contains field information, properties etc.
ContentBlocks.fieldTypes.checkblock = function(dom, data) {
var input = {
// Some optional variables can be defined here
};
// Do something when the input is being loaded
input.init = function() {
+ $(dom.find('#checkblock_' + data.generated_id)).prop('checked', data.value);
}
// Get the data from this input, it has to be a simple object.
input.getData = function() {
return {
- value:$(document.getElementById('checkblock_' + data.generated_id)).is(':checked')
? -- ^ ---------------
+ value:$(dom.find('#checkblock_' + data.generated_id)).is(':checked')
? ^^^ +
}
}
// Always return the input variable.
return input;
}
})(vcJquery, ContentBlocks); | 3 | 0.12 | 2 | 1 |
9e90551ec07cb76b671762913e3b21a01667718b | _protected/app/system/modules/two-factor-auth/views/base/tpl/main/setup.tpl | _protected/app/system/modules/two-factor-auth/views/base/tpl/main/setup.tpl | <div class="center">
{if $is_enabled}
<p>{lang 'To use it, you have first to download Authenticator app available for <a href="%0%">Android</a> and <a href="%1%">iOS</a>.', 'https://play.google.com/store/apps/details?id=com.google.android.apps.authenticator2', 'https://itunes.apple.com/en/app/google-authenticator/id388497605'}</p>
<p><img src="{qr_core}" alt="Two-Factor authentication QR code" /></p>
{/if}
{{ $text = !$is_enabled ? t('Turn On Two-Factor Authentication') : t('Turn Off Two-Factor Authentication') }}
<div class="bold">{{ LinkCoreForm::display($text, 'two-factor-auth', 'main', 'setup/' . $mod, array('status' => $is_enabled)) }}</div>
<div>{{ LinkCoreForm::display('Download the recovery backup code', 'two-factor-auth', 'main', 'setup/' . $mod, array('get_backup_code' => 1)) }}</div>
</div>
| <div class="center">
{if $is_enabled}
<p>{lang 'To use it, you have first to download Authenticator app available for <a href="%0%">Android</a> and <a href="%1%">iOS</a>.', 'https://play.google.com/store/apps/details?id=com.google.android.apps.authenticator2', 'https://itunes.apple.com/en/app/google-authenticator/id388497605'}</p>
<p><img src="{qr_core}" alt="Two-Factor authentication QR code" /></p>
{/if}
{{ $text = !$is_enabled ? t('Turn On Two-Factor Authentication') : t('Turn Off Two-Factor Authentication') }}
<div class="bold">{{ LinkCoreForm::display($text, 'two-factor-auth', 'main', 'setup/' . $mod, array('status' => $is_enabled)) }}</div>
<div>{{ LinkCoreForm::display('Download the backup recovery code', 'two-factor-auth', 'main', 'setup/' . $mod, array('get_backup_code' => 1)) }}</div>
</div>
| Change name for "2FA backup recovery code" | Change name for "2FA backup recovery code"
| Smarty | mit | pH7Software/pH7-Social-Dating-CMS,pH7Software/pH7-Social-Dating-CMS,pH7Software/pH7-Social-Dating-CMS,pH7Software/pH7-Social-Dating-CMS | smarty | ## Code Before:
<div class="center">
{if $is_enabled}
<p>{lang 'To use it, you have first to download Authenticator app available for <a href="%0%">Android</a> and <a href="%1%">iOS</a>.', 'https://play.google.com/store/apps/details?id=com.google.android.apps.authenticator2', 'https://itunes.apple.com/en/app/google-authenticator/id388497605'}</p>
<p><img src="{qr_core}" alt="Two-Factor authentication QR code" /></p>
{/if}
{{ $text = !$is_enabled ? t('Turn On Two-Factor Authentication') : t('Turn Off Two-Factor Authentication') }}
<div class="bold">{{ LinkCoreForm::display($text, 'two-factor-auth', 'main', 'setup/' . $mod, array('status' => $is_enabled)) }}</div>
<div>{{ LinkCoreForm::display('Download the recovery backup code', 'two-factor-auth', 'main', 'setup/' . $mod, array('get_backup_code' => 1)) }}</div>
</div>
## Instruction:
Change name for "2FA backup recovery code"
## Code After:
<div class="center">
{if $is_enabled}
<p>{lang 'To use it, you have first to download Authenticator app available for <a href="%0%">Android</a> and <a href="%1%">iOS</a>.', 'https://play.google.com/store/apps/details?id=com.google.android.apps.authenticator2', 'https://itunes.apple.com/en/app/google-authenticator/id388497605'}</p>
<p><img src="{qr_core}" alt="Two-Factor authentication QR code" /></p>
{/if}
{{ $text = !$is_enabled ? t('Turn On Two-Factor Authentication') : t('Turn Off Two-Factor Authentication') }}
<div class="bold">{{ LinkCoreForm::display($text, 'two-factor-auth', 'main', 'setup/' . $mod, array('status' => $is_enabled)) }}</div>
<div>{{ LinkCoreForm::display('Download the backup recovery code', 'two-factor-auth', 'main', 'setup/' . $mod, array('get_backup_code' => 1)) }}</div>
</div>
| <div class="center">
{if $is_enabled}
<p>{lang 'To use it, you have first to download Authenticator app available for <a href="%0%">Android</a> and <a href="%1%">iOS</a>.', 'https://play.google.com/store/apps/details?id=com.google.android.apps.authenticator2', 'https://itunes.apple.com/en/app/google-authenticator/id388497605'}</p>
<p><img src="{qr_core}" alt="Two-Factor authentication QR code" /></p>
{/if}
{{ $text = !$is_enabled ? t('Turn On Two-Factor Authentication') : t('Turn Off Two-Factor Authentication') }}
<div class="bold">{{ LinkCoreForm::display($text, 'two-factor-auth', 'main', 'setup/' . $mod, array('status' => $is_enabled)) }}</div>
- <div>{{ LinkCoreForm::display('Download the recovery backup code', 'two-factor-auth', 'main', 'setup/' . $mod, array('get_backup_code' => 1)) }}</div>
? -------
+ <div>{{ LinkCoreForm::display('Download the backup recovery code', 'two-factor-auth', 'main', 'setup/' . $mod, array('get_backup_code' => 1)) }}</div>
? +++++++
</div> | 2 | 0.181818 | 1 | 1 |
66799f2b504562bce78911e4d84c830796359482 | spec/acceptance/nodesets/centos-7-x64.yml | spec/acceptance/nodesets/centos-7-x64.yml | HOSTS:
centos-7-x64:
roles:
- master
platform: el-7-x86_64
box: chef/centos-7.0
box_url: https://vagrantcloud.com/chef/boxes/centos-7.0
hypervisor: vagrant
CONFIG:
log_level: verbose
type: foss
| HOSTS:
centos-7-x64:
roles:
- master
platform: el-7-x86_64
box: puppetlabs/centos-7.0-64-nocm
box_url: https://vagrantcloud.com/puppetlabs/boxes/centos-7.0-64-nocm
hypervisor: vagrant
CONFIG:
log_level: verbose
type: foss
| Change box to puppetlabs/centos-7.0-64-nocm. Works with Vagrant 1.7.2 and VirtualBox 4.3.26. Previos config used a box that would fail compiliation of guest additions and thus could not mount drive on guest OS. | Change box to puppetlabs/centos-7.0-64-nocm. Works with Vagrant 1.7.2 and VirtualBox 4.3.26. Previos config used a box that would fail compiliation of guest additions and thus could not mount drive on guest OS.
| YAML | apache-2.0 | basho-labs/puppet-riak,SPBTV/puppet-riak,GabrielNicolasAvellaneda/puppet-riak,DevOpsFu/puppet-riak,DevOpsFu/puppet-riak,basho-labs/puppet-riak,DevOpsFu/puppet-riak,SPBTV/puppet-riak,GabrielNicolasAvellaneda/puppet-riak,al4/puppet-riak,GabrielNicolasAvellaneda/puppet-riak,al4/puppet-riak,basho-labs/puppet-riak,Cornellio/puppet-riak,Cornellio/puppet-riak,al4/puppet-riak,Cornellio/puppet-riak,SPBTV/puppet-riak | yaml | ## Code Before:
HOSTS:
centos-7-x64:
roles:
- master
platform: el-7-x86_64
box: chef/centos-7.0
box_url: https://vagrantcloud.com/chef/boxes/centos-7.0
hypervisor: vagrant
CONFIG:
log_level: verbose
type: foss
## Instruction:
Change box to puppetlabs/centos-7.0-64-nocm. Works with Vagrant 1.7.2 and VirtualBox 4.3.26. Previos config used a box that would fail compiliation of guest additions and thus could not mount drive on guest OS.
## Code After:
HOSTS:
centos-7-x64:
roles:
- master
platform: el-7-x86_64
box: puppetlabs/centos-7.0-64-nocm
box_url: https://vagrantcloud.com/puppetlabs/boxes/centos-7.0-64-nocm
hypervisor: vagrant
CONFIG:
log_level: verbose
type: foss
| HOSTS:
centos-7-x64:
roles:
- master
platform: el-7-x86_64
- box: chef/centos-7.0
+ box: puppetlabs/centos-7.0-64-nocm
- box_url: https://vagrantcloud.com/chef/boxes/centos-7.0
? ^^ ^
+ box_url: https://vagrantcloud.com/puppetlabs/boxes/centos-7.0-64-nocm
? ^^^^ ^^^^^ ++++++++
hypervisor: vagrant
CONFIG:
log_level: verbose
type: foss | 4 | 0.333333 | 2 | 2 |
e83255cbe30fb5e7d25db4b1b036cb8099ada17a | app/components/bookmarks-view/BookmarksView.xml | app/components/bookmarks-view/BookmarksView.xml |
<GridLayout
xmlns="http://schemas.nativescript.org/tns.xsd"
xmlns:favoritesView="components/favorites-view"
xmlns:historyView="components/history-view"
loaded="onLoaded"
rows="*,44"
columns="*">
<GridLayout loaded="onContentLayoutLoaded" orientation="horizontal">
<favoritesView:FavoritesView id="favorites" visibility="{{ index === 0 ? 'visible' : 'collapsed' }}" />
<historyView:HistoryView id="history" visibility="{{ index === 1 ? 'visible' : 'collapsed' }}" />
</GridLayout>
<GridLayout loaded="onTabLayoutLoaded" row="1" rows="*" columns="*,*" backgroundColor="#EEEEEE">
<Button col="0" text="star_border" class="{{ index === 0 ? 'material-icon toggle-btn-on' : 'material-icon toggle-btn-off'}}" tap="onTabSelect" />
<Button col="1" text="history" class="{{ index === 1 ? 'material-icon toggle-btn-on' : 'material-icon toggle-btn-off'}}" tap="onTabSelect" />
</GridLayout>
</GridLayout> |
<GridLayout
xmlns="http://schemas.nativescript.org/tns.xsd"
xmlns:favoritesView="components/favorites-view"
xmlns:historyView="components/history-view"
loaded="onLoaded"
rows="44,auto,*"
columns="*">
<GridLayout loaded="onTabLayoutLoaded" row="0" rows="*" columns="*,*" backgroundColor="#FEFEFE">
<Button col="0" text="star_border" class="{{ index === 0 ? 'material-icon toggle-btn-on' : 'material-icon toggle-btn-off'}}" tap="onTabSelect" />
<Button col="1" text="history" class="{{ index === 1 ? 'material-icon toggle-btn-on' : 'material-icon toggle-btn-off'}}" tap="onTabSelect" />
</GridLayout>
<GridLayout row="1" height="1px" backgroundColor="#BBBBBB"></GridLayout>
<GridLayout loaded="onContentLayoutLoaded" row="2" orientation="horizontal">
<favoritesView:FavoritesView id="favorites" visibility="{{ index === 0 ? 'visible' : 'collapsed' }}" />
<historyView:HistoryView id="history" visibility="{{ index === 1 ? 'visible' : 'collapsed' }}" />
</GridLayout>
</GridLayout> | Move bookmarks view tabs to top | Move bookmarks view tabs to top
| XML | apache-2.0 | fercamp09/int20171T,fercamp09/int20171T,fercamp09/int20171T,fercamp09/int20171T,fercamp09/int20171T,fercamp09/int20171T | xml | ## Code Before:
<GridLayout
xmlns="http://schemas.nativescript.org/tns.xsd"
xmlns:favoritesView="components/favorites-view"
xmlns:historyView="components/history-view"
loaded="onLoaded"
rows="*,44"
columns="*">
<GridLayout loaded="onContentLayoutLoaded" orientation="horizontal">
<favoritesView:FavoritesView id="favorites" visibility="{{ index === 0 ? 'visible' : 'collapsed' }}" />
<historyView:HistoryView id="history" visibility="{{ index === 1 ? 'visible' : 'collapsed' }}" />
</GridLayout>
<GridLayout loaded="onTabLayoutLoaded" row="1" rows="*" columns="*,*" backgroundColor="#EEEEEE">
<Button col="0" text="star_border" class="{{ index === 0 ? 'material-icon toggle-btn-on' : 'material-icon toggle-btn-off'}}" tap="onTabSelect" />
<Button col="1" text="history" class="{{ index === 1 ? 'material-icon toggle-btn-on' : 'material-icon toggle-btn-off'}}" tap="onTabSelect" />
</GridLayout>
</GridLayout>
## Instruction:
Move bookmarks view tabs to top
## Code After:
<GridLayout
xmlns="http://schemas.nativescript.org/tns.xsd"
xmlns:favoritesView="components/favorites-view"
xmlns:historyView="components/history-view"
loaded="onLoaded"
rows="44,auto,*"
columns="*">
<GridLayout loaded="onTabLayoutLoaded" row="0" rows="*" columns="*,*" backgroundColor="#FEFEFE">
<Button col="0" text="star_border" class="{{ index === 0 ? 'material-icon toggle-btn-on' : 'material-icon toggle-btn-off'}}" tap="onTabSelect" />
<Button col="1" text="history" class="{{ index === 1 ? 'material-icon toggle-btn-on' : 'material-icon toggle-btn-off'}}" tap="onTabSelect" />
</GridLayout>
<GridLayout row="1" height="1px" backgroundColor="#BBBBBB"></GridLayout>
<GridLayout loaded="onContentLayoutLoaded" row="2" orientation="horizontal">
<favoritesView:FavoritesView id="favorites" visibility="{{ index === 0 ? 'visible' : 'collapsed' }}" />
<historyView:HistoryView id="history" visibility="{{ index === 1 ? 'visible' : 'collapsed' }}" />
</GridLayout>
</GridLayout> |
<GridLayout
xmlns="http://schemas.nativescript.org/tns.xsd"
xmlns:favoritesView="components/favorites-view"
xmlns:historyView="components/history-view"
loaded="onLoaded"
- rows="*,44"
? --
+ rows="44,auto,*"
? +++++++
columns="*">
+ <GridLayout loaded="onTabLayoutLoaded" row="0" rows="*" columns="*,*" backgroundColor="#FEFEFE">
+ <Button col="0" text="star_border" class="{{ index === 0 ? 'material-icon toggle-btn-on' : 'material-icon toggle-btn-off'}}" tap="onTabSelect" />
+ <Button col="1" text="history" class="{{ index === 1 ? 'material-icon toggle-btn-on' : 'material-icon toggle-btn-off'}}" tap="onTabSelect" />
+ </GridLayout>
+ <GridLayout row="1" height="1px" backgroundColor="#BBBBBB"></GridLayout>
- <GridLayout loaded="onContentLayoutLoaded" orientation="horizontal">
+ <GridLayout loaded="onContentLayoutLoaded" row="2" orientation="horizontal">
? ++++++++
<favoritesView:FavoritesView id="favorites" visibility="{{ index === 0 ? 'visible' : 'collapsed' }}" />
<historyView:HistoryView id="history" visibility="{{ index === 1 ? 'visible' : 'collapsed' }}" />
</GridLayout>
- <GridLayout loaded="onTabLayoutLoaded" row="1" rows="*" columns="*,*" backgroundColor="#EEEEEE">
- <Button col="0" text="star_border" class="{{ index === 0 ? 'material-icon toggle-btn-on' : 'material-icon toggle-btn-off'}}" tap="onTabSelect" />
- <Button col="1" text="history" class="{{ index === 1 ? 'material-icon toggle-btn-on' : 'material-icon toggle-btn-off'}}" tap="onTabSelect" />
- </GridLayout>
</GridLayout> | 13 | 0.764706 | 7 | 6 |
ae0bd06487aad3be47b8f38efc3e757188c0efc7 | app/controllers/api/stateless/stateless_controller.rb | app/controllers/api/stateless/stateless_controller.rb | module Api
module Stateless
# Api::StatelessController handles all stateless api requests
# with token authentication.
class StatelessController < ApplicationController
include ExceptionHandler
include AuthToken
protect_from_forgery with: :null_session
protected
def authenticate_request!
@current_member = authenticate_member_from_token
raise Exceptions::UnauthorizedError unless @current_member
end
private
def authenticate_member_from_token
_, token = request.headers['authorization'].split
payload = decode_jwt(token)
Member.find(payload[:id])
rescue
raise Exceptions::UnauthorizedError
end
end
end
end
| module Api
module Stateless
# Api::StatelessController handles all stateless api requests
# with token authentication.
class StatelessController < ApplicationController
include ExceptionHandler
include AuthToken
protect_from_forgery with: :null_session
protected
# Authenticates a user from a token or a cookie.
# Tries token first then falls back to
def authenticate_request!
@current_member ||= authenticate_member_from_token || authenticate_member_from_cookie
raise Exceptions::UnauthorizedError unless @current_member
end
private
def authenticate_member_from_token
return nil if request.headers['authorization'].nil?
_, token = request.headers['authorization'].split
payload = decode_jwt(token)
Member.find(payload[:id])
rescue
raise Exceptions::UnauthorizedError
end
def authenticate_member_from_cookie
return nil if cookies.encrypted['authorization'].nil?
payload = decode_jwt(cookies.encrypted['authorization'])
Member.find(payload[:id])
end
end
end
end
| Read `authorization` from header or cookie | Read `authorization` from header or cookie
| Ruby | mit | SumOfUs/Champaign,SumOfUs/Champaign,SumOfUs/Champaign,SumOfUs/Champaign,SumOfUs/Champaign | ruby | ## Code Before:
module Api
module Stateless
# Api::StatelessController handles all stateless api requests
# with token authentication.
class StatelessController < ApplicationController
include ExceptionHandler
include AuthToken
protect_from_forgery with: :null_session
protected
def authenticate_request!
@current_member = authenticate_member_from_token
raise Exceptions::UnauthorizedError unless @current_member
end
private
def authenticate_member_from_token
_, token = request.headers['authorization'].split
payload = decode_jwt(token)
Member.find(payload[:id])
rescue
raise Exceptions::UnauthorizedError
end
end
end
end
## Instruction:
Read `authorization` from header or cookie
## Code After:
module Api
module Stateless
# Api::StatelessController handles all stateless api requests
# with token authentication.
class StatelessController < ApplicationController
include ExceptionHandler
include AuthToken
protect_from_forgery with: :null_session
protected
# Authenticates a user from a token or a cookie.
# Tries token first then falls back to
def authenticate_request!
@current_member ||= authenticate_member_from_token || authenticate_member_from_cookie
raise Exceptions::UnauthorizedError unless @current_member
end
private
def authenticate_member_from_token
return nil if request.headers['authorization'].nil?
_, token = request.headers['authorization'].split
payload = decode_jwt(token)
Member.find(payload[:id])
rescue
raise Exceptions::UnauthorizedError
end
def authenticate_member_from_cookie
return nil if cookies.encrypted['authorization'].nil?
payload = decode_jwt(cookies.encrypted['authorization'])
Member.find(payload[:id])
end
end
end
end
| module Api
module Stateless
# Api::StatelessController handles all stateless api requests
# with token authentication.
class StatelessController < ApplicationController
include ExceptionHandler
include AuthToken
protect_from_forgery with: :null_session
protected
+ # Authenticates a user from a token or a cookie.
+ # Tries token first then falls back to
def authenticate_request!
- @current_member = authenticate_member_from_token
+ @current_member ||= authenticate_member_from_token || authenticate_member_from_cookie
? ++ +++++++++++++++++++++++++++++++++++
raise Exceptions::UnauthorizedError unless @current_member
end
private
def authenticate_member_from_token
+ return nil if request.headers['authorization'].nil?
_, token = request.headers['authorization'].split
payload = decode_jwt(token)
Member.find(payload[:id])
rescue
raise Exceptions::UnauthorizedError
end
+
+ def authenticate_member_from_cookie
+ return nil if cookies.encrypted['authorization'].nil?
+ payload = decode_jwt(cookies.encrypted['authorization'])
+ Member.find(payload[:id])
+ end
end
end
end | 11 | 0.37931 | 10 | 1 |
10b363167099b17856db6359dd89a49e7ecea9ad | src/Sylius/Bundle/OrderBundle/Doctrine/ORM/OrderRepository.php | src/Sylius/Bundle/OrderBundle/Doctrine/ORM/OrderRepository.php | <?php
/*
* This file is part of the Sylius package.
*
* (c) Paweł Jędrzejewski
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Sylius\Bundle\OrderBundle\Doctrine\ORM;
use Sylius\Bundle\ResourceBundle\Doctrine\ORM\EntityRepository;
use Sylius\Bundle\OrderBundle\Repository\OrderRepositoryInterface;
/**
* Order repository.
*
* @author Paweł Jędrzejewski <pjedrzejewski@diweb.pl>
*/
class OrderRepository extends EntityRepository implements OrderRepositoryInterface
{
/**
* {@inheritdoc}
*/
public function findRecentOrders($amount = 10)
{
$queryBuilder = $this->getQueryBuilder();
$this->_em->getFilters()->disable('softdeleteable');
return $queryBuilder
->andWhere($queryBuilder->expr()->isNotNull('o.completedAt'))
->setMaxResults($amount)
->orderBy('o.id', 'desc')
->getQuery()
->getResult()
;
}
/**
* {@inheritdoc}
*/
protected function getQueryBuilder()
{
return parent::getQueryBuilder()
->leftJoin('o.items', 'item')
->addSelect('item')
;
}
/**
* {@inheritdoc}
*/
protected function getAlias()
{
return 'o';
}
}
| <?php
/*
* This file is part of the Sylius package.
*
* (c) Paweł Jędrzejewski
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Sylius\Bundle\OrderBundle\Doctrine\ORM;
use Sylius\Bundle\ResourceBundle\Doctrine\ORM\EntityRepository;
use Sylius\Bundle\OrderBundle\Repository\OrderRepositoryInterface;
/**
* Order repository.
*
* @author Paweł Jędrzejewski <pjedrzejewski@diweb.pl>
*/
class OrderRepository extends EntityRepository implements OrderRepositoryInterface
{
/**
* {@inheritdoc}
*/
public function findRecentOrders($amount = 10)
{
$queryBuilder = $this->getQueryBuilder();
$this->_em->getFilters()->disable('softdeleteable');
return $queryBuilder
->andWhere($queryBuilder->expr()->isNotNull('o.completedAt'))
->setMaxResults($amount)
->orderBy('o.completedAt', 'desc')
->getQuery()
->getResult()
;
}
/**
* {@inheritdoc}
*/
protected function getQueryBuilder()
{
return parent::getQueryBuilder()
->leftJoin('o.items', 'item')
->addSelect('item')
;
}
/**
* {@inheritdoc}
*/
protected function getAlias()
{
return 'o';
}
}
| Fix order sorting to prevent incorrect order number generation. | Fix order sorting to prevent incorrect order number generation.
See https://github.com/Sylius/Sylius/pull/631
| PHP | mit | tonicospinelli/Sylius,videni/Sylius,gorkalaucirica/Sylius,petertilsen/sylius,TheMadeleine/Sylius,locastic/SyliusTcomPayWay,ravaj-group/Sylius,ProPheT777/Sylius,xrowgmbh/Sylius,michalmarcinkowski/Sylius,PyRowMan/Sylius,polisys/Sylius,bigfoot90/Sylius,adamelso/Sylius,Mozan/Sylius,liquorvicar/Sylius,nicolasricci/Sylius,psyray/Sylius,bigfoot90/Sylius,MichaelMackus/Sylius,Amunak/Sylius,fredcollet/Sylius,itinance/Sylius,TeamNovatek/Sylius,GSadee/Sylius,aRn0D/Sylius,davalb/Sylius,winzou/Sylius,WouterJ/Sylius,mheki/Sylius,sjonkeesse/Sylius,puterakahfi/Sylius,Limelyte/Sylius,psyray/Sylius,blazarecki/Sylius,mbabker/Sylius,Limelyte/Sylius,ThreeSixtyEu/Sylius,fredcollet/Sylius,mheki/Sylius,starspire/eventmanager,101medialab/Sylius,psyray/Sylius,xantrix/Sylius,rpg600/Sylius,Rvanlaak/Sylius,crevillo/Sylius,kongqingfu/Sylius,JaronKing/Sylius,gruberro/Sylius,liukaijv/Sylius,Niiko/Sylius,PWalkow/Sylius,xrowkristina/sylius,Avazanga1/Sylius,sweoggy/Sylius,ThreeSixtyEu/Sylius,ReissClothing/Sylius,juramy/Sylius,JaronKing/Sylius,tuka217/Sylius,pfwd/Sylius,SyliusBot/Sylius,gseidel/Sylius,ekyna/Sylius,aramalipoor/Sylius,jvahldick/Sylius,tonicospinelli/Sylius,axelvnk/Sylius,videni/Sylius,JaronKing/Sylius,wwojcik/Sylius,danut007ro/Sylius,aRn0D/Sylius,adamelso/Sylius,Symfomany/Sylius,okwinza/Sylius,Rvanlaak/Sylius,foobarflies/Sylius,kayue/Sylius,informatico-madrid/Sylius,Onnit/Sylius,pamil/Sylius,mkilmanas/Sylius,gorkalaucirica/Sylius,mhujer/Sylius,Zales0123/Sylius,Lakion/Sylius,informatico-madrid/Sylius,cdaguerre/Sylius,liukaijv/Sylius,kongqingfu/Sylius,antonioperic/Sylius,petertilsen/sylius,PyRowMan/Sylius,cdaguerre/Sylius,psren/Sylius,Ma27/Sylius,psren/Sylius,bigfoot90/Sylius,ekyna/Sylius,TeamNovatek/Sylius,ravaj-group/Sylius,Ejobs/Sylius,bretto36/Sylius,pfwd/Sylius,Ejobs/Sylius,crevillo/Sylius,dragosprotung/Sylius,101medialab/Sylius,danut007ro/Sylius,blazarecki/Sylius,Mozan/Sylius,MichaelMackus/Sylius,mhujer/Sylius,peteward/Sylius,Richtermeister/Sylius,loic425/Sylius,jverdeyen-forks/Sylius,steffenbrem/Sylius,StoreFactory/Sylius,rpg600/Sylius,xantrix/Sylius,jverdeyen/Sylius,aramalipoor/Sylius,wwojcik/Sylius,xrowgmbh/Sylius,sjonkeesse/Sylius,NeverResponse/Sylius,peteward/Sylius,gmoigneu/platformsh-integrations,Joypricecorp/Sylius,ezecosystem/Sylius,CoderMaggie/Sylius,foobarflies/Sylius,CoderMaggie/Sylius,foobarflies/Sylius,Zales0123/Sylius,jverdeyen-forks/Sylius,jverdeyen-forks/Sylius,bretto36/Sylius,peteward/Sylius,bitbager/Sylius,torinaki/Sylius,artkonekt/Sylius,Strontium-90/Sylius,JRomeoSalazar/marcen,theanh/Sylius,1XWP/Sylius,TristanPerchec/Sylius,inssein/Sylius,Symfomany/Sylius,WouterJ/Sylius,mkilmanas/Sylius,psren/Sylius,gseidel/Sylius,ThreeSixtyEu/Sylius,joshuataylor/Sylius,NeverResponse/Sylius,mheki/Sylius,PyRowMan/Sylius,Joypricecorp/Sylius,jjanvier/Sylius,Brille24/Sylius,Ma27/Sylius,martijngastkemper/Sylius,gabiudrescu/Sylius,Limelyte/Sylius,ThreeSixtyEu/Sylius,WouterJ/Sylius,gRoussac/Sylius,ReissClothing/Sylius,cngroupdk/Sylius,mbabker/Sylius,kongqingfu/Sylius,gruberro/Sylius,bitbager/Sylius,Ma27/Sylius,liquorvicar/Sylius,venyii/Sylius,danut007ro/Sylius,DorianCMore/Sylius,psyray/Sylius,JaronKing/Sylius,winzou/Sylius,PWalkow/Sylius,petertilsen/sylius,Sylius/Sylius,Arminek/Sylius,peteward/Sylius,Pitoune/Sylius,pentarim/Sylius,okwinza/Sylius,pjedrzejewski/Sylius,patrick-mcdougle/Sylius,sweoggy/Sylius,Pitoune/Sylius,joshuataylor/Sylius,martijngastkemper/Sylius,polisys/Sylius,sjonkeesse/Sylius,ProPheT777/Sylius,vihuvac/Sylius,kayue/Sylius,inssein/Sylius,jjanvier/Sylius,Arminek/Sylius,okwinza/Sylius,ProPheT777/Sylius,theanh/Sylius,Mozan/Sylius,mkilmanas/Sylius,aramalipoor/Sylius,winzou/Sylius,Limelyte/Sylius,Avazanga1/Sylius,TristanPerchec/Sylius,davalb/Sylius,patrick-mcdougle/Sylius,gRoussac/Sylius,Sylius/Sylius,Rvanlaak/Sylius,gorkalaucirica/Sylius,petertilsen/sylius,umpirsky/Sylius,nicolasricci/Sylius,Brille24/Sylius,ProPheT777/Sylius,davalb/Sylius,rpg600/Sylius,cngroupdk/Sylius,danut007ro/Sylius,tuka217/Sylius,1XWP/Sylius,steffenbrem/Sylius,cngroupdk/Sylius,mgonyan/Sylius,fredcollet/Sylius,crevillo/Sylius,TheMadeleine/Sylius,foopang/Sylius,coudenysj/Sylius,ylastapis/Sylius,ojhaujjwal/Sylius,jjanvier/Sylius,gmoigneu/platformsh-integrations,bretto36/Sylius,davalb/Sylius,juramy/Sylius,Amunak/Sylius,steffenbrem/Sylius,liquorvicar/Sylius,xantrix/Sylius,TristanPerchec/Sylius,dragosprotung/Sylius,martijngastkemper/Sylius,jblanchon/Sylius,ekyna/Sylius,ktzouno/Sylius,psren/Sylius,artkonekt/Sylius,JRomeoSalazar/marcen,Zales0123/Sylius,gruberro/Sylius,Limelyte/Sylius,xrowgmbh/Sylius,adamelso/Sylius,gmoigneu/platformsh-integrations,martijngastkemper/Sylius,vihuvac/Sylius,regnisolbap/Sylius,axelvnk/Sylius,nakashu/Sylius,fredcollet/Sylius,jvahldick/Sylius,gmoigneu/platformsh-integrations,vihuvac/Sylius,juramy/Sylius,Joypricecorp/Sylius,pjedrzejewski/Sylius,okwinza/Sylius,Amunak/Sylius,starspire/eventmanager,jverdeyen/Sylius,Shine-neko/Sylius,lchrusciel/Sylius,Avazanga1/Sylius,jverdeyen-forks/Sylius,Mozan/Sylius,patrick-mcdougle/Sylius,vukanac/Sylius,ezecosystem/Sylius,ktzouno/Sylius,nicolasricci/Sylius,NeverResponse/Sylius,kayue/Sylius,MichaelMackus/Sylius,gabiudrescu/Sylius,ojhaujjwal/Sylius,starspire/eventmanager,JRomeoSalazar/marcen,pamil/Sylius,aramalipoor/Sylius,axelvnk/Sylius,Niiko/Sylius,mgonyan/Sylius,Ma27/Sylius,polisys/Sylius,Sylius/Sylius,lchrusciel/Sylius,tuka217/Sylius,peteward/Sylius,blazarecki/Sylius,wwojcik/Sylius,Symfomany/Sylius,ekyna/Sylius,inssein/Sylius,tuka217/Sylius,sjonkeesse/Sylius,CoderMaggie/Sylius,crevillo/Sylius,theanh/Sylius,ktzouno/Sylius,starspire/eventmanager,tuka217/Sylius,xantrix/Sylius,Lakion/Sylius,axelvnk/Sylius,Richtermeister/Sylius,juramy/Sylius,GSadee/Sylius,TristanPerchec/Sylius,Shine-neko/Sylius,GSadee/Sylius,mhujer/Sylius,gRoussac/Sylius,mkilmanas/Sylius,umpirsky/Sylius,Lakion/Sylius,pentarim/Sylius,rpg600/Sylius,theanh/Sylius,okwinza/Sylius,DorianCMore/Sylius,fredcollet/Sylius,vukanac/Sylius,bretto36/Sylius,Pitoune/Sylius,ReissClothing/Sylius,bigfoot90/Sylius,DorianCMore/Sylius,jverdeyen-forks/Sylius,gabiudrescu/Sylius,patrick-mcdougle/Sylius,nakashu/Sylius,locastic/SyliusTcomPayWay,Shine-neko/Sylius,diimpp/Sylius,ekyna/Sylius,bitbager/Sylius,ravaj-group/Sylius,SyliusBot/Sylius,PWalkow/Sylius,mgonyan/Sylius,vihuvac/Sylius,winzou/Sylius,martijngastkemper/Sylius,nicolasricci/Sylius,gRoussac/Sylius,wwojcik/Sylius,sjonkeesse/Sylius,liquorvicar/Sylius,adamelso/Sylius,Strontium-90/Sylius,coudenysj/Sylius,cngroupdk/Sylius,ylastapis/Sylius,jblanchon/Sylius,Mozan/Sylius,foopang/Sylius,Richtermeister/Sylius,gseidel/Sylius,michalmarcinkowski/Sylius,Niiko/Sylius,jvahldick/Sylius,StoreFactory/Sylius,aRn0D/Sylius,informatico-madrid/Sylius,coudenysj/Sylius,michalmarcinkowski/Sylius,Onnit/Sylius,axelvnk/Sylius,cdaguerre/Sylius,Strontium-90/Sylius,NeverResponse/Sylius,gorkalaucirica/Sylius,puterakahfi/Sylius,Onnit/Sylius,juramy/Sylius,itinance/Sylius,itinance/Sylius,informatico-madrid/Sylius,jverdeyen/Sylius,101medialab/Sylius,Ejobs/Sylius,michalmarcinkowski/Sylius,jverdeyen/Sylius,polisys/Sylius,artkonekt/Sylius,artkonekt/Sylius,loic425/Sylius,coudenysj/Sylius,puterakahfi/Sylius,1XWP/Sylius,MichaelKubovic/Sylius,davalb/Sylius,Lowlo/Sylius,umpirsky/Sylius,MichaelKubovic/Sylius,Shine-neko/Sylius,jblanchon/Sylius,mbabker/Sylius,venyii/Sylius,sweoggy/Sylius,coudenysj/Sylius,tonicospinelli/Sylius,loic425/Sylius,steffenbrem/Sylius,puterakahfi/Sylius,petertilsen/sylius,1XWP/Sylius,WouterJ/Sylius,Lowlo/Sylius,winzou/Sylius,xantrix/Sylius,JRomeoSalazar/marcen,pfwd/Sylius,pentarim/Sylius,ReissClothing/Sylius,mgonyan/Sylius,Strontium-90/Sylius,MichaelKubovic/Sylius,vukanac/Sylius,jjanvier/Sylius,gseidel/Sylius,ezecosystem/Sylius,xrowkristina/sylius,Avazanga1/Sylius,pfwd/Sylius,jvahldick/Sylius,StoreFactory/Sylius,foopang/Sylius,Lakion/Sylius,ojhaujjwal/Sylius,TeamNovatek/Sylius,Lowlo/Sylius,torinaki/Sylius,liukaijv/Sylius,blazarecki/Sylius,ylastapis/Sylius,itinance/Sylius,foopang/Sylius,jblanchon/Sylius,aRn0D/Sylius,dragosprotung/Sylius,Rvanlaak/Sylius,mheki/Sylius,mhujer/Sylius,sweoggy/Sylius,lchrusciel/Sylius,aRn0D/Sylius,regnisolbap/Sylius,cdaguerre/Sylius,polisys/Sylius,nakashu/Sylius,starspire/eventmanager,ktzouno/Sylius,joshuataylor/Sylius,Niiko/Sylius,venyii/Sylius,gruberro/Sylius,foobarflies/Sylius,locastic/SyliusTcomPayWay,liukaijv/Sylius,Lakion/Sylius,Rvanlaak/Sylius,nakashu/Sylius,kongqingfu/Sylius,TeamNovatek/Sylius,torinaki/Sylius,foopang/Sylius,tonicospinelli/Sylius,ReissClothing/Sylius,vukanac/Sylius,ezecosystem/Sylius,ravaj-group/Sylius,steffenbrem/Sylius,regnisolbap/Sylius,pjedrzejewski/Sylius,mbabker/Sylius,pentarim/Sylius,Amunak/Sylius,antonioperic/Sylius,mgonyan/Sylius,bitbager/Sylius,jjanvier/Sylius,ylastapis/Sylius,Richtermeister/Sylius,pjedrzejewski/Sylius,psyray/Sylius,ravaj-group/Sylius,Arminek/Sylius,TeamNovatek/Sylius,tonicospinelli/Sylius,inssein/Sylius,theanh/Sylius,nicolasricci/Sylius,Amunak/Sylius,patrick-mcdougle/Sylius,PWalkow/Sylius,MichaelMackus/Sylius,Ejobs/Sylius,adamelso/Sylius,Shine-neko/Sylius,cdaguerre/Sylius,Joypricecorp/Sylius,pamil/Sylius,SyliusBot/Sylius,diimpp/Sylius,kongqingfu/Sylius,diimpp/Sylius,xrowkristina/sylius,Symfomany/Sylius,xrowgmbh/Sylius,gabiudrescu/Sylius,cngroupdk/Sylius,MichaelKubovic/Sylius,pfwd/Sylius,joshuataylor/Sylius,puterakahfi/Sylius,Ejobs/Sylius,liukaijv/Sylius,antonioperic/Sylius,ThreeSixtyEu/Sylius,Ma27/Sylius,jblanchon/Sylius,artkonekt/Sylius,bigfoot90/Sylius,torinaki/Sylius,pentarim/Sylius,CoderMaggie/Sylius,wwojcik/Sylius,Pitoune/Sylius,venyii/Sylius,Lowlo/Sylius,videni/Sylius,rpg600/Sylius,locastic/SyliusTcomPayWay,Onnit/Sylius,StoreFactory/Sylius,Brille24/Sylius,xrowgmbh/Sylius,crevillo/Sylius,jverdeyen/Sylius,1XWP/Sylius,Onnit/Sylius,Avazanga1/Sylius,vukanac/Sylius,regnisolbap/Sylius,dragosprotung/Sylius,informatico-madrid/Sylius,TheMadeleine/Sylius,joshuataylor/Sylius,videni/Sylius,Brille24/Sylius,DorianCMore/Sylius,PWalkow/Sylius,Strontium-90/Sylius,xrowkristina/sylius,TheMadeleine/Sylius,PyRowMan/Sylius,mhujer/Sylius,gRoussac/Sylius,xrowkristina/sylius,StoreFactory/Sylius,umpirsky/Sylius,TristanPerchec/Sylius,ojhaujjwal/Sylius,liquorvicar/Sylius,Symfomany/Sylius | php | ## Code Before:
<?php
/*
* This file is part of the Sylius package.
*
* (c) Paweł Jędrzejewski
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Sylius\Bundle\OrderBundle\Doctrine\ORM;
use Sylius\Bundle\ResourceBundle\Doctrine\ORM\EntityRepository;
use Sylius\Bundle\OrderBundle\Repository\OrderRepositoryInterface;
/**
* Order repository.
*
* @author Paweł Jędrzejewski <pjedrzejewski@diweb.pl>
*/
class OrderRepository extends EntityRepository implements OrderRepositoryInterface
{
/**
* {@inheritdoc}
*/
public function findRecentOrders($amount = 10)
{
$queryBuilder = $this->getQueryBuilder();
$this->_em->getFilters()->disable('softdeleteable');
return $queryBuilder
->andWhere($queryBuilder->expr()->isNotNull('o.completedAt'))
->setMaxResults($amount)
->orderBy('o.id', 'desc')
->getQuery()
->getResult()
;
}
/**
* {@inheritdoc}
*/
protected function getQueryBuilder()
{
return parent::getQueryBuilder()
->leftJoin('o.items', 'item')
->addSelect('item')
;
}
/**
* {@inheritdoc}
*/
protected function getAlias()
{
return 'o';
}
}
## Instruction:
Fix order sorting to prevent incorrect order number generation.
See https://github.com/Sylius/Sylius/pull/631
## Code After:
<?php
/*
* This file is part of the Sylius package.
*
* (c) Paweł Jędrzejewski
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Sylius\Bundle\OrderBundle\Doctrine\ORM;
use Sylius\Bundle\ResourceBundle\Doctrine\ORM\EntityRepository;
use Sylius\Bundle\OrderBundle\Repository\OrderRepositoryInterface;
/**
* Order repository.
*
* @author Paweł Jędrzejewski <pjedrzejewski@diweb.pl>
*/
class OrderRepository extends EntityRepository implements OrderRepositoryInterface
{
/**
* {@inheritdoc}
*/
public function findRecentOrders($amount = 10)
{
$queryBuilder = $this->getQueryBuilder();
$this->_em->getFilters()->disable('softdeleteable');
return $queryBuilder
->andWhere($queryBuilder->expr()->isNotNull('o.completedAt'))
->setMaxResults($amount)
->orderBy('o.completedAt', 'desc')
->getQuery()
->getResult()
;
}
/**
* {@inheritdoc}
*/
protected function getQueryBuilder()
{
return parent::getQueryBuilder()
->leftJoin('o.items', 'item')
->addSelect('item')
;
}
/**
* {@inheritdoc}
*/
protected function getAlias()
{
return 'o';
}
}
| <?php
/*
* This file is part of the Sylius package.
*
* (c) Paweł Jędrzejewski
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Sylius\Bundle\OrderBundle\Doctrine\ORM;
use Sylius\Bundle\ResourceBundle\Doctrine\ORM\EntityRepository;
use Sylius\Bundle\OrderBundle\Repository\OrderRepositoryInterface;
/**
* Order repository.
*
* @author Paweł Jędrzejewski <pjedrzejewski@diweb.pl>
*/
class OrderRepository extends EntityRepository implements OrderRepositoryInterface
{
/**
* {@inheritdoc}
*/
public function findRecentOrders($amount = 10)
{
$queryBuilder = $this->getQueryBuilder();
$this->_em->getFilters()->disable('softdeleteable');
return $queryBuilder
->andWhere($queryBuilder->expr()->isNotNull('o.completedAt'))
->setMaxResults($amount)
- ->orderBy('o.id', 'desc')
? ^
+ ->orderBy('o.completedAt', 'desc')
? ^^^^^^^^ ++
->getQuery()
->getResult()
;
}
/**
* {@inheritdoc}
*/
protected function getQueryBuilder()
{
return parent::getQueryBuilder()
->leftJoin('o.items', 'item')
->addSelect('item')
;
}
/**
* {@inheritdoc}
*/
protected function getAlias()
{
return 'o';
}
} | 2 | 0.033333 | 1 | 1 |
54217603f6745a1feecff6761bc600dc07631ba4 | app/controllers/concerns/high_voltage/static_page.rb | app/controllers/concerns/high_voltage/static_page.rb | module HighVoltage::StaticPage
extend ActiveSupport::Concern
included do
layout ->(_) { HighVoltage.layout }
rescue_from ActionView::MissingTemplate do |exception|
if exception.message =~ %r{Missing template #{page_finder.content_path}}
invalid_page
else
raise exception
end
end
rescue_from HighVoltage::InvalidPageIdError, with: :invalid_page
hide_action :current_page, :page_finder, :page_finder_factory
end
def show
render template: current_page
end
def current_page
page_finder.find
end
def page_finder
page_finder_factory.new(params[:id])
end
def page_finder_factory
HighVoltage::PageFinder
end
def invalid_page
raise ActionController::RoutingError, "No such page: #{params[:id]}"
end
end
| module HighVoltage::StaticPage
extend ActiveSupport::Concern
included do
layout ->(_) { HighVoltage.layout }
rescue_from ActionView::MissingTemplate do |exception|
if exception.message =~ %r{Missing template #{page_finder.content_path}}
invalid_page
else
raise exception
end
end
rescue_from HighVoltage::InvalidPageIdError, with: :invalid_page
end
def show
render template: current_page
end
def invalid_page
raise ActionController::RoutingError, "No such page: #{params[:id]}"
end
private
def current_page
page_finder.find
end
def page_finder
page_finder_factory.new(params[:id])
end
def page_finder_factory
HighVoltage::PageFinder
end
end
| Remove hide_action as it is not supported in Rails 5 | Remove hide_action as it is not supported in Rails 5
| Ruby | mit | thoughtbot/high_voltage,thoughtbot/high_voltage | ruby | ## Code Before:
module HighVoltage::StaticPage
extend ActiveSupport::Concern
included do
layout ->(_) { HighVoltage.layout }
rescue_from ActionView::MissingTemplate do |exception|
if exception.message =~ %r{Missing template #{page_finder.content_path}}
invalid_page
else
raise exception
end
end
rescue_from HighVoltage::InvalidPageIdError, with: :invalid_page
hide_action :current_page, :page_finder, :page_finder_factory
end
def show
render template: current_page
end
def current_page
page_finder.find
end
def page_finder
page_finder_factory.new(params[:id])
end
def page_finder_factory
HighVoltage::PageFinder
end
def invalid_page
raise ActionController::RoutingError, "No such page: #{params[:id]}"
end
end
## Instruction:
Remove hide_action as it is not supported in Rails 5
## Code After:
module HighVoltage::StaticPage
extend ActiveSupport::Concern
included do
layout ->(_) { HighVoltage.layout }
rescue_from ActionView::MissingTemplate do |exception|
if exception.message =~ %r{Missing template #{page_finder.content_path}}
invalid_page
else
raise exception
end
end
rescue_from HighVoltage::InvalidPageIdError, with: :invalid_page
end
def show
render template: current_page
end
def invalid_page
raise ActionController::RoutingError, "No such page: #{params[:id]}"
end
private
def current_page
page_finder.find
end
def page_finder
page_finder_factory.new(params[:id])
end
def page_finder_factory
HighVoltage::PageFinder
end
end
| module HighVoltage::StaticPage
extend ActiveSupport::Concern
included do
layout ->(_) { HighVoltage.layout }
rescue_from ActionView::MissingTemplate do |exception|
if exception.message =~ %r{Missing template #{page_finder.content_path}}
invalid_page
else
raise exception
end
end
rescue_from HighVoltage::InvalidPageIdError, with: :invalid_page
-
- hide_action :current_page, :page_finder, :page_finder_factory
end
def show
render template: current_page
end
+
+ def invalid_page
+ raise ActionController::RoutingError, "No such page: #{params[:id]}"
+ end
+
+ private
def current_page
page_finder.find
end
def page_finder
page_finder_factory.new(params[:id])
end
def page_finder_factory
HighVoltage::PageFinder
end
-
- def invalid_page
- raise ActionController::RoutingError, "No such page: #{params[:id]}"
- end
end | 12 | 0.307692 | 6 | 6 |
b104939312ee6f67f8c132f360c37717bd56959a | server/views/layouts/default.html | server/views/layouts/default.html | <!doctype html>
<html lang="en" xmlns="http://www.w3.org/1999/xhtml" xmlns:fb="https://www.facebook.com/2008/fbml" itemscope="itemscope" itemtype="http://schema.org/Product">
{% include '../includes/head.html' %}
<body>
<div data-ng-include="'/public/system/views/header.html'" data-role="navigation"></div>
{% if adminEnabled %}
<section class="admin-menu">
<div data-ng-include="'/mean-admin/views/index.html'"></div>
</section>
{% endif %}
<section class="content">
<section class="container">
{% block content %}{% endblock %}
</section>
</section>
{% include '../includes/foot.html' %}
</body>
</html>
| <!doctype html>
<html lang="en" xmlns="http://www.w3.org/1999/xhtml" xmlns:fb="https://www.facebook.com/2008/fbml" itemscope="itemscope" itemtype="http://schema.org/Product">
{% include '../includes/head.html' %}
<body>
<div data-ng-include="'/public/system/views/header.html'" data-role="navigation"></div>
{% if adminEnabled %}
<section class="admin-menu">
<div data-ng-include="'/mean-admin/views/index.html'"></div>
</section>
{% endif %}
{% block content %}{% endblock %}
{% include '../includes/foot.html' %}
</body>
</html>
| Remove the twitter bootstrap container | Remove the twitter bootstrap container
| HTML | mit | debona/Respirez,debona/Respirez | html | ## Code Before:
<!doctype html>
<html lang="en" xmlns="http://www.w3.org/1999/xhtml" xmlns:fb="https://www.facebook.com/2008/fbml" itemscope="itemscope" itemtype="http://schema.org/Product">
{% include '../includes/head.html' %}
<body>
<div data-ng-include="'/public/system/views/header.html'" data-role="navigation"></div>
{% if adminEnabled %}
<section class="admin-menu">
<div data-ng-include="'/mean-admin/views/index.html'"></div>
</section>
{% endif %}
<section class="content">
<section class="container">
{% block content %}{% endblock %}
</section>
</section>
{% include '../includes/foot.html' %}
</body>
</html>
## Instruction:
Remove the twitter bootstrap container
## Code After:
<!doctype html>
<html lang="en" xmlns="http://www.w3.org/1999/xhtml" xmlns:fb="https://www.facebook.com/2008/fbml" itemscope="itemscope" itemtype="http://schema.org/Product">
{% include '../includes/head.html' %}
<body>
<div data-ng-include="'/public/system/views/header.html'" data-role="navigation"></div>
{% if adminEnabled %}
<section class="admin-menu">
<div data-ng-include="'/mean-admin/views/index.html'"></div>
</section>
{% endif %}
{% block content %}{% endblock %}
{% include '../includes/foot.html' %}
</body>
</html>
| <!doctype html>
<html lang="en" xmlns="http://www.w3.org/1999/xhtml" xmlns:fb="https://www.facebook.com/2008/fbml" itemscope="itemscope" itemtype="http://schema.org/Product">
{% include '../includes/head.html' %}
<body>
<div data-ng-include="'/public/system/views/header.html'" data-role="navigation"></div>
{% if adminEnabled %}
<section class="admin-menu">
<div data-ng-include="'/mean-admin/views/index.html'"></div>
</section>
{% endif %}
+
- <section class="content">
- <section class="container">
- {% block content %}{% endblock %}
? --------
+ {% block content %}{% endblock %}
+
- </section>
- </section>
{% include '../includes/foot.html' %}
</body>
</html> | 8 | 0.4 | 3 | 5 |
e772731e0cf065c884cd32803276896c6f21f95e | .github/ISSUE_TEMPLATE/config.yml | .github/ISSUE_TEMPLATE/config.yml | blank_issues_enabled: false
contact_links:
- name: 📚 Documentation
url: https://urllib3.readthedocs.io/en/latest/
about: Make sure you read the relevant docs
- name: ❓ Ask on StackOverflow
url: https://stackoverflow.com/questions/tagged/urllib3
about: Ask questions about usage in StackOverflow
- name: 💬 Ask the Community
url: https://discord.gg/CHEgCZN
about: Join urllib3's Discord server
| blank_issues_enabled: false
contact_links:
- name: 📚 Documentation
url: https://urllib3.readthedocs.io
about: Make sure you read the relevant docs
- name: ❓ Ask on StackOverflow
url: https://stackoverflow.com/questions/tagged/urllib3
about: Ask questions about usage in StackOverflow
- name: 💬 Ask the Community
url: https://discord.gg/CHEgCZN
about: Join urllib3's Discord server
| Update docs link in issue template to point at the default instead of `latest` | Update docs link in issue template to point at the default instead of `latest`
| YAML | mit | sigmavirus24/urllib3,urllib3/urllib3,urllib3/urllib3,sigmavirus24/urllib3 | yaml | ## Code Before:
blank_issues_enabled: false
contact_links:
- name: 📚 Documentation
url: https://urllib3.readthedocs.io/en/latest/
about: Make sure you read the relevant docs
- name: ❓ Ask on StackOverflow
url: https://stackoverflow.com/questions/tagged/urllib3
about: Ask questions about usage in StackOverflow
- name: 💬 Ask the Community
url: https://discord.gg/CHEgCZN
about: Join urllib3's Discord server
## Instruction:
Update docs link in issue template to point at the default instead of `latest`
## Code After:
blank_issues_enabled: false
contact_links:
- name: 📚 Documentation
url: https://urllib3.readthedocs.io
about: Make sure you read the relevant docs
- name: ❓ Ask on StackOverflow
url: https://stackoverflow.com/questions/tagged/urllib3
about: Ask questions about usage in StackOverflow
- name: 💬 Ask the Community
url: https://discord.gg/CHEgCZN
about: Join urllib3's Discord server
| blank_issues_enabled: false
contact_links:
- name: 📚 Documentation
- url: https://urllib3.readthedocs.io/en/latest/
? -----------
+ url: https://urllib3.readthedocs.io
about: Make sure you read the relevant docs
- name: ❓ Ask on StackOverflow
url: https://stackoverflow.com/questions/tagged/urllib3
about: Ask questions about usage in StackOverflow
- name: 💬 Ask the Community
url: https://discord.gg/CHEgCZN
about: Join urllib3's Discord server | 2 | 0.181818 | 1 | 1 |
78db53428515d8469a6d45ef8a685ce279199d95 | src/main/scala/com/ideacolorschemes/ideacolor/UploadCurrentColorSchemeAction.scala | src/main/scala/com/ideacolorschemes/ideacolor/UploadCurrentColorSchemeAction.scala | package com.ideacolorschemes.ideacolor
import com.intellij.openapi.actionSystem.{AnActionEvent, AnAction}
import com.intellij.openapi.editor.colors.{EditorColorsScheme, EditorColorsManager}
import com.intellij.ide.BrowserUtil
import com.intellij.openapi.ui.Messages
import com.intellij.openapi.project.Project
/**
* @author il
*/
class UploadCurrentColorSchemeAction extends AnAction {
def ideaEditorColorsManager = EditorColorsManager.getInstance
def actionPerformed(anActionEvent: AnActionEvent) {
implicit val project = anActionEvent.getProject
val editorColorsScheme = ideaEditorColorsManager.getGlobalScheme
if (ideaEditorColorsManager.isDefaultScheme(editorColorsScheme)) {
Messages.showInfoMessage(project, "Current color scheme is default.", "Failure")
} else {
uploadScheme(editorColorsScheme)
}
}
def uploadScheme(editorColorsScheme: EditorColorsScheme)(implicit project: Project) {
val colorScheme = ColorSchemeParser.parse(editorColorsScheme).get
SiteUtil.accessToSiteWithModalProgress {
indicator => {
indicator.setText("Trying to update current color scheme to ideacolorschemes")
SiteServices.addScheme(colorScheme)
}
} match {
case Some(url) =>
BrowserUtil.launchBrowser(url)
case None =>
Messages.showInfoMessage(project, "Cannot update current color scheme to ideacolorschemes.", "Failure")
}
}
}
| package com.ideacolorschemes.ideacolor
import com.intellij.openapi.actionSystem.{AnActionEvent, AnAction}
import com.intellij.openapi.editor.colors.{EditorColorsScheme, EditorColorsManager}
import com.intellij.ide.BrowserUtil
import com.intellij.openapi.ui.Messages
import com.intellij.openapi.project.Project
/**
* @author il
*/
class UploadCurrentColorSchemeAction extends AnAction with IdeaSchemeNameUtil {
def ideaEditorColorsManager = EditorColorsManager.getInstance
def actionPerformed(anActionEvent: AnActionEvent) {
implicit val project = anActionEvent.getProject
val editorColorsScheme = ideaEditorColorsManager.getGlobalScheme
if (ideaEditorColorsManager.isDefaultScheme(editorColorsScheme)) {
Messages.showInfoMessage(project, "Current color scheme is default.", "Failure")
} else if (isBook(editorColorsScheme)) {
Messages.showInfoMessage(project, "Current color scheme is from website.", "Failure")
} else {
uploadScheme(editorColorsScheme)
}
}
def uploadScheme(editorColorsScheme: EditorColorsScheme)(implicit project: Project) {
val colorScheme = ColorSchemeParser.parse(editorColorsScheme).get
SiteUtil.accessToSiteWithModalProgress {
indicator => {
indicator.setText("Trying to update current color scheme to ideacolorschemes")
SiteServices.addScheme(colorScheme)
}
} match {
case Some(url) =>
BrowserUtil.launchBrowser(url)
case None =>
Messages.showInfoMessage(project, "Cannot update current color scheme to ideacolorschemes.", "Failure")
}
}
}
| Check if it's a book when upload current schemes. | Check if it's a book when upload current schemes.
| Scala | apache-2.0 | iron9light/ideacolorschemes-plugin | scala | ## Code Before:
package com.ideacolorschemes.ideacolor
import com.intellij.openapi.actionSystem.{AnActionEvent, AnAction}
import com.intellij.openapi.editor.colors.{EditorColorsScheme, EditorColorsManager}
import com.intellij.ide.BrowserUtil
import com.intellij.openapi.ui.Messages
import com.intellij.openapi.project.Project
/**
* @author il
*/
class UploadCurrentColorSchemeAction extends AnAction {
def ideaEditorColorsManager = EditorColorsManager.getInstance
def actionPerformed(anActionEvent: AnActionEvent) {
implicit val project = anActionEvent.getProject
val editorColorsScheme = ideaEditorColorsManager.getGlobalScheme
if (ideaEditorColorsManager.isDefaultScheme(editorColorsScheme)) {
Messages.showInfoMessage(project, "Current color scheme is default.", "Failure")
} else {
uploadScheme(editorColorsScheme)
}
}
def uploadScheme(editorColorsScheme: EditorColorsScheme)(implicit project: Project) {
val colorScheme = ColorSchemeParser.parse(editorColorsScheme).get
SiteUtil.accessToSiteWithModalProgress {
indicator => {
indicator.setText("Trying to update current color scheme to ideacolorschemes")
SiteServices.addScheme(colorScheme)
}
} match {
case Some(url) =>
BrowserUtil.launchBrowser(url)
case None =>
Messages.showInfoMessage(project, "Cannot update current color scheme to ideacolorschemes.", "Failure")
}
}
}
## Instruction:
Check if it's a book when upload current schemes.
## Code After:
package com.ideacolorschemes.ideacolor
import com.intellij.openapi.actionSystem.{AnActionEvent, AnAction}
import com.intellij.openapi.editor.colors.{EditorColorsScheme, EditorColorsManager}
import com.intellij.ide.BrowserUtil
import com.intellij.openapi.ui.Messages
import com.intellij.openapi.project.Project
/**
* @author il
*/
class UploadCurrentColorSchemeAction extends AnAction with IdeaSchemeNameUtil {
def ideaEditorColorsManager = EditorColorsManager.getInstance
def actionPerformed(anActionEvent: AnActionEvent) {
implicit val project = anActionEvent.getProject
val editorColorsScheme = ideaEditorColorsManager.getGlobalScheme
if (ideaEditorColorsManager.isDefaultScheme(editorColorsScheme)) {
Messages.showInfoMessage(project, "Current color scheme is default.", "Failure")
} else if (isBook(editorColorsScheme)) {
Messages.showInfoMessage(project, "Current color scheme is from website.", "Failure")
} else {
uploadScheme(editorColorsScheme)
}
}
def uploadScheme(editorColorsScheme: EditorColorsScheme)(implicit project: Project) {
val colorScheme = ColorSchemeParser.parse(editorColorsScheme).get
SiteUtil.accessToSiteWithModalProgress {
indicator => {
indicator.setText("Trying to update current color scheme to ideacolorschemes")
SiteServices.addScheme(colorScheme)
}
} match {
case Some(url) =>
BrowserUtil.launchBrowser(url)
case None =>
Messages.showInfoMessage(project, "Cannot update current color scheme to ideacolorschemes.", "Failure")
}
}
}
| package com.ideacolorschemes.ideacolor
import com.intellij.openapi.actionSystem.{AnActionEvent, AnAction}
import com.intellij.openapi.editor.colors.{EditorColorsScheme, EditorColorsManager}
import com.intellij.ide.BrowserUtil
import com.intellij.openapi.ui.Messages
import com.intellij.openapi.project.Project
/**
* @author il
*/
- class UploadCurrentColorSchemeAction extends AnAction {
+ class UploadCurrentColorSchemeAction extends AnAction with IdeaSchemeNameUtil {
? ++++++++++++++++++++++++
def ideaEditorColorsManager = EditorColorsManager.getInstance
def actionPerformed(anActionEvent: AnActionEvent) {
implicit val project = anActionEvent.getProject
val editorColorsScheme = ideaEditorColorsManager.getGlobalScheme
if (ideaEditorColorsManager.isDefaultScheme(editorColorsScheme)) {
Messages.showInfoMessage(project, "Current color scheme is default.", "Failure")
+ } else if (isBook(editorColorsScheme)) {
+ Messages.showInfoMessage(project, "Current color scheme is from website.", "Failure")
} else {
uploadScheme(editorColorsScheme)
}
}
def uploadScheme(editorColorsScheme: EditorColorsScheme)(implicit project: Project) {
val colorScheme = ColorSchemeParser.parse(editorColorsScheme).get
SiteUtil.accessToSiteWithModalProgress {
indicator => {
indicator.setText("Trying to update current color scheme to ideacolorschemes")
SiteServices.addScheme(colorScheme)
}
} match {
case Some(url) =>
BrowserUtil.launchBrowser(url)
case None =>
Messages.showInfoMessage(project, "Cannot update current color scheme to ideacolorschemes.", "Failure")
}
}
}
| 4 | 0.095238 | 3 | 1 |
823179066c9a7c101a18e9c2d7ccb2a9ccf7f1cb | setup.py | setup.py | import os
from setuptools import setup, find_packages
from hamcrest import __version__
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
setup(
name = 'PyHamcrest',
version = __version__,
author = 'Jon Reid',
author_email = 'jon.reid@mac.com',
description = 'Hamcrest framework for matcher objects',
license = 'New BSD',
platforms=['All'],
keywords = 'hamcrest matchers pyunit unit test testing unittest unittesting',
url = 'http://code.google.com/p/hamcrest/',
download_url = 'http://pypi.python.org/packages/source/P/PyHamcrest/PyHamcrest-%s.tar.gz' % __version__,
packages = find_packages(),
test_suite = 'hamcrest-unit-test.alltests',
provides = ['hamcrest'],
long_description=read('README.md'),
classifiers = [
'Development Status :: 5 - Production/Stable',
'Environment :: Console',
'Intended Audience :: Developers',
'License :: OSI Approved :: BSD License',
'Natural Language :: English',
'Operating System :: OS Independent',
'Programming Language :: Python :: 2.6',
'Topic :: Software Development',
'Topic :: Software Development :: Quality Assurance',
'Topic :: Software Development :: Testing',
],
)
| import os
from setuptools import setup, find_packages
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
import re
matched = re.match('__version__.*', read(os.path.join('hamcrest', '__init__.py')))
if matched:
exec(matched.group())
setup(
name = 'PyHamcrest',
version = __version__,
author = 'Jon Reid',
author_email = 'jon.reid@mac.com',
description = 'Hamcrest framework for matcher objects',
license = 'New BSD',
platforms=['All'],
keywords = 'hamcrest matchers pyunit unit test testing unittest unittesting',
url = 'http://code.google.com/p/hamcrest/',
download_url = 'http://pypi.python.org/packages/source/P/PyHamcrest/PyHamcrest-%s.tar.gz' % __version__,
packages = find_packages(),
test_suite = 'hamcrest-unit-test.alltests',
provides = ['hamcrest'],
long_description=read('README.md'),
classifiers = [
'Development Status :: 5 - Production/Stable',
'Environment :: Console',
'Intended Audience :: Developers',
'License :: OSI Approved :: BSD License',
'Natural Language :: English',
'Operating System :: OS Independent',
'Programming Language :: Python :: 2.6',
'Topic :: Software Development',
'Topic :: Software Development :: Quality Assurance',
'Topic :: Software Development :: Testing',
],
use_2to3 = True,
)
| Support python 3 installtion; need distribute | Support python 3 installtion; need distribute
| Python | bsd-3-clause | msabramo/PyHamcrest,nitishr/PyHamcrest,nitishr/PyHamcrest,msabramo/PyHamcrest | python | ## Code Before:
import os
from setuptools import setup, find_packages
from hamcrest import __version__
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
setup(
name = 'PyHamcrest',
version = __version__,
author = 'Jon Reid',
author_email = 'jon.reid@mac.com',
description = 'Hamcrest framework for matcher objects',
license = 'New BSD',
platforms=['All'],
keywords = 'hamcrest matchers pyunit unit test testing unittest unittesting',
url = 'http://code.google.com/p/hamcrest/',
download_url = 'http://pypi.python.org/packages/source/P/PyHamcrest/PyHamcrest-%s.tar.gz' % __version__,
packages = find_packages(),
test_suite = 'hamcrest-unit-test.alltests',
provides = ['hamcrest'],
long_description=read('README.md'),
classifiers = [
'Development Status :: 5 - Production/Stable',
'Environment :: Console',
'Intended Audience :: Developers',
'License :: OSI Approved :: BSD License',
'Natural Language :: English',
'Operating System :: OS Independent',
'Programming Language :: Python :: 2.6',
'Topic :: Software Development',
'Topic :: Software Development :: Quality Assurance',
'Topic :: Software Development :: Testing',
],
)
## Instruction:
Support python 3 installtion; need distribute
## Code After:
import os
from setuptools import setup, find_packages
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
import re
matched = re.match('__version__.*', read(os.path.join('hamcrest', '__init__.py')))
if matched:
exec(matched.group())
setup(
name = 'PyHamcrest',
version = __version__,
author = 'Jon Reid',
author_email = 'jon.reid@mac.com',
description = 'Hamcrest framework for matcher objects',
license = 'New BSD',
platforms=['All'],
keywords = 'hamcrest matchers pyunit unit test testing unittest unittesting',
url = 'http://code.google.com/p/hamcrest/',
download_url = 'http://pypi.python.org/packages/source/P/PyHamcrest/PyHamcrest-%s.tar.gz' % __version__,
packages = find_packages(),
test_suite = 'hamcrest-unit-test.alltests',
provides = ['hamcrest'],
long_description=read('README.md'),
classifiers = [
'Development Status :: 5 - Production/Stable',
'Environment :: Console',
'Intended Audience :: Developers',
'License :: OSI Approved :: BSD License',
'Natural Language :: English',
'Operating System :: OS Independent',
'Programming Language :: Python :: 2.6',
'Topic :: Software Development',
'Topic :: Software Development :: Quality Assurance',
'Topic :: Software Development :: Testing',
],
use_2to3 = True,
)
| import os
from setuptools import setup, find_packages
- from hamcrest import __version__
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
+
+ import re
+ matched = re.match('__version__.*', read(os.path.join('hamcrest', '__init__.py')))
+ if matched:
+ exec(matched.group())
setup(
name = 'PyHamcrest',
version = __version__,
author = 'Jon Reid',
author_email = 'jon.reid@mac.com',
description = 'Hamcrest framework for matcher objects',
license = 'New BSD',
platforms=['All'],
keywords = 'hamcrest matchers pyunit unit test testing unittest unittesting',
url = 'http://code.google.com/p/hamcrest/',
download_url = 'http://pypi.python.org/packages/source/P/PyHamcrest/PyHamcrest-%s.tar.gz' % __version__,
packages = find_packages(),
test_suite = 'hamcrest-unit-test.alltests',
provides = ['hamcrest'],
long_description=read('README.md'),
classifiers = [
'Development Status :: 5 - Production/Stable',
'Environment :: Console',
'Intended Audience :: Developers',
'License :: OSI Approved :: BSD License',
'Natural Language :: English',
'Operating System :: OS Independent',
'Programming Language :: Python :: 2.6',
'Topic :: Software Development',
'Topic :: Software Development :: Quality Assurance',
'Topic :: Software Development :: Testing',
],
+ use_2to3 = True,
) | 7 | 0.2 | 6 | 1 |
df45251622e6b935b27022e36fcbd79e9228f989 | bonobo/commands/init.py | bonobo/commands/init.py | import os
def execute(name, branch, overwrite_if_exists=False):
try:
from cookiecutter.main import cookiecutter
except ImportError as exc:
raise ImportError(
'You must install "cookiecutter" to use this command.\n\n $ pip install cookiecutter\n'
) from exc
if os.listdir(os.getcwd()) == []:
overwrite_if_exists = True
return cookiecutter(
'https://github.com/python-bonobo/cookiecutter-bonobo.git',
extra_context={'name': name},
no_input=True,
checkout=branch,
overwrite_if_exists=overwrite_if_exists
)
def register(parser):
parser.add_argument('name')
parser.add_argument('--branch', '-b', default='master')
return execute
| import os
def execute(name, branch):
try:
from cookiecutter.main import cookiecutter
except ImportError as exc:
raise ImportError(
'You must install "cookiecutter" to use this command.\n\n $ pip install cookiecutter\n'
) from exc
overwrite_if_exists = False
project_path = os.path.join(os.getcwd(), name)
if os.path.isdir(project_path) and not os.listdir(project_path):
overwrite_if_exists = True
return cookiecutter(
'https://github.com/python-bonobo/cookiecutter-bonobo.git',
extra_context={'name': name},
no_input=True,
checkout=branch,
overwrite_if_exists=overwrite_if_exists
)
def register(parser):
parser.add_argument('name')
parser.add_argument('--branch', '-b', default='master')
return execute
| Check if target directory is empty instead of current directory and remove overwrite_if_exists argument | Check if target directory is empty instead of current directory and remove overwrite_if_exists argument
| Python | apache-2.0 | hartym/bonobo,python-bonobo/bonobo,hartym/bonobo,hartym/bonobo,python-bonobo/bonobo,python-bonobo/bonobo | python | ## Code Before:
import os
def execute(name, branch, overwrite_if_exists=False):
try:
from cookiecutter.main import cookiecutter
except ImportError as exc:
raise ImportError(
'You must install "cookiecutter" to use this command.\n\n $ pip install cookiecutter\n'
) from exc
if os.listdir(os.getcwd()) == []:
overwrite_if_exists = True
return cookiecutter(
'https://github.com/python-bonobo/cookiecutter-bonobo.git',
extra_context={'name': name},
no_input=True,
checkout=branch,
overwrite_if_exists=overwrite_if_exists
)
def register(parser):
parser.add_argument('name')
parser.add_argument('--branch', '-b', default='master')
return execute
## Instruction:
Check if target directory is empty instead of current directory and remove overwrite_if_exists argument
## Code After:
import os
def execute(name, branch):
try:
from cookiecutter.main import cookiecutter
except ImportError as exc:
raise ImportError(
'You must install "cookiecutter" to use this command.\n\n $ pip install cookiecutter\n'
) from exc
overwrite_if_exists = False
project_path = os.path.join(os.getcwd(), name)
if os.path.isdir(project_path) and not os.listdir(project_path):
overwrite_if_exists = True
return cookiecutter(
'https://github.com/python-bonobo/cookiecutter-bonobo.git',
extra_context={'name': name},
no_input=True,
checkout=branch,
overwrite_if_exists=overwrite_if_exists
)
def register(parser):
parser.add_argument('name')
parser.add_argument('--branch', '-b', default='master')
return execute
| import os
- def execute(name, branch, overwrite_if_exists=False):
+ def execute(name, branch):
try:
from cookiecutter.main import cookiecutter
except ImportError as exc:
raise ImportError(
'You must install "cookiecutter" to use this command.\n\n $ pip install cookiecutter\n'
) from exc
- if os.listdir(os.getcwd()) == []:
+ overwrite_if_exists = False
+ project_path = os.path.join(os.getcwd(), name)
+ if os.path.isdir(project_path) and not os.listdir(project_path):
overwrite_if_exists = True
return cookiecutter(
'https://github.com/python-bonobo/cookiecutter-bonobo.git',
extra_context={'name': name},
no_input=True,
checkout=branch,
overwrite_if_exists=overwrite_if_exists
)
def register(parser):
parser.add_argument('name')
parser.add_argument('--branch', '-b', default='master')
return execute | 6 | 0.230769 | 4 | 2 |
dc0dfd4a763dceef655d62e8364b92a8073b7751 | chrome/chromehost.py | chrome/chromehost.py | import socket
import struct
import sys
def send_to_chrome(message):
# Write message size.
sys.stdout.write(struct.pack('I', len(message)))
# Write the message itself.
sys.stdout.write(message)
sys.stdout.flush()
def read_from_chrome():
text_length_bytes = sys.stdin.read(4)
if len(text_length_bytes) == 0:
sys.exit(0)
# Unpack message length as 4 byte integer.
text_length = struct.unpack('i', text_length_bytes)[0]
# Read the text (JSON object) of the message.
text = sys.stdin.read(text_length).decode('utf-8')
return text
sock = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
socket_name = '/tmp/cachebrowser.sock'
sock.connect(socket_name)
message = read_from_chrome()
sock.send(message)
sock.send('\n')
response = ''
while True:
read = sock.recv(1024)
if len(read) == 0:
break
response += read
# response = sock.recv(1024)
send_to_chrome(response)
| import socket
import struct
import sys
def send_to_chrome(message):
# Write message size.
sys.stdout.write(struct.pack('I', len(message)))
# Write the message itself.
sys.stdout.write(message)
sys.stdout.flush()
def read_from_chrome():
text_length_bytes = sys.stdin.read(4)
if len(text_length_bytes) == 0:
sys.exit(0)
# Unpack message length as 4 byte integer.
text_length = struct.unpack('i', text_length_bytes)[0]
# Read the text (JSON object) of the message.
text = sys.stdin.read(text_length).decode('utf-8')
return text
# sock = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
# socket_name = '/tmp/cachebrowser.sock'
# sock.connect(socket_name)
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
sock.connect(('127.0.0.1', 4242))
message = read_from_chrome()
sock.send(message)
sock.send('\n')
# response = ''
# while True:
# read = sock.recv(1024)
# if len(read) == 0:
# break
# response += read
response = sock.recv(1024)
send_to_chrome(response)
# send_to_chrome("{}")
| Change chromhost to use normal sockets | Change chromhost to use normal sockets
| Python | mit | CacheBrowser/cachebrowser,NewBie1993/cachebrowser | python | ## Code Before:
import socket
import struct
import sys
def send_to_chrome(message):
# Write message size.
sys.stdout.write(struct.pack('I', len(message)))
# Write the message itself.
sys.stdout.write(message)
sys.stdout.flush()
def read_from_chrome():
text_length_bytes = sys.stdin.read(4)
if len(text_length_bytes) == 0:
sys.exit(0)
# Unpack message length as 4 byte integer.
text_length = struct.unpack('i', text_length_bytes)[0]
# Read the text (JSON object) of the message.
text = sys.stdin.read(text_length).decode('utf-8')
return text
sock = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
socket_name = '/tmp/cachebrowser.sock'
sock.connect(socket_name)
message = read_from_chrome()
sock.send(message)
sock.send('\n')
response = ''
while True:
read = sock.recv(1024)
if len(read) == 0:
break
response += read
# response = sock.recv(1024)
send_to_chrome(response)
## Instruction:
Change chromhost to use normal sockets
## Code After:
import socket
import struct
import sys
def send_to_chrome(message):
# Write message size.
sys.stdout.write(struct.pack('I', len(message)))
# Write the message itself.
sys.stdout.write(message)
sys.stdout.flush()
def read_from_chrome():
text_length_bytes = sys.stdin.read(4)
if len(text_length_bytes) == 0:
sys.exit(0)
# Unpack message length as 4 byte integer.
text_length = struct.unpack('i', text_length_bytes)[0]
# Read the text (JSON object) of the message.
text = sys.stdin.read(text_length).decode('utf-8')
return text
# sock = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
# socket_name = '/tmp/cachebrowser.sock'
# sock.connect(socket_name)
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
sock.connect(('127.0.0.1', 4242))
message = read_from_chrome()
sock.send(message)
sock.send('\n')
# response = ''
# while True:
# read = sock.recv(1024)
# if len(read) == 0:
# break
# response += read
response = sock.recv(1024)
send_to_chrome(response)
# send_to_chrome("{}")
| import socket
import struct
import sys
def send_to_chrome(message):
# Write message size.
sys.stdout.write(struct.pack('I', len(message)))
# Write the message itself.
sys.stdout.write(message)
sys.stdout.flush()
def read_from_chrome():
text_length_bytes = sys.stdin.read(4)
if len(text_length_bytes) == 0:
sys.exit(0)
# Unpack message length as 4 byte integer.
text_length = struct.unpack('i', text_length_bytes)[0]
# Read the text (JSON object) of the message.
text = sys.stdin.read(text_length).decode('utf-8')
return text
- sock = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
+ # sock = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
? ++
- socket_name = '/tmp/cachebrowser.sock'
+ # socket_name = '/tmp/cachebrowser.sock'
? ++
- sock.connect(socket_name)
+ # sock.connect(socket_name)
? ++
+ sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
+ sock.connect(('127.0.0.1', 4242))
message = read_from_chrome()
sock.send(message)
sock.send('\n')
- response = ''
+ # response = ''
? ++
- while True:
+ # while True:
? ++
- read = sock.recv(1024)
+ # read = sock.recv(1024)
? ++
- if len(read) == 0:
+ # if len(read) == 0:
? ++
- break
+ # break
? ++
- response += read
+ # response += read
? ++
- # response = sock.recv(1024)
+ response = sock.recv(1024)
send_to_chrome(response)
+ # send_to_chrome("{}") | 23 | 0.534884 | 13 | 10 |
5a00fab05a8a7c7025f0cb69edf363bda5dc38f7 | spec/spec_helper.rb | spec/spec_helper.rb | $LOAD_PATH << File.join(File.dirname(__FILE__), '..', 'lib')
$LOAD_PATH << File.join(File.dirname(__FILE__))
require 'rubygems'
require 'rspec'
require 'rspec/its'
require "simplecov"
require 'factory_girl'
require "mocha/api"
require "bourne"
require "timecop"
Dir["spec/support/**/*.rb"].each { |f| require File.expand_path(f) }
RSpec.configure do |config|
config.mock_framework = :mocha
config.include DeclarationMatchers
config.after do
Timecop.return
FactoryGirl.reload
end
end
| $LOAD_PATH << File.join(File.dirname(__FILE__), '..', 'lib')
$LOAD_PATH << File.join(File.dirname(__FILE__))
require 'rubygems'
require 'rspec'
require 'rspec/its'
require "simplecov"
require 'factory_girl'
require "mocha/api"
require "bourne"
require "timecop"
Dir["spec/support/**/*.rb"].each { |f| require File.expand_path(f) }
RSpec.configure do |config|
config.mock_framework = :mocha
config.include DeclarationMatchers
config.before do
FactoryGirl.reload
end
config.after do
Timecop.return
end
end
| Fix test order dependent failures with seeds 50350 + 48550 | Fix test order dependent failures with seeds 50350 + 48550
| Ruby | mit | composerinteralia/factory_girl,thoughtbot/factory_girl | ruby | ## Code Before:
$LOAD_PATH << File.join(File.dirname(__FILE__), '..', 'lib')
$LOAD_PATH << File.join(File.dirname(__FILE__))
require 'rubygems'
require 'rspec'
require 'rspec/its'
require "simplecov"
require 'factory_girl'
require "mocha/api"
require "bourne"
require "timecop"
Dir["spec/support/**/*.rb"].each { |f| require File.expand_path(f) }
RSpec.configure do |config|
config.mock_framework = :mocha
config.include DeclarationMatchers
config.after do
Timecop.return
FactoryGirl.reload
end
end
## Instruction:
Fix test order dependent failures with seeds 50350 + 48550
## Code After:
$LOAD_PATH << File.join(File.dirname(__FILE__), '..', 'lib')
$LOAD_PATH << File.join(File.dirname(__FILE__))
require 'rubygems'
require 'rspec'
require 'rspec/its'
require "simplecov"
require 'factory_girl'
require "mocha/api"
require "bourne"
require "timecop"
Dir["spec/support/**/*.rb"].each { |f| require File.expand_path(f) }
RSpec.configure do |config|
config.mock_framework = :mocha
config.include DeclarationMatchers
config.before do
FactoryGirl.reload
end
config.after do
Timecop.return
end
end
| $LOAD_PATH << File.join(File.dirname(__FILE__), '..', 'lib')
$LOAD_PATH << File.join(File.dirname(__FILE__))
require 'rubygems'
require 'rspec'
require 'rspec/its'
require "simplecov"
require 'factory_girl'
require "mocha/api"
require "bourne"
require "timecop"
Dir["spec/support/**/*.rb"].each { |f| require File.expand_path(f) }
RSpec.configure do |config|
config.mock_framework = :mocha
config.include DeclarationMatchers
+ config.before do
+ FactoryGirl.reload
+ end
+
config.after do
Timecop.return
- FactoryGirl.reload
end
end | 5 | 0.192308 | 4 | 1 |
151c3484da58fa02f7d2c69454be3cb4e3395d05 | recipes/recipe_modules/bot_update/tests/ensure_checkout.py | recipes/recipe_modules/bot_update/tests/ensure_checkout.py |
from recipe_engine import post_process
DEPS = [
'bot_update',
'gclient',
'recipe_engine/json',
]
def RunSteps(api):
api.gclient.set_config('depot_tools')
api.bot_update.ensure_checkout()
def GenTests(api):
yield (
api.test('basic') +
api.post_process(post_process.StatusCodeIn, 0) +
api.post_process(post_process.DropExpectation)
)
yield (
api.test('failure') +
api.override_step_data(
'bot_update',
api.json.output({'did_run': True}),
retcode=1) +
api.post_process(post_process.StatusCodeIn, 1) +
api.post_process(post_process.DropExpectation)
)
|
from recipe_engine import post_process
DEPS = [
'bot_update',
'gclient',
'recipe_engine/json',
]
def RunSteps(api):
api.gclient.set_config('depot_tools')
api.bot_update.ensure_checkout()
def GenTests(api):
yield (
api.test('basic') +
api.post_process(post_process.StatusSuccess) +
api.post_process(post_process.DropExpectation)
)
yield (
api.test('failure') +
api.override_step_data(
'bot_update',
api.json.output({'did_run': True}),
retcode=1) +
api.post_process(post_process.StatusAnyFailure) +
api.post_process(post_process.DropExpectation)
)
| Replace post-process checks with ones that are not deprecated | Replace post-process checks with ones that are not deprecated
R=40f3d43a28ebae3cb819288542e1c84d73d962d5@chromium.org
Bug: 899266
Change-Id: Ia9b1f38590d636fa2858a2bd0bbf75d6b2cfe8fa
Reviewed-on: https://chromium-review.googlesource.com/c/1483033
Reviewed-by: Robbie Iannucci <40f3d43a28ebae3cb819288542e1c84d73d962d5@chromium.org>
Reviewed-by: John Budorick <17d38a2d68c6a07a3ab0ce4a2873c5acefbd3dbb@chromium.org>
Commit-Queue: Sergiy Belozorov <aadb4a11584aa9878242ea5d9e4b7e3429654579@chromium.org>
| Python | bsd-3-clause | CoherentLabs/depot_tools,CoherentLabs/depot_tools | python | ## Code Before:
from recipe_engine import post_process
DEPS = [
'bot_update',
'gclient',
'recipe_engine/json',
]
def RunSteps(api):
api.gclient.set_config('depot_tools')
api.bot_update.ensure_checkout()
def GenTests(api):
yield (
api.test('basic') +
api.post_process(post_process.StatusCodeIn, 0) +
api.post_process(post_process.DropExpectation)
)
yield (
api.test('failure') +
api.override_step_data(
'bot_update',
api.json.output({'did_run': True}),
retcode=1) +
api.post_process(post_process.StatusCodeIn, 1) +
api.post_process(post_process.DropExpectation)
)
## Instruction:
Replace post-process checks with ones that are not deprecated
R=40f3d43a28ebae3cb819288542e1c84d73d962d5@chromium.org
Bug: 899266
Change-Id: Ia9b1f38590d636fa2858a2bd0bbf75d6b2cfe8fa
Reviewed-on: https://chromium-review.googlesource.com/c/1483033
Reviewed-by: Robbie Iannucci <40f3d43a28ebae3cb819288542e1c84d73d962d5@chromium.org>
Reviewed-by: John Budorick <17d38a2d68c6a07a3ab0ce4a2873c5acefbd3dbb@chromium.org>
Commit-Queue: Sergiy Belozorov <aadb4a11584aa9878242ea5d9e4b7e3429654579@chromium.org>
## Code After:
from recipe_engine import post_process
DEPS = [
'bot_update',
'gclient',
'recipe_engine/json',
]
def RunSteps(api):
api.gclient.set_config('depot_tools')
api.bot_update.ensure_checkout()
def GenTests(api):
yield (
api.test('basic') +
api.post_process(post_process.StatusSuccess) +
api.post_process(post_process.DropExpectation)
)
yield (
api.test('failure') +
api.override_step_data(
'bot_update',
api.json.output({'did_run': True}),
retcode=1) +
api.post_process(post_process.StatusAnyFailure) +
api.post_process(post_process.DropExpectation)
)
|
from recipe_engine import post_process
DEPS = [
'bot_update',
'gclient',
'recipe_engine/json',
]
def RunSteps(api):
api.gclient.set_config('depot_tools')
api.bot_update.ensure_checkout()
def GenTests(api):
yield (
api.test('basic') +
- api.post_process(post_process.StatusCodeIn, 0) +
? ^^^ ^^^^^
+ api.post_process(post_process.StatusSuccess) +
? ^^^^ ^^
api.post_process(post_process.DropExpectation)
)
yield (
api.test('failure') +
api.override_step_data(
'bot_update',
api.json.output({'did_run': True}),
retcode=1) +
- api.post_process(post_process.StatusCodeIn, 1) +
? ^^^ -----
+ api.post_process(post_process.StatusAnyFailure) +
? ^^^^^^^^^
api.post_process(post_process.DropExpectation)
) | 4 | 0.129032 | 2 | 2 |
c8d3f24e341e7d8e383cabb56c70b78fcd7a6d89 | src/commands/login.js | src/commands/login.js | import { promisify } from 'bluebird';
import { prompt as promptCallback } from 'promptly';
import { getNetrc, saveNetrc } from '../netrc';
const prompt = promisify(promptCallback);
export default async function login(reindex, args) {
let [url, token] = args._.slice(1);
if (!url) {
url = await prompt('Reindex URL', {
validator: (value) => value && value.length > 0,
retry: true,
});
}
if (!token) {
token = await prompt('Reindex Token', {
validator: (value) => value && value.length > 0,
retry: true,
});
}
const userNetrc = getNetrc();
userNetrc['accounts.reindex.io'] = {
login: url,
password: token,
};
saveNetrc(userNetrc);
console.log('You are now logged-in.');
}
| import { promisify } from 'bluebird';
import { prompt as promptCallback } from 'promptly';
import { getNetrc, saveNetrc } from '../netrc';
const prompt = promisify(promptCallback);
export default async function login(reindex, args) {
let [url, token] = args._.slice(1);
if (!url) {
url = await prompt('Reindex URL', {
validator: (value) => value && value.length > 0 && value,
retry: true,
});
}
if (!token) {
token = await prompt('Reindex Token', {
validator: (value) => value && value.length > 0 && value,
retry: true,
});
}
const userNetrc = getNetrc();
userNetrc['accounts.reindex.io'] = {
login: url,
password: token,
};
saveNetrc(userNetrc);
console.log('You are now logged-in.');
}
| Fix prompt validator that broke netrc saving | Fix prompt validator that broke netrc saving
| JavaScript | mit | reindexio/reindex-cli | javascript | ## Code Before:
import { promisify } from 'bluebird';
import { prompt as promptCallback } from 'promptly';
import { getNetrc, saveNetrc } from '../netrc';
const prompt = promisify(promptCallback);
export default async function login(reindex, args) {
let [url, token] = args._.slice(1);
if (!url) {
url = await prompt('Reindex URL', {
validator: (value) => value && value.length > 0,
retry: true,
});
}
if (!token) {
token = await prompt('Reindex Token', {
validator: (value) => value && value.length > 0,
retry: true,
});
}
const userNetrc = getNetrc();
userNetrc['accounts.reindex.io'] = {
login: url,
password: token,
};
saveNetrc(userNetrc);
console.log('You are now logged-in.');
}
## Instruction:
Fix prompt validator that broke netrc saving
## Code After:
import { promisify } from 'bluebird';
import { prompt as promptCallback } from 'promptly';
import { getNetrc, saveNetrc } from '../netrc';
const prompt = promisify(promptCallback);
export default async function login(reindex, args) {
let [url, token] = args._.slice(1);
if (!url) {
url = await prompt('Reindex URL', {
validator: (value) => value && value.length > 0 && value,
retry: true,
});
}
if (!token) {
token = await prompt('Reindex Token', {
validator: (value) => value && value.length > 0 && value,
retry: true,
});
}
const userNetrc = getNetrc();
userNetrc['accounts.reindex.io'] = {
login: url,
password: token,
};
saveNetrc(userNetrc);
console.log('You are now logged-in.');
}
| import { promisify } from 'bluebird';
import { prompt as promptCallback } from 'promptly';
import { getNetrc, saveNetrc } from '../netrc';
const prompt = promisify(promptCallback);
export default async function login(reindex, args) {
let [url, token] = args._.slice(1);
if (!url) {
url = await prompt('Reindex URL', {
- validator: (value) => value && value.length > 0,
+ validator: (value) => value && value.length > 0 && value,
? +++++++++
retry: true,
});
}
if (!token) {
token = await prompt('Reindex Token', {
- validator: (value) => value && value.length > 0,
+ validator: (value) => value && value.length > 0 && value,
? +++++++++
retry: true,
});
}
const userNetrc = getNetrc();
userNetrc['accounts.reindex.io'] = {
login: url,
password: token,
};
saveNetrc(userNetrc);
console.log('You are now logged-in.');
} | 4 | 0.125 | 2 | 2 |
21879a0a499f32869811a1ec960be208d90d358c | tests/317-array-build.swift | tests/317-array-build.swift |
import io;
import unix;
(file o[]) task(file i, int n) "turbine" "0.1"
[
"""
set f [ swift_filename &<<i>> ]
exec ./317-array-build.task.sh $f <<n>>;
set L [ glob test-317-*.data ];
swift_array_build <<o>> $L file;
"""
];
main
{
printf("OK");
file i<"input.txt">;
file o[];
o = task(i, 10);
foreach f in o
{
printf("output file: %s", filename(f));
}
i = touch();
}
|
import io;
import unix;
(file o[]) task(file i, int n) "turbine" "0.1"
[
"""
set f [ swift_filename &<<i>> ]
exec ./317-array-build.task.sh $f <<n>>;
set L [ glob test-317-*.data ];
set <<o>> swift_array_build $L file;
"""
];
main
{
printf("OK");
file i<"input.txt">;
file o[];
o = task(i, 10);
foreach f in o
{
printf("output file: %s", filename(f));
}
i = touch();
}
| Update test 317 for modified array_build syntax | Update test 317 for modified array_build syntax
git-svn-id: 0c5512015aa96f7d3f5c3ad598bd98edc52008b1@10805 dc4e9af1-7f46-4ead-bba6-71afc04862de
| Swift | apache-2.0 | JohnPJenkins/swift-t,JohnPJenkins/swift-t,JohnPJenkins/swift-t,blue42u/swift-t,blue42u/swift-t,basheersubei/swift-t,swift-lang/swift-t,basheersubei/swift-t,basheersubei/swift-t,JohnPJenkins/swift-t,swift-lang/swift-t,swift-lang/swift-t,blue42u/swift-t,JohnPJenkins/swift-t,basheersubei/swift-t,blue42u/swift-t,basheersubei/swift-t,blue42u/swift-t,basheersubei/swift-t,blue42u/swift-t,blue42u/swift-t,JohnPJenkins/swift-t,basheersubei/swift-t,swift-lang/swift-t,swift-lang/swift-t,JohnPJenkins/swift-t,swift-lang/swift-t,swift-lang/swift-t | swift | ## Code Before:
import io;
import unix;
(file o[]) task(file i, int n) "turbine" "0.1"
[
"""
set f [ swift_filename &<<i>> ]
exec ./317-array-build.task.sh $f <<n>>;
set L [ glob test-317-*.data ];
swift_array_build <<o>> $L file;
"""
];
main
{
printf("OK");
file i<"input.txt">;
file o[];
o = task(i, 10);
foreach f in o
{
printf("output file: %s", filename(f));
}
i = touch();
}
## Instruction:
Update test 317 for modified array_build syntax
git-svn-id: 0c5512015aa96f7d3f5c3ad598bd98edc52008b1@10805 dc4e9af1-7f46-4ead-bba6-71afc04862de
## Code After:
import io;
import unix;
(file o[]) task(file i, int n) "turbine" "0.1"
[
"""
set f [ swift_filename &<<i>> ]
exec ./317-array-build.task.sh $f <<n>>;
set L [ glob test-317-*.data ];
set <<o>> swift_array_build $L file;
"""
];
main
{
printf("OK");
file i<"input.txt">;
file o[];
o = task(i, 10);
foreach f in o
{
printf("output file: %s", filename(f));
}
i = touch();
}
|
import io;
import unix;
(file o[]) task(file i, int n) "turbine" "0.1"
[
"""
set f [ swift_filename &<<i>> ]
exec ./317-array-build.task.sh $f <<n>>;
set L [ glob test-317-*.data ];
- swift_array_build <<o>> $L file;
? ------
+ set <<o>> swift_array_build $L file;
? ++++++++++
"""
];
main
{
printf("OK");
file i<"input.txt">;
file o[];
o = task(i, 10);
foreach f in o
{
printf("output file: %s", filename(f));
}
i = touch();
} | 2 | 0.076923 | 1 | 1 |
6df89c0b812675b0fece2d0be212cdd6b3b00a6f | README.md | README.md | recsys
======
Use those scripts to download the 10M movielens dataset and index them in Elasticsearch:
setup-env.sh
============
Takes care of setting up an environment that can be used to index movielens data. Fetches:
| recsys
======
Use those scripts to download the 10M movielens dataset and index them in Elasticsearch:
setup-env.sh
============
Takes care of setting up an environment that can be used to index movielens data. Fetches:
* Movielens 10M dataset
* hetrec dataset to augment movielens
* Elasticsearch 1.4* for indexing
* Marvel (+ installs Marvel into Elasticsearch) for query exploration
* kibana for data exploration
post_movies.py
===============
usage: post_movies.py [-h] [--lens lens] [--clear clearance] [--stop clearonly]
Parse movielens formatted information and post message therein to a running elasticsearch instance.
optional arguments:
-h, --help show this help message and exit
--lens lens Path to movielens directory in local filesystem.
--clear clearance Set to "true" to clear the existing index before re-indexing.
--stop clearonly Only clear index, do not add more documents.
Index names used:
* movies - movie information
* ratings - for each rating information on the user, rating value and title of the rated movie
* tags - tags with timestamp and user information
post_movie_details.py
=====================
usage: post_movie_details.py [-h] [--datadir datadir] [--clear clearance] [--stop clearonly]
Parse hetrec formatted information and post details therein to a running elasticsearch instance. Index used: movie_details
optional arguments:
-h, --help show this help message and exit
--datadir datadir Path to data directory in local filesystem.
--clear clearance Set to "true" to clear the existing index before re-indexing.
--stop clearonly Only clear index, do not add more documents.
| Add more details on how to use the scripts | Add more details on how to use the scripts | Markdown | apache-2.0 | MaineC/recsys,MaineC/recsys | markdown | ## Code Before:
recsys
======
Use those scripts to download the 10M movielens dataset and index them in Elasticsearch:
setup-env.sh
============
Takes care of setting up an environment that can be used to index movielens data. Fetches:
## Instruction:
Add more details on how to use the scripts
## Code After:
recsys
======
Use those scripts to download the 10M movielens dataset and index them in Elasticsearch:
setup-env.sh
============
Takes care of setting up an environment that can be used to index movielens data. Fetches:
* Movielens 10M dataset
* hetrec dataset to augment movielens
* Elasticsearch 1.4* for indexing
* Marvel (+ installs Marvel into Elasticsearch) for query exploration
* kibana for data exploration
post_movies.py
===============
usage: post_movies.py [-h] [--lens lens] [--clear clearance] [--stop clearonly]
Parse movielens formatted information and post message therein to a running elasticsearch instance.
optional arguments:
-h, --help show this help message and exit
--lens lens Path to movielens directory in local filesystem.
--clear clearance Set to "true" to clear the existing index before re-indexing.
--stop clearonly Only clear index, do not add more documents.
Index names used:
* movies - movie information
* ratings - for each rating information on the user, rating value and title of the rated movie
* tags - tags with timestamp and user information
post_movie_details.py
=====================
usage: post_movie_details.py [-h] [--datadir datadir] [--clear clearance] [--stop clearonly]
Parse hetrec formatted information and post details therein to a running elasticsearch instance. Index used: movie_details
optional arguments:
-h, --help show this help message and exit
--datadir datadir Path to data directory in local filesystem.
--clear clearance Set to "true" to clear the existing index before re-indexing.
--stop clearonly Only clear index, do not add more documents.
| recsys
======
Use those scripts to download the 10M movielens dataset and index them in Elasticsearch:
setup-env.sh
============
Takes care of setting up an environment that can be used to index movielens data. Fetches:
+ * Movielens 10M dataset
+ * hetrec dataset to augment movielens
+ * Elasticsearch 1.4* for indexing
+ * Marvel (+ installs Marvel into Elasticsearch) for query exploration
+ * kibana for data exploration
+ post_movies.py
+ ===============
+
+ usage: post_movies.py [-h] [--lens lens] [--clear clearance] [--stop clearonly]
+
+ Parse movielens formatted information and post message therein to a running elasticsearch instance.
+
+ optional arguments:
+ -h, --help show this help message and exit
+ --lens lens Path to movielens directory in local filesystem.
+ --clear clearance Set to "true" to clear the existing index before re-indexing.
+ --stop clearonly Only clear index, do not add more documents.
+
+ Index names used:
+
+ * movies - movie information
+ * ratings - for each rating information on the user, rating value and title of the rated movie
+ * tags - tags with timestamp and user information
+
+ post_movie_details.py
+ =====================
+
+ usage: post_movie_details.py [-h] [--datadir datadir] [--clear clearance] [--stop clearonly]
+
+ Parse hetrec formatted information and post details therein to a running elasticsearch instance. Index used: movie_details
+
+ optional arguments:
+ -h, --help show this help message and exit
+ --datadir datadir Path to data directory in local filesystem.
+ --clear clearance Set to "true" to clear the existing index before re-indexing.
+ --stop clearonly Only clear index, do not add more documents. | 36 | 3 | 36 | 0 |
3dfb8178f5d1f5574fdaf48c4975fae35184e0e7 | .travis.yml | .travis.yml | language: node_js
node_js:
- "0.10.26"
before_install:
- npm install -g gulp
- npm install
- npm install -g bower
- bower install
script:
- gulp test
notifications:
email:
recipients:
- jespinog@gmail.com
- andrei.antoukh@gmail.com
- bameda@dbarragan.com
- anler86@gmail.com
on_success: change
on_failure: change
| language: node_js
node_js:
- "0.10.26"
before_install:
- npm install -g gulp
- npm install
- npm install -g bower
- bower install
- apt-get install -qq google-chrome
script:
- gulp test
notifications:
email:
recipients:
- jespinog@gmail.com
- andrei.antoukh@gmail.com
- bameda@dbarragan.com
- anler86@gmail.com
on_success: change
on_failure: change
| Configure Travis-CI (4: Try to install chrome) | Configure Travis-CI (4: Try to install chrome)
| YAML | agpl-3.0 | taigaio/taiga-front-old | yaml | ## Code Before:
language: node_js
node_js:
- "0.10.26"
before_install:
- npm install -g gulp
- npm install
- npm install -g bower
- bower install
script:
- gulp test
notifications:
email:
recipients:
- jespinog@gmail.com
- andrei.antoukh@gmail.com
- bameda@dbarragan.com
- anler86@gmail.com
on_success: change
on_failure: change
## Instruction:
Configure Travis-CI (4: Try to install chrome)
## Code After:
language: node_js
node_js:
- "0.10.26"
before_install:
- npm install -g gulp
- npm install
- npm install -g bower
- bower install
- apt-get install -qq google-chrome
script:
- gulp test
notifications:
email:
recipients:
- jespinog@gmail.com
- andrei.antoukh@gmail.com
- bameda@dbarragan.com
- anler86@gmail.com
on_success: change
on_failure: change
| language: node_js
node_js:
- "0.10.26"
before_install:
- npm install -g gulp
- npm install
- npm install -g bower
- bower install
+ - apt-get install -qq google-chrome
script:
- gulp test
notifications:
email:
recipients:
- jespinog@gmail.com
- andrei.antoukh@gmail.com
- bameda@dbarragan.com
- anler86@gmail.com
on_success: change
on_failure: change | 1 | 0.052632 | 1 | 0 |
786337a56f45b1a64c915c5a810114c74a3fae8d | components/tips/tips.jade | components/tips/tips.jade | if tips
.Tips__tips
for tip in tips
a.Tip.js-tip(
href=tip.href
data-id=tip.id
data-trigger=tip.trigger
)
.Tip__title!= tip.title
.Tip__close.js-close
span(
class='iconic iconic-sm'
data-glyph='x'
title='x'
aria-hidden='true'
)
| if tips
.Tips__tips
for tip in tips
.Tip.js-tip(
data-id=tip.id
data-trigger=tip.trigger
)
a(href=tip.href)
.Tip__title!= tip.title
.Tip__close.js-close
span.js-close(
class='iconic iconic-sm'
data-glyph='x'
title='x'
aria-hidden='true'
)
| Move link from tip container to tip title | Move link from tip container to tip title
| Jade | mit | aredotna/ervell,aredotna/ervell,aredotna/ervell,aredotna/ervell,aredotna/ervell | jade | ## Code Before:
if tips
.Tips__tips
for tip in tips
a.Tip.js-tip(
href=tip.href
data-id=tip.id
data-trigger=tip.trigger
)
.Tip__title!= tip.title
.Tip__close.js-close
span(
class='iconic iconic-sm'
data-glyph='x'
title='x'
aria-hidden='true'
)
## Instruction:
Move link from tip container to tip title
## Code After:
if tips
.Tips__tips
for tip in tips
.Tip.js-tip(
data-id=tip.id
data-trigger=tip.trigger
)
a(href=tip.href)
.Tip__title!= tip.title
.Tip__close.js-close
span.js-close(
class='iconic iconic-sm'
data-glyph='x'
title='x'
aria-hidden='true'
)
| if tips
.Tips__tips
for tip in tips
- a.Tip.js-tip(
? -
+ .Tip.js-tip(
- href=tip.href
data-id=tip.id
data-trigger=tip.trigger
- )
+ )
? +
+ a(href=tip.href)
- .Tip__title!= tip.title
+ .Tip__title!= tip.title
? ++
.Tip__close.js-close
- span(
+ span.js-close(
? +++++++++
class='iconic iconic-sm'
data-glyph='x'
title='x'
aria-hidden='true'
) | 10 | 0.625 | 5 | 5 |
0792fefb2bc9d5db038b48855f0b1bb138653332 | autogen.sh | autogen.sh |
set -e
# Some boiler plate to get git setup as expected
if test -d .git; then
if test -f .git/hooks/pre-commit.sample && \
test ! -f .git/hooks/pre-commit; then
cp -pv .git/hooks/pre-commit.sample .git/hooks/pre-commit
fi
fi
set -x
# Copied from avahi's autogen.sh to work around gettext braindamage
rm -f Makefile.am~ configure.ac~
# Evil, evil, evil, evil hack
sed 's/read dummy/\#/' `which gettextize` | sh -s -- --copy --force --no-changelog
test -f Makefile.am~ && mv Makefile.am~ Makefile.am
test -f configure.ac~ && mv configure.ac~ configure.ac
autoreconf --force --install --verbose
if test x"$NOCONFIGURE" = x; then
exec ./configure "$@"
fi
|
set -e
# Some boiler plate to get git setup as expected
if test -d .git; then
if test -f .git/hooks/pre-commit.sample && \
test ! -f .git/hooks/pre-commit; then
cp -pv .git/hooks/pre-commit.sample .git/hooks/pre-commit
fi
fi
set -x
gettextize=$(which gettextize)
if test -z "$gettextize"; then
echo "Couldn't find gettextize" >&2
exit 1
fi
# Copied from avahi's autogen.sh to work around gettext braindamage
rm -f Makefile.am~ configure.ac~
# Evil, evil, evil, evil hack
sed 's/read dummy/\#/' $gettextize | sh -s -- --copy --force --no-changelog
test -f Makefile.am~ && mv Makefile.am~ Makefile.am
test -f configure.ac~ && mv configure.ac~ configure.ac
autoreconf --force --install --verbose
if test x"$NOCONFIGURE" = x; then
exec ./configure "$@"
fi
| Handle build case when gettextize is not available or not installed | Handle build case when gettextize is not available or not installed
| Shell | bsd-3-clause | Distrotech/p11-kit,pspacek/p11-kit,freedesktop-unofficial-mirror/p11-glue__p11-kit,freedesktop-unofficial-mirror/p11-glue__p11-kit,pspacek/p11-kit,pspacek/p11-kit,pspacek/p11-kit,Distrotech/p11-kit,lkundrak/p11-kit,freedesktop-unofficial-mirror/p11-glue__p11-kit,Distrotech/p11-kit,lkundrak/p11-kit,lkundrak/p11-kit,Distrotech/p11-kit | shell | ## Code Before:
set -e
# Some boiler plate to get git setup as expected
if test -d .git; then
if test -f .git/hooks/pre-commit.sample && \
test ! -f .git/hooks/pre-commit; then
cp -pv .git/hooks/pre-commit.sample .git/hooks/pre-commit
fi
fi
set -x
# Copied from avahi's autogen.sh to work around gettext braindamage
rm -f Makefile.am~ configure.ac~
# Evil, evil, evil, evil hack
sed 's/read dummy/\#/' `which gettextize` | sh -s -- --copy --force --no-changelog
test -f Makefile.am~ && mv Makefile.am~ Makefile.am
test -f configure.ac~ && mv configure.ac~ configure.ac
autoreconf --force --install --verbose
if test x"$NOCONFIGURE" = x; then
exec ./configure "$@"
fi
## Instruction:
Handle build case when gettextize is not available or not installed
## Code After:
set -e
# Some boiler plate to get git setup as expected
if test -d .git; then
if test -f .git/hooks/pre-commit.sample && \
test ! -f .git/hooks/pre-commit; then
cp -pv .git/hooks/pre-commit.sample .git/hooks/pre-commit
fi
fi
set -x
gettextize=$(which gettextize)
if test -z "$gettextize"; then
echo "Couldn't find gettextize" >&2
exit 1
fi
# Copied from avahi's autogen.sh to work around gettext braindamage
rm -f Makefile.am~ configure.ac~
# Evil, evil, evil, evil hack
sed 's/read dummy/\#/' $gettextize | sh -s -- --copy --force --no-changelog
test -f Makefile.am~ && mv Makefile.am~ Makefile.am
test -f configure.ac~ && mv configure.ac~ configure.ac
autoreconf --force --install --verbose
if test x"$NOCONFIGURE" = x; then
exec ./configure "$@"
fi
|
set -e
# Some boiler plate to get git setup as expected
if test -d .git; then
if test -f .git/hooks/pre-commit.sample && \
test ! -f .git/hooks/pre-commit; then
cp -pv .git/hooks/pre-commit.sample .git/hooks/pre-commit
fi
fi
set -x
+ gettextize=$(which gettextize)
+ if test -z "$gettextize"; then
+ echo "Couldn't find gettextize" >&2
+ exit 1
+ fi
+
# Copied from avahi's autogen.sh to work around gettext braindamage
rm -f Makefile.am~ configure.ac~
# Evil, evil, evil, evil hack
- sed 's/read dummy/\#/' `which gettextize` | sh -s -- --copy --force --no-changelog
? ^^^^^^^ -
+ sed 's/read dummy/\#/' $gettextize | sh -s -- --copy --force --no-changelog
? ^
test -f Makefile.am~ && mv Makefile.am~ Makefile.am
test -f configure.ac~ && mv configure.ac~ configure.ac
autoreconf --force --install --verbose
if test x"$NOCONFIGURE" = x; then
exec ./configure "$@"
fi
| 8 | 0.32 | 7 | 1 |
b476edaa4513e57cae60e4b25319c82cdb96f2bc | schema/2.0/gooobject.ts | schema/2.0/gooobject.ts | /// <reference path="common.ts"/>
enum LicenseType {
'CC0',
'CC BY',
'CC BY-SA',
'CC BY-NC',
'CC BY-NC-SA',
'PRIVATE'
}
interface GooObject {
id: string;
name: string;
license: LicenseType;
originalLicense?: LicenseType;
created: DateTime;
modified: DateTime;
readOnly?: boolean;
description?: string;
thumbnailRef?: ImageRef;
tags?: {
[tagName: string]: string;
}
originalAsset?: {
id: string;
version: string;
};
deleted: boolean;
/**
* @default 2
*/
dataModelVersion: number;
}
| /// <reference path="common.ts"/>
enum LicenseType {
'CC0',
'CC BY',
'CC BY-SA',
'CC BY-NC',
'CC BY-NC-SA',
'PRIVATE'
}
interface GooObject {
id: string;
name: string;
license: LicenseType;
originalLicense?: LicenseType;
created: DateTime;
modified: DateTime;
readOnly?: boolean;
description?: string;
thumbnailRef?: ImageRef;
tags?: {
[tagName: string]: string;
}
meta?: {
[propName: string]: string;
}
originalAsset?: {
id: string;
version: string;
};
deleted: boolean;
/**
* @default 2
*/
dataModelVersion: number;
}
| Add support for meta properties in every goo object. | Add support for meta properties in every goo object.
| TypeScript | mit | GooTechnologies/datamodel,GooTechnologies/datamodel,GooTechnologies/datamodel | typescript | ## Code Before:
/// <reference path="common.ts"/>
enum LicenseType {
'CC0',
'CC BY',
'CC BY-SA',
'CC BY-NC',
'CC BY-NC-SA',
'PRIVATE'
}
interface GooObject {
id: string;
name: string;
license: LicenseType;
originalLicense?: LicenseType;
created: DateTime;
modified: DateTime;
readOnly?: boolean;
description?: string;
thumbnailRef?: ImageRef;
tags?: {
[tagName: string]: string;
}
originalAsset?: {
id: string;
version: string;
};
deleted: boolean;
/**
* @default 2
*/
dataModelVersion: number;
}
## Instruction:
Add support for meta properties in every goo object.
## Code After:
/// <reference path="common.ts"/>
enum LicenseType {
'CC0',
'CC BY',
'CC BY-SA',
'CC BY-NC',
'CC BY-NC-SA',
'PRIVATE'
}
interface GooObject {
id: string;
name: string;
license: LicenseType;
originalLicense?: LicenseType;
created: DateTime;
modified: DateTime;
readOnly?: boolean;
description?: string;
thumbnailRef?: ImageRef;
tags?: {
[tagName: string]: string;
}
meta?: {
[propName: string]: string;
}
originalAsset?: {
id: string;
version: string;
};
deleted: boolean;
/**
* @default 2
*/
dataModelVersion: number;
}
| /// <reference path="common.ts"/>
enum LicenseType {
'CC0',
'CC BY',
'CC BY-SA',
'CC BY-NC',
'CC BY-NC-SA',
'PRIVATE'
}
interface GooObject {
id: string;
name: string;
license: LicenseType;
originalLicense?: LicenseType;
created: DateTime;
modified: DateTime;
readOnly?: boolean;
description?: string;
thumbnailRef?: ImageRef;
tags?: {
[tagName: string]: string;
}
+ meta?: {
+ [propName: string]: string;
+ }
+
originalAsset?: {
id: string;
version: string;
};
deleted: boolean;
/**
* @default 2
*/
dataModelVersion: number;
} | 4 | 0.097561 | 4 | 0 |
aa1f8fb5e611d2090914ffbbefaaf960d5ead45e | src/js/components/Shortcut/HotkeyDialog.tsx | src/js/components/Shortcut/HotkeyDialog.tsx | import React from 'react'
import { observer } from 'mobx-react'
import Dialog from '@material-ui/core/Dialog'
import DialogTitle from '@material-ui/core/DialogTitle'
import DialogContent from '@material-ui/core/DialogContent'
import Help from './Help'
import Fade from '@material-ui/core/Fade'
import { useStore } from 'components/StoreContext'
import { makeStyles } from '@material-ui/core'
const useStyles = makeStyles({
paper: {
width: '100%'
}
})
export default observer(props => {
const classes = useStyles(props)
const { shortcutStore } = useStore()
const { dialogOpen, closeDialog } = shortcutStore
return (
<Dialog
open={dialogOpen}
classes={classes}
TransitionComponent={Fade}
onClose={closeDialog}
onBackdropClick={closeDialog}
>
<DialogTitle>Keyboard shortcuts</DialogTitle>
<DialogContent>
<Help />
</DialogContent>
</Dialog>
)
})
| import React from 'react'
import useMediaQuery from '@material-ui/core/useMediaQuery'
import { observer } from 'mobx-react'
import Dialog from '@material-ui/core/Dialog'
import DialogTitle from '@material-ui/core/DialogTitle'
import DialogContent from '@material-ui/core/DialogContent'
import Help from './Help'
import Fade from '@material-ui/core/Fade'
import IconButton from '@material-ui/core/IconButton'
import CloseIcon from '@material-ui/icons/Close'
import { useStore } from 'components/StoreContext'
import { makeStyles, useTheme, Typography } from '@material-ui/core'
const useStyles = makeStyles(theme => ({
paper: {
width: '100%'
},
closeButton: {
position: 'absolute',
right: theme.spacing(1),
top: theme.spacing(1),
color: theme.palette.grey[500]
}
}))
export default observer(props => {
const theme = useTheme()
const fullScreen = useMediaQuery(theme.breakpoints.down('sm'))
const classes = useStyles(props)
const { shortcutStore } = useStore()
const { dialogOpen, closeDialog } = shortcutStore
return (
<Dialog
open={dialogOpen}
TransitionComponent={Fade}
onClose={closeDialog}
onBackdropClick={closeDialog}
{...{ maxWidth: 'lg', classes, fullScreen }}
>
<DialogTitle>
<Typography variant='h6'>Keyboard shortcuts</Typography>
<IconButton
aria-label='close'
className={classes.closeButton}
onClick={closeDialog}
>
<CloseIcon />
</IconButton>
</DialogTitle>
<DialogContent>
<Help />
</DialogContent>
</Dialog>
)
})
| Make hotkey dialog responsive and add close button | fix: Make hotkey dialog responsive and add close button
| TypeScript | mit | xcv58/Tab-Manager-v2,xcv58/Tab-Manager-v2,xcv58/Tab-Manager-v2,xcv58/Tab-Manager-v2 | typescript | ## Code Before:
import React from 'react'
import { observer } from 'mobx-react'
import Dialog from '@material-ui/core/Dialog'
import DialogTitle from '@material-ui/core/DialogTitle'
import DialogContent from '@material-ui/core/DialogContent'
import Help from './Help'
import Fade from '@material-ui/core/Fade'
import { useStore } from 'components/StoreContext'
import { makeStyles } from '@material-ui/core'
const useStyles = makeStyles({
paper: {
width: '100%'
}
})
export default observer(props => {
const classes = useStyles(props)
const { shortcutStore } = useStore()
const { dialogOpen, closeDialog } = shortcutStore
return (
<Dialog
open={dialogOpen}
classes={classes}
TransitionComponent={Fade}
onClose={closeDialog}
onBackdropClick={closeDialog}
>
<DialogTitle>Keyboard shortcuts</DialogTitle>
<DialogContent>
<Help />
</DialogContent>
</Dialog>
)
})
## Instruction:
fix: Make hotkey dialog responsive and add close button
## Code After:
import React from 'react'
import useMediaQuery from '@material-ui/core/useMediaQuery'
import { observer } from 'mobx-react'
import Dialog from '@material-ui/core/Dialog'
import DialogTitle from '@material-ui/core/DialogTitle'
import DialogContent from '@material-ui/core/DialogContent'
import Help from './Help'
import Fade from '@material-ui/core/Fade'
import IconButton from '@material-ui/core/IconButton'
import CloseIcon from '@material-ui/icons/Close'
import { useStore } from 'components/StoreContext'
import { makeStyles, useTheme, Typography } from '@material-ui/core'
const useStyles = makeStyles(theme => ({
paper: {
width: '100%'
},
closeButton: {
position: 'absolute',
right: theme.spacing(1),
top: theme.spacing(1),
color: theme.palette.grey[500]
}
}))
export default observer(props => {
const theme = useTheme()
const fullScreen = useMediaQuery(theme.breakpoints.down('sm'))
const classes = useStyles(props)
const { shortcutStore } = useStore()
const { dialogOpen, closeDialog } = shortcutStore
return (
<Dialog
open={dialogOpen}
TransitionComponent={Fade}
onClose={closeDialog}
onBackdropClick={closeDialog}
{...{ maxWidth: 'lg', classes, fullScreen }}
>
<DialogTitle>
<Typography variant='h6'>Keyboard shortcuts</Typography>
<IconButton
aria-label='close'
className={classes.closeButton}
onClick={closeDialog}
>
<CloseIcon />
</IconButton>
</DialogTitle>
<DialogContent>
<Help />
</DialogContent>
</Dialog>
)
})
| import React from 'react'
+ import useMediaQuery from '@material-ui/core/useMediaQuery'
import { observer } from 'mobx-react'
import Dialog from '@material-ui/core/Dialog'
import DialogTitle from '@material-ui/core/DialogTitle'
import DialogContent from '@material-ui/core/DialogContent'
import Help from './Help'
import Fade from '@material-ui/core/Fade'
+ import IconButton from '@material-ui/core/IconButton'
+ import CloseIcon from '@material-ui/icons/Close'
import { useStore } from 'components/StoreContext'
- import { makeStyles } from '@material-ui/core'
+ import { makeStyles, useTheme, Typography } from '@material-ui/core'
? ++++++++++++++++++++++
- const useStyles = makeStyles({
+ const useStyles = makeStyles(theme => ({
? ++++++++++
paper: {
width: '100%'
+ },
+ closeButton: {
+ position: 'absolute',
+ right: theme.spacing(1),
+ top: theme.spacing(1),
+ color: theme.palette.grey[500]
}
- })
+ }))
? +
export default observer(props => {
+ const theme = useTheme()
+ const fullScreen = useMediaQuery(theme.breakpoints.down('sm'))
const classes = useStyles(props)
const { shortcutStore } = useStore()
const { dialogOpen, closeDialog } = shortcutStore
return (
<Dialog
open={dialogOpen}
- classes={classes}
TransitionComponent={Fade}
onClose={closeDialog}
onBackdropClick={closeDialog}
+ {...{ maxWidth: 'lg', classes, fullScreen }}
>
- <DialogTitle>Keyboard shortcuts</DialogTitle>
+ <DialogTitle>
+ <Typography variant='h6'>Keyboard shortcuts</Typography>
+ <IconButton
+ aria-label='close'
+ className={classes.closeButton}
+ onClick={closeDialog}
+ >
+ <CloseIcon />
+ </IconButton>
+ </DialogTitle>
<DialogContent>
<Help />
</DialogContent>
</Dialog>
)
}) | 30 | 0.857143 | 25 | 5 |
35a5e8717df9a5bcb60593700aa7e2f291816b0f | test/test_extensions/test_analytics.py | test/test_extensions/test_analytics.py |
import time
from web.core.context import Context
from web.ext.analytics import AnalyticsExtension
def test_analytics_extension():
ctx = Context(response=Context(headers=dict()))
ext = AnalyticsExtension()
assert not hasattr(ctx, '_start_time')
ext.prepare(ctx)
assert hasattr(ctx, '_start_time')
ext.before(ctx)
time.sleep(0.1)
ext.after(ctx)
assert 0.1 <= float(ctx.response.headers['X-Generation-Time']) <= 0.2
|
import time
import pytest
from webob import Request
from web.core import Application
from web.core.context import Context
from web.ext.analytics import AnalyticsExtension
def endpoint(context):
time.sleep(0.1)
return "Hi."
sample = Application(endpoint, extensions=[AnalyticsExtension()])
def test_analytics_extension():
ctx = Context(response=Context(headers=dict()))
ext = AnalyticsExtension()
assert not hasattr(ctx, '_start_time')
ext.prepare(ctx)
assert hasattr(ctx, '_start_time')
ext.before(ctx)
time.sleep(0.1)
ext.after(ctx)
assert 0.1 <= float(ctx.response.headers['X-Generation-Time']) <= 0.2
def test_analytics_extension_in_context():
try:
__import__('web.dispatch.object')
except ImportError:
pytest.skip("web.dispatch.object not installed")
resp = Request.blank('/').get_response(sample)
assert 0.1 <= float(resp.headers['X-Generation-Time']) <= 0.2
| Add test for full processing pipeline. | Add test for full processing pipeline.
| Python | mit | marrow/WebCore,marrow/WebCore | python | ## Code Before:
import time
from web.core.context import Context
from web.ext.analytics import AnalyticsExtension
def test_analytics_extension():
ctx = Context(response=Context(headers=dict()))
ext = AnalyticsExtension()
assert not hasattr(ctx, '_start_time')
ext.prepare(ctx)
assert hasattr(ctx, '_start_time')
ext.before(ctx)
time.sleep(0.1)
ext.after(ctx)
assert 0.1 <= float(ctx.response.headers['X-Generation-Time']) <= 0.2
## Instruction:
Add test for full processing pipeline.
## Code After:
import time
import pytest
from webob import Request
from web.core import Application
from web.core.context import Context
from web.ext.analytics import AnalyticsExtension
def endpoint(context):
time.sleep(0.1)
return "Hi."
sample = Application(endpoint, extensions=[AnalyticsExtension()])
def test_analytics_extension():
ctx = Context(response=Context(headers=dict()))
ext = AnalyticsExtension()
assert not hasattr(ctx, '_start_time')
ext.prepare(ctx)
assert hasattr(ctx, '_start_time')
ext.before(ctx)
time.sleep(0.1)
ext.after(ctx)
assert 0.1 <= float(ctx.response.headers['X-Generation-Time']) <= 0.2
def test_analytics_extension_in_context():
try:
__import__('web.dispatch.object')
except ImportError:
pytest.skip("web.dispatch.object not installed")
resp = Request.blank('/').get_response(sample)
assert 0.1 <= float(resp.headers['X-Generation-Time']) <= 0.2
|
import time
+ import pytest
+ from webob import Request
+ from web.core import Application
from web.core.context import Context
from web.ext.analytics import AnalyticsExtension
+
+
+ def endpoint(context):
+ time.sleep(0.1)
+ return "Hi."
+
+
+ sample = Application(endpoint, extensions=[AnalyticsExtension()])
def test_analytics_extension():
ctx = Context(response=Context(headers=dict()))
ext = AnalyticsExtension()
assert not hasattr(ctx, '_start_time')
ext.prepare(ctx)
assert hasattr(ctx, '_start_time')
ext.before(ctx)
time.sleep(0.1)
ext.after(ctx)
assert 0.1 <= float(ctx.response.headers['X-Generation-Time']) <= 0.2
+
+ def test_analytics_extension_in_context():
+ try:
+ __import__('web.dispatch.object')
+ except ImportError:
+ pytest.skip("web.dispatch.object not installed")
+
+ resp = Request.blank('/').get_response(sample)
+ assert 0.1 <= float(resp.headers['X-Generation-Time']) <= 0.2
+ | 21 | 1 | 21 | 0 |
6699ecff752fa7828bd072b948808ec39f9e7b59 | bower.json | bower.json | {
"name": "ng-c3-export",
"version": "0.1.2",
"authors": [
{
"name": "Anna Tomka",
"email": "tomkaanna@gmail.com"
}
],
"keywords": [
"c3",
"c3.js",
"angularjs",
"graph",
"export",
"image"
],
"main": [
"dist/ng-c3-export.js"
],
"ignore": [
"src",
"test",
"gulpfile.js",
"karma-*.conf.js",
"**/.*"
],
"dependencies": {
"jquery": "~2.2.2",
"font-awesome": "~4.5.0",
"canvas2image": "*"
},
"devDependencies": {
"angular-mocks": ">=1.2.0",
"angular-scenario": ">=1.2.0",
"angular": "~1.4",
"c3": "~0.4.10",
"canvg": "~1.3.0"
},
"resolutions": {
"angular": "1.5.2"
}
}
| {
"name": "ng-c3-export",
"version": "0.1.2",
"authors": [
{
"name": "Anna Tomka",
"email": "tomkaanna@gmail.com"
}
],
"keywords": [
"c3",
"c3.js",
"angularjs",
"graph",
"export",
"image"
],
"main": [
"dist/ng-c3-export.js",
"dist/ng-c3-export.css"
],
"ignore": [
"src",
"test",
"gulpfile.js",
"karma-*.conf.js",
"**/.*"
],
"dependencies": {
"jquery": "~2.2.2",
"font-awesome": "~4.5.0",
"canvas2image": "*"
},
"devDependencies": {
"angular-mocks": ">=1.2.0",
"angular-scenario": ">=1.2.0",
"angular": "~1.4",
"c3": "~0.4.10",
"canvg": "~1.3.0"
},
"resolutions": {
"angular": "1.5.2"
}
}
| Add css file to main | Add css file to main
| JSON | mit | annatomka/ng-c3-export | json | ## Code Before:
{
"name": "ng-c3-export",
"version": "0.1.2",
"authors": [
{
"name": "Anna Tomka",
"email": "tomkaanna@gmail.com"
}
],
"keywords": [
"c3",
"c3.js",
"angularjs",
"graph",
"export",
"image"
],
"main": [
"dist/ng-c3-export.js"
],
"ignore": [
"src",
"test",
"gulpfile.js",
"karma-*.conf.js",
"**/.*"
],
"dependencies": {
"jquery": "~2.2.2",
"font-awesome": "~4.5.0",
"canvas2image": "*"
},
"devDependencies": {
"angular-mocks": ">=1.2.0",
"angular-scenario": ">=1.2.0",
"angular": "~1.4",
"c3": "~0.4.10",
"canvg": "~1.3.0"
},
"resolutions": {
"angular": "1.5.2"
}
}
## Instruction:
Add css file to main
## Code After:
{
"name": "ng-c3-export",
"version": "0.1.2",
"authors": [
{
"name": "Anna Tomka",
"email": "tomkaanna@gmail.com"
}
],
"keywords": [
"c3",
"c3.js",
"angularjs",
"graph",
"export",
"image"
],
"main": [
"dist/ng-c3-export.js",
"dist/ng-c3-export.css"
],
"ignore": [
"src",
"test",
"gulpfile.js",
"karma-*.conf.js",
"**/.*"
],
"dependencies": {
"jquery": "~2.2.2",
"font-awesome": "~4.5.0",
"canvas2image": "*"
},
"devDependencies": {
"angular-mocks": ">=1.2.0",
"angular-scenario": ">=1.2.0",
"angular": "~1.4",
"c3": "~0.4.10",
"canvg": "~1.3.0"
},
"resolutions": {
"angular": "1.5.2"
}
}
| {
"name": "ng-c3-export",
"version": "0.1.2",
"authors": [
{
"name": "Anna Tomka",
"email": "tomkaanna@gmail.com"
}
],
"keywords": [
"c3",
"c3.js",
"angularjs",
"graph",
"export",
"image"
],
"main": [
- "dist/ng-c3-export.js"
+ "dist/ng-c3-export.js",
? +
+ "dist/ng-c3-export.css"
],
"ignore": [
"src",
"test",
"gulpfile.js",
"karma-*.conf.js",
"**/.*"
],
"dependencies": {
"jquery": "~2.2.2",
"font-awesome": "~4.5.0",
"canvas2image": "*"
},
"devDependencies": {
"angular-mocks": ">=1.2.0",
"angular-scenario": ">=1.2.0",
"angular": "~1.4",
"c3": "~0.4.10",
"canvg": "~1.3.0"
},
"resolutions": {
"angular": "1.5.2"
}
} | 3 | 0.069767 | 2 | 1 |
2f5bf3a36944e01b1e51138c7f98e52a1a992d60 | modules/password/index.styl | modules/password/index.styl | // Tâmia © 2013 Artem Sapegin http://sapegin.me
// Password field with toggle to show characters
// Dependencies: form
// Bones
.password
position: relative
display: block
width: 100%
&__field
position:relative;
width: inherit
z-index: 90
&__toggle
display: none
&.is-ok &__toggle
position: absolute
display: block
top: 0
bottom: 0
right: 0
cursor: pointer
z-index: 100
&:before
content: ""
position: absolute
top: 50%
left: 50%
transform: translate(-50%,-50%)
&.is-disabled &__toggle
opacity: .4
// Default skin
modules_default_skin ?= true
password_default_skin ?= false
if modules_default_skin or password_default_skin
.password
&.is-ok &__toggle
width: 20px
&:before
content: "a"
&.is-ok.is-unlocked &__toggle:before
content: "●"
| // Tâmia © 2013 Artem Sapegin http://sapegin.me
// Password field with toggle to show characters
// Dependencies: form
// Bones
.password
position: relative
display: block
width: 100%
&__field
position:relative;
width: inherit
z-index: 90
&__toggle
display: none
&.is-ok &__toggle
position: absolute
display: block
top: 0
bottom: 0
right: 0
cursor: pointer
z-index: 100
&:before
content: ""
position: absolute
top: 50%
left: 50%
transform: translate(-50%,-50%)
&.is-disabled &__toggle
opacity: .4
// Hide IE10 password visibility toggle
&::-ms-reveal
display: none !important
// Default skin
modules_default_skin ?= true
password_default_skin ?= false
if modules_default_skin or password_default_skin
.password
&.is-ok &__toggle
width: 20px
&:before
content: "a"
&.is-ok.is-unlocked &__toggle:before
content: "●"
| Hide IE10 password visibility toggle. | Password: Hide IE10 password visibility toggle.
| Stylus | mit | tamiadev/tamia,tamiadev/tamia | stylus | ## Code Before:
// Tâmia © 2013 Artem Sapegin http://sapegin.me
// Password field with toggle to show characters
// Dependencies: form
// Bones
.password
position: relative
display: block
width: 100%
&__field
position:relative;
width: inherit
z-index: 90
&__toggle
display: none
&.is-ok &__toggle
position: absolute
display: block
top: 0
bottom: 0
right: 0
cursor: pointer
z-index: 100
&:before
content: ""
position: absolute
top: 50%
left: 50%
transform: translate(-50%,-50%)
&.is-disabled &__toggle
opacity: .4
// Default skin
modules_default_skin ?= true
password_default_skin ?= false
if modules_default_skin or password_default_skin
.password
&.is-ok &__toggle
width: 20px
&:before
content: "a"
&.is-ok.is-unlocked &__toggle:before
content: "●"
## Instruction:
Password: Hide IE10 password visibility toggle.
## Code After:
// Tâmia © 2013 Artem Sapegin http://sapegin.me
// Password field with toggle to show characters
// Dependencies: form
// Bones
.password
position: relative
display: block
width: 100%
&__field
position:relative;
width: inherit
z-index: 90
&__toggle
display: none
&.is-ok &__toggle
position: absolute
display: block
top: 0
bottom: 0
right: 0
cursor: pointer
z-index: 100
&:before
content: ""
position: absolute
top: 50%
left: 50%
transform: translate(-50%,-50%)
&.is-disabled &__toggle
opacity: .4
// Hide IE10 password visibility toggle
&::-ms-reveal
display: none !important
// Default skin
modules_default_skin ?= true
password_default_skin ?= false
if modules_default_skin or password_default_skin
.password
&.is-ok &__toggle
width: 20px
&:before
content: "a"
&.is-ok.is-unlocked &__toggle:before
content: "●"
| // Tâmia © 2013 Artem Sapegin http://sapegin.me
// Password field with toggle to show characters
// Dependencies: form
// Bones
.password
position: relative
display: block
width: 100%
&__field
position:relative;
width: inherit
z-index: 90
&__toggle
display: none
&.is-ok &__toggle
position: absolute
display: block
top: 0
bottom: 0
right: 0
cursor: pointer
z-index: 100
&:before
content: ""
position: absolute
top: 50%
left: 50%
transform: translate(-50%,-50%)
&.is-disabled &__toggle
opacity: .4
+ // Hide IE10 password visibility toggle
+ &::-ms-reveal
+ display: none !important
+
// Default skin
modules_default_skin ?= true
password_default_skin ?= false
if modules_default_skin or password_default_skin
.password
&.is-ok &__toggle
width: 20px
&:before
content: "a"
&.is-ok.is-unlocked &__toggle:before
content: "●" | 4 | 0.08 | 4 | 0 |
bffe6dcd071f217172f982a5aaeff1822b18de89 | locales/lg/email.properties | locales/lg/email.properties | your_gift_help_us=Ekilabo kyo kituyamba okuzimba akatimbe ensi keyetaga.
# Subject line for recurring donations
| your_gift_help_us=Ekilabo kyo kituyamba okuzimba akatimbe ensi keyetaga.
# Subject line for recurring donations
stripe_charge_succeeded_2014_recurring_subject=Webale kuwagila nga Mozilla n'obuyambi.
| Update Luganda (lg) localization of Fundraising | Pontoon: Update Luganda (lg) localization of Fundraising
Localization authors:
- Lawk <lawrence@mozilla-uganda.org>
| INI | mpl-2.0 | mozilla/donate.mozilla.org | ini | ## Code Before:
your_gift_help_us=Ekilabo kyo kituyamba okuzimba akatimbe ensi keyetaga.
# Subject line for recurring donations
## Instruction:
Pontoon: Update Luganda (lg) localization of Fundraising
Localization authors:
- Lawk <lawrence@mozilla-uganda.org>
## Code After:
your_gift_help_us=Ekilabo kyo kituyamba okuzimba akatimbe ensi keyetaga.
# Subject line for recurring donations
stripe_charge_succeeded_2014_recurring_subject=Webale kuwagila nga Mozilla n'obuyambi.
| your_gift_help_us=Ekilabo kyo kituyamba okuzimba akatimbe ensi keyetaga.
# Subject line for recurring donations
+ stripe_charge_succeeded_2014_recurring_subject=Webale kuwagila nga Mozilla n'obuyambi.
| 1 | 0.333333 | 1 | 0 |
18a367ef6d050d7936b9da4d00dd9da017ece151 | .travis.yml | .travis.yml | language: erlang
otp_release:
- 17.1
- 18.3
- 19.2
- 20.2
install:
- sudo apt-get -qq install librsync-dev
script:
- ./configure
- make
- make doc
- make xref
- make test
notifications:
email: false
| language: erlang
otp_release:
- 17.1
- 21.3
install:
- sudo apt-get -qq install librsync-dev
script:
- ./configure
- make
- make doc
- make xref
- make test
notifications:
email: false
| Update Erlang/OTP Travis CI platforms | Update Erlang/OTP Travis CI platforms
| YAML | apache-2.0 | zinid/erlang-rsync | yaml | ## Code Before:
language: erlang
otp_release:
- 17.1
- 18.3
- 19.2
- 20.2
install:
- sudo apt-get -qq install librsync-dev
script:
- ./configure
- make
- make doc
- make xref
- make test
notifications:
email: false
## Instruction:
Update Erlang/OTP Travis CI platforms
## Code After:
language: erlang
otp_release:
- 17.1
- 21.3
install:
- sudo apt-get -qq install librsync-dev
script:
- ./configure
- make
- make doc
- make xref
- make test
notifications:
email: false
| language: erlang
otp_release:
- 17.1
- - 18.3
? -
+ - 21.3
? +
- - 19.2
- - 20.2
install:
- sudo apt-get -qq install librsync-dev
script:
- ./configure
- make
- make doc
- make xref
- make test
notifications:
email: false | 4 | 0.2 | 1 | 3 |
624928003ab7206d02b66119ffb66b2ddc7edcb1 | README.md | README.md |
The plan is simple. An open source, MIT Licensed web application which serves as a home for some of my technical knowledge hosts my writing and public content, for which I retain proprietary ownership.
## Usage
You'll need docker. The application aims to be runable in docker by doing nothing more than `git clone https://github.com/allison-knauss/arkweb` followed by `docker-compose up`. Production deployments may require an extra step or two.
## Technology
- Python
- Flask
- PostgreSQL
- An as-yet-undetermined database migration library
- AngularJS or React
- HTML5
## Expectations
- All code will follow PEP-8 except the places I don't like it. If a different approach is distinctly cleaner, it's fine, except 4 space indentation is required at all times.
- 100% code unit test coverage. No excuses.
- All environments, including production, will eventually run Chaos Monkey.
- Code should be self-documenting. Use comments to clarify any pieces which aren't.
## Repository layout
- api/ contains all code for the api service
- web/ contains all code for the web service
- test/ contains all unit test code
|
The plan is simple. An open source, MIT Licensed web application which serves as a home for some of my technical knowledge hosts my writing and public content, for which I retain proprietary ownership.
## Usage
You'll need docker. The application aims to be runable in docker by doing nothing more than `git clone https://github.com/allison-knauss/arkweb` followed by `docker-compose up`. Production deployments may require an extra step or two.
## Technology
- Python
- Flask
- PostgreSQL
- An as-yet-undetermined database migration library
- AngularJS or React
- HTML5
## Expectations
- All code will follow PEP-8 except the places I don't like it. If a different approach is distinctly cleaner, it's fine, except 4 space indentation is required at all times.
- 100% code unit test coverage. No excuses.
- All environments, including production, will eventually run Chaos Monkey.
- Code should be self-documenting. Use comments to clarify any pieces which aren't.
## Repository layout
- api/ contains all code for the api service
- web/ contains all code for the web service
- test/ contains all unit test code
## Services
- arkweb, the web service, serves as a custom CMS-ish service, it serves static and dynamic web content. As a web-tier service, it communicates solely with arkapi and anything else that may be put in the service tier.
- arkapi, the api service, presents a REST API and contains application business logic. It is in the service-tier.
- db, the database service, is in the data-tier.
| Add architecture documentation to root readme | Add architecture documentation to root readme
| Markdown | mit | allison-knauss/arkweb,allison-knauss/arkweb,allison-knauss/arkweb | markdown | ## Code Before:
The plan is simple. An open source, MIT Licensed web application which serves as a home for some of my technical knowledge hosts my writing and public content, for which I retain proprietary ownership.
## Usage
You'll need docker. The application aims to be runable in docker by doing nothing more than `git clone https://github.com/allison-knauss/arkweb` followed by `docker-compose up`. Production deployments may require an extra step or two.
## Technology
- Python
- Flask
- PostgreSQL
- An as-yet-undetermined database migration library
- AngularJS or React
- HTML5
## Expectations
- All code will follow PEP-8 except the places I don't like it. If a different approach is distinctly cleaner, it's fine, except 4 space indentation is required at all times.
- 100% code unit test coverage. No excuses.
- All environments, including production, will eventually run Chaos Monkey.
- Code should be self-documenting. Use comments to clarify any pieces which aren't.
## Repository layout
- api/ contains all code for the api service
- web/ contains all code for the web service
- test/ contains all unit test code
## Instruction:
Add architecture documentation to root readme
## Code After:
The plan is simple. An open source, MIT Licensed web application which serves as a home for some of my technical knowledge hosts my writing and public content, for which I retain proprietary ownership.
## Usage
You'll need docker. The application aims to be runable in docker by doing nothing more than `git clone https://github.com/allison-knauss/arkweb` followed by `docker-compose up`. Production deployments may require an extra step or two.
## Technology
- Python
- Flask
- PostgreSQL
- An as-yet-undetermined database migration library
- AngularJS or React
- HTML5
## Expectations
- All code will follow PEP-8 except the places I don't like it. If a different approach is distinctly cleaner, it's fine, except 4 space indentation is required at all times.
- 100% code unit test coverage. No excuses.
- All environments, including production, will eventually run Chaos Monkey.
- Code should be self-documenting. Use comments to clarify any pieces which aren't.
## Repository layout
- api/ contains all code for the api service
- web/ contains all code for the web service
- test/ contains all unit test code
## Services
- arkweb, the web service, serves as a custom CMS-ish service, it serves static and dynamic web content. As a web-tier service, it communicates solely with arkapi and anything else that may be put in the service tier.
- arkapi, the api service, presents a REST API and contains application business logic. It is in the service-tier.
- db, the database service, is in the data-tier.
|
The plan is simple. An open source, MIT Licensed web application which serves as a home for some of my technical knowledge hosts my writing and public content, for which I retain proprietary ownership.
## Usage
You'll need docker. The application aims to be runable in docker by doing nothing more than `git clone https://github.com/allison-knauss/arkweb` followed by `docker-compose up`. Production deployments may require an extra step or two.
## Technology
- Python
- Flask
- PostgreSQL
- An as-yet-undetermined database migration library
- AngularJS or React
- HTML5
## Expectations
- All code will follow PEP-8 except the places I don't like it. If a different approach is distinctly cleaner, it's fine, except 4 space indentation is required at all times.
- 100% code unit test coverage. No excuses.
- All environments, including production, will eventually run Chaos Monkey.
- Code should be self-documenting. Use comments to clarify any pieces which aren't.
## Repository layout
- api/ contains all code for the api service
- web/ contains all code for the web service
- test/ contains all unit test code
+
+ ## Services
+
+ - arkweb, the web service, serves as a custom CMS-ish service, it serves static and dynamic web content. As a web-tier service, it communicates solely with arkapi and anything else that may be put in the service tier.
+ - arkapi, the api service, presents a REST API and contains application business logic. It is in the service-tier.
+ - db, the database service, is in the data-tier. | 6 | 0.214286 | 6 | 0 |
8574cc8d801fc270a91134a17239d44fd9cf192f | metadata/dev.lonami.klooni.yml | metadata/dev.lonami.klooni.yml | Categories:
- Games
License: GPL-3.0-or-later
WebSite: https://lonamiwebs.github.io/klooni
SourceCode: https://github.com/LonamiWebs/Klooni1010
IssueTracker: https://github.com/LonamiWebs/Klooni1010/issues
Changelog: https://github.com/LonamiWebs/Klooni1010/releases
AutoName: 1010! Klooni
RepoType: git
Repo: https://github.com/LonamiWebs/Klooni1010
Builds:
- versionName: 0.8.4
versionCode: 840
commit: v0.8.4
subdir: android
gradle:
- yes
AutoUpdateMode: Version v%v
UpdateCheckMode: Tags
CurrentVersion: 0.8.4
CurrentVersionCode: 840
| Categories:
- Games
License: GPL-3.0-or-later
WebSite: https://lonamiwebs.github.io/klooni
SourceCode: https://github.com/LonamiWebs/Klooni1010
IssueTracker: https://github.com/LonamiWebs/Klooni1010/issues
Changelog: https://github.com/LonamiWebs/Klooni1010/releases
AutoName: 1010! Klooni
RepoType: git
Repo: https://github.com/LonamiWebs/Klooni1010
Builds:
- versionName: 0.8.4
versionCode: 840
commit: v0.8.4
subdir: android
gradle:
- yes
- versionName: 0.8.5
versionCode: 850
commit: v0.8.5
subdir: android
gradle:
- yes
AutoUpdateMode: Version v%v
UpdateCheckMode: Tags
CurrentVersion: 0.8.5
CurrentVersionCode: 850
| Update 1010! Klooni to 0.8.5 (850) | Update 1010! Klooni to 0.8.5 (850)
| YAML | agpl-3.0 | f-droid/fdroiddata,f-droid/fdroiddata | yaml | ## Code Before:
Categories:
- Games
License: GPL-3.0-or-later
WebSite: https://lonamiwebs.github.io/klooni
SourceCode: https://github.com/LonamiWebs/Klooni1010
IssueTracker: https://github.com/LonamiWebs/Klooni1010/issues
Changelog: https://github.com/LonamiWebs/Klooni1010/releases
AutoName: 1010! Klooni
RepoType: git
Repo: https://github.com/LonamiWebs/Klooni1010
Builds:
- versionName: 0.8.4
versionCode: 840
commit: v0.8.4
subdir: android
gradle:
- yes
AutoUpdateMode: Version v%v
UpdateCheckMode: Tags
CurrentVersion: 0.8.4
CurrentVersionCode: 840
## Instruction:
Update 1010! Klooni to 0.8.5 (850)
## Code After:
Categories:
- Games
License: GPL-3.0-or-later
WebSite: https://lonamiwebs.github.io/klooni
SourceCode: https://github.com/LonamiWebs/Klooni1010
IssueTracker: https://github.com/LonamiWebs/Klooni1010/issues
Changelog: https://github.com/LonamiWebs/Klooni1010/releases
AutoName: 1010! Klooni
RepoType: git
Repo: https://github.com/LonamiWebs/Klooni1010
Builds:
- versionName: 0.8.4
versionCode: 840
commit: v0.8.4
subdir: android
gradle:
- yes
- versionName: 0.8.5
versionCode: 850
commit: v0.8.5
subdir: android
gradle:
- yes
AutoUpdateMode: Version v%v
UpdateCheckMode: Tags
CurrentVersion: 0.8.5
CurrentVersionCode: 850
| Categories:
- Games
License: GPL-3.0-or-later
WebSite: https://lonamiwebs.github.io/klooni
SourceCode: https://github.com/LonamiWebs/Klooni1010
IssueTracker: https://github.com/LonamiWebs/Klooni1010/issues
Changelog: https://github.com/LonamiWebs/Klooni1010/releases
AutoName: 1010! Klooni
RepoType: git
Repo: https://github.com/LonamiWebs/Klooni1010
Builds:
- versionName: 0.8.4
versionCode: 840
commit: v0.8.4
subdir: android
gradle:
- yes
+ - versionName: 0.8.5
+ versionCode: 850
+ commit: v0.8.5
+ subdir: android
+ gradle:
+ - yes
+
AutoUpdateMode: Version v%v
UpdateCheckMode: Tags
- CurrentVersion: 0.8.4
? ^
+ CurrentVersion: 0.8.5
? ^
- CurrentVersionCode: 840
? ^
+ CurrentVersionCode: 850
? ^
| 11 | 0.44 | 9 | 2 |
24820f57df9ac141eac7557041c5dd945e69a159 | app/assets/javascripts/admin/admin.js.coffee | app/assets/javascripts/admin/admin.js.coffee | jQuery ->
$('.locales a:first').tab('show')
$('.accordion-body').on('hidden', ->
$(@).prev().find('i').first().removeClass().addClass('icon-chevron-right')
)
$('.accordion-body').on('shown', ->
$(@).prev().find('i').first().removeClass().addClass('icon-chevron-down'))
$('body').on('.toggle-hidden', 'click', ->
$(@).parents('td').find('div:hidden').show()
false)
$('#request_hidden_user_explanation_reasons').on('click', 'input', ->
$('#request_hidden_user_subject, #request_hidden_user_explanation, #request_hide_button').show()
info_request_id = $('#hide_request_form').attr('data-info-request-id')
reason = $(this).val()
$('#request_hidden_user_explanation_field').val("[loading default text...]")
$.ajax "/hidden_user_explanation?reason=" + reason + "&info_request_id=" + info_request_id,
type: "GET"
dataType: "text"
error: (data, textStatus, jqXHR) ->
$('#request_hidden_user_explanation_field').val("Error: #{textStatus}")
success: (data, textStatus, jqXHR) ->
$('#request_hidden_user_explanation_field').val(data)
)
| jQuery ->
$('.locales a:first').tab('show')
$('.accordion-body').on('hidden', ->
$(@).prev().find('i').first().removeClass().addClass('icon-chevron-right')
)
$('.accordion-body').on('shown', ->
$(@).prev().find('i').first().removeClass().addClass('icon-chevron-down'))
$('.toggle-hidden').on('click', ->
$(@).parents('td').find('div:hidden').show()
false)
$('#request_hidden_user_explanation_reasons').on('click', 'input', ->
$('#request_hidden_user_subject, #request_hidden_user_explanation, #request_hide_button').show()
info_request_id = $('#hide_request_form').attr('data-info-request-id')
reason = $(this).val()
$('#request_hidden_user_explanation_field').val("[loading default text...]")
$.ajax "/hidden_user_explanation?reason=" + reason + "&info_request_id=" + info_request_id,
type: "GET"
dataType: "text"
error: (data, textStatus, jqXHR) ->
$('#request_hidden_user_explanation_field').val("Error: #{textStatus}")
success: (data, textStatus, jqXHR) ->
$('#request_hidden_user_explanation_field').val(data)
)
| Fix syntax error in on() method. | Fix syntax error in on() method.
Looks like this was a mistake in ec2999ef8c233d30c46dd5181e246916b0145606
| CoffeeScript | agpl-3.0 | nzherald/alaveteli,andreicristianpetcu/alaveteli,Br3nda/alaveteli,4bic/alaveteli,andreicristianpetcu/alaveteli_old,Br3nda/alaveteli,4bic/alaveteli,andreicristianpetcu/alaveteli_old,andreicristianpetcu/alaveteli_old,andreicristianpetcu/alaveteli_old,andreicristianpetcu/alaveteli,nzherald/alaveteli,4bic/alaveteli,andreicristianpetcu/alaveteli,nzherald/alaveteli,Br3nda/alaveteli,Br3nda/alaveteli,4bic/alaveteli,andreicristianpetcu/alaveteli,andreicristianpetcu/alaveteli,andreicristianpetcu/alaveteli_old,4bic/alaveteli,nzherald/alaveteli,Br3nda/alaveteli,nzherald/alaveteli | coffeescript | ## Code Before:
jQuery ->
$('.locales a:first').tab('show')
$('.accordion-body').on('hidden', ->
$(@).prev().find('i').first().removeClass().addClass('icon-chevron-right')
)
$('.accordion-body').on('shown', ->
$(@).prev().find('i').first().removeClass().addClass('icon-chevron-down'))
$('body').on('.toggle-hidden', 'click', ->
$(@).parents('td').find('div:hidden').show()
false)
$('#request_hidden_user_explanation_reasons').on('click', 'input', ->
$('#request_hidden_user_subject, #request_hidden_user_explanation, #request_hide_button').show()
info_request_id = $('#hide_request_form').attr('data-info-request-id')
reason = $(this).val()
$('#request_hidden_user_explanation_field').val("[loading default text...]")
$.ajax "/hidden_user_explanation?reason=" + reason + "&info_request_id=" + info_request_id,
type: "GET"
dataType: "text"
error: (data, textStatus, jqXHR) ->
$('#request_hidden_user_explanation_field').val("Error: #{textStatus}")
success: (data, textStatus, jqXHR) ->
$('#request_hidden_user_explanation_field').val(data)
)
## Instruction:
Fix syntax error in on() method.
Looks like this was a mistake in ec2999ef8c233d30c46dd5181e246916b0145606
## Code After:
jQuery ->
$('.locales a:first').tab('show')
$('.accordion-body').on('hidden', ->
$(@).prev().find('i').first().removeClass().addClass('icon-chevron-right')
)
$('.accordion-body').on('shown', ->
$(@).prev().find('i').first().removeClass().addClass('icon-chevron-down'))
$('.toggle-hidden').on('click', ->
$(@).parents('td').find('div:hidden').show()
false)
$('#request_hidden_user_explanation_reasons').on('click', 'input', ->
$('#request_hidden_user_subject, #request_hidden_user_explanation, #request_hide_button').show()
info_request_id = $('#hide_request_form').attr('data-info-request-id')
reason = $(this).val()
$('#request_hidden_user_explanation_field').val("[loading default text...]")
$.ajax "/hidden_user_explanation?reason=" + reason + "&info_request_id=" + info_request_id,
type: "GET"
dataType: "text"
error: (data, textStatus, jqXHR) ->
$('#request_hidden_user_explanation_field').val("Error: #{textStatus}")
success: (data, textStatus, jqXHR) ->
$('#request_hidden_user_explanation_field').val(data)
)
| jQuery ->
$('.locales a:first').tab('show')
$('.accordion-body').on('hidden', ->
$(@).prev().find('i').first().removeClass().addClass('icon-chevron-right')
)
$('.accordion-body').on('shown', ->
$(@).prev().find('i').first().removeClass().addClass('icon-chevron-down'))
- $('body').on('.toggle-hidden', 'click', ->
? ----------- ^^
+ $('.toggle-hidden').on('click', ->
? ^^^^^
$(@).parents('td').find('div:hidden').show()
false)
$('#request_hidden_user_explanation_reasons').on('click', 'input', ->
$('#request_hidden_user_subject, #request_hidden_user_explanation, #request_hide_button').show()
info_request_id = $('#hide_request_form').attr('data-info-request-id')
reason = $(this).val()
$('#request_hidden_user_explanation_field').val("[loading default text...]")
$.ajax "/hidden_user_explanation?reason=" + reason + "&info_request_id=" + info_request_id,
type: "GET"
dataType: "text"
error: (data, textStatus, jqXHR) ->
$('#request_hidden_user_explanation_field').val("Error: #{textStatus}")
success: (data, textStatus, jqXHR) ->
$('#request_hidden_user_explanation_field').val(data)
)
| 2 | 0.083333 | 1 | 1 |
df30f32e05c6d311f01be9b9de0ca27c2ce57ad5 | PopupBridgeExample/src/main/java/com/braintreepayments/popupbridge/example/MainActivity.java | PopupBridgeExample/src/main/java/com/braintreepayments/popupbridge/example/MainActivity.java | package com.braintreepayments.popupbridge.example;
import android.app.Activity;
import android.os.Bundle;
import android.webkit.WebView;
import com.braintreepayments.popupbridge.PopupBridge;
public class MainActivity extends Activity {
private static final String URL = "https://braintree.github.io/popup-bridge-example/";
private WebView mWebView;
private PopupBridge mPopupBridge;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
mWebView = (WebView) findViewById(R.id.web_view);
mWebView.getSettings().setJavaScriptEnabled(true);
mPopupBridge = PopupBridge.newInstance(this, mWebView);
mWebView.loadUrl(URL);
}
}
| package com.braintreepayments.popupbridge.example;
import android.app.Activity;
import android.os.Bundle;
import android.webkit.WebView;
import com.braintreepayments.popupbridge.PopupBridge;
public class MainActivity extends Activity {
private static final String URL = "https://braintree.github.io/popup-bridge-example/";
private WebView mWebView;
private PopupBridge mPopupBridge;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
mWebView = (WebView) findViewById(R.id.web_view);
mPopupBridge = PopupBridge.newInstance(this, mWebView);
mWebView.loadUrl(URL);
}
}
| Remove unneeded code in example app | Remove unneeded code in example app
| Java | mit | braintree/popup-bridge-android,braintree/popup-bridge-android | java | ## Code Before:
package com.braintreepayments.popupbridge.example;
import android.app.Activity;
import android.os.Bundle;
import android.webkit.WebView;
import com.braintreepayments.popupbridge.PopupBridge;
public class MainActivity extends Activity {
private static final String URL = "https://braintree.github.io/popup-bridge-example/";
private WebView mWebView;
private PopupBridge mPopupBridge;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
mWebView = (WebView) findViewById(R.id.web_view);
mWebView.getSettings().setJavaScriptEnabled(true);
mPopupBridge = PopupBridge.newInstance(this, mWebView);
mWebView.loadUrl(URL);
}
}
## Instruction:
Remove unneeded code in example app
## Code After:
package com.braintreepayments.popupbridge.example;
import android.app.Activity;
import android.os.Bundle;
import android.webkit.WebView;
import com.braintreepayments.popupbridge.PopupBridge;
public class MainActivity extends Activity {
private static final String URL = "https://braintree.github.io/popup-bridge-example/";
private WebView mWebView;
private PopupBridge mPopupBridge;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
mWebView = (WebView) findViewById(R.id.web_view);
mPopupBridge = PopupBridge.newInstance(this, mWebView);
mWebView.loadUrl(URL);
}
}
| package com.braintreepayments.popupbridge.example;
import android.app.Activity;
import android.os.Bundle;
import android.webkit.WebView;
import com.braintreepayments.popupbridge.PopupBridge;
public class MainActivity extends Activity {
private static final String URL = "https://braintree.github.io/popup-bridge-example/";
private WebView mWebView;
private PopupBridge mPopupBridge;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
mWebView = (WebView) findViewById(R.id.web_view);
- mWebView.getSettings().setJavaScriptEnabled(true);
mPopupBridge = PopupBridge.newInstance(this, mWebView);
mWebView.loadUrl(URL);
}
} | 1 | 0.037037 | 0 | 1 |
0d4cf0236190bba18edd2217d65e5cdcd92a27bd | packages/accounts-password/package.js | packages/accounts-password/package.js | Package.describe({
summary: "Password support for accounts",
version: "1.2.12"
});
Package.onUse(function(api) {
api.use('npm-bcrypt@=0.8.7');
api.use([
'accounts-base',
'srp',
'sha',
'ejson',
'ddp'
], ['client', 'server']);
// Export Accounts (etc) to packages using this one.
api.imply('accounts-base', ['client', 'server']);
api.use('email', ['server']);
api.use('random', ['server']);
api.use('check');
api.use('underscore');
api.use('ecmascript');
api.addFiles('email_templates.js', 'server');
api.addFiles('password_server.js', 'server');
api.addFiles('password_client.js', 'client');
});
Package.onTest(function(api) {
api.use(['accounts-password', 'tinytest', 'test-helpers', 'tracker',
'accounts-base', 'random', 'email', 'underscore', 'check',
'ddp', 'ecmascript']);
api.addFiles('password_tests_setup.js', 'server');
api.addFiles('password_tests.js', ['client', 'server']);
api.addFiles('email_tests_setup.js', 'server');
api.addFiles('email_tests.js', 'client');
});
| Package.describe({
summary: "Password support for accounts",
version: "1.2.13"
});
Package.onUse(function(api) {
api.use('npm-bcrypt@=0.8.7_1');
api.use([
'accounts-base@1.2.9',
'srp@1.0.9',
'sha@1.0.8',
'ejson@1.0.12',
'ddp@1.2.5'
], ['client', 'server']);
// Export Accounts (etc) to packages using this one.
api.imply('accounts-base@1.2.9', ['client', 'server']);
api.use('email@1.1.16', ['server']);
api.use('random@1.0.10', ['server']);
api.use('check@1.2.3');
api.use('underscore@1.0.9');
api.use('ecmascript@0.5.7');
api.addFiles('email_templates.js', 'server');
api.addFiles('password_server.js', 'server');
api.addFiles('password_client.js', 'client');
});
Package.onTest(function(api) {
api.use(['accounts-password', 'tinytest', 'test-helpers', 'tracker',
'accounts-base', 'random', 'email', 'underscore', 'check',
'ddp', 'ecmascript']);
api.addFiles('password_tests_setup.js', 'server');
api.addFiles('password_tests.js', ['client', 'server']);
api.addFiles('email_tests_setup.js', 'server');
api.addFiles('email_tests.js', 'client');
});
| Add version constraints for all dependencies of accounts-password. | Add version constraints for all dependencies of accounts-password.
This is necessary to allow publishing accounts-password independently of a
Meteor release.
Note that the npm-bcrypt version has been bumped to 0.8.7_1.
| JavaScript | mit | Hansoft/meteor,chasertech/meteor,chasertech/meteor,mjmasn/meteor,mjmasn/meteor,Hansoft/meteor,chasertech/meteor,chasertech/meteor,chasertech/meteor,Hansoft/meteor,mjmasn/meteor,chasertech/meteor,mjmasn/meteor,Hansoft/meteor,Hansoft/meteor,mjmasn/meteor,chasertech/meteor,mjmasn/meteor,Hansoft/meteor,Hansoft/meteor,mjmasn/meteor | javascript | ## Code Before:
Package.describe({
summary: "Password support for accounts",
version: "1.2.12"
});
Package.onUse(function(api) {
api.use('npm-bcrypt@=0.8.7');
api.use([
'accounts-base',
'srp',
'sha',
'ejson',
'ddp'
], ['client', 'server']);
// Export Accounts (etc) to packages using this one.
api.imply('accounts-base', ['client', 'server']);
api.use('email', ['server']);
api.use('random', ['server']);
api.use('check');
api.use('underscore');
api.use('ecmascript');
api.addFiles('email_templates.js', 'server');
api.addFiles('password_server.js', 'server');
api.addFiles('password_client.js', 'client');
});
Package.onTest(function(api) {
api.use(['accounts-password', 'tinytest', 'test-helpers', 'tracker',
'accounts-base', 'random', 'email', 'underscore', 'check',
'ddp', 'ecmascript']);
api.addFiles('password_tests_setup.js', 'server');
api.addFiles('password_tests.js', ['client', 'server']);
api.addFiles('email_tests_setup.js', 'server');
api.addFiles('email_tests.js', 'client');
});
## Instruction:
Add version constraints for all dependencies of accounts-password.
This is necessary to allow publishing accounts-password independently of a
Meteor release.
Note that the npm-bcrypt version has been bumped to 0.8.7_1.
## Code After:
Package.describe({
summary: "Password support for accounts",
version: "1.2.13"
});
Package.onUse(function(api) {
api.use('npm-bcrypt@=0.8.7_1');
api.use([
'accounts-base@1.2.9',
'srp@1.0.9',
'sha@1.0.8',
'ejson@1.0.12',
'ddp@1.2.5'
], ['client', 'server']);
// Export Accounts (etc) to packages using this one.
api.imply('accounts-base@1.2.9', ['client', 'server']);
api.use('email@1.1.16', ['server']);
api.use('random@1.0.10', ['server']);
api.use('check@1.2.3');
api.use('underscore@1.0.9');
api.use('ecmascript@0.5.7');
api.addFiles('email_templates.js', 'server');
api.addFiles('password_server.js', 'server');
api.addFiles('password_client.js', 'client');
});
Package.onTest(function(api) {
api.use(['accounts-password', 'tinytest', 'test-helpers', 'tracker',
'accounts-base', 'random', 'email', 'underscore', 'check',
'ddp', 'ecmascript']);
api.addFiles('password_tests_setup.js', 'server');
api.addFiles('password_tests.js', ['client', 'server']);
api.addFiles('email_tests_setup.js', 'server');
api.addFiles('email_tests.js', 'client');
});
| Package.describe({
summary: "Password support for accounts",
- version: "1.2.12"
? ^
+ version: "1.2.13"
? ^
});
Package.onUse(function(api) {
- api.use('npm-bcrypt@=0.8.7');
+ api.use('npm-bcrypt@=0.8.7_1');
? ++
api.use([
- 'accounts-base',
+ 'accounts-base@1.2.9',
? ++++++
- 'srp',
+ 'srp@1.0.9',
? ++++++
- 'sha',
+ 'sha@1.0.8',
? ++++++
- 'ejson',
+ 'ejson@1.0.12',
? +++++++
- 'ddp'
+ 'ddp@1.2.5'
? ++++++
], ['client', 'server']);
// Export Accounts (etc) to packages using this one.
- api.imply('accounts-base', ['client', 'server']);
+ api.imply('accounts-base@1.2.9', ['client', 'server']);
? ++++++
- api.use('email', ['server']);
+ api.use('email@1.1.16', ['server']);
? +++++++
- api.use('random', ['server']);
+ api.use('random@1.0.10', ['server']);
? +++++++
- api.use('check');
+ api.use('check@1.2.3');
? ++++++
- api.use('underscore');
+ api.use('underscore@1.0.9');
? ++++++
- api.use('ecmascript');
+ api.use('ecmascript@0.5.7');
? ++++++
api.addFiles('email_templates.js', 'server');
api.addFiles('password_server.js', 'server');
api.addFiles('password_client.js', 'client');
});
Package.onTest(function(api) {
api.use(['accounts-password', 'tinytest', 'test-helpers', 'tracker',
'accounts-base', 'random', 'email', 'underscore', 'check',
'ddp', 'ecmascript']);
api.addFiles('password_tests_setup.js', 'server');
api.addFiles('password_tests.js', ['client', 'server']);
api.addFiles('email_tests_setup.js', 'server');
api.addFiles('email_tests.js', 'client');
}); | 26 | 0.666667 | 13 | 13 |
99ecffdb424d25789b628a028c56cbb5224068cd | etc/ordered_pip.sh | etc/ordered_pip.sh |
a=0
while read line
do
if [[ -n "$line" && "$line" != \#* ]] ; then
pip install --use-mirrors $line
fi
((a = a + 1))
done < $1
echo "$0: Final package count is $a";
|
a=0
while read line
do
if [[ -n "$line" && "$line" != \#* ]] ; then
pip install $line
fi
((a = a + 1))
done < $1
echo "$0: Final package count is $a";
| Remove deprecated pip --use-mirrors flag. | BLD: Remove deprecated pip --use-mirrors flag.
With release 1.5 pip deprecated the --use-mirrors flag,
since that release the flag is a noop and raises a deprecation warning.
| Shell | apache-2.0 | umuzungu/zipline,erikness/AlephOne,CDSFinance/zipline,DVegaCapital/zipline,morrisonwudi/zipline,otmaneJai/Zipline,bartosh/zipline,aajtodd/zipline,jimgoo/zipline-fork,magne-max/zipline-ja,cmorgan/zipline,dmitriz/zipline,nborggren/zipline,ChinaQuants/zipline,sketchytechky/zipline,quantopian/zipline,dkushner/zipline,iamkingmaker/zipline,wilsonkichoi/zipline,YuepengGuo/zipline,euri10/zipline,joequant/zipline,bartosh/zipline,stkubr/zipline,Scapogo/zipline,chrjxj/zipline,nborggren/zipline,AlirezaShahabi/zipline,Scapogo/zipline,ronalcc/zipline,jimgoo/zipline-fork,joequant/zipline,stkubr/zipline,iamkingmaker/zipline,humdings/zipline,dkushner/zipline,michaeljohnbennett/zipline,sketchytechky/zipline,quantopian/zipline,euri10/zipline,ronalcc/zipline,enigmampc/catalyst,MonoCloud/zipline,zhoulingjun/zipline,YuepengGuo/zipline,kmather73/zipline,michaeljohnbennett/zipline,grundgruen/zipline,wubr2000/zipline,gwulfs/zipline,semio/zipline,dmitriz/zipline,morrisonwudi/zipline,wilsonkichoi/zipline,wubr2000/zipline,alphaBenj/zipline,alphaBenj/zipline,mattcaldwell/zipline,MonoCloud/zipline,CDSFinance/zipline,semio/zipline,enigmampc/catalyst,chrjxj/zipline,kmather73/zipline,jordancheah/zipline,grundgruen/zipline,aajtodd/zipline,mattcaldwell/zipline,AlirezaShahabi/zipline,otmaneJai/Zipline,umuzungu/zipline,erikness/AlephOne,keir-rex/zipline,cmorgan/zipline,jordancheah/zipline,StratsOn/zipline,DVegaCapital/zipline,florentchandelier/zipline,gwulfs/zipline,dhruvparamhans/zipline,dhruvparamhans/zipline,magne-max/zipline-ja,StratsOn/zipline,ChinaQuants/zipline,keir-rex/zipline,zhoulingjun/zipline,humdings/zipline,florentchandelier/zipline | shell | ## Code Before:
a=0
while read line
do
if [[ -n "$line" && "$line" != \#* ]] ; then
pip install --use-mirrors $line
fi
((a = a + 1))
done < $1
echo "$0: Final package count is $a";
## Instruction:
BLD: Remove deprecated pip --use-mirrors flag.
With release 1.5 pip deprecated the --use-mirrors flag,
since that release the flag is a noop and raises a deprecation warning.
## Code After:
a=0
while read line
do
if [[ -n "$line" && "$line" != \#* ]] ; then
pip install $line
fi
((a = a + 1))
done < $1
echo "$0: Final package count is $a";
|
a=0
while read line
do
if [[ -n "$line" && "$line" != \#* ]] ; then
- pip install --use-mirrors $line
? --------------
+ pip install $line
fi
((a = a + 1))
done < $1
echo "$0: Final package count is $a"; | 2 | 0.2 | 1 | 1 |
c3437ef69b462462bb12a72e3e6f068b217d7f7c | core/db/migrate/20140410074113_move_notification_settings_to_user.rb | core/db/migrate/20140410074113_move_notification_settings_to_user.rb | class MoveNotificationSettingsToUser < Mongoid::Migration
def self.up
User.all.each do |user|
if user['user_notification'].nil?
Backend::Notifications.reset_edit_token(user: user)
else
user['notification_settings_edit_token'] ||=
user['user_notification']['notification_settings_edit_token']
end
user.save!
end
end
def self.down
end
end
| class MoveNotificationSettingsToUser < Mongoid::Migration
def self.up
User.all.each do |user|
if user['user_notification'].nil?
Backend::Notifications.reset_edit_token(user: user)
else
user['notification_settings_edit_token'] ||=
user['user_notification']['notification_settings_edit_token']
end
ok=false
begin
user.save!
ok=true
ensure
if !ok
puts user.to_json
end
end
end
end
def self.down
end
end
| Print details of failed users | Print details of failed users
| Ruby | mit | daukantas/factlink-core,daukantas/factlink-core,Factlink/factlink-core,daukantas/factlink-core,Factlink/factlink-core,Factlink/factlink-core,daukantas/factlink-core,Factlink/factlink-core | ruby | ## Code Before:
class MoveNotificationSettingsToUser < Mongoid::Migration
def self.up
User.all.each do |user|
if user['user_notification'].nil?
Backend::Notifications.reset_edit_token(user: user)
else
user['notification_settings_edit_token'] ||=
user['user_notification']['notification_settings_edit_token']
end
user.save!
end
end
def self.down
end
end
## Instruction:
Print details of failed users
## Code After:
class MoveNotificationSettingsToUser < Mongoid::Migration
def self.up
User.all.each do |user|
if user['user_notification'].nil?
Backend::Notifications.reset_edit_token(user: user)
else
user['notification_settings_edit_token'] ||=
user['user_notification']['notification_settings_edit_token']
end
ok=false
begin
user.save!
ok=true
ensure
if !ok
puts user.to_json
end
end
end
end
def self.down
end
end
| class MoveNotificationSettingsToUser < Mongoid::Migration
def self.up
User.all.each do |user|
if user['user_notification'].nil?
Backend::Notifications.reset_edit_token(user: user)
else
user['notification_settings_edit_token'] ||=
user['user_notification']['notification_settings_edit_token']
end
+ ok=false
+ begin
- user.save!
+ user.save!
? ++
+ ok=true
+ ensure
+ if !ok
+ puts user.to_json
+ end
+ end
end
end
def self.down
end
end | 10 | 0.625 | 9 | 1 |
652f85cba3447c2ef4c1a70dfd7b3f7e5ae63b51 | spec/system/campaigns_spec.rb | spec/system/campaigns_spec.rb | require "rails_helper"
describe "Email campaigns", :admin do
let!(:campaign1) { create(:campaign) }
let!(:campaign2) { create(:campaign) }
scenario "Track email templates" do
3.times { visit root_path(track_id: campaign1.track_id) }
5.times { visit root_path(track_id: campaign2.track_id) }
visit admin_stats_path
click_link campaign1.name
expect(page).to have_content "#{campaign1.name} (3)"
click_link "Go back"
click_link campaign2.name
expect(page).to have_content "#{campaign2.name} (5)"
end
scenario "Do not track erroneous track_ids" do
visit root_path(track_id: campaign1.track_id)
visit root_path(track_id: Campaign.last.id + 1)
visit admin_stats_path
click_link campaign1.name
expect(page).to have_content "#{campaign1.name} (1)"
click_link "Go back"
expect(page).not_to have_content campaign2.name.to_s
end
end
| require "rails_helper"
describe "Email campaigns", :admin do
let!(:campaign1) { create(:campaign) }
let!(:campaign2) { create(:campaign) }
scenario "Track email templates" do
3.times { visit root_path(track_id: campaign1.track_id) }
5.times { visit root_path(track_id: campaign2.track_id) }
visit admin_stats_path
click_link campaign1.name
expect(page).to have_content "#{campaign1.name} (3)"
click_link "Go back"
click_link campaign2.name
expect(page).to have_content "#{campaign2.name} (5)"
end
scenario "Do not track erroneous track_ids" do
visit root_path(track_id: campaign1.track_id)
visit root_path(track_id: Campaign.last.id + 1)
visit admin_stats_path
expect(page).to have_content campaign1.name
expect(page).not_to have_content campaign2.name
click_link campaign1.name
expect(page).to have_content "#{campaign1.name} (1)"
end
end
| Update spec expectations to avoid flake specs | Update spec expectations to avoid flake specs
The last expectation we were using in this test is satisfied before
going back to the admin stats page, as the campaing2 name is not
present before clicking the `Go back` link. Because of this, the
test could end while the request thrown by the `Go back` link is
not completed yet, which can collide with the following test and
cause a flake spec.
| Ruby | agpl-3.0 | consul/consul,consul/consul,consul/consul,consul/consul,consul/consul | ruby | ## Code Before:
require "rails_helper"
describe "Email campaigns", :admin do
let!(:campaign1) { create(:campaign) }
let!(:campaign2) { create(:campaign) }
scenario "Track email templates" do
3.times { visit root_path(track_id: campaign1.track_id) }
5.times { visit root_path(track_id: campaign2.track_id) }
visit admin_stats_path
click_link campaign1.name
expect(page).to have_content "#{campaign1.name} (3)"
click_link "Go back"
click_link campaign2.name
expect(page).to have_content "#{campaign2.name} (5)"
end
scenario "Do not track erroneous track_ids" do
visit root_path(track_id: campaign1.track_id)
visit root_path(track_id: Campaign.last.id + 1)
visit admin_stats_path
click_link campaign1.name
expect(page).to have_content "#{campaign1.name} (1)"
click_link "Go back"
expect(page).not_to have_content campaign2.name.to_s
end
end
## Instruction:
Update spec expectations to avoid flake specs
The last expectation we were using in this test is satisfied before
going back to the admin stats page, as the campaing2 name is not
present before clicking the `Go back` link. Because of this, the
test could end while the request thrown by the `Go back` link is
not completed yet, which can collide with the following test and
cause a flake spec.
## Code After:
require "rails_helper"
describe "Email campaigns", :admin do
let!(:campaign1) { create(:campaign) }
let!(:campaign2) { create(:campaign) }
scenario "Track email templates" do
3.times { visit root_path(track_id: campaign1.track_id) }
5.times { visit root_path(track_id: campaign2.track_id) }
visit admin_stats_path
click_link campaign1.name
expect(page).to have_content "#{campaign1.name} (3)"
click_link "Go back"
click_link campaign2.name
expect(page).to have_content "#{campaign2.name} (5)"
end
scenario "Do not track erroneous track_ids" do
visit root_path(track_id: campaign1.track_id)
visit root_path(track_id: Campaign.last.id + 1)
visit admin_stats_path
expect(page).to have_content campaign1.name
expect(page).not_to have_content campaign2.name
click_link campaign1.name
expect(page).to have_content "#{campaign1.name} (1)"
end
end
| require "rails_helper"
describe "Email campaigns", :admin do
let!(:campaign1) { create(:campaign) }
let!(:campaign2) { create(:campaign) }
scenario "Track email templates" do
3.times { visit root_path(track_id: campaign1.track_id) }
5.times { visit root_path(track_id: campaign2.track_id) }
visit admin_stats_path
click_link campaign1.name
expect(page).to have_content "#{campaign1.name} (3)"
click_link "Go back"
click_link campaign2.name
expect(page).to have_content "#{campaign2.name} (5)"
end
scenario "Do not track erroneous track_ids" do
visit root_path(track_id: campaign1.track_id)
visit root_path(track_id: Campaign.last.id + 1)
visit admin_stats_path
+
+ expect(page).to have_content campaign1.name
+ expect(page).not_to have_content campaign2.name
+
click_link campaign1.name
expect(page).to have_content "#{campaign1.name} (1)"
-
- click_link "Go back"
-
- expect(page).not_to have_content campaign2.name.to_s
end
end | 8 | 0.228571 | 4 | 4 |
48626bc574d4619654afd9659833d3e1b5e9ac42 | app/assets/javascripts/statusChart/statusChartService.js | app/assets/javascripts/statusChart/statusChartService.js | angular.module('ocWebGui.statusChart.service', ['ngResource'])
.factory('AgentStatusStats', function ($http) {
return {
stats: function (startDate, endDate, reportType) {
return $http.post('agent_statuses/stats', {
report_type: reportType,
team_name: 'Helpdesk',
start_date: startDate,
end_date: endDate
});
}
};
})
.factory('StatusChart', function () {
return {
options: function () {
return {
chart: {
type: 'multiChart',
bars1: {
stacked: true
},
height: 600,
margin: {
left: 150
},
x: function (d) { return d.hour; },
y: function (d) { return d.value; },
yAxis1: {
tickFormat: function (seconds) {
var hours = Math.floor(seconds / 3600);
var mins = Math.floor(seconds % 3600 / 60);
var secs = seconds % 3600 % 60;
return hours + ':' + mins + ':' + secs;
}
}
}
};
}
};
});
| angular.module('ocWebGui.statusChart.service', ['ngResource'])
.factory('AgentStatusStats', function ($http) {
return {
stats: function (startDate, endDate, reportType) {
return $http.post('agent_statuses/stats', {
report_type: reportType,
team_name: 'Helpdesk',
start_date: startDate,
end_date: endDate
});
}
};
})
.factory('StatusChart', function (CustomDate) {
return {
options: function () {
return {
chart: {
type: 'multiChart',
bars1: {
stacked: true
},
height: 600,
margin: {
left: 150
},
x: function (d) { return d.hour; },
y: function (d) { return d.value; },
yAxis1: {
tickFormat: function (seconds) {
return CustomDate.niceFormatting(seconds);
}
}
}
};
}
};
});
| Fix duration formatting in status chart | Fix duration formatting in status chart
Numbers were not zero padded.
| JavaScript | mit | UniversityofHelsinki/OC-webgui,UniversityofHelsinki/OC-webgui,UniversityofHelsinki/OC-webgui,UniversityofHelsinki/OC-webgui | javascript | ## Code Before:
angular.module('ocWebGui.statusChart.service', ['ngResource'])
.factory('AgentStatusStats', function ($http) {
return {
stats: function (startDate, endDate, reportType) {
return $http.post('agent_statuses/stats', {
report_type: reportType,
team_name: 'Helpdesk',
start_date: startDate,
end_date: endDate
});
}
};
})
.factory('StatusChart', function () {
return {
options: function () {
return {
chart: {
type: 'multiChart',
bars1: {
stacked: true
},
height: 600,
margin: {
left: 150
},
x: function (d) { return d.hour; },
y: function (d) { return d.value; },
yAxis1: {
tickFormat: function (seconds) {
var hours = Math.floor(seconds / 3600);
var mins = Math.floor(seconds % 3600 / 60);
var secs = seconds % 3600 % 60;
return hours + ':' + mins + ':' + secs;
}
}
}
};
}
};
});
## Instruction:
Fix duration formatting in status chart
Numbers were not zero padded.
## Code After:
angular.module('ocWebGui.statusChart.service', ['ngResource'])
.factory('AgentStatusStats', function ($http) {
return {
stats: function (startDate, endDate, reportType) {
return $http.post('agent_statuses/stats', {
report_type: reportType,
team_name: 'Helpdesk',
start_date: startDate,
end_date: endDate
});
}
};
})
.factory('StatusChart', function (CustomDate) {
return {
options: function () {
return {
chart: {
type: 'multiChart',
bars1: {
stacked: true
},
height: 600,
margin: {
left: 150
},
x: function (d) { return d.hour; },
y: function (d) { return d.value; },
yAxis1: {
tickFormat: function (seconds) {
return CustomDate.niceFormatting(seconds);
}
}
}
};
}
};
});
| angular.module('ocWebGui.statusChart.service', ['ngResource'])
.factory('AgentStatusStats', function ($http) {
return {
stats: function (startDate, endDate, reportType) {
return $http.post('agent_statuses/stats', {
report_type: reportType,
team_name: 'Helpdesk',
start_date: startDate,
end_date: endDate
});
}
};
})
- .factory('StatusChart', function () {
+ .factory('StatusChart', function (CustomDate) {
? ++++++++++
return {
options: function () {
return {
chart: {
type: 'multiChart',
bars1: {
stacked: true
},
height: 600,
margin: {
left: 150
},
x: function (d) { return d.hour; },
y: function (d) { return d.value; },
yAxis1: {
tickFormat: function (seconds) {
+ return CustomDate.niceFormatting(seconds);
- var hours = Math.floor(seconds / 3600);
- var mins = Math.floor(seconds % 3600 / 60);
- var secs = seconds % 3600 % 60;
- return hours + ':' + mins + ':' + secs;
}
}
}
};
}
};
}); | 7 | 0.170732 | 2 | 5 |
312f9814fb529bd4efb1b68ecb29ec47168c36bd | package.json | package.json | {
"name": "ember-fastboot-test-helpers",
"version": "0.1.0",
"description": "Test helpers for fastboot",
"directories": {
"doc": "doc",
"test": "tests"
},
"scripts": {
"build": "ember build",
"start": "ember server",
"test": "ember try:testall"
},
"repository": "",
"engines": {
"node": ">= 0.12.0"
},
"author": "Miguel Camba",
"license": "MIT",
"main": "lib/ember-fastboot-test-helpers.js",
"devDependencies": {
"ember-cli": "2.3.0-beta.2",
"ember-cli-release": "0.2.8",
"ember-resolver": "^2.0.3",
"ember-try": "~0.0.8",
"loader.js": "^4.0.0",
"rsvp": "^3.0.16",
"jsdom": "8.0.2",
"qunit-extras": "^1.4.0",
"qunitjs": "^1.20.0",
"request": "^2.69.0"
},
"keywords": [],
"dependencies": {
"ember-cli-babel": "^5.1.5"
}
}
| {
"name": "ember-fastboot-test-helpers",
"version": "0.1.0",
"description": "Test helpers for fastboot",
"directories": {
"doc": "doc",
"test": "tests"
},
"scripts": {
"build": "ember build",
"start": "ember server",
"test": "ember try:testall"
},
"repository": "",
"engines": {
"node": ">= 0.12.0"
},
"author": "Miguel Camba",
"license": "MIT",
"main": "lib/ember-fastboot-test-helpers.js",
"devDependencies": {
"ember-cli": "2.3.0-beta.2",
"ember-cli-release": "0.2.8",
"ember-resolver": "^2.0.3",
"ember-try": "~0.0.8",
"loader.js": "^4.0.0",
},
"keywords": [],
"dependencies": {
"ember-cli-babel": "^5.1.5",
"rsvp": "^3.0.16",
"jsdom": "8.0.2",
"qunit-extras": "^1.4.0",
"qunitjs": "^1.20.0",
"request": "^2.69.0"
}
}
| Move some stuff to runtime deps | Move some stuff to runtime deps
| JSON | mit | cibernox/ember-fastboot-test-helpers,cibernox/ember-fastboot-test-helpers | json | ## Code Before:
{
"name": "ember-fastboot-test-helpers",
"version": "0.1.0",
"description": "Test helpers for fastboot",
"directories": {
"doc": "doc",
"test": "tests"
},
"scripts": {
"build": "ember build",
"start": "ember server",
"test": "ember try:testall"
},
"repository": "",
"engines": {
"node": ">= 0.12.0"
},
"author": "Miguel Camba",
"license": "MIT",
"main": "lib/ember-fastboot-test-helpers.js",
"devDependencies": {
"ember-cli": "2.3.0-beta.2",
"ember-cli-release": "0.2.8",
"ember-resolver": "^2.0.3",
"ember-try": "~0.0.8",
"loader.js": "^4.0.0",
"rsvp": "^3.0.16",
"jsdom": "8.0.2",
"qunit-extras": "^1.4.0",
"qunitjs": "^1.20.0",
"request": "^2.69.0"
},
"keywords": [],
"dependencies": {
"ember-cli-babel": "^5.1.5"
}
}
## Instruction:
Move some stuff to runtime deps
## Code After:
{
"name": "ember-fastboot-test-helpers",
"version": "0.1.0",
"description": "Test helpers for fastboot",
"directories": {
"doc": "doc",
"test": "tests"
},
"scripts": {
"build": "ember build",
"start": "ember server",
"test": "ember try:testall"
},
"repository": "",
"engines": {
"node": ">= 0.12.0"
},
"author": "Miguel Camba",
"license": "MIT",
"main": "lib/ember-fastboot-test-helpers.js",
"devDependencies": {
"ember-cli": "2.3.0-beta.2",
"ember-cli-release": "0.2.8",
"ember-resolver": "^2.0.3",
"ember-try": "~0.0.8",
"loader.js": "^4.0.0",
},
"keywords": [],
"dependencies": {
"ember-cli-babel": "^5.1.5",
"rsvp": "^3.0.16",
"jsdom": "8.0.2",
"qunit-extras": "^1.4.0",
"qunitjs": "^1.20.0",
"request": "^2.69.0"
}
}
| {
"name": "ember-fastboot-test-helpers",
"version": "0.1.0",
"description": "Test helpers for fastboot",
"directories": {
"doc": "doc",
"test": "tests"
},
"scripts": {
"build": "ember build",
"start": "ember server",
"test": "ember try:testall"
},
"repository": "",
"engines": {
"node": ">= 0.12.0"
},
"author": "Miguel Camba",
"license": "MIT",
"main": "lib/ember-fastboot-test-helpers.js",
"devDependencies": {
"ember-cli": "2.3.0-beta.2",
"ember-cli-release": "0.2.8",
"ember-resolver": "^2.0.3",
"ember-try": "~0.0.8",
"loader.js": "^4.0.0",
+ },
+ "keywords": [],
+ "dependencies": {
+ "ember-cli-babel": "^5.1.5",
"rsvp": "^3.0.16",
"jsdom": "8.0.2",
"qunit-extras": "^1.4.0",
"qunitjs": "^1.20.0",
"request": "^2.69.0"
- },
- "keywords": [],
- "dependencies": {
- "ember-cli-babel": "^5.1.5"
}
} | 8 | 0.216216 | 4 | 4 |
adf7dcae5e4d19d57804fe68bfabacb24442bcf3 | zsh/os/mac.zsh | zsh/os/mac.zsh | export EDITOR=/usr/local/bin/code
export VIRTUALENVWRAPPER_PYTHON=/usr/local/bin/python3
# Load Custom Files
include "${HOME}/.zsh/os/mac_iterm2.zsh"
# Custom Aliases
alias cask="brew cask"
alias cpwd="pwd | pbcopy"
# Software Management
# ------------------
in() {
# Install Shortcut (brew)
brew install "$@"
}
se() {
# Search Shortcut (brew)
brew search "$@"
}
cin() {
# Install Shortcut (brew cask)
cask install "$@"
}
cse() {
# Install Shortcut (brew cask)
cask search "$@"
}
up() {
# Update Shortcut
brew update
brew upgrade
}
| export EDITOR=/usr/local/bin/code
export VIRTUALENVWRAPPER_PYTHON=/usr/local/bin/python3
# Load Custom Files
include "${HOME}/.zsh/os/mac_iterm2.zsh"
# Custom Aliases
alias cask="brew cask"
alias cpwd="pwd | pbcopy"
alias apex-up="/usr/local/bin/up"
# Software Management
# ------------------
in() {
# Install Shortcut (brew)
brew install "$@"
}
se() {
# Search Shortcut (brew)
brew search "$@"
}
cin() {
# Install Shortcut (brew cask)
cask install "$@"
}
cse() {
# Install Shortcut (brew cask)
cask search "$@"
}
up() {
# Update Shortcut
brew update
brew upgrade
}
| Fix apex's up not working | Fix apex's up not working
| Shell | mit | niklas-heer/dotfiles,niklas-heer/dotfiles,niklas-heer/dotfiles | shell | ## Code Before:
export EDITOR=/usr/local/bin/code
export VIRTUALENVWRAPPER_PYTHON=/usr/local/bin/python3
# Load Custom Files
include "${HOME}/.zsh/os/mac_iterm2.zsh"
# Custom Aliases
alias cask="brew cask"
alias cpwd="pwd | pbcopy"
# Software Management
# ------------------
in() {
# Install Shortcut (brew)
brew install "$@"
}
se() {
# Search Shortcut (brew)
brew search "$@"
}
cin() {
# Install Shortcut (brew cask)
cask install "$@"
}
cse() {
# Install Shortcut (brew cask)
cask search "$@"
}
up() {
# Update Shortcut
brew update
brew upgrade
}
## Instruction:
Fix apex's up not working
## Code After:
export EDITOR=/usr/local/bin/code
export VIRTUALENVWRAPPER_PYTHON=/usr/local/bin/python3
# Load Custom Files
include "${HOME}/.zsh/os/mac_iterm2.zsh"
# Custom Aliases
alias cask="brew cask"
alias cpwd="pwd | pbcopy"
alias apex-up="/usr/local/bin/up"
# Software Management
# ------------------
in() {
# Install Shortcut (brew)
brew install "$@"
}
se() {
# Search Shortcut (brew)
brew search "$@"
}
cin() {
# Install Shortcut (brew cask)
cask install "$@"
}
cse() {
# Install Shortcut (brew cask)
cask search "$@"
}
up() {
# Update Shortcut
brew update
brew upgrade
}
| export EDITOR=/usr/local/bin/code
export VIRTUALENVWRAPPER_PYTHON=/usr/local/bin/python3
# Load Custom Files
include "${HOME}/.zsh/os/mac_iterm2.zsh"
# Custom Aliases
alias cask="brew cask"
alias cpwd="pwd | pbcopy"
+ alias apex-up="/usr/local/bin/up"
# Software Management
# ------------------
in() {
# Install Shortcut (brew)
brew install "$@"
}
se() {
# Search Shortcut (brew)
brew search "$@"
}
cin() {
# Install Shortcut (brew cask)
cask install "$@"
}
cse() {
# Install Shortcut (brew cask)
cask search "$@"
}
up() {
# Update Shortcut
brew update
brew upgrade
} | 1 | 0.027027 | 1 | 0 |
58f95db154099cfc06afa62cc7fa0be28471cc15 | .github/workflows/ci.yaml | .github/workflows/ci.yaml | name: CI
on: pull_request
jobs:
notebook_format:
name: Notebook format
runs-on: ubuntu-latest
steps:
- uses: actions/setup-python@v1
- uses: actions/checkout@v2
- name: Fetch master branch
run: git fetch -u origin master:master
- name: Install tensorflow-docs
run: python3 -m pip install -U git+https://github.com/tensorflow/docs
- name: Check notebook formatting
run: |
# Only check notebooks modified in this pull request.
notebooks="$(git diff --name-only master | grep '\.ipynb$' || true)"
if [[ -n "$notebooks" ]]; then
echo "Check formatting with nbfmt:"
python3 -m tensorflow_docs.tools.nbfmt --test $notebooks
else
echo "No notebooks modified in this pull request."
fi
| name: CI
on:
pull_request:
paths:
- "site/en/**"
jobs:
nbfmt:
name: Notebook format
runs-on: ubuntu-latest
steps:
- uses: actions/setup-python@v1
- uses: actions/checkout@v2
- name: Fetch master branch
run: git fetch -u origin master:master
- name: Install tensorflow-docs
run: python3 -m pip install -U git+https://github.com/tensorflow/docs
- name: Check notebook formatting
run: |
# Only check notebooks modified in this pull request.
readarray -t changed_notebooks < <(git diff --name-only master | grep '\.ipynb$' || true)
if [[ ${#changed_notebooks[@]} == 0 ]]; then
echo "No notebooks modified in this pull request."
exit 0
else
echo "Check formatting with nbfmt:"
python3 -m tensorflow_docs.tools.nbfmt --test "${changed_notebooks[@]}"
fi
nblint:
name: Notebook lint
runs-on: ubuntu-latest
steps:
- uses: actions/setup-python@v1
- uses: actions/checkout@v2
- name: Fetch master branch
run: git fetch -u origin master:master
- name: Install tensorflow-docs
run: python3 -m pip install -U git+https://github.com/tensorflow/docs
- name: Lint notebooks
run: |
# Only check notebooks modified in this pull request. (Ignore en-snapshot)
readarray -t changed_notebooks < <(git diff --name-only master | grep '\.ipynb$' || true)
if [[ ${#changed_notebooks[@]} == 0 ]]; then
echo "No notebooks modified in this pull request."
exit 0
else
echo "Lint check with nblint:"
python3 -m tensorflow_docs.tools.nblint \
--arg=repo:tensorflow/docs "${changed_notebooks[@]}"
fi
| Update CI workflow for nbfmt and nblint | Update CI workflow for nbfmt and nblint
| YAML | apache-2.0 | tensorflow/docs,tensorflow/docs,tensorflow/docs | yaml | ## Code Before:
name: CI
on: pull_request
jobs:
notebook_format:
name: Notebook format
runs-on: ubuntu-latest
steps:
- uses: actions/setup-python@v1
- uses: actions/checkout@v2
- name: Fetch master branch
run: git fetch -u origin master:master
- name: Install tensorflow-docs
run: python3 -m pip install -U git+https://github.com/tensorflow/docs
- name: Check notebook formatting
run: |
# Only check notebooks modified in this pull request.
notebooks="$(git diff --name-only master | grep '\.ipynb$' || true)"
if [[ -n "$notebooks" ]]; then
echo "Check formatting with nbfmt:"
python3 -m tensorflow_docs.tools.nbfmt --test $notebooks
else
echo "No notebooks modified in this pull request."
fi
## Instruction:
Update CI workflow for nbfmt and nblint
## Code After:
name: CI
on:
pull_request:
paths:
- "site/en/**"
jobs:
nbfmt:
name: Notebook format
runs-on: ubuntu-latest
steps:
- uses: actions/setup-python@v1
- uses: actions/checkout@v2
- name: Fetch master branch
run: git fetch -u origin master:master
- name: Install tensorflow-docs
run: python3 -m pip install -U git+https://github.com/tensorflow/docs
- name: Check notebook formatting
run: |
# Only check notebooks modified in this pull request.
readarray -t changed_notebooks < <(git diff --name-only master | grep '\.ipynb$' || true)
if [[ ${#changed_notebooks[@]} == 0 ]]; then
echo "No notebooks modified in this pull request."
exit 0
else
echo "Check formatting with nbfmt:"
python3 -m tensorflow_docs.tools.nbfmt --test "${changed_notebooks[@]}"
fi
nblint:
name: Notebook lint
runs-on: ubuntu-latest
steps:
- uses: actions/setup-python@v1
- uses: actions/checkout@v2
- name: Fetch master branch
run: git fetch -u origin master:master
- name: Install tensorflow-docs
run: python3 -m pip install -U git+https://github.com/tensorflow/docs
- name: Lint notebooks
run: |
# Only check notebooks modified in this pull request. (Ignore en-snapshot)
readarray -t changed_notebooks < <(git diff --name-only master | grep '\.ipynb$' || true)
if [[ ${#changed_notebooks[@]} == 0 ]]; then
echo "No notebooks modified in this pull request."
exit 0
else
echo "Lint check with nblint:"
python3 -m tensorflow_docs.tools.nblint \
--arg=repo:tensorflow/docs "${changed_notebooks[@]}"
fi
| name: CI
+ on:
- on: pull_request
? ^^^
+ pull_request:
? ^ +
+ paths:
+ - "site/en/**"
jobs:
- notebook_format:
+ nbfmt:
name: Notebook format
runs-on: ubuntu-latest
steps:
- uses: actions/setup-python@v1
- uses: actions/checkout@v2
- name: Fetch master branch
run: git fetch -u origin master:master
- name: Install tensorflow-docs
run: python3 -m pip install -U git+https://github.com/tensorflow/docs
- name: Check notebook formatting
run: |
# Only check notebooks modified in this pull request.
- notebooks="$(git diff --name-only master | grep '\.ipynb$' || true)"
? ^^^ -
+ readarray -t changed_notebooks < <(git diff --name-only master | grep '\.ipynb$' || true)
? +++++++++++++++++++++ ^^^^
- if [[ -n "$notebooks" ]]; then
+ if [[ ${#changed_notebooks[@]} == 0 ]]; then
+ echo "No notebooks modified in this pull request."
+ exit 0
+ else
echo "Check formatting with nbfmt:"
- python3 -m tensorflow_docs.tools.nbfmt --test $notebooks
+ python3 -m tensorflow_docs.tools.nbfmt --test "${changed_notebooks[@]}"
? + +++++++++ +++++
+ fi
+
+ nblint:
+ name: Notebook lint
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/setup-python@v1
+ - uses: actions/checkout@v2
+ - name: Fetch master branch
+ run: git fetch -u origin master:master
+ - name: Install tensorflow-docs
+ run: python3 -m pip install -U git+https://github.com/tensorflow/docs
+ - name: Lint notebooks
+ run: |
+ # Only check notebooks modified in this pull request. (Ignore en-snapshot)
+ readarray -t changed_notebooks < <(git diff --name-only master | grep '\.ipynb$' || true)
+ if [[ ${#changed_notebooks[@]} == 0 ]]; then
+ echo "No notebooks modified in this pull request."
+ exit 0
else
- echo "No notebooks modified in this pull request."
+ echo "Lint check with nblint:"
+ python3 -m tensorflow_docs.tools.nblint \
+ --arg=repo:tensorflow/docs "${changed_notebooks[@]}"
fi | 39 | 1.625 | 33 | 6 |
21bec7ec8ced4ea2468fdd196f63e126d3312a6d | share/spice/book/book.css | share/spice/book/book.css | width: 40%;
display: inline-block;
}
#spice_book .spice_pane_right {
width: 50%;
display: inline-block;
vertical-align: top;
border-left: 1px solid rgba(0,0,0,0.1);
padding-left: 10px;
}
#spice_book .book_data_item {
display: inline-block;
padding-right: 6px;
color: gray;
}
#spice_book #critic-link {
float: right;
}
#spice_book #book-rating-visual {
display: inline;
width: 21px;
vertical-align: -12%;
}
@media (max-width: 320px) {
#spice_book .spice_pane_right {
padding-left: 0px;
border-left: 0px none;
width: 100%;
display: block;
}
#spice_book .spice_pane_left {
width: 100%;
display: block;
}
} | width: 40%;
display: inline-block;
}
#spice_book .spice_pane_right {
width: 50%;
display: inline-block;
vertical-align: top;
border-left: 1px solid rgba(0,0,0,0.1);
padding-left: 10px;
}
#spice_book .book_data_item {
display: inline-block;
padding-right: 6px;
color: gray;
}
#spice_book #critic-link {
float: right;
}
#spice_book #book-rating-visual {
display: inline;
width: 21px;
vertical-align: -12%;
}
@media (max-width: 320px) {
#spice_book .spice_pane_right {
padding-left: 0px;
border-left: 0px none;
width: 100%;
}
#spice_book .spice_pane_left {
width: 100%;
}
} | Remove display: block. We don't need it. | Book: Remove display: block. We don't need it.
| CSS | apache-2.0 | evejweinberg/zeroclickinfo-spice,Dwaligon/zeroclickinfo-spice,andrey-p/zeroclickinfo-spice,lernae/zeroclickinfo-spice,xaviervalarino/zeroclickinfo-spice,P71/zeroclickinfo-spice,MoriTanosuke/zeroclickinfo-spice,timeanddate/zeroclickinfo-spice,Queeniebee/zeroclickinfo-spice,ColasBroux/zeroclickinfo-spice,Faiz7412/zeroclickinfo-spice,digit4lfa1l/zeroclickinfo-spice,dogomedia/zeroclickinfo-spice,andrey-p/zeroclickinfo-spice,cylgom/zeroclickinfo-spice,bibliotechy/zeroclickinfo-spice,Faiz7412/zeroclickinfo-spice,lernae/zeroclickinfo-spice,mr-karan/zeroclickinfo-spice,shyamalschandra/zeroclickinfo-spice,AcriCAA/zeroclickinfo-spice,lernae/zeroclickinfo-spice,brianrisk/zeroclickinfo-spice,lernae/zeroclickinfo-spice,jyounker/zeroclickinfo-spice,kevintab95/zeroclickinfo-spice,mayo/zeroclickinfo-spice,xaviervalarino/zeroclickinfo-spice,GrandpaCardigan/zeroclickinfo-spice,TomBebbington/zeroclickinfo-spice,Kakkoroid/zeroclickinfo-spice,gautamkrishnar/zeroclickinfo-spice,alexandernext/zeroclickinfo-spice,brianrisk/zeroclickinfo-spice,deserted/zeroclickinfo-spice,marianosimone/zeroclickinfo-spice,GrandpaCardigan/zeroclickinfo-spice,Kakkoroid/zeroclickinfo-spice,stevenmg/zeroclickinfo-spice,ColasBroux/zeroclickinfo-spice,dachinzo/zeroclickinfo-spice,Queeniebee/zeroclickinfo-spice,sagarhani/zeroclickinfo-spice,dachinzo/zeroclickinfo-spice,soleo/zeroclickinfo-spice,marianosimone/zeroclickinfo-spice,lw7360/zeroclickinfo-spice,mr-karan/zeroclickinfo-spice,jyounker/zeroclickinfo-spice,iambibhas/zeroclickinfo-spice,jyounker/zeroclickinfo-spice,dheeraj143/zeroclickinfo-spice,AcriCAA/zeroclickinfo-spice,iambibhas/zeroclickinfo-spice,rmad17/zeroclickinfo-spice,lernae/zeroclickinfo-spice,stevenmg/zeroclickinfo-spice,Kakkoroid/zeroclickinfo-spice,toenu23/zeroclickinfo-spice,Dwaligon/zeroclickinfo-spice,toenu23/zeroclickinfo-spice,bdjnk/zeroclickinfo-spice,toenu23/zeroclickinfo-spice,rmad17/zeroclickinfo-spice,MoriTanosuke/zeroclickinfo-spice,Dwaligon/zeroclickinfo-spice,mohan08p/zeroclickinfo-spice,xaviervalarino/zeroclickinfo-spice,lw7360/zeroclickinfo-spice,brianrisk/zeroclickinfo-spice,mayo/zeroclickinfo-spice,iambibhas/zeroclickinfo-spice,ppant/zeroclickinfo-spice,ScreapDK/zeroclickinfo-spice,claytonspinner/zeroclickinfo-spice,sevki/zeroclickinfo-spice,TomBebbington/zeroclickinfo-spice,toenu23/zeroclickinfo-spice,whalenrp/zeroclickinfo-spice,hshackathons/zeroclickinfo-spice,Kr1tya3/zeroclickinfo-spice,ColasBroux/zeroclickinfo-spice,Queeniebee/zeroclickinfo-spice,rubinovitz/zeroclickinfo-spice,iambibhas/zeroclickinfo-spice,soleo/zeroclickinfo-spice,tagawa/zeroclickinfo-spice,imwally/zeroclickinfo-spice,deserted/zeroclickinfo-spice,mayo/zeroclickinfo-spice,ppant/zeroclickinfo-spice,levaly/zeroclickinfo-spice,Kakkoroid/zeroclickinfo-spice,P71/zeroclickinfo-spice,alexandernext/zeroclickinfo-spice,deserted/zeroclickinfo-spice,bdjnk/zeroclickinfo-spice,stevenmg/zeroclickinfo-spice,timeanddate/zeroclickinfo-spice,marianosimone/zeroclickinfo-spice,navjotahuja92/zeroclickinfo-spice,kevintab95/zeroclickinfo-spice,lerna/zeroclickinfo-spice,samskeller/zeroclickinfo-spice,brianrisk/zeroclickinfo-spice,Retrobottega/zeroclickinfo-spice,Retrobottega/zeroclickinfo-spice,bigcurl/zeroclickinfo-spice,Retrobottega/zeroclickinfo-spice,mohan08p/zeroclickinfo-spice,bibliotechy/zeroclickinfo-spice,hshackathons/zeroclickinfo-spice,echosa/zeroclickinfo-spice,digit4lfa1l/zeroclickinfo-spice,sevki/zeroclickinfo-spice,lernae/zeroclickinfo-spice,whalenrp/zeroclickinfo-spice,gautamkrishnar/zeroclickinfo-spice,tagawa/zeroclickinfo-spice,mayo/zeroclickinfo-spice,ColasBroux/zeroclickinfo-spice,navjotahuja92/zeroclickinfo-spice,iambibhas/zeroclickinfo-spice,hshackathons/zeroclickinfo-spice,sevki/zeroclickinfo-spice,timeanddate/zeroclickinfo-spice,bdjnk/zeroclickinfo-spice,bigcurl/zeroclickinfo-spice,rmad17/zeroclickinfo-spice,P71/zeroclickinfo-spice,Kr1tya3/zeroclickinfo-spice,dogomedia/zeroclickinfo-spice,P71/zeroclickinfo-spice,loganom/zeroclickinfo-spice,stennie/zeroclickinfo-spice,levaly/zeroclickinfo-spice,sevki/zeroclickinfo-spice,samskeller/zeroclickinfo-spice,MoriTanosuke/zeroclickinfo-spice,rubinovitz/zeroclickinfo-spice,bibliotechy/zeroclickinfo-spice,andrey-p/zeroclickinfo-spice,AcriCAA/zeroclickinfo-spice,hshackathons/zeroclickinfo-spice,claytonspinner/zeroclickinfo-spice,loganom/zeroclickinfo-spice,kevintab95/zeroclickinfo-spice,echosa/zeroclickinfo-spice,deserted/zeroclickinfo-spice,claytonspinner/zeroclickinfo-spice,cylgom/zeroclickinfo-spice,xaviervalarino/zeroclickinfo-spice,sagarhani/zeroclickinfo-spice,dachinzo/zeroclickinfo-spice,levaly/zeroclickinfo-spice,alexandernext/zeroclickinfo-spice,soleo/zeroclickinfo-spice,levaly/zeroclickinfo-spice,dogomedia/zeroclickinfo-spice,sagarhani/zeroclickinfo-spice,timeanddate/zeroclickinfo-spice,Kr1tya3/zeroclickinfo-spice,ScreapDK/zeroclickinfo-spice,cylgom/zeroclickinfo-spice,lw7360/zeroclickinfo-spice,rubinovitz/zeroclickinfo-spice,GrandpaCardigan/zeroclickinfo-spice,kevintab95/zeroclickinfo-spice,marianosimone/zeroclickinfo-spice,imwally/zeroclickinfo-spice,whalenrp/zeroclickinfo-spice,claytonspinner/zeroclickinfo-spice,cylgom/zeroclickinfo-spice,evejweinberg/zeroclickinfo-spice,samskeller/zeroclickinfo-spice,lerna/zeroclickinfo-spice,Retrobottega/zeroclickinfo-spice,bigcurl/zeroclickinfo-spice,samskeller/zeroclickinfo-spice,kevintab95/zeroclickinfo-spice,Retrobottega/zeroclickinfo-spice,alexandernext/zeroclickinfo-spice,bibliotechy/zeroclickinfo-spice,sagarhani/zeroclickinfo-spice,evejweinberg/zeroclickinfo-spice,deserted/zeroclickinfo-spice,stennie/zeroclickinfo-spice,cylgom/zeroclickinfo-spice,mr-karan/zeroclickinfo-spice,deserted/zeroclickinfo-spice,AcriCAA/zeroclickinfo-spice,Kr1tya3/zeroclickinfo-spice,soleo/zeroclickinfo-spice,ScreapDK/zeroclickinfo-spice,mohan08p/zeroclickinfo-spice,gautamkrishnar/zeroclickinfo-spice,rubinovitz/zeroclickinfo-spice,mohan08p/zeroclickinfo-spice,tagawa/zeroclickinfo-spice,imwally/zeroclickinfo-spice,mr-karan/zeroclickinfo-spice,ppant/zeroclickinfo-spice,mr-karan/zeroclickinfo-spice,shyamalschandra/zeroclickinfo-spice,MoriTanosuke/zeroclickinfo-spice,iambibhas/zeroclickinfo-spice,TomBebbington/zeroclickinfo-spice,dheeraj143/zeroclickinfo-spice,levaly/zeroclickinfo-spice,andrey-p/zeroclickinfo-spice,brianrisk/zeroclickinfo-spice,imwally/zeroclickinfo-spice,shyamalschandra/zeroclickinfo-spice,xaviervalarino/zeroclickinfo-spice,kevintab95/zeroclickinfo-spice,loganom/zeroclickinfo-spice,dachinzo/zeroclickinfo-spice,marianosimone/zeroclickinfo-spice,tagawa/zeroclickinfo-spice,whalenrp/zeroclickinfo-spice,lerna/zeroclickinfo-spice,echosa/zeroclickinfo-spice,jyounker/zeroclickinfo-spice,ppant/zeroclickinfo-spice,navjotahuja92/zeroclickinfo-spice,ScreapDK/zeroclickinfo-spice,dogomedia/zeroclickinfo-spice,Dwaligon/zeroclickinfo-spice,digit4lfa1l/zeroclickinfo-spice,evejweinberg/zeroclickinfo-spice,whalenrp/zeroclickinfo-spice,echosa/zeroclickinfo-spice,navjotahuja92/zeroclickinfo-spice,gautamkrishnar/zeroclickinfo-spice,rmad17/zeroclickinfo-spice,bigcurl/zeroclickinfo-spice,sagarhani/zeroclickinfo-spice,marianosimone/zeroclickinfo-spice,GrandpaCardigan/zeroclickinfo-spice,stennie/zeroclickinfo-spice,AcriCAA/zeroclickinfo-spice,rmad17/zeroclickinfo-spice,Queeniebee/zeroclickinfo-spice,lerna/zeroclickinfo-spice,digit4lfa1l/zeroclickinfo-spice,dogomedia/zeroclickinfo-spice,soleo/zeroclickinfo-spice,MoriTanosuke/zeroclickinfo-spice,Faiz7412/zeroclickinfo-spice,dheeraj143/zeroclickinfo-spice,lw7360/zeroclickinfo-spice,Kr1tya3/zeroclickinfo-spice,loganom/zeroclickinfo-spice,imwally/zeroclickinfo-spice,xaviervalarino/zeroclickinfo-spice,andrey-p/zeroclickinfo-spice,ScreapDK/zeroclickinfo-spice,bigcurl/zeroclickinfo-spice,levaly/zeroclickinfo-spice,whalenrp/zeroclickinfo-spice,bdjnk/zeroclickinfo-spice,stennie/zeroclickinfo-spice,tagawa/zeroclickinfo-spice,shyamalschandra/zeroclickinfo-spice,Faiz7412/zeroclickinfo-spice,cylgom/zeroclickinfo-spice,GrandpaCardigan/zeroclickinfo-spice,stevenmg/zeroclickinfo-spice,Kakkoroid/zeroclickinfo-spice,dheeraj143/zeroclickinfo-spice,bigcurl/zeroclickinfo-spice,TomBebbington/zeroclickinfo-spice,lerna/zeroclickinfo-spice,echosa/zeroclickinfo-spice,soleo/zeroclickinfo-spice,shyamalschandra/zeroclickinfo-spice | css | ## Code Before:
width: 40%;
display: inline-block;
}
#spice_book .spice_pane_right {
width: 50%;
display: inline-block;
vertical-align: top;
border-left: 1px solid rgba(0,0,0,0.1);
padding-left: 10px;
}
#spice_book .book_data_item {
display: inline-block;
padding-right: 6px;
color: gray;
}
#spice_book #critic-link {
float: right;
}
#spice_book #book-rating-visual {
display: inline;
width: 21px;
vertical-align: -12%;
}
@media (max-width: 320px) {
#spice_book .spice_pane_right {
padding-left: 0px;
border-left: 0px none;
width: 100%;
display: block;
}
#spice_book .spice_pane_left {
width: 100%;
display: block;
}
}
## Instruction:
Book: Remove display: block. We don't need it.
## Code After:
width: 40%;
display: inline-block;
}
#spice_book .spice_pane_right {
width: 50%;
display: inline-block;
vertical-align: top;
border-left: 1px solid rgba(0,0,0,0.1);
padding-left: 10px;
}
#spice_book .book_data_item {
display: inline-block;
padding-right: 6px;
color: gray;
}
#spice_book #critic-link {
float: right;
}
#spice_book #book-rating-visual {
display: inline;
width: 21px;
vertical-align: -12%;
}
@media (max-width: 320px) {
#spice_book .spice_pane_right {
padding-left: 0px;
border-left: 0px none;
width: 100%;
}
#spice_book .spice_pane_left {
width: 100%;
}
} | width: 40%;
display: inline-block;
}
#spice_book .spice_pane_right {
width: 50%;
display: inline-block;
vertical-align: top;
border-left: 1px solid rgba(0,0,0,0.1);
padding-left: 10px;
}
#spice_book .book_data_item {
display: inline-block;
padding-right: 6px;
color: gray;
}
#spice_book #critic-link {
float: right;
}
#spice_book #book-rating-visual {
display: inline;
width: 21px;
vertical-align: -12%;
}
@media (max-width: 320px) {
#spice_book .spice_pane_right {
padding-left: 0px;
border-left: 0px none;
width: 100%;
- display: block;
}
#spice_book .spice_pane_left {
width: 100%;
- display: block;
}
} | 2 | 0.04878 | 0 | 2 |
eafd303a868e485803f11d5458e2b09a57c27431 | circle.yml | circle.yml |
version: 2
jobs:
build:
working_directory: ~/Area51
docker:
- image: node:latest
steps:
- checkout
- run:
name: Install dependencies
command: |
yarn
apt-get update
apt-get install ocaml libelf-dev -y
curl https://install.meteor.com/ | sh
meteor --version
- run:
name: Prepare and lint code
command: |
meteor --version
mkdir -p $CIRCLE_TEST_REPORTS/reports
yarn run lint --- --format junit --output-file $CIRCLE_TEST_REPORTS/reports/eslint.xml
- run:
name: Test code and produce coverage
command: |
yarn test
yarn run report-coverage
|
version: 2
jobs:
build:
working_directory: ~/Area51
docker:
- image: node:latest
steps:
- checkout
- run:
name: Install dependencies
command: |
yarn
apt-get update
apt-get install ocaml libelf-dev -y
curl https://install.meteor.com/ | sh
meteor --version --allow-superuser
- run:
name: Prepare and lint code
command: |
meteor --version --allow-superuser
mkdir -p $CIRCLE_TEST_REPORTS/reports
yarn run lint --- --format junit --output-file $CIRCLE_TEST_REPORTS/reports/eslint.xml
- run:
name: Test code and produce coverage
command: |
yarn test
yarn run report-coverage
| Update CircleCI to fix Meteor issue. | Update CircleCI to fix Meteor issue.
| YAML | apache-2.0 | ibujs/Area51,retrixe/Area51,ibujs/Area51,retrixe/Area51 | yaml | ## Code Before:
version: 2
jobs:
build:
working_directory: ~/Area51
docker:
- image: node:latest
steps:
- checkout
- run:
name: Install dependencies
command: |
yarn
apt-get update
apt-get install ocaml libelf-dev -y
curl https://install.meteor.com/ | sh
meteor --version
- run:
name: Prepare and lint code
command: |
meteor --version
mkdir -p $CIRCLE_TEST_REPORTS/reports
yarn run lint --- --format junit --output-file $CIRCLE_TEST_REPORTS/reports/eslint.xml
- run:
name: Test code and produce coverage
command: |
yarn test
yarn run report-coverage
## Instruction:
Update CircleCI to fix Meteor issue.
## Code After:
version: 2
jobs:
build:
working_directory: ~/Area51
docker:
- image: node:latest
steps:
- checkout
- run:
name: Install dependencies
command: |
yarn
apt-get update
apt-get install ocaml libelf-dev -y
curl https://install.meteor.com/ | sh
meteor --version --allow-superuser
- run:
name: Prepare and lint code
command: |
meteor --version --allow-superuser
mkdir -p $CIRCLE_TEST_REPORTS/reports
yarn run lint --- --format junit --output-file $CIRCLE_TEST_REPORTS/reports/eslint.xml
- run:
name: Test code and produce coverage
command: |
yarn test
yarn run report-coverage
|
version: 2
jobs:
build:
working_directory: ~/Area51
docker:
- image: node:latest
steps:
- checkout
- run:
name: Install dependencies
command: |
yarn
apt-get update
apt-get install ocaml libelf-dev -y
curl https://install.meteor.com/ | sh
- meteor --version
+ meteor --version --allow-superuser
? ++++++++++++++++++
- run:
name: Prepare and lint code
command: |
- meteor --version
+ meteor --version --allow-superuser
? ++++++++++++++++++
mkdir -p $CIRCLE_TEST_REPORTS/reports
yarn run lint --- --format junit --output-file $CIRCLE_TEST_REPORTS/reports/eslint.xml
- run:
name: Test code and produce coverage
command: |
yarn test
yarn run report-coverage | 4 | 0.137931 | 2 | 2 |
9e7c5077b283980e2f6ffb619d5ad20a0d176089 | core/common/src/test/java/alluxio/util/IdUtilsTest.java | core/common/src/test/java/alluxio/util/IdUtilsTest.java | /*
* The Alluxio Open Foundation licenses this work under the Apache License, version 2.0
* (the “License”). You may not use this work except in compliance with the License, which is
* available at www.apache.org/licenses/LICENSE-2.0
*
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
* either express or implied, as more fully set forth in the License.
*
* See the NOTICE file distributed with this work for information regarding copyright ownership.
*/
package alluxio.util;
import org.junit.Assert;
import org.junit.Test;
/**
* Tests {@link IdUtils}.
*/
public final class IdUtilsTest {
/**
* Tests if output of {@link IdUtils#getRandomNonNegativeLong()} is non-negative.
* Also tests for randomness property.
*/
@Test
public void getRandomNonNegativeLongTest() throws Exception {
long first = IdUtils.getRandomNonNegativeLong();
long second = IdUtils.getRandomNonNegativeLong();
Assert.assertTrue(first >= 0);
Assert.assertTrue(second >= 0);
Assert.assertTrue(first != second);
}
}
| /*
* The Alluxio Open Foundation licenses this work under the Apache License, version 2.0
* (the “License”). You may not use this work except in compliance with the License, which is
* available at www.apache.org/licenses/LICENSE-2.0
*
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
* either express or implied, as more fully set forth in the License.
*
* See the NOTICE file distributed with this work for information regarding copyright ownership.
*/
package alluxio.util;
import org.junit.Assert;
import org.junit.Test;
/**
* Tests {@link IdUtils}.
*/
public final class IdUtilsTest {
/**
* Tests if output of {@link IdUtils#getRandomNonNegativeLong()} is non-negative.
* Also tests for randomness property.
*/
@Test
public void getRandomNonNegativeLongTest() throws Exception {
long first = IdUtils.getRandomNonNegativeLong();
long second = IdUtils.getRandomNonNegativeLong();
Assert.assertTrue(first >= 0);
Assert.assertTrue(second >= 0);
Assert.assertTrue(first != second);
}
/**
* Tests if output of {@link IdUtils#createFileId(long)} is valid.
*/
@Test
public void createFileIdTest() throws Exception {
long containerId = 1;
long fileId = IdUtils.createFileId(containerId);
Assert.assertTrue(fileId != -1);
}
/**
* Tests if output of {@link IdUtils#createRpcId()} is non-empty.
* Also tests for randomness property.
*/
@Test
public void createRpcIdTest() throws Exception {
String first = IdUtils.createRpcId();
Assert.assertTrue(first != null && !first.isEmpty());
String second = IdUtils.createRpcId();
Assert.assertTrue(second != null && !second.isEmpty());
Assert.assertTrue(!first.equals(second));
}
}
| Add unit tests for IdUtils | [ALLUXIO-1776] Add unit tests for IdUtils
| Java | apache-2.0 | wwjiang007/alluxio,wwjiang007/alluxio,jsimsa/alluxio,PasaLab/tachyon,jswudi/alluxio,maboelhassan/alluxio,maobaolong/alluxio,apc999/alluxio,yuluo-ding/alluxio,Reidddddd/alluxio,wwjiang007/alluxio,wwjiang007/alluxio,ShailShah/alluxio,apc999/alluxio,calvinjia/tachyon,PasaLab/tachyon,EvilMcJerkface/alluxio,maboelhassan/alluxio,maobaolong/alluxio,jsimsa/alluxio,EvilMcJerkface/alluxio,ChangerYoung/alluxio,bf8086/alluxio,ChangerYoung/alluxio,madanadit/alluxio,madanadit/alluxio,bf8086/alluxio,yuluo-ding/alluxio,uronce-cc/alluxio,maboelhassan/alluxio,wwjiang007/alluxio,wwjiang007/alluxio,maboelhassan/alluxio,ShailShah/alluxio,jswudi/alluxio,bf8086/alluxio,bf8086/alluxio,calvinjia/tachyon,aaudiber/alluxio,Alluxio/alluxio,Alluxio/alluxio,ShailShah/alluxio,yuluo-ding/alluxio,Alluxio/alluxio,madanadit/alluxio,wwjiang007/alluxio,WilliamZapata/alluxio,uronce-cc/alluxio,bf8086/alluxio,Reidddddd/alluxio,Alluxio/alluxio,riversand963/alluxio,PasaLab/tachyon,WilliamZapata/alluxio,EvilMcJerkface/alluxio,aaudiber/alluxio,maboelhassan/alluxio,EvilMcJerkface/alluxio,ChangerYoung/alluxio,WilliamZapata/alluxio,Reidddddd/mo-alluxio,Reidddddd/alluxio,riversand963/alluxio,PasaLab/tachyon,Reidddddd/mo-alluxio,riversand963/alluxio,calvinjia/tachyon,yuluo-ding/alluxio,calvinjia/tachyon,EvilMcJerkface/alluxio,Reidddddd/alluxio,apc999/alluxio,riversand963/alluxio,maobaolong/alluxio,madanadit/alluxio,PasaLab/tachyon,uronce-cc/alluxio,WilliamZapata/alluxio,calvinjia/tachyon,WilliamZapata/alluxio,ShailShah/alluxio,apc999/alluxio,jswudi/alluxio,Alluxio/alluxio,madanadit/alluxio,Alluxio/alluxio,maobaolong/alluxio,jswudi/alluxio,Reidddddd/alluxio,jsimsa/alluxio,Reidddddd/mo-alluxio,apc999/alluxio,Alluxio/alluxio,maobaolong/alluxio,EvilMcJerkface/alluxio,maobaolong/alluxio,Alluxio/alluxio,calvinjia/tachyon,maboelhassan/alluxio,aaudiber/alluxio,jsimsa/alluxio,bf8086/alluxio,PasaLab/tachyon,jsimsa/alluxio,ShailShah/alluxio,Reidddddd/alluxio,Reidddddd/mo-alluxio,madanadit/alluxio,madanadit/alluxio,maobaolong/alluxio,wwjiang007/alluxio,ChangerYoung/alluxio,bf8086/alluxio,aaudiber/alluxio,Alluxio/alluxio,PasaLab/tachyon,aaudiber/alluxio,EvilMcJerkface/alluxio,calvinjia/tachyon,aaudiber/alluxio,jswudi/alluxio,riversand963/alluxio,Reidddddd/mo-alluxio,WilliamZapata/alluxio,maobaolong/alluxio,aaudiber/alluxio,maobaolong/alluxio,Reidddddd/alluxio,wwjiang007/alluxio,jswudi/alluxio,maobaolong/alluxio,ChangerYoung/alluxio,apc999/alluxio,uronce-cc/alluxio,ShailShah/alluxio,jsimsa/alluxio,EvilMcJerkface/alluxio,madanadit/alluxio,yuluo-ding/alluxio,maboelhassan/alluxio,yuluo-ding/alluxio,uronce-cc/alluxio,calvinjia/tachyon,ChangerYoung/alluxio,bf8086/alluxio,apc999/alluxio,wwjiang007/alluxio,Alluxio/alluxio,Reidddddd/mo-alluxio,uronce-cc/alluxio,riversand963/alluxio | java | ## Code Before:
/*
* The Alluxio Open Foundation licenses this work under the Apache License, version 2.0
* (the “License”). You may not use this work except in compliance with the License, which is
* available at www.apache.org/licenses/LICENSE-2.0
*
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
* either express or implied, as more fully set forth in the License.
*
* See the NOTICE file distributed with this work for information regarding copyright ownership.
*/
package alluxio.util;
import org.junit.Assert;
import org.junit.Test;
/**
* Tests {@link IdUtils}.
*/
public final class IdUtilsTest {
/**
* Tests if output of {@link IdUtils#getRandomNonNegativeLong()} is non-negative.
* Also tests for randomness property.
*/
@Test
public void getRandomNonNegativeLongTest() throws Exception {
long first = IdUtils.getRandomNonNegativeLong();
long second = IdUtils.getRandomNonNegativeLong();
Assert.assertTrue(first >= 0);
Assert.assertTrue(second >= 0);
Assert.assertTrue(first != second);
}
}
## Instruction:
[ALLUXIO-1776] Add unit tests for IdUtils
## Code After:
/*
* The Alluxio Open Foundation licenses this work under the Apache License, version 2.0
* (the “License”). You may not use this work except in compliance with the License, which is
* available at www.apache.org/licenses/LICENSE-2.0
*
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
* either express or implied, as more fully set forth in the License.
*
* See the NOTICE file distributed with this work for information regarding copyright ownership.
*/
package alluxio.util;
import org.junit.Assert;
import org.junit.Test;
/**
* Tests {@link IdUtils}.
*/
public final class IdUtilsTest {
/**
* Tests if output of {@link IdUtils#getRandomNonNegativeLong()} is non-negative.
* Also tests for randomness property.
*/
@Test
public void getRandomNonNegativeLongTest() throws Exception {
long first = IdUtils.getRandomNonNegativeLong();
long second = IdUtils.getRandomNonNegativeLong();
Assert.assertTrue(first >= 0);
Assert.assertTrue(second >= 0);
Assert.assertTrue(first != second);
}
/**
* Tests if output of {@link IdUtils#createFileId(long)} is valid.
*/
@Test
public void createFileIdTest() throws Exception {
long containerId = 1;
long fileId = IdUtils.createFileId(containerId);
Assert.assertTrue(fileId != -1);
}
/**
* Tests if output of {@link IdUtils#createRpcId()} is non-empty.
* Also tests for randomness property.
*/
@Test
public void createRpcIdTest() throws Exception {
String first = IdUtils.createRpcId();
Assert.assertTrue(first != null && !first.isEmpty());
String second = IdUtils.createRpcId();
Assert.assertTrue(second != null && !second.isEmpty());
Assert.assertTrue(!first.equals(second));
}
}
| /*
* The Alluxio Open Foundation licenses this work under the Apache License, version 2.0
* (the “License”). You may not use this work except in compliance with the License, which is
* available at www.apache.org/licenses/LICENSE-2.0
*
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
* either express or implied, as more fully set forth in the License.
*
* See the NOTICE file distributed with this work for information regarding copyright ownership.
*/
package alluxio.util;
import org.junit.Assert;
import org.junit.Test;
/**
* Tests {@link IdUtils}.
*/
public final class IdUtilsTest {
/**
* Tests if output of {@link IdUtils#getRandomNonNegativeLong()} is non-negative.
* Also tests for randomness property.
*/
@Test
public void getRandomNonNegativeLongTest() throws Exception {
long first = IdUtils.getRandomNonNegativeLong();
long second = IdUtils.getRandomNonNegativeLong();
Assert.assertTrue(first >= 0);
Assert.assertTrue(second >= 0);
Assert.assertTrue(first != second);
}
+
+ /**
+ * Tests if output of {@link IdUtils#createFileId(long)} is valid.
+ */
+ @Test
+ public void createFileIdTest() throws Exception {
+ long containerId = 1;
+ long fileId = IdUtils.createFileId(containerId);
+ Assert.assertTrue(fileId != -1);
+ }
+
+ /**
+ * Tests if output of {@link IdUtils#createRpcId()} is non-empty.
+ * Also tests for randomness property.
+ */
+ @Test
+ public void createRpcIdTest() throws Exception {
+ String first = IdUtils.createRpcId();
+ Assert.assertTrue(first != null && !first.isEmpty());
+ String second = IdUtils.createRpcId();
+ Assert.assertTrue(second != null && !second.isEmpty());
+ Assert.assertTrue(!first.equals(second));
+ }
} | 23 | 0.69697 | 23 | 0 |
43d3dcb49e6f15484c3e26796c938d96a343623a | source/styles/variables.scss | source/styles/variables.scss | // Override core variables or add custom values here
// Default settings available at https://www.weepower.com/style/variables
@import "wee-core/styles/variables.scss"; | // Override core variables or add custom values here
// Default settings available at https://www.weepower.com/style/variables
// $primary: red;
@import "wee-core/styles/variables.scss";
// Assign variables that need to reference default variables below
// $liMarginBottom: $blockMarginBottom; | Rework scss variable import and assignment | Rework scss variable import and assignment
| SCSS | apache-2.0 | weepower/wee,weepower/wee | scss | ## Code Before:
// Override core variables or add custom values here
// Default settings available at https://www.weepower.com/style/variables
@import "wee-core/styles/variables.scss";
## Instruction:
Rework scss variable import and assignment
## Code After:
// Override core variables or add custom values here
// Default settings available at https://www.weepower.com/style/variables
// $primary: red;
@import "wee-core/styles/variables.scss";
// Assign variables that need to reference default variables below
// $liMarginBottom: $blockMarginBottom; | // Override core variables or add custom values here
// Default settings available at https://www.weepower.com/style/variables
+ // $primary: red;
+
@import "wee-core/styles/variables.scss";
+
+ // Assign variables that need to reference default variables below
+
+ // $liMarginBottom: $blockMarginBottom; | 6 | 1.5 | 6 | 0 |
6f46ff3ed6ca69a68fd86cfdf1da1861b23f05f9 | site/content/posts/hello-world.md | site/content/posts/hello-world.md | +++
date = "2017-06-18T16:08:46-04:00"
title = "hello world"
draft = true
+++
Hope you're listening
| +++
date = "2017-06-18T16:08:46-04:00"
title = "hello world"
+++
Hope you're listening
| Make hello world post not a draft so it shows up | Make hello world post not a draft so it shows up
| Markdown | mit | ksmithbaylor/ksmithbaylor.github.com,ksmithbaylor/ksmithbaylor.github.com | markdown | ## Code Before:
+++
date = "2017-06-18T16:08:46-04:00"
title = "hello world"
draft = true
+++
Hope you're listening
## Instruction:
Make hello world post not a draft so it shows up
## Code After:
+++
date = "2017-06-18T16:08:46-04:00"
title = "hello world"
+++
Hope you're listening
| +++
date = "2017-06-18T16:08:46-04:00"
title = "hello world"
- draft = true
+++
Hope you're listening | 1 | 0.142857 | 0 | 1 |
c77302e4e14b91cc77e6b80d60c8675969707b60 | library/Denkmal/library/Denkmal/Maintenance/Cli.php | library/Denkmal/library/Denkmal/Maintenance/Cli.php | <?php
class Denkmal_Maintenance_Cli extends CM_Maintenance_Cli {
/**
* @synchronized
*/
protected function _registerCallbacks() {
parent::_registerCallbacks();
$this->_registerClockworkCallbacks(new DateInterval('PT12H'), array(
'Scraper' => function () {
foreach (Denkmal_Scraper_Source_Abstract::getAll() as $scraper) {
$scraper->run();
}
},
'Check links' => function () {
$linkList = new Denkmal_Paging_Link_All();
foreach ($linkList as $link) {
/** @var Denkmal_Model_Link $link */
try {
CM_Util::getContents($link->getUrl());
} catch (CM_Exception_Invalid $ex) {
$link->setFailedCount($link->getFailedCount() + 1);
}
}
},
));
}
public static function getPackageName() {
return 'maintenance';
}
}
| <?php
class Denkmal_Maintenance_Cli extends CM_Maintenance_Cli {
/**
* @synchronized
*/
protected function _registerCallbacks() {
parent::_registerCallbacks();
$this->_registerClockworkCallbacks(new DateInterval('PT12H'), array(
'Scraper' => function () {
foreach (Denkmal_Scraper_Source_Abstract::getAll() as $scraper) {
$scraper->run();
}
},
'Check links' => function () {
$linkList = new Denkmal_Paging_Link_All();
foreach ($linkList as $link) {
/** @var Denkmal_Model_Link $link */
try {
CM_Util::getContents($link->getUrl());
$link->setFailedCount(0);
} catch (CM_Exception_Invalid $ex) {
$link->setFailedCount($link->getFailedCount() + 1);
}
}
},
));
}
public static function getPackageName() {
return 'maintenance';
}
}
| Set link failedCount to zero on success | Set link failedCount to zero on success
| PHP | mit | fvovan/denkmal.org,denkmal/denkmal.org,denkmal/denkmal.org,njam/denkmal.org,njam/denkmal.org,fvovan/denkmal.org,njam/denkmal.org,njam/denkmal.org,fvovan/denkmal.org,njam/denkmal.org,denkmal/denkmal.org,denkmal/denkmal.org,fvovan/denkmal.org,denkmal/denkmal.org,fvovan/denkmal.org | php | ## Code Before:
<?php
class Denkmal_Maintenance_Cli extends CM_Maintenance_Cli {
/**
* @synchronized
*/
protected function _registerCallbacks() {
parent::_registerCallbacks();
$this->_registerClockworkCallbacks(new DateInterval('PT12H'), array(
'Scraper' => function () {
foreach (Denkmal_Scraper_Source_Abstract::getAll() as $scraper) {
$scraper->run();
}
},
'Check links' => function () {
$linkList = new Denkmal_Paging_Link_All();
foreach ($linkList as $link) {
/** @var Denkmal_Model_Link $link */
try {
CM_Util::getContents($link->getUrl());
} catch (CM_Exception_Invalid $ex) {
$link->setFailedCount($link->getFailedCount() + 1);
}
}
},
));
}
public static function getPackageName() {
return 'maintenance';
}
}
## Instruction:
Set link failedCount to zero on success
## Code After:
<?php
class Denkmal_Maintenance_Cli extends CM_Maintenance_Cli {
/**
* @synchronized
*/
protected function _registerCallbacks() {
parent::_registerCallbacks();
$this->_registerClockworkCallbacks(new DateInterval('PT12H'), array(
'Scraper' => function () {
foreach (Denkmal_Scraper_Source_Abstract::getAll() as $scraper) {
$scraper->run();
}
},
'Check links' => function () {
$linkList = new Denkmal_Paging_Link_All();
foreach ($linkList as $link) {
/** @var Denkmal_Model_Link $link */
try {
CM_Util::getContents($link->getUrl());
$link->setFailedCount(0);
} catch (CM_Exception_Invalid $ex) {
$link->setFailedCount($link->getFailedCount() + 1);
}
}
},
));
}
public static function getPackageName() {
return 'maintenance';
}
}
| <?php
class Denkmal_Maintenance_Cli extends CM_Maintenance_Cli {
/**
* @synchronized
*/
protected function _registerCallbacks() {
parent::_registerCallbacks();
$this->_registerClockworkCallbacks(new DateInterval('PT12H'), array(
'Scraper' => function () {
foreach (Denkmal_Scraper_Source_Abstract::getAll() as $scraper) {
$scraper->run();
}
},
'Check links' => function () {
$linkList = new Denkmal_Paging_Link_All();
foreach ($linkList as $link) {
/** @var Denkmal_Model_Link $link */
try {
CM_Util::getContents($link->getUrl());
+ $link->setFailedCount(0);
} catch (CM_Exception_Invalid $ex) {
$link->setFailedCount($link->getFailedCount() + 1);
}
}
},
));
}
public static function getPackageName() {
return 'maintenance';
}
} | 1 | 0.030303 | 1 | 0 |
9cda2d34bf812ecdfcd46e8983f47bbd937884dc | src/profiler/tracing/no_trace.c | src/profiler/tracing/no_trace.c | /**
* @file
* @brief
*
* @author Anton Kozlov
* @date 29.04.2013
*/
#include <stddef.h>
#include <profiler/tracing/trace.h>
time64_t trace_block_diff(struct __trace_block *tb) {
return -1;
}
time64_t trace_block_get_time(struct __trace_block *tb) {
return -1;
}
int trace_point_get_value(struct __trace_point *tp) {
return -1;
}
struct __trace_point *trace_point_get_by_name(const char *name) {
return NULL;
}
| /**
* @file
* @brief
*
* @author Anton Kozlov
* @date 29.04.2013
*/
#include <stddef.h>
#include <profiler/tracing/trace.h>
time64_t trace_block_diff(struct __trace_block *tb) {
return -1;
}
time64_t trace_block_get_time(struct __trace_block *tb) {
return -1;
}
int trace_point_get_value(struct __trace_point *tp) {
return -1;
}
struct __trace_point *trace_point_get_by_name(const char *name) {
return NULL;
}
void trace_block_func_enter(void *func) {
}
void trace_block_func_exit(void *func) {
}
| Fix build after merge with embox-profiler | Fix build after merge with embox-profiler | C | bsd-2-clause | gzoom13/embox,vrxfile/embox-trik,gzoom13/embox,Kefir0192/embox,abusalimov/embox,Kakadu/embox,mike2390/embox,Kakadu/embox,Kefir0192/embox,Kefir0192/embox,Kefir0192/embox,Kefir0192/embox,vrxfile/embox-trik,gzoom13/embox,gzoom13/embox,embox/embox,gzoom13/embox,vrxfile/embox-trik,mike2390/embox,vrxfile/embox-trik,embox/embox,gzoom13/embox,abusalimov/embox,embox/embox,Kakadu/embox,abusalimov/embox,embox/embox,Kakadu/embox,Kefir0192/embox,embox/embox,abusalimov/embox,abusalimov/embox,Kakadu/embox,abusalimov/embox,embox/embox,gzoom13/embox,mike2390/embox,mike2390/embox,vrxfile/embox-trik,Kefir0192/embox,Kakadu/embox,mike2390/embox,vrxfile/embox-trik,mike2390/embox,mike2390/embox,vrxfile/embox-trik,Kakadu/embox | c | ## Code Before:
/**
* @file
* @brief
*
* @author Anton Kozlov
* @date 29.04.2013
*/
#include <stddef.h>
#include <profiler/tracing/trace.h>
time64_t trace_block_diff(struct __trace_block *tb) {
return -1;
}
time64_t trace_block_get_time(struct __trace_block *tb) {
return -1;
}
int trace_point_get_value(struct __trace_point *tp) {
return -1;
}
struct __trace_point *trace_point_get_by_name(const char *name) {
return NULL;
}
## Instruction:
Fix build after merge with embox-profiler
## Code After:
/**
* @file
* @brief
*
* @author Anton Kozlov
* @date 29.04.2013
*/
#include <stddef.h>
#include <profiler/tracing/trace.h>
time64_t trace_block_diff(struct __trace_block *tb) {
return -1;
}
time64_t trace_block_get_time(struct __trace_block *tb) {
return -1;
}
int trace_point_get_value(struct __trace_point *tp) {
return -1;
}
struct __trace_point *trace_point_get_by_name(const char *name) {
return NULL;
}
void trace_block_func_enter(void *func) {
}
void trace_block_func_exit(void *func) {
}
| /**
* @file
* @brief
*
* @author Anton Kozlov
* @date 29.04.2013
*/
#include <stddef.h>
#include <profiler/tracing/trace.h>
time64_t trace_block_diff(struct __trace_block *tb) {
return -1;
}
time64_t trace_block_get_time(struct __trace_block *tb) {
return -1;
}
int trace_point_get_value(struct __trace_point *tp) {
return -1;
}
struct __trace_point *trace_point_get_by_name(const char *name) {
return NULL;
}
+ void trace_block_func_enter(void *func) {
+ }
+
+ void trace_block_func_exit(void *func) {
+ } | 5 | 0.172414 | 5 | 0 |
086d19ef6c30d6bbd43e03d6d802e89b000cb66e | keymaps/find-and-replace.cson | keymaps/find-and-replace.cson | 'body':
'meta-F': 'project-find:show'
'meta-f': 'find-and-replace:show'
'.editor':
'alt-meta-f': 'find-and-replace:show-replace'
'meta-g': 'find-and-replace:find-next'
'meta-G': 'find-and-replace:find-previous'
'meta-e': 'find-and-replace:use-selection-as-find-pattern'
'.find-and-replace':
'meta-enter': 'find-and-replace:replace-all'
'alt-meta-/': 'find-and-replace:toggle-regex-option'
'alt-meta-c': 'find-and-replace:toggle-case-option'
'alt-meta-s': 'find-and-replace:toggle-selection-option'
'.find-and-replace, .project-find, .project-find .results-view':
'escape': 'core:cancel'
'tab': 'find-and-replace:focus-next'
'shift-tab': 'find-and-replace:focus-previous'
'.project-find':
'meta-enter': 'project-find:replace-all'
| 'body':
'meta-F': 'project-find:show'
'meta-f': 'find-and-replace:show'
'alt-meta-f': 'find-and-replace:show-replace'
'.editor':
'meta-g': 'find-and-replace:find-next'
'meta-G': 'find-and-replace:find-previous'
'meta-e': 'find-and-replace:use-selection-as-find-pattern'
'.find-and-replace':
'meta-enter': 'find-and-replace:replace-all'
'alt-meta-/': 'find-and-replace:toggle-regex-option'
'alt-meta-c': 'find-and-replace:toggle-case-option'
'alt-meta-s': 'find-and-replace:toggle-selection-option'
'.find-and-replace, .project-find, .project-find .results-view':
'escape': 'core:cancel'
'tab': 'find-and-replace:focus-next'
'shift-tab': 'find-and-replace:focus-previous'
'.project-find':
'meta-enter': 'project-find:replace-all'
| Make replace keymap work in all contexts | Make replace keymap work in all contexts
| CoffeeScript | mit | harai/find-and-replace,atom/find-and-replace,bmperrea/find-and-replace,trevdor/find-and-replace | coffeescript | ## Code Before:
'body':
'meta-F': 'project-find:show'
'meta-f': 'find-and-replace:show'
'.editor':
'alt-meta-f': 'find-and-replace:show-replace'
'meta-g': 'find-and-replace:find-next'
'meta-G': 'find-and-replace:find-previous'
'meta-e': 'find-and-replace:use-selection-as-find-pattern'
'.find-and-replace':
'meta-enter': 'find-and-replace:replace-all'
'alt-meta-/': 'find-and-replace:toggle-regex-option'
'alt-meta-c': 'find-and-replace:toggle-case-option'
'alt-meta-s': 'find-and-replace:toggle-selection-option'
'.find-and-replace, .project-find, .project-find .results-view':
'escape': 'core:cancel'
'tab': 'find-and-replace:focus-next'
'shift-tab': 'find-and-replace:focus-previous'
'.project-find':
'meta-enter': 'project-find:replace-all'
## Instruction:
Make replace keymap work in all contexts
## Code After:
'body':
'meta-F': 'project-find:show'
'meta-f': 'find-and-replace:show'
'alt-meta-f': 'find-and-replace:show-replace'
'.editor':
'meta-g': 'find-and-replace:find-next'
'meta-G': 'find-and-replace:find-previous'
'meta-e': 'find-and-replace:use-selection-as-find-pattern'
'.find-and-replace':
'meta-enter': 'find-and-replace:replace-all'
'alt-meta-/': 'find-and-replace:toggle-regex-option'
'alt-meta-c': 'find-and-replace:toggle-case-option'
'alt-meta-s': 'find-and-replace:toggle-selection-option'
'.find-and-replace, .project-find, .project-find .results-view':
'escape': 'core:cancel'
'tab': 'find-and-replace:focus-next'
'shift-tab': 'find-and-replace:focus-previous'
'.project-find':
'meta-enter': 'project-find:replace-all'
| 'body':
'meta-F': 'project-find:show'
'meta-f': 'find-and-replace:show'
+ 'alt-meta-f': 'find-and-replace:show-replace'
'.editor':
- 'alt-meta-f': 'find-and-replace:show-replace'
-
'meta-g': 'find-and-replace:find-next'
'meta-G': 'find-and-replace:find-previous'
'meta-e': 'find-and-replace:use-selection-as-find-pattern'
'.find-and-replace':
'meta-enter': 'find-and-replace:replace-all'
'alt-meta-/': 'find-and-replace:toggle-regex-option'
'alt-meta-c': 'find-and-replace:toggle-case-option'
'alt-meta-s': 'find-and-replace:toggle-selection-option'
'.find-and-replace, .project-find, .project-find .results-view':
'escape': 'core:cancel'
'tab': 'find-and-replace:focus-next'
'shift-tab': 'find-and-replace:focus-previous'
'.project-find':
'meta-enter': 'project-find:replace-all' | 3 | 0.12 | 1 | 2 |
a1a6242eb0e4bcb0ae783a572b4406567a91e21b | src/components/HitTable/HitItem.tsx | src/components/HitTable/HitItem.tsx | import * as React from 'react';
import { Hit, Requester } from '../../types';
import { ResourceList } from '@shopify/polaris';
import UnqualifiedCard from './UnqualifiedCard';
import { calculateAllBadges } from '../../utils/badges';
export interface Props {
readonly hit: Hit;
readonly requester?: Requester;
}
const HitCard = ({ hit, requester }: Props) => {
const { requesterName, reward, title } = hit;
const badges = requester ? calculateAllBadges(requester) : [];
const itemProps = {
attributeOne: title,
attributeTwo: requesterName,
attributeThree: reward,
};
return hit.groupId.startsWith('[Error:groupId]-') ? (
<UnqualifiedCard {...hit} />
) : (
<ResourceList.Item
{...itemProps}
badges={badges}
/>
);
};
export default HitCard;
| import * as React from 'react';
import { Hit, Requester } from '../../types';
import { ResourceList } from '@shopify/polaris';
import { calculateAllBadges } from '../../utils/badges';
export interface Props {
readonly hit: Hit;
readonly requester?: Requester;
}
const HitCard = ({ hit, requester }: Props) => {
const { requesterName, reward, title } = hit;
const badges = requester ? calculateAllBadges(requester) : [];
const itemProps = {
attributeOne: title,
attributeTwo: requesterName,
attributeThree: reward,
badges
};
return hit.groupId.startsWith('[Error:groupId]-') ? (
<ResourceList.Item
{...itemProps}
exceptions={[ { status: 'warning', title: 'You are not qualified.' } ]}
/>
) : (
<ResourceList.Item {...itemProps} />
);
};
export default HitCard;
| Remove UnqualifiedCard as a conditional render when groupId is invalid | Remove UnqualifiedCard as a conditional render when groupId is invalid
| TypeScript | mit | Anveio/mturk-engine,Anveio/mturk-engine,Anveio/mturk-engine | typescript | ## Code Before:
import * as React from 'react';
import { Hit, Requester } from '../../types';
import { ResourceList } from '@shopify/polaris';
import UnqualifiedCard from './UnqualifiedCard';
import { calculateAllBadges } from '../../utils/badges';
export interface Props {
readonly hit: Hit;
readonly requester?: Requester;
}
const HitCard = ({ hit, requester }: Props) => {
const { requesterName, reward, title } = hit;
const badges = requester ? calculateAllBadges(requester) : [];
const itemProps = {
attributeOne: title,
attributeTwo: requesterName,
attributeThree: reward,
};
return hit.groupId.startsWith('[Error:groupId]-') ? (
<UnqualifiedCard {...hit} />
) : (
<ResourceList.Item
{...itemProps}
badges={badges}
/>
);
};
export default HitCard;
## Instruction:
Remove UnqualifiedCard as a conditional render when groupId is invalid
## Code After:
import * as React from 'react';
import { Hit, Requester } from '../../types';
import { ResourceList } from '@shopify/polaris';
import { calculateAllBadges } from '../../utils/badges';
export interface Props {
readonly hit: Hit;
readonly requester?: Requester;
}
const HitCard = ({ hit, requester }: Props) => {
const { requesterName, reward, title } = hit;
const badges = requester ? calculateAllBadges(requester) : [];
const itemProps = {
attributeOne: title,
attributeTwo: requesterName,
attributeThree: reward,
badges
};
return hit.groupId.startsWith('[Error:groupId]-') ? (
<ResourceList.Item
{...itemProps}
exceptions={[ { status: 'warning', title: 'You are not qualified.' } ]}
/>
) : (
<ResourceList.Item {...itemProps} />
);
};
export default HitCard;
| import * as React from 'react';
import { Hit, Requester } from '../../types';
import { ResourceList } from '@shopify/polaris';
- import UnqualifiedCard from './UnqualifiedCard';
import { calculateAllBadges } from '../../utils/badges';
export interface Props {
readonly hit: Hit;
readonly requester?: Requester;
}
const HitCard = ({ hit, requester }: Props) => {
const { requesterName, reward, title } = hit;
const badges = requester ? calculateAllBadges(requester) : [];
const itemProps = {
attributeOne: title,
attributeTwo: requesterName,
attributeThree: reward,
+ badges
};
return hit.groupId.startsWith('[Error:groupId]-') ? (
- <UnqualifiedCard {...hit} />
- ) : (
<ResourceList.Item
{...itemProps}
- badges={badges}
+ exceptions={[ { status: 'warning', title: 'You are not qualified.' } ]}
/>
+ ) : (
+ <ResourceList.Item {...itemProps} />
);
};
export default HitCard; | 8 | 0.25 | 4 | 4 |
93c28f7988cb478ca951c470e8c599fb8c73ffcc | unit_tests/CMakeLists.txt | unit_tests/CMakeLists.txt | set (CMAKE_CXX_EXTENSIONS OFF)
# add warnings
if (MSVC)
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W4 /WX /utf-8")
else ()
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pedantic -Wall -Wextra -Wshadow -Werror")
endif ()
# add tests
file (GLOB testsources *.cc)
foreach (testsourcefile ${testsources})
get_filename_component (exename ${testsourcefile} NAME_WE)
add_executable (${exename} ${testsourcefile})
target_link_libraries (${exename} PEGTL)
if (ANDROID_NDK)
add_test (NAME ${exename} WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/unit_tests/run-on-android.sh ${CMAKE_CURRENT_BINARY_DIR}/${exename})
else ()
add_test (NAME ${exename} WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/.. COMMAND ${CMAKE_CURRENT_BINARY_DIR}/${exename})
endif ()
endforeach (testsourcefile)
| set (CMAKE_CXX_EXTENSIONS OFF)
# add warnings
if (MSVC)
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W4 /WX /utf-8")
else ()
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pedantic -Wall -Wextra -Wshadow -Werror")
endif ()
# add tests
file (GLOB testsources *.cc)
foreach (testsourcefile ${testsources})
get_filename_component (exename ${testsourcefile} NAME_WE)
add_executable (${exename} ${testsourcefile})
target_link_libraries (${exename} PEGTL)
if (ANDROID_NDK)
add_test (NAME ${exename} WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/.. COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/run-on-android.sh ${CMAKE_CURRENT_BINARY_DIR}/${exename})
else ()
add_test (NAME ${exename} WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/.. COMMAND ${CMAKE_CURRENT_BINARY_DIR}/${exename})
endif ()
endforeach (testsourcefile)
| Fix paths for Android tests | Fix paths for Android tests
| Text | mit | ColinH/PEGTL,ColinH/PEGTL | text | ## Code Before:
set (CMAKE_CXX_EXTENSIONS OFF)
# add warnings
if (MSVC)
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W4 /WX /utf-8")
else ()
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pedantic -Wall -Wextra -Wshadow -Werror")
endif ()
# add tests
file (GLOB testsources *.cc)
foreach (testsourcefile ${testsources})
get_filename_component (exename ${testsourcefile} NAME_WE)
add_executable (${exename} ${testsourcefile})
target_link_libraries (${exename} PEGTL)
if (ANDROID_NDK)
add_test (NAME ${exename} WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/unit_tests/run-on-android.sh ${CMAKE_CURRENT_BINARY_DIR}/${exename})
else ()
add_test (NAME ${exename} WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/.. COMMAND ${CMAKE_CURRENT_BINARY_DIR}/${exename})
endif ()
endforeach (testsourcefile)
## Instruction:
Fix paths for Android tests
## Code After:
set (CMAKE_CXX_EXTENSIONS OFF)
# add warnings
if (MSVC)
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W4 /WX /utf-8")
else ()
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pedantic -Wall -Wextra -Wshadow -Werror")
endif ()
# add tests
file (GLOB testsources *.cc)
foreach (testsourcefile ${testsources})
get_filename_component (exename ${testsourcefile} NAME_WE)
add_executable (${exename} ${testsourcefile})
target_link_libraries (${exename} PEGTL)
if (ANDROID_NDK)
add_test (NAME ${exename} WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/.. COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/run-on-android.sh ${CMAKE_CURRENT_BINARY_DIR}/${exename})
else ()
add_test (NAME ${exename} WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/.. COMMAND ${CMAKE_CURRENT_BINARY_DIR}/${exename})
endif ()
endforeach (testsourcefile)
| set (CMAKE_CXX_EXTENSIONS OFF)
# add warnings
if (MSVC)
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W4 /WX /utf-8")
else ()
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pedantic -Wall -Wextra -Wshadow -Werror")
endif ()
# add tests
file (GLOB testsources *.cc)
foreach (testsourcefile ${testsources})
get_filename_component (exename ${testsourcefile} NAME_WE)
add_executable (${exename} ${testsourcefile})
target_link_libraries (${exename} PEGTL)
if (ANDROID_NDK)
- add_test (NAME ${exename} WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/unit_tests/run-on-android.sh ${CMAKE_CURRENT_BINARY_DIR}/${exename})
? -----------
+ add_test (NAME ${exename} WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/.. COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/run-on-android.sh ${CMAKE_CURRENT_BINARY_DIR}/${exename})
? +++
else ()
add_test (NAME ${exename} WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/.. COMMAND ${CMAKE_CURRENT_BINARY_DIR}/${exename})
endif ()
endforeach (testsourcefile) | 2 | 0.095238 | 1 | 1 |
5f3c945c56c382ee987098c9036e65ca4718d397 | src/condor_tests/job_dagman_rm-wait.pl | src/condor_tests/job_dagman_rm-wait.pl |
use lib '.';
use CondorTest;
use CondorUtils;
print "$ARGV[0] started\n";
runcmd("touch $ARGV[0].started");
print "$ARGV[0] waiting for DAGMan to exit\n";
$lockfile = "job_dagman_rm.dag.lock";
while (-e $lockfile) {
sleep(1);
}
# Um, actually...
# Dagman doesn't remove us, a previous job in this DAG
# has removed dagman, and the schedd some time later
# will remove us. To fix common race conditions, create
# a less common race condition, and sleep here, hoping
# the schedd will actually remove us
#
sleep(1000);
# We should get condor_rm'ed before we get to here...
runcmd("touch $ARGV[0].finished");
print "$ARGV[0] finished\n";
exit(0);
|
print "$ARGV[0] started\n";
# Touch file, portably, without external command
open(F, ">>$ARGV[0].started");
close(F);
print ">>$ARGV[0].started\n";
print "$ARGV[0] waiting for DAGMan to exit\n";
$lockfile = "job_dagman_rm.dag.lock";
while (-e $lockfile) {
sleep(1);
}
# Um, actually...
# Dagman doesn't remove us, a previous job in this DAG
# has removed dagman, and the schedd some time later
# will remove us. To fix common race conditions, create
# a less common race condition, and sleep here, hoping
# the schedd will actually remove us
#
sleep(1000);
# We should get condor_rm'ed before we get to here...
open(G, ">>$ARGV[0].finished");
close(G);
print "$ARGV[0] finished\n";
exit(0);
| Fix job_dagman_rm test by changing job exe to not depend on CondorTest.pm, as it installs signal handlers HTCONDOR-536 | Fix job_dagman_rm test by changing job exe to not depend
on CondorTest.pm, as it installs signal handlers HTCONDOR-536
| Perl | apache-2.0 | htcondor/htcondor,htcondor/htcondor,htcondor/htcondor,htcondor/htcondor,htcondor/htcondor,htcondor/htcondor,htcondor/htcondor,htcondor/htcondor | perl | ## Code Before:
use lib '.';
use CondorTest;
use CondorUtils;
print "$ARGV[0] started\n";
runcmd("touch $ARGV[0].started");
print "$ARGV[0] waiting for DAGMan to exit\n";
$lockfile = "job_dagman_rm.dag.lock";
while (-e $lockfile) {
sleep(1);
}
# Um, actually...
# Dagman doesn't remove us, a previous job in this DAG
# has removed dagman, and the schedd some time later
# will remove us. To fix common race conditions, create
# a less common race condition, and sleep here, hoping
# the schedd will actually remove us
#
sleep(1000);
# We should get condor_rm'ed before we get to here...
runcmd("touch $ARGV[0].finished");
print "$ARGV[0] finished\n";
exit(0);
## Instruction:
Fix job_dagman_rm test by changing job exe to not depend
on CondorTest.pm, as it installs signal handlers HTCONDOR-536
## Code After:
print "$ARGV[0] started\n";
# Touch file, portably, without external command
open(F, ">>$ARGV[0].started");
close(F);
print ">>$ARGV[0].started\n";
print "$ARGV[0] waiting for DAGMan to exit\n";
$lockfile = "job_dagman_rm.dag.lock";
while (-e $lockfile) {
sleep(1);
}
# Um, actually...
# Dagman doesn't remove us, a previous job in this DAG
# has removed dagman, and the schedd some time later
# will remove us. To fix common race conditions, create
# a less common race condition, and sleep here, hoping
# the schedd will actually remove us
#
sleep(1000);
# We should get condor_rm'ed before we get to here...
open(G, ">>$ARGV[0].finished");
close(G);
print "$ARGV[0] finished\n";
exit(0);
| -
- use lib '.';
- use CondorTest;
- use CondorUtils;
print "$ARGV[0] started\n";
- runcmd("touch $ARGV[0].started");
+
+ # Touch file, portably, without external command
+ open(F, ">>$ARGV[0].started");
+ close(F);
+
+ print ">>$ARGV[0].started\n";
print "$ARGV[0] waiting for DAGMan to exit\n";
$lockfile = "job_dagman_rm.dag.lock";
while (-e $lockfile) {
sleep(1);
}
# Um, actually...
# Dagman doesn't remove us, a previous job in this DAG
# has removed dagman, and the schedd some time later
# will remove us. To fix common race conditions, create
# a less common race condition, and sleep here, hoping
# the schedd will actually remove us
#
sleep(1000);
# We should get condor_rm'ed before we get to here...
- runcmd("touch $ARGV[0].finished");
+ open(G, ">>$ARGV[0].finished");
+ close(G);
print "$ARGV[0] finished\n";
exit(0); | 14 | 0.466667 | 8 | 6 |
22f6567fbe5b8dbf12b309886f8824b06f373920 | app/models/extsubmission.js | app/models/extsubmission.js | import Ember from 'ember';
import DS from 'ember-data';
import Score from 'code-test-bot-app/models/score';
import Submission from 'code-test-bot-app/models/submission';
export default Submission.extend({
});
| import Submission from 'code-test-bot-app/models/submission';
export default Submission.extend({
});
| Remove unused references from external submission model | Remove unused references from external submission model
| JavaScript | mit | cyrusinnovation/CodeTestBotApp,cyrusinnovation/CodeTestBotApp,cyrusinnovation/CodeTestBotApp | javascript | ## Code Before:
import Ember from 'ember';
import DS from 'ember-data';
import Score from 'code-test-bot-app/models/score';
import Submission from 'code-test-bot-app/models/submission';
export default Submission.extend({
});
## Instruction:
Remove unused references from external submission model
## Code After:
import Submission from 'code-test-bot-app/models/submission';
export default Submission.extend({
});
| - import Ember from 'ember';
- import DS from 'ember-data';
- import Score from 'code-test-bot-app/models/score';
import Submission from 'code-test-bot-app/models/submission';
export default Submission.extend({
}); | 3 | 0.375 | 0 | 3 |
9a9a2b032f5f0180d3a2c229a7d0b632479b1838 | Casks/tg-pro.rb | Casks/tg-pro.rb | cask :v1 => 'tg-pro' do
version '2.8.7'
sha256 '32b622cec40f4cfe0cd5455dd110696b8284524aadd92c552a769c130bbc88e7'
url "http://www.tunabellysoftware.com/resources/TGPro_#{version.gsub('.','_')}.zip"
name 'TG Pro'
appcast 'http://tunabellysoftware.com/resources/sparkle/tgpro/profileInfo.php',
:sha256 => 'e276cc14d86471bc7c416faefc7e8bcffe94da4458c87c71c2f14287414df5fa'
homepage 'http://www.tunabellysoftware.com/tgpro/'
license :commercial
app 'TG Pro.app'
end
| cask :v1 => 'tg-pro' do
version '2.8.8'
sha256 'dcb4221d4b72960c306e248a0be947107ab3622b0c38570684b2f12c8ef87a44'
url "http://www.tunabellysoftware.com/resources/TGPro_#{version.gsub('.','_')}.zip"
name 'TG Pro'
appcast 'http://tunabellysoftware.com/resources/sparkle/tgpro/profileInfo.php',
:sha256 => 'ae55143d14a7a75093439c723db19e8672952efff4e38de0e0682a5037c455de'
homepage 'http://www.tunabellysoftware.com/tgpro/'
license :commercial
app 'TG Pro.app'
end
| Update TG Pro to 2.8.8 | Update TG Pro to 2.8.8
| Ruby | bsd-2-clause | gilesdring/homebrew-cask,mrmachine/homebrew-cask,lukasbestle/homebrew-cask,sanchezm/homebrew-cask,gurghet/homebrew-cask,morganestes/homebrew-cask,toonetown/homebrew-cask,skatsuta/homebrew-cask,sjackman/homebrew-cask,cobyism/homebrew-cask,AnastasiaSulyagina/homebrew-cask,n8henrie/homebrew-cask,winkelsdorf/homebrew-cask,neverfox/homebrew-cask,elnappo/homebrew-cask,tmoreira2020/homebrew,vigosan/homebrew-cask,neverfox/homebrew-cask,Saklad5/homebrew-cask,claui/homebrew-cask,hanxue/caskroom,perfide/homebrew-cask,dwihn0r/homebrew-cask,jawshooah/homebrew-cask,samshadwell/homebrew-cask,amatos/homebrew-cask,afh/homebrew-cask,nshemonsky/homebrew-cask,miccal/homebrew-cask,MerelyAPseudonym/homebrew-cask,nathanielvarona/homebrew-cask,jasmas/homebrew-cask,athrunsun/homebrew-cask,mattrobenolt/homebrew-cask,timsutton/homebrew-cask,helloIAmPau/homebrew-cask,moogar0880/homebrew-cask,lantrix/homebrew-cask,jeanregisser/homebrew-cask,toonetown/homebrew-cask,renard/homebrew-cask,tsparber/homebrew-cask,forevergenin/homebrew-cask,mauricerkelly/homebrew-cask,stigkj/homebrew-caskroom-cask,gyndav/homebrew-cask,xcezx/homebrew-cask,lukeadams/homebrew-cask,giannitm/homebrew-cask,kiliankoe/homebrew-cask,stonehippo/homebrew-cask,jconley/homebrew-cask,chadcatlett/caskroom-homebrew-cask,mauricerkelly/homebrew-cask,singingwolfboy/homebrew-cask,moogar0880/homebrew-cask,m3nu/homebrew-cask,tjnycum/homebrew-cask,JacopKane/homebrew-cask,kpearson/homebrew-cask,antogg/homebrew-cask,julionc/homebrew-cask,mahori/homebrew-cask,Ketouem/homebrew-cask,howie/homebrew-cask,13k/homebrew-cask,corbt/homebrew-cask,seanorama/homebrew-cask,cblecker/homebrew-cask,shonjir/homebrew-cask,joshka/homebrew-cask,mahori/homebrew-cask,kesara/homebrew-cask,leipert/homebrew-cask,slack4u/homebrew-cask,jiashuw/homebrew-cask,cprecioso/homebrew-cask,mazehall/homebrew-cask,timsutton/homebrew-cask,jacobbednarz/homebrew-cask,shorshe/homebrew-cask,13k/homebrew-cask,nathansgreen/homebrew-cask,a1russell/homebrew-cask,mgryszko/homebrew-cask,esebastian/homebrew-cask,mgryszko/homebrew-cask,bdhess/homebrew-cask,colindunn/homebrew-cask,mindriot101/homebrew-cask,scottsuch/homebrew-cask,artdevjs/homebrew-cask,singingwolfboy/homebrew-cask,JikkuJose/homebrew-cask,kingthorin/homebrew-cask,franklouwers/homebrew-cask,mathbunnyru/homebrew-cask,koenrh/homebrew-cask,retrography/homebrew-cask,lumaxis/homebrew-cask,forevergenin/homebrew-cask,mlocher/homebrew-cask,opsdev-ws/homebrew-cask,n0ts/homebrew-cask,lucasmezencio/homebrew-cask,tolbkni/homebrew-cask,miguelfrde/homebrew-cask,lifepillar/homebrew-cask,johnjelinek/homebrew-cask,FinalDes/homebrew-cask,shorshe/homebrew-cask,vigosan/homebrew-cask,samdoran/homebrew-cask,hovancik/homebrew-cask,adrianchia/homebrew-cask,troyxmccall/homebrew-cask,jangalinski/homebrew-cask,chuanxd/homebrew-cask,Dremora/homebrew-cask,sosedoff/homebrew-cask,paour/homebrew-cask,sanyer/homebrew-cask,jedahan/homebrew-cask,morganestes/homebrew-cask,jonathanwiesel/homebrew-cask,reitermarkus/homebrew-cask,gabrielizaias/homebrew-cask,kingthorin/homebrew-cask,bosr/homebrew-cask,m3nu/homebrew-cask,wickedsp1d3r/homebrew-cask,casidiablo/homebrew-cask,paour/homebrew-cask,coeligena/homebrew-customized,gmkey/homebrew-cask,ywfwj2008/homebrew-cask,KosherBacon/homebrew-cask,goxberry/homebrew-cask,andyli/homebrew-cask,scribblemaniac/homebrew-cask,moimikey/homebrew-cask,tjt263/homebrew-cask,sjackman/homebrew-cask,cfillion/homebrew-cask,puffdad/homebrew-cask,syscrusher/homebrew-cask,neverfox/homebrew-cask,Ketouem/homebrew-cask,miku/homebrew-cask,feigaochn/homebrew-cask,victorpopkov/homebrew-cask,ksato9700/homebrew-cask,BenjaminHCCarr/homebrew-cask,hovancik/homebrew-cask,Cottser/homebrew-cask,tjnycum/homebrew-cask,mathbunnyru/homebrew-cask,reelsense/homebrew-cask,fanquake/homebrew-cask,arronmabrey/homebrew-cask,kongslund/homebrew-cask,troyxmccall/homebrew-cask,tyage/homebrew-cask,anbotero/homebrew-cask,anbotero/homebrew-cask,thehunmonkgroup/homebrew-cask,hanxue/caskroom,ninjahoahong/homebrew-cask,tmoreira2020/homebrew,nrlquaker/homebrew-cask,kronicd/homebrew-cask,yuhki50/homebrew-cask,phpwutz/homebrew-cask,nightscape/homebrew-cask,SentinelWarren/homebrew-cask,exherb/homebrew-cask,patresi/homebrew-cask,Bombenleger/homebrew-cask,okket/homebrew-cask,johndbritton/homebrew-cask,buo/homebrew-cask,gyndav/homebrew-cask,sgnh/homebrew-cask,joshka/homebrew-cask,onlynone/homebrew-cask,BenjaminHCCarr/homebrew-cask,kiliankoe/homebrew-cask,jmeridth/homebrew-cask,stephenwade/homebrew-cask,chuanxd/homebrew-cask,tangestani/homebrew-cask,blainesch/homebrew-cask,cprecioso/homebrew-cask,joschi/homebrew-cask,samdoran/homebrew-cask,guerrero/homebrew-cask,Saklad5/homebrew-cask,jellyfishcoder/homebrew-cask,colindean/homebrew-cask,jonathanwiesel/homebrew-cask,goxberry/homebrew-cask,KosherBacon/homebrew-cask,yutarody/homebrew-cask,squid314/homebrew-cask,jgarber623/homebrew-cask,diguage/homebrew-cask,pkq/homebrew-cask,Dremora/homebrew-cask,optikfluffel/homebrew-cask,jedahan/homebrew-cask,samnung/homebrew-cask,jalaziz/homebrew-cask,mingzhi22/homebrew-cask,ldong/homebrew-cask,lantrix/homebrew-cask,muan/homebrew-cask,Ephemera/homebrew-cask,albertico/homebrew-cask,rickychilcott/homebrew-cask,jbeagley52/homebrew-cask,mwean/homebrew-cask,mhubig/homebrew-cask,chadcatlett/caskroom-homebrew-cask,vin047/homebrew-cask,cobyism/homebrew-cask,a1russell/homebrew-cask,gibsjose/homebrew-cask,0xadada/homebrew-cask,ddm/homebrew-cask,xtian/homebrew-cask,adrianchia/homebrew-cask,riyad/homebrew-cask,nrlquaker/homebrew-cask,seanzxx/homebrew-cask,alexg0/homebrew-cask,danielbayley/homebrew-cask,dictcp/homebrew-cask,thehunmonkgroup/homebrew-cask,cliffcotino/homebrew-cask,mishari/homebrew-cask,scottsuch/homebrew-cask,kingthorin/homebrew-cask,samshadwell/homebrew-cask,lucasmezencio/homebrew-cask,esebastian/homebrew-cask,mathbunnyru/homebrew-cask,jaredsampson/homebrew-cask,sosedoff/homebrew-cask,yurikoles/homebrew-cask,mwean/homebrew-cask,markthetech/homebrew-cask,lcasey001/homebrew-cask,claui/homebrew-cask,mattrobenolt/homebrew-cask,mjgardner/homebrew-cask,Keloran/homebrew-cask,xyb/homebrew-cask,kkdd/homebrew-cask,reitermarkus/homebrew-cask,decrement/homebrew-cask,klane/homebrew-cask,faun/homebrew-cask,yutarody/homebrew-cask,psibre/homebrew-cask,alexg0/homebrew-cask,aguynamedryan/homebrew-cask,mingzhi22/homebrew-cask,nathancahill/homebrew-cask,thii/homebrew-cask,Fedalto/homebrew-cask,FredLackeyOfficial/homebrew-cask,larseggert/homebrew-cask,xyb/homebrew-cask,victorpopkov/homebrew-cask,julionc/homebrew-cask,miku/homebrew-cask,gerrypower/homebrew-cask,ebraminio/homebrew-cask,n0ts/homebrew-cask,ptb/homebrew-cask,rajiv/homebrew-cask,Keloran/homebrew-cask,tedbundyjr/homebrew-cask,blogabe/homebrew-cask,AnastasiaSulyagina/homebrew-cask,yuhki50/homebrew-cask,JosephViolago/homebrew-cask,tarwich/homebrew-cask,brianshumate/homebrew-cask,6uclz1/homebrew-cask,jiashuw/homebrew-cask,greg5green/homebrew-cask,afh/homebrew-cask,mikem/homebrew-cask,imgarylai/homebrew-cask,pkq/homebrew-cask,hyuna917/homebrew-cask,Fedalto/homebrew-cask,jhowtan/homebrew-cask,RJHsiao/homebrew-cask,thii/homebrew-cask,imgarylai/homebrew-cask,flaviocamilo/homebrew-cask,Amorymeltzer/homebrew-cask,williamboman/homebrew-cask,dictcp/homebrew-cask,tan9/homebrew-cask,gilesdring/homebrew-cask,mishari/homebrew-cask,shoichiaizawa/homebrew-cask,rogeriopradoj/homebrew-cask,malob/homebrew-cask,cedwardsmedia/homebrew-cask,caskroom/homebrew-cask,jawshooah/homebrew-cask,josa42/homebrew-cask,My2ndAngelic/homebrew-cask,wastrachan/homebrew-cask,zmwangx/homebrew-cask,inz/homebrew-cask,bric3/homebrew-cask,tedbundyjr/homebrew-cask,gurghet/homebrew-cask,otaran/homebrew-cask,julionc/homebrew-cask,wickles/homebrew-cask,bosr/homebrew-cask,tarwich/homebrew-cask,elyscape/homebrew-cask,wKovacs64/homebrew-cask,ksato9700/homebrew-cask,gmkey/homebrew-cask,nshemonsky/homebrew-cask,blainesch/homebrew-cask,dustinblackman/homebrew-cask,markhuber/homebrew-cask,schneidmaster/homebrew-cask,renaudguerin/homebrew-cask,ianyh/homebrew-cask,reitermarkus/homebrew-cask,cfillion/homebrew-cask,ddm/homebrew-cask,shonjir/homebrew-cask,daften/homebrew-cask,esebastian/homebrew-cask,nightscape/homebrew-cask,antogg/homebrew-cask,adrianchia/homebrew-cask,fharbe/homebrew-cask,helloIAmPau/homebrew-cask,chrisfinazzo/homebrew-cask,yurikoles/homebrew-cask,zerrot/homebrew-cask,Labutin/homebrew-cask,andrewdisley/homebrew-cask,inta/homebrew-cask,crzrcn/homebrew-cask,antogg/homebrew-cask,tangestani/homebrew-cask,jeroenj/homebrew-cask,RJHsiao/homebrew-cask,danielbayley/homebrew-cask,jmeridth/homebrew-cask,Bombenleger/homebrew-cask,dwihn0r/homebrew-cask,squid314/homebrew-cask,lukasbestle/homebrew-cask,tsparber/homebrew-cask,moimikey/homebrew-cask,kassi/homebrew-cask,nathancahill/homebrew-cask,jeroenseegers/homebrew-cask,MichaelPei/homebrew-cask,sgnh/homebrew-cask,sebcode/homebrew-cask,tangestani/homebrew-cask,rogeriopradoj/homebrew-cask,franklouwers/homebrew-cask,markhuber/homebrew-cask,diguage/homebrew-cask,elnappo/homebrew-cask,sebcode/homebrew-cask,xight/homebrew-cask,jconley/homebrew-cask,MircoT/homebrew-cask,MoOx/homebrew-cask,danielbayley/homebrew-cask,pacav69/homebrew-cask,puffdad/homebrew-cask,nathansgreen/homebrew-cask,codeurge/homebrew-cask,hyuna917/homebrew-cask,seanorama/homebrew-cask,williamboman/homebrew-cask,haha1903/homebrew-cask,reelsense/homebrew-cask,jbeagley52/homebrew-cask,jppelteret/homebrew-cask,howie/homebrew-cask,johndbritton/homebrew-cask,doits/homebrew-cask,zmwangx/homebrew-cask,MichaelPei/homebrew-cask,phpwutz/homebrew-cask,rogeriopradoj/homebrew-cask,andrewdisley/homebrew-cask,joshka/homebrew-cask,0rax/homebrew-cask,deanmorin/homebrew-cask,psibre/homebrew-cask,sscotth/homebrew-cask,cliffcotino/homebrew-cask,albertico/homebrew-cask,sanyer/homebrew-cask,fanquake/homebrew-cask,FranklinChen/homebrew-cask,JacopKane/homebrew-cask,jasmas/homebrew-cask,theoriginalgri/homebrew-cask,deiga/homebrew-cask,santoshsahoo/homebrew-cask,ebraminio/homebrew-cask,kronicd/homebrew-cask,corbt/homebrew-cask,leipert/homebrew-cask,sohtsuka/homebrew-cask,devmynd/homebrew-cask,deanmorin/homebrew-cask,jalaziz/homebrew-cask,boecko/homebrew-cask,kteru/homebrew-cask,flaviocamilo/homebrew-cask,mjgardner/homebrew-cask,hakamadare/homebrew-cask,jellyfishcoder/homebrew-cask,axodys/homebrew-cask,devmynd/homebrew-cask,jaredsampson/homebrew-cask,pkq/homebrew-cask,andyli/homebrew-cask,xyb/homebrew-cask,linc01n/homebrew-cask,scottsuch/homebrew-cask,amatos/homebrew-cask,cobyism/homebrew-cask,robertgzr/homebrew-cask,axodys/homebrew-cask,MerelyAPseudonym/homebrew-cask,mazehall/homebrew-cask,mjdescy/homebrew-cask,doits/homebrew-cask,mikem/homebrew-cask,hellosky806/homebrew-cask,elyscape/homebrew-cask,tedski/homebrew-cask,ericbn/homebrew-cask,maxnordlund/homebrew-cask,vitorgalvao/homebrew-cask,zerrot/homebrew-cask,skatsuta/homebrew-cask,larseggert/homebrew-cask,wmorin/homebrew-cask,bcomnes/homebrew-cask,perfide/homebrew-cask,MoOx/homebrew-cask,coeligena/homebrew-customized,kesara/homebrew-cask,exherb/homebrew-cask,ksylvan/homebrew-cask,lumaxis/homebrew-cask,renard/homebrew-cask,scribblemaniac/homebrew-cask,JosephViolago/homebrew-cask,malob/homebrew-cask,hakamadare/homebrew-cask,theoriginalgri/homebrew-cask,okket/homebrew-cask,sscotth/homebrew-cask,lifepillar/homebrew-cask,stigkj/homebrew-caskroom-cask,jalaziz/homebrew-cask,singingwolfboy/homebrew-cask,y00rb/homebrew-cask,bcomnes/homebrew-cask,asins/homebrew-cask,cedwardsmedia/homebrew-cask,dcondrey/homebrew-cask,Ngrd/homebrew-cask,hellosky806/homebrew-cask,alebcay/homebrew-cask,miguelfrde/homebrew-cask,SentinelWarren/homebrew-cask,buo/homebrew-cask,ninjahoahong/homebrew-cask,gibsjose/homebrew-cask,seanzxx/homebrew-cask,y00rb/homebrew-cask,josa42/homebrew-cask,asbachb/homebrew-cask,yumitsu/homebrew-cask,bric3/homebrew-cask,napaxton/homebrew-cask,shonjir/homebrew-cask,dcondrey/homebrew-cask,mchlrmrz/homebrew-cask,dwkns/homebrew-cask,greg5green/homebrew-cask,Gasol/homebrew-cask,feigaochn/homebrew-cask,blogabe/homebrew-cask,kamilboratynski/homebrew-cask,winkelsdorf/homebrew-cask,stephenwade/homebrew-cask,ericbn/homebrew-cask,dwkns/homebrew-cask,Gasol/homebrew-cask,jeanregisser/homebrew-cask,jangalinski/homebrew-cask,deiga/homebrew-cask,stonehippo/homebrew-cask,Ephemera/homebrew-cask,slack4u/homebrew-cask,wickles/homebrew-cask,mjgardner/homebrew-cask,gyndav/homebrew-cask,codeurge/homebrew-cask,dictcp/homebrew-cask,markthetech/homebrew-cask,michelegera/homebrew-cask,mattrobenolt/homebrew-cask,a1russell/homebrew-cask,retbrown/homebrew-cask,sscotth/homebrew-cask,jeroenj/homebrew-cask,yumitsu/homebrew-cask,colindunn/homebrew-cask,otaran/homebrew-cask,fharbe/homebrew-cask,haha1903/homebrew-cask,JosephViolago/homebrew-cask,tedski/homebrew-cask,caskroom/homebrew-cask,ksylvan/homebrew-cask,tolbkni/homebrew-cask,robertgzr/homebrew-cask,tyage/homebrew-cask,diogodamiani/homebrew-cask,gerrypower/homebrew-cask,stevehedrick/homebrew-cask,andrewdisley/homebrew-cask,mrmachine/homebrew-cask,opsdev-ws/homebrew-cask,wmorin/homebrew-cask,Labutin/homebrew-cask,josa42/homebrew-cask,mlocher/homebrew-cask,0rax/homebrew-cask,timsutton/homebrew-cask,brianshumate/homebrew-cask,bdhess/homebrew-cask,jppelteret/homebrew-cask,wKovacs64/homebrew-cask,guerrero/homebrew-cask,farmerchris/homebrew-cask,shoichiaizawa/homebrew-cask,renaudguerin/homebrew-cask,Amorymeltzer/homebrew-cask,kpearson/homebrew-cask,inz/homebrew-cask,Ephemera/homebrew-cask,claui/homebrew-cask,lcasey001/homebrew-cask,coeligena/homebrew-customized,dvdoliveira/homebrew-cask,hristozov/homebrew-cask,paour/homebrew-cask,kkdd/homebrew-cask,nathanielvarona/homebrew-cask,sanyer/homebrew-cask,johnjelinek/homebrew-cask,wickedsp1d3r/homebrew-cask,tjnycum/homebrew-cask,6uclz1/homebrew-cask,xtian/homebrew-cask,xight/homebrew-cask,pacav69/homebrew-cask,xcezx/homebrew-cask,tjt263/homebrew-cask,stephenwade/homebrew-cask,janlugt/homebrew-cask,shoichiaizawa/homebrew-cask,imgarylai/homebrew-cask,ldong/homebrew-cask,yutarody/homebrew-cask,stevehedrick/homebrew-cask,alebcay/homebrew-cask,optikfluffel/homebrew-cask,xakraz/homebrew-cask,kamilboratynski/homebrew-cask,santoshsahoo/homebrew-cask,Cottser/homebrew-cask,asins/homebrew-cask,aguynamedryan/homebrew-cask,usami-k/homebrew-cask,decrement/homebrew-cask,hristozov/homebrew-cask,mhubig/homebrew-cask,xakraz/homebrew-cask,lukeadams/homebrew-cask,diogodamiani/homebrew-cask,vitorgalvao/homebrew-cask,miccal/homebrew-cask,jpmat296/homebrew-cask,linc01n/homebrew-cask,mchlrmrz/homebrew-cask,FredLackeyOfficial/homebrew-cask,jeroenseegers/homebrew-cask,cblecker/homebrew-cask,michelegera/homebrew-cask,alexg0/homebrew-cask,hanxue/caskroom,farmerchris/homebrew-cask,MircoT/homebrew-cask,sohtsuka/homebrew-cask,FinalDes/homebrew-cask,nathanielvarona/homebrew-cask,ericbn/homebrew-cask,koenrh/homebrew-cask,jgarber623/homebrew-cask,samnung/homebrew-cask,rajiv/homebrew-cask,arronmabrey/homebrew-cask,mjdescy/homebrew-cask,schneidmaster/homebrew-cask,muan/homebrew-cask,jhowtan/homebrew-cask,athrunsun/homebrew-cask,faun/homebrew-cask,malford/homebrew-cask,rickychilcott/homebrew-cask,kTitan/homebrew-cask,My2ndAngelic/homebrew-cask,thomanq/homebrew-cask,chrisfinazzo/homebrew-cask,colindean/homebrew-cask,n8henrie/homebrew-cask,dustinblackman/homebrew-cask,casidiablo/homebrew-cask,miccal/homebrew-cask,kongslund/homebrew-cask,ianyh/homebrew-cask,scribblemaniac/homebrew-cask,kassi/homebrew-cask,daften/homebrew-cask,malob/homebrew-cask,alebcay/homebrew-cask,wastrachan/homebrew-cask,kTitan/homebrew-cask,CameronGarrett/homebrew-cask,tan9/homebrew-cask,inta/homebrew-cask,optikfluffel/homebrew-cask,cblecker/homebrew-cask,usami-k/homebrew-cask,dvdoliveira/homebrew-cask,jpmat296/homebrew-cask,rajiv/homebrew-cask,maxnordlund/homebrew-cask,uetchy/homebrew-cask,ywfwj2008/homebrew-cask,wmorin/homebrew-cask,chrisfinazzo/homebrew-cask,deiga/homebrew-cask,asbachb/homebrew-cask,riyad/homebrew-cask,crzrcn/homebrew-cask,Ibuprofen/homebrew-cask,Ngrd/homebrew-cask,klane/homebrew-cask,uetchy/homebrew-cask,boecko/homebrew-cask,gabrielizaias/homebrew-cask,joschi/homebrew-cask,BenjaminHCCarr/homebrew-cask,moimikey/homebrew-cask,yurikoles/homebrew-cask,JikkuJose/homebrew-cask,janlugt/homebrew-cask,0xadada/homebrew-cask,Ibuprofen/homebrew-cask,xight/homebrew-cask,CameronGarrett/homebrew-cask,stonehippo/homebrew-cask,jacobbednarz/homebrew-cask,giannitm/homebrew-cask,napaxton/homebrew-cask,onlynone/homebrew-cask,winkelsdorf/homebrew-cask,kesara/homebrew-cask,vin047/homebrew-cask,JacopKane/homebrew-cask,thomanq/homebrew-cask,malford/homebrew-cask,sanchezm/homebrew-cask,FranklinChen/homebrew-cask,mindriot101/homebrew-cask,ptb/homebrew-cask,joschi/homebrew-cask,kteru/homebrew-cask,mahori/homebrew-cask,patresi/homebrew-cask,artdevjs/homebrew-cask,Amorymeltzer/homebrew-cask,mchlrmrz/homebrew-cask,retbrown/homebrew-cask,uetchy/homebrew-cask,bric3/homebrew-cask,jgarber623/homebrew-cask,m3nu/homebrew-cask,nrlquaker/homebrew-cask,blogabe/homebrew-cask,syscrusher/homebrew-cask,retrography/homebrew-cask | ruby | ## Code Before:
cask :v1 => 'tg-pro' do
version '2.8.7'
sha256 '32b622cec40f4cfe0cd5455dd110696b8284524aadd92c552a769c130bbc88e7'
url "http://www.tunabellysoftware.com/resources/TGPro_#{version.gsub('.','_')}.zip"
name 'TG Pro'
appcast 'http://tunabellysoftware.com/resources/sparkle/tgpro/profileInfo.php',
:sha256 => 'e276cc14d86471bc7c416faefc7e8bcffe94da4458c87c71c2f14287414df5fa'
homepage 'http://www.tunabellysoftware.com/tgpro/'
license :commercial
app 'TG Pro.app'
end
## Instruction:
Update TG Pro to 2.8.8
## Code After:
cask :v1 => 'tg-pro' do
version '2.8.8'
sha256 'dcb4221d4b72960c306e248a0be947107ab3622b0c38570684b2f12c8ef87a44'
url "http://www.tunabellysoftware.com/resources/TGPro_#{version.gsub('.','_')}.zip"
name 'TG Pro'
appcast 'http://tunabellysoftware.com/resources/sparkle/tgpro/profileInfo.php',
:sha256 => 'ae55143d14a7a75093439c723db19e8672952efff4e38de0e0682a5037c455de'
homepage 'http://www.tunabellysoftware.com/tgpro/'
license :commercial
app 'TG Pro.app'
end
| cask :v1 => 'tg-pro' do
- version '2.8.7'
? ^
+ version '2.8.8'
? ^
- sha256 '32b622cec40f4cfe0cd5455dd110696b8284524aadd92c552a769c130bbc88e7'
+ sha256 'dcb4221d4b72960c306e248a0be947107ab3622b0c38570684b2f12c8ef87a44'
url "http://www.tunabellysoftware.com/resources/TGPro_#{version.gsub('.','_')}.zip"
name 'TG Pro'
appcast 'http://tunabellysoftware.com/resources/sparkle/tgpro/profileInfo.php',
- :sha256 => 'e276cc14d86471bc7c416faefc7e8bcffe94da4458c87c71c2f14287414df5fa'
+ :sha256 => 'ae55143d14a7a75093439c723db19e8672952efff4e38de0e0682a5037c455de'
homepage 'http://www.tunabellysoftware.com/tgpro/'
license :commercial
app 'TG Pro.app'
end | 6 | 0.461538 | 3 | 3 |
dbf16a081b13bb7056f9beb26541e6ab772a2beb | src/main/java/org/cafebabepy/runtime/module/builtins/PyObjectType.java | src/main/java/org/cafebabepy/runtime/module/builtins/PyObjectType.java | package org.cafebabepy.runtime.module.builtins;
import org.cafebabepy.annotation.DefineCafeBabePyType;
import org.cafebabepy.runtime.Python;
import org.cafebabepy.runtime.module.AbstractCafeBabePyType;
/**
* Created by yotchang4s on 2017/05/13.
*/
@DefineCafeBabePyType(name = "builtins.object", parent = {})
public class PyObjectType extends AbstractCafeBabePyType {
public PyObjectType(Python runtime) {
super(runtime);
}
}
| package org.cafebabepy.runtime.module.builtins;
import org.cafebabepy.annotation.DefineCafeBabePyType;
import org.cafebabepy.runtime.Python;
import org.cafebabepy.runtime.module.AbstractCafeBabePyType;
/**
* Created by yotchang4s on 2017/05/13.
*/
@DefineCafeBabePyType(name = "builtins.object")
public class PyObjectType extends AbstractCafeBabePyType {
public PyObjectType(Python runtime) {
super(runtime);
}
}
| Fix object parent is object | Fix object parent is object
| Java | bsd-3-clause | yotchang4s/cafebabepy | java | ## Code Before:
package org.cafebabepy.runtime.module.builtins;
import org.cafebabepy.annotation.DefineCafeBabePyType;
import org.cafebabepy.runtime.Python;
import org.cafebabepy.runtime.module.AbstractCafeBabePyType;
/**
* Created by yotchang4s on 2017/05/13.
*/
@DefineCafeBabePyType(name = "builtins.object", parent = {})
public class PyObjectType extends AbstractCafeBabePyType {
public PyObjectType(Python runtime) {
super(runtime);
}
}
## Instruction:
Fix object parent is object
## Code After:
package org.cafebabepy.runtime.module.builtins;
import org.cafebabepy.annotation.DefineCafeBabePyType;
import org.cafebabepy.runtime.Python;
import org.cafebabepy.runtime.module.AbstractCafeBabePyType;
/**
* Created by yotchang4s on 2017/05/13.
*/
@DefineCafeBabePyType(name = "builtins.object")
public class PyObjectType extends AbstractCafeBabePyType {
public PyObjectType(Python runtime) {
super(runtime);
}
}
| package org.cafebabepy.runtime.module.builtins;
import org.cafebabepy.annotation.DefineCafeBabePyType;
import org.cafebabepy.runtime.Python;
import org.cafebabepy.runtime.module.AbstractCafeBabePyType;
/**
* Created by yotchang4s on 2017/05/13.
*/
- @DefineCafeBabePyType(name = "builtins.object", parent = {})
? -------------
+ @DefineCafeBabePyType(name = "builtins.object")
public class PyObjectType extends AbstractCafeBabePyType {
public PyObjectType(Python runtime) {
super(runtime);
}
} | 2 | 0.125 | 1 | 1 |
f7c3a4b9a740863bc4837584e15e77f85bee9fe9 | metadata/com.alexkang.loopboard.txt | metadata/com.alexkang.loopboard.txt | Categories:Multimedia
License:Apache2
Web Site:
Source Code:https://github.com/AlexKang/loopboard
Issue Tracker:https://github.com/AlexKang/loopboard/issues
Auto Name:LoopBoard
Summary:Record, play and loop sounds
Description:
Dynamic sound board. Record sound clips and play them back or loop them.
Currently, the application can record sounds through the microphone (or
use sounds from internal storage!) and play them back through a newly
created button. Each button has the option to re-record and loop playback.
.
Repo Type:git
Repo:https://github.com/AlexKang/loopboard
Build:1.4,5
commit=f4d87ee028feb23f52141a9b8d9d29d9b2682377
rm=libs/*,app/build/
prebuild=sed -i -e '/buildTypes/irepositories { jcenter() }\ndependencies { compile "com.android.support:support-v4:21.0.+" }' app/build.gradle
Auto Update Mode:None
Update Check Mode:RepoManifest
Current Version:1.8
Current Version Code:13
| Categories:Multimedia
License:Apache2
Web Site:
Source Code:https://github.com/AlexKang/loopboard
Issue Tracker:https://github.com/AlexKang/loopboard/issues
Auto Name:LoopBoard
Summary:Record, play and loop sounds
Description:
Dynamic sound board. Record sound clips and play them back or loop them.
Currently, the application can record sounds through the microphone (or
use sounds from internal storage!) and play them back through a newly
created button. Each button has the option to re-record and loop playback.
.
Repo Type:git
Repo:https://github.com/AlexKang/loopboard
Build:1.4,5
commit=f4d87ee028feb23f52141a9b8d9d29d9b2682377
rm=libs/*,app/build/
prebuild=sed -i -e '/buildTypes/irepositories { jcenter() }\ndependencies { compile "com.android.support:support-v4:21.0.+" }' app/build.gradle
Build:1.8,13
commit=c5a0ed6d5f82eb62e8fa94044a8b48fca73d27e1
rm=libs/*,app/build/
subdir=app
gradle=yes
prebuild=sed -i -e '/buildTypes/irepositories { jcenter() }\ndependencies { compile "com.android.support:support-v4:21.0.+" }' build.gradle && \
sed -i -e 's/com.android.tools.build:gradle:0.13.2/com.android.tools.build:gradle:0.12.0/g' ../build.gradle
Auto Update Mode:None
Update Check Mode:RepoManifest
Current Version:1.8
Current Version Code:13
| Update LoopBoard to 1.8 (13) | Update LoopBoard to 1.8 (13)
| Text | agpl-3.0 | f-droid/fdroiddata,f-droid/fdroid-data,f-droid/fdroiddata | text | ## Code Before:
Categories:Multimedia
License:Apache2
Web Site:
Source Code:https://github.com/AlexKang/loopboard
Issue Tracker:https://github.com/AlexKang/loopboard/issues
Auto Name:LoopBoard
Summary:Record, play and loop sounds
Description:
Dynamic sound board. Record sound clips and play them back or loop them.
Currently, the application can record sounds through the microphone (or
use sounds from internal storage!) and play them back through a newly
created button. Each button has the option to re-record and loop playback.
.
Repo Type:git
Repo:https://github.com/AlexKang/loopboard
Build:1.4,5
commit=f4d87ee028feb23f52141a9b8d9d29d9b2682377
rm=libs/*,app/build/
prebuild=sed -i -e '/buildTypes/irepositories { jcenter() }\ndependencies { compile "com.android.support:support-v4:21.0.+" }' app/build.gradle
Auto Update Mode:None
Update Check Mode:RepoManifest
Current Version:1.8
Current Version Code:13
## Instruction:
Update LoopBoard to 1.8 (13)
## Code After:
Categories:Multimedia
License:Apache2
Web Site:
Source Code:https://github.com/AlexKang/loopboard
Issue Tracker:https://github.com/AlexKang/loopboard/issues
Auto Name:LoopBoard
Summary:Record, play and loop sounds
Description:
Dynamic sound board. Record sound clips and play them back or loop them.
Currently, the application can record sounds through the microphone (or
use sounds from internal storage!) and play them back through a newly
created button. Each button has the option to re-record and loop playback.
.
Repo Type:git
Repo:https://github.com/AlexKang/loopboard
Build:1.4,5
commit=f4d87ee028feb23f52141a9b8d9d29d9b2682377
rm=libs/*,app/build/
prebuild=sed -i -e '/buildTypes/irepositories { jcenter() }\ndependencies { compile "com.android.support:support-v4:21.0.+" }' app/build.gradle
Build:1.8,13
commit=c5a0ed6d5f82eb62e8fa94044a8b48fca73d27e1
rm=libs/*,app/build/
subdir=app
gradle=yes
prebuild=sed -i -e '/buildTypes/irepositories { jcenter() }\ndependencies { compile "com.android.support:support-v4:21.0.+" }' build.gradle && \
sed -i -e 's/com.android.tools.build:gradle:0.13.2/com.android.tools.build:gradle:0.12.0/g' ../build.gradle
Auto Update Mode:None
Update Check Mode:RepoManifest
Current Version:1.8
Current Version Code:13
| Categories:Multimedia
License:Apache2
Web Site:
Source Code:https://github.com/AlexKang/loopboard
Issue Tracker:https://github.com/AlexKang/loopboard/issues
Auto Name:LoopBoard
Summary:Record, play and loop sounds
Description:
Dynamic sound board. Record sound clips and play them back or loop them.
Currently, the application can record sounds through the microphone (or
use sounds from internal storage!) and play them back through a newly
created button. Each button has the option to re-record and loop playback.
.
Repo Type:git
Repo:https://github.com/AlexKang/loopboard
Build:1.4,5
commit=f4d87ee028feb23f52141a9b8d9d29d9b2682377
rm=libs/*,app/build/
prebuild=sed -i -e '/buildTypes/irepositories { jcenter() }\ndependencies { compile "com.android.support:support-v4:21.0.+" }' app/build.gradle
+ Build:1.8,13
+ commit=c5a0ed6d5f82eb62e8fa94044a8b48fca73d27e1
+ rm=libs/*,app/build/
+ subdir=app
+ gradle=yes
+ prebuild=sed -i -e '/buildTypes/irepositories { jcenter() }\ndependencies { compile "com.android.support:support-v4:21.0.+" }' build.gradle && \
+ sed -i -e 's/com.android.tools.build:gradle:0.13.2/com.android.tools.build:gradle:0.12.0/g' ../build.gradle
+
Auto Update Mode:None
Update Check Mode:RepoManifest
Current Version:1.8
Current Version Code:13
| 8 | 0.275862 | 8 | 0 |
abeef5f477c969dce669a6da847c02b8b147c918 | common/richtext.sh | common/richtext.sh |
normal=$(tput sgr0)
bold=$(tput bold)
underline=$(tput smul)
#Colors
fg_black=$(tput setaf 0)
fg_red=$(tput setaf 1)
fg_green=$(tput setaf 2)
fg_yellow=$(tput setaf 3)
fg_blue=$(tput setaf 4)
fg_magenta=$(tput setaf 5)
fg_cyan=$(tput setaf 6)
fg_white=$(tput setaf 7)
|
normal=$(tput sgr0)
dim=$(tput dim)
bold=$(tput bold)
underline=$(tput smul)
blink=$(tput blink)
#Colors
fg_black=$(tput setaf 0)
fg_red=$(tput setaf 1)
fg_green=$(tput setaf 2)
fg_yellow=$(tput setaf 3)
fg_blue=$(tput setaf 4)
fg_magenta=$(tput setaf 5)
fg_cyan=$(tput setaf 6)
fg_white=$(tput setaf 7)
| Add dim and blink modes :flashlight: | Add dim and blink modes :flashlight:
| Shell | mit | elamperti/dotfiles,elamperti/dotfiles | shell | ## Code Before:
normal=$(tput sgr0)
bold=$(tput bold)
underline=$(tput smul)
#Colors
fg_black=$(tput setaf 0)
fg_red=$(tput setaf 1)
fg_green=$(tput setaf 2)
fg_yellow=$(tput setaf 3)
fg_blue=$(tput setaf 4)
fg_magenta=$(tput setaf 5)
fg_cyan=$(tput setaf 6)
fg_white=$(tput setaf 7)
## Instruction:
Add dim and blink modes :flashlight:
## Code After:
normal=$(tput sgr0)
dim=$(tput dim)
bold=$(tput bold)
underline=$(tput smul)
blink=$(tput blink)
#Colors
fg_black=$(tput setaf 0)
fg_red=$(tput setaf 1)
fg_green=$(tput setaf 2)
fg_yellow=$(tput setaf 3)
fg_blue=$(tput setaf 4)
fg_magenta=$(tput setaf 5)
fg_cyan=$(tput setaf 6)
fg_white=$(tput setaf 7)
|
normal=$(tput sgr0)
+ dim=$(tput dim)
bold=$(tput bold)
underline=$(tput smul)
+ blink=$(tput blink)
#Colors
fg_black=$(tput setaf 0)
fg_red=$(tput setaf 1)
fg_green=$(tput setaf 2)
fg_yellow=$(tput setaf 3)
fg_blue=$(tput setaf 4)
fg_magenta=$(tput setaf 5)
fg_cyan=$(tput setaf 6)
fg_white=$(tput setaf 7) | 2 | 0.142857 | 2 | 0 |
c8fd4dc57d922e9b4ed70373035c2d5020a9a482 | README.md | README.md |
JSON API for tracking commute times.
## Setup
* Ruby 2.2.0
* Bundler
* Postgres
## Local Testing
```
% curl -H "Authorization: Token commuter-token" http://localhost:3000/hello
{"message":"Hello, World!"}
```
|
[](https://travis-ci.org/thorncp/commute-tracker)
JSON API for tracking commute times.
## Setup
* Ruby 2.2.0
* Bundler
* Postgres
## Local Testing
```
% curl -H "Authorization: Token commuter-token" http://localhost:3000/hello
{"message":"Hello, World!"}
```
| Add Travis badge to readme | Add Travis badge to readme
| Markdown | mit | thorncp/commute-tracker,thorncp/commute-tracker,thorncp/commute-tracker | markdown | ## Code Before:
JSON API for tracking commute times.
## Setup
* Ruby 2.2.0
* Bundler
* Postgres
## Local Testing
```
% curl -H "Authorization: Token commuter-token" http://localhost:3000/hello
{"message":"Hello, World!"}
```
## Instruction:
Add Travis badge to readme
## Code After:
[](https://travis-ci.org/thorncp/commute-tracker)
JSON API for tracking commute times.
## Setup
* Ruby 2.2.0
* Bundler
* Postgres
## Local Testing
```
% curl -H "Authorization: Token commuter-token" http://localhost:3000/hello
{"message":"Hello, World!"}
```
| +
+ [](https://travis-ci.org/thorncp/commute-tracker)
JSON API for tracking commute times.
## Setup
* Ruby 2.2.0
* Bundler
* Postgres
## Local Testing
```
% curl -H "Authorization: Token commuter-token" http://localhost:3000/hello
{"message":"Hello, World!"}
``` | 2 | 0.133333 | 2 | 0 |
35d3ca3d1eab34d89350bd20545281df84a62007 | src/index.php | src/index.php | <?php
require 'classes/Tmdb/Tmdb.php';
require 'classes/Tmdb/Movie.php';
require 'classes/Tmdb/TVShow.php';
$api_key = '62dfe9839b8937e595e325a4144702ad';
$VfacTmdb = new Vfac\Tmdb\Tmdb($api_key);
$VfacTmdb->setLanguage('fr-FR');
$results = [];
//$results = $VfacTmdb->searchMovie('star wars');
$results[] = $VfacTmdb->getMovieDetails(11); // star wars
foreach ($results as $movie)
{
echo <<<RES
{$movie->getId()}<br />
{$movie->getTitle()}<br />
{$movie->getOriginalTitle()}<br />
{$movie->getOverview()}<br />
{$movie->getNote()}<br />
{$movie->getReleaseDate()}<br />
{$movie->getPoster()}<br />
{$movie->getBackdrop()}<br />
{$movie->getGenres()}<br />
<hr />
RES;
echo $movie->raw;
}
| <?php
require 'classes/Tmdb/Tmdb.php';
require 'classes/Tmdb/Movie.php';
require 'classes/Tmdb/TVShow.php';
$api_key = '62dfe9839b8937e595e325a4144702ad';
$VfacTmdb = new Vfac\Tmdb\Tmdb($api_key);
$results = [];
//$results = $VfacTmdb->searchMovie('star wars', array('language' => 'fr-FR'));
$results[] = $VfacTmdb->getMovieDetails(11, array('language' => 'fr-FR')); // star wars
foreach ($results as $movie)
{
echo <<<RES
{$movie->getId()}<br />
{$movie->getTitle()}<br />
{$movie->getOriginalTitle()}<br />
{$movie->getOverview()}<br />
{$movie->getNote()}<br />
{$movie->getReleaseDate()}<br />
{$movie->getPoster()}<br />
{$movie->getBackdrop()}<br />
{$movie->getGenres()}<br />
<hr />
RES;
echo $movie->raw;
}
| Add option inn page test | Add option inn page test
| PHP | mit | vfalies/tmdb,vfalies/tmdb | php | ## Code Before:
<?php
require 'classes/Tmdb/Tmdb.php';
require 'classes/Tmdb/Movie.php';
require 'classes/Tmdb/TVShow.php';
$api_key = '62dfe9839b8937e595e325a4144702ad';
$VfacTmdb = new Vfac\Tmdb\Tmdb($api_key);
$VfacTmdb->setLanguage('fr-FR');
$results = [];
//$results = $VfacTmdb->searchMovie('star wars');
$results[] = $VfacTmdb->getMovieDetails(11); // star wars
foreach ($results as $movie)
{
echo <<<RES
{$movie->getId()}<br />
{$movie->getTitle()}<br />
{$movie->getOriginalTitle()}<br />
{$movie->getOverview()}<br />
{$movie->getNote()}<br />
{$movie->getReleaseDate()}<br />
{$movie->getPoster()}<br />
{$movie->getBackdrop()}<br />
{$movie->getGenres()}<br />
<hr />
RES;
echo $movie->raw;
}
## Instruction:
Add option inn page test
## Code After:
<?php
require 'classes/Tmdb/Tmdb.php';
require 'classes/Tmdb/Movie.php';
require 'classes/Tmdb/TVShow.php';
$api_key = '62dfe9839b8937e595e325a4144702ad';
$VfacTmdb = new Vfac\Tmdb\Tmdb($api_key);
$results = [];
//$results = $VfacTmdb->searchMovie('star wars', array('language' => 'fr-FR'));
$results[] = $VfacTmdb->getMovieDetails(11, array('language' => 'fr-FR')); // star wars
foreach ($results as $movie)
{
echo <<<RES
{$movie->getId()}<br />
{$movie->getTitle()}<br />
{$movie->getOriginalTitle()}<br />
{$movie->getOverview()}<br />
{$movie->getNote()}<br />
{$movie->getReleaseDate()}<br />
{$movie->getPoster()}<br />
{$movie->getBackdrop()}<br />
{$movie->getGenres()}<br />
<hr />
RES;
echo $movie->raw;
}
| <?php
require 'classes/Tmdb/Tmdb.php';
require 'classes/Tmdb/Movie.php';
require 'classes/Tmdb/TVShow.php';
$api_key = '62dfe9839b8937e595e325a4144702ad';
$VfacTmdb = new Vfac\Tmdb\Tmdb($api_key);
- $VfacTmdb->setLanguage('fr-FR');
$results = [];
- //$results = $VfacTmdb->searchMovie('star wars');
+ //$results = $VfacTmdb->searchMovie('star wars', array('language' => 'fr-FR'));
? ++++++++++++++++++++++++++++++
- $results[] = $VfacTmdb->getMovieDetails(11); // star wars
+ $results[] = $VfacTmdb->getMovieDetails(11, array('language' => 'fr-FR')); // star wars
? ++++++++++++++++++++++++++++++
foreach ($results as $movie)
{
echo <<<RES
{$movie->getId()}<br />
{$movie->getTitle()}<br />
{$movie->getOriginalTitle()}<br />
{$movie->getOverview()}<br />
{$movie->getNote()}<br />
{$movie->getReleaseDate()}<br />
{$movie->getPoster()}<br />
{$movie->getBackdrop()}<br />
{$movie->getGenres()}<br />
<hr />
RES;
echo $movie->raw;
}
| 5 | 0.15625 | 2 | 3 |
fd15f37b37f4c371ce8723129db3d5fbe11454a7 | nixos/modules/system/boot/loader/generic-extlinux-compatible/extlinux-conf-builder.nix | nixos/modules/system/boot/loader/generic-extlinux-compatible/extlinux-conf-builder.nix | { pkgs }:
pkgs.substituteAll {
src = ./extlinux-conf-builder.sh;
isExecutable = true;
path = [pkgs.buildPackages.coreutils pkgs.buildPackages.gnused pkgs.buildPackages.gnugrep];
inherit (pkgs.buildPackages) bash;
}
| { pkgs }:
pkgs.substituteAll {
src = ./extlinux-conf-builder.sh;
isExecutable = true;
path = [pkgs.coreutils pkgs.gnused pkgs.gnugrep];
inherit (pkgs) bash;
}
| Revert "extlinux-conf: fix cross compilation" | Revert "extlinux-conf: fix cross compilation"
This reverts commit f17dd04f12a6eccdf613968efca38cfd0edfd2c0.
| Nix | mit | NixOS/nixpkgs,NixOS/nixpkgs,NixOS/nixpkgs,NixOS/nixpkgs,NixOS/nixpkgs,NixOS/nixpkgs,NixOS/nixpkgs,NixOS/nixpkgs,NixOS/nixpkgs,NixOS/nixpkgs,NixOS/nixpkgs,NixOS/nixpkgs,NixOS/nixpkgs,NixOS/nixpkgs,NixOS/nixpkgs | nix | ## Code Before:
{ pkgs }:
pkgs.substituteAll {
src = ./extlinux-conf-builder.sh;
isExecutable = true;
path = [pkgs.buildPackages.coreutils pkgs.buildPackages.gnused pkgs.buildPackages.gnugrep];
inherit (pkgs.buildPackages) bash;
}
## Instruction:
Revert "extlinux-conf: fix cross compilation"
This reverts commit f17dd04f12a6eccdf613968efca38cfd0edfd2c0.
## Code After:
{ pkgs }:
pkgs.substituteAll {
src = ./extlinux-conf-builder.sh;
isExecutable = true;
path = [pkgs.coreutils pkgs.gnused pkgs.gnugrep];
inherit (pkgs) bash;
}
| { pkgs }:
pkgs.substituteAll {
src = ./extlinux-conf-builder.sh;
isExecutable = true;
- path = [pkgs.buildPackages.coreutils pkgs.buildPackages.gnused pkgs.buildPackages.gnugrep];
+ path = [pkgs.coreutils pkgs.gnused pkgs.gnugrep];
- inherit (pkgs.buildPackages) bash;
? --------------
+ inherit (pkgs) bash;
} | 4 | 0.5 | 2 | 2 |
01c7cb0dd7a93a77e06ef1565cf43f05578a4a1c | .travis.yml | .travis.yml | language: ruby
cache: bundler
rvm:
- 1.9.3
- 2.0.0
- 2.1.0
- 2.2.0
- 2.2.2
git:
depth: 1
before_install: gem install bundler -v 1.10.6
script:
- bundle exec yard
- bundle exec rubocop
- bundle exec rspec
deploy:
provider: rubygems
api_key: 4672b2d03693ff646f79dfb823e02a60
| language: ruby
cache: bundler
rvm:
- 1.9.3
- 2.0.0
- 2.1.0
- 2.2.0
- 2.2.2
git:
depth: 1
before_install: gem install bundler -v 1.10.6
script:
- bundle exec yard
- bundle exec rubocop
- bundle exec rspec
deploy:
provider: rubygems
api_key: 4672b2d03693ff646f79dfb823e02a60
on:
tags: true
| Configure ruby gems for just deploy when new tag | Configure ruby gems for just deploy when new tag | YAML | mit | vnegrisolo/cch,vnegrisolo/cch | yaml | ## Code Before:
language: ruby
cache: bundler
rvm:
- 1.9.3
- 2.0.0
- 2.1.0
- 2.2.0
- 2.2.2
git:
depth: 1
before_install: gem install bundler -v 1.10.6
script:
- bundle exec yard
- bundle exec rubocop
- bundle exec rspec
deploy:
provider: rubygems
api_key: 4672b2d03693ff646f79dfb823e02a60
## Instruction:
Configure ruby gems for just deploy when new tag
## Code After:
language: ruby
cache: bundler
rvm:
- 1.9.3
- 2.0.0
- 2.1.0
- 2.2.0
- 2.2.2
git:
depth: 1
before_install: gem install bundler -v 1.10.6
script:
- bundle exec yard
- bundle exec rubocop
- bundle exec rspec
deploy:
provider: rubygems
api_key: 4672b2d03693ff646f79dfb823e02a60
on:
tags: true
| language: ruby
cache: bundler
rvm:
- 1.9.3
- 2.0.0
- 2.1.0
- 2.2.0
- 2.2.2
git:
depth: 1
before_install: gem install bundler -v 1.10.6
script:
- bundle exec yard
- bundle exec rubocop
- bundle exec rspec
deploy:
provider: rubygems
api_key: 4672b2d03693ff646f79dfb823e02a60
+ on:
+ tags: true | 2 | 0.111111 | 2 | 0 |
c5807dfc09f30137f6d3080972aed9dba022111c | spec/spec_helper.rb | spec/spec_helper.rb | require "simplecov"
require 'coveralls'
SimpleCov.formatter = Coveralls::SimpleCov::Formatter
SimpleCov.start
require File.expand_path("../lib/eventify", __dir__)
require "tempfile"
require "webmock/rspec"
WebMock.disable_net_connect!(allow_localhost: true)
RSpec.configure do |config|
config.color = true
config.before do
database_path = File.join(Dir.tmpdir, "eventify-test.sqlite3")
stub_const "Eventify::Database::PATH", database_path
sqlite = Eventify::Database.instance_variable_get(:@sqlite)
sqlite.close if sqlite
File.delete database_path if File.exists? database_path
Eventify::Database.instance_variable_set(:@sqlite, nil)
end
end
| require "simplecov"
require 'coveralls'
SimpleCov.formatter = Coveralls::SimpleCov::Formatter
SimpleCov.start
require File.expand_path("../lib/eventify", __dir__)
require "tempfile"
require "webmock/rspec"
WebMock.disable_net_connect!(allow_localhost: true)
RSpec.configure do |config|
config.color = true
config.before do
database_path = File.join(Dir.tmpdir, "eventify-test.sqlite3")
stub_const "Eventify::Database::PATH", database_path
sqlite = Eventify::Database.instance_variable_get(:@sqlite)
sqlite.close if sqlite
File.delete database_path if File.exists? database_path
Eventify::Database.instance_variable_set(:@sqlite, nil)
end
end
# monkey-patch StubSocket for backwards compatibility so that specs would pass
# on newer Rubies
class StubSocket
def close
end
end
| Add monkey-patch for StubSocket so that specs would pass | Add monkey-patch for StubSocket so that specs would pass
| Ruby | mit | jarmo/eventify,jarmo/eventify | ruby | ## Code Before:
require "simplecov"
require 'coveralls'
SimpleCov.formatter = Coveralls::SimpleCov::Formatter
SimpleCov.start
require File.expand_path("../lib/eventify", __dir__)
require "tempfile"
require "webmock/rspec"
WebMock.disable_net_connect!(allow_localhost: true)
RSpec.configure do |config|
config.color = true
config.before do
database_path = File.join(Dir.tmpdir, "eventify-test.sqlite3")
stub_const "Eventify::Database::PATH", database_path
sqlite = Eventify::Database.instance_variable_get(:@sqlite)
sqlite.close if sqlite
File.delete database_path if File.exists? database_path
Eventify::Database.instance_variable_set(:@sqlite, nil)
end
end
## Instruction:
Add monkey-patch for StubSocket so that specs would pass
## Code After:
require "simplecov"
require 'coveralls'
SimpleCov.formatter = Coveralls::SimpleCov::Formatter
SimpleCov.start
require File.expand_path("../lib/eventify", __dir__)
require "tempfile"
require "webmock/rspec"
WebMock.disable_net_connect!(allow_localhost: true)
RSpec.configure do |config|
config.color = true
config.before do
database_path = File.join(Dir.tmpdir, "eventify-test.sqlite3")
stub_const "Eventify::Database::PATH", database_path
sqlite = Eventify::Database.instance_variable_get(:@sqlite)
sqlite.close if sqlite
File.delete database_path if File.exists? database_path
Eventify::Database.instance_variable_set(:@sqlite, nil)
end
end
# monkey-patch StubSocket for backwards compatibility so that specs would pass
# on newer Rubies
class StubSocket
def close
end
end
| require "simplecov"
require 'coveralls'
SimpleCov.formatter = Coveralls::SimpleCov::Formatter
SimpleCov.start
require File.expand_path("../lib/eventify", __dir__)
require "tempfile"
require "webmock/rspec"
WebMock.disable_net_connect!(allow_localhost: true)
RSpec.configure do |config|
config.color = true
config.before do
database_path = File.join(Dir.tmpdir, "eventify-test.sqlite3")
stub_const "Eventify::Database::PATH", database_path
sqlite = Eventify::Database.instance_variable_get(:@sqlite)
sqlite.close if sqlite
File.delete database_path if File.exists? database_path
Eventify::Database.instance_variable_set(:@sqlite, nil)
end
end
+
+ # monkey-patch StubSocket for backwards compatibility so that specs would pass
+ # on newer Rubies
+ class StubSocket
+ def close
+ end
+ end | 7 | 0.28 | 7 | 0 |
e349fccb4388777da7b8cb759b35771d21af5bab | library/Denkmal/layout/default/Component/EventList/default.less | library/Denkmal/layout/default/Component/EventList/default.less | & {
padding-top: 10px;
}
.eventListMeta {
color: @colorFgSubtle;
display: block;
font-size: .8rem;
margin-bottom: 10px;
padding: 1px 5px;
}
.weekday {
margin-right: 5px;
}
.eventList {
> li {
> a {
color: inherit;
display: block;
}
@media (min-width: @breakpointMedium) {
border-bottom: 1px solid @colorFgBorder;
}
}
}
.Denkmal_Component_Event {
cursor: pointer;
.event .event-context .date {
display: none;
}
}
.Denkmal_Component_EventDetails {
display: none;
}
.footer {
margin-top: 1em;
text-align: center;
.button {
padding: 0 0.6em;
color: @colorFgSubtle;
}
}
| & {
padding-top: 10px;
}
.eventListMeta {
color: @colorFgSubtle;
display: block;
font-size: @fontSizeTiny;
margin-bottom: 10px;
padding: 0 10px;
}
.weekday {
margin-right: 5px;
}
.eventList {
> li {
> a {
color: inherit;
display: block;
}
@media (min-width: @breakpointMedium) {
border-bottom: 1px solid @colorFgBorder;
}
}
}
.Denkmal_Component_Event {
cursor: pointer;
.event .event-context .date {
display: none;
}
}
.Denkmal_Component_EventDetails {
display: none;
}
.footer {
padding: 1em 0;
text-align: center;
.button {
padding: 0 0.6em;
color: @colorFgSubtle;
}
}
| Adjust event list date spacing | Adjust event list date spacing
| Less | mit | denkmal/denkmal.org,njam/denkmal.org,njam/denkmal.org,denkmal/denkmal.org,denkmal/denkmal.org,njam/denkmal.org,njam/denkmal.org,denkmal/denkmal.org,denkmal/denkmal.org,njam/denkmal.org | less | ## Code Before:
& {
padding-top: 10px;
}
.eventListMeta {
color: @colorFgSubtle;
display: block;
font-size: .8rem;
margin-bottom: 10px;
padding: 1px 5px;
}
.weekday {
margin-right: 5px;
}
.eventList {
> li {
> a {
color: inherit;
display: block;
}
@media (min-width: @breakpointMedium) {
border-bottom: 1px solid @colorFgBorder;
}
}
}
.Denkmal_Component_Event {
cursor: pointer;
.event .event-context .date {
display: none;
}
}
.Denkmal_Component_EventDetails {
display: none;
}
.footer {
margin-top: 1em;
text-align: center;
.button {
padding: 0 0.6em;
color: @colorFgSubtle;
}
}
## Instruction:
Adjust event list date spacing
## Code After:
& {
padding-top: 10px;
}
.eventListMeta {
color: @colorFgSubtle;
display: block;
font-size: @fontSizeTiny;
margin-bottom: 10px;
padding: 0 10px;
}
.weekday {
margin-right: 5px;
}
.eventList {
> li {
> a {
color: inherit;
display: block;
}
@media (min-width: @breakpointMedium) {
border-bottom: 1px solid @colorFgBorder;
}
}
}
.Denkmal_Component_Event {
cursor: pointer;
.event .event-context .date {
display: none;
}
}
.Denkmal_Component_EventDetails {
display: none;
}
.footer {
padding: 1em 0;
text-align: center;
.button {
padding: 0 0.6em;
color: @colorFgSubtle;
}
}
| & {
padding-top: 10px;
}
.eventListMeta {
color: @colorFgSubtle;
display: block;
- font-size: .8rem;
+ font-size: @fontSizeTiny;
margin-bottom: 10px;
- padding: 1px 5px;
? ^^^^
+ padding: 0 10px;
? ++ ^
}
.weekday {
margin-right: 5px;
}
.eventList {
> li {
> a {
color: inherit;
display: block;
}
@media (min-width: @breakpointMedium) {
border-bottom: 1px solid @colorFgBorder;
}
}
}
.Denkmal_Component_Event {
cursor: pointer;
.event .event-context .date {
display: none;
}
}
.Denkmal_Component_EventDetails {
display: none;
}
.footer {
- margin-top: 1em;
+ padding: 1em 0;
text-align: center;
.button {
padding: 0 0.6em;
color: @colorFgSubtle;
}
} | 6 | 0.12 | 3 | 3 |
ff48e2e7bed5b17208e61a6d34555f4eebe5cf7f | src/random.js | src/random.js | var uuid4 = require('uuid/v4')
/**
* Generates RFC4122 version 4 guid ()
*/
export default function random() {
return uuid4().replace(/-/g, '');
}
| import uuid4 from 'uuid/v4';
/**
* Generates RFC4122 version 4 guid ()
*/
export default function random() {
return uuid4().replace(/-/g, '');
}
| Use ES6 import for uuid/v4 rather than require | Use ES6 import for uuid/v4 rather than require
| JavaScript | apache-2.0 | IdentityModel/oidc-client-js,IdentityModel/oidc-client,IdentityModel/oidc-client,IdentityModel/oidc-client-js,IdentityModel/oidc-client-js,IdentityModel/oidc-client | javascript | ## Code Before:
var uuid4 = require('uuid/v4')
/**
* Generates RFC4122 version 4 guid ()
*/
export default function random() {
return uuid4().replace(/-/g, '');
}
## Instruction:
Use ES6 import for uuid/v4 rather than require
## Code After:
import uuid4 from 'uuid/v4';
/**
* Generates RFC4122 version 4 guid ()
*/
export default function random() {
return uuid4().replace(/-/g, '');
}
| - var uuid4 = require('uuid/v4')
+ import uuid4 from 'uuid/v4';
/**
* Generates RFC4122 version 4 guid ()
*/
export default function random() {
return uuid4().replace(/-/g, '');
} | 2 | 0.222222 | 1 | 1 |
26b3a8b2e635d56a16b8ed745cba49ff213870bf | src/scripts/utils/fetch.js | src/scripts/utils/fetch.js | var Promise = require('es6-promise').Promise;
function fetch(options) {
return new Promise(function(resolve, reject) {
var xhr = new XMLHttpRequest();
xhr.onload = function() {
if(xhr.getResponseHeader('content-type').search('application/json') >= 0) {
try {
var response = JSON.parse(xhr.responseText);
return resolve(response);
} catch(e) {
reject(e);
}
}
resolve(xhr.responseText);
};
xhr.onerror = function() {
reject();
};
xhr.open(options.method, options.url);
xhr.send(options.body);
});
}
module.exports = fetch; | var Promise = require('es6-promise').Promise;
function fetch(options) {
return new Promise(function(resolve, reject) {
var xhr = new XMLHttpRequest();
xhr.onload = function() {
if(xhr.getResponseHeader('content-type').search('application/json') >= 0) {
try {
var response = JSON.parse(xhr.responseText);
return resolve(response);
} catch(e) {
return reject(e);
}
}
if(xhr.status !== 200) {
return reject();
}
resolve(xhr.responseText);
};
xhr.onerror = function(e) {
reject(e);
};
xhr.open(options.method, options.url);
xhr.send(options.body);
});
}
module.exports = fetch; | Fix Fetch util reject case | Fix Fetch util reject case
| JavaScript | apache-2.0 | yrezgui/dokomygp | javascript | ## Code Before:
var Promise = require('es6-promise').Promise;
function fetch(options) {
return new Promise(function(resolve, reject) {
var xhr = new XMLHttpRequest();
xhr.onload = function() {
if(xhr.getResponseHeader('content-type').search('application/json') >= 0) {
try {
var response = JSON.parse(xhr.responseText);
return resolve(response);
} catch(e) {
reject(e);
}
}
resolve(xhr.responseText);
};
xhr.onerror = function() {
reject();
};
xhr.open(options.method, options.url);
xhr.send(options.body);
});
}
module.exports = fetch;
## Instruction:
Fix Fetch util reject case
## Code After:
var Promise = require('es6-promise').Promise;
function fetch(options) {
return new Promise(function(resolve, reject) {
var xhr = new XMLHttpRequest();
xhr.onload = function() {
if(xhr.getResponseHeader('content-type').search('application/json') >= 0) {
try {
var response = JSON.parse(xhr.responseText);
return resolve(response);
} catch(e) {
return reject(e);
}
}
if(xhr.status !== 200) {
return reject();
}
resolve(xhr.responseText);
};
xhr.onerror = function(e) {
reject(e);
};
xhr.open(options.method, options.url);
xhr.send(options.body);
});
}
module.exports = fetch; | var Promise = require('es6-promise').Promise;
function fetch(options) {
return new Promise(function(resolve, reject) {
var xhr = new XMLHttpRequest();
xhr.onload = function() {
if(xhr.getResponseHeader('content-type').search('application/json') >= 0) {
try {
var response = JSON.parse(xhr.responseText);
return resolve(response);
} catch(e) {
- reject(e);
+ return reject(e);
? +++++++
}
+ }
+
+ if(xhr.status !== 200) {
+ return reject();
}
resolve(xhr.responseText);
};
- xhr.onerror = function() {
+ xhr.onerror = function(e) {
? +
- reject();
+ reject(e);
? +
};
xhr.open(options.method, options.url);
xhr.send(options.body);
});
}
module.exports = fetch; | 10 | 0.322581 | 7 | 3 |
6f745ae05a22031a36cb5cedc6b627cbf7ba6512 | import_goodline_iptv.py | import_goodline_iptv.py |
import configargparse
from goodline_iptv.importer import do_import
if __name__ == '__main__':
parser = configargparse.ArgParser()
parser.add_argument('-o', '--out-dir', required=True, help='Output directory')
parser.add_argument('-e', '--encoding',
default='cp1251',
env_var='ENCODING',
help='Source JTV teleguide encoding')
parser.add_argument('-t', '--timezone',
default='+0700',
env_var='TIMEZONE',
help='Source JTV teleguide timezone')
parser.add_argument('-u', '--udpxy',
env_var='UDPXY_ADDR',
help='Address of the udproxy service, if available')
parser.add_argument('-v', '--verbosity',
default=0,
env_var='VERBOSITY',
type=int, choices=range(0, 4),
help='Verbosity level')
args = parser.parse_args()
do_import(args.verbosity, args.out_dir, args.encoding, args.timezone, args.udpxy)
|
import configargparse
from goodline_iptv.importer import do_import
if __name__ == '__main__':
parser = configargparse.ArgParser()
parser.add_argument('-o', '--out-dir',
required=True,
env_var='OUTDIR',
help='Output directory')
parser.add_argument('-e', '--encoding',
default='cp1251',
env_var='ENCODING',
help='Source JTV teleguide encoding')
parser.add_argument('-t', '--timezone',
default='+0700',
env_var='TIMEZONE',
help='Source JTV teleguide timezone')
parser.add_argument('-u', '--udpxy',
env_var='UDPXY_ADDR',
help='Address of the udproxy service, if available')
parser.add_argument('-v', '--verbosity',
default=0,
env_var='VERBOSITY',
type=int, choices=range(0, 4),
help='Verbosity level')
args = parser.parse_args()
do_import(args.verbosity, args.out_dir, args.encoding, args.timezone, args.udpxy)
| Add environment variable for ability to set the output directory | Add environment variable for ability to set the output directory
| Python | mit | nsadovskiy/goodline_tv | python | ## Code Before:
import configargparse
from goodline_iptv.importer import do_import
if __name__ == '__main__':
parser = configargparse.ArgParser()
parser.add_argument('-o', '--out-dir', required=True, help='Output directory')
parser.add_argument('-e', '--encoding',
default='cp1251',
env_var='ENCODING',
help='Source JTV teleguide encoding')
parser.add_argument('-t', '--timezone',
default='+0700',
env_var='TIMEZONE',
help='Source JTV teleguide timezone')
parser.add_argument('-u', '--udpxy',
env_var='UDPXY_ADDR',
help='Address of the udproxy service, if available')
parser.add_argument('-v', '--verbosity',
default=0,
env_var='VERBOSITY',
type=int, choices=range(0, 4),
help='Verbosity level')
args = parser.parse_args()
do_import(args.verbosity, args.out_dir, args.encoding, args.timezone, args.udpxy)
## Instruction:
Add environment variable for ability to set the output directory
## Code After:
import configargparse
from goodline_iptv.importer import do_import
if __name__ == '__main__':
parser = configargparse.ArgParser()
parser.add_argument('-o', '--out-dir',
required=True,
env_var='OUTDIR',
help='Output directory')
parser.add_argument('-e', '--encoding',
default='cp1251',
env_var='ENCODING',
help='Source JTV teleguide encoding')
parser.add_argument('-t', '--timezone',
default='+0700',
env_var='TIMEZONE',
help='Source JTV teleguide timezone')
parser.add_argument('-u', '--udpxy',
env_var='UDPXY_ADDR',
help='Address of the udproxy service, if available')
parser.add_argument('-v', '--verbosity',
default=0,
env_var='VERBOSITY',
type=int, choices=range(0, 4),
help='Verbosity level')
args = parser.parse_args()
do_import(args.verbosity, args.out_dir, args.encoding, args.timezone, args.udpxy)
|
import configargparse
from goodline_iptv.importer import do_import
if __name__ == '__main__':
parser = configargparse.ArgParser()
- parser.add_argument('-o', '--out-dir', required=True, help='Output directory')
+ parser.add_argument('-o', '--out-dir',
+ required=True,
+ env_var='OUTDIR',
+ help='Output directory')
parser.add_argument('-e', '--encoding',
default='cp1251',
env_var='ENCODING',
help='Source JTV teleguide encoding')
parser.add_argument('-t', '--timezone',
default='+0700',
env_var='TIMEZONE',
help='Source JTV teleguide timezone')
parser.add_argument('-u', '--udpxy',
env_var='UDPXY_ADDR',
help='Address of the udproxy service, if available')
parser.add_argument('-v', '--verbosity',
default=0,
env_var='VERBOSITY',
type=int, choices=range(0, 4),
help='Verbosity level')
args = parser.parse_args()
do_import(args.verbosity, args.out_dir, args.encoding, args.timezone, args.udpxy) | 5 | 0.151515 | 4 | 1 |
69d8ef8c1eba424568158611d45f02bc316c737b | setup.py | setup.py |
try:
from setuptools import setup
kw = {'entry_points':
"""[console_scripts]\nglue = glue:main\n""",
'zip_safe': False}
except ImportError:
from distutils.core import setup
kw = {'scripts': ['glue.py']}
setup(
name='Glue',
version='0.1',
url='http://glue.github.com/',
license='BSD',
author='Jorge Bastida',
author_email='me@jorgebastida.com',
description='Glue is a simple command line tool to generate CSS sprites.',
long_description=('Glue is a simple command line tool to generate CSS '
'sprites.'),
py_modules=['glue'],
include_package_data=True,
platforms='any',
install_requires=[
'PIL>=1.1.6'
],
classifiers=[
'Development Status :: 4 - Beta',
'Environment :: Web Environment',
'Intended Audience :: Developers',
'License :: OSI Approved :: BSD License',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Topic :: Utilities'
],
**kw
)
|
try:
from setuptools import setup
kw = {'entry_points':
"""[console_scripts]\nglue = glue:main\n""",
'zip_safe': False}
except ImportError:
from distutils.core import setup
kw = {'scripts': ['glue.py']}
setup(
name='glue',
version='0.1.1',
url='https://github.com/jorgebastida/glue',
dowload_url='https://nodeload.github.com/jorgebastida/glue/zipball/master',
license='BSD',
author='Jorge Bastida',
author_email='me@jorgebastida.com',
description='Glue is a simple command line tool to generate CSS sprites.',
long_description=('Glue is a simple command line tool to generate CSS '
'sprites.'),
py_modules=['glue'],
include_package_data=True,
platforms='any',
install_requires=[
'PIL>=1.1.6'
],
classifiers=[
'Development Status :: 4 - Beta',
'Environment :: Web Environment',
'Intended Audience :: Developers',
'License :: OSI Approved :: BSD License',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Topic :: Utilities'
],
**kw
)
| Change the project name to glue, add the new public download_url | Change the project name to glue, add the new public download_url
| Python | bsd-3-clause | WillsB3/glue,zhiqinyigu/glue,jorgebastida/glue,dext0r/glue,beni55/glue,jorgebastida/glue,zhiqinyigu/glue,dext0r/glue,WillsB3/glue,beni55/glue | python | ## Code Before:
try:
from setuptools import setup
kw = {'entry_points':
"""[console_scripts]\nglue = glue:main\n""",
'zip_safe': False}
except ImportError:
from distutils.core import setup
kw = {'scripts': ['glue.py']}
setup(
name='Glue',
version='0.1',
url='http://glue.github.com/',
license='BSD',
author='Jorge Bastida',
author_email='me@jorgebastida.com',
description='Glue is a simple command line tool to generate CSS sprites.',
long_description=('Glue is a simple command line tool to generate CSS '
'sprites.'),
py_modules=['glue'],
include_package_data=True,
platforms='any',
install_requires=[
'PIL>=1.1.6'
],
classifiers=[
'Development Status :: 4 - Beta',
'Environment :: Web Environment',
'Intended Audience :: Developers',
'License :: OSI Approved :: BSD License',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Topic :: Utilities'
],
**kw
)
## Instruction:
Change the project name to glue, add the new public download_url
## Code After:
try:
from setuptools import setup
kw = {'entry_points':
"""[console_scripts]\nglue = glue:main\n""",
'zip_safe': False}
except ImportError:
from distutils.core import setup
kw = {'scripts': ['glue.py']}
setup(
name='glue',
version='0.1.1',
url='https://github.com/jorgebastida/glue',
dowload_url='https://nodeload.github.com/jorgebastida/glue/zipball/master',
license='BSD',
author='Jorge Bastida',
author_email='me@jorgebastida.com',
description='Glue is a simple command line tool to generate CSS sprites.',
long_description=('Glue is a simple command line tool to generate CSS '
'sprites.'),
py_modules=['glue'],
include_package_data=True,
platforms='any',
install_requires=[
'PIL>=1.1.6'
],
classifiers=[
'Development Status :: 4 - Beta',
'Environment :: Web Environment',
'Intended Audience :: Developers',
'License :: OSI Approved :: BSD License',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Topic :: Utilities'
],
**kw
)
|
try:
from setuptools import setup
kw = {'entry_points':
"""[console_scripts]\nglue = glue:main\n""",
'zip_safe': False}
except ImportError:
from distutils.core import setup
kw = {'scripts': ['glue.py']}
setup(
- name='Glue',
? ^
+ name='glue',
? ^
- version='0.1',
+ version='0.1.1',
? ++
- url='http://glue.github.com/',
+ url='https://github.com/jorgebastida/glue',
+ dowload_url='https://nodeload.github.com/jorgebastida/glue/zipball/master',
license='BSD',
author='Jorge Bastida',
author_email='me@jorgebastida.com',
description='Glue is a simple command line tool to generate CSS sprites.',
long_description=('Glue is a simple command line tool to generate CSS '
'sprites.'),
py_modules=['glue'],
include_package_data=True,
platforms='any',
install_requires=[
'PIL>=1.1.6'
],
classifiers=[
'Development Status :: 4 - Beta',
'Environment :: Web Environment',
'Intended Audience :: Developers',
'License :: OSI Approved :: BSD License',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Topic :: Utilities'
],
**kw
) | 7 | 0.189189 | 4 | 3 |
16bc6761b74ed33dec78a2e9f97deb3b858192ac | package.json | package.json | {
"name": "trinity-cli",
"version": "0.0.1",
"description": "",
"main": "trinity.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
"type": "git",
"url": "git@github.com-satoshinaire:Satoshinaire/trinity-cli.git"
},
"author": "Satoshinaire",
"license": "MIT",
"dependencies": {
"chalk": "^2.1.0",
"configstore": "^3.1.1",
"neon-js": "git+https://github.com/CityOfZion/neon-js.git",
"q": "^1.5.0",
"vorpal": "^1.12.0"
}
}
| {
"name": "trinity-cli",
"version": "0.0.1",
"description": "",
"main": "trinity.js",
"bin": {
"trinity": "trinity.js"
},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
"type": "git",
"url": "git@github.com-satoshinaire:Satoshinaire/trinity-cli.git"
},
"author": "Satoshinaire",
"license": "MIT",
"dependencies": {
"chalk": "^2.1.0",
"configstore": "^3.1.1",
"neon-js": "git+https://github.com/CityOfZion/neon-js.git",
"q": "^1.5.0",
"vorpal": "^1.12.0"
}
}
| Add bin entry for global cli install | Add bin entry for global cli install
| JSON | mit | Satoshinaire/trinity-cli | json | ## Code Before:
{
"name": "trinity-cli",
"version": "0.0.1",
"description": "",
"main": "trinity.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
"type": "git",
"url": "git@github.com-satoshinaire:Satoshinaire/trinity-cli.git"
},
"author": "Satoshinaire",
"license": "MIT",
"dependencies": {
"chalk": "^2.1.0",
"configstore": "^3.1.1",
"neon-js": "git+https://github.com/CityOfZion/neon-js.git",
"q": "^1.5.0",
"vorpal": "^1.12.0"
}
}
## Instruction:
Add bin entry for global cli install
## Code After:
{
"name": "trinity-cli",
"version": "0.0.1",
"description": "",
"main": "trinity.js",
"bin": {
"trinity": "trinity.js"
},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
"type": "git",
"url": "git@github.com-satoshinaire:Satoshinaire/trinity-cli.git"
},
"author": "Satoshinaire",
"license": "MIT",
"dependencies": {
"chalk": "^2.1.0",
"configstore": "^3.1.1",
"neon-js": "git+https://github.com/CityOfZion/neon-js.git",
"q": "^1.5.0",
"vorpal": "^1.12.0"
}
}
| {
"name": "trinity-cli",
"version": "0.0.1",
"description": "",
"main": "trinity.js",
+ "bin": {
+ "trinity": "trinity.js"
+ },
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
"type": "git",
"url": "git@github.com-satoshinaire:Satoshinaire/trinity-cli.git"
},
"author": "Satoshinaire",
"license": "MIT",
"dependencies": {
"chalk": "^2.1.0",
"configstore": "^3.1.1",
"neon-js": "git+https://github.com/CityOfZion/neon-js.git",
"q": "^1.5.0",
"vorpal": "^1.12.0"
}
} | 3 | 0.136364 | 3 | 0 |
12afe43b0f2599b0c79fab8bb0af454ccf16e57f | gittip/orm/__init__.py | gittip/orm/__init__.py | from __future__ import unicode_literals
import os
from sqlalchemy import create_engine, MetaData
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import sessionmaker, scoped_session
class SQLAlchemy(object):
def __init__(self):
self.session = self.create_session()
@property
def engine(self):
dburl = os.environ['DATABASE_URL']
return create_engine(dburl)
def create_session(self):
session = scoped_session(sessionmaker())
session.configure(bind=self.engine)
return session
db = SQLAlchemy()
class Model(object):
def __repr__(self):
cols = self.__mapper__.c.keys()
class_name = self.__class__.__name__
items = ', '.join(['%s=%s' % (col, repr(getattr(self, col))) for col
in cols])
return '%s(%s)' % (class_name, items)
def attrs_dict(self):
keys = self.__mapper__.c.keys()
attrs = {}
for key in keys:
attrs[key] = getattr(self, key)
return attrs
def save(self):
db.session.add(self)
db.session.commit()
def delete(self):
db.session.delete(self)
db.session.commit()
Base = declarative_base(cls=Model)
Base.metadata.bind = db.engine
Base.query = db.session.query_property()
metadata = MetaData()
metadata.bind = db.engine
all = [Base, db, metadata]
def rollback(*_):
db.session.rollback() | from __future__ import unicode_literals
import os
import pdb
from sqlalchemy import create_engine, MetaData
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import sessionmaker, scoped_session
class Model(object):
def __repr__(self):
cols = self.__mapper__.c.keys()
class_name = self.__class__.__name__
items = ', '.join(['%s=%s' % (col, repr(getattr(self, col))) for col
in cols])
return '%s(%s)' % (class_name, items)
def attrs_dict(self):
keys = self.__mapper__.c.keys()
attrs = {}
for key in keys:
attrs[key] = getattr(self, key)
return attrs
class SQLAlchemy(object):
def __init__(self):
self.session = self.create_session()
self.Model = self.make_declarative_base()
@property
def engine(self):
dburl = os.environ['DATABASE_URL']
return create_engine(dburl)
def create_session(self):
session = scoped_session(sessionmaker())
session.configure(bind=self.engine)
return session
def make_declarative_base(self):
base = declarative_base(cls=Model)
base.query = self.session.query_property()
return base
db = SQLAlchemy()
all = [db]
def rollback(*_):
db.session.rollback() | Remove the convenience functions, reorganize around the SQLAlchemy class | Remove the convenience functions, reorganize around the SQLAlchemy class
| Python | cc0-1.0 | bountysource/www.gittip.com,eXcomm/gratipay.com,bountysource/www.gittip.com,studio666/gratipay.com,mccolgst/www.gittip.com,MikeFair/www.gittip.com,bountysource/www.gittip.com,gratipay/gratipay.com,studio666/gratipay.com,studio666/gratipay.com,gratipay/gratipay.com,MikeFair/www.gittip.com,mccolgst/www.gittip.com,mccolgst/www.gittip.com,eXcomm/gratipay.com,eXcomm/gratipay.com,bountysource/www.gittip.com,eXcomm/gratipay.com,gratipay/gratipay.com,mccolgst/www.gittip.com,gratipay/gratipay.com,MikeFair/www.gittip.com,studio666/gratipay.com | python | ## Code Before:
from __future__ import unicode_literals
import os
from sqlalchemy import create_engine, MetaData
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import sessionmaker, scoped_session
class SQLAlchemy(object):
def __init__(self):
self.session = self.create_session()
@property
def engine(self):
dburl = os.environ['DATABASE_URL']
return create_engine(dburl)
def create_session(self):
session = scoped_session(sessionmaker())
session.configure(bind=self.engine)
return session
db = SQLAlchemy()
class Model(object):
def __repr__(self):
cols = self.__mapper__.c.keys()
class_name = self.__class__.__name__
items = ', '.join(['%s=%s' % (col, repr(getattr(self, col))) for col
in cols])
return '%s(%s)' % (class_name, items)
def attrs_dict(self):
keys = self.__mapper__.c.keys()
attrs = {}
for key in keys:
attrs[key] = getattr(self, key)
return attrs
def save(self):
db.session.add(self)
db.session.commit()
def delete(self):
db.session.delete(self)
db.session.commit()
Base = declarative_base(cls=Model)
Base.metadata.bind = db.engine
Base.query = db.session.query_property()
metadata = MetaData()
metadata.bind = db.engine
all = [Base, db, metadata]
def rollback(*_):
db.session.rollback()
## Instruction:
Remove the convenience functions, reorganize around the SQLAlchemy class
## Code After:
from __future__ import unicode_literals
import os
import pdb
from sqlalchemy import create_engine, MetaData
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import sessionmaker, scoped_session
class Model(object):
def __repr__(self):
cols = self.__mapper__.c.keys()
class_name = self.__class__.__name__
items = ', '.join(['%s=%s' % (col, repr(getattr(self, col))) for col
in cols])
return '%s(%s)' % (class_name, items)
def attrs_dict(self):
keys = self.__mapper__.c.keys()
attrs = {}
for key in keys:
attrs[key] = getattr(self, key)
return attrs
class SQLAlchemy(object):
def __init__(self):
self.session = self.create_session()
self.Model = self.make_declarative_base()
@property
def engine(self):
dburl = os.environ['DATABASE_URL']
return create_engine(dburl)
def create_session(self):
session = scoped_session(sessionmaker())
session.configure(bind=self.engine)
return session
def make_declarative_base(self):
base = declarative_base(cls=Model)
base.query = self.session.query_property()
return base
db = SQLAlchemy()
all = [db]
def rollback(*_):
db.session.rollback() | from __future__ import unicode_literals
import os
+ import pdb
from sqlalchemy import create_engine, MetaData
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import sessionmaker, scoped_session
-
- class SQLAlchemy(object):
- def __init__(self):
- self.session = self.create_session()
-
- @property
- def engine(self):
- dburl = os.environ['DATABASE_URL']
- return create_engine(dburl)
-
- def create_session(self):
- session = scoped_session(sessionmaker())
- session.configure(bind=self.engine)
- return session
-
- db = SQLAlchemy()
class Model(object):
def __repr__(self):
cols = self.__mapper__.c.keys()
class_name = self.__class__.__name__
items = ', '.join(['%s=%s' % (col, repr(getattr(self, col))) for col
in cols])
return '%s(%s)' % (class_name, items)
def attrs_dict(self):
keys = self.__mapper__.c.keys()
attrs = {}
for key in keys:
attrs[key] = getattr(self, key)
return attrs
- def save(self):
- db.session.add(self)
- db.session.commit()
+ class SQLAlchemy(object):
+ def __init__(self):
+ self.session = self.create_session()
+ self.Model = self.make_declarative_base()
+ @property
- def delete(self):
? - ^^^
+ def engine(self):
? ^^^^
- db.session.delete(self)
- db.session.commit()
+ dburl = os.environ['DATABASE_URL']
+ return create_engine(dburl)
- Base = declarative_base(cls=Model)
- Base.metadata.bind = db.engine
- Base.query = db.session.query_property()
+ def create_session(self):
+ session = scoped_session(sessionmaker())
+ session.configure(bind=self.engine)
+ return session
- metadata = MetaData()
- metadata.bind = db.engine
+ def make_declarative_base(self):
+ base = declarative_base(cls=Model)
+ base.query = self.session.query_property()
+ return base
- all = [Base, db, metadata]
+ db = SQLAlchemy()
+ all = [db]
def rollback(*_):
db.session.rollback() | 47 | 0.810345 | 19 | 28 |
4d44198b325e60e903a3e7727ff36c04987ec95a | Http/class.WebErrorHandler.php | Http/class.WebErrorHandler.php | <?php
namespace Http;
class WebErrorHandler
{
public function __invoke($request, $response, $exception)
{
if($exception->getCode() === \Http\Rest\ACCESS_DENIED)
{
return $response->withStatus(401);
}
return $response
->withStatus(500)
->withHeader('Content-Type', 'text/html')
->write($exception->__toString());
}
}
| <?php
namespace Http;
class WebErrorHandler
{
public function __invoke($request, $response, $exception)
{
if($exception->getCode() === \Http\Rest\ACCESS_DENIED)
{
$response->getBody()->write('You are not authorized to view this page. The most common cause of this is that you are not logged in to the website. Please log in then try again');
return $response->withStatus(401);
}
return $response
->withStatus(500)
->withHeader('Content-Type', 'text/html')
->write($exception->__toString());
}
}
| Update generic error handler to include not logged in message | Update generic error handler to include not logged in message
| PHP | apache-2.0 | BurningFlipside/CommonCode,BurningFlipside/CommonCode,BurningFlipside/CommonCode,BurningFlipside/CommonCode | php | ## Code Before:
<?php
namespace Http;
class WebErrorHandler
{
public function __invoke($request, $response, $exception)
{
if($exception->getCode() === \Http\Rest\ACCESS_DENIED)
{
return $response->withStatus(401);
}
return $response
->withStatus(500)
->withHeader('Content-Type', 'text/html')
->write($exception->__toString());
}
}
## Instruction:
Update generic error handler to include not logged in message
## Code After:
<?php
namespace Http;
class WebErrorHandler
{
public function __invoke($request, $response, $exception)
{
if($exception->getCode() === \Http\Rest\ACCESS_DENIED)
{
$response->getBody()->write('You are not authorized to view this page. The most common cause of this is that you are not logged in to the website. Please log in then try again');
return $response->withStatus(401);
}
return $response
->withStatus(500)
->withHeader('Content-Type', 'text/html')
->write($exception->__toString());
}
}
| <?php
namespace Http;
class WebErrorHandler
{
public function __invoke($request, $response, $exception)
{
if($exception->getCode() === \Http\Rest\ACCESS_DENIED)
{
+ $response->getBody()->write('You are not authorized to view this page. The most common cause of this is that you are not logged in to the website. Please log in then try again');
return $response->withStatus(401);
}
return $response
->withStatus(500)
->withHeader('Content-Type', 'text/html')
->write($exception->__toString());
}
} | 1 | 0.058824 | 1 | 0 |
a301ff4a5639102c17d9227571863a675b078f5e | bin/save-version.sh | bin/save-version.sh | VERSION=2.8.0-cdh5-INTERNAL
GIT_HASH=$(git rev-parse HEAD)
BUILD_TIME=`date`
HEADER="# Generated version information from save-version.sh"
echo -e \
"${HEADER}\nVERSION: ${VERSION}\nGIT_HASH: ${GIT_HASH}\nBUILD_TIME: ${BUILD_TIME}"\
> $IMPALA_HOME/bin/version.info
cat $IMPALA_HOME/bin/version.info
| VERSION=2.7.0
GIT_HASH=$(git rev-parse HEAD)
BUILD_TIME=`date`
HEADER="# Generated version information from save-version.sh"
echo -e \
"${HEADER}\nVERSION: ${VERSION}\nGIT_HASH: ${GIT_HASH}\nBUILD_TIME: ${BUILD_TIME}"\
> $IMPALA_HOME/bin/version.info
cat $IMPALA_HOME/bin/version.info
| Remove 'cdh' from version string | IMPALA-4116: Remove 'cdh' from version string
Change-Id: I7754538a23e73dcdebc6e3df509f357cbe03198c
Reviewed-on: http://gerrit.cloudera.org:8080/4421
Reviewed-by: Jim Apple <9e3620e7251463d214b5f536438d2c9ea899162d@cloudera.com>
Tested-by: Internal Jenkins
| Shell | apache-2.0 | cloudera/Impala,michaelhkw/incubator-impala,michaelhkw/incubator-impala,michaelhkw/incubator-impala,cloudera/Impala,cloudera/Impala,michaelhkw/incubator-impala,michaelhkw/incubator-impala,michaelhkw/incubator-impala,cloudera/Impala,michaelhkw/incubator-impala,cloudera/Impala,cloudera/Impala,cloudera/Impala | shell | ## Code Before:
VERSION=2.8.0-cdh5-INTERNAL
GIT_HASH=$(git rev-parse HEAD)
BUILD_TIME=`date`
HEADER="# Generated version information from save-version.sh"
echo -e \
"${HEADER}\nVERSION: ${VERSION}\nGIT_HASH: ${GIT_HASH}\nBUILD_TIME: ${BUILD_TIME}"\
> $IMPALA_HOME/bin/version.info
cat $IMPALA_HOME/bin/version.info
## Instruction:
IMPALA-4116: Remove 'cdh' from version string
Change-Id: I7754538a23e73dcdebc6e3df509f357cbe03198c
Reviewed-on: http://gerrit.cloudera.org:8080/4421
Reviewed-by: Jim Apple <9e3620e7251463d214b5f536438d2c9ea899162d@cloudera.com>
Tested-by: Internal Jenkins
## Code After:
VERSION=2.7.0
GIT_HASH=$(git rev-parse HEAD)
BUILD_TIME=`date`
HEADER="# Generated version information from save-version.sh"
echo -e \
"${HEADER}\nVERSION: ${VERSION}\nGIT_HASH: ${GIT_HASH}\nBUILD_TIME: ${BUILD_TIME}"\
> $IMPALA_HOME/bin/version.info
cat $IMPALA_HOME/bin/version.info
| - VERSION=2.8.0-cdh5-INTERNAL
+ VERSION=2.7.0
GIT_HASH=$(git rev-parse HEAD)
BUILD_TIME=`date`
HEADER="# Generated version information from save-version.sh"
echo -e \
"${HEADER}\nVERSION: ${VERSION}\nGIT_HASH: ${GIT_HASH}\nBUILD_TIME: ${BUILD_TIME}"\
> $IMPALA_HOME/bin/version.info
cat $IMPALA_HOME/bin/version.info | 2 | 0.222222 | 1 | 1 |
84223d36a3f8e050b5923f842889b66369afff0c | app/overrides/layouts_admin_print_buttons_decorator.rb | app/overrides/layouts_admin_print_buttons_decorator.rb | Deface::Override.new(:virtual_path => "spree/layouts/admin",
:name => "print_buttons",
:insert_top => "[data-hook='toolbar']>ul",
:partial => "spree/admin/orders/print_buttons",
:disabled => false)
| Deface::Override.new(:virtual_path => "spree/admin/shared/_content_header",
:name => "print_buttons",
:insert_top => "[data-hook='toolbar']>ul",
:partial => "spree/admin/orders/print_buttons",
:disabled => false)
| Correct virtual_path for print buttons override | Correct virtual_path for print buttons override
Fixes #34
| Ruby | bsd-3-clause | tgfi/spree_print_invoice,firmanm/spree_print_invoice,maximedelpit/spree_print_invoice,FadliKun/spree_print_invoice,adaddeo/spree_print_invoice,nebulab/spree_print_invoice,spree-contrib/spree_print_invoice,madetech/spree_print_invoice,FadliKun/spree_print_invoice,nebulab/spree_print_invoice,heritageid/invoice,fajrif/spree_print_invoice,madetech/spree_print_invoice,adaddeo/spree_print_invoice,simo163/solidus_print_invoice,MercaFly/spree_print_invoice,maximedelpit/spree_print_invoice,sunny2601/spree_print_invoice,spree-contrib/spree_print_invoice,firmanm/spree_print_invoice,tgfi/spree_print_invoice,simo163/solidus_print_invoice,fajrif/spree_print_invoice,sunny2601/spree_print_invoice,spree-contrib/spree_print_invoice,tgfi/spree_print_invoice,heritageid/invoice,sunny2601/spree_print_invoice,madetech/spree_print_invoice,maximedelpit/spree_print_invoice,simo163/solidus_print_invoice,FadliKun/spree_print_invoice,firmanm/spree_print_invoice,MercaFly/spree_print_invoice,nebulab/spree_print_invoice,MercaFly/spree_print_invoice,heritageid/invoice,fajrif/spree_print_invoice | ruby | ## Code Before:
Deface::Override.new(:virtual_path => "spree/layouts/admin",
:name => "print_buttons",
:insert_top => "[data-hook='toolbar']>ul",
:partial => "spree/admin/orders/print_buttons",
:disabled => false)
## Instruction:
Correct virtual_path for print buttons override
Fixes #34
## Code After:
Deface::Override.new(:virtual_path => "spree/admin/shared/_content_header",
:name => "print_buttons",
:insert_top => "[data-hook='toolbar']>ul",
:partial => "spree/admin/orders/print_buttons",
:disabled => false)
| - Deface::Override.new(:virtual_path => "spree/layouts/admin",
? --------
+ Deface::Override.new(:virtual_path => "spree/admin/shared/_content_header",
? +++++++++++++++++++++++
:name => "print_buttons",
:insert_top => "[data-hook='toolbar']>ul",
:partial => "spree/admin/orders/print_buttons",
:disabled => false) | 2 | 0.4 | 1 | 1 |
a9b0b9d4917dbdb37708a21e6829cc72e4656028 | Tests/ParadigmComponents/ListReplicator/FilenamesExpression/Complex.TESTDATA.xml | Tests/ParadigmComponents/ListReplicator/FilenamesExpression/Complex.TESTDATA.xml | <?xml version="1.0"?>
<marionette_info>
<expected_messages>
<message type="starts_with">"foo" (</message>
<message type="contains">/dir1/1.png (</message>
<message type="contains">/dir1/2.png (</message>
<message type="contains">/dir1/3.png (</message>
<message type="contains">/dir1/4.png (</message>
<message type="starts_with">3.2 (</message>
<message type="contains">/dir2/5.png (</message>
<message type="contains">/dir2/6.png (</message>
<message type="contains">/dir2/7.png (</message>
</expected_messages>
</marionette_info>
| <?xml version="1.0"?>
<marionette_info>
<expected_messages>
<message type="starts_with">"foo" (</message>
<message type="starts_with">dir1/1.png (</message>
<message type="starts_with">dir1/2.png (</message>
<message type="starts_with">dir1/3.png (</message>
<message type="starts_with">dir1/4.png (</message>
<message type="starts_with">3.2 (</message>
<message type="starts_with">dir2/5.png (</message>
<message type="starts_with">dir2/6.png (</message>
<message type="starts_with">dir2/7.png (</message>
</expected_messages>
</marionette_info>
| Update for changes to filenames() directive | Update for changes to filenames() directive
| XML | mit | mworks/mworks,mworks/mworks,mworks/mworks,mworks/mworks,mworks/mworks,mworks/mworks,mworks/mworks,mworks/mworks,mworks/mworks | xml | ## Code Before:
<?xml version="1.0"?>
<marionette_info>
<expected_messages>
<message type="starts_with">"foo" (</message>
<message type="contains">/dir1/1.png (</message>
<message type="contains">/dir1/2.png (</message>
<message type="contains">/dir1/3.png (</message>
<message type="contains">/dir1/4.png (</message>
<message type="starts_with">3.2 (</message>
<message type="contains">/dir2/5.png (</message>
<message type="contains">/dir2/6.png (</message>
<message type="contains">/dir2/7.png (</message>
</expected_messages>
</marionette_info>
## Instruction:
Update for changes to filenames() directive
## Code After:
<?xml version="1.0"?>
<marionette_info>
<expected_messages>
<message type="starts_with">"foo" (</message>
<message type="starts_with">dir1/1.png (</message>
<message type="starts_with">dir1/2.png (</message>
<message type="starts_with">dir1/3.png (</message>
<message type="starts_with">dir1/4.png (</message>
<message type="starts_with">3.2 (</message>
<message type="starts_with">dir2/5.png (</message>
<message type="starts_with">dir2/6.png (</message>
<message type="starts_with">dir2/7.png (</message>
</expected_messages>
</marionette_info>
| <?xml version="1.0"?>
<marionette_info>
<expected_messages>
<message type="starts_with">"foo" (</message>
- <message type="contains">/dir1/1.png (</message>
? ^^^ ^^ -
+ <message type="starts_with">dir1/1.png (</message>
? ^ +++++ ^^
- <message type="contains">/dir1/2.png (</message>
? ^^^ ^^ -
+ <message type="starts_with">dir1/2.png (</message>
? ^ +++++ ^^
- <message type="contains">/dir1/3.png (</message>
? ^^^ ^^ -
+ <message type="starts_with">dir1/3.png (</message>
? ^ +++++ ^^
- <message type="contains">/dir1/4.png (</message>
? ^^^ ^^ -
+ <message type="starts_with">dir1/4.png (</message>
? ^ +++++ ^^
<message type="starts_with">3.2 (</message>
- <message type="contains">/dir2/5.png (</message>
? ^^^ ^^ -
+ <message type="starts_with">dir2/5.png (</message>
? ^ +++++ ^^
- <message type="contains">/dir2/6.png (</message>
? ^^^ ^^ -
+ <message type="starts_with">dir2/6.png (</message>
? ^ +++++ ^^
- <message type="contains">/dir2/7.png (</message>
? ^^^ ^^ -
+ <message type="starts_with">dir2/7.png (</message>
? ^ +++++ ^^
</expected_messages>
</marionette_info> | 14 | 1 | 7 | 7 |
ce4175d3f1bef639b916997b9f6d229aff997fe9 | app/features/project/views/project_info.erb | app/features/project/views/project_info.erb | <table class="mdl-data-table mdl-js-data-table mdl-shadow--2dp">
<thead>
<tr>
<th>Status</th>
<th>Build Number</th>
<th>Triggered</th>
</tr>
</thead>
<tbody>
<% project.builds.each do |build| %>
<% url = "/projects_erb/#{project.id}/builds/#{build.number}" %>
<tr style="cursor: pointer;" onclick="location.href='<%= url %>'">
<td>
<%= erb(:"../../build/views/build_status", locals: { status: build.status }) %>
</td>
<td style="text-align: center;"><%= build.number %></td>
<td><%= build.timestamp.strftime("%Y%m%dT%H%M%S%z") %></td>
</tr>
<% end %>
</tbody>
</table>
| <table class="mdl-data-table mdl-js-data-table mdl-shadow--2dp">
<thead>
<tr>
<th>Status</th>
<th>Build Number</th>
<th>Started</th>
<th>Trigger</th>
</tr>
</thead>
<tbody>
<% project.builds.each do |build| %>
<% url = "/projects_erb/#{project.id}/builds/#{build.number}" %>
<tr style="cursor: pointer;" onclick="location.href='<%= url %>'">
<td>
<%= erb(:"../../build/views/build_status", locals: { status: build.status }) %>
</td>
<td style="text-align: center;">
<%= build.number %>
</td>
<td>
<%= build.timestamp.strftime("%Y%m%dT%H%M%S%z") %>
</td>
<td>
<a href="/projects_erb/<%= project.id %>/trigger?sha=<%= build.sha %>" class="mdl-button mdl-js-button mdl-button--raised mdl-js-ripple-effect mdl-button--accent">
Re-Run for this commit
</a>
</td>
</tr>
<% end %>
</tbody>
</table>
| Add a rerun button for each build | Add a rerun button for each build | HTML+ERB | mit | fastlane/ci,fastlane/ci,fastlane/ci,fastlane/ci,fastlane/ci | html+erb | ## Code Before:
<table class="mdl-data-table mdl-js-data-table mdl-shadow--2dp">
<thead>
<tr>
<th>Status</th>
<th>Build Number</th>
<th>Triggered</th>
</tr>
</thead>
<tbody>
<% project.builds.each do |build| %>
<% url = "/projects_erb/#{project.id}/builds/#{build.number}" %>
<tr style="cursor: pointer;" onclick="location.href='<%= url %>'">
<td>
<%= erb(:"../../build/views/build_status", locals: { status: build.status }) %>
</td>
<td style="text-align: center;"><%= build.number %></td>
<td><%= build.timestamp.strftime("%Y%m%dT%H%M%S%z") %></td>
</tr>
<% end %>
</tbody>
</table>
## Instruction:
Add a rerun button for each build
## Code After:
<table class="mdl-data-table mdl-js-data-table mdl-shadow--2dp">
<thead>
<tr>
<th>Status</th>
<th>Build Number</th>
<th>Started</th>
<th>Trigger</th>
</tr>
</thead>
<tbody>
<% project.builds.each do |build| %>
<% url = "/projects_erb/#{project.id}/builds/#{build.number}" %>
<tr style="cursor: pointer;" onclick="location.href='<%= url %>'">
<td>
<%= erb(:"../../build/views/build_status", locals: { status: build.status }) %>
</td>
<td style="text-align: center;">
<%= build.number %>
</td>
<td>
<%= build.timestamp.strftime("%Y%m%dT%H%M%S%z") %>
</td>
<td>
<a href="/projects_erb/<%= project.id %>/trigger?sha=<%= build.sha %>" class="mdl-button mdl-js-button mdl-button--raised mdl-js-ripple-effect mdl-button--accent">
Re-Run for this commit
</a>
</td>
</tr>
<% end %>
</tbody>
</table>
| <table class="mdl-data-table mdl-js-data-table mdl-shadow--2dp">
<thead>
<tr>
<th>Status</th>
<th>Build Number</th>
+ <th>Started</th>
- <th>Triggered</th>
? --
+ <th>Trigger</th>
</tr>
</thead>
<tbody>
<% project.builds.each do |build| %>
<% url = "/projects_erb/#{project.id}/builds/#{build.number}" %>
<tr style="cursor: pointer;" onclick="location.href='<%= url %>'">
<td>
<%= erb(:"../../build/views/build_status", locals: { status: build.status }) %>
</td>
- <td style="text-align: center;"><%= build.number %></td>
? ------------------------
+ <td style="text-align: center;">
+ <%= build.number %>
+ </td>
+ <td>
- <td><%= build.timestamp.strftime("%Y%m%dT%H%M%S%z") %></td>
? ^^^^ -----
+ <%= build.timestamp.strftime("%Y%m%dT%H%M%S%z") %>
? ^^
+ </td>
+ <td>
+ <a href="/projects_erb/<%= project.id %>/trigger?sha=<%= build.sha %>" class="mdl-button mdl-js-button mdl-button--raised mdl-js-ripple-effect mdl-button--accent">
+ Re-Run for this commit
+ </a>
+ </td>
</tr>
<% end %>
</tbody>
</table> | 16 | 0.761905 | 13 | 3 |
445fffddf0749bf65e5c97919fdea7d1c3ffe59e | nav-bar.php | nav-bar.php | <?php
if (!isset($_SESSION)) {
session_start();
}
?>
<!DOCTYPE html>
<html lang="en">
<?php
$beginning = '<div class="container"><nav class="navbar navbar-default "><div class="navbar-header">
<a class="navbar-brand">Navigation Bar </a>
</div><ul class="nav navbar-nav justified">';
$frontLink = '<li class="nav-item"> <a class="" href="';
$endLink = '</a></li>';
if (isset($_SESSION['user-type'])) {
echo $beginning;
$email = $_SESSION['email'];
switch ($_SESSION['user-type']) {
case 'doctor':
$result = getDoctorDetails($email);
$speciality = $result['speciality'];
echo $frontLink.'add_patient.php"> Add Patient '.$endLink;
echo $frontLink.'patient_info.php?speciality='.$speciality.'"> Upcomming Appointments '.$endLink;
break;
case 'clerk':
echo $frontLink.'add_patient.php"> Add Patient '.$endLink;
echo $frontLink.'patient_info.php"> All Appointments '.$endLink;
break;
default:
// code...
break;
}
echo '</ul> </nav></div>';
}
?>
| <?php
if (!isset($_SESSION)) {
session_start();
}
?>
<!DOCTYPE html>
<html lang="en">
<?php
$beginning = '<div class="container"><nav class="navbar navbar-default "><div class="navbar-header">
<a class="navbar-brand">Navigation Bar </a>
</div><ul class="nav navbar-nav justified">';
$frontLink = '<li class="nav-item"> <a class="" href="';
$endLink = '</a></li>';
if (isset($_SESSION['user-type'])) {
echo $beginning;
switch ($_SESSION['user-type']) {
case 'doctor':
$email = $_SESSION['email'];
$result = getDoctorDetails($email);
$speciality = $result['speciality'];
echo $frontLink.'add_patient.php"> Add Patient '.$endLink;
echo $frontLink.'patient_info.php?speciality='.$speciality.'"> Upcomming Appointments '.$endLink;
break;
case 'clerk':
echo $frontLink.'add_patient.php"> Add Patient '.$endLink;
echo $frontLink.'patient_info.php"> All Appointments '.$endLink;
break;
default:
// code...
break;
}
echo '</ul> </nav></div>';
}
?>
| Fix errors showing up because 'email' is not set | Fix errors showing up because 'email' is not set
| PHP | mit | ankschoubey/hospital-management-system-php-mysql | php | ## Code Before:
<?php
if (!isset($_SESSION)) {
session_start();
}
?>
<!DOCTYPE html>
<html lang="en">
<?php
$beginning = '<div class="container"><nav class="navbar navbar-default "><div class="navbar-header">
<a class="navbar-brand">Navigation Bar </a>
</div><ul class="nav navbar-nav justified">';
$frontLink = '<li class="nav-item"> <a class="" href="';
$endLink = '</a></li>';
if (isset($_SESSION['user-type'])) {
echo $beginning;
$email = $_SESSION['email'];
switch ($_SESSION['user-type']) {
case 'doctor':
$result = getDoctorDetails($email);
$speciality = $result['speciality'];
echo $frontLink.'add_patient.php"> Add Patient '.$endLink;
echo $frontLink.'patient_info.php?speciality='.$speciality.'"> Upcomming Appointments '.$endLink;
break;
case 'clerk':
echo $frontLink.'add_patient.php"> Add Patient '.$endLink;
echo $frontLink.'patient_info.php"> All Appointments '.$endLink;
break;
default:
// code...
break;
}
echo '</ul> </nav></div>';
}
?>
## Instruction:
Fix errors showing up because 'email' is not set
## Code After:
<?php
if (!isset($_SESSION)) {
session_start();
}
?>
<!DOCTYPE html>
<html lang="en">
<?php
$beginning = '<div class="container"><nav class="navbar navbar-default "><div class="navbar-header">
<a class="navbar-brand">Navigation Bar </a>
</div><ul class="nav navbar-nav justified">';
$frontLink = '<li class="nav-item"> <a class="" href="';
$endLink = '</a></li>';
if (isset($_SESSION['user-type'])) {
echo $beginning;
switch ($_SESSION['user-type']) {
case 'doctor':
$email = $_SESSION['email'];
$result = getDoctorDetails($email);
$speciality = $result['speciality'];
echo $frontLink.'add_patient.php"> Add Patient '.$endLink;
echo $frontLink.'patient_info.php?speciality='.$speciality.'"> Upcomming Appointments '.$endLink;
break;
case 'clerk':
echo $frontLink.'add_patient.php"> Add Patient '.$endLink;
echo $frontLink.'patient_info.php"> All Appointments '.$endLink;
break;
default:
// code...
break;
}
echo '</ul> </nav></div>';
}
?>
| <?php
if (!isset($_SESSION)) {
session_start();
}
?>
<!DOCTYPE html>
<html lang="en">
<?php
$beginning = '<div class="container"><nav class="navbar navbar-default "><div class="navbar-header">
<a class="navbar-brand">Navigation Bar </a>
</div><ul class="nav navbar-nav justified">';
$frontLink = '<li class="nav-item"> <a class="" href="';
$endLink = '</a></li>';
if (isset($_SESSION['user-type'])) {
echo $beginning;
- $email = $_SESSION['email'];
switch ($_SESSION['user-type']) {
case 'doctor':
+ $email = $_SESSION['email'];
$result = getDoctorDetails($email);
$speciality = $result['speciality'];
echo $frontLink.'add_patient.php"> Add Patient '.$endLink;
echo $frontLink.'patient_info.php?speciality='.$speciality.'"> Upcomming Appointments '.$endLink;
break;
case 'clerk':
echo $frontLink.'add_patient.php"> Add Patient '.$endLink;
echo $frontLink.'patient_info.php"> All Appointments '.$endLink;
break;
default:
// code...
break;
}
echo '</ul> </nav></div>';
}
?> | 2 | 0.052632 | 1 | 1 |
c93a91ffe1482075edf9af00001d25401a32d525 | lib/cfi/CMakeLists.txt | lib/cfi/CMakeLists.txt | add_custom_target(cfi)
add_compiler_rt_resource_file(cfi_blacklist cfi_blacklist.txt)
add_dependencies(cfi cfi_blacklist)
| add_custom_target(cfi)
add_compiler_rt_resource_file(cfi_blacklist cfi_blacklist.txt)
add_dependencies(cfi cfi_blacklist)
add_dependencies(compiler-rt cfi)
| Make the cfi target a dependency of compiler-rt. | CFI: Make the cfi target a dependency of compiler-rt.
This causes the blacklist to be copied into place as a default build step.
git-svn-id: c199f293c43da69278bea8e88f92242bf3aa95f7@246617 91177308-0d34-0410-b5e6-96231b3b80d8
| Text | apache-2.0 | llvm-mirror/compiler-rt,llvm-mirror/compiler-rt,llvm-mirror/compiler-rt,llvm-mirror/compiler-rt,llvm-mirror/compiler-rt | text | ## Code Before:
add_custom_target(cfi)
add_compiler_rt_resource_file(cfi_blacklist cfi_blacklist.txt)
add_dependencies(cfi cfi_blacklist)
## Instruction:
CFI: Make the cfi target a dependency of compiler-rt.
This causes the blacklist to be copied into place as a default build step.
git-svn-id: c199f293c43da69278bea8e88f92242bf3aa95f7@246617 91177308-0d34-0410-b5e6-96231b3b80d8
## Code After:
add_custom_target(cfi)
add_compiler_rt_resource_file(cfi_blacklist cfi_blacklist.txt)
add_dependencies(cfi cfi_blacklist)
add_dependencies(compiler-rt cfi)
| add_custom_target(cfi)
add_compiler_rt_resource_file(cfi_blacklist cfi_blacklist.txt)
add_dependencies(cfi cfi_blacklist)
+ add_dependencies(compiler-rt cfi) | 1 | 0.333333 | 1 | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.