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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
d09fe39a06b45f9aeea41d3b820b98834e620286 | README.md | README.md |
----
[](https://travis-ci.org/phOnion/framework)
[](https://codecov.io/gh/phOnion/framework)
|
----
[](https://travis-ci.org/phOnion/framework)
[](https://styleci.io/repos/66286844)
[](https://codecov.io/gh/phOnion/framework)
[](https://www.codacy.com/app/daghostman-dimitrov/framework?utm_source=github.com&utm_medium=referral&utm_content=phOnion/framework&utm_campaign=Badge_Grade)
| Add codacy and styleci badges | Add codacy and styleci badges
| Markdown | mit | phOnion/framework | markdown | ## Code Before:
----
[](https://travis-ci.org/phOnion/framework)
[](https://codecov.io/gh/phOnion/framework)
## Instruction:
Add codacy and styleci badges
## Code After:
----
[](https://travis-ci.org/phOnion/framework)
[](https://styleci.io/repos/66286844)
[](https://codecov.io/gh/phOnion/framework)
[](https://www.codacy.com/app/daghostman-dimitrov/framework?utm_source=github.com&utm_medium=referral&utm_content=phOnion/framework&utm_campaign=Badge_Grade)
|
----
[](https://travis-ci.org/phOnion/framework)
+ [](https://styleci.io/repos/66286844)
[](https://codecov.io/gh/phOnion/framework)
+ [](https://www.codacy.com/app/daghostman-dimitrov/framework?utm_source=github.com&utm_medium=referral&utm_content=phOnion/framework&utm_campaign=Badge_Grade) | 2 | 0.4 | 2 | 0 |
59fc5243dc14500654965db25a1b865a22552b71 | csunplugged/static/scss/bootstrap/_custom.scss | csunplugged/static/scss/bootstrap/_custom.scss | // Bootstrap overrides
//
// Copy variables from `_variables.scss` to this file to override default values
// without modifying source files.
| // Bootstrap overrides
//
// Copy variables from `_variables.scss` to this file to override default values
// without modifying source files.
// Breadcrumbs
$breadcrumb-bg: $white;
| Set breadcrumb background to white | Set breadcrumb background to white
This uses the provided Bootstrap 4's
_custom.scss file.
| SCSS | mit | uccser/cs-unplugged,uccser/cs-unplugged,uccser/cs-unplugged,uccser/cs-unplugged | scss | ## Code Before:
// Bootstrap overrides
//
// Copy variables from `_variables.scss` to this file to override default values
// without modifying source files.
## Instruction:
Set breadcrumb background to white
This uses the provided Bootstrap 4's
_custom.scss file.
## Code After:
// Bootstrap overrides
//
// Copy variables from `_variables.scss` to this file to override default values
// without modifying source files.
// Breadcrumbs
$breadcrumb-bg: $white;
| // Bootstrap overrides
//
// Copy variables from `_variables.scss` to this file to override default values
// without modifying source files.
+
+ // Breadcrumbs
+
+ $breadcrumb-bg: $white; | 4 | 1 | 4 | 0 |
f6d374e887c52c7a4ede780fa3b2136b9df5710f | app/views/renalware/renal/aki_alerts/_table.html.slim | app/views/renalware/renal/aki_alerts/_table.html.slim | table.aki-alerts
thead
th.col-width-small
th.col-width-large Patient
th.col-width-reference-no Hosp. No.
th.col-width-small.show-for-large-up
= sort_link([:renalware, search], :patient_current_modality_description_name, "Modality")
th.col-width-tiny Sex
th.col-width-tiny Age
th= sort_link(search, :action_name, "Action")
th.col-width-medium Ward
th= sort_link(search, :hotlist, "Hotlist")
th= sort_link(search, :max_aki, "Max AKI")
th.col-width-date= sort_link(search, :aki_date, "AKI Date")
th Decided by
tbody
= render alerts
| table.aki-alerts
thead
th.col-width-small
th.col-width-large= sort_link(search, :patient_family_name, "Patient")
th.col-width-reference-no Hosp. No.
th.col-width-small.show-for-large-up
= sort_link([:renalware, search], :patient_current_modality_description_name, "Modality")
th.col-width-tiny Sex
th.col-width-tiny Age
th= sort_link(search, :action_name, "Action")
th.col-width-medium Ward
th= sort_link(search, :hotlist, "Hotlist")
th= sort_link(search, :max_aki, "Max AKI")
th.col-width-date= sort_link(search, :aki_date, "AKI Date")
th Decided by
tbody
= render alerts
| Sort AKI Alerts on patient | Sort AKI Alerts on patient
| Slim | mit | airslie/renalware-core,airslie/renalware-core,airslie/renalware-core,airslie/renalware-core | slim | ## Code Before:
table.aki-alerts
thead
th.col-width-small
th.col-width-large Patient
th.col-width-reference-no Hosp. No.
th.col-width-small.show-for-large-up
= sort_link([:renalware, search], :patient_current_modality_description_name, "Modality")
th.col-width-tiny Sex
th.col-width-tiny Age
th= sort_link(search, :action_name, "Action")
th.col-width-medium Ward
th= sort_link(search, :hotlist, "Hotlist")
th= sort_link(search, :max_aki, "Max AKI")
th.col-width-date= sort_link(search, :aki_date, "AKI Date")
th Decided by
tbody
= render alerts
## Instruction:
Sort AKI Alerts on patient
## Code After:
table.aki-alerts
thead
th.col-width-small
th.col-width-large= sort_link(search, :patient_family_name, "Patient")
th.col-width-reference-no Hosp. No.
th.col-width-small.show-for-large-up
= sort_link([:renalware, search], :patient_current_modality_description_name, "Modality")
th.col-width-tiny Sex
th.col-width-tiny Age
th= sort_link(search, :action_name, "Action")
th.col-width-medium Ward
th= sort_link(search, :hotlist, "Hotlist")
th= sort_link(search, :max_aki, "Max AKI")
th.col-width-date= sort_link(search, :aki_date, "AKI Date")
th Decided by
tbody
= render alerts
| table.aki-alerts
thead
th.col-width-small
- th.col-width-large Patient
+ th.col-width-large= sort_link(search, :patient_family_name, "Patient")
th.col-width-reference-no Hosp. No.
th.col-width-small.show-for-large-up
= sort_link([:renalware, search], :patient_current_modality_description_name, "Modality")
th.col-width-tiny Sex
th.col-width-tiny Age
th= sort_link(search, :action_name, "Action")
th.col-width-medium Ward
th= sort_link(search, :hotlist, "Hotlist")
th= sort_link(search, :max_aki, "Max AKI")
th.col-width-date= sort_link(search, :aki_date, "AKI Date")
th Decided by
tbody
= render alerts | 2 | 0.117647 | 1 | 1 |
4a76f6f244830b6a040aa86189e7be05c5227fd3 | parts/bottom-alert.cjsx | parts/bottom-alert.cjsx | {Panel} = ReactBootstrap
module.exports = React.createClass
render: ->
<div>
{
if @props.getShip? or @props.getItem?
<Panel>
{"#{@props.getShip.api_ship_type} 「#{@props.getShip.api_ship_name}」 #{@props.joinFleet}"}
</Panel>
else if @props.formationNum != 0
<Panel>
{"#{@props.result} | #{@props.formation} | #{@props.intercept} | #{@props.seiku}"}
</Panel>
else if @props.nextSpotInfo
<Panel>
{"#{@props.compassPoint}: "}
<span className="compass">
{
if @props.compassAngle
# FontAwesome `location-arrow` points to north by east 45 degrees.
<FontAwesome name='location-arrow' fixedWidth={true}
style={transform: "rotate(#{@props.compassAngle - 45}deg)"} />
else
"?"
}
</span>
{" | #{@props.nextSpot}: #{@props.nextSpotInfo}"}
</Panel>
}
</div>
| {Panel} = ReactBootstrap
module.exports = React.createClass
render: ->
<div>
{
if @props.getShip? or @props.getItem?
prepend = ""
if @props.getItem?.api_useitem_id is 68
prepend = "摸鱼成功! "
<Panel>
{prepend + "#{@props.getShip.api_ship_type} 「#{@props.getShip.api_ship_name}」 #{@props.joinFleet}"}
</Panel>
else if @props.formationNum != 0
<Panel>
{"#{@props.result} | #{@props.formation} | #{@props.intercept} | #{@props.seiku}"}
</Panel>
else if @props.nextSpotInfo
<Panel>
{"#{@props.compassPoint}: "}
<span className="compass">
{
if @props.compassAngle
# FontAwesome `location-arrow` points to north by east 45 degrees.
<FontAwesome name='location-arrow' fixedWidth={true}
style={transform: "rotate(#{@props.compassAngle - 45}deg)"} />
else
"?"
}
</span>
{" | #{@props.nextSpot}: #{@props.nextSpotInfo}"}
</Panel>
}
</div>
| Add prophet get use item (2) | Add prophet get use item (2)
| CoffeeScript | mit | poooi/plugin-prophet | coffeescript | ## Code Before:
{Panel} = ReactBootstrap
module.exports = React.createClass
render: ->
<div>
{
if @props.getShip? or @props.getItem?
<Panel>
{"#{@props.getShip.api_ship_type} 「#{@props.getShip.api_ship_name}」 #{@props.joinFleet}"}
</Panel>
else if @props.formationNum != 0
<Panel>
{"#{@props.result} | #{@props.formation} | #{@props.intercept} | #{@props.seiku}"}
</Panel>
else if @props.nextSpotInfo
<Panel>
{"#{@props.compassPoint}: "}
<span className="compass">
{
if @props.compassAngle
# FontAwesome `location-arrow` points to north by east 45 degrees.
<FontAwesome name='location-arrow' fixedWidth={true}
style={transform: "rotate(#{@props.compassAngle - 45}deg)"} />
else
"?"
}
</span>
{" | #{@props.nextSpot}: #{@props.nextSpotInfo}"}
</Panel>
}
</div>
## Instruction:
Add prophet get use item (2)
## Code After:
{Panel} = ReactBootstrap
module.exports = React.createClass
render: ->
<div>
{
if @props.getShip? or @props.getItem?
prepend = ""
if @props.getItem?.api_useitem_id is 68
prepend = "摸鱼成功! "
<Panel>
{prepend + "#{@props.getShip.api_ship_type} 「#{@props.getShip.api_ship_name}」 #{@props.joinFleet}"}
</Panel>
else if @props.formationNum != 0
<Panel>
{"#{@props.result} | #{@props.formation} | #{@props.intercept} | #{@props.seiku}"}
</Panel>
else if @props.nextSpotInfo
<Panel>
{"#{@props.compassPoint}: "}
<span className="compass">
{
if @props.compassAngle
# FontAwesome `location-arrow` points to north by east 45 degrees.
<FontAwesome name='location-arrow' fixedWidth={true}
style={transform: "rotate(#{@props.compassAngle - 45}deg)"} />
else
"?"
}
</span>
{" | #{@props.nextSpot}: #{@props.nextSpotInfo}"}
</Panel>
}
</div>
| {Panel} = ReactBootstrap
module.exports = React.createClass
render: ->
<div>
{
if @props.getShip? or @props.getItem?
+ prepend = ""
+ if @props.getItem?.api_useitem_id is 68
+ prepend = "摸鱼成功! "
<Panel>
- {"#{@props.getShip.api_ship_type} 「#{@props.getShip.api_ship_name}」 #{@props.joinFleet}"}
+ {prepend + "#{@props.getShip.api_ship_type} 「#{@props.getShip.api_ship_name}」 #{@props.joinFleet}"}
? ++++++++++
</Panel>
else if @props.formationNum != 0
<Panel>
{"#{@props.result} | #{@props.formation} | #{@props.intercept} | #{@props.seiku}"}
</Panel>
else if @props.nextSpotInfo
<Panel>
{"#{@props.compassPoint}: "}
<span className="compass">
{
if @props.compassAngle
# FontAwesome `location-arrow` points to north by east 45 degrees.
<FontAwesome name='location-arrow' fixedWidth={true}
style={transform: "rotate(#{@props.compassAngle - 45}deg)"} />
else
"?"
}
</span>
{" | #{@props.nextSpot}: #{@props.nextSpotInfo}"}
</Panel>
}
</div> | 5 | 0.166667 | 4 | 1 |
9219ebea7c36ea6fc901535aa334d1063c3aab5d | resources/assets/lib/osu-layzr.ts | resources/assets/lib/osu-layzr.ts | // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the GNU Affero General Public License v3.0.
// See the LICENCE file in the repository root for full licence text.
import Layzr, { LayzrInstance } from 'layzr';
export default class OsuLayzr {
private layzr?: LayzrInstance;
private observer: MutationObserver;
constructor() {
this.observer = new MutationObserver(this.reinit);
$(document).on('turbolinks:load', this.init);
}
init = () => {
this.layzr ??= Layzr();
this.reinit();
this.observer.observe(document.body, { childList: true, subtree: true });
};
reinit = () => {
this.layzr?.update().check().handlers(true);
};
}
| // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the GNU Affero General Public License v3.0.
// See the LICENCE file in the repository root for full licence text.
import Layzr, { LayzrInstance } from 'layzr';
export default class OsuLayzr {
private layzr?: LayzrInstance;
private observer: MutationObserver;
constructor() {
this.observer = new MutationObserver(this.observePage);
this.observer.observe(document, { childList: true, subtree: true });
// Layzr depends on document.body which is only available after document is ready.
$(() => {
this.layzr ??= Layzr();
this.reinit();
});
}
private observePage = (mutations: MutationRecord[]) => {
if (this.layzr == null) return;
for (const mutation of mutations) {
for (const node of mutation.addedNodes) {
if (node instanceof HTMLElement && (node.dataset.normal != null || node.querySelector('[data-normal]') != null)) {
this.reinit();
return;
}
}
}
};
private reinit() {
this.layzr?.update().check().handlers(true);
}
}
| Reduce image lazy-loading related works | Reduce image lazy-loading related works
| TypeScript | agpl-3.0 | LiquidPL/osu-web,ppy/osu-web,notbakaneko/osu-web,nanaya/osu-web,notbakaneko/osu-web,LiquidPL/osu-web,notbakaneko/osu-web,ppy/osu-web,nanaya/osu-web,LiquidPL/osu-web,nanaya/osu-web,ppy/osu-web,notbakaneko/osu-web,notbakaneko/osu-web,ppy/osu-web,nanaya/osu-web,LiquidPL/osu-web,ppy/osu-web,nanaya/osu-web,LiquidPL/osu-web | typescript | ## Code Before:
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the GNU Affero General Public License v3.0.
// See the LICENCE file in the repository root for full licence text.
import Layzr, { LayzrInstance } from 'layzr';
export default class OsuLayzr {
private layzr?: LayzrInstance;
private observer: MutationObserver;
constructor() {
this.observer = new MutationObserver(this.reinit);
$(document).on('turbolinks:load', this.init);
}
init = () => {
this.layzr ??= Layzr();
this.reinit();
this.observer.observe(document.body, { childList: true, subtree: true });
};
reinit = () => {
this.layzr?.update().check().handlers(true);
};
}
## Instruction:
Reduce image lazy-loading related works
## Code After:
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the GNU Affero General Public License v3.0.
// See the LICENCE file in the repository root for full licence text.
import Layzr, { LayzrInstance } from 'layzr';
export default class OsuLayzr {
private layzr?: LayzrInstance;
private observer: MutationObserver;
constructor() {
this.observer = new MutationObserver(this.observePage);
this.observer.observe(document, { childList: true, subtree: true });
// Layzr depends on document.body which is only available after document is ready.
$(() => {
this.layzr ??= Layzr();
this.reinit();
});
}
private observePage = (mutations: MutationRecord[]) => {
if (this.layzr == null) return;
for (const mutation of mutations) {
for (const node of mutation.addedNodes) {
if (node instanceof HTMLElement && (node.dataset.normal != null || node.querySelector('[data-normal]') != null)) {
this.reinit();
return;
}
}
}
};
private reinit() {
this.layzr?.update().check().handlers(true);
}
}
| // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the GNU Affero General Public License v3.0.
// See the LICENCE file in the repository root for full licence text.
import Layzr, { LayzrInstance } from 'layzr';
export default class OsuLayzr {
private layzr?: LayzrInstance;
private observer: MutationObserver;
constructor() {
- this.observer = new MutationObserver(this.reinit);
? ^^^^
+ this.observer = new MutationObserver(this.observePage);
? ++++ + ^^^^
+ this.observer.observe(document, { childList: true, subtree: true });
- $(document).on('turbolinks:load', this.init);
+ // Layzr depends on document.body which is only available after document is ready.
+ $(() => {
+ this.layzr ??= Layzr();
+ this.reinit();
+ });
}
- init = () => {
- this.layzr ??= Layzr();
+ private observePage = (mutations: MutationRecord[]) => {
+ if (this.layzr == null) return;
+ for (const mutation of mutations) {
+ for (const node of mutation.addedNodes) {
+ if (node instanceof HTMLElement && (node.dataset.normal != null || node.querySelector('[data-normal]') != null)) {
- this.reinit();
+ this.reinit();
? ++++++
- this.observer.observe(document.body, { childList: true, subtree: true });
+
+ return;
+ }
+ }
+ }
};
- reinit = () => {
+ private reinit() {
this.layzr?.update().check().handlers(true);
- };
? -
+ }
} | 28 | 1.076923 | 20 | 8 |
8a1dd37990018068dd77171ccf4a183758829de4 | src/iotrules/examples/orion2.json | src/iotrules/examples/orion2.json | {
"subscriptionId" : "51c04a21d714fb3b37d7d5a7",
"originator" : "localhost",
"contextResponses" : [
{
"contextElement" : {
"attributes" : [
{
"name" : "a",
"type" : "centigrade",
"value" : "2"
},
{
"name" : "TimeInstant",
"type" : "urn:x-ogc:def:trs:IDAS:1.0:ISO8601",
"value" : "2014-04-29T13:18:05Z"
}
],
"type" : "Room",
"isPattern" : "false",
"id" : "Presion2"
},
"statusCode" : {
"code" : "200",
"reasonPhrase" : "OK"
}
}
]
}
| {
"subscriptionId" : "51c04a21d714fb3b37d7d5a7",
"originator" : "localhost",
"contextResponses" : [
{
"contextElement" : {
"attributes" : [
{
"name" : "a",
"type" : "centigrade",
"value" : "2"
},
{
"name" : "nombre",
"type" : "saludo ceremonial",
"value" : "¡¡Orion el Grande!!"
},
{
"name" : "TimeInstant",
"type" : "urn:x-ogc:def:trs:IDAS:1.0:ISO8601",
"value" : "2014-04-29T13:18:05Z"
}
],
"type" : "Room",
"isPattern" : "false",
"id" : "Presion2"
},
"statusCode" : {
"code" : "200",
"reasonPhrase" : "OK"
}
}
]
}
| Add value for testing template | Add value for testing template
| JSON | agpl-3.0 | crbrox/iotrules,crbrox/iotrules | json | ## Code Before:
{
"subscriptionId" : "51c04a21d714fb3b37d7d5a7",
"originator" : "localhost",
"contextResponses" : [
{
"contextElement" : {
"attributes" : [
{
"name" : "a",
"type" : "centigrade",
"value" : "2"
},
{
"name" : "TimeInstant",
"type" : "urn:x-ogc:def:trs:IDAS:1.0:ISO8601",
"value" : "2014-04-29T13:18:05Z"
}
],
"type" : "Room",
"isPattern" : "false",
"id" : "Presion2"
},
"statusCode" : {
"code" : "200",
"reasonPhrase" : "OK"
}
}
]
}
## Instruction:
Add value for testing template
## Code After:
{
"subscriptionId" : "51c04a21d714fb3b37d7d5a7",
"originator" : "localhost",
"contextResponses" : [
{
"contextElement" : {
"attributes" : [
{
"name" : "a",
"type" : "centigrade",
"value" : "2"
},
{
"name" : "nombre",
"type" : "saludo ceremonial",
"value" : "¡¡Orion el Grande!!"
},
{
"name" : "TimeInstant",
"type" : "urn:x-ogc:def:trs:IDAS:1.0:ISO8601",
"value" : "2014-04-29T13:18:05Z"
}
],
"type" : "Room",
"isPattern" : "false",
"id" : "Presion2"
},
"statusCode" : {
"code" : "200",
"reasonPhrase" : "OK"
}
}
]
}
| {
"subscriptionId" : "51c04a21d714fb3b37d7d5a7",
"originator" : "localhost",
"contextResponses" : [
{
"contextElement" : {
"attributes" : [
{
"name" : "a",
"type" : "centigrade",
"value" : "2"
+ },
+ {
+ "name" : "nombre",
+ "type" : "saludo ceremonial",
+ "value" : "¡¡Orion el Grande!!"
},
{
"name" : "TimeInstant",
"type" : "urn:x-ogc:def:trs:IDAS:1.0:ISO8601",
"value" : "2014-04-29T13:18:05Z"
}
],
"type" : "Room",
"isPattern" : "false",
"id" : "Presion2"
},
"statusCode" : {
"code" : "200",
"reasonPhrase" : "OK"
}
}
]
}
| 5 | 0.166667 | 5 | 0 |
1b71a38df369a5352a1a2119c6e5fd1b1e91f51a | src/js/AnimalImage.jsx | src/js/AnimalImage.jsx | 'use strict';
var AnimalImage = React.createClass({
getInitialState: function() {
return {
loaded: false
};
},
});
module.exports = AnimalImage;
| 'use strict';
var AnimalImage = React.createClass({
getInitialState: function() {
return {
loaded: false
};
},
componentDidMount: function(){
var self = this;
var img = document.createElement('img');
img.onload = function(){
self.setState({ loaded: true});
};
img.src = this.props.src;
},
});
module.exports = AnimalImage;
| Make sure the component is fetched before rendering | Make sure the component is fetched before rendering
| JSX | isc | Yangani/maasai-mara,Yangani/maasai-mara | jsx | ## Code Before:
'use strict';
var AnimalImage = React.createClass({
getInitialState: function() {
return {
loaded: false
};
},
});
module.exports = AnimalImage;
## Instruction:
Make sure the component is fetched before rendering
## Code After:
'use strict';
var AnimalImage = React.createClass({
getInitialState: function() {
return {
loaded: false
};
},
componentDidMount: function(){
var self = this;
var img = document.createElement('img');
img.onload = function(){
self.setState({ loaded: true});
};
img.src = this.props.src;
},
});
module.exports = AnimalImage;
| 'use strict';
var AnimalImage = React.createClass({
getInitialState: function() {
return {
loaded: false
};
},
+ componentDidMount: function(){
+ var self = this;
+ var img = document.createElement('img');
+ img.onload = function(){
+ self.setState({ loaded: true});
+ };
+ img.src = this.props.src;
+ },
});
module.exports = AnimalImage; | 8 | 0.727273 | 8 | 0 |
0832bfa7e4011cce87b84d2f187e45a38af41620 | db/evolutions/02_add_payment_provider_to_order.sql | db/evolutions/02_add_payment_provider_to_order.sql | START TRANSACTION;
ALTER TABLE `nk2_orders` MODIFY COLUMN `payment_id` VARCHAR(100) DEFAULT NULL;
ALTER TABLE `nk2_orders` ADD `payment_provider` VARCHAR(50) DEFAULT NULL;
ALTER TABLE `nk2_orders` DROP `reserved_until`;
ALTER TABLE `nk2_orders` DROP `reserved_session_id`;
UPDATE `nk2_orders` SET `payment_provider` = "paytrail";
COMMIT; | START TRANSACTION;
ALTER TABLE `nk2_orders` MODIFY COLUMN `payment_id` VARCHAR(100) DEFAULT NULL;
ALTER TABLE `nk2_orders` ADD `payment_provider` VARCHAR(50) DEFAULT NULL;
ALTER TABLE `nk2_orders` DROP `reserved_until`;
ALTER TABLE `nk2_orders` DROP `reserved_session_id`;
-- This is just for migration, as payment_provider cannot be null
-- UPDATE `nk2_orders` SET `payment_provider` = "paytrail";
COMMIT;
| Remove migration part of 02 evolutions script | Remove migration part of 02 evolutions script
| SQL | mit | teekkarispeksi/nappikauppa2,teekkarispeksi/nappikauppa2,teekkarispeksi/nappikauppa2,teekkarispeksi/nappikauppa2 | sql | ## Code Before:
START TRANSACTION;
ALTER TABLE `nk2_orders` MODIFY COLUMN `payment_id` VARCHAR(100) DEFAULT NULL;
ALTER TABLE `nk2_orders` ADD `payment_provider` VARCHAR(50) DEFAULT NULL;
ALTER TABLE `nk2_orders` DROP `reserved_until`;
ALTER TABLE `nk2_orders` DROP `reserved_session_id`;
UPDATE `nk2_orders` SET `payment_provider` = "paytrail";
COMMIT;
## Instruction:
Remove migration part of 02 evolutions script
## Code After:
START TRANSACTION;
ALTER TABLE `nk2_orders` MODIFY COLUMN `payment_id` VARCHAR(100) DEFAULT NULL;
ALTER TABLE `nk2_orders` ADD `payment_provider` VARCHAR(50) DEFAULT NULL;
ALTER TABLE `nk2_orders` DROP `reserved_until`;
ALTER TABLE `nk2_orders` DROP `reserved_session_id`;
-- This is just for migration, as payment_provider cannot be null
-- UPDATE `nk2_orders` SET `payment_provider` = "paytrail";
COMMIT;
| START TRANSACTION;
ALTER TABLE `nk2_orders` MODIFY COLUMN `payment_id` VARCHAR(100) DEFAULT NULL;
ALTER TABLE `nk2_orders` ADD `payment_provider` VARCHAR(50) DEFAULT NULL;
ALTER TABLE `nk2_orders` DROP `reserved_until`;
ALTER TABLE `nk2_orders` DROP `reserved_session_id`;
+ -- This is just for migration, as payment_provider cannot be null
- UPDATE `nk2_orders` SET `payment_provider` = "paytrail";
+ -- UPDATE `nk2_orders` SET `payment_provider` = "paytrail";
? +++
COMMIT; | 3 | 0.428571 | 2 | 1 |
06c237cdf5535b5136ddf61149dc7632a4013e67 | appveyor.yml | appveyor.yml | clone_folder: "c:\\WORK"
environment:
global:
CABOPTS: "--store-dir=C:\\SR --http-transport=plain-http --enable-tests --enable-benchmarks"
matrix:
- GHCVER: "8.10.2.2"
- GHCVER: "8.8.4.1"
- GHCVER: "8.6.5"
- GHCVER: "8.4.4"
- GHCVER: "8.2.2"
- GHCVER: "8.0.2.2"
- GHCVER: "7.10.3.2"
- GHCVER: "7.8.4.1"
cache:
- "C:\\SR"
install:
- "choco install -y cabal"
- "choco install -y ghc --version %GHCVER%"
- "refreshenv"
- "set PATH=C:\\msys64\\mingw64\\bin;C:\\msys64\\usr\\bin;%PATH%"
- "cabal --version"
- "ghc --version"
- "cabal %CABOPTS% update -v"
build: off
test_script:
- IF EXIST configure.ac bash -c "autoreconf -i"
- "echo packages:. > cabal.project"
- "cabal %CABOPTS% new-build -j1 --enable-tests --enable-benchmarks all"
- "cabal %CABOPTS% new-test -j1 --enable-tests --enable-benchmarks all"
| clone_folder: "c:\\WORK"
environment:
global:
CABOPTS: "--store-dir=C:\\SR --http-transport=plain-http --enable-tests --enable-benchmarks"
matrix:
- GHCVER: "8.10.2.2"
- GHCVER: "8.8.4.1"
- GHCVER: "8.6.5"
- GHCVER: "8.4.4"
- GHCVER: "8.2.2"
- GHCVER: "8.0.2.2"
- GHCVER: "7.10.3.2"
- GHCVER: "7.8.4.1"
cache:
- "C:\\SR"
install:
- ps: Set-Service wuauserv -StartupType Manual
- "choco install -y cabal"
- "choco install -y ghc --version %GHCVER%"
- "refreshenv"
- "set PATH=C:\\msys64\\mingw64\\bin;C:\\msys64\\usr\\bin;%PATH%"
- "cabal --version"
- "ghc --version"
- "cabal %CABOPTS% update -v"
build: off
test_script:
- IF EXIST configure.ac bash -c "autoreconf -i"
- "echo packages:. > cabal.project"
- "cabal %CABOPTS% new-build -j1 --enable-tests --enable-benchmarks all"
- "cabal %CABOPTS% new-test -j1 --enable-tests --enable-benchmarks all"
| Work around Windows install service bug | AppVeyor: Work around Windows install service bug
As suggested in
https://github.com/Mistuke/GhcChoco/issues/10#issuecomment-730441768.
| YAML | bsd-3-clause | RyanGlScott/text-show | yaml | ## Code Before:
clone_folder: "c:\\WORK"
environment:
global:
CABOPTS: "--store-dir=C:\\SR --http-transport=plain-http --enable-tests --enable-benchmarks"
matrix:
- GHCVER: "8.10.2.2"
- GHCVER: "8.8.4.1"
- GHCVER: "8.6.5"
- GHCVER: "8.4.4"
- GHCVER: "8.2.2"
- GHCVER: "8.0.2.2"
- GHCVER: "7.10.3.2"
- GHCVER: "7.8.4.1"
cache:
- "C:\\SR"
install:
- "choco install -y cabal"
- "choco install -y ghc --version %GHCVER%"
- "refreshenv"
- "set PATH=C:\\msys64\\mingw64\\bin;C:\\msys64\\usr\\bin;%PATH%"
- "cabal --version"
- "ghc --version"
- "cabal %CABOPTS% update -v"
build: off
test_script:
- IF EXIST configure.ac bash -c "autoreconf -i"
- "echo packages:. > cabal.project"
- "cabal %CABOPTS% new-build -j1 --enable-tests --enable-benchmarks all"
- "cabal %CABOPTS% new-test -j1 --enable-tests --enable-benchmarks all"
## Instruction:
AppVeyor: Work around Windows install service bug
As suggested in
https://github.com/Mistuke/GhcChoco/issues/10#issuecomment-730441768.
## Code After:
clone_folder: "c:\\WORK"
environment:
global:
CABOPTS: "--store-dir=C:\\SR --http-transport=plain-http --enable-tests --enable-benchmarks"
matrix:
- GHCVER: "8.10.2.2"
- GHCVER: "8.8.4.1"
- GHCVER: "8.6.5"
- GHCVER: "8.4.4"
- GHCVER: "8.2.2"
- GHCVER: "8.0.2.2"
- GHCVER: "7.10.3.2"
- GHCVER: "7.8.4.1"
cache:
- "C:\\SR"
install:
- ps: Set-Service wuauserv -StartupType Manual
- "choco install -y cabal"
- "choco install -y ghc --version %GHCVER%"
- "refreshenv"
- "set PATH=C:\\msys64\\mingw64\\bin;C:\\msys64\\usr\\bin;%PATH%"
- "cabal --version"
- "ghc --version"
- "cabal %CABOPTS% update -v"
build: off
test_script:
- IF EXIST configure.ac bash -c "autoreconf -i"
- "echo packages:. > cabal.project"
- "cabal %CABOPTS% new-build -j1 --enable-tests --enable-benchmarks all"
- "cabal %CABOPTS% new-test -j1 --enable-tests --enable-benchmarks all"
| clone_folder: "c:\\WORK"
environment:
global:
CABOPTS: "--store-dir=C:\\SR --http-transport=plain-http --enable-tests --enable-benchmarks"
matrix:
- GHCVER: "8.10.2.2"
- GHCVER: "8.8.4.1"
- GHCVER: "8.6.5"
- GHCVER: "8.4.4"
- GHCVER: "8.2.2"
- GHCVER: "8.0.2.2"
- GHCVER: "7.10.3.2"
- GHCVER: "7.8.4.1"
cache:
- "C:\\SR"
install:
+ - ps: Set-Service wuauserv -StartupType Manual
- "choco install -y cabal"
- "choco install -y ghc --version %GHCVER%"
- "refreshenv"
- "set PATH=C:\\msys64\\mingw64\\bin;C:\\msys64\\usr\\bin;%PATH%"
- "cabal --version"
- "ghc --version"
- "cabal %CABOPTS% update -v"
build: off
test_script:
- IF EXIST configure.ac bash -c "autoreconf -i"
- "echo packages:. > cabal.project"
- "cabal %CABOPTS% new-build -j1 --enable-tests --enable-benchmarks all"
- "cabal %CABOPTS% new-test -j1 --enable-tests --enable-benchmarks all" | 1 | 0.029412 | 1 | 0 |
f82da0736eeba48b51b2e067fcd7d79f90c5272f | css/index.css | css/index.css | /*PAGE LAYOUT*/
html, body {
height:100%;
text-align:center;
}
body {
background:url("../main/bg-imgs/gallery.jpg"); /*looks for images from the viewpoint of the css file*/
background-size:cover;
}
.wrap {
min-height: 100%;
height: auto;
}
.jumbotron {
background:black;
font-family:Verdana;
font-weight:bold;
color:white;
margin-bottom:0px;
padding: 10px 0px;
}
/*--------------------------------------------
/*columns*/
.columns {
margin:7% auto;
width:80%;
}
.home-container {
font-family:"Courier New", Courier, monospace;
font-weight:bold;
font-size:1.2em;
}
.login, .register {
background-color:#81DAF5;
height:240px;
padding-left:1%;
border-radius: 6px 6px 6px 6px;
}
.login {
padding-top: 5%;
}
.register{
padding-top: 2%;
}
/*--------------------------------------------
/*footer*/
#footer {
border-color:#848484;
background-color:black;
color:#D8D8D8;
}
| /*PAGE LAYOUT*/
html, body {
height:100%;
text-align:center;
}
body {
background:url("../main/bg-imgs/gallery.jpg"); /*looks for images from the viewpoint of the css file*/
background-size:cover;
}
.wrap {
min-height: 100%;
height: auto;
}
.jumbotron {
background:black;
font-family:Verdana;
font-weight:bold;
color:white;
margin-bottom:0px;
padding: 10px 0px;
}
/*--------------------------------------------
/*columns*/
.columns {
position: absolute;
margin:9% 10%;
width:80%;
}
.home-container {
font-family:"Courier New", Courier, monospace;
font-weight:bold;
font-size:1.2em;
}
.login, .register {
background-color:#81DAF5;
height:240px;
padding-left:1%;
border-radius: 6px 6px 6px 6px;
}
.login {
padding-top: 5%;
}
.register{
padding-top: 2%;
}
/*--------------------------------------------
/*footer*/
#footer {
border-color:#848484;
background-color:black;
color:#D8D8D8;
}
| Implement better solution for home page div positioning | Implement better solution for home page div positioning
| CSS | mit | brian-yang/picsy,brian-yang/picsy,brian-yang/picsy | css | ## Code Before:
/*PAGE LAYOUT*/
html, body {
height:100%;
text-align:center;
}
body {
background:url("../main/bg-imgs/gallery.jpg"); /*looks for images from the viewpoint of the css file*/
background-size:cover;
}
.wrap {
min-height: 100%;
height: auto;
}
.jumbotron {
background:black;
font-family:Verdana;
font-weight:bold;
color:white;
margin-bottom:0px;
padding: 10px 0px;
}
/*--------------------------------------------
/*columns*/
.columns {
margin:7% auto;
width:80%;
}
.home-container {
font-family:"Courier New", Courier, monospace;
font-weight:bold;
font-size:1.2em;
}
.login, .register {
background-color:#81DAF5;
height:240px;
padding-left:1%;
border-radius: 6px 6px 6px 6px;
}
.login {
padding-top: 5%;
}
.register{
padding-top: 2%;
}
/*--------------------------------------------
/*footer*/
#footer {
border-color:#848484;
background-color:black;
color:#D8D8D8;
}
## Instruction:
Implement better solution for home page div positioning
## Code After:
/*PAGE LAYOUT*/
html, body {
height:100%;
text-align:center;
}
body {
background:url("../main/bg-imgs/gallery.jpg"); /*looks for images from the viewpoint of the css file*/
background-size:cover;
}
.wrap {
min-height: 100%;
height: auto;
}
.jumbotron {
background:black;
font-family:Verdana;
font-weight:bold;
color:white;
margin-bottom:0px;
padding: 10px 0px;
}
/*--------------------------------------------
/*columns*/
.columns {
position: absolute;
margin:9% 10%;
width:80%;
}
.home-container {
font-family:"Courier New", Courier, monospace;
font-weight:bold;
font-size:1.2em;
}
.login, .register {
background-color:#81DAF5;
height:240px;
padding-left:1%;
border-radius: 6px 6px 6px 6px;
}
.login {
padding-top: 5%;
}
.register{
padding-top: 2%;
}
/*--------------------------------------------
/*footer*/
#footer {
border-color:#848484;
background-color:black;
color:#D8D8D8;
}
| /*PAGE LAYOUT*/
html, body {
height:100%;
text-align:center;
}
body {
background:url("../main/bg-imgs/gallery.jpg"); /*looks for images from the viewpoint of the css file*/
background-size:cover;
}
.wrap {
min-height: 100%;
height: auto;
}
.jumbotron {
background:black;
font-family:Verdana;
font-weight:bold;
color:white;
margin-bottom:0px;
padding: 10px 0px;
}
/*--------------------------------------------
/*columns*/
.columns {
+ position: absolute;
- margin:7% auto;
? ^ ^^^^
+ margin:9% 10%;
? ^ ^^^
width:80%;
}
.home-container {
font-family:"Courier New", Courier, monospace;
font-weight:bold;
font-size:1.2em;
}
.login, .register {
background-color:#81DAF5;
height:240px;
padding-left:1%;
border-radius: 6px 6px 6px 6px;
}
.login {
padding-top: 5%;
}
.register{
padding-top: 2%;
}
/*--------------------------------------------
/*footer*/
#footer {
border-color:#848484;
background-color:black;
color:#D8D8D8;
} | 3 | 0.045455 | 2 | 1 |
bdae1f203f3d5d600dd62470dea3d2ddb3048b9d | turbustat/tests/test_wavelet.py | turbustat/tests/test_wavelet.py |
'''
Test function for Wavelet
'''
from unittest import TestCase
import numpy as np
import numpy.testing as npt
from ..statistics import wt2D, Wavelet_Distance
from ._testing_data import \
dataset1, dataset2, computed_data, computed_distances
class testWavelet(TestCase):
def setUp(self):
self.dataset1 = dataset1
self.dataset2 = dataset2
def test_Wavelet_method(self):
self.tester = wt2D(dataset1["integrated_intensity"][0],
dataset1["integrated_intensity"][1])
self.tester.run()
assert np.allclose(self.tester.curve, computed_data['wavelet_val'])
def test_Wavelet_distance(self):
self.tester_dist = \
Wavelet_Distance(dataset1["integrated_intensity"],
dataset2["integrated_intensity"]).distance_metric()
npt.assert_almost_equal(self.tester_dist.distance,
computed_distances['wavelet_distance'])
|
'''
Test function for Wavelet
'''
from unittest import TestCase
import numpy as np
import numpy.testing as npt
from ..statistics import Wavelet, Wavelet_Distance
from ._testing_data import \
dataset1, dataset2, computed_data, computed_distances
class testWavelet(TestCase):
def setUp(self):
self.dataset1 = dataset1
self.dataset2 = dataset2
def test_Wavelet_method(self):
self.tester = Wavelet(dataset1["integrated_intensity"][0],
dataset1["integrated_intensity"][1])
self.tester.run()
assert np.allclose(self.tester.curve, computed_data['wavelet_val'])
def test_Wavelet_distance(self):
self.tester_dist = \
Wavelet_Distance(dataset1["integrated_intensity"],
dataset2["integrated_intensity"]).distance_metric()
npt.assert_almost_equal(self.tester_dist.distance,
computed_distances['wavelet_distance'])
| Change class name in tests | Change class name in tests
| Python | mit | e-koch/TurbuStat,Astroua/TurbuStat | python | ## Code Before:
'''
Test function for Wavelet
'''
from unittest import TestCase
import numpy as np
import numpy.testing as npt
from ..statistics import wt2D, Wavelet_Distance
from ._testing_data import \
dataset1, dataset2, computed_data, computed_distances
class testWavelet(TestCase):
def setUp(self):
self.dataset1 = dataset1
self.dataset2 = dataset2
def test_Wavelet_method(self):
self.tester = wt2D(dataset1["integrated_intensity"][0],
dataset1["integrated_intensity"][1])
self.tester.run()
assert np.allclose(self.tester.curve, computed_data['wavelet_val'])
def test_Wavelet_distance(self):
self.tester_dist = \
Wavelet_Distance(dataset1["integrated_intensity"],
dataset2["integrated_intensity"]).distance_metric()
npt.assert_almost_equal(self.tester_dist.distance,
computed_distances['wavelet_distance'])
## Instruction:
Change class name in tests
## Code After:
'''
Test function for Wavelet
'''
from unittest import TestCase
import numpy as np
import numpy.testing as npt
from ..statistics import Wavelet, Wavelet_Distance
from ._testing_data import \
dataset1, dataset2, computed_data, computed_distances
class testWavelet(TestCase):
def setUp(self):
self.dataset1 = dataset1
self.dataset2 = dataset2
def test_Wavelet_method(self):
self.tester = Wavelet(dataset1["integrated_intensity"][0],
dataset1["integrated_intensity"][1])
self.tester.run()
assert np.allclose(self.tester.curve, computed_data['wavelet_val'])
def test_Wavelet_distance(self):
self.tester_dist = \
Wavelet_Distance(dataset1["integrated_intensity"],
dataset2["integrated_intensity"]).distance_metric()
npt.assert_almost_equal(self.tester_dist.distance,
computed_distances['wavelet_distance'])
|
'''
Test function for Wavelet
'''
from unittest import TestCase
import numpy as np
import numpy.testing as npt
- from ..statistics import wt2D, Wavelet_Distance
? ^ --
+ from ..statistics import Wavelet, Wavelet_Distance
? ^^^^^^
from ._testing_data import \
dataset1, dataset2, computed_data, computed_distances
class testWavelet(TestCase):
def setUp(self):
self.dataset1 = dataset1
self.dataset2 = dataset2
def test_Wavelet_method(self):
- self.tester = wt2D(dataset1["integrated_intensity"][0],
? ^ --
+ self.tester = Wavelet(dataset1["integrated_intensity"][0],
? ^^^^^^
- dataset1["integrated_intensity"][1])
+ dataset1["integrated_intensity"][1])
? +++
self.tester.run()
assert np.allclose(self.tester.curve, computed_data['wavelet_val'])
def test_Wavelet_distance(self):
self.tester_dist = \
Wavelet_Distance(dataset1["integrated_intensity"],
dataset2["integrated_intensity"]).distance_metric()
npt.assert_almost_equal(self.tester_dist.distance,
computed_distances['wavelet_distance']) | 6 | 0.176471 | 3 | 3 |
6db101c082a9bb5cddff972eb7bb0f55e5330f4f | app/Middlewares/KarmaRenderMiddleware.php | app/Middlewares/KarmaRenderMiddleware.php | <?php
namespace App\Middlewares;
use App\Message;
use App\Gitter\Middleware\MiddlewareInterface;
/**
* Проверяет слово "карма" и выводит статус
*
* Class KarmaRenderMiddleware
* @package App\Gitter\Middleware
*/
class KarmaRenderMiddleware implements MiddlewareInterface
{
/**
* @param Message $message
* @return mixed
*/
public function handle(Message $message)
{
if (trim(mb_strtolower($message->text)) === 'карма') {
$args = [
'user' => $message->user->login,
'karma' => $message->user->karma_text,
'thanks' => $message->user->thanks_text
];
$karmaMessage = $args['karma']
? \Lang::get('karma.count.message', $args)
: \Lang::get('karma.count.empty', $args);
$achievements = [];
foreach ($message->user->achievements as $achieve) {
$achievements[] = '"' . $achieve->title . '"';
}
if (count($achievements)) {
$karmaMessage .= ("\n" . '- Достижения: ' . implode(', ', $achievements));
}
$message->italic($karmaMessage);
}
return $message;
}
}
| <?php
namespace App\Middlewares;
use App\Message;
use App\Gitter\Middleware\MiddlewareInterface;
/**
* Проверяет слово "карма" и выводит статус
*
* Class KarmaRenderMiddleware
* @package App\Gitter\Middleware
*/
class KarmaRenderMiddleware implements MiddlewareInterface
{
/**
* @param Message $message
* @return mixed
*/
public function handle(Message $message)
{
if (trim(mb_strtolower($message->text)) === 'карма') {
$args = [
'user' => $message->user->login,
'karma' => $message->user->karma_text,
'thanks' => $message->user->thanks_text
];
$karmaMessage = $args['karma']
? \Lang::get('karma.count.message', $args)
: \Lang::get('karma.count.empty', $args);
$achievements = [];
foreach ($message->user->achievements as $achieve) {
$achievements[] = '"' . $achieve->title . '"';
}
if (count($achievements)) {
$karmaMessage .= ("\n" . '- Достижения: ' . implode(', ', $achievements));
}
$karmaMessage .= "\n" . sprintf(
'- [Профиль %s на laravel.su](http://karma.laravel.su/user/%s)',
$message->user->login,
$message->user->login
);
$message->italic($karmaMessage);
}
return $message;
}
}
| Add profile link inside karma render | Add profile link inside karma render
| PHP | mit | LaravelRUS/Laravel-Karma,LaravelRUS/GitterBot,LaravelRUS/GitterBot,LaravelRUS/GitterBot,LaravelRUS/Laravel-Karma,LaravelRUS/Laravel-Karma | php | ## Code Before:
<?php
namespace App\Middlewares;
use App\Message;
use App\Gitter\Middleware\MiddlewareInterface;
/**
* Проверяет слово "карма" и выводит статус
*
* Class KarmaRenderMiddleware
* @package App\Gitter\Middleware
*/
class KarmaRenderMiddleware implements MiddlewareInterface
{
/**
* @param Message $message
* @return mixed
*/
public function handle(Message $message)
{
if (trim(mb_strtolower($message->text)) === 'карма') {
$args = [
'user' => $message->user->login,
'karma' => $message->user->karma_text,
'thanks' => $message->user->thanks_text
];
$karmaMessage = $args['karma']
? \Lang::get('karma.count.message', $args)
: \Lang::get('karma.count.empty', $args);
$achievements = [];
foreach ($message->user->achievements as $achieve) {
$achievements[] = '"' . $achieve->title . '"';
}
if (count($achievements)) {
$karmaMessage .= ("\n" . '- Достижения: ' . implode(', ', $achievements));
}
$message->italic($karmaMessage);
}
return $message;
}
}
## Instruction:
Add profile link inside karma render
## Code After:
<?php
namespace App\Middlewares;
use App\Message;
use App\Gitter\Middleware\MiddlewareInterface;
/**
* Проверяет слово "карма" и выводит статус
*
* Class KarmaRenderMiddleware
* @package App\Gitter\Middleware
*/
class KarmaRenderMiddleware implements MiddlewareInterface
{
/**
* @param Message $message
* @return mixed
*/
public function handle(Message $message)
{
if (trim(mb_strtolower($message->text)) === 'карма') {
$args = [
'user' => $message->user->login,
'karma' => $message->user->karma_text,
'thanks' => $message->user->thanks_text
];
$karmaMessage = $args['karma']
? \Lang::get('karma.count.message', $args)
: \Lang::get('karma.count.empty', $args);
$achievements = [];
foreach ($message->user->achievements as $achieve) {
$achievements[] = '"' . $achieve->title . '"';
}
if (count($achievements)) {
$karmaMessage .= ("\n" . '- Достижения: ' . implode(', ', $achievements));
}
$karmaMessage .= "\n" . sprintf(
'- [Профиль %s на laravel.su](http://karma.laravel.su/user/%s)',
$message->user->login,
$message->user->login
);
$message->italic($karmaMessage);
}
return $message;
}
}
| <?php
namespace App\Middlewares;
use App\Message;
use App\Gitter\Middleware\MiddlewareInterface;
/**
* Проверяет слово "карма" и выводит статус
*
* Class KarmaRenderMiddleware
* @package App\Gitter\Middleware
*/
class KarmaRenderMiddleware implements MiddlewareInterface
{
/**
* @param Message $message
* @return mixed
*/
public function handle(Message $message)
{
if (trim(mb_strtolower($message->text)) === 'карма') {
$args = [
'user' => $message->user->login,
'karma' => $message->user->karma_text,
'thanks' => $message->user->thanks_text
];
$karmaMessage = $args['karma']
? \Lang::get('karma.count.message', $args)
: \Lang::get('karma.count.empty', $args);
$achievements = [];
foreach ($message->user->achievements as $achieve) {
$achievements[] = '"' . $achieve->title . '"';
}
if (count($achievements)) {
$karmaMessage .= ("\n" . '- Достижения: ' . implode(', ', $achievements));
}
+ $karmaMessage .= "\n" . sprintf(
+ '- [Профиль %s на laravel.su](http://karma.laravel.su/user/%s)',
+ $message->user->login,
+ $message->user->login
+ );
+
$message->italic($karmaMessage);
}
return $message;
}
} | 6 | 0.122449 | 6 | 0 |
da6d42acfb7f6b65bbc95e52e01147d2335f490f | include/guard_overflow.h | include/guard_overflow.h | //
// include/guard_overflow.h
// tbd
//
// Created by inoahdev on 12/29/18.
// Copyright © 2018 - 2019 inoahdev. All rights reserved.
//
#ifndef GUARD_OVERFLOW_H
#define GUARD_OVERFLOW_H
#include <stdint.h>
#define guard_overflow_add(left_in, right) _Generic((left_in), \
uint32_t *: __builtin_uadd_overflow, \
uint64_t *: __builtin_uaddl_overflow \
) (*left_in, right, left_in)
#define guard_overflow_mul(left_in, right) _Generic((left_in), \
uint32_t *: __builtin_umul_overflow, \
uint64_t *: __builtin_umull_overflow \
) (*left_in, right, left_in)
#define guard_overflow_shift_left(left_in, right) _Generic((left_in), \
uint32_t *: guard_overflow_shift_left_uint32, \
uint64_t *: guard_overflow_shift_left_uint64 \
) (left_in, right)
int guard_overflow_shift_left_uint32(uint32_t *left_in, uint32_t right);
int guard_overflow_shift_left_uint64(uint64_t *left_in, uint64_t right);
#endif /* GUARD_OVERFLOW_H */
| //
// include/guard_overflow.h
// tbd
//
// Created by inoahdev on 12/29/18.
// Copyright © 2018 - 2019 inoahdev. All rights reserved.
//
#ifndef GUARD_OVERFLOW_H
#define GUARD_OVERFLOW_H
#include <stdint.h>
#define guard_overflow_add(left_in, right) \
__builtin_add_overflow(*left_in, right, left_in)
#define guard_overflow_mul(left_in, right) \
__builtin_mul_overflow(*left_in, right, left_in)
#define guard_overflow_shift_left(left_in, right) _Generic((left_in), \
uint32_t *: guard_overflow_shift_left_uint32, \
uint64_t *: guard_overflow_shift_left_uint64 \
) (left_in, right)
int guard_overflow_shift_left_uint32(uint32_t *left_in, uint32_t right);
int guard_overflow_shift_left_uint64(uint64_t *left_in, uint64_t right);
#endif /* GUARD_OVERFLOW_H */
| Fix compile errors with different integer-types | Fix compile errors with different integer-types
| C | mit | inoahdev/tbd,inoahdev/tbd | c | ## Code Before:
//
// include/guard_overflow.h
// tbd
//
// Created by inoahdev on 12/29/18.
// Copyright © 2018 - 2019 inoahdev. All rights reserved.
//
#ifndef GUARD_OVERFLOW_H
#define GUARD_OVERFLOW_H
#include <stdint.h>
#define guard_overflow_add(left_in, right) _Generic((left_in), \
uint32_t *: __builtin_uadd_overflow, \
uint64_t *: __builtin_uaddl_overflow \
) (*left_in, right, left_in)
#define guard_overflow_mul(left_in, right) _Generic((left_in), \
uint32_t *: __builtin_umul_overflow, \
uint64_t *: __builtin_umull_overflow \
) (*left_in, right, left_in)
#define guard_overflow_shift_left(left_in, right) _Generic((left_in), \
uint32_t *: guard_overflow_shift_left_uint32, \
uint64_t *: guard_overflow_shift_left_uint64 \
) (left_in, right)
int guard_overflow_shift_left_uint32(uint32_t *left_in, uint32_t right);
int guard_overflow_shift_left_uint64(uint64_t *left_in, uint64_t right);
#endif /* GUARD_OVERFLOW_H */
## Instruction:
Fix compile errors with different integer-types
## Code After:
//
// include/guard_overflow.h
// tbd
//
// Created by inoahdev on 12/29/18.
// Copyright © 2018 - 2019 inoahdev. All rights reserved.
//
#ifndef GUARD_OVERFLOW_H
#define GUARD_OVERFLOW_H
#include <stdint.h>
#define guard_overflow_add(left_in, right) \
__builtin_add_overflow(*left_in, right, left_in)
#define guard_overflow_mul(left_in, right) \
__builtin_mul_overflow(*left_in, right, left_in)
#define guard_overflow_shift_left(left_in, right) _Generic((left_in), \
uint32_t *: guard_overflow_shift_left_uint32, \
uint64_t *: guard_overflow_shift_left_uint64 \
) (left_in, right)
int guard_overflow_shift_left_uint32(uint32_t *left_in, uint32_t right);
int guard_overflow_shift_left_uint64(uint64_t *left_in, uint64_t right);
#endif /* GUARD_OVERFLOW_H */
| //
// include/guard_overflow.h
// tbd
//
// Created by inoahdev on 12/29/18.
// Copyright © 2018 - 2019 inoahdev. All rights reserved.
//
#ifndef GUARD_OVERFLOW_H
#define GUARD_OVERFLOW_H
#include <stdint.h>
- #define guard_overflow_add(left_in, right) _Generic((left_in), \
? --------------------
+ #define guard_overflow_add(left_in, right) \
+ __builtin_add_overflow(*left_in, right, left_in)
- uint32_t *: __builtin_uadd_overflow, \
- uint64_t *: __builtin_uaddl_overflow \
- ) (*left_in, right, left_in)
- #define guard_overflow_mul(left_in, right) _Generic((left_in), \
? --------------------
+ #define guard_overflow_mul(left_in, right) \
+ __builtin_mul_overflow(*left_in, right, left_in)
- uint32_t *: __builtin_umul_overflow, \
- uint64_t *: __builtin_umull_overflow \
- ) (*left_in, right, left_in)
#define guard_overflow_shift_left(left_in, right) _Generic((left_in), \
uint32_t *: guard_overflow_shift_left_uint32, \
uint64_t *: guard_overflow_shift_left_uint64 \
) (left_in, right)
int guard_overflow_shift_left_uint32(uint32_t *left_in, uint32_t right);
int guard_overflow_shift_left_uint64(uint64_t *left_in, uint64_t right);
#endif /* GUARD_OVERFLOW_H */ | 12 | 0.375 | 4 | 8 |
5abe340fb7894e8c74f52e7b79e5dca678d5c6b1 | FUTURE.txt | FUTURE.txt | - Beacon
- Item/Fluid extraction wireless
- Plant simulator
- Upgrade to move the working area
- Filter water for the pump
- A force spawning method using liquid meat
- Fluid reactor
- Cake placer | - Beacon
- Item/Fluid extraction wireless
- Plant simulator
- Filter water for the pump
- A force spawning method using liquid meat
- Fluid reactor
- Cake placer
- Make the MIT change color based on the captured entity | Test for the TC Changelog parsing | Test for the TC Changelog parsing
| Text | mit | Buuz135/Industrial-Foregoing | text | ## Code Before:
- Beacon
- Item/Fluid extraction wireless
- Plant simulator
- Upgrade to move the working area
- Filter water for the pump
- A force spawning method using liquid meat
- Fluid reactor
- Cake placer
## Instruction:
Test for the TC Changelog parsing
## Code After:
- Beacon
- Item/Fluid extraction wireless
- Plant simulator
- Filter water for the pump
- A force spawning method using liquid meat
- Fluid reactor
- Cake placer
- Make the MIT change color based on the captured entity | - Beacon
- Item/Fluid extraction wireless
- Plant simulator
- - Upgrade to move the working area
- Filter water for the pump
- A force spawning method using liquid meat
- Fluid reactor
- Cake placer
+ - Make the MIT change color based on the captured entity | 2 | 0.25 | 1 | 1 |
870b72a6599b4d9d516ff13acc44620e40921b55 | shell.nix | shell.nix | { }:
let this = import ./.;
myEnv = platform: (builtins.getAttr platform this).ghcWithPackages (p: with p; [
# Add Haskell packages to your environment here
]);
in this.nixpkgs.runCommand "shell" {
buildCommand = ''
echo "$propagatedBuildInputs $buildInputs $nativeBuildInputs $propagatedNativeBuildInputs" > $out
'';
buildInputs = [
this.nixpkgs.nodejs
] ++ builtins.map myEnv this.platforms;
} ""
| { }:
let this = import ./.;
myEnv = platform: (builtins.getAttr platform this).ghcWithPackages (p: with p; [
# Add Haskell packages to your environment here
]);
in this.nixpkgs.runCommand "shell" {
buildCommand = ''
echo "$propagatedBuildInputs $buildInputs $nativeBuildInputs $propagatedNativeBuildInputs" > $out
'';
buildInputs = [
this.nixpkgs.nodejs
this.nixpkgs.haskell-ng.packages.ghc7101.cabal-install
] ++ builtins.map myEnv this.platforms;
} ""
| Add cabal-install to the ghcjs environment | Add cabal-install to the ghcjs environment
| Nix | bsd-3-clause | ryantrinkle/ghcjs-setup | nix | ## Code Before:
{ }:
let this = import ./.;
myEnv = platform: (builtins.getAttr platform this).ghcWithPackages (p: with p; [
# Add Haskell packages to your environment here
]);
in this.nixpkgs.runCommand "shell" {
buildCommand = ''
echo "$propagatedBuildInputs $buildInputs $nativeBuildInputs $propagatedNativeBuildInputs" > $out
'';
buildInputs = [
this.nixpkgs.nodejs
] ++ builtins.map myEnv this.platforms;
} ""
## Instruction:
Add cabal-install to the ghcjs environment
## Code After:
{ }:
let this = import ./.;
myEnv = platform: (builtins.getAttr platform this).ghcWithPackages (p: with p; [
# Add Haskell packages to your environment here
]);
in this.nixpkgs.runCommand "shell" {
buildCommand = ''
echo "$propagatedBuildInputs $buildInputs $nativeBuildInputs $propagatedNativeBuildInputs" > $out
'';
buildInputs = [
this.nixpkgs.nodejs
this.nixpkgs.haskell-ng.packages.ghc7101.cabal-install
] ++ builtins.map myEnv this.platforms;
} ""
| { }:
let this = import ./.;
myEnv = platform: (builtins.getAttr platform this).ghcWithPackages (p: with p; [
# Add Haskell packages to your environment here
]);
in this.nixpkgs.runCommand "shell" {
buildCommand = ''
echo "$propagatedBuildInputs $buildInputs $nativeBuildInputs $propagatedNativeBuildInputs" > $out
'';
buildInputs = [
this.nixpkgs.nodejs
+ this.nixpkgs.haskell-ng.packages.ghc7101.cabal-install
] ++ builtins.map myEnv this.platforms;
} "" | 1 | 0.076923 | 1 | 0 |
7de964451f769fddbed9093e7c559facc4548613 | styles/docks.less | styles/docks.less |
// Docks ------------------------------
// Make handles not take up any space when dock is open
.atom-dock-resize-handle {
position: absolute;
z-index: 11; // same as toggle buttons
&.left {
top: 0;
right: 0;
bottom: 0;
}
&.right {
top: 0;
left: 0;
bottom: 0;
}
&.bottom {
top: 0;
left: 0;
right: 0;
}
}
// Add borders
.atom-dock-inner.atom-dock-open.left {
border-right: 1px solid @base-border-color;
}
.atom-dock-inner.atom-dock-open.right {
border-left: 1px solid @base-border-color;
}
// Make toggle buttons cover ^ border
.atom-dock-toggle-button.left {
margin-left: -2px;
}
.atom-dock-toggle-button.right {
margin-right: -2px;
}
.atom-dock-inner:not(.atom-dock-open) .atom-dock-toggle-button.bottom {
margin-bottom: -1px;
}
|
// Docks ------------------------------
// Make handles not take up any space when dock is open
.atom-dock-resize-handle {
position: absolute;
z-index: 11; // same as toggle buttons
&.left {
top: 0;
right: 0;
bottom: 0;
}
&.right {
top: 0;
left: 0;
bottom: 0;
}
&.bottom {
top: 0;
left: 0;
right: 0;
}
}
// Add borders
.atom-dock-inner.atom-dock-open.left {
border-right: 1px solid @base-border-color;
}
.atom-dock-inner.atom-dock-open.right {
border-left: 1px solid @base-border-color;
}
// Make toggle buttons cover ^ border
.atom-dock-toggle-button.left {
margin-left: -1px;
}
.atom-dock-toggle-button.right {
margin-right: -1px;
}
| Make the dock border only 1px | Make the dock border only 1px
| Less | mit | samuelam/roomtone-ui | less | ## Code Before:
// Docks ------------------------------
// Make handles not take up any space when dock is open
.atom-dock-resize-handle {
position: absolute;
z-index: 11; // same as toggle buttons
&.left {
top: 0;
right: 0;
bottom: 0;
}
&.right {
top: 0;
left: 0;
bottom: 0;
}
&.bottom {
top: 0;
left: 0;
right: 0;
}
}
// Add borders
.atom-dock-inner.atom-dock-open.left {
border-right: 1px solid @base-border-color;
}
.atom-dock-inner.atom-dock-open.right {
border-left: 1px solid @base-border-color;
}
// Make toggle buttons cover ^ border
.atom-dock-toggle-button.left {
margin-left: -2px;
}
.atom-dock-toggle-button.right {
margin-right: -2px;
}
.atom-dock-inner:not(.atom-dock-open) .atom-dock-toggle-button.bottom {
margin-bottom: -1px;
}
## Instruction:
Make the dock border only 1px
## Code After:
// Docks ------------------------------
// Make handles not take up any space when dock is open
.atom-dock-resize-handle {
position: absolute;
z-index: 11; // same as toggle buttons
&.left {
top: 0;
right: 0;
bottom: 0;
}
&.right {
top: 0;
left: 0;
bottom: 0;
}
&.bottom {
top: 0;
left: 0;
right: 0;
}
}
// Add borders
.atom-dock-inner.atom-dock-open.left {
border-right: 1px solid @base-border-color;
}
.atom-dock-inner.atom-dock-open.right {
border-left: 1px solid @base-border-color;
}
// Make toggle buttons cover ^ border
.atom-dock-toggle-button.left {
margin-left: -1px;
}
.atom-dock-toggle-button.right {
margin-right: -1px;
}
|
// Docks ------------------------------
// Make handles not take up any space when dock is open
.atom-dock-resize-handle {
position: absolute;
z-index: 11; // same as toggle buttons
&.left {
top: 0;
right: 0;
bottom: 0;
}
&.right {
top: 0;
left: 0;
bottom: 0;
}
&.bottom {
top: 0;
left: 0;
right: 0;
}
}
// Add borders
.atom-dock-inner.atom-dock-open.left {
border-right: 1px solid @base-border-color;
}
.atom-dock-inner.atom-dock-open.right {
border-left: 1px solid @base-border-color;
}
// Make toggle buttons cover ^ border
.atom-dock-toggle-button.left {
- margin-left: -2px;
? ^
+ margin-left: -1px;
? ^
}
.atom-dock-toggle-button.right {
- margin-right: -2px;
? ^
+ margin-right: -1px;
? ^
}
- .atom-dock-inner:not(.atom-dock-open) .atom-dock-toggle-button.bottom {
- margin-bottom: -1px;
- } | 7 | 0.162791 | 2 | 5 |
8711417357b6d34cc26a52305a06c2711cac9235 | lib/rubycritic/cli.rb | lib/rubycritic/cli.rb | require "optparse"
require "rubycritic"
module Rubycritic
OptionParser.new do |opts|
opts.banner = "Usage: rubycritic [options] [paths]"
opts.on_tail("-v", "--version", "Show this version") do
require "rubycritic/version"
puts VERSION
exit 0
end
opts.on_tail("-h", "--help", "Show this message") do
puts opts
exit 0
end
end.parse!
ARGV << "." if ARGV.empty?
Rubycritic.new.critique(ARGV)
exit 0
end
| require "optparse"
require "rubycritic"
module Rubycritic
OptionParser.new do |opts|
opts.banner = "Usage: rubycritic [options] [paths]"
opts.on_tail("-v", "--version", "Show this version") do
require "rubycritic/version"
puts VERSION
exit 0
end
opts.on_tail("-h", "--help", "Show this message") do
puts opts
exit 0
end
end.parse!
ARGV << "." if ARGV.empty?
puts "New critique at #{Rubycritic.new.critique(ARGV)}"
exit 0
end
| Print the href of the smells index page after running | Print the href of the smells index page after running
| Ruby | mit | fimmtiu/rubycritic,fimmtiu/rubycritic,ancorgs/rubycritic,bglusman/rubycritic,ancorgs/rubycritic,whitesmith/rubycritic,fimmtiu/rubycritic,bglusman/rubycritic,whitesmith/rubycritic,whitesmith/rubycritic,bglusman/rubycritic,ancorgs/rubycritic,whitesmith/rubycritic | ruby | ## Code Before:
require "optparse"
require "rubycritic"
module Rubycritic
OptionParser.new do |opts|
opts.banner = "Usage: rubycritic [options] [paths]"
opts.on_tail("-v", "--version", "Show this version") do
require "rubycritic/version"
puts VERSION
exit 0
end
opts.on_tail("-h", "--help", "Show this message") do
puts opts
exit 0
end
end.parse!
ARGV << "." if ARGV.empty?
Rubycritic.new.critique(ARGV)
exit 0
end
## Instruction:
Print the href of the smells index page after running
## Code After:
require "optparse"
require "rubycritic"
module Rubycritic
OptionParser.new do |opts|
opts.banner = "Usage: rubycritic [options] [paths]"
opts.on_tail("-v", "--version", "Show this version") do
require "rubycritic/version"
puts VERSION
exit 0
end
opts.on_tail("-h", "--help", "Show this message") do
puts opts
exit 0
end
end.parse!
ARGV << "." if ARGV.empty?
puts "New critique at #{Rubycritic.new.critique(ARGV)}"
exit 0
end
| require "optparse"
require "rubycritic"
module Rubycritic
OptionParser.new do |opts|
opts.banner = "Usage: rubycritic [options] [paths]"
opts.on_tail("-v", "--version", "Show this version") do
require "rubycritic/version"
puts VERSION
exit 0
end
opts.on_tail("-h", "--help", "Show this message") do
puts opts
exit 0
end
end.parse!
ARGV << "." if ARGV.empty?
- Rubycritic.new.critique(ARGV)
+ puts "New critique at #{Rubycritic.new.critique(ARGV)}"
exit 0
end | 2 | 0.08 | 1 | 1 |
d2a07eee4c8fcc05e495a7a42295af294834c1b6 | ext/libxml/ruby_xml_node.h | ext/libxml/ruby_xml_node.h | /* $Id$ */
/* Please see the LICENSE file for copyright and distribution information */
#ifndef __RUBY_XML_NODE__
#define __RUBY_XML_NODE__
extern VALUE cXMLNode;
extern VALUE eXMLNodeSetNamespace;
extern VALUE eXMLNodeFailedModify;
extern VALUE eXMLNodeUnknownType;
VALUE
ruby_xml_node2_wrap(VALUE class, xmlNodePtr xnode);
void ruby_xml_node_free(xmlNodePtr xnode);
void ruby_xml_node_mark_common(xmlNodePtr xnode);
void ruby_init_xml_node(void);
VALUE check_string_or_symbol(VALUE val);
VALUE ruby_xml_node_child_set(VALUE self, VALUE obj);
VALUE ruby_xml_node_name_get(VALUE self);
VALUE ruby_xml_node_property_get(VALUE self, VALUE key);
VALUE ruby_xml_node_property_set(VALUE self, VALUE key, VALUE val);
#endif
| /* $Id$ */
/* Please see the LICENSE file for copyright and distribution information */
#ifndef __RUBY_XML_NODE__
#define __RUBY_XML_NODE__
extern VALUE cXMLNode;
extern VALUE eXMLNodeSetNamespace;
extern VALUE eXMLNodeFailedModify;
extern VALUE eXMLNodeUnknownType;
VALUE ruby_xml_node2_wrap(VALUE class, xmlNodePtr xnode);
VALUE check_string_or_symbol(VALUE val);
#endif
| Clean out needless declarations in the node.h header file. | Clean out needless declarations in the node.h header file.
| C | mit | increments/libxml-ruby,xml4r/libxml-ruby,sferik/libxml-ruby,sferik/libxml-ruby,xml4r/libxml-ruby,sferik/libxml-ruby,increments/libxml-ruby,sferik/libxml-ruby,sferik/libxml-ruby,sferik/libxml-ruby,increments/libxml-ruby,xml4r/libxml-ruby | c | ## Code Before:
/* $Id$ */
/* Please see the LICENSE file for copyright and distribution information */
#ifndef __RUBY_XML_NODE__
#define __RUBY_XML_NODE__
extern VALUE cXMLNode;
extern VALUE eXMLNodeSetNamespace;
extern VALUE eXMLNodeFailedModify;
extern VALUE eXMLNodeUnknownType;
VALUE
ruby_xml_node2_wrap(VALUE class, xmlNodePtr xnode);
void ruby_xml_node_free(xmlNodePtr xnode);
void ruby_xml_node_mark_common(xmlNodePtr xnode);
void ruby_init_xml_node(void);
VALUE check_string_or_symbol(VALUE val);
VALUE ruby_xml_node_child_set(VALUE self, VALUE obj);
VALUE ruby_xml_node_name_get(VALUE self);
VALUE ruby_xml_node_property_get(VALUE self, VALUE key);
VALUE ruby_xml_node_property_set(VALUE self, VALUE key, VALUE val);
#endif
## Instruction:
Clean out needless declarations in the node.h header file.
## Code After:
/* $Id$ */
/* Please see the LICENSE file for copyright and distribution information */
#ifndef __RUBY_XML_NODE__
#define __RUBY_XML_NODE__
extern VALUE cXMLNode;
extern VALUE eXMLNodeSetNamespace;
extern VALUE eXMLNodeFailedModify;
extern VALUE eXMLNodeUnknownType;
VALUE ruby_xml_node2_wrap(VALUE class, xmlNodePtr xnode);
VALUE check_string_or_symbol(VALUE val);
#endif
| /* $Id$ */
/* Please see the LICENSE file for copyright and distribution information */
#ifndef __RUBY_XML_NODE__
#define __RUBY_XML_NODE__
extern VALUE cXMLNode;
extern VALUE eXMLNodeSetNamespace;
extern VALUE eXMLNodeFailedModify;
extern VALUE eXMLNodeUnknownType;
- VALUE
- ruby_xml_node2_wrap(VALUE class, xmlNodePtr xnode);
+ VALUE ruby_xml_node2_wrap(VALUE class, xmlNodePtr xnode);
? ++++++
-
- void ruby_xml_node_free(xmlNodePtr xnode);
- void ruby_xml_node_mark_common(xmlNodePtr xnode);
- void ruby_init_xml_node(void);
-
VALUE check_string_or_symbol(VALUE val);
-
- VALUE ruby_xml_node_child_set(VALUE self, VALUE obj);
- VALUE ruby_xml_node_name_get(VALUE self);
- VALUE ruby_xml_node_property_get(VALUE self, VALUE key);
- VALUE ruby_xml_node_property_set(VALUE self, VALUE key, VALUE val);
#endif | 13 | 0.5 | 1 | 12 |
96ddd63df180db229a0237278cc41c6d07579855 | requirements.txt | requirements.txt | django==1.4
gdata==2.0.17
geopy==0.95.1
django-twilio==0.2
twilio==3.5.1
django-rosetta==0.6.8
django-celery==3.0.17
| django==1.4
gdata==2.0.17
geopy==0.95.1
django-twilio==0.2
twilio==3.5.1
django-rosetta==0.6.8
django-celery==3.0.17
librabbitmq==1.0.1
| Add librabbitmq (makes bunnies hop faster) | Add librabbitmq (makes bunnies hop faster)
| Text | mit | smartchicago/chicago-early-learning,smartchicago/chicago-early-learning,smartchicago/chicago-early-learning,smartchicago/chicago-early-learning | text | ## Code Before:
django==1.4
gdata==2.0.17
geopy==0.95.1
django-twilio==0.2
twilio==3.5.1
django-rosetta==0.6.8
django-celery==3.0.17
## Instruction:
Add librabbitmq (makes bunnies hop faster)
## Code After:
django==1.4
gdata==2.0.17
geopy==0.95.1
django-twilio==0.2
twilio==3.5.1
django-rosetta==0.6.8
django-celery==3.0.17
librabbitmq==1.0.1
| django==1.4
gdata==2.0.17
geopy==0.95.1
django-twilio==0.2
twilio==3.5.1
django-rosetta==0.6.8
django-celery==3.0.17
+ librabbitmq==1.0.1 | 1 | 0.142857 | 1 | 0 |
ff8b3f02bf430b4e79c41c4f8b3dd83bd3a94a15 | xmonad/.xmonad/xmonad.hs | xmonad/.xmonad/xmonad.hs | import System.IO
import XMonad
import XMonad.Actions.SpawnOn
import XMonad.Config.Desktop
import XMonad.Hooks.DynamicLog
import XMonad.Hooks.ManageDocks
import XMonad.Hooks.ManageHelpers (composeOne, isFullscreen, isDialog, doFullFloat, doCenterFloat)
import XMonad.Layout.NoBorders
import XMonad.Util.EZConfig(additionalKeys)
import XMonad.Util.Run (spawnPipe)
import Data.Monoid
myManageHook :: Query (Data.Monoid.Endo WindowSet)
myManageHook = composeAll
[ className =? "Google-chrome" --> doShift "1"
, className =? "Emacs" --> doShift "2"
, className =? "Terminator" --> doShift "3"
, className =? "Thunar" --> doShift "4"
, className =? "Xfce4-notifyd" --> doIgnore
, isFullscreen --> doFullFloat
, isDialog --> doCenterFloat
]
myConfig xmproc = xmonad desktopConfig {
terminal = "terminator"
, modMask = mod4Mask
, logHook = dynamicLogWithPP xmobarPP {
ppOutput = hPutStrLn xmproc
, ppTitle = xmobarColor "green" "" . shorten 50
}
, manageHook = manageDocks <+> myManageHook <+> manageHook desktopConfig
, layoutHook = avoidStruts $ smartBorders $ layoutHook defaultConfig
}
main = do
xmproc <- spawnPipe "xmobar ~/.xmonad/xmobarrc"
myConfig xmproc
| import System.IO
import XMonad
import XMonad.Actions.SpawnOn
import XMonad.Config.Desktop
import XMonad.Hooks.DynamicLog
import XMonad.Hooks.ManageDocks
import XMonad.Hooks.ManageHelpers (composeOne, isFullscreen, isDialog, doFullFloat, doCenterFloat)
import XMonad.Layout.NoBorders
import XMonad.Util.EZConfig(additionalKeys)
import XMonad.Util.Run (spawnPipe)
import Data.Monoid
myManageHook :: Query (Data.Monoid.Endo WindowSet)
myManageHook = composeAll
[ className =? "Google-chrome" --> doShift "1"
, className =? "Emacs" --> doShift "2"
, className =? "Terminator" --> doShift "3"
, className =? "Thunar" --> doShift "4"
, className =? "Xfce4-notifyd" --> doIgnore
, isFullscreen --> doFullFloat
, isDialog --> doCenterFloat
]
main = do
xmproc <- spawnPipe "xmobar ~/.xmonad/xmobarrc"
xmonad desktopConfig {
terminal = "terminator"
, modMask = mod4Mask
, logHook = dynamicLogWithPP xmobarPP {
ppOutput = hPutStrLn xmproc
, ppTitle = xmobarColor "green" "" . shorten 50
}
, manageHook = manageDocks <+> myManageHook <+> manageHook desktopConfig
, layoutHook = avoidStruts $ smartBorders $ layoutHook defaultConfig
}
| Revert "Cleanup the config a bit" | Revert "Cleanup the config a bit"
This reverts commit ecdb1d403bc9a71275351516a9dc8eb1d1864925.
| Haskell | mit | jaseemabid/dotfiles,jaseemabid/dotfiles,jaseemabid/dotfiles,jaseemabid/dotfiles,jaseemabid/dotfiles | haskell | ## Code Before:
import System.IO
import XMonad
import XMonad.Actions.SpawnOn
import XMonad.Config.Desktop
import XMonad.Hooks.DynamicLog
import XMonad.Hooks.ManageDocks
import XMonad.Hooks.ManageHelpers (composeOne, isFullscreen, isDialog, doFullFloat, doCenterFloat)
import XMonad.Layout.NoBorders
import XMonad.Util.EZConfig(additionalKeys)
import XMonad.Util.Run (spawnPipe)
import Data.Monoid
myManageHook :: Query (Data.Monoid.Endo WindowSet)
myManageHook = composeAll
[ className =? "Google-chrome" --> doShift "1"
, className =? "Emacs" --> doShift "2"
, className =? "Terminator" --> doShift "3"
, className =? "Thunar" --> doShift "4"
, className =? "Xfce4-notifyd" --> doIgnore
, isFullscreen --> doFullFloat
, isDialog --> doCenterFloat
]
myConfig xmproc = xmonad desktopConfig {
terminal = "terminator"
, modMask = mod4Mask
, logHook = dynamicLogWithPP xmobarPP {
ppOutput = hPutStrLn xmproc
, ppTitle = xmobarColor "green" "" . shorten 50
}
, manageHook = manageDocks <+> myManageHook <+> manageHook desktopConfig
, layoutHook = avoidStruts $ smartBorders $ layoutHook defaultConfig
}
main = do
xmproc <- spawnPipe "xmobar ~/.xmonad/xmobarrc"
myConfig xmproc
## Instruction:
Revert "Cleanup the config a bit"
This reverts commit ecdb1d403bc9a71275351516a9dc8eb1d1864925.
## Code After:
import System.IO
import XMonad
import XMonad.Actions.SpawnOn
import XMonad.Config.Desktop
import XMonad.Hooks.DynamicLog
import XMonad.Hooks.ManageDocks
import XMonad.Hooks.ManageHelpers (composeOne, isFullscreen, isDialog, doFullFloat, doCenterFloat)
import XMonad.Layout.NoBorders
import XMonad.Util.EZConfig(additionalKeys)
import XMonad.Util.Run (spawnPipe)
import Data.Monoid
myManageHook :: Query (Data.Monoid.Endo WindowSet)
myManageHook = composeAll
[ className =? "Google-chrome" --> doShift "1"
, className =? "Emacs" --> doShift "2"
, className =? "Terminator" --> doShift "3"
, className =? "Thunar" --> doShift "4"
, className =? "Xfce4-notifyd" --> doIgnore
, isFullscreen --> doFullFloat
, isDialog --> doCenterFloat
]
main = do
xmproc <- spawnPipe "xmobar ~/.xmonad/xmobarrc"
xmonad desktopConfig {
terminal = "terminator"
, modMask = mod4Mask
, logHook = dynamicLogWithPP xmobarPP {
ppOutput = hPutStrLn xmproc
, ppTitle = xmobarColor "green" "" . shorten 50
}
, manageHook = manageDocks <+> myManageHook <+> manageHook desktopConfig
, layoutHook = avoidStruts $ smartBorders $ layoutHook defaultConfig
}
| import System.IO
import XMonad
import XMonad.Actions.SpawnOn
import XMonad.Config.Desktop
import XMonad.Hooks.DynamicLog
import XMonad.Hooks.ManageDocks
import XMonad.Hooks.ManageHelpers (composeOne, isFullscreen, isDialog, doFullFloat, doCenterFloat)
import XMonad.Layout.NoBorders
import XMonad.Util.EZConfig(additionalKeys)
import XMonad.Util.Run (spawnPipe)
import Data.Monoid
myManageHook :: Query (Data.Monoid.Endo WindowSet)
myManageHook = composeAll
[ className =? "Google-chrome" --> doShift "1"
, className =? "Emacs" --> doShift "2"
, className =? "Terminator" --> doShift "3"
, className =? "Thunar" --> doShift "4"
, className =? "Xfce4-notifyd" --> doIgnore
, isFullscreen --> doFullFloat
, isDialog --> doCenterFloat
]
- myConfig xmproc = xmonad desktopConfig {
- terminal = "terminator"
- , modMask = mod4Mask
- , logHook = dynamicLogWithPP xmobarPP {
- ppOutput = hPutStrLn xmproc
- , ppTitle = xmobarColor "green" "" . shorten 50
- }
- , manageHook = manageDocks <+> myManageHook <+> manageHook desktopConfig
- , layoutHook = avoidStruts $ smartBorders $ layoutHook defaultConfig
- }
-
main = do
xmproc <- spawnPipe "xmobar ~/.xmonad/xmobarrc"
- myConfig xmproc
+ xmonad desktopConfig {
+ terminal = "terminator"
+ , modMask = mod4Mask
+ , logHook = dynamicLogWithPP xmobarPP {
+ ppOutput = hPutStrLn xmproc
+ , ppTitle = xmobarColor "green" "" . shorten 50
+ }
+ , manageHook = manageDocks <+> myManageHook <+> manageHook desktopConfig
+ , layoutHook = avoidStruts $ smartBorders $ layoutHook defaultConfig
+ } | 22 | 0.578947 | 10 | 12 |
d23df853dcb1f4b49dd2e1faf888c1d2f1b17dad | .travis.yml | .travis.yml | language: objective-c
osx_image: xcode6.4
cache: cocoapods
sudo: false
before_install:
- gem install --no-ri --no-rdoc cocoapods xcpretty
script:
- set -o pipefail; xcodebuild -workspace *.xcworkspace -scheme "Hamcrest OSX" build test | xcpretty -c
- set -o pipefail; xcodebuild -workspace *.xcworkspace -scheme "Hamcrest iOS" build test | xcpretty -c
- pod lib lint
| language: objective-c
osx_image: xcode6.4
sudo: false
before_install:
- gem install --no-ri --no-rdoc cocoapods xcpretty
script:
- set -o pipefail; xcodebuild -workspace *.xcworkspace -scheme "Hamcrest OSX" build test | xcpretty -c
- set -o pipefail; xcodebuild -workspace *.xcworkspace -scheme "Hamcrest iOS" build test | xcpretty -c
- pod lib lint
| Disable cocoapods caching as it interferes with linting. | Disable cocoapods caching as it interferes with linting.
| YAML | bsd-3-clause | MjAbuz/SwiftHamcrest,MjAbuz/SwiftHamcrest,sebastianludwig/SwiftHamcrest,sebastianludwig/SwiftHamcrest | yaml | ## Code Before:
language: objective-c
osx_image: xcode6.4
cache: cocoapods
sudo: false
before_install:
- gem install --no-ri --no-rdoc cocoapods xcpretty
script:
- set -o pipefail; xcodebuild -workspace *.xcworkspace -scheme "Hamcrest OSX" build test | xcpretty -c
- set -o pipefail; xcodebuild -workspace *.xcworkspace -scheme "Hamcrest iOS" build test | xcpretty -c
- pod lib lint
## Instruction:
Disable cocoapods caching as it interferes with linting.
## Code After:
language: objective-c
osx_image: xcode6.4
sudo: false
before_install:
- gem install --no-ri --no-rdoc cocoapods xcpretty
script:
- set -o pipefail; xcodebuild -workspace *.xcworkspace -scheme "Hamcrest OSX" build test | xcpretty -c
- set -o pipefail; xcodebuild -workspace *.xcworkspace -scheme "Hamcrest iOS" build test | xcpretty -c
- pod lib lint
| language: objective-c
osx_image: xcode6.4
- cache: cocoapods
sudo: false
before_install:
- gem install --no-ri --no-rdoc cocoapods xcpretty
script:
- set -o pipefail; xcodebuild -workspace *.xcworkspace -scheme "Hamcrest OSX" build test | xcpretty -c
- set -o pipefail; xcodebuild -workspace *.xcworkspace -scheme "Hamcrest iOS" build test | xcpretty -c
- pod lib lint | 1 | 0.083333 | 0 | 1 |
f2b068a82ed355028085bcbf87c12de9dc3f0550 | internal/testhelper/testdata/testroot/responses/allowed_without_console_messages.json | internal/testhelper/testdata/testroot/responses/allowed_without_console_messages.json | {
"status": true,
"gl_repository": "project-26",
"gl_project_path": "group/private",
"gl_id": "user-1",
"gl_username": "root",
"git_config_options": [],
"gitaly": {
"repository": {
"storage_name": "default",
"relative_path": "GITALY_REPOSITORY",
"git_object_directory": "path/to/git_object_directory",
"git_alternate_object_directories": ["path/to/git_alternate_object_directory"],
"gl_repository": "project-26",
"gl_project_path": "group/private"
},
"address": "GITALY_ADDRESS",
"token": "token"
},
"git_protocol": "protocol",
"gl_console_messages": []
}
| {
"status": true,
"gl_repository": "project-26",
"gl_project_path": "group/private",
"gl_id": "user-1",
"gl_username": "root",
"git_config_options": [],
"gitaly": {
"repository": {
"storage_name": "default",
"relative_path": "GITALY_REPOSITORY",
"git_object_directory": "objects/",
"git_alternate_object_directories": ["objects/"],
"gl_repository": "project-26",
"gl_project_path": "group/private"
},
"address": "GITALY_ADDRESS",
"token": "token"
},
"git_protocol": "protocol",
"gl_console_messages": []
}
| Fix broken Gitaly integration tests | Fix broken Gitaly integration tests
Gitaly started to require `Repository` information for certain
commands like upload-pack, upload-archive, and receive-pack.
However, gitlab-shell tests are sending `git_object_directory` and
`git_alternate_object_directories` that do not exist.
To fix the tests, we set those to an existing directory in the
created repository.
| JSON | mit | gitlabhq/gitlab-shell,gitlabhq/gitlab-shell,gitlabhq/gitlab-shell | json | ## Code Before:
{
"status": true,
"gl_repository": "project-26",
"gl_project_path": "group/private",
"gl_id": "user-1",
"gl_username": "root",
"git_config_options": [],
"gitaly": {
"repository": {
"storage_name": "default",
"relative_path": "GITALY_REPOSITORY",
"git_object_directory": "path/to/git_object_directory",
"git_alternate_object_directories": ["path/to/git_alternate_object_directory"],
"gl_repository": "project-26",
"gl_project_path": "group/private"
},
"address": "GITALY_ADDRESS",
"token": "token"
},
"git_protocol": "protocol",
"gl_console_messages": []
}
## Instruction:
Fix broken Gitaly integration tests
Gitaly started to require `Repository` information for certain
commands like upload-pack, upload-archive, and receive-pack.
However, gitlab-shell tests are sending `git_object_directory` and
`git_alternate_object_directories` that do not exist.
To fix the tests, we set those to an existing directory in the
created repository.
## Code After:
{
"status": true,
"gl_repository": "project-26",
"gl_project_path": "group/private",
"gl_id": "user-1",
"gl_username": "root",
"git_config_options": [],
"gitaly": {
"repository": {
"storage_name": "default",
"relative_path": "GITALY_REPOSITORY",
"git_object_directory": "objects/",
"git_alternate_object_directories": ["objects/"],
"gl_repository": "project-26",
"gl_project_path": "group/private"
},
"address": "GITALY_ADDRESS",
"token": "token"
},
"git_protocol": "protocol",
"gl_console_messages": []
}
| {
"status": true,
"gl_repository": "project-26",
"gl_project_path": "group/private",
"gl_id": "user-1",
"gl_username": "root",
"git_config_options": [],
"gitaly": {
"repository": {
"storage_name": "default",
"relative_path": "GITALY_REPOSITORY",
- "git_object_directory": "path/to/git_object_directory",
? ------------ ^^^^^^^^^^
+ "git_object_directory": "objects/",
? ^^
- "git_alternate_object_directories": ["path/to/git_alternate_object_directory"],
? ---------------------- ^^^^^^^^^^
+ "git_alternate_object_directories": ["objects/"],
? ^^
"gl_repository": "project-26",
"gl_project_path": "group/private"
},
"address": "GITALY_ADDRESS",
"token": "token"
},
"git_protocol": "protocol",
"gl_console_messages": []
} | 4 | 0.181818 | 2 | 2 |
a3bbd9b11b4f155759eab71ecc75300caac2c9d5 | config/default.yaml | config/default.yaml | app:
port: 3000
session:
host: "localhost"
port: 6379
cleanup_time: 7200000
cleanup_interval: 3600000
global_request_timeout: 5000
log:
customlevels:
ERROR: 1
INFO: 1
LOG: 1
WARN: 1
apis:
base: "/apis"
health: "/service/healthcheck"
| app:
port: 3000
session:
host: "localhost"
port: 6379
cleanup_time: 7200000
cleanup_interval: 3600000
global_request_timeout: 5000
log:
customlevels:
ERROR: 1
INFO: 1
LOG: 1
WARN: 1
apis:
base: "/apis"
health: "/service/healthcheck"
releases:
stable: "0.0.0"
beta: "0.0.0"
alpha: "0.0.0"
| Add version number to fix tests | Add version number to fix tests
| YAML | mit | super-useful/su-apiserver | yaml | ## Code Before:
app:
port: 3000
session:
host: "localhost"
port: 6379
cleanup_time: 7200000
cleanup_interval: 3600000
global_request_timeout: 5000
log:
customlevels:
ERROR: 1
INFO: 1
LOG: 1
WARN: 1
apis:
base: "/apis"
health: "/service/healthcheck"
## Instruction:
Add version number to fix tests
## Code After:
app:
port: 3000
session:
host: "localhost"
port: 6379
cleanup_time: 7200000
cleanup_interval: 3600000
global_request_timeout: 5000
log:
customlevels:
ERROR: 1
INFO: 1
LOG: 1
WARN: 1
apis:
base: "/apis"
health: "/service/healthcheck"
releases:
stable: "0.0.0"
beta: "0.0.0"
alpha: "0.0.0"
| app:
port: 3000
session:
host: "localhost"
port: 6379
cleanup_time: 7200000
cleanup_interval: 3600000
global_request_timeout: 5000
log:
customlevels:
ERROR: 1
INFO: 1
LOG: 1
WARN: 1
apis:
base: "/apis"
health: "/service/healthcheck"
+ releases:
+ stable: "0.0.0"
+ beta: "0.0.0"
+ alpha: "0.0.0" | 4 | 0.235294 | 4 | 0 |
3dfb310fa4df74c89b46fabb8195eb62b53dc5be | optimisers.py | optimisers.py | import numpy as np
class Optimiser:
def __init__(self, network):
self.nn = network
self.step_sign = -1.0 # minimise by default
def step(self):
self.nn.forward()
self.nn.reset_gradients()
self.nn.backward()
self.update_params()
def update_params(self):
pass
def minimise(self):
self.step_sign = -1.0
return self
def maximise(self):
self.step_sign = 1.0
return self
class GradientDescentOptimiser(Optimiser):
def __init__(self, network, step_size):
Optimiser.__init__(self, network)
self.step_size = abs(step_size)
def update_params(self):
for param in self.nn.get_params():
param.value += (self.step_sign * self.step_size) * param.grad
| import numpy as np
class Optimiser:
def __init__(self, network):
self.nn = network
self.step_sign = -1.0 # minimise by default
def step(self):
self.nn.forward()
self.nn.reset_gradients()
self.nn.backward()
self.update_params()
def update_params(self):
pass
def minimise(self):
self.step_sign = -1.0
return self
def maximise(self):
self.step_sign = 1.0
return self
class GradientDescentOptimiser(Optimiser):
def __init__(self, network, step_size):
Optimiser.__init__(self, network)
self.step_size = abs(step_size)
def update_params(self):
for param in self.nn.get_params():
param.value += (self.step_sign * self.step_size) * param.grad
class GradientDescentMomentumOptimiser(Optimiser):
def __init__(self, network, step_size, momentum = 0.9):
Optimiser.__init__(self, network)
self.step_size = abs(step_size)
self.momentum = momentum
# initialise variables for momentum
self.last_param_updates = []
for param in self.nn.get_params():
self.last_param_updates.append(np.zeros_like(param.value))
def update_params(self):
for param, last_update in zip(self.nn.get_params(), self.last_param_updates):
update = self.momentum * last_update + self.step_size * param.grad
param.value += self.step_sign * update
last_update[:] = update
| Add GradientDescent with Momentum Optimiser. | Add GradientDescent with Momentum Optimiser.
| Python | mit | Hornobster/Numpy-Neural-Net | python | ## Code Before:
import numpy as np
class Optimiser:
def __init__(self, network):
self.nn = network
self.step_sign = -1.0 # minimise by default
def step(self):
self.nn.forward()
self.nn.reset_gradients()
self.nn.backward()
self.update_params()
def update_params(self):
pass
def minimise(self):
self.step_sign = -1.0
return self
def maximise(self):
self.step_sign = 1.0
return self
class GradientDescentOptimiser(Optimiser):
def __init__(self, network, step_size):
Optimiser.__init__(self, network)
self.step_size = abs(step_size)
def update_params(self):
for param in self.nn.get_params():
param.value += (self.step_sign * self.step_size) * param.grad
## Instruction:
Add GradientDescent with Momentum Optimiser.
## Code After:
import numpy as np
class Optimiser:
def __init__(self, network):
self.nn = network
self.step_sign = -1.0 # minimise by default
def step(self):
self.nn.forward()
self.nn.reset_gradients()
self.nn.backward()
self.update_params()
def update_params(self):
pass
def minimise(self):
self.step_sign = -1.0
return self
def maximise(self):
self.step_sign = 1.0
return self
class GradientDescentOptimiser(Optimiser):
def __init__(self, network, step_size):
Optimiser.__init__(self, network)
self.step_size = abs(step_size)
def update_params(self):
for param in self.nn.get_params():
param.value += (self.step_sign * self.step_size) * param.grad
class GradientDescentMomentumOptimiser(Optimiser):
def __init__(self, network, step_size, momentum = 0.9):
Optimiser.__init__(self, network)
self.step_size = abs(step_size)
self.momentum = momentum
# initialise variables for momentum
self.last_param_updates = []
for param in self.nn.get_params():
self.last_param_updates.append(np.zeros_like(param.value))
def update_params(self):
for param, last_update in zip(self.nn.get_params(), self.last_param_updates):
update = self.momentum * last_update + self.step_size * param.grad
param.value += self.step_sign * update
last_update[:] = update
| import numpy as np
class Optimiser:
def __init__(self, network):
self.nn = network
self.step_sign = -1.0 # minimise by default
def step(self):
self.nn.forward()
self.nn.reset_gradients()
self.nn.backward()
self.update_params()
def update_params(self):
pass
def minimise(self):
self.step_sign = -1.0
return self
def maximise(self):
self.step_sign = 1.0
return self
class GradientDescentOptimiser(Optimiser):
def __init__(self, network, step_size):
Optimiser.__init__(self, network)
self.step_size = abs(step_size)
def update_params(self):
for param in self.nn.get_params():
param.value += (self.step_sign * self.step_size) * param.grad
+ class GradientDescentMomentumOptimiser(Optimiser):
+ def __init__(self, network, step_size, momentum = 0.9):
+ Optimiser.__init__(self, network)
+ self.step_size = abs(step_size)
+ self.momentum = momentum
+
+ # initialise variables for momentum
+ self.last_param_updates = []
+ for param in self.nn.get_params():
+ self.last_param_updates.append(np.zeros_like(param.value))
+
+ def update_params(self):
+ for param, last_update in zip(self.nn.get_params(), self.last_param_updates):
+ update = self.momentum * last_update + self.step_size * param.grad
+ param.value += self.step_sign * update
+ last_update[:] = update
+ | 17 | 0.447368 | 17 | 0 |
1f6010dacfde470aa8b18eef97d3e0a528eab7ad | Core/Exceptions/DownloadRequestException.php | Core/Exceptions/DownloadRequestException.php | <?php
namespace Screamz\SecureDownloadBundle\Core\Exceptions;
use Screamz\SecureDownloadBundle\Core\Classes\DownloadRequest;
use Screamz\SecureDownloadBundle\Core\Classes\DownloadRequestError;
/**
* Class DownloadRequestException
*
* This kind of exception is throw when download request error count is greater than 0, just before the exit point of the bundle (when the hash or the object is returned).
*
* The user will have to catch it in his own code.
*
* @see Screamz\SecureDownloadBundle\Core\Classes\ErrorCode
*
* @author Andréas HANSS <ahanss@kaliop.com>
*/
class DownloadRequestException extends \Exception
{
/**
* DownloadRequestException constructor.
*
* @param DownloadRequest $downloadRequest
*/
public function __construct(DownloadRequest $downloadRequest)
{
$this->downloadRequest = $downloadRequest;
parent::__construct('An '.__CLASS__.' has been thrown, please catch it to handle this error case.');
}
/**
* Get the errors array, you can refer to error codes to handle different cases.
*
* @return DownloadRequestError[]
*
* @see Screamz\SecureDownloadBundle\Core\Classes\ErrorCode
*/
public function getReasons()
{
return $this->downloadRequest->getErrors();
}
} | <?php
namespace Screamz\SecureDownloadBundle\Core\Exceptions;
use Screamz\SecureDownloadBundle\Core\Classes\DownloadRequest;
use Screamz\SecureDownloadBundle\Core\Classes\DownloadRequestError;
/**
* Class DownloadRequestException
*
* This kind of exception is throw when download request error count is greater than 0, just before the exit point of the bundle (when the hash or the object is returned).
*
* The user will have to catch it in his own code.
*
* @see Screamz\SecureDownloadBundle\Core\Classes\ErrorCode
*
* @author Andréas HANSS <ahanss@kaliop.com>
*/
class DownloadRequestException extends \Exception
{
/**
* DownloadRequestException constructor.
*
* @param DownloadRequest $downloadRequest
*/
public function __construct(DownloadRequest $downloadRequest)
{
$this->downloadRequest = $downloadRequest;
parent::__construct('An '.__CLASS__.' has been thrown, please catch it to handle this error case.');
}
/**
* @inheritDoc
*/
public function __toString()
{
$string = '';
foreach ($this->downloadRequest->getErrors() as $error) {
$string .= (string)$error . '|';
}
return $string;
}
/**
* Get the errors array, you can refer to error codes to handle different cases.
*
* @return DownloadRequestError[]
*
* @see Screamz\SecureDownloadBundle\Core\Classes\ErrorCode
*/
public function getReasons()
{
return $this->downloadRequest->getErrors();
}
} | Add __tostring magic method for easier error dumping and debug | Add __tostring magic method for easier error dumping and debug
| PHP | mit | ScreamZ/SecureDownloadBundle | php | ## Code Before:
<?php
namespace Screamz\SecureDownloadBundle\Core\Exceptions;
use Screamz\SecureDownloadBundle\Core\Classes\DownloadRequest;
use Screamz\SecureDownloadBundle\Core\Classes\DownloadRequestError;
/**
* Class DownloadRequestException
*
* This kind of exception is throw when download request error count is greater than 0, just before the exit point of the bundle (when the hash or the object is returned).
*
* The user will have to catch it in his own code.
*
* @see Screamz\SecureDownloadBundle\Core\Classes\ErrorCode
*
* @author Andréas HANSS <ahanss@kaliop.com>
*/
class DownloadRequestException extends \Exception
{
/**
* DownloadRequestException constructor.
*
* @param DownloadRequest $downloadRequest
*/
public function __construct(DownloadRequest $downloadRequest)
{
$this->downloadRequest = $downloadRequest;
parent::__construct('An '.__CLASS__.' has been thrown, please catch it to handle this error case.');
}
/**
* Get the errors array, you can refer to error codes to handle different cases.
*
* @return DownloadRequestError[]
*
* @see Screamz\SecureDownloadBundle\Core\Classes\ErrorCode
*/
public function getReasons()
{
return $this->downloadRequest->getErrors();
}
}
## Instruction:
Add __tostring magic method for easier error dumping and debug
## Code After:
<?php
namespace Screamz\SecureDownloadBundle\Core\Exceptions;
use Screamz\SecureDownloadBundle\Core\Classes\DownloadRequest;
use Screamz\SecureDownloadBundle\Core\Classes\DownloadRequestError;
/**
* Class DownloadRequestException
*
* This kind of exception is throw when download request error count is greater than 0, just before the exit point of the bundle (when the hash or the object is returned).
*
* The user will have to catch it in his own code.
*
* @see Screamz\SecureDownloadBundle\Core\Classes\ErrorCode
*
* @author Andréas HANSS <ahanss@kaliop.com>
*/
class DownloadRequestException extends \Exception
{
/**
* DownloadRequestException constructor.
*
* @param DownloadRequest $downloadRequest
*/
public function __construct(DownloadRequest $downloadRequest)
{
$this->downloadRequest = $downloadRequest;
parent::__construct('An '.__CLASS__.' has been thrown, please catch it to handle this error case.');
}
/**
* @inheritDoc
*/
public function __toString()
{
$string = '';
foreach ($this->downloadRequest->getErrors() as $error) {
$string .= (string)$error . '|';
}
return $string;
}
/**
* Get the errors array, you can refer to error codes to handle different cases.
*
* @return DownloadRequestError[]
*
* @see Screamz\SecureDownloadBundle\Core\Classes\ErrorCode
*/
public function getReasons()
{
return $this->downloadRequest->getErrors();
}
} | <?php
namespace Screamz\SecureDownloadBundle\Core\Exceptions;
use Screamz\SecureDownloadBundle\Core\Classes\DownloadRequest;
use Screamz\SecureDownloadBundle\Core\Classes\DownloadRequestError;
/**
* Class DownloadRequestException
*
* This kind of exception is throw when download request error count is greater than 0, just before the exit point of the bundle (when the hash or the object is returned).
*
* The user will have to catch it in his own code.
*
* @see Screamz\SecureDownloadBundle\Core\Classes\ErrorCode
*
* @author Andréas HANSS <ahanss@kaliop.com>
*/
class DownloadRequestException extends \Exception
{
/**
* DownloadRequestException constructor.
*
* @param DownloadRequest $downloadRequest
*/
public function __construct(DownloadRequest $downloadRequest)
{
$this->downloadRequest = $downloadRequest;
parent::__construct('An '.__CLASS__.' has been thrown, please catch it to handle this error case.');
}
/**
+ * @inheritDoc
+ */
+ public function __toString()
+ {
+ $string = '';
+ foreach ($this->downloadRequest->getErrors() as $error) {
+ $string .= (string)$error . '|';
+ }
+ return $string;
+ }
+
+ /**
* Get the errors array, you can refer to error codes to handle different cases.
*
* @return DownloadRequestError[]
*
* @see Screamz\SecureDownloadBundle\Core\Classes\ErrorCode
*/
public function getReasons()
{
return $this->downloadRequest->getErrors();
}
} | 12 | 0.27907 | 12 | 0 |
8cd3cdf75332046c4bc66c60bd7b15214669a3db | mungegithub/misc-mungers/deployment/docs/configmap.yaml | mungegithub/misc-mungers/deployment/docs/configmap.yaml | http-cache-dir: /cache/httpcache
organization: kubernetes
project: kubernetes.github.io
pr-mungers: blunderbuss
state: open
token-file: /etc/secret-volume/token
period: 2m
repo-dir: /gitrepos
github-key-file: /etc/hook-secret-volume/secret
enable-md-yaml: true
use-reviewers: true
# munger specific options.
label-file: "/gitrepos/kubernetes.github.io/labels.yaml"
| http-cache-dir: /cache/httpcache
organization: kubernetes
project: kubernetes.github.io
pr-mungers: blunderbuss
state: open
token-file: /etc/secret-volume/token
period: 2m
repo-dir: /gitrepos
github-key-file: /etc/hook-secret-volume/secret
enable-md-yaml: true
use-reviewers: true
blunderbuss-number-assignees: 1
# munger specific options.
label-file: "/gitrepos/kubernetes.github.io/labels.yaml"
| Make docs repo misc-mungers deployment only auto-assign one user. | Make docs repo misc-mungers deployment only auto-assign one user.
| YAML | apache-2.0 | fejta/test-infra,ixdy/kubernetes-test-infra,fejta/test-infra,kargakis/test-infra,cblecker/test-infra,brahmaroutu/test-infra,foxish/test-infra,krzyzacy/test-infra,shashidharatd/test-infra,jessfraz/test-infra,shashidharatd/test-infra,kargakis/test-infra,krousey/test-infra,kubernetes/test-infra,cblecker/test-infra,lavalamp/test-infra,spxtr/test-infra,ixdy/kubernetes-test-infra,mindprince/test-infra,cblecker/test-infra,kargakis/test-infra,ixdy/kubernetes-test-infra,BenTheElder/test-infra,dims/test-infra,shashidharatd/test-infra,michelle192837/test-infra,dims/test-infra,cjwagner/test-infra,mindprince/test-infra,cjwagner/test-infra,jlowdermilk/test-infra,brahmaroutu/test-infra,grodrigues3/test-infra,foxish/test-infra,pwittrock/test-infra,krousey/test-infra,abgworrall/test-infra,krzyzacy/test-infra,fejta/test-infra,rmmh/kubernetes-test-infra,jessfraz/test-infra,grodrigues3/test-infra,dims/test-infra,BenTheElder/test-infra,ixdy/kubernetes-test-infra,lavalamp/test-infra,jlowdermilk/test-infra,kargakis/test-infra,mindprince/test-infra,cjwagner/test-infra,jlowdermilk/test-infra,shyamjvs/test-infra,krzyzacy/test-infra,BenTheElder/test-infra,jessfraz/test-infra,lavalamp/test-infra,abgworrall/test-infra,shyamjvs/test-infra,monopole/test-infra,fejta/test-infra,grodrigues3/test-infra,foxish/test-infra,jessfraz/test-infra,piosz/test-infra,dims/test-infra,spxtr/test-infra,lavalamp/test-infra,krzyzacy/test-infra,rmmh/kubernetes-test-infra,monopole/test-infra,cjwagner/test-infra,kubernetes/test-infra,mindprince/test-infra,foxish/test-infra,lavalamp/test-infra,dims/test-infra,michelle192837/test-infra,brahmaroutu/test-infra,grodrigues3/test-infra,shyamjvs/test-infra,brahmaroutu/test-infra,pwittrock/test-infra,krzyzacy/test-infra,rmmh/kubernetes-test-infra,jlowdermilk/test-infra,kargakis/test-infra,abgworrall/test-infra,michelle192837/test-infra,kubernetes/test-infra,ixdy/kubernetes-test-infra,kubernetes/test-infra,rmmh/kubernetes-test-infra,cblecker/test-infra,kubernetes/test-infra,BenTheElder/test-infra,krousey/test-infra,cjwagner/test-infra,abgworrall/test-infra,shashidharatd/test-infra,piosz/test-infra,monopole/test-infra,lavalamp/test-infra,shyamjvs/test-infra,pwittrock/test-infra,shashidharatd/test-infra,shyamjvs/test-infra,BenTheElder/test-infra,monopole/test-infra,krousey/test-infra,pwittrock/test-infra,fejta/test-infra,cblecker/test-infra,monopole/test-infra,jessfraz/test-infra,jlowdermilk/test-infra,abgworrall/test-infra,kubernetes/test-infra,pwittrock/test-infra,brahmaroutu/test-infra,jlowdermilk/test-infra,brahmaroutu/test-infra,spxtr/test-infra,spxtr/test-infra,grodrigues3/test-infra,shyamjvs/test-infra,krousey/test-infra,cjwagner/test-infra,mindprince/test-infra,jessfraz/test-infra,piosz/test-infra,foxish/test-infra,piosz/test-infra,rmmh/kubernetes-test-infra,monopole/test-infra,spxtr/test-infra,kargakis/test-infra,piosz/test-infra,BenTheElder/test-infra,cblecker/test-infra,michelle192837/test-infra,krzyzacy/test-infra,michelle192837/test-infra,fejta/test-infra,michelle192837/test-infra,dims/test-infra | yaml | ## Code Before:
http-cache-dir: /cache/httpcache
organization: kubernetes
project: kubernetes.github.io
pr-mungers: blunderbuss
state: open
token-file: /etc/secret-volume/token
period: 2m
repo-dir: /gitrepos
github-key-file: /etc/hook-secret-volume/secret
enable-md-yaml: true
use-reviewers: true
# munger specific options.
label-file: "/gitrepos/kubernetes.github.io/labels.yaml"
## Instruction:
Make docs repo misc-mungers deployment only auto-assign one user.
## Code After:
http-cache-dir: /cache/httpcache
organization: kubernetes
project: kubernetes.github.io
pr-mungers: blunderbuss
state: open
token-file: /etc/secret-volume/token
period: 2m
repo-dir: /gitrepos
github-key-file: /etc/hook-secret-volume/secret
enable-md-yaml: true
use-reviewers: true
blunderbuss-number-assignees: 1
# munger specific options.
label-file: "/gitrepos/kubernetes.github.io/labels.yaml"
| http-cache-dir: /cache/httpcache
organization: kubernetes
project: kubernetes.github.io
pr-mungers: blunderbuss
state: open
token-file: /etc/secret-volume/token
period: 2m
repo-dir: /gitrepos
github-key-file: /etc/hook-secret-volume/secret
enable-md-yaml: true
use-reviewers: true
+ blunderbuss-number-assignees: 1
# munger specific options.
label-file: "/gitrepos/kubernetes.github.io/labels.yaml" | 1 | 0.071429 | 1 | 0 |
8264105ca365f9ccf518c93cd464063e2781f178 | app/controllers/api/asciicasts_controller.rb | app/controllers/api/asciicasts_controller.rb | module Api
class AsciicastsController < BaseController
respond_to :html, only: [:show]
attr_reader :asciicast
def create
asciicast = asciicast_creator.create(asciicast_attributes)
render text: asciicast_url(asciicast), status: :created,
location: asciicast
rescue ActiveRecord::RecordInvalid => e
render nothing: true, status: 422
end
def show
@asciicast = Asciicast.find(params[:id])
respond_with(asciicast) do |format|
format.html do
allow_iframe_requests
render locals: {
page: BareAsciicastPagePresenter.build(asciicast, params)
}, layout: 'bare'
end
end
end
private
def asciicast_attributes
username, token = basic_auth_credentials
AsciicastParams.build(params[:asciicast], username, token, request.user_agent)
end
def basic_auth_credentials
authenticate_with_http_basic { |username, password| [username, password] }
end
def asciicast_creator
AsciicastCreator.new
end
def allow_iframe_requests
response.headers.delete('X-Frame-Options')
end
end
end
| module Api
class AsciicastsController < BaseController
respond_to :html, only: [:show]
attr_reader :asciicast
def create
asciicast = asciicast_creator.create(asciicast_attributes)
render text: asciicast_url(asciicast), status: :created,
location: asciicast
rescue ActiveRecord::RecordInvalid => e
render text: e.record.errors.messages, status: 422
end
def show
@asciicast = Asciicast.find(params[:id])
respond_with(asciicast) do |format|
format.html do
allow_iframe_requests
render locals: {
page: BareAsciicastPagePresenter.build(asciicast, params)
}, layout: 'bare'
end
end
end
private
def asciicast_attributes
username, token = basic_auth_credentials
AsciicastParams.build(params[:asciicast], username, token, request.user_agent)
end
def basic_auth_credentials
authenticate_with_http_basic { |username, password| [username, password] }
end
def asciicast_creator
AsciicastCreator.new
end
def allow_iframe_requests
response.headers.delete('X-Frame-Options')
end
end
end
| Return meaningful error message for 422 | Return meaningful error message for 422
| Ruby | apache-2.0 | asciinema/asciinema-server,SunDi3yansyah/asciinema.org,SunDi3yansyah/asciinema.org,asciinema/asciinema-server,asciinema/asciinema-server,SunDi3yansyah/asciinema.org,SunDi3yansyah/asciinema.org,asciinema/asciinema.org,asciinema/asciinema.org,asciinema/asciinema-server,asciinema/asciinema.org,SunDi3yansyah/asciinema.org,asciinema/asciinema.org | ruby | ## Code Before:
module Api
class AsciicastsController < BaseController
respond_to :html, only: [:show]
attr_reader :asciicast
def create
asciicast = asciicast_creator.create(asciicast_attributes)
render text: asciicast_url(asciicast), status: :created,
location: asciicast
rescue ActiveRecord::RecordInvalid => e
render nothing: true, status: 422
end
def show
@asciicast = Asciicast.find(params[:id])
respond_with(asciicast) do |format|
format.html do
allow_iframe_requests
render locals: {
page: BareAsciicastPagePresenter.build(asciicast, params)
}, layout: 'bare'
end
end
end
private
def asciicast_attributes
username, token = basic_auth_credentials
AsciicastParams.build(params[:asciicast], username, token, request.user_agent)
end
def basic_auth_credentials
authenticate_with_http_basic { |username, password| [username, password] }
end
def asciicast_creator
AsciicastCreator.new
end
def allow_iframe_requests
response.headers.delete('X-Frame-Options')
end
end
end
## Instruction:
Return meaningful error message for 422
## Code After:
module Api
class AsciicastsController < BaseController
respond_to :html, only: [:show]
attr_reader :asciicast
def create
asciicast = asciicast_creator.create(asciicast_attributes)
render text: asciicast_url(asciicast), status: :created,
location: asciicast
rescue ActiveRecord::RecordInvalid => e
render text: e.record.errors.messages, status: 422
end
def show
@asciicast = Asciicast.find(params[:id])
respond_with(asciicast) do |format|
format.html do
allow_iframe_requests
render locals: {
page: BareAsciicastPagePresenter.build(asciicast, params)
}, layout: 'bare'
end
end
end
private
def asciicast_attributes
username, token = basic_auth_credentials
AsciicastParams.build(params[:asciicast], username, token, request.user_agent)
end
def basic_auth_credentials
authenticate_with_http_basic { |username, password| [username, password] }
end
def asciicast_creator
AsciicastCreator.new
end
def allow_iframe_requests
response.headers.delete('X-Frame-Options')
end
end
end
| module Api
class AsciicastsController < BaseController
respond_to :html, only: [:show]
attr_reader :asciicast
def create
asciicast = asciicast_creator.create(asciicast_attributes)
render text: asciicast_url(asciicast), status: :created,
location: asciicast
rescue ActiveRecord::RecordInvalid => e
- render nothing: true, status: 422
+ render text: e.record.errors.messages, status: 422
end
def show
@asciicast = Asciicast.find(params[:id])
respond_with(asciicast) do |format|
format.html do
allow_iframe_requests
render locals: {
page: BareAsciicastPagePresenter.build(asciicast, params)
}, layout: 'bare'
end
end
end
private
def asciicast_attributes
username, token = basic_auth_credentials
AsciicastParams.build(params[:asciicast], username, token, request.user_agent)
end
def basic_auth_credentials
authenticate_with_http_basic { |username, password| [username, password] }
end
def asciicast_creator
AsciicastCreator.new
end
def allow_iframe_requests
response.headers.delete('X-Frame-Options')
end
end
end | 2 | 0.04 | 1 | 1 |
44524e4797bc789b2b263190cc0b4ada8a91a1fd | app/scripts/superdesk-authoring/views/sd-content-create.html | app/scripts/superdesk-authoring/views/sd-content-create.html | <li>
<button ng-click="content.create()">
<i class="icon-plus-small icon-round icon-white"></i> {{ :: 'Plain text' | translate }}
</button>
</li>
<li>
<button ng-click="content.create('preformatted')">
<i class="icon-plus-small icon-round icon-white"></i> {{ :: 'Preformatted' | translate }}
</button>
</li>
<li class="divider" ng-if="openUpload"></li>
<li ng-if="openUpload">
<button ng-click="openUpload()">
<i class="icon-upload-blue"></i> {{ :: 'UPLOAD' | translate }}
</button>
</li> | <li>
<button ng-click="content.create()">
<i class="icon-plus-small icon-round icon-white"></i> {{ :: 'Plain text' | translate }}
</button>
</li>
<li>
<button ng-click="content.create('preformatted')">
<i class="icon-plus-small icon-round icon-white"></i> {{ :: 'Preformatted' | translate }}
</button>
</li>
<li class="divider"></li>
<li>
<button ng-click="content.createPackage()">
<i class="filetype-icon-composite"></i> {{ :: 'Package' | translate }}
</button>
</li>
<li class="divider" ng-if="openUpload"></li>
<li ng-if="openUpload">
<button ng-click="openUpload()">
<i class="icon-upload-blue"></i> {{ :: 'UPLOAD' | translate }}
</button>
</li>
| Add back 'Create empty package' button | Add back 'Create empty package' button
| HTML | agpl-3.0 | sivakuna-aap/superdesk,superdesk/superdesk-ntb,marwoodandrew/superdesk,akintolga/superdesk,superdesk/superdesk-ntb,amagdas/superdesk,amagdas/superdesk,ancafarcas/superdesk,superdesk/superdesk-ntb,gbbr/superdesk,superdesk/superdesk,mdhaman/superdesk-aap,akintolga/superdesk,fritzSF/superdesk,pavlovicnemanja92/superdesk,thnkloud9/superdesk,pavlovicnemanja/superdesk,akintolga/superdesk-aap,gbbr/superdesk,pavlovicnemanja92/superdesk,mdhaman/superdesk,marwoodandrew/superdesk,mdhaman/superdesk-aap,marwoodandrew/superdesk,superdesk/superdesk,darconny/superdesk,darconny/superdesk,sivakuna-aap/superdesk,marwoodandrew/superdesk,petrjasek/superdesk,liveblog/superdesk,mdhaman/superdesk-aap,petrjasek/superdesk,petrjasek/superdesk,mugurrus/superdesk,fritzSF/superdesk,pavlovicnemanja92/superdesk,pavlovicnemanja/superdesk,petrjasek/superdesk-ntb,marwoodandrew/superdesk-aap,vied12/superdesk,verifiedpixel/superdesk,vied12/superdesk,vied12/superdesk,plamut/superdesk,vied12/superdesk,amagdas/superdesk,plamut/superdesk,akintolga/superdesk,fritzSF/superdesk,superdesk/superdesk-aap,verifiedpixel/superdesk,mdhaman/superdesk-aap,akintolga/superdesk-aap,akintolga/superdesk,Aca-jov/superdesk,superdesk/superdesk,ancafarcas/superdesk,fritzSF/superdesk,ioanpocol/superdesk,plamut/superdesk,amagdas/superdesk,marwoodandrew/superdesk-aap,ioanpocol/superdesk,marwoodandrew/superdesk,superdesk/superdesk-aap,superdesk/superdesk-ntb,verifiedpixel/superdesk,mugurrus/superdesk,liveblog/superdesk,hlmnrmr/superdesk,liveblog/superdesk,petrjasek/superdesk,hlmnrmr/superdesk,superdesk/superdesk,sivakuna-aap/superdesk,mugurrus/superdesk,ioanpocol/superdesk,akintolga/superdesk,thnkloud9/superdesk,verifiedpixel/superdesk,pavlovicnemanja/superdesk,superdesk/superdesk-aap,pavlovicnemanja/superdesk,liveblog/superdesk,petrjasek/superdesk-ntb,petrjasek/superdesk-ntb,darconny/superdesk,sjunaid/superdesk,marwoodandrew/superdesk-aap,marwoodandrew/superdesk-aap,pavlovicnemanja92/superdesk,amagdas/superdesk,akintolga/superdesk-aap,mdhaman/superdesk,petrjasek/superdesk-ntb,ancafarcas/superdesk,ioanpocol/superdesk-ntb,sjunaid/superdesk,pavlovicnemanja92/superdesk,gbbr/superdesk,plamut/superdesk,sivakuna-aap/superdesk,thnkloud9/superdesk,fritzSF/superdesk,ioanpocol/superdesk-ntb,Aca-jov/superdesk,sjunaid/superdesk,verifiedpixel/superdesk,superdesk/superdesk-aap,mdhaman/superdesk,vied12/superdesk,Aca-jov/superdesk,sivakuna-aap/superdesk,plamut/superdesk,liveblog/superdesk,hlmnrmr/superdesk,akintolga/superdesk-aap,ioanpocol/superdesk-ntb | html | ## Code Before:
<li>
<button ng-click="content.create()">
<i class="icon-plus-small icon-round icon-white"></i> {{ :: 'Plain text' | translate }}
</button>
</li>
<li>
<button ng-click="content.create('preformatted')">
<i class="icon-plus-small icon-round icon-white"></i> {{ :: 'Preformatted' | translate }}
</button>
</li>
<li class="divider" ng-if="openUpload"></li>
<li ng-if="openUpload">
<button ng-click="openUpload()">
<i class="icon-upload-blue"></i> {{ :: 'UPLOAD' | translate }}
</button>
</li>
## Instruction:
Add back 'Create empty package' button
## Code After:
<li>
<button ng-click="content.create()">
<i class="icon-plus-small icon-round icon-white"></i> {{ :: 'Plain text' | translate }}
</button>
</li>
<li>
<button ng-click="content.create('preformatted')">
<i class="icon-plus-small icon-round icon-white"></i> {{ :: 'Preformatted' | translate }}
</button>
</li>
<li class="divider"></li>
<li>
<button ng-click="content.createPackage()">
<i class="filetype-icon-composite"></i> {{ :: 'Package' | translate }}
</button>
</li>
<li class="divider" ng-if="openUpload"></li>
<li ng-if="openUpload">
<button ng-click="openUpload()">
<i class="icon-upload-blue"></i> {{ :: 'UPLOAD' | translate }}
</button>
</li>
| <li>
<button ng-click="content.create()">
<i class="icon-plus-small icon-round icon-white"></i> {{ :: 'Plain text' | translate }}
</button>
</li>
<li>
<button ng-click="content.create('preformatted')">
<i class="icon-plus-small icon-round icon-white"></i> {{ :: 'Preformatted' | translate }}
</button>
</li>
+ <li class="divider"></li>
+ <li>
+ <button ng-click="content.createPackage()">
+ <i class="filetype-icon-composite"></i> {{ :: 'Package' | translate }}
+ </button>
+ </li>
<li class="divider" ng-if="openUpload"></li>
<li ng-if="openUpload">
<button ng-click="openUpload()">
<i class="icon-upload-blue"></i> {{ :: 'UPLOAD' | translate }}
</button>
</li> | 6 | 0.375 | 6 | 0 |
59a3bdf354fa9ed4d2def439ee13d4d2a7415b70 | client/src/containers/Article.js | client/src/containers/Article.js | import React from 'react'
import {connect} from 'react-redux';
const Article = ({article, channelName}) => {
return (
<div>
<h1>{article.title}</h1>
<img src={article.urlToImage} className="image"/>
<h5>Posted at: {article.publishedAt}</h5>
<p>{article.description}</p>
<a href={article.url} target="_blank">Read full article on {channelName}</a>
</div>
)
}
function mapStateToProps(state, ownProps) {
var articles = []
if (state.articles.find(channel => channel.name === ownProps.channelName)) {
articles = state.articles.find(channel => channel.name === ownProps.channelName).articles;
}
const article = articles.find(article => article.title === ownProps.match.params.article)
if (article) {
return {
article: article
}
} else {
return {
article: {}
}
}
}
export default connect(mapStateToProps)(Article)
| import React from 'react'
import {connect} from 'react-redux';
const Article = ({article, channelName}) => {
return (
<div>
<h1>{article.title}</h1>
<img src={article.urlToImage} className="image"/>
<h5>Posted at: {article.publishedAt}</h5>
<p>{article.description}</p>
<a href={article.url} target="_blank">Read full article on {channelName}</a>
</div>
)
}
//Fix glitch in Match object encoding so match.params matches article.title
function fixMatchParams(matchParams) {
if (matchParams.split("%3A")) {
return matchParams.split("%3A").join(":")
} else {
return matchParams
}
}
function mapStateToProps(state, ownProps) {
const matchParams = fixMatchParams(ownProps.match.params.article)
var articles = []
if (state.articles.find(channel => channel.name === ownProps.channelName)) {
articles = state.articles.find(channel => channel.name === ownProps.channelName).articles;
}
const article = articles.find(article => article.title === matchParams)
if (article) {
return {
article: article
}
} else {
return {
article: {}
}
}
}
export default connect(mapStateToProps)(Article)
| Write function to deal with colons in url | Write function to deal with colons in url
| JavaScript | mit | kevinladkins/newsfeed,kevinladkins/newsfeed,kevinladkins/newsfeed | javascript | ## Code Before:
import React from 'react'
import {connect} from 'react-redux';
const Article = ({article, channelName}) => {
return (
<div>
<h1>{article.title}</h1>
<img src={article.urlToImage} className="image"/>
<h5>Posted at: {article.publishedAt}</h5>
<p>{article.description}</p>
<a href={article.url} target="_blank">Read full article on {channelName}</a>
</div>
)
}
function mapStateToProps(state, ownProps) {
var articles = []
if (state.articles.find(channel => channel.name === ownProps.channelName)) {
articles = state.articles.find(channel => channel.name === ownProps.channelName).articles;
}
const article = articles.find(article => article.title === ownProps.match.params.article)
if (article) {
return {
article: article
}
} else {
return {
article: {}
}
}
}
export default connect(mapStateToProps)(Article)
## Instruction:
Write function to deal with colons in url
## Code After:
import React from 'react'
import {connect} from 'react-redux';
const Article = ({article, channelName}) => {
return (
<div>
<h1>{article.title}</h1>
<img src={article.urlToImage} className="image"/>
<h5>Posted at: {article.publishedAt}</h5>
<p>{article.description}</p>
<a href={article.url} target="_blank">Read full article on {channelName}</a>
</div>
)
}
//Fix glitch in Match object encoding so match.params matches article.title
function fixMatchParams(matchParams) {
if (matchParams.split("%3A")) {
return matchParams.split("%3A").join(":")
} else {
return matchParams
}
}
function mapStateToProps(state, ownProps) {
const matchParams = fixMatchParams(ownProps.match.params.article)
var articles = []
if (state.articles.find(channel => channel.name === ownProps.channelName)) {
articles = state.articles.find(channel => channel.name === ownProps.channelName).articles;
}
const article = articles.find(article => article.title === matchParams)
if (article) {
return {
article: article
}
} else {
return {
article: {}
}
}
}
export default connect(mapStateToProps)(Article)
| import React from 'react'
import {connect} from 'react-redux';
const Article = ({article, channelName}) => {
return (
<div>
<h1>{article.title}</h1>
<img src={article.urlToImage} className="image"/>
<h5>Posted at: {article.publishedAt}</h5>
<p>{article.description}</p>
<a href={article.url} target="_blank">Read full article on {channelName}</a>
</div>
)
}
+ //Fix glitch in Match object encoding so match.params matches article.title
+
+ function fixMatchParams(matchParams) {
+ if (matchParams.split("%3A")) {
+ return matchParams.split("%3A").join(":")
+ } else {
+ return matchParams
+ }
+ }
function mapStateToProps(state, ownProps) {
+ const matchParams = fixMatchParams(ownProps.match.params.article)
var articles = []
if (state.articles.find(channel => channel.name === ownProps.channelName)) {
articles = state.articles.find(channel => channel.name === ownProps.channelName).articles;
}
- const article = articles.find(article => article.title === ownProps.match.params.article)
? --------- ^^ --------
+ const article = articles.find(article => article.title === matchParams)
? ^
if (article) {
return {
article: article
}
} else {
return {
article: {}
}
}
}
export default connect(mapStateToProps)(Article) | 12 | 0.342857 | 11 | 1 |
19a7d14c77a26c1184aa728cdc91142bc650b538 | .vscode/tasks.json | .vscode/tasks.json | {
"version": "0.1.0",
"command": "dotnet",
"isShellCommand": true,
"args": [],
"tasks": [
{
"taskName": "restore",
"args": [
"${workspaceRoot}/TH-NETII .NET Common.sln"
],
"problemMatcher": "$msCompile"
},
{
"taskName": "build",
"args": [
"${workspaceRoot}/TH-NETII .NET Common.sln"
],
"isBuildCommand": true,
"problemMatcher": "$msCompile"
},
{
"taskName": "test",
"args": [
"${workspaceRoot}/test/THNETII.Common.Test/THNETII.Common.Test.csproj"
],
"isTestCommand": true
}
]
}
| {
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"label": "build",
"command": "dotnet",
"type": "shell",
"args": [
"build",
// Ask dotnet build to generate full paths for file names.
"/property:GenerateFullPaths=true",
// Do not generate summary otherwise it leads to duplicate errors in Problems panel
"/consoleloggerparameters:NoSummary"
],
"group": "build",
"presentation": {
"echo": true,
"reveal": "always",
"focus": false,
"panel": "dedicated",
"showReuseMessage": true,
"clear": false
},
"problemMatcher": "$msCompile"
}
]
}
| Update VS Code task definition | Update VS Code task definition
| JSON | mit | thnetii/dotnet-common | json | ## Code Before:
{
"version": "0.1.0",
"command": "dotnet",
"isShellCommand": true,
"args": [],
"tasks": [
{
"taskName": "restore",
"args": [
"${workspaceRoot}/TH-NETII .NET Common.sln"
],
"problemMatcher": "$msCompile"
},
{
"taskName": "build",
"args": [
"${workspaceRoot}/TH-NETII .NET Common.sln"
],
"isBuildCommand": true,
"problemMatcher": "$msCompile"
},
{
"taskName": "test",
"args": [
"${workspaceRoot}/test/THNETII.Common.Test/THNETII.Common.Test.csproj"
],
"isTestCommand": true
}
]
}
## Instruction:
Update VS Code task definition
## Code After:
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"label": "build",
"command": "dotnet",
"type": "shell",
"args": [
"build",
// Ask dotnet build to generate full paths for file names.
"/property:GenerateFullPaths=true",
// Do not generate summary otherwise it leads to duplicate errors in Problems panel
"/consoleloggerparameters:NoSummary"
],
"group": "build",
"presentation": {
"echo": true,
"reveal": "always",
"focus": false,
"panel": "dedicated",
"showReuseMessage": true,
"clear": false
},
"problemMatcher": "$msCompile"
}
]
}
| {
+ // See https://go.microsoft.com/fwlink/?LinkId=733558
+ // for the documentation about the tasks.json format
- "version": "0.1.0",
? -- --
+ "version": "2.0.0",
? ++
+ "tasks": [
+ {
+ "label": "build",
- "command": "dotnet",
+ "command": "dotnet",
? ++
- "isShellCommand": true,
+ "type": "shell",
- "args": [],
? --
+ "args": [
? ++
- "tasks": [
- {
- "taskName": "restore",
- "args": [
- "${workspaceRoot}/TH-NETII .NET Common.sln"
- ],
+ "build",
+ // Ask dotnet build to generate full paths for file names.
+ "/property:GenerateFullPaths=true",
+ // Do not generate summary otherwise it leads to duplicate errors in Problems panel
+ "/consoleloggerparameters:NoSummary"
+ ],
+ "group": "build",
+ "presentation": {
+ "echo": true,
+ "reveal": "always",
+ "focus": false,
+ "panel": "dedicated",
+ "showReuseMessage": true,
+ "clear": false
+ },
- "problemMatcher": "$msCompile"
? ------
+ "problemMatcher": "$msCompile"
- },
- {
- "taskName": "build",
- "args": [
- "${workspaceRoot}/TH-NETII .NET Common.sln"
- ],
- "isBuildCommand": true,
- "problemMatcher": "$msCompile"
- },
- {
- "taskName": "test",
- "args": [
- "${workspaceRoot}/test/THNETII.Common.Test/THNETII.Common.Test.csproj"
- ],
- "isTestCommand": true
- }
- ]
? ^
+ }
? ^
+ ]
} | 55 | 1.833333 | 27 | 28 |
4b8d1656e96ccba9a4603720b39e23d3c5dede8c | test/integration/api_operations/list_test.rb | test/integration/api_operations/list_test.rb | require 'test_helper'
class ListTest < Test::Unit::TestCase
def setup
Clever.api_key = "DEMO_KEY"
end
should "retrieve districts" do
VCR.use_cassette("districts") do
Clever::District.all()
end
end
should "retrieve schools" do
VCR.use_cassette("schools") do
Clever::School.all()
end
end
should "retrieve students" do
VCR.use_cassette("students") do
@students = Clever::Student.all()
end
student = @students[0]
end
should "retrieve sections" do
VCR.use_cassette("sections") do
Clever::Section.all()
end
end
should "retrieve teachers" do
VCR.use_cassette("teachers") do
@teachers = Clever::Teacher.all()
for teacher in @teachers
teacher_obj = Clever::Teacher.retrieve teacher.id
assert_instance_of(Clever::Teacher, teacher)
assert_instance_of(Clever::Teacher, teacher_obj)
assert_equal(teacher, teacher_obj)
end
end
end
end | require 'test_helper'
class ListTest < Test::Unit::TestCase
def setup
Clever.api_key = "DEMO_KEY"
end
should "retrieve districts" do
VCR.use_cassette("districts") do
Clever::District.all
end
end
should "retrieve schools" do
VCR.use_cassette("schools") do
Clever::School.all
end
end
should "retrieve students" do
VCR.use_cassette("students") do
@students = Clever::Student.all
end
student = @students[0]
end
should "retrieve sections" do
VCR.use_cassette("sections") do
Clever::Section.all
end
end
should "retrieve teachers" do
VCR.use_cassette("teachers") do
@teachers = Clever::Teacher.all
@teachers.each do |teacher|
teacher_obj = Clever::Teacher.retrieve teacher.id
assert_instance_of(Clever::Teacher, teacher)
assert_instance_of(Clever::Teacher, teacher_obj)
assert_equal(teacher, teacher_obj)
end
end
end
end | Make the list test idiomatic ruby | Make the list test idiomatic ruby
Use .each instead of for...in; don't use parentheses at the end of method calls that don't have arguments
| Ruby | apache-2.0 | Clever/clever-ruby,thinkthroughmath/clever-ruby,mchavarriagam/clever-ruby,TomK32/clever-ruby,samfishman/clever-ruby,haikulearning/clever-ruby,Clever/clever-ruby | ruby | ## Code Before:
require 'test_helper'
class ListTest < Test::Unit::TestCase
def setup
Clever.api_key = "DEMO_KEY"
end
should "retrieve districts" do
VCR.use_cassette("districts") do
Clever::District.all()
end
end
should "retrieve schools" do
VCR.use_cassette("schools") do
Clever::School.all()
end
end
should "retrieve students" do
VCR.use_cassette("students") do
@students = Clever::Student.all()
end
student = @students[0]
end
should "retrieve sections" do
VCR.use_cassette("sections") do
Clever::Section.all()
end
end
should "retrieve teachers" do
VCR.use_cassette("teachers") do
@teachers = Clever::Teacher.all()
for teacher in @teachers
teacher_obj = Clever::Teacher.retrieve teacher.id
assert_instance_of(Clever::Teacher, teacher)
assert_instance_of(Clever::Teacher, teacher_obj)
assert_equal(teacher, teacher_obj)
end
end
end
end
## Instruction:
Make the list test idiomatic ruby
Use .each instead of for...in; don't use parentheses at the end of method calls that don't have arguments
## Code After:
require 'test_helper'
class ListTest < Test::Unit::TestCase
def setup
Clever.api_key = "DEMO_KEY"
end
should "retrieve districts" do
VCR.use_cassette("districts") do
Clever::District.all
end
end
should "retrieve schools" do
VCR.use_cassette("schools") do
Clever::School.all
end
end
should "retrieve students" do
VCR.use_cassette("students") do
@students = Clever::Student.all
end
student = @students[0]
end
should "retrieve sections" do
VCR.use_cassette("sections") do
Clever::Section.all
end
end
should "retrieve teachers" do
VCR.use_cassette("teachers") do
@teachers = Clever::Teacher.all
@teachers.each do |teacher|
teacher_obj = Clever::Teacher.retrieve teacher.id
assert_instance_of(Clever::Teacher, teacher)
assert_instance_of(Clever::Teacher, teacher_obj)
assert_equal(teacher, teacher_obj)
end
end
end
end | require 'test_helper'
class ListTest < Test::Unit::TestCase
def setup
Clever.api_key = "DEMO_KEY"
end
should "retrieve districts" do
VCR.use_cassette("districts") do
- Clever::District.all()
? --
+ Clever::District.all
end
end
should "retrieve schools" do
VCR.use_cassette("schools") do
- Clever::School.all()
? --
+ Clever::School.all
end
end
should "retrieve students" do
VCR.use_cassette("students") do
- @students = Clever::Student.all()
? --
+ @students = Clever::Student.all
end
student = @students[0]
end
should "retrieve sections" do
VCR.use_cassette("sections") do
- Clever::Section.all()
? --
+ Clever::Section.all
end
end
should "retrieve teachers" do
VCR.use_cassette("teachers") do
- @teachers = Clever::Teacher.all()
? --
+ @teachers = Clever::Teacher.all
- for teacher in @teachers
+ @teachers.each do |teacher|
teacher_obj = Clever::Teacher.retrieve teacher.id
assert_instance_of(Clever::Teacher, teacher)
assert_instance_of(Clever::Teacher, teacher_obj)
assert_equal(teacher, teacher_obj)
end
end
end
end | 12 | 0.26087 | 6 | 6 |
555c06e4c324996bcae2a8a45fdb26c6fab1d1b6 | lib/domgen/gwt/templates/prod_module.xml.erb | lib/domgen/gwt/templates/prod_module.xml.erb | <?xml version="1.0" encoding="UTF-8"?>
<!-- DO NOT EDIT: File is auto-generated -->
<module>
<% if repository.appcache? -%>
<!-- Provide gzipped version of generated js, so as it will sent compressed by web server -->
<inherits name="com.google.gwt.precompress.Precompress"/>
<inherits name="org.realityforge.gwt.appcache.linker.Linker"/>
<add-linker name="appcache"/>
<% end -%>
<!-- Disable many checks not needed if code is correct. See https://github.com/gwtproject/gwt/blob/2.8.0/user/super/com/google/gwt/emul/javaemul/internal/InternalPreconditions.java -->
<set-property name="jre.checks.checkLevel" value="MINIMAL"/>
<!-- This reduces a lot the size of compiled javascript-->
<set-property name="compiler.stackMode" value="strip"/>
</module>
| <?xml version="1.0" encoding="UTF-8"?>
<!-- DO NOT EDIT: File is auto-generated -->
<module>
<% if repository.appcache? -%>
<inherits name="org.realityforge.gwt.appcache.linker.Linker"/>
<add-linker name="appcache"/>
<% end -%>
<!-- Disable many checks not needed if code is correct. See https://github.com/gwtproject/gwt/blob/2.8.0/user/super/com/google/gwt/emul/javaemul/internal/InternalPreconditions.java -->
<set-property name="jre.checks.checkLevel" value="MINIMAL"/>
<!-- This reduces a lot the size of compiled javascript-->
<set-property name="compiler.stackMode" value="strip"/>
</module>
| Stop GWT compiler pre-encoding assets as GZIP as will soon move to brotli | Stop GWT compiler pre-encoding assets as GZIP as will soon move to brotli
| HTML+ERB | apache-2.0 | icaughley/domgen,realityforge/domgen,realityforge/domgen,icaughley/domgen | html+erb | ## Code Before:
<?xml version="1.0" encoding="UTF-8"?>
<!-- DO NOT EDIT: File is auto-generated -->
<module>
<% if repository.appcache? -%>
<!-- Provide gzipped version of generated js, so as it will sent compressed by web server -->
<inherits name="com.google.gwt.precompress.Precompress"/>
<inherits name="org.realityforge.gwt.appcache.linker.Linker"/>
<add-linker name="appcache"/>
<% end -%>
<!-- Disable many checks not needed if code is correct. See https://github.com/gwtproject/gwt/blob/2.8.0/user/super/com/google/gwt/emul/javaemul/internal/InternalPreconditions.java -->
<set-property name="jre.checks.checkLevel" value="MINIMAL"/>
<!-- This reduces a lot the size of compiled javascript-->
<set-property name="compiler.stackMode" value="strip"/>
</module>
## Instruction:
Stop GWT compiler pre-encoding assets as GZIP as will soon move to brotli
## Code After:
<?xml version="1.0" encoding="UTF-8"?>
<!-- DO NOT EDIT: File is auto-generated -->
<module>
<% if repository.appcache? -%>
<inherits name="org.realityforge.gwt.appcache.linker.Linker"/>
<add-linker name="appcache"/>
<% end -%>
<!-- Disable many checks not needed if code is correct. See https://github.com/gwtproject/gwt/blob/2.8.0/user/super/com/google/gwt/emul/javaemul/internal/InternalPreconditions.java -->
<set-property name="jre.checks.checkLevel" value="MINIMAL"/>
<!-- This reduces a lot the size of compiled javascript-->
<set-property name="compiler.stackMode" value="strip"/>
</module>
| <?xml version="1.0" encoding="UTF-8"?>
<!-- DO NOT EDIT: File is auto-generated -->
<module>
<% if repository.appcache? -%>
- <!-- Provide gzipped version of generated js, so as it will sent compressed by web server -->
- <inherits name="com.google.gwt.precompress.Precompress"/>
-
<inherits name="org.realityforge.gwt.appcache.linker.Linker"/>
<add-linker name="appcache"/>
<% end -%>
<!-- Disable many checks not needed if code is correct. See https://github.com/gwtproject/gwt/blob/2.8.0/user/super/com/google/gwt/emul/javaemul/internal/InternalPreconditions.java -->
<set-property name="jre.checks.checkLevel" value="MINIMAL"/>
<!-- This reduces a lot the size of compiled javascript-->
<set-property name="compiler.stackMode" value="strip"/>
</module> | 3 | 0.166667 | 0 | 3 |
69bbf0975a443f49dc4bdeaa834a2f8b3845e1e6 | config/base.config.js | config/base.config.js | const paths = require('./paths');
const utils = require('../build/utils');
const vueLoaderConfig = require('../build/vue-loader.conf');
const FriendlyErrorsPlugin = require('friendly-errors-webpack-plugin');
module.exports = {
resolve: {
extensions: ['.js', '.vue', '.json', '.scss'],
alias: {
vue$: 'vue/dist/vue.esm.js',
'@': paths.src,
},
},
externals: {
firebase: 'firebase',
vue: 'Vue',
},
module: {
rules: [
{
test: /\.vue$/,
loader: 'vue-loader',
options: vueLoaderConfig,
},
{
test: /\.js$/,
loader: 'babel-loader',
exclude: /node_modules/,
},
{
test: /\.(png|jpe?g|gif|svg)(\?.*)?$/,
loader: 'url-loader',
query: {
limit: 10000,
name: utils.assetsPath('img/[name].[hash:7].[ext]'),
},
},
{
test: /\.(woff2?|eot|ttf|otf)(\?.*)?$/,
loader: 'url-loader',
query: {
limit: 10000,
name: utils.assetsPath('fonts/[name].[hash:7].[ext]'),
},
},
],
},
plugins: [
new FriendlyErrorsPlugin(),
],
};
| const paths = require('./paths');
const utils = require('../build/utils');
const vueLoaderConfig = require('../build/vue-loader.conf');
const FriendlyErrorsPlugin = require('friendly-errors-webpack-plugin');
module.exports = {
resolve: {
extensions: ['.js', '.vue', '.scss'],
alias: {
'@': paths.src,
},
},
externals: {
firebase: 'firebase',
vue: 'Vue',
},
module: {
rules: [
{
test: /\.vue$/,
loader: 'vue-loader',
options: vueLoaderConfig,
},
{
test: /\.js$/,
loader: 'babel-loader',
exclude: /node_modules/,
},
{
test: /\.(png|jpe?g|gif|svg)(\?.*)?$/,
loader: 'url-loader',
query: {
limit: 10000,
name: utils.assetsPath('img/[name].[hash:7].[ext]'),
},
},
{
test: /\.(woff2?|eot|ttf|otf)(\?.*)?$/,
loader: 'url-loader',
query: {
limit: 10000,
name: utils.assetsPath('fonts/[name].[hash:7].[ext]'),
},
},
],
},
plugins: [
new FriendlyErrorsPlugin(),
],
};
| Remove json and an unused alias | Remove json and an unused alias
| JavaScript | mit | tuelsch/bolg,tuelsch/bolg | javascript | ## Code Before:
const paths = require('./paths');
const utils = require('../build/utils');
const vueLoaderConfig = require('../build/vue-loader.conf');
const FriendlyErrorsPlugin = require('friendly-errors-webpack-plugin');
module.exports = {
resolve: {
extensions: ['.js', '.vue', '.json', '.scss'],
alias: {
vue$: 'vue/dist/vue.esm.js',
'@': paths.src,
},
},
externals: {
firebase: 'firebase',
vue: 'Vue',
},
module: {
rules: [
{
test: /\.vue$/,
loader: 'vue-loader',
options: vueLoaderConfig,
},
{
test: /\.js$/,
loader: 'babel-loader',
exclude: /node_modules/,
},
{
test: /\.(png|jpe?g|gif|svg)(\?.*)?$/,
loader: 'url-loader',
query: {
limit: 10000,
name: utils.assetsPath('img/[name].[hash:7].[ext]'),
},
},
{
test: /\.(woff2?|eot|ttf|otf)(\?.*)?$/,
loader: 'url-loader',
query: {
limit: 10000,
name: utils.assetsPath('fonts/[name].[hash:7].[ext]'),
},
},
],
},
plugins: [
new FriendlyErrorsPlugin(),
],
};
## Instruction:
Remove json and an unused alias
## Code After:
const paths = require('./paths');
const utils = require('../build/utils');
const vueLoaderConfig = require('../build/vue-loader.conf');
const FriendlyErrorsPlugin = require('friendly-errors-webpack-plugin');
module.exports = {
resolve: {
extensions: ['.js', '.vue', '.scss'],
alias: {
'@': paths.src,
},
},
externals: {
firebase: 'firebase',
vue: 'Vue',
},
module: {
rules: [
{
test: /\.vue$/,
loader: 'vue-loader',
options: vueLoaderConfig,
},
{
test: /\.js$/,
loader: 'babel-loader',
exclude: /node_modules/,
},
{
test: /\.(png|jpe?g|gif|svg)(\?.*)?$/,
loader: 'url-loader',
query: {
limit: 10000,
name: utils.assetsPath('img/[name].[hash:7].[ext]'),
},
},
{
test: /\.(woff2?|eot|ttf|otf)(\?.*)?$/,
loader: 'url-loader',
query: {
limit: 10000,
name: utils.assetsPath('fonts/[name].[hash:7].[ext]'),
},
},
],
},
plugins: [
new FriendlyErrorsPlugin(),
],
};
| const paths = require('./paths');
const utils = require('../build/utils');
const vueLoaderConfig = require('../build/vue-loader.conf');
const FriendlyErrorsPlugin = require('friendly-errors-webpack-plugin');
module.exports = {
resolve: {
- extensions: ['.js', '.vue', '.json', '.scss'],
? ---------
+ extensions: ['.js', '.vue', '.scss'],
alias: {
- vue$: 'vue/dist/vue.esm.js',
'@': paths.src,
},
},
externals: {
firebase: 'firebase',
vue: 'Vue',
},
module: {
rules: [
{
test: /\.vue$/,
loader: 'vue-loader',
options: vueLoaderConfig,
},
{
test: /\.js$/,
loader: 'babel-loader',
exclude: /node_modules/,
},
{
test: /\.(png|jpe?g|gif|svg)(\?.*)?$/,
loader: 'url-loader',
query: {
limit: 10000,
name: utils.assetsPath('img/[name].[hash:7].[ext]'),
},
},
{
test: /\.(woff2?|eot|ttf|otf)(\?.*)?$/,
loader: 'url-loader',
query: {
limit: 10000,
name: utils.assetsPath('fonts/[name].[hash:7].[ext]'),
},
},
],
},
plugins: [
new FriendlyErrorsPlugin(),
],
}; | 3 | 0.058824 | 1 | 2 |
586c7e7466ff31edc20f52471187719282a03750 | README.md | README.md | Blogger Table of Contents (blogger.toc)
==================================================
Automatic creater for Blogger table of contents(TOC).
This script creates TOC of your blogger using feed data.
Sort order
* title name
* published date
* updated date
Print type
* title
* label (category)
Usage
--------------------------
Load "blogger.toc.min.js" on Blogger page like following.
User setting should be placed before the concreate script file.
<script type="text/javascript">
// User Setting.
var POSTSTOC_SETTINGS = {
blogURL: 'garafu.blogspot.jp', // Set your blog url.
maxResults: 500, // Set max recieve data.
orderby: 'updated', // Set enum ['title', 'published', 'updated'].
printby: 'title' // Set enum ['title', 'label']
};
</script>
<script type="text/javascript" src=".\lib\blogger.toc.min.js"></script>
License
--------------------------
blogger.toc plugin released under the MIT license.
Please see [MIT-LICENSE.txt](https://github.com/garafu/blogger.toc/blob/master/MIT-LICENSE.txt) for details.
| Blogger Table of Contents (blogger.toc)
==================================================
Automatic creater for Blogger table of contents(TOC).
This script creates TOC of your blogger using feed data.
Demo
--------------------------
[Try it out !!](http://garafu.github.io/blogger.toc/demo/index.html)
Usage
--------------------------
Load "blogger.toc.min.js" on Blogger page like following.
User setting should be placed before the concreate script file.
<script type="text/javascript">
// User Setting.
var POSTSTOC_SETTINGS = {
blogURL: 'garafu.blogspot.jp', // Set your blog url.
maxResults: 500, // Set max recieve data.
orderby: 'updated', // Set enum ['title', 'published', 'updated'].
printby: 'title' // Set enum ['title', 'label']
};
</script>
<script type="text/javascript" src=".\lib\blogger.toc.min.js"></script>
License
--------------------------
blogger.toc plugin released under the MIT license.
Please see [MIT-LICENSE.txt](https://github.com/garafu/blogger.toc/blob/master/MIT-LICENSE.txt) for details.
| Add link to demo page. | Add link to demo page.
| Markdown | mit | garafu/blogger.toc,garafu/blogger.toc,garafu/blogger.toc | markdown | ## Code Before:
Blogger Table of Contents (blogger.toc)
==================================================
Automatic creater for Blogger table of contents(TOC).
This script creates TOC of your blogger using feed data.
Sort order
* title name
* published date
* updated date
Print type
* title
* label (category)
Usage
--------------------------
Load "blogger.toc.min.js" on Blogger page like following.
User setting should be placed before the concreate script file.
<script type="text/javascript">
// User Setting.
var POSTSTOC_SETTINGS = {
blogURL: 'garafu.blogspot.jp', // Set your blog url.
maxResults: 500, // Set max recieve data.
orderby: 'updated', // Set enum ['title', 'published', 'updated'].
printby: 'title' // Set enum ['title', 'label']
};
</script>
<script type="text/javascript" src=".\lib\blogger.toc.min.js"></script>
License
--------------------------
blogger.toc plugin released under the MIT license.
Please see [MIT-LICENSE.txt](https://github.com/garafu/blogger.toc/blob/master/MIT-LICENSE.txt) for details.
## Instruction:
Add link to demo page.
## Code After:
Blogger Table of Contents (blogger.toc)
==================================================
Automatic creater for Blogger table of contents(TOC).
This script creates TOC of your blogger using feed data.
Demo
--------------------------
[Try it out !!](http://garafu.github.io/blogger.toc/demo/index.html)
Usage
--------------------------
Load "blogger.toc.min.js" on Blogger page like following.
User setting should be placed before the concreate script file.
<script type="text/javascript">
// User Setting.
var POSTSTOC_SETTINGS = {
blogURL: 'garafu.blogspot.jp', // Set your blog url.
maxResults: 500, // Set max recieve data.
orderby: 'updated', // Set enum ['title', 'published', 'updated'].
printby: 'title' // Set enum ['title', 'label']
};
</script>
<script type="text/javascript" src=".\lib\blogger.toc.min.js"></script>
License
--------------------------
blogger.toc plugin released under the MIT license.
Please see [MIT-LICENSE.txt](https://github.com/garafu/blogger.toc/blob/master/MIT-LICENSE.txt) for details.
| Blogger Table of Contents (blogger.toc)
==================================================
Automatic creater for Blogger table of contents(TOC).
This script creates TOC of your blogger using feed data.
- Sort order
+ Demo
+ --------------------------
- * title name
- * published date
- * updated date
+ [Try it out !!](http://garafu.github.io/blogger.toc/demo/index.html)
- Print type
-
- * title
- * label (category)
Usage
--------------------------
Load "blogger.toc.min.js" on Blogger page like following.
User setting should be placed before the concreate script file.
<script type="text/javascript">
// User Setting.
var POSTSTOC_SETTINGS = {
blogURL: 'garafu.blogspot.jp', // Set your blog url.
maxResults: 500, // Set max recieve data.
orderby: 'updated', // Set enum ['title', 'published', 'updated'].
printby: 'title' // Set enum ['title', 'label']
};
</script>
<script type="text/javascript" src=".\lib\blogger.toc.min.js"></script>
License
--------------------------
blogger.toc plugin released under the MIT license.
Please see [MIT-LICENSE.txt](https://github.com/garafu/blogger.toc/blob/master/MIT-LICENSE.txt) for details. | 11 | 0.275 | 3 | 8 |
f43e339602f096e781d5a9c82e3befc94c73bcf3 | src/KillrVideo/scripts/requirejs-config.js | src/KillrVideo/scripts/requirejs-config.js | // Common configuration for RequireJS
var require = {
baseUrl: "/scripts",
paths: {
"jquery": "bower_components/jquery/dist/jquery.min",
"knockout": "bower_components/knockout/dist/knockout",
"bootstrap": "bower_components/bootstrap/dist/js/bootstrap.min",
"text": "bower_components/requirejs-text/text",
"domReady": "bower_components/requirejs-domReady/domReady",
"moment": "bower_components/moment/min/moment.min",
"videojs": "bower_components/videojs/dist/video-js/video",
"knockout-postbox": "bower_components/knockout-postbox/build/knockout-postbox.min",
"knockout-validation": "bower_components/knockout-validation/Dist/knockout.validation.min",
"perfect-scrollbar": "bower_components/perfect-scrollbar/src/perfect-scrollbar",
"jquery-expander": "bower_components/jquery-expander/jquery.expander",
"bootstrap-select": "bower_components/bootstrap-select/dist/js/bootstrap-select",
"bootstrap-tagsinput": "bower_components/bootstrap-tagsinput/dist/bootstrap-tagsinput",
},
shim: {
"bootstrap": {
deps: ["jquery"],
exports: "$.fn.popover"
},
"jquery-expander": ["jquery"]
}
}; | // Common configuration for RequireJS
var require = {
baseUrl: "/scripts",
paths: {
"jquery": "bower_components/jquery/dist/jquery.min",
"knockout": "bower_components/knockout/dist/knockout",
"bootstrap": "bower_components/bootstrap/dist/js/bootstrap.min",
"text": "bower_components/requirejs-text/text",
"domReady": "bower_components/requirejs-domReady/domReady",
"moment": "bower_components/moment/min/moment.min",
"videojs": "bower_components/videojs/dist/video-js/video",
"knockout-postbox": "bower_components/knockout-postbox/build/knockout-postbox.min",
"knockout-validation": "bower_components/knockout-validation/Dist/knockout.validation.min",
"perfect-scrollbar": "bower_components/perfect-scrollbar/src/perfect-scrollbar",
"jquery-expander": "bower_components/jquery-expander/jquery.expander",
"bootstrap-select": "bower_components/bootstrap-select/dist/js/bootstrap-select",
"bootstrap-tagsinput": "bower_components/bootstrap-tagsinput/dist/bootstrap-tagsinput",
},
shim: {
"bootstrap": {
deps: ["jquery"],
exports: "$.fn.popover"
},
"jquery-expander": ["jquery"],
"perfect-scrollbar": ["jquery"],
"bootstrap-select": ["bootstrap"],
"bootstrap-tagsinput": ["bootstrap"]
}
}; | Fix javascript dependencies for a couple other plugins that aren't AMD modules | Fix javascript dependencies for a couple other plugins that aren't AMD modules
| JavaScript | apache-2.0 | LukeTillman/killrvideo-csharp,LukeTillman/killrvideo-csharp,rustyrazorblade/killrvideo-csharp,LukeTillman/killrvideo-csharp,rustyrazorblade/killrvideo-csharp,rustyrazorblade/killrvideo-csharp | javascript | ## Code Before:
// Common configuration for RequireJS
var require = {
baseUrl: "/scripts",
paths: {
"jquery": "bower_components/jquery/dist/jquery.min",
"knockout": "bower_components/knockout/dist/knockout",
"bootstrap": "bower_components/bootstrap/dist/js/bootstrap.min",
"text": "bower_components/requirejs-text/text",
"domReady": "bower_components/requirejs-domReady/domReady",
"moment": "bower_components/moment/min/moment.min",
"videojs": "bower_components/videojs/dist/video-js/video",
"knockout-postbox": "bower_components/knockout-postbox/build/knockout-postbox.min",
"knockout-validation": "bower_components/knockout-validation/Dist/knockout.validation.min",
"perfect-scrollbar": "bower_components/perfect-scrollbar/src/perfect-scrollbar",
"jquery-expander": "bower_components/jquery-expander/jquery.expander",
"bootstrap-select": "bower_components/bootstrap-select/dist/js/bootstrap-select",
"bootstrap-tagsinput": "bower_components/bootstrap-tagsinput/dist/bootstrap-tagsinput",
},
shim: {
"bootstrap": {
deps: ["jquery"],
exports: "$.fn.popover"
},
"jquery-expander": ["jquery"]
}
};
## Instruction:
Fix javascript dependencies for a couple other plugins that aren't AMD modules
## Code After:
// Common configuration for RequireJS
var require = {
baseUrl: "/scripts",
paths: {
"jquery": "bower_components/jquery/dist/jquery.min",
"knockout": "bower_components/knockout/dist/knockout",
"bootstrap": "bower_components/bootstrap/dist/js/bootstrap.min",
"text": "bower_components/requirejs-text/text",
"domReady": "bower_components/requirejs-domReady/domReady",
"moment": "bower_components/moment/min/moment.min",
"videojs": "bower_components/videojs/dist/video-js/video",
"knockout-postbox": "bower_components/knockout-postbox/build/knockout-postbox.min",
"knockout-validation": "bower_components/knockout-validation/Dist/knockout.validation.min",
"perfect-scrollbar": "bower_components/perfect-scrollbar/src/perfect-scrollbar",
"jquery-expander": "bower_components/jquery-expander/jquery.expander",
"bootstrap-select": "bower_components/bootstrap-select/dist/js/bootstrap-select",
"bootstrap-tagsinput": "bower_components/bootstrap-tagsinput/dist/bootstrap-tagsinput",
},
shim: {
"bootstrap": {
deps: ["jquery"],
exports: "$.fn.popover"
},
"jquery-expander": ["jquery"],
"perfect-scrollbar": ["jquery"],
"bootstrap-select": ["bootstrap"],
"bootstrap-tagsinput": ["bootstrap"]
}
}; | // Common configuration for RequireJS
var require = {
baseUrl: "/scripts",
paths: {
"jquery": "bower_components/jquery/dist/jquery.min",
"knockout": "bower_components/knockout/dist/knockout",
"bootstrap": "bower_components/bootstrap/dist/js/bootstrap.min",
"text": "bower_components/requirejs-text/text",
"domReady": "bower_components/requirejs-domReady/domReady",
"moment": "bower_components/moment/min/moment.min",
"videojs": "bower_components/videojs/dist/video-js/video",
"knockout-postbox": "bower_components/knockout-postbox/build/knockout-postbox.min",
"knockout-validation": "bower_components/knockout-validation/Dist/knockout.validation.min",
"perfect-scrollbar": "bower_components/perfect-scrollbar/src/perfect-scrollbar",
"jquery-expander": "bower_components/jquery-expander/jquery.expander",
"bootstrap-select": "bower_components/bootstrap-select/dist/js/bootstrap-select",
"bootstrap-tagsinput": "bower_components/bootstrap-tagsinput/dist/bootstrap-tagsinput",
},
shim: {
"bootstrap": {
deps: ["jquery"],
exports: "$.fn.popover"
},
- "jquery-expander": ["jquery"]
+ "jquery-expander": ["jquery"],
? +
+ "perfect-scrollbar": ["jquery"],
+ "bootstrap-select": ["bootstrap"],
+ "bootstrap-tagsinput": ["bootstrap"]
}
}; | 5 | 0.192308 | 4 | 1 |
6abaf4fc49f47a0e1a5a3ee9d932b949e3189c29 | README.md | README.md |
KonFoo is a Python Package for creating byte stream mappers in a declarative
way with as little code as necessary to help fighting the confusion with the
foo of the all well-known memory dumps or hexadecimal views of binary data.
It comes with sensible defaults out of the box.
It aims to make the process of reading, decoding, viewing, encoding and
writing binary data from and back to a data provider as easy as possible.
KonFoo in points:
- declarative way to describe the mapping of binary data
- declarative template classes to map, read, decode, encode and write binary data
- nesting of template classes
- adaptable template classes on the fly while reading/decoding binary data
- easy syntax for accessing nested template fields
- loadable template content including the nested data from an INI file
- savable template content including the nested data to an INI file
- creatable blueprints from a template class
- blueprint converter to JSON to visualise templates with *d3.js*.
This library is far away from stable but it works so far. Feedback is very welcomed!
|
KonFoo is a Python Package for creating byte stream mappers in a declarative
way with as little code as necessary to help fighting the confusion with the
foo of the all well-known memory dumps or hexadecimal views of binary data.
It comes with sensible defaults out of the box.
It aims to make the process of reading, decoding, viewing, encoding and
writing binary data from and back to a data provider as easy as possible.
KonFoo in points:
- declarative way to describe the mapping of binary data
- declarative template classes to map, read, decode, encode and write binary data
- nesting of template classes
- adaptable template classes on the fly while reading/decoding binary data
- easy syntax for accessing nested template fields
- loadable template content including the nested data from an INI file
- savable template content including the nested data to an INI file
- creatable blueprints from a template class
- blueprint converter to JSON to visualise templates with *d3.js*.
Read the docs at http://konfoo.readthedocs.org
This library is far away from stable but it works so far.
Feedback is very welcomed!
| Read the docs link added | Read the docs link added
| Markdown | bsd-3-clause | JoeVirtual/KonFoo | markdown | ## Code Before:
KonFoo is a Python Package for creating byte stream mappers in a declarative
way with as little code as necessary to help fighting the confusion with the
foo of the all well-known memory dumps or hexadecimal views of binary data.
It comes with sensible defaults out of the box.
It aims to make the process of reading, decoding, viewing, encoding and
writing binary data from and back to a data provider as easy as possible.
KonFoo in points:
- declarative way to describe the mapping of binary data
- declarative template classes to map, read, decode, encode and write binary data
- nesting of template classes
- adaptable template classes on the fly while reading/decoding binary data
- easy syntax for accessing nested template fields
- loadable template content including the nested data from an INI file
- savable template content including the nested data to an INI file
- creatable blueprints from a template class
- blueprint converter to JSON to visualise templates with *d3.js*.
This library is far away from stable but it works so far. Feedback is very welcomed!
## Instruction:
Read the docs link added
## Code After:
KonFoo is a Python Package for creating byte stream mappers in a declarative
way with as little code as necessary to help fighting the confusion with the
foo of the all well-known memory dumps or hexadecimal views of binary data.
It comes with sensible defaults out of the box.
It aims to make the process of reading, decoding, viewing, encoding and
writing binary data from and back to a data provider as easy as possible.
KonFoo in points:
- declarative way to describe the mapping of binary data
- declarative template classes to map, read, decode, encode and write binary data
- nesting of template classes
- adaptable template classes on the fly while reading/decoding binary data
- easy syntax for accessing nested template fields
- loadable template content including the nested data from an INI file
- savable template content including the nested data to an INI file
- creatable blueprints from a template class
- blueprint converter to JSON to visualise templates with *d3.js*.
Read the docs at http://konfoo.readthedocs.org
This library is far away from stable but it works so far.
Feedback is very welcomed!
|
KonFoo is a Python Package for creating byte stream mappers in a declarative
way with as little code as necessary to help fighting the confusion with the
foo of the all well-known memory dumps or hexadecimal views of binary data.
It comes with sensible defaults out of the box.
It aims to make the process of reading, decoding, viewing, encoding and
writing binary data from and back to a data provider as easy as possible.
KonFoo in points:
- declarative way to describe the mapping of binary data
- declarative template classes to map, read, decode, encode and write binary data
- nesting of template classes
- adaptable template classes on the fly while reading/decoding binary data
- easy syntax for accessing nested template fields
- loadable template content including the nested data from an INI file
- savable template content including the nested data to an INI file
- creatable blueprints from a template class
- blueprint converter to JSON to visualise templates with *d3.js*.
+ Read the docs at http://konfoo.readthedocs.org
+
- This library is far away from stable but it works so far. Feedback is very welcomed!
? ---------------------------
+ This library is far away from stable but it works so far.
+ Feedback is very welcomed! | 5 | 0.217391 | 4 | 1 |
de165bc6db557cba55c7a7724a4595d5e327582d | varify/static/templates/variant/clinvar-item.html | varify/static/templates/variant/clinvar-item.html | Assertion: <a target='_blank' href='https://www.ncbi.nlm.nih.gov/clinvar/'<%= data.assertion.rcvaccession %>/'><%= data.assertion.rcvaccession %></a>
<ul>
<li>
<small>Significance</small> <b><%= data.assertion.clinicalsignificance %></b>
</li>
<li><small>Origin</small> <%= data.assertion.origin %></li>
<li><small>Type</small> <%= data.assertion.type %></li>
<li><small># Submitters</small> <%= data.assertion.numbersubmitters %></li>
<li><small>Review Status</small> <%= data.assertion.reviewstatus %></li>
<li><small>Last Evaluated</small> <%= data.assertion.lastevaluated %></li>
</ul>
| Assertion: <a target='_blank' href='https://www.ncbi.nlm.nih.gov/clinvar/<%= data.rcvaccession %>/'><%= data.rcvaccession %></a>
<ul>
<li>
<small>Significance</small> <b><%= data.clinicalsignificance %></b>
</li>
<li><small>Origin</small> <%= data.origin %></li>
<li><small>Type</small> <%= data.type %></li>
<li><small># Submitters</small> <%= data.numbersubmitters %></li>
<li><small>Review Status</small> <%= data.reviewstatus %></li>
<li><small>Last Evaluated</small> <%= data.lastevaluated %></li>
</ul>
| Fix bad references in clinvar item template | Fix bad references in clinvar item template
Signed-off-by: Don Naegely <e690a32c1e2176a2bfface09e204830e1b5491e3@gmail.com>
| HTML | bsd-2-clause | chop-dbhi/varify,chop-dbhi/varify,chop-dbhi/varify,chop-dbhi/varify | html | ## Code Before:
Assertion: <a target='_blank' href='https://www.ncbi.nlm.nih.gov/clinvar/'<%= data.assertion.rcvaccession %>/'><%= data.assertion.rcvaccession %></a>
<ul>
<li>
<small>Significance</small> <b><%= data.assertion.clinicalsignificance %></b>
</li>
<li><small>Origin</small> <%= data.assertion.origin %></li>
<li><small>Type</small> <%= data.assertion.type %></li>
<li><small># Submitters</small> <%= data.assertion.numbersubmitters %></li>
<li><small>Review Status</small> <%= data.assertion.reviewstatus %></li>
<li><small>Last Evaluated</small> <%= data.assertion.lastevaluated %></li>
</ul>
## Instruction:
Fix bad references in clinvar item template
Signed-off-by: Don Naegely <e690a32c1e2176a2bfface09e204830e1b5491e3@gmail.com>
## Code After:
Assertion: <a target='_blank' href='https://www.ncbi.nlm.nih.gov/clinvar/<%= data.rcvaccession %>/'><%= data.rcvaccession %></a>
<ul>
<li>
<small>Significance</small> <b><%= data.clinicalsignificance %></b>
</li>
<li><small>Origin</small> <%= data.origin %></li>
<li><small>Type</small> <%= data.type %></li>
<li><small># Submitters</small> <%= data.numbersubmitters %></li>
<li><small>Review Status</small> <%= data.reviewstatus %></li>
<li><small>Last Evaluated</small> <%= data.lastevaluated %></li>
</ul>
| - Assertion: <a target='_blank' href='https://www.ncbi.nlm.nih.gov/clinvar/'<%= data.assertion.rcvaccession %>/'><%= data.assertion.rcvaccession %></a>
? - ---------- ----------
+ Assertion: <a target='_blank' href='https://www.ncbi.nlm.nih.gov/clinvar/<%= data.rcvaccession %>/'><%= data.rcvaccession %></a>
<ul>
<li>
- <small>Significance</small> <b><%= data.assertion.clinicalsignificance %></b>
? ----------
+ <small>Significance</small> <b><%= data.clinicalsignificance %></b>
</li>
- <li><small>Origin</small> <%= data.assertion.origin %></li>
? ----------
+ <li><small>Origin</small> <%= data.origin %></li>
- <li><small>Type</small> <%= data.assertion.type %></li>
? ----------
+ <li><small>Type</small> <%= data.type %></li>
- <li><small># Submitters</small> <%= data.assertion.numbersubmitters %></li>
? ----------
+ <li><small># Submitters</small> <%= data.numbersubmitters %></li>
- <li><small>Review Status</small> <%= data.assertion.reviewstatus %></li>
? ----------
+ <li><small>Review Status</small> <%= data.reviewstatus %></li>
- <li><small>Last Evaluated</small> <%= data.assertion.lastevaluated %></li>
? ----------
+ <li><small>Last Evaluated</small> <%= data.lastevaluated %></li>
</ul> | 14 | 1.166667 | 7 | 7 |
ea70803285c32d261a51e44127d9d82da58f6a28 | .travis.yml | .travis.yml | sudo: required
language: go
services:
- docker
go:
- 1.7
matrix:
allow_failures:
- go: tip
branches:
only:
- master
- travis-testing
script:
- make test testrace
| sudo: required
dist: trusty
language: go
services:
- docker
go:
- 1.7
matrix:
allow_failures:
- go: tip
branches:
only:
- master
- travis-testing
script:
- make test testrace
| Use trusty for Travis to force TLS 1.2 | Use trusty for Travis to force TLS 1.2
| YAML | mpl-2.0 | ryon/vault,Aloomaio/vault,chrishoffman/vault,hashicorp/vault,rnaveiras/vault,deverton/hashicorp-vault,tallpauley/vault,MonsantoCo/vault,lemondrank/vault,quixoten/vault,jmhardison/vault,joelthompson/vault,mymercurialsky/vault,hashicorp/vault,rnaveiras/vault,hashicorp/vault,wjam/vault,Banno/vault,Caiyeon/vault,kingland/vault,michaelansel/vault,mgk/vault,hashicorp/vault,hartsock/vault,hartsock/vault,Aloomaio/vault,rnaveiras/vault,mgk/vault,jmhardison/vault,lirao/vault,hartsock/vault,Caiyeon/vault,lemondrank/vault,jmhardison/vault,hashicorp/vault,joelthompson/vault,chrishoffman/vault,wjam/vault,kingland/vault,LolalyLuo/vault,naunga/vault,kingland/vault,LolalyLuo/vault,jam-pot/vault,MonsantoCo/vault,deverton/hashicorp-vault,tallpauley/vault,jmhardison/vault,ryon/vault,Banno/vault,hartsock/vault,lirao/vault,mgk/vault,rnaveiras/vault,quixoten/vault,quixoten/vault,Aloomaio/vault,mymercurialsky/vault,quixoten/vault,hartsock/vault,joelthompson/vault,michaelansel/vault,rnaveiras/vault,joelthompson/vault,Aloomaio/vault,hashicorp/vault,jmhardison/vault,naunga/vault,jam-pot/vault,mgk/vault,kingland/vault,kingland/vault | yaml | ## Code Before:
sudo: required
language: go
services:
- docker
go:
- 1.7
matrix:
allow_failures:
- go: tip
branches:
only:
- master
- travis-testing
script:
- make test testrace
## Instruction:
Use trusty for Travis to force TLS 1.2
## Code After:
sudo: required
dist: trusty
language: go
services:
- docker
go:
- 1.7
matrix:
allow_failures:
- go: tip
branches:
only:
- master
- travis-testing
script:
- make test testrace
| sudo: required
+ dist: trusty
language: go
services:
- docker
go:
- 1.7
matrix:
allow_failures:
- go: tip
branches:
only:
- master
- travis-testing
script:
- make test testrace | 1 | 0.047619 | 1 | 0 |
4011b7f533088d7f602fe9f7aaddb7649c4d6e70 | README.md | README.md | **This utility will only run on Java8 or later.**
Simple java command line utility to report on the version of the .class files within .jar files beneath a given directory.
The utility takes 2 arguments.
The 1st argument is the name of the directory beneath which the utility will scan for .jar files.
The 2nd (optional) argument is the minimum java class version that should be reported. If this argument is missing, then all versions will
be reported.
A typical command line might look like:
`java -jar find-class-versions-1.0.0.jar /home/username/dev 50`
The above will report the java class version of all jar files found beneath the /home/username/dev directory.
Note that a .jar file *may* have more than 1 version of .class files within it. This utility will report all versions found, one per line.
| **This utility will only run on Java7 or later.**
Simple java command line utility to report on the version of the .class files within .jar files beneath a given directory.
The utility takes 2 arguments.
The 1st argument is the name of the directory beneath which the utility will scan for .jar files.
The 2nd (optional) argument is the minimum java class version that should be reported. If this argument is missing, then all versions will
be reported.
A typical command line might look like:
`java -jar find-class-versions-1.0.0.jar /home/username/dev 50`
The above will report the java class version of all jar files found beneath the /home/username/dev directory.
Note that a .jar file *may* have more than 1 version of .class files within it. This utility will report all versions found, one per line.
## Motivation
Suppose you're working on a legacy project that is required to target an older JVM. In your development environment, you use the latest
JVM, but for actual deployment, your target JVM is old. How do you easily identify the problem jar files that get bundled
into your project, where a problem jar file is any that includes .class files that target a newer JVM than the one to which you will deploy?
This tool makes it easy to identify those problem .jar files.
| Add motivation section. Adjust to note Java7 requirement. | Add motivation section. Adjust to note Java7 requirement. | Markdown | apache-2.0 | jimv39/find-class-versions | markdown | ## Code Before:
**This utility will only run on Java8 or later.**
Simple java command line utility to report on the version of the .class files within .jar files beneath a given directory.
The utility takes 2 arguments.
The 1st argument is the name of the directory beneath which the utility will scan for .jar files.
The 2nd (optional) argument is the minimum java class version that should be reported. If this argument is missing, then all versions will
be reported.
A typical command line might look like:
`java -jar find-class-versions-1.0.0.jar /home/username/dev 50`
The above will report the java class version of all jar files found beneath the /home/username/dev directory.
Note that a .jar file *may* have more than 1 version of .class files within it. This utility will report all versions found, one per line.
## Instruction:
Add motivation section. Adjust to note Java7 requirement.
## Code After:
**This utility will only run on Java7 or later.**
Simple java command line utility to report on the version of the .class files within .jar files beneath a given directory.
The utility takes 2 arguments.
The 1st argument is the name of the directory beneath which the utility will scan for .jar files.
The 2nd (optional) argument is the minimum java class version that should be reported. If this argument is missing, then all versions will
be reported.
A typical command line might look like:
`java -jar find-class-versions-1.0.0.jar /home/username/dev 50`
The above will report the java class version of all jar files found beneath the /home/username/dev directory.
Note that a .jar file *may* have more than 1 version of .class files within it. This utility will report all versions found, one per line.
## Motivation
Suppose you're working on a legacy project that is required to target an older JVM. In your development environment, you use the latest
JVM, but for actual deployment, your target JVM is old. How do you easily identify the problem jar files that get bundled
into your project, where a problem jar file is any that includes .class files that target a newer JVM than the one to which you will deploy?
This tool makes it easy to identify those problem .jar files.
| - **This utility will only run on Java8 or later.**
? ^
+ **This utility will only run on Java7 or later.**
? ^
Simple java command line utility to report on the version of the .class files within .jar files beneath a given directory.
The utility takes 2 arguments.
The 1st argument is the name of the directory beneath which the utility will scan for .jar files.
The 2nd (optional) argument is the minimum java class version that should be reported. If this argument is missing, then all versions will
be reported.
A typical command line might look like:
`java -jar find-class-versions-1.0.0.jar /home/username/dev 50`
The above will report the java class version of all jar files found beneath the /home/username/dev directory.
Note that a .jar file *may* have more than 1 version of .class files within it. This utility will report all versions found, one per line.
+ ## Motivation
+
+ Suppose you're working on a legacy project that is required to target an older JVM. In your development environment, you use the latest
+ JVM, but for actual deployment, your target JVM is old. How do you easily identify the problem jar files that get bundled
+ into your project, where a problem jar file is any that includes .class files that target a newer JVM than the one to which you will deploy?
+
+ This tool makes it easy to identify those problem .jar files. | 9 | 0.473684 | 8 | 1 |
cab15afe32fed4cf1e1239914da1456f93ab5bc0 | templates/ruby_test_runner.sh.erb | templates/ruby_test_runner.sh.erb |
export RAILS_ENV=test
export PROJECT_DIR="/vagrant/<%= @config['project_name'] %>"
export CI_REPORTS= "/vagrant/<%= @config['project_name'] %>/reports"
ssh -oStrictHostKeyChecking=no github.com
mkdir $PROJECT_DIR
cd $PROJECT_DIR
#tar xf /tmp/project.tar
rvm autolibs packages
sudo /usr/local/rvm/bin/rvm requirements
rvm install --create $(cat .ruby-version)
rvm use $(cat .ruby-version)
gem install bundler
if ! grep -q ci_reporter Gemfile; then
echo "gem 'ci_reporter'" >> Gemfile
fi
bundle install --without assets
<%= @config["project_setup"] %>
T=$(date +%s)
cd /tmp/project
<%= @config["tests_to_run"] %>
T2=$(date +%s)
find . -mmin $(((T-T2)/60-1)) -name "*.xml" -exec mv {} $CI_REPORTS \;
|
export RAILS_ENV=test
export PROJECT_DIR="/vagrant/<%= @config['project_name'] %>"
export CI_REPORTS="/vagrant/<%= @config['project_name'] %>/reports"
ssh -oStrictHostKeyChecking=no github.com
mkdir $PROJECT_DIR
cd $PROJECT_DIR
#tar xf /tmp/project.tar
rvm autolibs packages
sudo /usr/local/rvm/bin/rvm requirements
rvm install --create $(cat .ruby-version)
rvm use $(cat .ruby-version)
gem install bundler
if ! grep -q ci_reporter Gemfile; then
echo "gem 'ci_reporter'" >> Gemfile
fi
bundle install --without assets
<%= @config["project_setup"] %>
T=$(date +%s)
#cd /tmp/project
cd $PROJECT_DIR
<%= @config["tests_to_run"] %>
T2=$(date +%s)
find . -mmin $(((T-T2)/60-1)) -name "*.xml" -exec mv {} $CI_REPORTS \;
| Remove space in variable creation | [MOB-19] Remove space in variable creation
| HTML+ERB | mit | reachlocal/boxci,codebreakdown/boxci,justinleveck/boxci | html+erb | ## Code Before:
export RAILS_ENV=test
export PROJECT_DIR="/vagrant/<%= @config['project_name'] %>"
export CI_REPORTS= "/vagrant/<%= @config['project_name'] %>/reports"
ssh -oStrictHostKeyChecking=no github.com
mkdir $PROJECT_DIR
cd $PROJECT_DIR
#tar xf /tmp/project.tar
rvm autolibs packages
sudo /usr/local/rvm/bin/rvm requirements
rvm install --create $(cat .ruby-version)
rvm use $(cat .ruby-version)
gem install bundler
if ! grep -q ci_reporter Gemfile; then
echo "gem 'ci_reporter'" >> Gemfile
fi
bundle install --without assets
<%= @config["project_setup"] %>
T=$(date +%s)
cd /tmp/project
<%= @config["tests_to_run"] %>
T2=$(date +%s)
find . -mmin $(((T-T2)/60-1)) -name "*.xml" -exec mv {} $CI_REPORTS \;
## Instruction:
[MOB-19] Remove space in variable creation
## Code After:
export RAILS_ENV=test
export PROJECT_DIR="/vagrant/<%= @config['project_name'] %>"
export CI_REPORTS="/vagrant/<%= @config['project_name'] %>/reports"
ssh -oStrictHostKeyChecking=no github.com
mkdir $PROJECT_DIR
cd $PROJECT_DIR
#tar xf /tmp/project.tar
rvm autolibs packages
sudo /usr/local/rvm/bin/rvm requirements
rvm install --create $(cat .ruby-version)
rvm use $(cat .ruby-version)
gem install bundler
if ! grep -q ci_reporter Gemfile; then
echo "gem 'ci_reporter'" >> Gemfile
fi
bundle install --without assets
<%= @config["project_setup"] %>
T=$(date +%s)
#cd /tmp/project
cd $PROJECT_DIR
<%= @config["tests_to_run"] %>
T2=$(date +%s)
find . -mmin $(((T-T2)/60-1)) -name "*.xml" -exec mv {} $CI_REPORTS \;
|
export RAILS_ENV=test
export PROJECT_DIR="/vagrant/<%= @config['project_name'] %>"
- export CI_REPORTS= "/vagrant/<%= @config['project_name'] %>/reports"
? -
+ export CI_REPORTS="/vagrant/<%= @config['project_name'] %>/reports"
ssh -oStrictHostKeyChecking=no github.com
mkdir $PROJECT_DIR
cd $PROJECT_DIR
#tar xf /tmp/project.tar
rvm autolibs packages
sudo /usr/local/rvm/bin/rvm requirements
rvm install --create $(cat .ruby-version)
rvm use $(cat .ruby-version)
gem install bundler
if ! grep -q ci_reporter Gemfile; then
echo "gem 'ci_reporter'" >> Gemfile
fi
bundle install --without assets
<%= @config["project_setup"] %>
T=$(date +%s)
- cd /tmp/project
+ #cd /tmp/project
? +
+ cd $PROJECT_DIR
<%= @config["tests_to_run"] %>
T2=$(date +%s)
find . -mmin $(((T-T2)/60-1)) -name "*.xml" -exec mv {} $CI_REPORTS \; | 5 | 0.2 | 3 | 2 |
612cbb45033e8486bf7dab5723a20ccf3b9fd13b | src/TableParser/TableParser.php | src/TableParser/TableParser.php | <?php
namespace Maghead\TableParser;
use InvalidArgumentException;
use Magsql\Driver\BaseDriver;
use Magsql\Driver\MySQLDriver;
use Magsql\Driver\PgSQLDriver;
use Magsql\Driver\SQLiteDriver;
use Maghead\Runtime\Connection;
class TableParser
{
public static function create(Connection $c, BaseDriver $d)
{
if ($d instanceof MySQLDriver) {
return new MysqlTableParser($c, $d);
} else if ($d instanceof PgSQLDriver) {
return new PgsqlTableParser($c, $d);
} else if ($d instanceof SQLiteDriver) {
return new SqliteTableParser($c, $d);
}
// This is not going to happen
throw new InvalidArgumentException("table parser driver does not support {$d->getDriverName()} currently.");
}
}
| <?php
namespace Maghead\TableParser;
use InvalidArgumentException;
use Magsql\Driver\BaseDriver;
use Magsql\Driver\MySQLDriver;
use Magsql\Driver\PgSQLDriver;
use Magsql\Driver\SQLiteDriver;
use Maghead\Runtime\Connection;
class TableParser
{
public static function create(Connection $c, BaseDriver $d)
{
if ($d instanceof MySQLDriver) {
return new MysqlTableParser($c, $d);
} else if ($d instanceof PgSQLDriver) {
return new PgsqlTableParser($c, $d);
} else if ($d instanceof SQLiteDriver) {
return new SqliteTableParser($c, $d);
}
// This is not going to happen
throw new InvalidArgumentException("table parser driver does not support {$d::ID} currently.");
}
}
| Remove getDriverName method call from the exception message | Remove getDriverName method call from the exception message
| PHP | bsd-3-clause | c9s/LazyRecord,c9s/LazyRecord,c9s/LazyRecord | php | ## Code Before:
<?php
namespace Maghead\TableParser;
use InvalidArgumentException;
use Magsql\Driver\BaseDriver;
use Magsql\Driver\MySQLDriver;
use Magsql\Driver\PgSQLDriver;
use Magsql\Driver\SQLiteDriver;
use Maghead\Runtime\Connection;
class TableParser
{
public static function create(Connection $c, BaseDriver $d)
{
if ($d instanceof MySQLDriver) {
return new MysqlTableParser($c, $d);
} else if ($d instanceof PgSQLDriver) {
return new PgsqlTableParser($c, $d);
} else if ($d instanceof SQLiteDriver) {
return new SqliteTableParser($c, $d);
}
// This is not going to happen
throw new InvalidArgumentException("table parser driver does not support {$d->getDriverName()} currently.");
}
}
## Instruction:
Remove getDriverName method call from the exception message
## Code After:
<?php
namespace Maghead\TableParser;
use InvalidArgumentException;
use Magsql\Driver\BaseDriver;
use Magsql\Driver\MySQLDriver;
use Magsql\Driver\PgSQLDriver;
use Magsql\Driver\SQLiteDriver;
use Maghead\Runtime\Connection;
class TableParser
{
public static function create(Connection $c, BaseDriver $d)
{
if ($d instanceof MySQLDriver) {
return new MysqlTableParser($c, $d);
} else if ($d instanceof PgSQLDriver) {
return new PgsqlTableParser($c, $d);
} else if ($d instanceof SQLiteDriver) {
return new SqliteTableParser($c, $d);
}
// This is not going to happen
throw new InvalidArgumentException("table parser driver does not support {$d::ID} currently.");
}
}
| <?php
namespace Maghead\TableParser;
use InvalidArgumentException;
use Magsql\Driver\BaseDriver;
use Magsql\Driver\MySQLDriver;
use Magsql\Driver\PgSQLDriver;
use Magsql\Driver\SQLiteDriver;
use Maghead\Runtime\Connection;
class TableParser
{
public static function create(Connection $c, BaseDriver $d)
{
if ($d instanceof MySQLDriver) {
return new MysqlTableParser($c, $d);
} else if ($d instanceof PgSQLDriver) {
return new PgsqlTableParser($c, $d);
} else if ($d instanceof SQLiteDriver) {
return new SqliteTableParser($c, $d);
}
// This is not going to happen
- throw new InvalidArgumentException("table parser driver does not support {$d->getDriverName()} currently.");
? ^^^^^ -----------
+ throw new InvalidArgumentException("table parser driver does not support {$d::ID} currently.");
? ^^^
}
} | 2 | 0.076923 | 1 | 1 |
2ef38c779bf015589e25ce83f4d15ad229e2bc3a | app/models/people_network.rb | app/models/people_network.rb | class PeopleNetwork < ActiveRecord::Base
belongs_to :person
belongs_to :trusted_person, :class_name => "Person"
scope :involves_as_trusted_person, lambda { |person| where(:trusted_person_id => person) }
scope :involves_as_person, lambda { |person| where(:person_id => person) }
scope :involves, lambda { |person| where("person_id = ? OR trusted_person_id = ?", person.id, person.id) }
validates_presence_of :person_id, :trusted_person_id
# def requester?(person)
# self.person == person
# end
#
# def trusted_person?(person)
# self.trusted_person == person
# end
def self.create_trust!(first_person, second_person)
PeopleNetwork.create!(:person => first_person, :trusted_person => second_person)
PeopleNetwork.create!(:person => second_person, :trusted_person => first_person)
first_person.reputation_rating.increase_trusted_network_count
second_person.reputation_rating.increase_trusted_network_count
EventLog.create_trust_established_event_log(first_person, second_person)
end
end
| class PeopleNetwork < ActiveRecord::Base
belongs_to :person
belongs_to :trusted_person, :class_name => "Person"
scope :involves_as_trusted_person, lambda { |person| where(:trusted_person_id => person) }
scope :involves_as_person, lambda { |person| where(:person_id => person) }
scope :involves, lambda { |person| where("person_id = ? OR trusted_person_id = ?", person.id, person.id) }
validates_presence_of :person_id, :trusted_person_id
# def requester?(person)
# self.person == person
# end
#
# def trusted_person?(person)
# self.trusted_person == person
# end
def self.create_trust!(first_person, second_person)
PeopleNetwork.create!(:person => first_person, :trusted_person => second_person,
:entity_id => second_person,
:entity_type_id => EntityType::TRUSTED_PERSON_ENTITY)
PeopleNetwork.create!(:person => second_person, :trusted_person => first_person,
:entity_id => first_person,
:entity_type_id => EntityType::TRUSTED_PERSON_ENTITY)
first_person.reputation_rating.increase_trusted_network_count
second_person.reputation_rating.increase_trusted_network_count
EventLog.create_trust_established_event_log(first_person, second_person)
end
end
| Add enitiy id to people network when trust is established | Add enitiy id to people network when trust is established
| Ruby | unlicense | haseeb-ahmad/sharedearth-net,sharedearth-net/sharedearth-net,sharedearth-net/sharedearth-net,haseeb-ahmad/sharedearth-net,sharedearth-net/sharedearth-net,haseeb-ahmad/sharedearth-net,muhumar99/sharedearth,muhumar99/sharedearth,muhumar99/sharedearth | ruby | ## Code Before:
class PeopleNetwork < ActiveRecord::Base
belongs_to :person
belongs_to :trusted_person, :class_name => "Person"
scope :involves_as_trusted_person, lambda { |person| where(:trusted_person_id => person) }
scope :involves_as_person, lambda { |person| where(:person_id => person) }
scope :involves, lambda { |person| where("person_id = ? OR trusted_person_id = ?", person.id, person.id) }
validates_presence_of :person_id, :trusted_person_id
# def requester?(person)
# self.person == person
# end
#
# def trusted_person?(person)
# self.trusted_person == person
# end
def self.create_trust!(first_person, second_person)
PeopleNetwork.create!(:person => first_person, :trusted_person => second_person)
PeopleNetwork.create!(:person => second_person, :trusted_person => first_person)
first_person.reputation_rating.increase_trusted_network_count
second_person.reputation_rating.increase_trusted_network_count
EventLog.create_trust_established_event_log(first_person, second_person)
end
end
## Instruction:
Add enitiy id to people network when trust is established
## Code After:
class PeopleNetwork < ActiveRecord::Base
belongs_to :person
belongs_to :trusted_person, :class_name => "Person"
scope :involves_as_trusted_person, lambda { |person| where(:trusted_person_id => person) }
scope :involves_as_person, lambda { |person| where(:person_id => person) }
scope :involves, lambda { |person| where("person_id = ? OR trusted_person_id = ?", person.id, person.id) }
validates_presence_of :person_id, :trusted_person_id
# def requester?(person)
# self.person == person
# end
#
# def trusted_person?(person)
# self.trusted_person == person
# end
def self.create_trust!(first_person, second_person)
PeopleNetwork.create!(:person => first_person, :trusted_person => second_person,
:entity_id => second_person,
:entity_type_id => EntityType::TRUSTED_PERSON_ENTITY)
PeopleNetwork.create!(:person => second_person, :trusted_person => first_person,
:entity_id => first_person,
:entity_type_id => EntityType::TRUSTED_PERSON_ENTITY)
first_person.reputation_rating.increase_trusted_network_count
second_person.reputation_rating.increase_trusted_network_count
EventLog.create_trust_established_event_log(first_person, second_person)
end
end
| class PeopleNetwork < ActiveRecord::Base
belongs_to :person
belongs_to :trusted_person, :class_name => "Person"
scope :involves_as_trusted_person, lambda { |person| where(:trusted_person_id => person) }
scope :involves_as_person, lambda { |person| where(:person_id => person) }
scope :involves, lambda { |person| where("person_id = ? OR trusted_person_id = ?", person.id, person.id) }
validates_presence_of :person_id, :trusted_person_id
# def requester?(person)
# self.person == person
# end
#
# def trusted_person?(person)
# self.trusted_person == person
# end
def self.create_trust!(first_person, second_person)
- PeopleNetwork.create!(:person => first_person, :trusted_person => second_person)
? ^
+ PeopleNetwork.create!(:person => first_person, :trusted_person => second_person,
? ^
+ :entity_id => second_person,
+ :entity_type_id => EntityType::TRUSTED_PERSON_ENTITY)
- PeopleNetwork.create!(:person => second_person, :trusted_person => first_person)
? ^
+ PeopleNetwork.create!(:person => second_person, :trusted_person => first_person,
? ^^
+ :entity_id => first_person,
+ :entity_type_id => EntityType::TRUSTED_PERSON_ENTITY)
first_person.reputation_rating.increase_trusted_network_count
second_person.reputation_rating.increase_trusted_network_count
EventLog.create_trust_established_event_log(first_person, second_person)
end
end | 8 | 0.307692 | 6 | 2 |
50a084e7894ae1b3586709cf488bd2260cbeb615 | packages/eslint-config-eventbrite/rules/style.js | packages/eslint-config-eventbrite/rules/style.js | // The rules ultimately override any rules defined in legacy/rules/style.js
module.exports = {
rules: {
// Enforce function expressions
// http://eslint.org/docs/rules/func-style
'func-style': ['error', 'expression'],
// enforce that `let` & `const` declarations are declared together
// http://eslint.org/docs/rules/one-var
'one-var': ['error', 'never']
}
};
| // The rules ultimately override any rules defined in legacy/rules/style.js
module.exports = {
rules: {
// Enforce function expressions
// http://eslint.org/docs/rules/func-style
'func-style': ['error', 'expression'],
// enforce that `let` & `const` declarations are declared together
// http://eslint.org/docs/rules/one-var
'one-var': ['error', 'never'],
// enforce spacing around infix operators
// http://eslint.org/docs/rules/space-infix-ops
'space-infix-ops': 'error'
}
};
| Add new rule for spacing around infix operators | Add new rule for spacing around infix operators
| JavaScript | mit | eventbrite/javascript | javascript | ## Code Before:
// The rules ultimately override any rules defined in legacy/rules/style.js
module.exports = {
rules: {
// Enforce function expressions
// http://eslint.org/docs/rules/func-style
'func-style': ['error', 'expression'],
// enforce that `let` & `const` declarations are declared together
// http://eslint.org/docs/rules/one-var
'one-var': ['error', 'never']
}
};
## Instruction:
Add new rule for spacing around infix operators
## Code After:
// The rules ultimately override any rules defined in legacy/rules/style.js
module.exports = {
rules: {
// Enforce function expressions
// http://eslint.org/docs/rules/func-style
'func-style': ['error', 'expression'],
// enforce that `let` & `const` declarations are declared together
// http://eslint.org/docs/rules/one-var
'one-var': ['error', 'never'],
// enforce spacing around infix operators
// http://eslint.org/docs/rules/space-infix-ops
'space-infix-ops': 'error'
}
};
| // The rules ultimately override any rules defined in legacy/rules/style.js
module.exports = {
rules: {
// Enforce function expressions
// http://eslint.org/docs/rules/func-style
'func-style': ['error', 'expression'],
// enforce that `let` & `const` declarations are declared together
// http://eslint.org/docs/rules/one-var
- 'one-var': ['error', 'never']
+ 'one-var': ['error', 'never'],
? +
+
+ // enforce spacing around infix operators
+ // http://eslint.org/docs/rules/space-infix-ops
+ 'space-infix-ops': 'error'
}
}; | 6 | 0.5 | 5 | 1 |
39d5e9052168be3c2e33a96ae6e03e820d6f1fe9 | recipes/pyre/pyre_version.patch | recipes/pyre/pyre_version.patch | diff --git a/CMakeLists.txt b/CMakeLists.txt
index 4a24372e..be57f32d 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -33,8 +33,14 @@ include(pyre_cuda)
include(pyre_gsl)
include(pyre_mpi)
-# ask git for the pyre version
-pyre_getVersion()
+# set pyre version info
+set(REPO_MAJOR 1)
+set(REPO_MINOR 9)
+set(REPO_MICRO 9)
+set(REVISION "")
+set(MAJOR ${REPO_MAJOR})
+set(MINOR ${REPO_MINOR})
+set(MICRO ${REPO_MICRO})
# set up the project
project(PYRE VERSION ${REPO_MAJOR}.${REPO_MINOR}.${REPO_MICRO} LANGUAGES CXX)
| diff --git a/CMakeLists.txt b/CMakeLists.txt
index 80c2325d..3c0f5cd7 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -34,14 +34,17 @@ include(pyre_mpi)
include(pyre_gsl)
include(pyre_postgres)
-# ask git for the pyre version
-pyre_getVersion()
+set(ENV_PKG_VERSION $ENV{PKG_VERSION} CACHE INTERNAL "")
# set up the project
-project(PYRE VERSION ${REPO_MAJOR}.${REPO_MINOR}.${REPO_MICRO} LANGUAGES CXX C)
+project(PYRE VERSION "${ENV_PKG_VERSION}" LANGUAGES CXX C)
# hmmmm
include(GNUInstallDirs)
+set(MAJOR ${PROJECT_VERSION_MAJOR})
+set(MINOR ${PROJECT_VERSION_MINOR})
+set(MICRO ${PROJECT_VERSION_PATCH})
+
# programs
find_program(BASH_PROGRAM bash)
| Automate version detection via conda-build PKG_VERSION | Automate version detection via conda-build PKG_VERSION
| Diff | bsd-3-clause | jochym/staged-recipes,jakirkham/staged-recipes,hadim/staged-recipes,SylvainCorlay/staged-recipes,jakirkham/staged-recipes,ReimarBauer/staged-recipes,chrisburr/staged-recipes,igortg/staged-recipes,stuertz/staged-recipes,patricksnape/staged-recipes,conda-forge/staged-recipes,stuertz/staged-recipes,ReimarBauer/staged-recipes,chrisburr/staged-recipes,johanneskoester/staged-recipes,goanpeca/staged-recipes,ocefpaf/staged-recipes,scopatz/staged-recipes,igortg/staged-recipes,ocefpaf/staged-recipes,kwilcox/staged-recipes,conda-forge/staged-recipes,SylvainCorlay/staged-recipes,mariusvniekerk/staged-recipes,goanpeca/staged-recipes,patricksnape/staged-recipes,hadim/staged-recipes,mariusvniekerk/staged-recipes,jochym/staged-recipes,scopatz/staged-recipes,kwilcox/staged-recipes,johanneskoester/staged-recipes | diff | ## Code Before:
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 4a24372e..be57f32d 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -33,8 +33,14 @@ include(pyre_cuda)
include(pyre_gsl)
include(pyre_mpi)
-# ask git for the pyre version
-pyre_getVersion()
+# set pyre version info
+set(REPO_MAJOR 1)
+set(REPO_MINOR 9)
+set(REPO_MICRO 9)
+set(REVISION "")
+set(MAJOR ${REPO_MAJOR})
+set(MINOR ${REPO_MINOR})
+set(MICRO ${REPO_MICRO})
# set up the project
project(PYRE VERSION ${REPO_MAJOR}.${REPO_MINOR}.${REPO_MICRO} LANGUAGES CXX)
## Instruction:
Automate version detection via conda-build PKG_VERSION
## Code After:
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 80c2325d..3c0f5cd7 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -34,14 +34,17 @@ include(pyre_mpi)
include(pyre_gsl)
include(pyre_postgres)
-# ask git for the pyre version
-pyre_getVersion()
+set(ENV_PKG_VERSION $ENV{PKG_VERSION} CACHE INTERNAL "")
# set up the project
-project(PYRE VERSION ${REPO_MAJOR}.${REPO_MINOR}.${REPO_MICRO} LANGUAGES CXX C)
+project(PYRE VERSION "${ENV_PKG_VERSION}" LANGUAGES CXX C)
# hmmmm
include(GNUInstallDirs)
+set(MAJOR ${PROJECT_VERSION_MAJOR})
+set(MINOR ${PROJECT_VERSION_MINOR})
+set(MICRO ${PROJECT_VERSION_PATCH})
+
# programs
find_program(BASH_PROGRAM bash)
| diff --git a/CMakeLists.txt b/CMakeLists.txt
- index 4a24372e..be57f32d 100644
+ index 80c2325d..3c0f5cd7 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
- @@ -33,8 +33,14 @@ include(pyre_cuda)
? ^ ^ ^ ^ ^^^^
+ @@ -34,14 +34,17 @@ include(pyre_mpi)
? ^ ^^ ^ ^ ^^^
include(pyre_gsl)
- include(pyre_mpi)
? - ^
+ include(pyre_postgres)
? ^^^^^^^
-# ask git for the pyre version
-pyre_getVersion()
+ +set(ENV_PKG_VERSION $ENV{PKG_VERSION} CACHE INTERNAL "")
- +# set pyre version info
- +set(REPO_MAJOR 1)
- +set(REPO_MINOR 9)
- +set(REPO_MICRO 9)
- +set(REVISION "")
- +set(MAJOR ${REPO_MAJOR})
- +set(MINOR ${REPO_MINOR})
- +set(MICRO ${REPO_MICRO})
# set up the project
- project(PYRE VERSION ${REPO_MAJOR}.${REPO_MINOR}.${REPO_MICRO} LANGUAGES CXX)
? ^
+ -project(PYRE VERSION ${REPO_MAJOR}.${REPO_MINOR}.${REPO_MICRO} LANGUAGES CXX C)
? ^ ++
+ +project(PYRE VERSION "${ENV_PKG_VERSION}" LANGUAGES CXX C)
+ # hmmmm
+ include(GNUInstallDirs)
+
+ +set(MAJOR ${PROJECT_VERSION_MAJOR})
+ +set(MINOR ${PROJECT_VERSION_MINOR})
+ +set(MICRO ${PROJECT_VERSION_PATCH})
+ +
+ # programs
+ find_program(BASH_PROGRAM bash)
+ | 28 | 1.333333 | 16 | 12 |
2825685f2ae1880a858e68335e2b68b92e72fcf5 | paddle/fluid/inference/tensorrt/plugin/CMakeLists.txt | paddle/fluid/inference/tensorrt/plugin/CMakeLists.txt | nv_library(tensorrt_plugin SRCS trt_plugin.cc split_op_plugin.cu prelu_op_plugin.cu DEPS enforce)
| nv_library(tensorrt_plugin SRCS trt_plugin.cc split_op_plugin.cu prelu_op_plugin.cu DEPS enforce device_context)
| Fix tensorrt plugin cmake dependency, test=develop | Fix tensorrt plugin cmake dependency, test=develop
| Text | apache-2.0 | baidu/Paddle,chengduoZH/Paddle,baidu/Paddle,luotao1/Paddle,tensor-tang/Paddle,luotao1/Paddle,luotao1/Paddle,chengduoZH/Paddle,PaddlePaddle/Paddle,baidu/Paddle,PaddlePaddle/Paddle,PaddlePaddle/Paddle,PaddlePaddle/Paddle,chengduoZH/Paddle,luotao1/Paddle,luotao1/Paddle,chengduoZH/Paddle,baidu/Paddle,tensor-tang/Paddle,tensor-tang/Paddle,PaddlePaddle/Paddle,PaddlePaddle/Paddle,tensor-tang/Paddle,PaddlePaddle/Paddle,chengduoZH/Paddle,tensor-tang/Paddle,luotao1/Paddle,baidu/Paddle,luotao1/Paddle | text | ## Code Before:
nv_library(tensorrt_plugin SRCS trt_plugin.cc split_op_plugin.cu prelu_op_plugin.cu DEPS enforce)
## Instruction:
Fix tensorrt plugin cmake dependency, test=develop
## Code After:
nv_library(tensorrt_plugin SRCS trt_plugin.cc split_op_plugin.cu prelu_op_plugin.cu DEPS enforce device_context)
| - nv_library(tensorrt_plugin SRCS trt_plugin.cc split_op_plugin.cu prelu_op_plugin.cu DEPS enforce)
+ nv_library(tensorrt_plugin SRCS trt_plugin.cc split_op_plugin.cu prelu_op_plugin.cu DEPS enforce device_context)
? +++++++++++++++
| 2 | 2 | 1 | 1 |
7a2646d4684530521f5bc0f08471474ce77364c2 | README.md | README.md |
[](https://greenkeeper.io/)
Built with [Polymer 2](https://www.polymer-project.org/) and [Bootstrap 4](http://getbootstrap.com/)
[Polymer 2](https://www.polymer-project.org/) is a JavaScript library that helps you create custom reusable HTML elements, and use them to build performant, maintainable apps.
[Bootstrap 4](http://getbootstrap.com/) is the most popular HTML, CSS, and JS framework for developing responsive, mobile first projects on the web.
### Install:
1) Install [Git](https://git-scm.com/downloads).
2) Install [Node.js](https://nodejs.org/en/).
3) Install Bower.
```sh
npm install -g bower
```
4) Install Polymer CLI.
```sh
npm install -g polymer-cli
```
### Fetch dependencies:
```sh
npm install
bower update
```
### Build:
Build the site
```sh
npm run build
```
Start a webserver
```sh
npm run serve
```
| Built with [Polymer 2](https://www.polymer-project.org/) and [Bootstrap 4](http://getbootstrap.com/)
[Polymer 2](https://www.polymer-project.org/) is a JavaScript library that helps you create custom reusable HTML elements, and use them to build performant, maintainable apps.
[Bootstrap 4](http://getbootstrap.com/) is the most popular HTML, CSS, and JS framework for developing responsive, mobile first projects on the web.
### Install:
1) Install [Git](https://git-scm.com/downloads).
2) Install [Node.js](https://nodejs.org/en/).
3) Install Bower.
```sh
npm install -g bower
```
4) Install Polymer CLI.
```sh
npm install -g polymer-cli
```
### Fetch dependencies:
```sh
npm install
bower update
```
### Build:
Build the site
```sh
npm run build
```
Start a webserver
```sh
npm run serve
```
| Revert "docs(readme): add Greenkeeper badge" | Revert "docs(readme): add Greenkeeper badge"
This reverts commit 41220a7a975f41e7fd7e54137618b73b5afb0c91.
| Markdown | mit | patkub/rmc1891-site,patkub/rmc1891-site,patkub/rmc1891-site,patkub/rmc1891-site | markdown | ## Code Before:
[](https://greenkeeper.io/)
Built with [Polymer 2](https://www.polymer-project.org/) and [Bootstrap 4](http://getbootstrap.com/)
[Polymer 2](https://www.polymer-project.org/) is a JavaScript library that helps you create custom reusable HTML elements, and use them to build performant, maintainable apps.
[Bootstrap 4](http://getbootstrap.com/) is the most popular HTML, CSS, and JS framework for developing responsive, mobile first projects on the web.
### Install:
1) Install [Git](https://git-scm.com/downloads).
2) Install [Node.js](https://nodejs.org/en/).
3) Install Bower.
```sh
npm install -g bower
```
4) Install Polymer CLI.
```sh
npm install -g polymer-cli
```
### Fetch dependencies:
```sh
npm install
bower update
```
### Build:
Build the site
```sh
npm run build
```
Start a webserver
```sh
npm run serve
```
## Instruction:
Revert "docs(readme): add Greenkeeper badge"
This reverts commit 41220a7a975f41e7fd7e54137618b73b5afb0c91.
## Code After:
Built with [Polymer 2](https://www.polymer-project.org/) and [Bootstrap 4](http://getbootstrap.com/)
[Polymer 2](https://www.polymer-project.org/) is a JavaScript library that helps you create custom reusable HTML elements, and use them to build performant, maintainable apps.
[Bootstrap 4](http://getbootstrap.com/) is the most popular HTML, CSS, and JS framework for developing responsive, mobile first projects on the web.
### Install:
1) Install [Git](https://git-scm.com/downloads).
2) Install [Node.js](https://nodejs.org/en/).
3) Install Bower.
```sh
npm install -g bower
```
4) Install Polymer CLI.
```sh
npm install -g polymer-cli
```
### Fetch dependencies:
```sh
npm install
bower update
```
### Build:
Build the site
```sh
npm run build
```
Start a webserver
```sh
npm run serve
```
| -
- [](https://greenkeeper.io/)
Built with [Polymer 2](https://www.polymer-project.org/) and [Bootstrap 4](http://getbootstrap.com/)
[Polymer 2](https://www.polymer-project.org/) is a JavaScript library that helps you create custom reusable HTML elements, and use them to build performant, maintainable apps.
[Bootstrap 4](http://getbootstrap.com/) is the most popular HTML, CSS, and JS framework for developing responsive, mobile first projects on the web.
### Install:
1) Install [Git](https://git-scm.com/downloads).
2) Install [Node.js](https://nodejs.org/en/).
3) Install Bower.
```sh
npm install -g bower
```
4) Install Polymer CLI.
```sh
npm install -g polymer-cli
```
### Fetch dependencies:
```sh
npm install
bower update
```
### Build:
Build the site
```sh
npm run build
```
Start a webserver
```sh
npm run serve
``` | 2 | 0.045455 | 0 | 2 |
02344b3f9d98a81f907b52c7c1931723fce52685 | packages/ff/ffunctor.yaml | packages/ff/ffunctor.yaml | homepage: ''
changelog-type: ''
hash: 05a07139e274c4865d8f7ef457a3ae591fd2c6d9150eb5c98ffd3a1a33958fa6
test-bench-deps: {}
maintainer: Sam Halliday
synopsis: FFunctor typeclass
changelog: ''
basic-deps:
base: ^>=4.11.1.0 || ^>=4.12.0.0
all-versions:
- 1.0.0
author: Sam Halliday
latest: 1.0.0
description-type: haddock
description: |-
Micro library with a Higher kinded Functor in the spirit of HFunctor,
MFunctor and MonadTrans.
Useful to map over the type parameter in a record of
functions, e.g. https://www.benjamin.pizza/posts/2017-12-15-functor-functors.html
license-name: BSD-3-Clause
| homepage: ''
changelog-type: ''
hash: b1c6d7833a00bbe913f816b81320cdf9485de6b0878eebb67ef72842acd3f457
test-bench-deps:
http-client: ^>=0.5.12
base: ^>=4.11.1.0 || ^>=4.12.0.0
time: ^>=1.8.0.2
servant-client: ^>=0.14
composition: ^>=1.0.2.1
tasty-hspec: ^>=1.1.5
servant: ^>=0.14.1
tasty-quickcheck: ^>=0.10
mtl: ^>=2.2.2
tasty: ^>=1.2.1
aeson: ^>=1.4.1.0
ffunctor: -any
maintainer: Sam Halliday
synopsis: FFunctor typeclass
changelog: ''
basic-deps:
base: ^>=4.11.1.0 || ^>=4.12.0.0
all-versions:
- 1.0.0
- 1.1.0
author: Sam Halliday
latest: 1.1.0
description-type: haddock
description: |-
Micro library with a Higher kinded Functor in the spirit of HFunctor,
MFunctor and MonadTrans.
Useful to map over the type parameter in a record of
functions, e.g. https://www.benjamin.pizza/posts/2017-12-15-functor-functors.html
license-name: BSD-3-Clause
| Update from Hackage at 2019-02-23T16:33:06Z | Update from Hackage at 2019-02-23T16:33:06Z
| YAML | mit | commercialhaskell/all-cabal-metadata | yaml | ## Code Before:
homepage: ''
changelog-type: ''
hash: 05a07139e274c4865d8f7ef457a3ae591fd2c6d9150eb5c98ffd3a1a33958fa6
test-bench-deps: {}
maintainer: Sam Halliday
synopsis: FFunctor typeclass
changelog: ''
basic-deps:
base: ^>=4.11.1.0 || ^>=4.12.0.0
all-versions:
- 1.0.0
author: Sam Halliday
latest: 1.0.0
description-type: haddock
description: |-
Micro library with a Higher kinded Functor in the spirit of HFunctor,
MFunctor and MonadTrans.
Useful to map over the type parameter in a record of
functions, e.g. https://www.benjamin.pizza/posts/2017-12-15-functor-functors.html
license-name: BSD-3-Clause
## Instruction:
Update from Hackage at 2019-02-23T16:33:06Z
## Code After:
homepage: ''
changelog-type: ''
hash: b1c6d7833a00bbe913f816b81320cdf9485de6b0878eebb67ef72842acd3f457
test-bench-deps:
http-client: ^>=0.5.12
base: ^>=4.11.1.0 || ^>=4.12.0.0
time: ^>=1.8.0.2
servant-client: ^>=0.14
composition: ^>=1.0.2.1
tasty-hspec: ^>=1.1.5
servant: ^>=0.14.1
tasty-quickcheck: ^>=0.10
mtl: ^>=2.2.2
tasty: ^>=1.2.1
aeson: ^>=1.4.1.0
ffunctor: -any
maintainer: Sam Halliday
synopsis: FFunctor typeclass
changelog: ''
basic-deps:
base: ^>=4.11.1.0 || ^>=4.12.0.0
all-versions:
- 1.0.0
- 1.1.0
author: Sam Halliday
latest: 1.1.0
description-type: haddock
description: |-
Micro library with a Higher kinded Functor in the spirit of HFunctor,
MFunctor and MonadTrans.
Useful to map over the type parameter in a record of
functions, e.g. https://www.benjamin.pizza/posts/2017-12-15-functor-functors.html
license-name: BSD-3-Clause
| homepage: ''
changelog-type: ''
- hash: 05a07139e274c4865d8f7ef457a3ae591fd2c6d9150eb5c98ffd3a1a33958fa6
+ hash: b1c6d7833a00bbe913f816b81320cdf9485de6b0878eebb67ef72842acd3f457
- test-bench-deps: {}
? ---
+ test-bench-deps:
+ http-client: ^>=0.5.12
+ base: ^>=4.11.1.0 || ^>=4.12.0.0
+ time: ^>=1.8.0.2
+ servant-client: ^>=0.14
+ composition: ^>=1.0.2.1
+ tasty-hspec: ^>=1.1.5
+ servant: ^>=0.14.1
+ tasty-quickcheck: ^>=0.10
+ mtl: ^>=2.2.2
+ tasty: ^>=1.2.1
+ aeson: ^>=1.4.1.0
+ ffunctor: -any
maintainer: Sam Halliday
synopsis: FFunctor typeclass
changelog: ''
basic-deps:
base: ^>=4.11.1.0 || ^>=4.12.0.0
all-versions:
- 1.0.0
+ - 1.1.0
author: Sam Halliday
- latest: 1.0.0
? ^
+ latest: 1.1.0
? ^
description-type: haddock
description: |-
Micro library with a Higher kinded Functor in the spirit of HFunctor,
MFunctor and MonadTrans.
Useful to map over the type parameter in a record of
functions, e.g. https://www.benjamin.pizza/posts/2017-12-15-functor-functors.html
license-name: BSD-3-Clause | 19 | 0.904762 | 16 | 3 |
fda51ca4190bacba481286be145b4776cb476484 | lib/inline/dtrace_probes.rb | lib/inline/dtrace_probes.rb | require 'inline'
# Monkeypatch Inline::C to override MAGIC_ARITY
# (we happen to want -2, it does -1 only)
module Inline
class C
MAGIC_ARITY = -2
end
end
module Inline
class DtraceProbes < Inline::C
def set_module_name(name)
@module_name = name
end
end
end
| require 'inline'
# Monkeypatch Inline::C to override MAGIC_ARITY
# (we happen to want -2, it does -1 only)
module Inline
class C
MAGIC_ARITY = -2
end
end
module Inline
class DtraceProbes < Inline::C
# Overriding to fix the @rb_file breakage: For some reason the
# stock RubyInline leaves the line number on the filename, then it
# crashes trying to File.mtime it.
def rb_file
@rb_file.split(/:/)[0]
end
# Allow the module name to be set - normally you don't care,
# but we do here because it shows up in the probe name.
def set_module_name(name)
@module_name = name
end
end
end
| Add an override to fix the RubyInline breakage that means it crashes if the bundle has already been built. | Add an override to fix the RubyInline breakage that means it crashes
if the bundle has already been built.
git-svn-id: 40196796c19c0e7557af02d93710b150381d7241@97 f5dbc166-08e2-44d3-850c-36126807790f
| Ruby | mit | chrisa/ruby-dtrace,chrisa/ruby-dtrace | ruby | ## Code Before:
require 'inline'
# Monkeypatch Inline::C to override MAGIC_ARITY
# (we happen to want -2, it does -1 only)
module Inline
class C
MAGIC_ARITY = -2
end
end
module Inline
class DtraceProbes < Inline::C
def set_module_name(name)
@module_name = name
end
end
end
## Instruction:
Add an override to fix the RubyInline breakage that means it crashes
if the bundle has already been built.
git-svn-id: 40196796c19c0e7557af02d93710b150381d7241@97 f5dbc166-08e2-44d3-850c-36126807790f
## Code After:
require 'inline'
# Monkeypatch Inline::C to override MAGIC_ARITY
# (we happen to want -2, it does -1 only)
module Inline
class C
MAGIC_ARITY = -2
end
end
module Inline
class DtraceProbes < Inline::C
# Overriding to fix the @rb_file breakage: For some reason the
# stock RubyInline leaves the line number on the filename, then it
# crashes trying to File.mtime it.
def rb_file
@rb_file.split(/:/)[0]
end
# Allow the module name to be set - normally you don't care,
# but we do here because it shows up in the probe name.
def set_module_name(name)
@module_name = name
end
end
end
| require 'inline'
# Monkeypatch Inline::C to override MAGIC_ARITY
# (we happen to want -2, it does -1 only)
module Inline
class C
MAGIC_ARITY = -2
end
end
module Inline
class DtraceProbes < Inline::C
+
+ # Overriding to fix the @rb_file breakage: For some reason the
+ # stock RubyInline leaves the line number on the filename, then it
+ # crashes trying to File.mtime it.
+ def rb_file
+ @rb_file.split(/:/)[0]
+ end
+
+ # Allow the module name to be set - normally you don't care,
+ # but we do here because it shows up in the probe name.
def set_module_name(name)
@module_name = name
end
end
end | 10 | 0.588235 | 10 | 0 |
77a6abfe4739894d353d7785f12e9c99f33b1b13 | metadata/com.utazukin.ichaival.yml | metadata/com.utazukin.ichaival.yml | Categories:
- Multimedia
- Reading
License: GPL-3.0-or-later
AuthorName: Utazukin
SourceCode: https://github.com/Utazukin/Ichaival
IssueTracker: https://github.com/Utazukin/Ichaival/issues
Changelog: https://github.com/Utazukin/Ichaival/releases
AutoName: Ichaival
Description: |-
Features
* View and search your LANraragi database
* View tags
* Read archives
* Bookmark archives to keep track of your current page
RepoType: git
Repo: https://github.com/Utazukin/Ichaival
Builds:
- versionName: 0.4.0
versionCode: 7
commit: v0.4.0
subdir: app
gradle:
- yes
AutoUpdateMode: Version v%v
UpdateCheckMode: Tags
CurrentVersion: 0.4.0
CurrentVersionCode: 7
| Categories:
- Multimedia
- Reading
License: GPL-3.0-or-later
AuthorName: Utazukin
SourceCode: https://github.com/Utazukin/Ichaival
IssueTracker: https://github.com/Utazukin/Ichaival/issues
Changelog: https://github.com/Utazukin/Ichaival/releases
AutoName: Ichaival
Description: |-
Features
* View and search your LANraragi database
* View tags
* Read archives
* Bookmark archives to keep track of your current page
RepoType: git
Repo: https://github.com/Utazukin/Ichaival
Builds:
- versionName: 0.4.0
versionCode: 7
commit: v0.4.0
subdir: app
gradle:
- yes
- versionName: 0.4.5
versionCode: 8
commit: v0.4.5
subdir: app
gradle:
- yes
AutoUpdateMode: Version v%v
UpdateCheckMode: Tags
CurrentVersion: 0.4.5
CurrentVersionCode: 8
| Update Ichaival to 0.4.5 (8) | Update Ichaival to 0.4.5 (8)
| YAML | agpl-3.0 | f-droid/fdroiddata,f-droid/fdroiddata | yaml | ## Code Before:
Categories:
- Multimedia
- Reading
License: GPL-3.0-or-later
AuthorName: Utazukin
SourceCode: https://github.com/Utazukin/Ichaival
IssueTracker: https://github.com/Utazukin/Ichaival/issues
Changelog: https://github.com/Utazukin/Ichaival/releases
AutoName: Ichaival
Description: |-
Features
* View and search your LANraragi database
* View tags
* Read archives
* Bookmark archives to keep track of your current page
RepoType: git
Repo: https://github.com/Utazukin/Ichaival
Builds:
- versionName: 0.4.0
versionCode: 7
commit: v0.4.0
subdir: app
gradle:
- yes
AutoUpdateMode: Version v%v
UpdateCheckMode: Tags
CurrentVersion: 0.4.0
CurrentVersionCode: 7
## Instruction:
Update Ichaival to 0.4.5 (8)
## Code After:
Categories:
- Multimedia
- Reading
License: GPL-3.0-or-later
AuthorName: Utazukin
SourceCode: https://github.com/Utazukin/Ichaival
IssueTracker: https://github.com/Utazukin/Ichaival/issues
Changelog: https://github.com/Utazukin/Ichaival/releases
AutoName: Ichaival
Description: |-
Features
* View and search your LANraragi database
* View tags
* Read archives
* Bookmark archives to keep track of your current page
RepoType: git
Repo: https://github.com/Utazukin/Ichaival
Builds:
- versionName: 0.4.0
versionCode: 7
commit: v0.4.0
subdir: app
gradle:
- yes
- versionName: 0.4.5
versionCode: 8
commit: v0.4.5
subdir: app
gradle:
- yes
AutoUpdateMode: Version v%v
UpdateCheckMode: Tags
CurrentVersion: 0.4.5
CurrentVersionCode: 8
| Categories:
- Multimedia
- Reading
License: GPL-3.0-or-later
AuthorName: Utazukin
SourceCode: https://github.com/Utazukin/Ichaival
IssueTracker: https://github.com/Utazukin/Ichaival/issues
Changelog: https://github.com/Utazukin/Ichaival/releases
AutoName: Ichaival
Description: |-
Features
* View and search your LANraragi database
* View tags
* Read archives
* Bookmark archives to keep track of your current page
RepoType: git
Repo: https://github.com/Utazukin/Ichaival
Builds:
- versionName: 0.4.0
versionCode: 7
commit: v0.4.0
subdir: app
gradle:
- yes
+ - versionName: 0.4.5
+ versionCode: 8
+ commit: v0.4.5
+ subdir: app
+ gradle:
+ - yes
+
AutoUpdateMode: Version v%v
UpdateCheckMode: Tags
- CurrentVersion: 0.4.0
? ^
+ CurrentVersion: 0.4.5
? ^
- CurrentVersionCode: 7
? ^
+ CurrentVersionCode: 8
? ^
| 11 | 0.333333 | 9 | 2 |
84816dda37d071e521f65449ee59c992b5e302bc | megaprojects/blog/models.py | megaprojects/blog/models.py | from django.core.urlresolvers import reverse
from django.db import models
from django.utils import timezone
from core.models import AuthorModel, ImageModel
from .managers import PostManager, ImageManager
import util
STATUS_CHOICES = [('d', 'Draft'), ('p', 'Published'), ('w', 'Withdrawn')]
class Post(AuthorModel):
pubdate = models.DateTimeField('publication date', default=timezone.now())
status = models.CharField(max_length=1, choices=STATUS_CHOICES)
body = models.TextField()
drupal_id = models.IntegerField('drupal NID', unique=True, blank=True,
null=True, help_text='Node ID from the previous Drupal website (imported).')
objects = PostManager()
class Meta:
ordering = ['-pubdate']
class Image(ImageModel):
image = models.ImageField(upload_to=util.get_image_path)
post = models.ForeignKey(Post)
objects = ImageManager()
class Meta:
ordering = ['-post__pubdate', '-created']
| from django.core.urlresolvers import reverse
from django.db import models
from django.utils import timezone
from core.models import AuthorModel, ImageModel
from .managers import PostManager, ImageManager
import util
STATUS_CHOICES = [('d', 'Draft'), ('p', 'Published'), ('w', 'Withdrawn')]
class Post(AuthorModel):
pubdate = models.DateTimeField('publication date', default=timezone.now())
status = models.CharField(max_length=1, choices=STATUS_CHOICES)
body = models.TextField()
drupal_id = models.IntegerField('drupal NID', unique=True, blank=True,
null=True, help_text='Node ID from the previous Drupal website (imported).')
objects = PostManager()
@property
def thumbnail(self):
if self.image_set.published():
return self.image_set.published()[:1].get()
class Meta:
ordering = ['-pubdate']
class Image(ImageModel):
image = models.ImageField(upload_to=util.get_image_path)
post = models.ForeignKey(Post)
objects = ImageManager()
class Meta:
ordering = ['-post__pubdate', '-created']
| Add property for Post thumbnail | Add property for Post thumbnail
| Python | apache-2.0 | megaprojectske/megaprojects.co.ke,megaprojectske/megaprojects.co.ke,megaprojectske/megaprojects.co.ke | python | ## Code Before:
from django.core.urlresolvers import reverse
from django.db import models
from django.utils import timezone
from core.models import AuthorModel, ImageModel
from .managers import PostManager, ImageManager
import util
STATUS_CHOICES = [('d', 'Draft'), ('p', 'Published'), ('w', 'Withdrawn')]
class Post(AuthorModel):
pubdate = models.DateTimeField('publication date', default=timezone.now())
status = models.CharField(max_length=1, choices=STATUS_CHOICES)
body = models.TextField()
drupal_id = models.IntegerField('drupal NID', unique=True, blank=True,
null=True, help_text='Node ID from the previous Drupal website (imported).')
objects = PostManager()
class Meta:
ordering = ['-pubdate']
class Image(ImageModel):
image = models.ImageField(upload_to=util.get_image_path)
post = models.ForeignKey(Post)
objects = ImageManager()
class Meta:
ordering = ['-post__pubdate', '-created']
## Instruction:
Add property for Post thumbnail
## Code After:
from django.core.urlresolvers import reverse
from django.db import models
from django.utils import timezone
from core.models import AuthorModel, ImageModel
from .managers import PostManager, ImageManager
import util
STATUS_CHOICES = [('d', 'Draft'), ('p', 'Published'), ('w', 'Withdrawn')]
class Post(AuthorModel):
pubdate = models.DateTimeField('publication date', default=timezone.now())
status = models.CharField(max_length=1, choices=STATUS_CHOICES)
body = models.TextField()
drupal_id = models.IntegerField('drupal NID', unique=True, blank=True,
null=True, help_text='Node ID from the previous Drupal website (imported).')
objects = PostManager()
@property
def thumbnail(self):
if self.image_set.published():
return self.image_set.published()[:1].get()
class Meta:
ordering = ['-pubdate']
class Image(ImageModel):
image = models.ImageField(upload_to=util.get_image_path)
post = models.ForeignKey(Post)
objects = ImageManager()
class Meta:
ordering = ['-post__pubdate', '-created']
| from django.core.urlresolvers import reverse
from django.db import models
from django.utils import timezone
from core.models import AuthorModel, ImageModel
from .managers import PostManager, ImageManager
import util
STATUS_CHOICES = [('d', 'Draft'), ('p', 'Published'), ('w', 'Withdrawn')]
class Post(AuthorModel):
pubdate = models.DateTimeField('publication date', default=timezone.now())
status = models.CharField(max_length=1, choices=STATUS_CHOICES)
body = models.TextField()
drupal_id = models.IntegerField('drupal NID', unique=True, blank=True,
null=True, help_text='Node ID from the previous Drupal website (imported).')
objects = PostManager()
+ @property
+ def thumbnail(self):
+ if self.image_set.published():
+ return self.image_set.published()[:1].get()
+
class Meta:
ordering = ['-pubdate']
class Image(ImageModel):
image = models.ImageField(upload_to=util.get_image_path)
post = models.ForeignKey(Post)
objects = ImageManager()
class Meta:
ordering = ['-post__pubdate', '-created'] | 5 | 0.135135 | 5 | 0 |
8257f608e3f5f0ddb17816c3da7aacf4c00805b4 | installdotfiles.sh | installdotfiles.sh |
DOTFILESDIRREL=$(dirname $0)/dotfiles
cd $DOTFILESDIRREL
DOTFILESDIR=$(pwd -P)
for DOTFILE in *; do
rm -iv "$HOME/.$DOTFILE"
if [[ $TERM != "cygwin" ]]
then
ln -sv "$DOTFILESDIR/$DOTFILE" "$HOME/.$DOTFILE"
else
cp -v "$DOTFILESDIR/$DOTFILE" "$HOME/.$DOTFILE"
fi
done
|
DOTFILESDIRREL=$(dirname $0)/dotfiles
cd $DOTFILESDIRREL
DOTFILESDIR=$(pwd -P)
for DOTFILE in *; do
if [[ $(uname -s) != MINGW* ]]
then
rm -iv "$HOME/.$DOTFILE"
ln -sv "$DOTFILESDIR/$DOTFILE" "$HOME/.$DOTFILE"
else
cp -iv "$DOTFILESDIR/$DOTFILE" "$HOME/.$DOTFILE"
fi
done
| Improve install dotfiles on mingw. | Improve install dotfiles on mingw.
| Shell | mit | mikemcquaid/scripts,mikemcquaid/scripts | shell | ## Code Before:
DOTFILESDIRREL=$(dirname $0)/dotfiles
cd $DOTFILESDIRREL
DOTFILESDIR=$(pwd -P)
for DOTFILE in *; do
rm -iv "$HOME/.$DOTFILE"
if [[ $TERM != "cygwin" ]]
then
ln -sv "$DOTFILESDIR/$DOTFILE" "$HOME/.$DOTFILE"
else
cp -v "$DOTFILESDIR/$DOTFILE" "$HOME/.$DOTFILE"
fi
done
## Instruction:
Improve install dotfiles on mingw.
## Code After:
DOTFILESDIRREL=$(dirname $0)/dotfiles
cd $DOTFILESDIRREL
DOTFILESDIR=$(pwd -P)
for DOTFILE in *; do
if [[ $(uname -s) != MINGW* ]]
then
rm -iv "$HOME/.$DOTFILE"
ln -sv "$DOTFILESDIR/$DOTFILE" "$HOME/.$DOTFILE"
else
cp -iv "$DOTFILESDIR/$DOTFILE" "$HOME/.$DOTFILE"
fi
done
|
DOTFILESDIRREL=$(dirname $0)/dotfiles
cd $DOTFILESDIRREL
DOTFILESDIR=$(pwd -P)
for DOTFILE in *; do
+ if [[ $(uname -s) != MINGW* ]]
- rm -iv "$HOME/.$DOTFILE"
- if [[ $TERM != "cygwin" ]]
then
+ rm -iv "$HOME/.$DOTFILE"
ln -sv "$DOTFILESDIR/$DOTFILE" "$HOME/.$DOTFILE"
else
- cp -v "$DOTFILESDIR/$DOTFILE" "$HOME/.$DOTFILE"
+ cp -iv "$DOTFILESDIR/$DOTFILE" "$HOME/.$DOTFILE"
? +
fi
done | 6 | 0.461538 | 3 | 3 |
0527ad9fd91faf04f7fffe0eff8949ef69c6fb3f | README.md | README.md | CERN-Video-Downloader
=====================
A small program to download video from CERN Document Server
Do you think CERN has an excellent video resources? Do you want to watch those video when you are not at CERN?
Well, I just have an extremely slow access to CERN Document Server at home. This program is then written to help me download video from CDS via high-speed connection at CERN or near CERN.
| CERN-Video-Downloader
=====================
A small program to download video from CERN Document Server
Do you think CERN has an excellent video resources? Do you want to watch those video when you are not at CERN?
Well, I just have an extremely slow access to CERN Document Server at home. This program is then written to help me download video from CDS via high-speed connection at CERN or near CERN.
To get start, you can read **User Guide** first:
Chinese Simplified Version: [README - UserGuide(Chinese Simplified)](README - UserGuide(Chinese Simplified))
| Add some information about how to find User Guide | Add some information about how to find User Guide | Markdown | mit | George-Gate/CERN-Video-Downloader,George-Gate/CERN-Video-Downloader | markdown | ## Code Before:
CERN-Video-Downloader
=====================
A small program to download video from CERN Document Server
Do you think CERN has an excellent video resources? Do you want to watch those video when you are not at CERN?
Well, I just have an extremely slow access to CERN Document Server at home. This program is then written to help me download video from CDS via high-speed connection at CERN or near CERN.
## Instruction:
Add some information about how to find User Guide
## Code After:
CERN-Video-Downloader
=====================
A small program to download video from CERN Document Server
Do you think CERN has an excellent video resources? Do you want to watch those video when you are not at CERN?
Well, I just have an extremely slow access to CERN Document Server at home. This program is then written to help me download video from CDS via high-speed connection at CERN or near CERN.
To get start, you can read **User Guide** first:
Chinese Simplified Version: [README - UserGuide(Chinese Simplified)](README - UserGuide(Chinese Simplified))
| CERN-Video-Downloader
=====================
A small program to download video from CERN Document Server
Do you think CERN has an excellent video resources? Do you want to watch those video when you are not at CERN?
Well, I just have an extremely slow access to CERN Document Server at home. This program is then written to help me download video from CDS via high-speed connection at CERN or near CERN.
+
+ To get start, you can read **User Guide** first:
+ Chinese Simplified Version: [README - UserGuide(Chinese Simplified)](README - UserGuide(Chinese Simplified)) | 3 | 0.428571 | 3 | 0 |
e0c81825cb59b3b98dbb16252184114ead2bef6f | build/ci/init.sh | build/ci/init.sh | BASEDIR=$(dirname $0)
cd $BASEDIR
../../node_modules/.bin/http-server -p 8000 &
git clone https://github.com/jupiterjs/canjs.git can
git clone https://github.com/jupiterjs/funcunit.git
cd funcunit
git submodule update --init --recursive
cd ..
git clone https://github.com/jupiterjs/steal.git | BASEDIR=$(dirname $0)
cd $BASEDIR
../../node_modules/.bin/http-server -p 8000 &
git clone ../. can
git clone https://github.com/jupiterjs/funcunit.git
cd funcunit
git submodule update --init --recursive
cd ..
git clone https://github.com/jupiterjs/steal.git | Clone the actual repository, not from github | Clone the actual repository, not from github
| Shell | mit | rjgotten/canjs,azazel75/canjs,shiftplanning/canjs,rasjani/canjs,beno/canjs,patrick-steele-idem/canjs,Psykoral/canjs,scorphus/canjs,thomblake/canjs,yusufsafak/canjs,juristr/canjs,thecountofzero/canjs,tracer99/canjs,bitovi/canjs,schmod/canjs,patrick-steele-idem/canjs,tracer99/canjs,beno/canjs,Psykoral/canjs,jebaird/canjs,beno/canjs,rjgotten/canjs,sporto/canjs,whitecolor/canjs,dispatchrabbi/canjs,rjgotten/canjs,rasjani/canjs,UXsree/canjs,tracer99/canjs,schmod/canjs,whitecolor/canjs,Psykoral/canjs,rjgotten/canjs,bitovi/canjs,thomblake/canjs,bitovi/canjs,rasjani/canjs,asavoy/canjs,gsmeets/canjs,mindscratch/canjs,jebaird/canjs,gsmeets/canjs,cohuman/canjs,mindscratch/canjs,ackl/canjs,whitecolor/canjs,janza/canjs,bitovi/canjs,cohuman/canjs,dimaf/canjs,thecountofzero/canjs,UXsree/canjs,ackl/canjs,yusufsafak/canjs,shiftplanning/canjs,gsmeets/canjs,asavoy/canjs,airhadoken/canjs,cohuman/canjs,dispatchrabbi/canjs,azazel75/canjs,rasjani/canjs,WearyMonkey/canjs,schmod/canjs,sporto/canjs,WearyMonkey/canjs,patrick-steele-idem/canjs,scorphus/canjs,dimaf/canjs,juristr/canjs,janza/canjs,WearyMonkey/canjs,airhadoken/canjs,sporto/canjs,jebaird/canjs,ackl/canjs,Psykoral/canjs | shell | ## Code Before:
BASEDIR=$(dirname $0)
cd $BASEDIR
../../node_modules/.bin/http-server -p 8000 &
git clone https://github.com/jupiterjs/canjs.git can
git clone https://github.com/jupiterjs/funcunit.git
cd funcunit
git submodule update --init --recursive
cd ..
git clone https://github.com/jupiterjs/steal.git
## Instruction:
Clone the actual repository, not from github
## Code After:
BASEDIR=$(dirname $0)
cd $BASEDIR
../../node_modules/.bin/http-server -p 8000 &
git clone ../. can
git clone https://github.com/jupiterjs/funcunit.git
cd funcunit
git submodule update --init --recursive
cd ..
git clone https://github.com/jupiterjs/steal.git | BASEDIR=$(dirname $0)
cd $BASEDIR
../../node_modules/.bin/http-server -p 8000 &
- git clone https://github.com/jupiterjs/canjs.git can
+ git clone ../. can
git clone https://github.com/jupiterjs/funcunit.git
cd funcunit
git submodule update --init --recursive
cd ..
git clone https://github.com/jupiterjs/steal.git | 2 | 0.222222 | 1 | 1 |
098369b33f694becf53fcdd9535c631e3f18a062 | _includes/header.html | _includes/header.html | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>{% if page.title %}{{ page.title }} - {% endif %}{{ site.title}}</title>
{% if page.description %}<meta name="description" content="{{ page.description | strip_html }}">{% endif %}
<link rel="stylesheet" href="//fonts.googleapis.com/css?family=Chivo:900">
<link rel="stylesheet" href="/css/application.css">
<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon">
<!--[if lt IE 9]>
<script src="/js/html5shiv.js"></script>
<![endif]-->
</head>
<body class="{{ page.layout }}{% if page.class %} {{ page.class }}{% endif %}">
<div class="container">
{% include breadcrumbs.html %}
{% if page.title %}
<h1>{{ page.title }}</h1>
{% endif %}
| <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>{% if page.title %}{{ page.title | markdownify | strip_html }} - {% endif %}{{ site.title}}</title>
{% if page.description %}<meta name="description" content="{{ page.description | strip_html }}">{% endif %}
<link rel="stylesheet" href="//fonts.googleapis.com/css?family=Chivo:900">
<link rel="stylesheet" href="/css/application.css">
<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon">
<!--[if lt IE 9]>
<script src="/js/html5shiv.js"></script>
<![endif]-->
</head>
<body class="{{ page.layout }}{% if page.class %} {{ page.class }}{% endif %}">
<div class="container">
{% include breadcrumbs.html %}
{% if page.title %}
<h1>{{ page.title | markdownify | strip_html }}</h1>
{% endif %}
| Make sure titles are in smarty pants | Make sure titles are in smarty pants
| HTML | mit | drewwyatt/choosealicense.com,gorcz/choosealicense.com,n7s/choosealicense.com,derekjones/choosealicense.com,mickaelandrieu/choisirunelicence,christianbundy/choosealicense.com,JTechMe/choosealicense.com,gorcz/choosealicense.com,shalomb/choosealicense.com,liks79/choosealicense.com,christianbundy/choosealicense.com,eogas/choosealicense.com,matt40k/choosealicense.com,waldyrious/choosealicense.com,github/choosealicense.com,julianromera/choosealicense.com,liks79/choosealicense.com,eogas/choosealicense.com,matt40k/choosealicense.com,eogas/choosealicense.com,github/choosealicense.com,sieversMartin/choosealicense.com,cirosantilli/choosealicense.com,julianromera/choosealicense.com,mickaelandrieu/choisirunelicence,JTechMe/choosealicense.com,sieversMartin/choosealicense.com,julianromera/choosealicense.com,shalomb/choosealicense.com,drewwyatt/choosealicense.com,n7s/choosealicense.com,cirosantilli/choosealicense.com,waldyrious/choosealicense.com,waldyrious/choosealicense.com,gorcz/choosealicense.com,derekjones/choosealicense.com,JTechMe/choosealicense.com,sieversMartin/choosealicense.com,mickaelandrieu/choisirunelicence,matt40k/choosealicense.com,christianbundy/choosealicense.com,drewwyatt/choosealicense.com,n7s/choosealicense.com,shalomb/choosealicense.com,github/choosealicense.com,derekjones/choosealicense.com,cirosantilli/choosealicense.com | html | ## Code Before:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>{% if page.title %}{{ page.title }} - {% endif %}{{ site.title}}</title>
{% if page.description %}<meta name="description" content="{{ page.description | strip_html }}">{% endif %}
<link rel="stylesheet" href="//fonts.googleapis.com/css?family=Chivo:900">
<link rel="stylesheet" href="/css/application.css">
<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon">
<!--[if lt IE 9]>
<script src="/js/html5shiv.js"></script>
<![endif]-->
</head>
<body class="{{ page.layout }}{% if page.class %} {{ page.class }}{% endif %}">
<div class="container">
{% include breadcrumbs.html %}
{% if page.title %}
<h1>{{ page.title }}</h1>
{% endif %}
## Instruction:
Make sure titles are in smarty pants
## Code After:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>{% if page.title %}{{ page.title | markdownify | strip_html }} - {% endif %}{{ site.title}}</title>
{% if page.description %}<meta name="description" content="{{ page.description | strip_html }}">{% endif %}
<link rel="stylesheet" href="//fonts.googleapis.com/css?family=Chivo:900">
<link rel="stylesheet" href="/css/application.css">
<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon">
<!--[if lt IE 9]>
<script src="/js/html5shiv.js"></script>
<![endif]-->
</head>
<body class="{{ page.layout }}{% if page.class %} {{ page.class }}{% endif %}">
<div class="container">
{% include breadcrumbs.html %}
{% if page.title %}
<h1>{{ page.title | markdownify | strip_html }}</h1>
{% endif %}
| <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
- <title>{% if page.title %}{{ page.title }} - {% endif %}{{ site.title}}</title>
+ <title>{% if page.title %}{{ page.title | markdownify | strip_html }} - {% endif %}{{ site.title}}</title>
? +++++++++++++++++++++++++++
{% if page.description %}<meta name="description" content="{{ page.description | strip_html }}">{% endif %}
<link rel="stylesheet" href="//fonts.googleapis.com/css?family=Chivo:900">
<link rel="stylesheet" href="/css/application.css">
<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon">
<!--[if lt IE 9]>
<script src="/js/html5shiv.js"></script>
<![endif]-->
</head>
<body class="{{ page.layout }}{% if page.class %} {{ page.class }}{% endif %}">
<div class="container">
{% include breadcrumbs.html %}
{% if page.title %}
- <h1>{{ page.title }}</h1>
+ <h1>{{ page.title | markdownify | strip_html }}</h1>
{% endif %} | 4 | 0.181818 | 2 | 2 |
bea3c327af8c032d91a9b3603ba76a04edb0627a | test/test.cpp | test/test.cpp |
int main()
{
Test::TestSuite tests(std::cout);
{ // Job
std::shared_ptr<Test::Test> jt1(new Test::JobID);
tests.register_test(jt1);
std::shared_ptr<Test::Test> jt2(new Test::JobMachineName);
tests.register_test(jt2);
std::shared_ptr<Test::Test> jt3(new Test::JobDefaultState);
tests.register_test(jt3);
}
{ // Machine
std::shared_ptr<Test::Test> mt1(new Test::MachineName);
tests.register_test(mt1);
std::shared_ptr<Test::Test> mt2(new Test::MachineAddJob);
tests.register_test(mt2);
}
{ // Pool
}
bool all_ok = tests.run_all();
if (all_ok)
return 0;
else
return 1;
}
|
int main()
{
Test::TestSuite tests(std::cout);
// Set up tests - class Job
tests.register_test(std::make_shared<Test::JobID>());
tests.register_test(std::make_shared<Test::JobMachineName>());
tests.register_test(std::make_shared<Test::JobDefaultState>());
// Set up tests - class Machine
tests.register_test(std::make_shared<Test::MachineName>());
tests.register_test(std::make_shared<Test::MachineAddJob>());
// Set up tests - class Pool
// Run the tests
bool all_ok = tests.run_all();
if (all_ok)
return 0;
else
return 1;
}
| Convert to std::make_shared() to avoid allocation overhead | Convert to std::make_shared() to avoid allocation overhead
This also tidies up the code in main() in a way that doesn't make it
susceptible to memory leaks.
| C++ | mit | mattportas/yejong | c++ | ## Code Before:
int main()
{
Test::TestSuite tests(std::cout);
{ // Job
std::shared_ptr<Test::Test> jt1(new Test::JobID);
tests.register_test(jt1);
std::shared_ptr<Test::Test> jt2(new Test::JobMachineName);
tests.register_test(jt2);
std::shared_ptr<Test::Test> jt3(new Test::JobDefaultState);
tests.register_test(jt3);
}
{ // Machine
std::shared_ptr<Test::Test> mt1(new Test::MachineName);
tests.register_test(mt1);
std::shared_ptr<Test::Test> mt2(new Test::MachineAddJob);
tests.register_test(mt2);
}
{ // Pool
}
bool all_ok = tests.run_all();
if (all_ok)
return 0;
else
return 1;
}
## Instruction:
Convert to std::make_shared() to avoid allocation overhead
This also tidies up the code in main() in a way that doesn't make it
susceptible to memory leaks.
## Code After:
int main()
{
Test::TestSuite tests(std::cout);
// Set up tests - class Job
tests.register_test(std::make_shared<Test::JobID>());
tests.register_test(std::make_shared<Test::JobMachineName>());
tests.register_test(std::make_shared<Test::JobDefaultState>());
// Set up tests - class Machine
tests.register_test(std::make_shared<Test::MachineName>());
tests.register_test(std::make_shared<Test::MachineAddJob>());
// Set up tests - class Pool
// Run the tests
bool all_ok = tests.run_all();
if (all_ok)
return 0;
else
return 1;
}
|
int main()
{
Test::TestSuite tests(std::cout);
+ // Set up tests - class Job
+ tests.register_test(std::make_shared<Test::JobID>());
+ tests.register_test(std::make_shared<Test::JobMachineName>());
+ tests.register_test(std::make_shared<Test::JobDefaultState>());
- { // Job
- std::shared_ptr<Test::Test> jt1(new Test::JobID);
- tests.register_test(jt1);
- std::shared_ptr<Test::Test> jt2(new Test::JobMachineName);
- tests.register_test(jt2);
- std::shared_ptr<Test::Test> jt3(new Test::JobDefaultState);
- tests.register_test(jt3);
- }
+ // Set up tests - class Machine
+ tests.register_test(std::make_shared<Test::MachineName>());
+ tests.register_test(std::make_shared<Test::MachineAddJob>());
- { // Machine
- std::shared_ptr<Test::Test> mt1(new Test::MachineName);
- tests.register_test(mt1);
- std::shared_ptr<Test::Test> mt2(new Test::MachineAddJob);
- tests.register_test(mt2);
- }
- { // Pool
+ // Set up tests - class Pool
- }
? -
+
-
+ // Run the tests
bool all_ok = tests.run_all();
if (all_ok)
return 0;
else
return 1;
} | 27 | 0.9 | 10 | 17 |
712449006273f319e97304810b113cd28950c2c6 | presence_server.js | presence_server.js | PRESENCE_TIMEOUT_MS = 10000;
PRESENCE_INTERVAL = 1000;
// a method to indicate that the user is still online
Meteor.methods({
setPresence: function(sessionId, state) {
// console.log(sessionId, state);
// we use the sessionId to tell if this is a new record or not
var props = {
state: state,
lastSeen: new Date()
};
var userId = _.isUndefined(Meteor.userId) ? null : Meteor.userId();
if (sessionId && Meteor.presences.findOne(sessionId)) {
var update = {$set: props};
// need to unset userId if it's not defined as they may have just logged out
if (userId) {
update.$set.userId = userId;
} else {
update.$unset = {userId: true};
}
Meteor.presences.update({_id: sessionId}, update);
return sessionId;
} else {
props.userId = userId;
return Meteor.presences.insert(props)
}
}
});
Meteor.setInterval(function() {
var since = new Date(new Date().getTime() - PRESENCE_TIMEOUT_MS);
Meteor.presences.remove({lastSeen: {$lt: since}});
}, PRESENCE_INTERVAL);
| PRESENCE_TIMEOUT_MS = 10000;
PRESENCE_INTERVAL = 1000;
// a method to indicate that the user is still online
Meteor.methods({
setPresence: function(sessionId, state) {
// console.log(sessionId, state);
check(sessionId, String);
check(state, Match.Any);
// we use the sessionId to tell if this is a new record or not
var props = {
state: state,
lastSeen: new Date()
};
var userId = _.isUndefined(Meteor.userId) ? null : Meteor.userId();
if (sessionId && Meteor.presences.findOne(sessionId)) {
var update = {$set: props};
// need to unset userId if it's not defined as they may have just logged out
if (userId) {
update.$set.userId = userId;
} else {
update.$unset = {userId: true};
}
Meteor.presences.update({_id: sessionId}, update);
return sessionId;
} else {
props.userId = userId;
return Meteor.presences.insert(props)
}
}
});
Meteor.setInterval(function() {
var since = new Date(new Date().getTime() - PRESENCE_TIMEOUT_MS);
Meteor.presences.remove({lastSeen: {$lt: since}});
}, PRESENCE_INTERVAL);
| Update method to use Match check for audit-argument-checks compliance. | Update method to use Match check for audit-argument-checks compliance.
If a system is using the presence package and also forcing security checks using the Meteor package (audit-argument-checks)[http://docs.meteor.com/#auditargumentchecks] The security check will fail, throwing errors.
This adds the checks for all parameters of Meteor Methods to satisfy the audit-argument-checks package | JavaScript | mit | tmeasday/meteor-presence | javascript | ## Code Before:
PRESENCE_TIMEOUT_MS = 10000;
PRESENCE_INTERVAL = 1000;
// a method to indicate that the user is still online
Meteor.methods({
setPresence: function(sessionId, state) {
// console.log(sessionId, state);
// we use the sessionId to tell if this is a new record or not
var props = {
state: state,
lastSeen: new Date()
};
var userId = _.isUndefined(Meteor.userId) ? null : Meteor.userId();
if (sessionId && Meteor.presences.findOne(sessionId)) {
var update = {$set: props};
// need to unset userId if it's not defined as they may have just logged out
if (userId) {
update.$set.userId = userId;
} else {
update.$unset = {userId: true};
}
Meteor.presences.update({_id: sessionId}, update);
return sessionId;
} else {
props.userId = userId;
return Meteor.presences.insert(props)
}
}
});
Meteor.setInterval(function() {
var since = new Date(new Date().getTime() - PRESENCE_TIMEOUT_MS);
Meteor.presences.remove({lastSeen: {$lt: since}});
}, PRESENCE_INTERVAL);
## Instruction:
Update method to use Match check for audit-argument-checks compliance.
If a system is using the presence package and also forcing security checks using the Meteor package (audit-argument-checks)[http://docs.meteor.com/#auditargumentchecks] The security check will fail, throwing errors.
This adds the checks for all parameters of Meteor Methods to satisfy the audit-argument-checks package
## Code After:
PRESENCE_TIMEOUT_MS = 10000;
PRESENCE_INTERVAL = 1000;
// a method to indicate that the user is still online
Meteor.methods({
setPresence: function(sessionId, state) {
// console.log(sessionId, state);
check(sessionId, String);
check(state, Match.Any);
// we use the sessionId to tell if this is a new record or not
var props = {
state: state,
lastSeen: new Date()
};
var userId = _.isUndefined(Meteor.userId) ? null : Meteor.userId();
if (sessionId && Meteor.presences.findOne(sessionId)) {
var update = {$set: props};
// need to unset userId if it's not defined as they may have just logged out
if (userId) {
update.$set.userId = userId;
} else {
update.$unset = {userId: true};
}
Meteor.presences.update({_id: sessionId}, update);
return sessionId;
} else {
props.userId = userId;
return Meteor.presences.insert(props)
}
}
});
Meteor.setInterval(function() {
var since = new Date(new Date().getTime() - PRESENCE_TIMEOUT_MS);
Meteor.presences.remove({lastSeen: {$lt: since}});
}, PRESENCE_INTERVAL);
| PRESENCE_TIMEOUT_MS = 10000;
PRESENCE_INTERVAL = 1000;
// a method to indicate that the user is still online
Meteor.methods({
setPresence: function(sessionId, state) {
// console.log(sessionId, state);
+ check(sessionId, String);
+ check(state, Match.Any);
// we use the sessionId to tell if this is a new record or not
var props = {
state: state,
lastSeen: new Date()
};
var userId = _.isUndefined(Meteor.userId) ? null : Meteor.userId();
if (sessionId && Meteor.presences.findOne(sessionId)) {
var update = {$set: props};
// need to unset userId if it's not defined as they may have just logged out
if (userId) {
update.$set.userId = userId;
} else {
update.$unset = {userId: true};
}
Meteor.presences.update({_id: sessionId}, update);
return sessionId;
} else {
props.userId = userId;
return Meteor.presences.insert(props)
}
}
});
Meteor.setInterval(function() {
var since = new Date(new Date().getTime() - PRESENCE_TIMEOUT_MS);
Meteor.presences.remove({lastSeen: {$lt: since}});
}, PRESENCE_INTERVAL); | 2 | 0.051282 | 2 | 0 |
88d34c34c46d4430456fa55fda50992f54f80d59 | test/helper.rb | test/helper.rb | if RUBY_VERSION > '1.9' && ENV["COVERAGE"] == "true"
require 'simplecov'
require 'simplecov-gem-adapter'
SimpleCov.start('gem')
end
require 'test/unit'
require 'redgreen' if RUBY_VERSION < '1.9'
require 'shoulda'
require 'rr'
unless defined?(Test::Unit::AssertionFailedError)
class Test::Unit::AssertionFailedError < ActiveSupport::TestCase::Assertion
end
end
Dir.glob(File.expand_path('../../lib/jekyll/jekyll-import/*', __FILE__)).each do |f|
require f
end
# Send STDERR into the void to suppress program output messages
STDERR.reopen(test(?e, '/dev/null') ? '/dev/null' : 'NUL:')
class Test::Unit::TestCase
include RR::Adapters::TestUnit
def dest_dir(*subdirs)
File.join(File.dirname(__FILE__), 'dest', *subdirs)
end
def source_dir(*subdirs)
File.join(File.dirname(__FILE__), 'source', *subdirs)
end
def clear_dest
FileUtils.rm_rf(dest_dir)
end
def capture_stdout
$old_stdout = $stdout
$stdout = StringIO.new
yield
$stdout.rewind
return $stdout.string
ensure
$stdout = $old_stdout
end
end
| if RUBY_VERSION > '1.9' && ENV["COVERAGE"] == "true"
require 'simplecov'
require 'simplecov-gem-adapter'
SimpleCov.start('gem')
end
require 'test/unit'
require 'redgreen' if RUBY_VERSION < '1.9'
require 'shoulda'
require 'rr'
unless defined?(Test::Unit::AssertionFailedError)
require 'activesupport'
class Test::Unit::AssertionFailedError < ActiveSupport::TestCase::Assertion
end
end
Dir.glob(File.expand_path('../../lib/jekyll/jekyll-import/*', __FILE__)).each do |f|
require f
end
# Send STDERR into the void to suppress program output messages
STDERR.reopen(test(?e, '/dev/null') ? '/dev/null' : 'NUL:')
class Test::Unit::TestCase
include RR::Adapters::TestUnit
def dest_dir(*subdirs)
File.join(File.dirname(__FILE__), 'dest', *subdirs)
end
def source_dir(*subdirs)
File.join(File.dirname(__FILE__), 'source', *subdirs)
end
def clear_dest
FileUtils.rm_rf(dest_dir)
end
def capture_stdout
$old_stdout = $stdout
$stdout = StringIO.new
yield
$stdout.rewind
return $stdout.string
ensure
$stdout = $old_stdout
end
end
| Bring in the big guns. | Bring in the big guns.
| Ruby | mit | gynter/jekyll-import,gynter/jekyll-import,ligthyear/jekyll-import,jekyll/jekyll-import,danbernier/jekyll-import,stefanw/jekyll-import,Teino1978-Corp/jekyll-import,ligthyear/jekyll-import,cityoffortworth/jekyll-import,stefanw/jekyll-import,geerlingguy/jekyll-import,supriyantomaftuh/jekyll-import,supriyantomaftuh/jekyll-import,shybovycha/jekyll-import,cityoffortworth/jekyll-import,geerlingguy/jekyll-import,Teino1978-Corp/jekyll-import,Teino1978-Corp/jekyll-import,geerlingguy/jekyll-import,shybovycha/jekyll-import,jekyll/jekyll-import,gynter/jekyll-import,ligthyear/jekyll-import,stefanw/jekyll-import,danbernier/jekyll-import,supriyantomaftuh/jekyll-import,shybovycha/jekyll-import,danbernier/jekyll-import | ruby | ## Code Before:
if RUBY_VERSION > '1.9' && ENV["COVERAGE"] == "true"
require 'simplecov'
require 'simplecov-gem-adapter'
SimpleCov.start('gem')
end
require 'test/unit'
require 'redgreen' if RUBY_VERSION < '1.9'
require 'shoulda'
require 'rr'
unless defined?(Test::Unit::AssertionFailedError)
class Test::Unit::AssertionFailedError < ActiveSupport::TestCase::Assertion
end
end
Dir.glob(File.expand_path('../../lib/jekyll/jekyll-import/*', __FILE__)).each do |f|
require f
end
# Send STDERR into the void to suppress program output messages
STDERR.reopen(test(?e, '/dev/null') ? '/dev/null' : 'NUL:')
class Test::Unit::TestCase
include RR::Adapters::TestUnit
def dest_dir(*subdirs)
File.join(File.dirname(__FILE__), 'dest', *subdirs)
end
def source_dir(*subdirs)
File.join(File.dirname(__FILE__), 'source', *subdirs)
end
def clear_dest
FileUtils.rm_rf(dest_dir)
end
def capture_stdout
$old_stdout = $stdout
$stdout = StringIO.new
yield
$stdout.rewind
return $stdout.string
ensure
$stdout = $old_stdout
end
end
## Instruction:
Bring in the big guns.
## Code After:
if RUBY_VERSION > '1.9' && ENV["COVERAGE"] == "true"
require 'simplecov'
require 'simplecov-gem-adapter'
SimpleCov.start('gem')
end
require 'test/unit'
require 'redgreen' if RUBY_VERSION < '1.9'
require 'shoulda'
require 'rr'
unless defined?(Test::Unit::AssertionFailedError)
require 'activesupport'
class Test::Unit::AssertionFailedError < ActiveSupport::TestCase::Assertion
end
end
Dir.glob(File.expand_path('../../lib/jekyll/jekyll-import/*', __FILE__)).each do |f|
require f
end
# Send STDERR into the void to suppress program output messages
STDERR.reopen(test(?e, '/dev/null') ? '/dev/null' : 'NUL:')
class Test::Unit::TestCase
include RR::Adapters::TestUnit
def dest_dir(*subdirs)
File.join(File.dirname(__FILE__), 'dest', *subdirs)
end
def source_dir(*subdirs)
File.join(File.dirname(__FILE__), 'source', *subdirs)
end
def clear_dest
FileUtils.rm_rf(dest_dir)
end
def capture_stdout
$old_stdout = $stdout
$stdout = StringIO.new
yield
$stdout.rewind
return $stdout.string
ensure
$stdout = $old_stdout
end
end
| if RUBY_VERSION > '1.9' && ENV["COVERAGE"] == "true"
require 'simplecov'
require 'simplecov-gem-adapter'
SimpleCov.start('gem')
end
require 'test/unit'
require 'redgreen' if RUBY_VERSION < '1.9'
require 'shoulda'
require 'rr'
unless defined?(Test::Unit::AssertionFailedError)
+ require 'activesupport'
class Test::Unit::AssertionFailedError < ActiveSupport::TestCase::Assertion
end
end
Dir.glob(File.expand_path('../../lib/jekyll/jekyll-import/*', __FILE__)).each do |f|
require f
end
# Send STDERR into the void to suppress program output messages
STDERR.reopen(test(?e, '/dev/null') ? '/dev/null' : 'NUL:')
class Test::Unit::TestCase
include RR::Adapters::TestUnit
def dest_dir(*subdirs)
File.join(File.dirname(__FILE__), 'dest', *subdirs)
end
def source_dir(*subdirs)
File.join(File.dirname(__FILE__), 'source', *subdirs)
end
def clear_dest
FileUtils.rm_rf(dest_dir)
end
def capture_stdout
$old_stdout = $stdout
$stdout = StringIO.new
yield
$stdout.rewind
return $stdout.string
ensure
$stdout = $old_stdout
end
end | 1 | 0.020833 | 1 | 0 |
0c9db0d808f8f480de79ac944a96f0ee7c37b708 | source/gloperate/source/capabilities/TypedRenderTargetCapability.cpp | source/gloperate/source/capabilities/TypedRenderTargetCapability.cpp | /******************************************************************************\
* gloperate
*
* Copyright (C) 2014 Computer Graphics Systems Group at the
* Hasso-Plattner-Institut (HPI), Potsdam, Germany.
\******************************************************************************/
#include <gloperate/capabilities/TypedRenderTargetCapability.h>
namespace gloperate {
/**
* @brief
* Constructor
*/
TypedRenderTargetCapability::TypedRenderTargetCapability()
:AbstractTypedRenderTargetCapability()
{
}
/**
* @brief
* Destructor
*/
TypedRenderTargetCapability::~TypedRenderTargetCapability()
{
}
const RenderTarget & TypedRenderTargetCapability::renderTarget(RenderTargetType type)
{
return *(m_renderTargets.at(type));
}
bool TypedRenderTargetCapability::hasRenderTarget(RenderTargetType type)
{
return (m_renderTargets.count(type) > 0);
}
void TypedRenderTargetCapability::setRenderTarget(
RenderTargetType type,
globjects::ref_ptr<globjects::Framebuffer> framebuffer,
gl::GLenum attachment,
gl::GLenum format)
{
if (hasRenderTarget(type))
{
delete m_renderTargets.at(type);
}
m_renderTargets[type] = new RenderTarget(framebuffer, attachment, format);
}
} // namespace gloperate
| /******************************************************************************\
* gloperate
*
* Copyright (C) 2014 Computer Graphics Systems Group at the
* Hasso-Plattner-Institut (HPI), Potsdam, Germany.
\******************************************************************************/
#include <gloperate/capabilities/TypedRenderTargetCapability.h>
namespace gloperate {
/**
* @brief
* Constructor
*/
TypedRenderTargetCapability::TypedRenderTargetCapability()
:AbstractTypedRenderTargetCapability()
{
}
/**
* @brief
* Destructor
*/
TypedRenderTargetCapability::~TypedRenderTargetCapability()
{
m_renderTargets.clear();
}
const RenderTarget & TypedRenderTargetCapability::renderTarget(RenderTargetType type)
{
return *(m_renderTargets.at(type));
}
bool TypedRenderTargetCapability::hasRenderTarget(RenderTargetType type)
{
return (m_renderTargets.count(type) > 0);
}
void TypedRenderTargetCapability::setRenderTarget(
RenderTargetType type,
globjects::ref_ptr<globjects::Framebuffer> framebuffer,
gl::GLenum attachment,
gl::GLenum format)
{
if (hasRenderTarget(type))
{
delete m_renderTargets.at(type);
}
m_renderTargets[type] = new RenderTarget(framebuffer, attachment, format);
}
} // namespace gloperate
| Add clear map on destruction | Add clear map on destruction
| C++ | mit | lanice/gloperate,Beta-Alf/gloperate,Beta-Alf/gloperate,Beta-Alf/gloperate,lanice/gloperate,lanice/gloperate,hpi-r2d2/gloperate,cginternals/gloperate,hpicgs/gloperate,p-otto/gloperate,p-otto/gloperate,j-o/gloperate,lanice/gloperate,hpicgs/gloperate,Beta-Alf/gloperate,j-o/gloperate,j-o/gloperate,p-otto/gloperate,lanice/gloperate,Beta-Alf/gloperate,cginternals/gloperate,cginternals/gloperate,hpicgs/gloperate,cginternals/gloperate,hpi-r2d2/gloperate,p-otto/gloperate,p-otto/gloperate,hpicgs/gloperate,j-o/gloperate,hpicgs/gloperate | c++ | ## Code Before:
/******************************************************************************\
* gloperate
*
* Copyright (C) 2014 Computer Graphics Systems Group at the
* Hasso-Plattner-Institut (HPI), Potsdam, Germany.
\******************************************************************************/
#include <gloperate/capabilities/TypedRenderTargetCapability.h>
namespace gloperate {
/**
* @brief
* Constructor
*/
TypedRenderTargetCapability::TypedRenderTargetCapability()
:AbstractTypedRenderTargetCapability()
{
}
/**
* @brief
* Destructor
*/
TypedRenderTargetCapability::~TypedRenderTargetCapability()
{
}
const RenderTarget & TypedRenderTargetCapability::renderTarget(RenderTargetType type)
{
return *(m_renderTargets.at(type));
}
bool TypedRenderTargetCapability::hasRenderTarget(RenderTargetType type)
{
return (m_renderTargets.count(type) > 0);
}
void TypedRenderTargetCapability::setRenderTarget(
RenderTargetType type,
globjects::ref_ptr<globjects::Framebuffer> framebuffer,
gl::GLenum attachment,
gl::GLenum format)
{
if (hasRenderTarget(type))
{
delete m_renderTargets.at(type);
}
m_renderTargets[type] = new RenderTarget(framebuffer, attachment, format);
}
} // namespace gloperate
## Instruction:
Add clear map on destruction
## Code After:
/******************************************************************************\
* gloperate
*
* Copyright (C) 2014 Computer Graphics Systems Group at the
* Hasso-Plattner-Institut (HPI), Potsdam, Germany.
\******************************************************************************/
#include <gloperate/capabilities/TypedRenderTargetCapability.h>
namespace gloperate {
/**
* @brief
* Constructor
*/
TypedRenderTargetCapability::TypedRenderTargetCapability()
:AbstractTypedRenderTargetCapability()
{
}
/**
* @brief
* Destructor
*/
TypedRenderTargetCapability::~TypedRenderTargetCapability()
{
m_renderTargets.clear();
}
const RenderTarget & TypedRenderTargetCapability::renderTarget(RenderTargetType type)
{
return *(m_renderTargets.at(type));
}
bool TypedRenderTargetCapability::hasRenderTarget(RenderTargetType type)
{
return (m_renderTargets.count(type) > 0);
}
void TypedRenderTargetCapability::setRenderTarget(
RenderTargetType type,
globjects::ref_ptr<globjects::Framebuffer> framebuffer,
gl::GLenum attachment,
gl::GLenum format)
{
if (hasRenderTarget(type))
{
delete m_renderTargets.at(type);
}
m_renderTargets[type] = new RenderTarget(framebuffer, attachment, format);
}
} // namespace gloperate
| /******************************************************************************\
* gloperate
*
* Copyright (C) 2014 Computer Graphics Systems Group at the
* Hasso-Plattner-Institut (HPI), Potsdam, Germany.
\******************************************************************************/
#include <gloperate/capabilities/TypedRenderTargetCapability.h>
namespace gloperate {
/**
* @brief
* Constructor
*/
TypedRenderTargetCapability::TypedRenderTargetCapability()
:AbstractTypedRenderTargetCapability()
{
}
/**
* @brief
* Destructor
*/
TypedRenderTargetCapability::~TypedRenderTargetCapability()
{
+ m_renderTargets.clear();
}
const RenderTarget & TypedRenderTargetCapability::renderTarget(RenderTargetType type)
{
return *(m_renderTargets.at(type));
}
bool TypedRenderTargetCapability::hasRenderTarget(RenderTargetType type)
{
return (m_renderTargets.count(type) > 0);
}
void TypedRenderTargetCapability::setRenderTarget(
RenderTargetType type,
globjects::ref_ptr<globjects::Framebuffer> framebuffer,
gl::GLenum attachment,
gl::GLenum format)
{
if (hasRenderTarget(type))
{
delete m_renderTargets.at(type);
}
m_renderTargets[type] = new RenderTarget(framebuffer, attachment, format);
}
} // namespace gloperate | 1 | 0.018519 | 1 | 0 |
ab6e033becc07b471257dbab6ea153edd72d0acb | setup-files/setup-magit.el | setup-files/setup-magit.el | ;; Time-stamp: <2014-08-18 13:25:47 kmodi>
;; magit
;; Source: https://github.com/magit/magit
(req-package magit
:commands (magit-status)
:requires (key-chord)
:init
(progn
(bind-keys
:map modi-mode-map
("<f11>" . magit-status)
("<S-f11>" . magit-push)
("<M-f11>" . magit-pull))
(key-chord-define-global "-[" 'magit-status)) ;; alternative for F11
:config
(progn
(setq magit-completing-read-function 'magit-ido-completing-read
magit-auto-revert-mode nil
magit-repo-dirs '( "~/.emacs.d"))
(magit-auto-revert-mode -1))) ;; Disable magit auto revert
(provide 'setup-magit)
| ;; Time-stamp: <2014-10-15 09:31:43 kmodi>
;; magit
;; Source: https://github.com/magit/magit
(req-package magit
:commands (magit-status)
:requires (key-chord)
:init
(progn
(bind-keys
:map modi-mode-map
("<f11>" . magit-status)
("<S-f11>" . magit-push)
("<M-f11>" . magit-pull))
(key-chord-define-global "-[" 'magit-status)) ;; alternative for F11
:config
(progn
(setq magit-completing-read-function 'magit-ido-completing-read)
(setq magit-auto-revert-mode nil)
(setq magit-repo-dirs '( "~/.emacs.d"))
(setq magit-diff-options '("--ignore-space-change"))
(magit-auto-revert-mode -1) ;; Disable magit auto revert
;; While in "*magit..*" buffer on doing Commit (`c c'), the
;; ".. COMMIT_EDITMSG" buffer opens and reuses the "*magit .." window.
;; This is not useful when you'd want to add details about what you are
;; committing while reviewing the diff in "*magit .." window. So ensure
;; that the ".. COMMIT_EDITMSG" buffer always pops up in a new window.
;; `display-buffer-alist' = '(CONDITION . (FUNCTION . ALIST))
(add-to-list 'display-buffer-alist
'(".*COMMIT_EDITMSG". ((display-buffer-pop-up-window) .
((inhibit-same-window . t)))))))
(provide 'setup-magit)
| Make the COMMIT_EDITMSG buffer open in a new window and not reuse the *magit:..* window | Make the COMMIT_EDITMSG buffer open in a new window and not reuse
the *magit:..* window
| Emacs Lisp | mit | kaushalmodi/.emacs.d,kaushalmodi/.emacs.d | emacs-lisp | ## Code Before:
;; Time-stamp: <2014-08-18 13:25:47 kmodi>
;; magit
;; Source: https://github.com/magit/magit
(req-package magit
:commands (magit-status)
:requires (key-chord)
:init
(progn
(bind-keys
:map modi-mode-map
("<f11>" . magit-status)
("<S-f11>" . magit-push)
("<M-f11>" . magit-pull))
(key-chord-define-global "-[" 'magit-status)) ;; alternative for F11
:config
(progn
(setq magit-completing-read-function 'magit-ido-completing-read
magit-auto-revert-mode nil
magit-repo-dirs '( "~/.emacs.d"))
(magit-auto-revert-mode -1))) ;; Disable magit auto revert
(provide 'setup-magit)
## Instruction:
Make the COMMIT_EDITMSG buffer open in a new window and not reuse
the *magit:..* window
## Code After:
;; Time-stamp: <2014-10-15 09:31:43 kmodi>
;; magit
;; Source: https://github.com/magit/magit
(req-package magit
:commands (magit-status)
:requires (key-chord)
:init
(progn
(bind-keys
:map modi-mode-map
("<f11>" . magit-status)
("<S-f11>" . magit-push)
("<M-f11>" . magit-pull))
(key-chord-define-global "-[" 'magit-status)) ;; alternative for F11
:config
(progn
(setq magit-completing-read-function 'magit-ido-completing-read)
(setq magit-auto-revert-mode nil)
(setq magit-repo-dirs '( "~/.emacs.d"))
(setq magit-diff-options '("--ignore-space-change"))
(magit-auto-revert-mode -1) ;; Disable magit auto revert
;; While in "*magit..*" buffer on doing Commit (`c c'), the
;; ".. COMMIT_EDITMSG" buffer opens and reuses the "*magit .." window.
;; This is not useful when you'd want to add details about what you are
;; committing while reviewing the diff in "*magit .." window. So ensure
;; that the ".. COMMIT_EDITMSG" buffer always pops up in a new window.
;; `display-buffer-alist' = '(CONDITION . (FUNCTION . ALIST))
(add-to-list 'display-buffer-alist
'(".*COMMIT_EDITMSG". ((display-buffer-pop-up-window) .
((inhibit-same-window . t)))))))
(provide 'setup-magit)
| - ;; Time-stamp: <2014-08-18 13:25:47 kmodi>
? - ^ ---- ^
+ ;; Time-stamp: <2014-10-15 09:31:43 kmodi>
? + ^ ++++ ^
;; magit
;; Source: https://github.com/magit/magit
(req-package magit
:commands (magit-status)
:requires (key-chord)
:init
(progn
(bind-keys
:map modi-mode-map
("<f11>" . magit-status)
("<S-f11>" . magit-push)
("<M-f11>" . magit-pull))
(key-chord-define-global "-[" 'magit-status)) ;; alternative for F11
:config
(progn
- (setq magit-completing-read-function 'magit-ido-completing-read
+ (setq magit-completing-read-function 'magit-ido-completing-read)
? +
- magit-auto-revert-mode nil
? ^^^^^
+ (setq magit-auto-revert-mode nil)
? ^^^^^ +
- magit-repo-dirs '( "~/.emacs.d"))
? ^^^^^
+ (setq magit-repo-dirs '( "~/.emacs.d"))
? ^^^^^
+ (setq magit-diff-options '("--ignore-space-change"))
- (magit-auto-revert-mode -1))) ;; Disable magit auto revert
? --
+ (magit-auto-revert-mode -1) ;; Disable magit auto revert
+ ;; While in "*magit..*" buffer on doing Commit (`c c'), the
+ ;; ".. COMMIT_EDITMSG" buffer opens and reuses the "*magit .." window.
+ ;; This is not useful when you'd want to add details about what you are
+ ;; committing while reviewing the diff in "*magit .." window. So ensure
+ ;; that the ".. COMMIT_EDITMSG" buffer always pops up in a new window.
+ ;; `display-buffer-alist' = '(CONDITION . (FUNCTION . ALIST))
+ (add-to-list 'display-buffer-alist
+ '(".*COMMIT_EDITMSG". ((display-buffer-pop-up-window) .
+ ((inhibit-same-window . t)))))))
(provide 'setup-magit) | 20 | 0.8 | 15 | 5 |
8800cac725c60f239f729625a5b13bd6a818568a | composer.json | composer.json | {
"name": "favor/playbook-hr",
"description": "Playbook HR API client",
"require": {
"guzzlehttp/guzzle": "~6.0",
"wixel/gump": "dev-master"
},
"require-dev": {
"phpunit/phpunit": "4.*",
"fzaninotto/faker": "1.*",
"codeclimate/php-test-reporter": "dev-master"
},
"authors": [
{
"name": "Diego Alejos",
"email": "diego@askfavor.com"
}
],
"autoload": {
"psr-4": {
"Playbook\\": "src/Playbook"
}
}
}
| {
"name": "favor/playbook-hr",
"description": "Playbook HR API client",
"require": {
"guzzlehttp/guzzle": "~6.0",
"wixel/gump": "^1.3.0"
},
"require-dev": {
"phpunit/phpunit": "4.*",
"fzaninotto/faker": "1.*",
"codeclimate/php-test-reporter": "dev-master"
},
"authors": [
{
"name": "Diego Alejos",
"email": "diego@askfavor.com"
}
],
"autoload": {
"psr-4": {
"Playbook\\": "src/Playbook"
}
}
}
| Set Gump to be a release version. | Set Gump to be a release version.
| JSON | mit | theD1360/playbook-hr,rubenrangel/playbook-hr | json | ## Code Before:
{
"name": "favor/playbook-hr",
"description": "Playbook HR API client",
"require": {
"guzzlehttp/guzzle": "~6.0",
"wixel/gump": "dev-master"
},
"require-dev": {
"phpunit/phpunit": "4.*",
"fzaninotto/faker": "1.*",
"codeclimate/php-test-reporter": "dev-master"
},
"authors": [
{
"name": "Diego Alejos",
"email": "diego@askfavor.com"
}
],
"autoload": {
"psr-4": {
"Playbook\\": "src/Playbook"
}
}
}
## Instruction:
Set Gump to be a release version.
## Code After:
{
"name": "favor/playbook-hr",
"description": "Playbook HR API client",
"require": {
"guzzlehttp/guzzle": "~6.0",
"wixel/gump": "^1.3.0"
},
"require-dev": {
"phpunit/phpunit": "4.*",
"fzaninotto/faker": "1.*",
"codeclimate/php-test-reporter": "dev-master"
},
"authors": [
{
"name": "Diego Alejos",
"email": "diego@askfavor.com"
}
],
"autoload": {
"psr-4": {
"Playbook\\": "src/Playbook"
}
}
}
| {
"name": "favor/playbook-hr",
"description": "Playbook HR API client",
"require": {
"guzzlehttp/guzzle": "~6.0",
- "wixel/gump": "dev-master"
+ "wixel/gump": "^1.3.0"
},
"require-dev": {
"phpunit/phpunit": "4.*",
"fzaninotto/faker": "1.*",
"codeclimate/php-test-reporter": "dev-master"
},
"authors": [
{
"name": "Diego Alejos",
"email": "diego@askfavor.com"
}
],
"autoload": {
"psr-4": {
"Playbook\\": "src/Playbook"
}
}
} | 2 | 0.083333 | 1 | 1 |
f64a45cdf108164d44465872e5df5aedaa320101 | .travis.yml | .travis.yml | language: node_js
node_js:
- 0.12
before_script:
- npm install -g grunt-cli
before_install:
- sudo apt-get update -qq
- sudo apt-get install -qq libcairo2-dev libgif-dev libopencv-dev libjpeg8-dev libpango1.0-dev build-essential g++
- sudo add-apt-repository -y ppa:lyrasis/precise-backports
- sudo apt-get update -qq
- sudo apt-get install -qq automake build-essential gobject-introspection gtk-doc-tools libglib2.0-dev libjpeg-dev libpng12-dev libwebp-dev libtiff4-dev libexif-dev libgsf-1-dev liblcms2-dev libxml2-dev swig libmagickcore-dev
- sudo ./install-libvips.sh
script:
- export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
- export LD_LIBRARY_PATH=/usr/local/lib
| language: node_js
node_js:
- 0.12
before_script:
- npm install -g grunt-cli
- export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
- export LD_LIBRARY_PATH=/usr/local/lib
before_install:
- sudo apt-get update -qq
- sudo apt-get install -qq libcairo2-dev libgif-dev libopencv-dev libjpeg8-dev libpango1.0-dev build-essential g++
- sudo add-apt-repository -y ppa:lyrasis/precise-backports
- sudo apt-get update -qq
- sudo apt-get install -qq automake build-essential gobject-introspection gtk-doc-tools libglib2.0-dev libjpeg-dev libpng12-dev libwebp-dev libtiff4-dev libexif-dev libgsf-1-dev liblcms2-dev libxml2-dev swig libmagickcore-dev
- sudo ./install-libvips.sh
| Set env vars on before_script | Set env vars on before_script
| YAML | mit | noflo/noflo-sharp,GabiThume/noflo-sharp,GabiThume/noflo-sharp | yaml | ## Code Before:
language: node_js
node_js:
- 0.12
before_script:
- npm install -g grunt-cli
before_install:
- sudo apt-get update -qq
- sudo apt-get install -qq libcairo2-dev libgif-dev libopencv-dev libjpeg8-dev libpango1.0-dev build-essential g++
- sudo add-apt-repository -y ppa:lyrasis/precise-backports
- sudo apt-get update -qq
- sudo apt-get install -qq automake build-essential gobject-introspection gtk-doc-tools libglib2.0-dev libjpeg-dev libpng12-dev libwebp-dev libtiff4-dev libexif-dev libgsf-1-dev liblcms2-dev libxml2-dev swig libmagickcore-dev
- sudo ./install-libvips.sh
script:
- export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
- export LD_LIBRARY_PATH=/usr/local/lib
## Instruction:
Set env vars on before_script
## Code After:
language: node_js
node_js:
- 0.12
before_script:
- npm install -g grunt-cli
- export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
- export LD_LIBRARY_PATH=/usr/local/lib
before_install:
- sudo apt-get update -qq
- sudo apt-get install -qq libcairo2-dev libgif-dev libopencv-dev libjpeg8-dev libpango1.0-dev build-essential g++
- sudo add-apt-repository -y ppa:lyrasis/precise-backports
- sudo apt-get update -qq
- sudo apt-get install -qq automake build-essential gobject-introspection gtk-doc-tools libglib2.0-dev libjpeg-dev libpng12-dev libwebp-dev libtiff4-dev libexif-dev libgsf-1-dev liblcms2-dev libxml2-dev swig libmagickcore-dev
- sudo ./install-libvips.sh
| language: node_js
node_js:
- 0.12
before_script:
- npm install -g grunt-cli
+ - export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
+ - export LD_LIBRARY_PATH=/usr/local/lib
before_install:
- sudo apt-get update -qq
- sudo apt-get install -qq libcairo2-dev libgif-dev libopencv-dev libjpeg8-dev libpango1.0-dev build-essential g++
- sudo add-apt-repository -y ppa:lyrasis/precise-backports
- sudo apt-get update -qq
- sudo apt-get install -qq automake build-essential gobject-introspection gtk-doc-tools libglib2.0-dev libjpeg-dev libpng12-dev libwebp-dev libtiff4-dev libexif-dev libgsf-1-dev liblcms2-dev libxml2-dev swig libmagickcore-dev
- sudo ./install-libvips.sh
- script:
- - export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
- - export LD_LIBRARY_PATH=/usr/local/lib | 5 | 0.333333 | 2 | 3 |
db03ecb8e1c7383fef73cd92b9aac65de8919d00 | api/links.json | api/links.json | ---
layout: null
sitemap:
exclude: 'yes'
---
[
{
"name": "Personal Website",
"type": "website",
"url": "{{ site.url }}"
},
{
"name": "GitHub",
"type": "github",
"url": "https://github.com/{{ site.github }}"
},
{
"name": "Twitter",
"type": "twitter",
"url": "https://twitter.com/{{ site.twitter }}"
},
{
"name": "LinkedIn",
"type": "linkedin",
"url": "https://www.linkedin.com/in/{{ site.linkedin }}"
}
] | ---
layout: null
sitemap:
exclude: 'yes'
---
[
{
"name": "Personal Website",
"type": "website",
"url": "{{ site.url }}"
},
{
"name": "GitHub",
"type": "github",
"url": "https://github.com/{{ site.github }}"
},
{
"name": "LinkedIn",
"type": "linkedin",
"url": "https://www.linkedin.com/in/{{ site.linkedin }}"
}
] | Remove Twitter link from API | Remove Twitter link from API
| JSON | apache-2.0 | sczerwinski/sczerwinski.github.io,sczerwinski/sczerwinski.github.io,sczerwinski/sczerwinski.github.io | json | ## Code Before:
---
layout: null
sitemap:
exclude: 'yes'
---
[
{
"name": "Personal Website",
"type": "website",
"url": "{{ site.url }}"
},
{
"name": "GitHub",
"type": "github",
"url": "https://github.com/{{ site.github }}"
},
{
"name": "Twitter",
"type": "twitter",
"url": "https://twitter.com/{{ site.twitter }}"
},
{
"name": "LinkedIn",
"type": "linkedin",
"url": "https://www.linkedin.com/in/{{ site.linkedin }}"
}
]
## Instruction:
Remove Twitter link from API
## Code After:
---
layout: null
sitemap:
exclude: 'yes'
---
[
{
"name": "Personal Website",
"type": "website",
"url": "{{ site.url }}"
},
{
"name": "GitHub",
"type": "github",
"url": "https://github.com/{{ site.github }}"
},
{
"name": "LinkedIn",
"type": "linkedin",
"url": "https://www.linkedin.com/in/{{ site.linkedin }}"
}
] | ---
layout: null
sitemap:
exclude: 'yes'
---
[
{
"name": "Personal Website",
"type": "website",
"url": "{{ site.url }}"
},
{
"name": "GitHub",
"type": "github",
"url": "https://github.com/{{ site.github }}"
},
{
- "name": "Twitter",
- "type": "twitter",
- "url": "https://twitter.com/{{ site.twitter }}"
- },
- {
"name": "LinkedIn",
"type": "linkedin",
"url": "https://www.linkedin.com/in/{{ site.linkedin }}"
}
] | 5 | 0.185185 | 0 | 5 |
7bf2947eb77f96e9136e409c2bf2c956c53605bf | chapters/1/index.md | chapters/1/index.md | ---
title: 第1章 概述
---
## 课件
- [下载](chap01.ppt)
- [网络视频](http://www.imooc.com/video/1430)
## 相关链接
- [维基百科](https://zh.wikipedia.org/wiki/Java)
- [安装配置](http://jingyan.baidu.com/article/359911f508c21f57fe030638.html)
## 工具下载
- [JDK](http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html)
- [Eclipse](https://eclipse.org/downloads/): 强大的开源Java IDE。
- [IntelliJ IDEA](https://www.jetbrains.com/idea/): 商业Java IDE,使用体验更好,社区版免费,商业版学生可申请*免费使用*。
- [Atom](https://atom.io): 开源的轻量级文本编辑器。
- [Sublime Text](http://www.sublimetext.com): 收费的轻量级文本编辑器,可试用。
| ---
title: 第1章 概述
---
## 课件
- [下载](chap01.ppt)
- [网络视频](http://www.imooc.com/video/1430)
## 相关链接
- [维基百科](https://zh.wikipedia.org/wiki/Java)
- [安装配置](http://jingyan.baidu.com/article/359911f508c21f57fe030638.html)
## 工具下载
- **部分工具的百度云下载链接**: http://pan.baidu.com/s/1i32dwax
- [JDK](http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html)
- [Eclipse](https://eclipse.org/downloads/): 强大的开源Java IDE。
- [IntelliJ IDEA](https://www.jetbrains.com/idea/): 商业Java IDE,使用体验更好,社区版免费,商业版学生可申请*免费使用*。
- [Atom](https://atom.io): 开源的轻量级文本编辑器。
- [Sublime Text](http://www.sublimetext.com): 收费的轻量级文本编辑器,可试用。
| Add Baidu Pan download link | Add Baidu Pan download link
| Markdown | mit | zjsu/java,zjsu/java,zjsu/java | markdown | ## Code Before:
---
title: 第1章 概述
---
## 课件
- [下载](chap01.ppt)
- [网络视频](http://www.imooc.com/video/1430)
## 相关链接
- [维基百科](https://zh.wikipedia.org/wiki/Java)
- [安装配置](http://jingyan.baidu.com/article/359911f508c21f57fe030638.html)
## 工具下载
- [JDK](http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html)
- [Eclipse](https://eclipse.org/downloads/): 强大的开源Java IDE。
- [IntelliJ IDEA](https://www.jetbrains.com/idea/): 商业Java IDE,使用体验更好,社区版免费,商业版学生可申请*免费使用*。
- [Atom](https://atom.io): 开源的轻量级文本编辑器。
- [Sublime Text](http://www.sublimetext.com): 收费的轻量级文本编辑器,可试用。
## Instruction:
Add Baidu Pan download link
## Code After:
---
title: 第1章 概述
---
## 课件
- [下载](chap01.ppt)
- [网络视频](http://www.imooc.com/video/1430)
## 相关链接
- [维基百科](https://zh.wikipedia.org/wiki/Java)
- [安装配置](http://jingyan.baidu.com/article/359911f508c21f57fe030638.html)
## 工具下载
- **部分工具的百度云下载链接**: http://pan.baidu.com/s/1i32dwax
- [JDK](http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html)
- [Eclipse](https://eclipse.org/downloads/): 强大的开源Java IDE。
- [IntelliJ IDEA](https://www.jetbrains.com/idea/): 商业Java IDE,使用体验更好,社区版免费,商业版学生可申请*免费使用*。
- [Atom](https://atom.io): 开源的轻量级文本编辑器。
- [Sublime Text](http://www.sublimetext.com): 收费的轻量级文本编辑器,可试用。
| ---
title: 第1章 概述
---
## 课件
- [下载](chap01.ppt)
- [网络视频](http://www.imooc.com/video/1430)
## 相关链接
- [维基百科](https://zh.wikipedia.org/wiki/Java)
- [安装配置](http://jingyan.baidu.com/article/359911f508c21f57fe030638.html)
## 工具下载
+ - **部分工具的百度云下载链接**: http://pan.baidu.com/s/1i32dwax
- [JDK](http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html)
- [Eclipse](https://eclipse.org/downloads/): 强大的开源Java IDE。
- [IntelliJ IDEA](https://www.jetbrains.com/idea/): 商业Java IDE,使用体验更好,社区版免费,商业版学生可申请*免费使用*。
- [Atom](https://atom.io): 开源的轻量级文本编辑器。
- [Sublime Text](http://www.sublimetext.com): 收费的轻量级文本编辑器,可试用。
| 1 | 0.045455 | 1 | 0 |
634e359eb97a2d8776ba81d1c9f112c5da590e0d | .travis.yml | .travis.yml | dist: trusty
language: generic
install:
- which java && java -version
- which mvn && mvn --version
- which ruby && ruby --version
- which bundle && bundle --version
- which rake && rake --version
script: rake
| dist: trusty
language: generic
install:
- echo "## Java Environment ##"
- java -version
- mvn --version
- echo "## Ruby Environment ##"
- ruby --version
- bundle --version
- rake --version
- bundle install
script: rake
| Install Ruby gems before testing | Install Ruby gems before testing
| YAML | mit | kkrull/javaspec,kkrull/javaspec,kkrull/javaspec | yaml | ## Code Before:
dist: trusty
language: generic
install:
- which java && java -version
- which mvn && mvn --version
- which ruby && ruby --version
- which bundle && bundle --version
- which rake && rake --version
script: rake
## Instruction:
Install Ruby gems before testing
## Code After:
dist: trusty
language: generic
install:
- echo "## Java Environment ##"
- java -version
- mvn --version
- echo "## Ruby Environment ##"
- ruby --version
- bundle --version
- rake --version
- bundle install
script: rake
| dist: trusty
language: generic
install:
- - which java && java -version
- - which mvn && mvn --version
- - which ruby && ruby --version
- - which bundle && bundle --version
- - which rake && rake --version
+ - echo "## Java Environment ##"
+ - java -version
+ - mvn --version
+ - echo "## Ruby Environment ##"
+ - ruby --version
+ - bundle --version
+ - rake --version
+ - bundle install
script: rake
| 13 | 1.083333 | 8 | 5 |
a06b8e1eb33a0b9b1bc66bd10005f2f41837b57c | src/lib.rs | src/lib.rs | extern crate core;
pub use cpu::*;
#[macro_use] mod bitflags;
#[cfg(target_arch="x86")]
#[path = "x86.rs"]
mod cpu;
#[cfg(target_arch="x86_64")]
#[path = "x86_64.rs"]
mod cpu;
pub mod std {
pub use core::fmt;
pub use core::num;
pub use core::option;
pub use core::cmp;
pub use core::clone;
pub use core::marker;
pub use core::ops;
}
| extern crate core;
pub use cpu::*;
#[macro_use] mod bitflags;
#[cfg(target_arch="x86")]
#[path = "x86.rs"]
mod cpu;
#[cfg(target_arch="x86_64")]
#[path = "x86_64.rs"]
mod cpu;
pub mod std { pub use core::*; }
| Use a simpler way to create the faux-std module | Use a simpler way to create the faux-std module
| Rust | mit | Tobba/libcpu,rexlunae/redox,rexlunae/redox,phil-opp/rust-x86_64,gz/rust-x86,rexlunae/redox,gz/rust-x86,RustOS-Fork-Holding-Ground/libcpu | rust | ## Code Before:
extern crate core;
pub use cpu::*;
#[macro_use] mod bitflags;
#[cfg(target_arch="x86")]
#[path = "x86.rs"]
mod cpu;
#[cfg(target_arch="x86_64")]
#[path = "x86_64.rs"]
mod cpu;
pub mod std {
pub use core::fmt;
pub use core::num;
pub use core::option;
pub use core::cmp;
pub use core::clone;
pub use core::marker;
pub use core::ops;
}
## Instruction:
Use a simpler way to create the faux-std module
## Code After:
extern crate core;
pub use cpu::*;
#[macro_use] mod bitflags;
#[cfg(target_arch="x86")]
#[path = "x86.rs"]
mod cpu;
#[cfg(target_arch="x86_64")]
#[path = "x86_64.rs"]
mod cpu;
pub mod std { pub use core::*; }
| extern crate core;
pub use cpu::*;
#[macro_use] mod bitflags;
#[cfg(target_arch="x86")]
#[path = "x86.rs"]
mod cpu;
#[cfg(target_arch="x86_64")]
#[path = "x86_64.rs"]
mod cpu;
+ pub mod std { pub use core::*; }
- pub mod std {
- pub use core::fmt;
- pub use core::num;
- pub use core::option;
- pub use core::cmp;
- pub use core::clone;
- pub use core::marker;
- pub use core::ops;
- } | 10 | 0.454545 | 1 | 9 |
d6cd6a4aef998de72fe440d873e4d7ff513b6d5b | src/Composer/Downloader/ZipDownloader.php | src/Composer/Downloader/ZipDownloader.php | <?php
/*
* This file is part of Composer.
*
* (c) Nils Adermann <naderman@naderman.de>
* Jordi Boggiano <j.boggiano@seld.be>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Composer\Downloader;
use Composer\Package\PackageInterface;
/**
* @author Jordi Boggiano <j.boggiano@seld.be>
*/
class ZipDownloader extends FileDownloader
{
protected function extract($file, $path)
{
if (!class_exists('ZipArchive')) {
throw new \UnexpectedValueException('You need the zip extension enabled to use the ZipDownloader');
}
$zipArchive = new \ZipArchive();
if (true !== ($retval = $zipArchive->open($file))) {
throw new \UnexpectedValueException($file.' is not a valid zip archive, got error code '.$retval);
}
$zipArchive->extractTo($path);
$zipArchive->close();
}
}
| <?php
/*
* This file is part of Composer.
*
* (c) Nils Adermann <naderman@naderman.de>
* Jordi Boggiano <j.boggiano@seld.be>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Composer\Downloader;
use Composer\Package\PackageInterface;
/**
* @author Jordi Boggiano <j.boggiano@seld.be>
*/
class ZipDownloader extends FileDownloader
{
protected function extract($file, $path)
{
if (!class_exists('ZipArchive')) {
throw new \RuntimeException('You need the zip extension enabled to use the ZipDownloader');
}
$zipArchive = new \ZipArchive();
if (true !== ($retval = $zipArchive->open($file))) {
throw new \UnexpectedValueException($file.' is not a valid zip archive, got error code '.$retval);
}
$zipArchive->extractTo($path);
$zipArchive->close();
}
}
| Use `RuntimeException` instead of `UnexpectedValueException` when zip extension is not enabled | Use `RuntimeException` instead of `UnexpectedValueException` when zip extension is not enabled | PHP | mit | floverdevel/composer,balbuf/composer,sstok/composer,slbmeh/composer,davidolrik/composer,1stvamp/composer,shipci/composer,myPublicGit/composer,flaupretre/composer,jeremyFreeAgent/composer,Ocramius/composer,jtanjung/composer,webberwu/composer,szeber/composer,vdm-io/composer,kuczek/composer,jreinke/composer,Netmisa/composer,1234-/composer,Seldaek/composer,cgvarela/composer,1ed/composer,nater1067/composer,alcohol/composer,JeroenDeDauw/composer,MoT3rror/composer,bamarni/composer,yinhe007/composer,dymissy/composer,fabpot/composer,oxygen-cms/composer,olvlvl/composer,Flyingmana/composer,javihgil/composer,brighten01/composer,remicollet/composer,staabm/composer,nevvermind/composer,PatidarWeb/composer,blacksun/composer,ncusoho/composer,nicolas-grekas/composer,contao-community-alliance-archive/composer-contao-edition,druid628/composer,gammamatrix/composer,Risyandi/composer,sroze/composer,cesarmarinhorj/composer,DiceHoldingsInc/composer,samdark/composer,fh/composer,iamluc/composer,Zagorakiss/composer,jmleroux/composer,gencer/composer,theiven70/composer,Nicofuma/composer,stefangr/composer,ryanaslett/composer,andrerom/composer,Soullivaneuh/composer,hirak/composer,rednut/composer,SpacePossum/composer,GodLesZ/composer,stof/composer,sstok/composer,greg0ire/composer,mauricionr/composer,melvis01/composer,mikicaivosevic/composer,erasys/composer,dzuelke/composer,universalsoftware/composer,andrewnicols/composer,mrmark/composer,sstok/composer,ammmze/composer,GromNaN/composer,JeckoHeroOrg/composer,Jericho25/composer,fabiang/composer,aitboudad/composer,zhaoyan158567/composer,localheinz/composer,slopjong/posedoc,JBleijenberg/composer,guillaumelecerf/composer,sminnee/composer,johnstevenson/composer,1stvamp/composer,cs278/composer,oligriffiths/composer,supriyantomaftuh/composer,pierredup/composer,joshdifabio/composer,Teino1978-Corp/Teino1978-Corp-composer,zgj12306/composer,yaman-jain/composer,phansys/composer,naderman/composer,milleruk/composer,kocsismate/composer,thetaxman/composer,composer/composer,mickaelandrieu/composer,00F100/composer,curry684/composer,hotzeplotz/php-composer,barkinet/composer,gsdevme/composer,marcuschia/composer,till/composer,AndBicScadMedia/composer,Danack/composer,kidaa/composer,legoktm/composer,mothership-ec/composer,bd808/composer,yched/composer | php | ## Code Before:
<?php
/*
* This file is part of Composer.
*
* (c) Nils Adermann <naderman@naderman.de>
* Jordi Boggiano <j.boggiano@seld.be>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Composer\Downloader;
use Composer\Package\PackageInterface;
/**
* @author Jordi Boggiano <j.boggiano@seld.be>
*/
class ZipDownloader extends FileDownloader
{
protected function extract($file, $path)
{
if (!class_exists('ZipArchive')) {
throw new \UnexpectedValueException('You need the zip extension enabled to use the ZipDownloader');
}
$zipArchive = new \ZipArchive();
if (true !== ($retval = $zipArchive->open($file))) {
throw new \UnexpectedValueException($file.' is not a valid zip archive, got error code '.$retval);
}
$zipArchive->extractTo($path);
$zipArchive->close();
}
}
## Instruction:
Use `RuntimeException` instead of `UnexpectedValueException` when zip extension is not enabled
## Code After:
<?php
/*
* This file is part of Composer.
*
* (c) Nils Adermann <naderman@naderman.de>
* Jordi Boggiano <j.boggiano@seld.be>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Composer\Downloader;
use Composer\Package\PackageInterface;
/**
* @author Jordi Boggiano <j.boggiano@seld.be>
*/
class ZipDownloader extends FileDownloader
{
protected function extract($file, $path)
{
if (!class_exists('ZipArchive')) {
throw new \RuntimeException('You need the zip extension enabled to use the ZipDownloader');
}
$zipArchive = new \ZipArchive();
if (true !== ($retval = $zipArchive->open($file))) {
throw new \UnexpectedValueException($file.' is not a valid zip archive, got error code '.$retval);
}
$zipArchive->extractTo($path);
$zipArchive->close();
}
}
| <?php
/*
* This file is part of Composer.
*
* (c) Nils Adermann <naderman@naderman.de>
* Jordi Boggiano <j.boggiano@seld.be>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Composer\Downloader;
use Composer\Package\PackageInterface;
/**
* @author Jordi Boggiano <j.boggiano@seld.be>
*/
class ZipDownloader extends FileDownloader
{
protected function extract($file, $path)
{
if (!class_exists('ZipArchive')) {
- throw new \UnexpectedValueException('You need the zip extension enabled to use the ZipDownloader');
? ^ ----- ^^^^^^
+ throw new \RuntimeException('You need the zip extension enabled to use the ZipDownloader');
? ^^ ^^
}
$zipArchive = new \ZipArchive();
if (true !== ($retval = $zipArchive->open($file))) {
throw new \UnexpectedValueException($file.' is not a valid zip archive, got error code '.$retval);
}
$zipArchive->extractTo($path);
$zipArchive->close();
}
} | 2 | 0.054054 | 1 | 1 |
a550ddca9302f2009037648cfaec5e04be2b55c4 | src/simplejsondb/dbio/data_block.go | src/simplejsondb/dbio/data_block.go | package dbio
import (
"fmt"
)
type DataBlock struct {
ID uint16
Data []byte
}
func (db *DataBlock) ReadUint16(startingAt int) uint16 {
return DatablockByteOrder.Uint16(db.Data[startingAt : startingAt+2])
}
func (db *DataBlock) ReadUint32(startingAt int) uint32 {
return DatablockByteOrder.Uint32(db.Data[startingAt : startingAt+4])
}
func (db *DataBlock) ReadString(startingAt, length int) string {
return string(db.Data[startingAt : startingAt+length])
}
func (db *DataBlock) Write(position int, v interface{}) {
switch x := v.(type) {
case []byte:
lastPosition := position + len(x)
i := 0
for target := position; target < lastPosition; target++ {
db.Data[target] = x[i]
i++
}
case uint16:
DatablockByteOrder.PutUint16(db.Data[position:position+2], x)
case uint32:
DatablockByteOrder.PutUint32(db.Data[position:position+4], x)
default:
panic(fmt.Sprintf("Don't know how to write %+v", x))
}
}
| package dbio
import (
"fmt"
)
type DataBlock struct {
ID uint16
Data []byte
}
func (db *DataBlock) ReadUint8(startingAt int) uint8 {
return uint8(db.Data[startingAt])
}
func (db *DataBlock) ReadUint16(startingAt int) uint16 {
return DatablockByteOrder.Uint16(db.Data[startingAt : startingAt+2])
}
func (db *DataBlock) ReadUint32(startingAt int) uint32 {
return DatablockByteOrder.Uint32(db.Data[startingAt : startingAt+4])
}
func (db *DataBlock) ReadString(startingAt, length int) string {
return string(db.Data[startingAt : startingAt+length])
}
func (db *DataBlock) Write(position int, v interface{}) {
switch x := v.(type) {
case uint8:
db.Data[position] = x
case []byte:
lastPosition := position + len(x)
i := 0
for target := position; target < lastPosition; target++ {
db.Data[target] = x[i]
i++
}
case uint16:
DatablockByteOrder.PutUint16(db.Data[position:position+2], x)
case uint32:
DatablockByteOrder.PutUint32(db.Data[position:position+4], x)
default:
panic(fmt.Sprintf("Don't know how to write %+v", x))
}
}
| Add support for reading / writing uint8 from blocks (AKA a single byte, methods was introduced for consistency) | Add support for reading / writing uint8 from blocks (AKA a single byte, methods was introduced for consistency)
| Go | mit | fgrehm/pucrs-metadata-db,fgrehm/pucrs-simple-json-db | go | ## Code Before:
package dbio
import (
"fmt"
)
type DataBlock struct {
ID uint16
Data []byte
}
func (db *DataBlock) ReadUint16(startingAt int) uint16 {
return DatablockByteOrder.Uint16(db.Data[startingAt : startingAt+2])
}
func (db *DataBlock) ReadUint32(startingAt int) uint32 {
return DatablockByteOrder.Uint32(db.Data[startingAt : startingAt+4])
}
func (db *DataBlock) ReadString(startingAt, length int) string {
return string(db.Data[startingAt : startingAt+length])
}
func (db *DataBlock) Write(position int, v interface{}) {
switch x := v.(type) {
case []byte:
lastPosition := position + len(x)
i := 0
for target := position; target < lastPosition; target++ {
db.Data[target] = x[i]
i++
}
case uint16:
DatablockByteOrder.PutUint16(db.Data[position:position+2], x)
case uint32:
DatablockByteOrder.PutUint32(db.Data[position:position+4], x)
default:
panic(fmt.Sprintf("Don't know how to write %+v", x))
}
}
## Instruction:
Add support for reading / writing uint8 from blocks (AKA a single byte, methods was introduced for consistency)
## Code After:
package dbio
import (
"fmt"
)
type DataBlock struct {
ID uint16
Data []byte
}
func (db *DataBlock) ReadUint8(startingAt int) uint8 {
return uint8(db.Data[startingAt])
}
func (db *DataBlock) ReadUint16(startingAt int) uint16 {
return DatablockByteOrder.Uint16(db.Data[startingAt : startingAt+2])
}
func (db *DataBlock) ReadUint32(startingAt int) uint32 {
return DatablockByteOrder.Uint32(db.Data[startingAt : startingAt+4])
}
func (db *DataBlock) ReadString(startingAt, length int) string {
return string(db.Data[startingAt : startingAt+length])
}
func (db *DataBlock) Write(position int, v interface{}) {
switch x := v.(type) {
case uint8:
db.Data[position] = x
case []byte:
lastPosition := position + len(x)
i := 0
for target := position; target < lastPosition; target++ {
db.Data[target] = x[i]
i++
}
case uint16:
DatablockByteOrder.PutUint16(db.Data[position:position+2], x)
case uint32:
DatablockByteOrder.PutUint32(db.Data[position:position+4], x)
default:
panic(fmt.Sprintf("Don't know how to write %+v", x))
}
}
| package dbio
import (
"fmt"
)
type DataBlock struct {
ID uint16
Data []byte
+ }
+
+ func (db *DataBlock) ReadUint8(startingAt int) uint8 {
+ return uint8(db.Data[startingAt])
}
func (db *DataBlock) ReadUint16(startingAt int) uint16 {
return DatablockByteOrder.Uint16(db.Data[startingAt : startingAt+2])
}
func (db *DataBlock) ReadUint32(startingAt int) uint32 {
return DatablockByteOrder.Uint32(db.Data[startingAt : startingAt+4])
}
func (db *DataBlock) ReadString(startingAt, length int) string {
return string(db.Data[startingAt : startingAt+length])
}
func (db *DataBlock) Write(position int, v interface{}) {
switch x := v.(type) {
+ case uint8:
+ db.Data[position] = x
case []byte:
lastPosition := position + len(x)
i := 0
for target := position; target < lastPosition; target++ {
db.Data[target] = x[i]
i++
}
case uint16:
DatablockByteOrder.PutUint16(db.Data[position:position+2], x)
case uint32:
DatablockByteOrder.PutUint32(db.Data[position:position+4], x)
default:
panic(fmt.Sprintf("Don't know how to write %+v", x))
}
} | 6 | 0.15 | 6 | 0 |
9b77576226b15f1f1cc29d30e4fea51d82529996 | elm-tutorial/Main.elm | elm-tutorial/Main.elm | module Main exposing (..)
import Html exposing (Html, div, program, text)
import Mouse
import Keyboard
-- MODEL
type alias Model =
Int
init : ( Model, Cmd Msg )
init =
( 0, Cmd.none )
-- MESSAGES
type Msg
= MouseMsg Mouse.Position
| KeyMsg Keyboard.KeyCode
-- VIEW
view : Model -> Html Msg
view model =
div [] [ text (toString model) ]
update : Msg -> Model -> ( Model, Cmd Msg )
update msg model =
case msg of
MouseMsg positionMouse ->
( model + 1, Cmd.none )
KeyMsg keyCodeKeyboard ->
( model + 2, Cmd.none )
subscriptions : Model -> Sub Msg
subscriptions model =
Sub.batch
[ Mouse.downs MouseMsg
, Keyboard.ups KeyMsg
]
main : Program Never Model Msg
main =
program
{ init = init
, view = view
, update = update
, subscriptions = subscriptions
}
| module Main exposing (..)
import Html exposing (Html, button, div, program, text)
import Html.Events exposing (onClick)
import Random
-- MODEL
type alias Model =
Int
init : ( Model, Cmd Msg )
init =
( 0, Cmd.none )
-- MESSAGES
type Msg
= Roll
| OnResult Int
-- VIEW
view : Model -> Html Msg
view model =
div []
[ button [ onClick Roll ] [ text "Roll" ]
, text (toString model)
]
update : Msg -> Model -> ( Model, Cmd Msg )
update msg model =
case msg of
Roll ->
( model, Random.generate OnResult (Random.int 1 6) )
OnResult res ->
( res, Cmd.none )
subscriptions : Model -> Sub Msg
subscriptions model =
Sub.none
main : Program Never Model Msg
main =
program
{ init = init
, view = view
, update = update
, subscriptions = subscriptions
}
| Implement my fisrt Cmd app | :tada: Implement my fisrt Cmd app
| Elm | mit | otofu-square/elm-sandbox,otofu-square/elm-sandbox | elm | ## Code Before:
module Main exposing (..)
import Html exposing (Html, div, program, text)
import Mouse
import Keyboard
-- MODEL
type alias Model =
Int
init : ( Model, Cmd Msg )
init =
( 0, Cmd.none )
-- MESSAGES
type Msg
= MouseMsg Mouse.Position
| KeyMsg Keyboard.KeyCode
-- VIEW
view : Model -> Html Msg
view model =
div [] [ text (toString model) ]
update : Msg -> Model -> ( Model, Cmd Msg )
update msg model =
case msg of
MouseMsg positionMouse ->
( model + 1, Cmd.none )
KeyMsg keyCodeKeyboard ->
( model + 2, Cmd.none )
subscriptions : Model -> Sub Msg
subscriptions model =
Sub.batch
[ Mouse.downs MouseMsg
, Keyboard.ups KeyMsg
]
main : Program Never Model Msg
main =
program
{ init = init
, view = view
, update = update
, subscriptions = subscriptions
}
## Instruction:
:tada: Implement my fisrt Cmd app
## Code After:
module Main exposing (..)
import Html exposing (Html, button, div, program, text)
import Html.Events exposing (onClick)
import Random
-- MODEL
type alias Model =
Int
init : ( Model, Cmd Msg )
init =
( 0, Cmd.none )
-- MESSAGES
type Msg
= Roll
| OnResult Int
-- VIEW
view : Model -> Html Msg
view model =
div []
[ button [ onClick Roll ] [ text "Roll" ]
, text (toString model)
]
update : Msg -> Model -> ( Model, Cmd Msg )
update msg model =
case msg of
Roll ->
( model, Random.generate OnResult (Random.int 1 6) )
OnResult res ->
( res, Cmd.none )
subscriptions : Model -> Sub Msg
subscriptions model =
Sub.none
main : Program Never Model Msg
main =
program
{ init = init
, view = view
, update = update
, subscriptions = subscriptions
}
| module Main exposing (..)
- import Html exposing (Html, div, program, text)
+ import Html exposing (Html, button, div, program, text)
? ++++++++
- import Mouse
- import Keyboard
+ import Html.Events exposing (onClick)
+ import Random
-- MODEL
type alias Model =
Int
init : ( Model, Cmd Msg )
init =
( 0, Cmd.none )
-- MESSAGES
type Msg
- = MouseMsg Mouse.Position
- | KeyMsg Keyboard.KeyCode
+ = Roll
+ | OnResult Int
-- VIEW
view : Model -> Html Msg
view model =
+ div []
+ [ button [ onClick Roll ] [ text "Roll" ]
- div [] [ text (toString model) ]
? --- -- ^ --
+ , text (toString model)
? ^^^
+ ]
update : Msg -> Model -> ( Model, Cmd Msg )
update msg model =
case msg of
- MouseMsg positionMouse ->
- ( model + 1, Cmd.none )
+ Roll ->
+ ( model, Random.generate OnResult (Random.int 1 6) )
- KeyMsg keyCodeKeyboard ->
+ OnResult res ->
- ( model + 2, Cmd.none )
? ^^^ ^^^^^
+ ( res, Cmd.none )
? ^ ^
subscriptions : Model -> Sub Msg
subscriptions model =
+ Sub.none
- Sub.batch
- [ Mouse.downs MouseMsg
- , Keyboard.ups KeyMsg
- ]
main : Program Never Model Msg
main =
program
{ init = init
, view = view
, update = update
, subscriptions = subscriptions
} | 28 | 0.444444 | 14 | 14 |
73f4f8726e02883608d8d3cd791c0078f478e26c | src/projects/product-history.js | src/projects/product-history.js | import { inject, NewInstance } from 'aurelia-framework';
import { ProjectApi } from './api';
import { DialogService } from 'aurelia-dialog';
import { HistoryDialog } from './history-dialog';
@inject(ProjectApi, DialogService)
export class ProductHistory {
constructor(projectApi, dialogService) {
this.api = projectApi;
this.dialog = dialogService;
}
activate(params, routeMap) {
this.api.projectDetail(params.id).then(data => {
this.project = data;
this.getProducts();
});
}
getProducts() {
this.api.productsForProject(this.project.id, {with_data: 'True'}).then(data => {
this.products = data;
this.isLoading = false;
});
}
showData(data) {
console.log(data);
this.dialog.open({viewModel: HistoryDialog, model: data}).whenClosed(response => {
if (!response.wasCancelled) {
}
});
}
}
| import { inject, NewInstance } from 'aurelia-framework';
import { ProjectApi } from './api';
import { DialogService } from 'aurelia-dialog';
import { HistoryDialog } from './history-dialog';
@inject(ProjectApi, DialogService)
export class ProductHistory {
constructor(projectApi, dialogService) {
this.api = projectApi;
this.dialog = dialogService;
}
activate(params, routeMap) {
this.api.projectDetail(params.id).then(data => {
this.project = data;
this.getProducts();
});
}
getProducts() {
this.api.productsForProject(this.project.id, {with_data: 'True'}).then(data => {
this.products = data;
this.isLoading = false;
});
}
showData(data) {
this.dialog.open({viewModel: HistoryDialog, model: data}).whenClosed(response => {
if (!response.wasCancelled) {
}
});
}
}
| Remove debug info in product history | Remove debug info in product history
| JavaScript | mit | GETLIMS/LIMS-Frontend,GETLIMS/LIMS-Frontend | javascript | ## Code Before:
import { inject, NewInstance } from 'aurelia-framework';
import { ProjectApi } from './api';
import { DialogService } from 'aurelia-dialog';
import { HistoryDialog } from './history-dialog';
@inject(ProjectApi, DialogService)
export class ProductHistory {
constructor(projectApi, dialogService) {
this.api = projectApi;
this.dialog = dialogService;
}
activate(params, routeMap) {
this.api.projectDetail(params.id).then(data => {
this.project = data;
this.getProducts();
});
}
getProducts() {
this.api.productsForProject(this.project.id, {with_data: 'True'}).then(data => {
this.products = data;
this.isLoading = false;
});
}
showData(data) {
console.log(data);
this.dialog.open({viewModel: HistoryDialog, model: data}).whenClosed(response => {
if (!response.wasCancelled) {
}
});
}
}
## Instruction:
Remove debug info in product history
## Code After:
import { inject, NewInstance } from 'aurelia-framework';
import { ProjectApi } from './api';
import { DialogService } from 'aurelia-dialog';
import { HistoryDialog } from './history-dialog';
@inject(ProjectApi, DialogService)
export class ProductHistory {
constructor(projectApi, dialogService) {
this.api = projectApi;
this.dialog = dialogService;
}
activate(params, routeMap) {
this.api.projectDetail(params.id).then(data => {
this.project = data;
this.getProducts();
});
}
getProducts() {
this.api.productsForProject(this.project.id, {with_data: 'True'}).then(data => {
this.products = data;
this.isLoading = false;
});
}
showData(data) {
this.dialog.open({viewModel: HistoryDialog, model: data}).whenClosed(response => {
if (!response.wasCancelled) {
}
});
}
}
| import { inject, NewInstance } from 'aurelia-framework';
import { ProjectApi } from './api';
import { DialogService } from 'aurelia-dialog';
import { HistoryDialog } from './history-dialog';
@inject(ProjectApi, DialogService)
export class ProductHistory {
constructor(projectApi, dialogService) {
this.api = projectApi;
this.dialog = dialogService;
}
activate(params, routeMap) {
this.api.projectDetail(params.id).then(data => {
this.project = data;
this.getProducts();
});
}
getProducts() {
this.api.productsForProject(this.project.id, {with_data: 'True'}).then(data => {
this.products = data;
this.isLoading = false;
});
}
showData(data) {
- console.log(data);
this.dialog.open({viewModel: HistoryDialog, model: data}).whenClosed(response => {
if (!response.wasCancelled) {
}
});
}
} | 1 | 0.028571 | 0 | 1 |
311feea0170fa3aa68e611de38cab3c8b0bd9faa | apps/galleries_institutions/queries/partners_filter_query.coffee | apps/galleries_institutions/queries/partners_filter_query.coffee | module.exports =
"""
query partners_results($includeAggregations: Boolean!, $includeResults: Boolean!, $near: String, $category: [String], $type: [PartnerClassification], $page: Int, $term: String) {
category: filter_partners(eligible_for_listing:true, aggregations:[CATEGORY, TOTAL] size:0, near: $near, type: $type, default_profile_public:true, term: $term) @include(if: $includeAggregations) {
total
aggregations {
counts {
id
name
count
}
}
}
results: filter_partners(eligible_for_listing:true, aggregations:[TOTAL], sort: RELATIVE_SIZE_ASC, page: $page, size: 9, near: $near, partner_categories:$category type: $type, default_profile_public:true, term: $term) @include(if: $includeResults) {
total
hits {
... partner
}
}
}
#{require './partner_fragment.coffee'}
"""
| module.exports =
"""
query partners_results($includeAggregations: Boolean!, $includeResults: Boolean!, $near: String, $category: [String], $type: [PartnerClassification], $page: Int, $term: String) {
category: filter_partners(eligible_for_listing:true, aggregations:[CATEGORY, TOTAL] size:0, near: $near, type: $type, default_profile_public:true, term: $term) @include(if: $includeAggregations) {
total
aggregations {
counts {
id
name
count
}
}
}
results: filter_partners(eligible_for_listing:true, aggregations:[TOTAL], sort: RANDOM_SCORE_DESC, page: $page, size: 9, near: $near, partner_categories:$category type: $type, default_profile_public:true, term: $term) @include(if: $includeResults) {
total
hits {
... partner
}
}
}
#{require './partner_fragment.coffee'}
"""
| Use random sort instead of relative size for filtered partners on /galleries and /institutions. | Use random sort instead of relative size for filtered partners on /galleries and /institutions.
| CoffeeScript | mit | damassi/force,anandaroop/force,kanaabe/force,cavvia/force-1,joeyAghion/force,mzikherman/force,erikdstock/force,kanaabe/force,damassi/force,artsy/force-public,izakp/force,yuki24/force,artsy/force,oxaudo/force,izakp/force,yuki24/force,dblock/force,artsy/force-public,eessex/force,joeyAghion/force,anandaroop/force,xtina-starr/force,kanaabe/force,oxaudo/force,artsy/force,cavvia/force-1,oxaudo/force,cavvia/force-1,izakp/force,erikdstock/force,mzikherman/force,eessex/force,yuki24/force,artsy/force,joeyAghion/force,oxaudo/force,mzikherman/force,xtina-starr/force,yuki24/force,artsy/force,xtina-starr/force,erikdstock/force,eessex/force,dblock/force,mzikherman/force,izakp/force,xtina-starr/force,dblock/force,anandaroop/force,cavvia/force-1,damassi/force,kanaabe/force,anandaroop/force,eessex/force,erikdstock/force,kanaabe/force,joeyAghion/force,damassi/force | coffeescript | ## Code Before:
module.exports =
"""
query partners_results($includeAggregations: Boolean!, $includeResults: Boolean!, $near: String, $category: [String], $type: [PartnerClassification], $page: Int, $term: String) {
category: filter_partners(eligible_for_listing:true, aggregations:[CATEGORY, TOTAL] size:0, near: $near, type: $type, default_profile_public:true, term: $term) @include(if: $includeAggregations) {
total
aggregations {
counts {
id
name
count
}
}
}
results: filter_partners(eligible_for_listing:true, aggregations:[TOTAL], sort: RELATIVE_SIZE_ASC, page: $page, size: 9, near: $near, partner_categories:$category type: $type, default_profile_public:true, term: $term) @include(if: $includeResults) {
total
hits {
... partner
}
}
}
#{require './partner_fragment.coffee'}
"""
## Instruction:
Use random sort instead of relative size for filtered partners on /galleries and /institutions.
## Code After:
module.exports =
"""
query partners_results($includeAggregations: Boolean!, $includeResults: Boolean!, $near: String, $category: [String], $type: [PartnerClassification], $page: Int, $term: String) {
category: filter_partners(eligible_for_listing:true, aggregations:[CATEGORY, TOTAL] size:0, near: $near, type: $type, default_profile_public:true, term: $term) @include(if: $includeAggregations) {
total
aggregations {
counts {
id
name
count
}
}
}
results: filter_partners(eligible_for_listing:true, aggregations:[TOTAL], sort: RANDOM_SCORE_DESC, page: $page, size: 9, near: $near, partner_categories:$category type: $type, default_profile_public:true, term: $term) @include(if: $includeResults) {
total
hits {
... partner
}
}
}
#{require './partner_fragment.coffee'}
"""
| module.exports =
"""
query partners_results($includeAggregations: Boolean!, $includeResults: Boolean!, $near: String, $category: [String], $type: [PartnerClassification], $page: Int, $term: String) {
category: filter_partners(eligible_for_listing:true, aggregations:[CATEGORY, TOTAL] size:0, near: $near, type: $type, default_profile_public:true, term: $term) @include(if: $includeAggregations) {
total
aggregations {
counts {
id
name
count
}
}
}
- results: filter_partners(eligible_for_listing:true, aggregations:[TOTAL], sort: RELATIVE_SIZE_ASC, page: $page, size: 9, near: $near, partner_categories:$category type: $type, default_profile_public:true, term: $term) @include(if: $includeResults) {
? -- ^^^^^^^^^^^
+ results: filter_partners(eligible_for_listing:true, aggregations:[TOTAL], sort: RANDOM_SCORE_DESC, page: $page, size: 9, near: $near, partner_categories:$category type: $type, default_profile_public:true, term: $term) @include(if: $includeResults) {
? ^^^^^ ++++++++
total
hits {
... partner
}
}
}
#{require './partner_fragment.coffee'}
""" | 2 | 0.083333 | 1 | 1 |
9cba7c8c2648ec362ae5ffd643937e198cc15b1c | README.md | README.md |
Simple Android application where users can add items, edit them or delete them. The purpose was to explore [Realm DB](realm.io) instead of SQLite.
|
Simple Android application containing a list of items where a user can do any of the following with the items:
- Add
- Edit
- Delete
- Check off
The purpose was to explore [Realm DB](https://www.realm.io) instead of SQLite.

| Update readme and include gif | Update readme and include gif | Markdown | apache-2.0 | aleksandrTmk/TaskList | markdown | ## Code Before:
Simple Android application where users can add items, edit them or delete them. The purpose was to explore [Realm DB](realm.io) instead of SQLite.
## Instruction:
Update readme and include gif
## Code After:
Simple Android application containing a list of items where a user can do any of the following with the items:
- Add
- Edit
- Delete
- Check off
The purpose was to explore [Realm DB](https://www.realm.io) instead of SQLite.

|
- Simple Android application where users can add items, edit them or delete them. The purpose was to explore [Realm DB](realm.io) instead of SQLite.
+ Simple Android application containing a list of items where a user can do any of the following with the items:
+ - Add
+ - Edit
+ - Delete
+ - Check off
+
+ The purpose was to explore [Realm DB](https://www.realm.io) instead of SQLite.
+
+  | 10 | 5 | 9 | 1 |
bb4b2edf3c6827b778ac907eb132a1c1661c2400 | tennis_kata_referee/src/test/java/TennisGameTest.java | tennis_kata_referee/src/test/java/TennisGameTest.java | import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.InjectMocks;
import org.mockito.Mock;
import org.mockito.junit.MockitoJUnitRunner;
import static org.assertj.core.api.Assertions.assertThat;
@RunWith(MockitoJUnitRunner.class)
public class TennisGameTest {
@InjectMocks
private TennisGame tennisGame;
@Mock
private TennisGameScore tennisGameScore;
@Before
public void setUp() {
initTennisGameScore();
}
@Test
public void should_federer_wins_point_when_it_has_an_even_number() {
assertThat(tennisGame.isFedererWinPoint(2)).isTrue();
}
private void initTennisGameScore() {
tennisGameScore.init();
tennisGameScore.addPoint(0, 1, "Nadal");
tennisGameScore.addPoint(0, 2, "Nadal");
tennisGameScore.addPoint(0, 3, "Nadal");
tennisGameScore.addPoint(0, 4, "Nadal");
}
}
| import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.InjectMocks;
import org.mockito.Mock;
import org.mockito.junit.MockitoJUnitRunner;
import static org.assertj.core.api.Assertions.assertThat;
@RunWith(MockitoJUnitRunner.class)
public class TennisGameTest {
@InjectMocks
private TennisGame tennisGame;
@Mock
private TennisGameScore tennisGameScore;
@Before
public void setUp() {
initTennisGameScore();
}
@Test
public void should_federer_wins_point_when_it_has_an_even_number() {
assertThat(tennisGame.isFedererWinPoint(2)).isTrue();
}
@Test
public void should_nadal_wins_point_when_it_has_an_odd_number() {
assertThat(tennisGame.isFedererWinPoint(1)).isFalse();
}
private void initTennisGameScore() {
tennisGameScore.init();
tennisGameScore.addPoint(0, 1, "Nadal");
tennisGameScore.addPoint(0, 2, "Nadal");
tennisGameScore.addPoint(0, 3, "Nadal");
tennisGameScore.addPoint(0, 4, "Nadal");
}
}
| Test on winning point for Nadal | Test on winning point for Nadal
| Java | mit | YeahMama/kata | java | ## Code Before:
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.InjectMocks;
import org.mockito.Mock;
import org.mockito.junit.MockitoJUnitRunner;
import static org.assertj.core.api.Assertions.assertThat;
@RunWith(MockitoJUnitRunner.class)
public class TennisGameTest {
@InjectMocks
private TennisGame tennisGame;
@Mock
private TennisGameScore tennisGameScore;
@Before
public void setUp() {
initTennisGameScore();
}
@Test
public void should_federer_wins_point_when_it_has_an_even_number() {
assertThat(tennisGame.isFedererWinPoint(2)).isTrue();
}
private void initTennisGameScore() {
tennisGameScore.init();
tennisGameScore.addPoint(0, 1, "Nadal");
tennisGameScore.addPoint(0, 2, "Nadal");
tennisGameScore.addPoint(0, 3, "Nadal");
tennisGameScore.addPoint(0, 4, "Nadal");
}
}
## Instruction:
Test on winning point for Nadal
## Code After:
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.InjectMocks;
import org.mockito.Mock;
import org.mockito.junit.MockitoJUnitRunner;
import static org.assertj.core.api.Assertions.assertThat;
@RunWith(MockitoJUnitRunner.class)
public class TennisGameTest {
@InjectMocks
private TennisGame tennisGame;
@Mock
private TennisGameScore tennisGameScore;
@Before
public void setUp() {
initTennisGameScore();
}
@Test
public void should_federer_wins_point_when_it_has_an_even_number() {
assertThat(tennisGame.isFedererWinPoint(2)).isTrue();
}
@Test
public void should_nadal_wins_point_when_it_has_an_odd_number() {
assertThat(tennisGame.isFedererWinPoint(1)).isFalse();
}
private void initTennisGameScore() {
tennisGameScore.init();
tennisGameScore.addPoint(0, 1, "Nadal");
tennisGameScore.addPoint(0, 2, "Nadal");
tennisGameScore.addPoint(0, 3, "Nadal");
tennisGameScore.addPoint(0, 4, "Nadal");
}
}
| import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.InjectMocks;
import org.mockito.Mock;
import org.mockito.junit.MockitoJUnitRunner;
import static org.assertj.core.api.Assertions.assertThat;
@RunWith(MockitoJUnitRunner.class)
public class TennisGameTest {
@InjectMocks
private TennisGame tennisGame;
@Mock
private TennisGameScore tennisGameScore;
@Before
public void setUp() {
initTennisGameScore();
}
@Test
public void should_federer_wins_point_when_it_has_an_even_number() {
assertThat(tennisGame.isFedererWinPoint(2)).isTrue();
}
+ @Test
+ public void should_nadal_wins_point_when_it_has_an_odd_number() {
+ assertThat(tennisGame.isFedererWinPoint(1)).isFalse();
+ }
+
private void initTennisGameScore() {
tennisGameScore.init();
tennisGameScore.addPoint(0, 1, "Nadal");
tennisGameScore.addPoint(0, 2, "Nadal");
tennisGameScore.addPoint(0, 3, "Nadal");
tennisGameScore.addPoint(0, 4, "Nadal");
}
} | 5 | 0.135135 | 5 | 0 |
2d128c57964804a8d16935267859059693e817ea | .travis.yml | .travis.yml | language: crystal
install:
- shards install
script:
- crystal spec
- bin/ameba src
| language: crystal
install:
- shards install
script:
- crystal spec
- crystal tool format --check src spec
- bin/ameba src
| Add formatter check to Travis CI | Add formatter check to Travis CI
| YAML | mit | Sija/raven.cr | yaml | ## Code Before:
language: crystal
install:
- shards install
script:
- crystal spec
- bin/ameba src
## Instruction:
Add formatter check to Travis CI
## Code After:
language: crystal
install:
- shards install
script:
- crystal spec
- crystal tool format --check src spec
- bin/ameba src
| language: crystal
install:
- shards install
script:
- crystal spec
+ - crystal tool format --check src spec
- bin/ameba src | 1 | 0.125 | 1 | 0 |
cf02b2c13ced99bd7394fe07925f2a5cf19dd944 | Rendering/HybridOpenGL/Testing/Cxx/CMakeLists.txt | Rendering/HybridOpenGL/Testing/Cxx/CMakeLists.txt | set(MyTests "")
if(NOT APPLE)
# This is from the old build system - not working on Apple platform.
list(APPEND MyTests
TestImageDataLIC2D.cxx # This was segfaulting before modularization (and is now).
TestStructuredGridLIC2DXSlice.cxx
TestStructuredGridLIC2DYSlice.cxx
TestStructuredGridLIC2DZSlice.cxx
TestSurfaceLIC.cxx
)
endif()
# Use the testing object factory, to reduce boilerplate code in tests.
include(vtkTestingObjectFactory)
vtk_module_test_executable(${vtk-module}CxxTests ${Tests})
set(TestsToRun ${Tests})
list(REMOVE_ITEM TestsToRun CxxTests.cxx)
list(FIND TestsToRun TestSurfaceLIC.cxx RUN_TestSurfaceLIC)
if (${RUN_TestSurfaceLIC} GREATER -1)
add_test(NAME ${vtk-module}Cxx-SurfaceLIC
COMMAND ${vtk-module}CxxTests TestSurfaceLIC
-D ${VTK_DATA_ROOT}
-T ${VTK_TEST_OUTPUT_DIR}
-V Baseline/Rendering/TestSurfaceLIC.png)
endif()
# Add all the executables
foreach(test ${TestsToRun})
get_filename_component(TName ${test} NAME_WE)
if(VTK_DATA_ROOT)
add_test(NAME ${vtk-module}Cxx-${TName}
COMMAND ${vtk-module}CxxTests ${TName}
-D ${VTK_DATA_ROOT}
-T ${VTK_TEST_OUTPUT_DIR}
-V Baseline/Hybrid/${TName}.png)
else()
add_test(NAME ${vtk-module}Cxx-${TName}
COMMAND ${vtk-module}CxxTests ${TName})
endif()
endforeach()
| set(MyTests "")
if(NOT APPLE)
# This is from the old build system - not working on Apple platform.
list(APPEND MyTests
TestImageDataLIC2D.cxx # This was segfaulting before modularization (and is now).
TestStructuredGridLIC2DXSlice.cxx
TestStructuredGridLIC2DYSlice.cxx
TestStructuredGridLIC2DZSlice.cxx
TestSurfaceLIC.cxx
)
endif()
# Use the testing object factory, to reduce boilerplate code in tests.
include(vtkTestingObjectFactory)
vtk_module_test_executable(${vtk-module}CxxTests ${Tests})
set(TestsToRun ${Tests})
list(REMOVE_ITEM TestsToRun CxxTests.cxx)
# Add all the executables
foreach(test ${TestsToRun})
get_filename_component(TName ${test} NAME_WE)
if(VTK_DATA_ROOT)
set(_basedir Hybrid)
if("${TName}" STREQUAL "TestSurfaceLIC")
set(_basedir Rendering)
endif()
add_test(NAME ${vtk-module}Cxx-${TName}
COMMAND ${vtk-module}CxxTests ${TName}
-D ${VTK_DATA_ROOT}
-T ${VTK_TEST_OUTPUT_DIR}
-V Baseline/${_basedir}/${TName}.png)
else()
add_test(NAME ${vtk-module}Cxx-${TName}
COMMAND ${vtk-module}CxxTests ${TName})
endif()
endforeach()
| Set the correct baseline directory for TestSurfaceLIC. | Set the correct baseline directory for TestSurfaceLIC.
Change-Id: I50fabd7ecad1683e2afe40efd1ebc42568946354
| Text | bsd-3-clause | candy7393/VTK,demarle/VTK,candy7393/VTK,berendkleinhaneveld/VTK,candy7393/VTK,keithroe/vtkoptix,jmerkow/VTK,hendradarwin/VTK,SimVascular/VTK,sumedhasingla/VTK,biddisco/VTK,SimVascular/VTK,msmolens/VTK,gram526/VTK,gram526/VTK,sankhesh/VTK,sumedhasingla/VTK,mspark93/VTK,collects/VTK,sumedhasingla/VTK,ashray/VTK-EVM,demarle/VTK,mspark93/VTK,mspark93/VTK,SimVascular/VTK,johnkit/vtk-dev,gram526/VTK,candy7393/VTK,demarle/VTK,hendradarwin/VTK,biddisco/VTK,gram526/VTK,jmerkow/VTK,biddisco/VTK,demarle/VTK,jmerkow/VTK,SimVascular/VTK,msmolens/VTK,sumedhasingla/VTK,ashray/VTK-EVM,collects/VTK,SimVascular/VTK,ashray/VTK-EVM,mspark93/VTK,collects/VTK,jmerkow/VTK,collects/VTK,ashray/VTK-EVM,gram526/VTK,hendradarwin/VTK,johnkit/vtk-dev,jmerkow/VTK,sankhesh/VTK,ashray/VTK-EVM,sankhesh/VTK,sankhesh/VTK,biddisco/VTK,demarle/VTK,berendkleinhaneveld/VTK,sumedhasingla/VTK,demarle/VTK,hendradarwin/VTK,sumedhasingla/VTK,johnkit/vtk-dev,keithroe/vtkoptix,sankhesh/VTK,mspark93/VTK,ashray/VTK-EVM,SimVascular/VTK,hendradarwin/VTK,hendradarwin/VTK,sumedhasingla/VTK,msmolens/VTK,sankhesh/VTK,msmolens/VTK,keithroe/vtkoptix,sankhesh/VTK,jmerkow/VTK,jmerkow/VTK,msmolens/VTK,keithroe/vtkoptix,gram526/VTK,johnkit/vtk-dev,berendkleinhaneveld/VTK,demarle/VTK,msmolens/VTK,candy7393/VTK,keithroe/vtkoptix,SimVascular/VTK,biddisco/VTK,jmerkow/VTK,johnkit/vtk-dev,gram526/VTK,berendkleinhaneveld/VTK,candy7393/VTK,keithroe/vtkoptix,ashray/VTK-EVM,demarle/VTK,mspark93/VTK,collects/VTK,msmolens/VTK,SimVascular/VTK,johnkit/vtk-dev,berendkleinhaneveld/VTK,gram526/VTK,mspark93/VTK,msmolens/VTK,hendradarwin/VTK,johnkit/vtk-dev,berendkleinhaneveld/VTK,biddisco/VTK,ashray/VTK-EVM,berendkleinhaneveld/VTK,collects/VTK,sankhesh/VTK,keithroe/vtkoptix,keithroe/vtkoptix,biddisco/VTK,candy7393/VTK,candy7393/VTK,sumedhasingla/VTK,mspark93/VTK | text | ## Code Before:
set(MyTests "")
if(NOT APPLE)
# This is from the old build system - not working on Apple platform.
list(APPEND MyTests
TestImageDataLIC2D.cxx # This was segfaulting before modularization (and is now).
TestStructuredGridLIC2DXSlice.cxx
TestStructuredGridLIC2DYSlice.cxx
TestStructuredGridLIC2DZSlice.cxx
TestSurfaceLIC.cxx
)
endif()
# Use the testing object factory, to reduce boilerplate code in tests.
include(vtkTestingObjectFactory)
vtk_module_test_executable(${vtk-module}CxxTests ${Tests})
set(TestsToRun ${Tests})
list(REMOVE_ITEM TestsToRun CxxTests.cxx)
list(FIND TestsToRun TestSurfaceLIC.cxx RUN_TestSurfaceLIC)
if (${RUN_TestSurfaceLIC} GREATER -1)
add_test(NAME ${vtk-module}Cxx-SurfaceLIC
COMMAND ${vtk-module}CxxTests TestSurfaceLIC
-D ${VTK_DATA_ROOT}
-T ${VTK_TEST_OUTPUT_DIR}
-V Baseline/Rendering/TestSurfaceLIC.png)
endif()
# Add all the executables
foreach(test ${TestsToRun})
get_filename_component(TName ${test} NAME_WE)
if(VTK_DATA_ROOT)
add_test(NAME ${vtk-module}Cxx-${TName}
COMMAND ${vtk-module}CxxTests ${TName}
-D ${VTK_DATA_ROOT}
-T ${VTK_TEST_OUTPUT_DIR}
-V Baseline/Hybrid/${TName}.png)
else()
add_test(NAME ${vtk-module}Cxx-${TName}
COMMAND ${vtk-module}CxxTests ${TName})
endif()
endforeach()
## Instruction:
Set the correct baseline directory for TestSurfaceLIC.
Change-Id: I50fabd7ecad1683e2afe40efd1ebc42568946354
## Code After:
set(MyTests "")
if(NOT APPLE)
# This is from the old build system - not working on Apple platform.
list(APPEND MyTests
TestImageDataLIC2D.cxx # This was segfaulting before modularization (and is now).
TestStructuredGridLIC2DXSlice.cxx
TestStructuredGridLIC2DYSlice.cxx
TestStructuredGridLIC2DZSlice.cxx
TestSurfaceLIC.cxx
)
endif()
# Use the testing object factory, to reduce boilerplate code in tests.
include(vtkTestingObjectFactory)
vtk_module_test_executable(${vtk-module}CxxTests ${Tests})
set(TestsToRun ${Tests})
list(REMOVE_ITEM TestsToRun CxxTests.cxx)
# Add all the executables
foreach(test ${TestsToRun})
get_filename_component(TName ${test} NAME_WE)
if(VTK_DATA_ROOT)
set(_basedir Hybrid)
if("${TName}" STREQUAL "TestSurfaceLIC")
set(_basedir Rendering)
endif()
add_test(NAME ${vtk-module}Cxx-${TName}
COMMAND ${vtk-module}CxxTests ${TName}
-D ${VTK_DATA_ROOT}
-T ${VTK_TEST_OUTPUT_DIR}
-V Baseline/${_basedir}/${TName}.png)
else()
add_test(NAME ${vtk-module}Cxx-${TName}
COMMAND ${vtk-module}CxxTests ${TName})
endif()
endforeach()
| set(MyTests "")
if(NOT APPLE)
# This is from the old build system - not working on Apple platform.
list(APPEND MyTests
TestImageDataLIC2D.cxx # This was segfaulting before modularization (and is now).
TestStructuredGridLIC2DXSlice.cxx
TestStructuredGridLIC2DYSlice.cxx
TestStructuredGridLIC2DZSlice.cxx
TestSurfaceLIC.cxx
)
endif()
# Use the testing object factory, to reduce boilerplate code in tests.
include(vtkTestingObjectFactory)
vtk_module_test_executable(${vtk-module}CxxTests ${Tests})
set(TestsToRun ${Tests})
list(REMOVE_ITEM TestsToRun CxxTests.cxx)
- list(FIND TestsToRun TestSurfaceLIC.cxx RUN_TestSurfaceLIC)
- if (${RUN_TestSurfaceLIC} GREATER -1)
- add_test(NAME ${vtk-module}Cxx-SurfaceLIC
- COMMAND ${vtk-module}CxxTests TestSurfaceLIC
- -D ${VTK_DATA_ROOT}
- -T ${VTK_TEST_OUTPUT_DIR}
- -V Baseline/Rendering/TestSurfaceLIC.png)
- endif()
-
# Add all the executables
foreach(test ${TestsToRun})
get_filename_component(TName ${test} NAME_WE)
if(VTK_DATA_ROOT)
+ set(_basedir Hybrid)
+ if("${TName}" STREQUAL "TestSurfaceLIC")
+ set(_basedir Rendering)
+ endif()
add_test(NAME ${vtk-module}Cxx-${TName}
COMMAND ${vtk-module}CxxTests ${TName}
-D ${VTK_DATA_ROOT}
-T ${VTK_TEST_OUTPUT_DIR}
- -V Baseline/Hybrid/${TName}.png)
? ^^ ^^
+ -V Baseline/${_basedir}/${TName}.png)
? ^^^ +++++ ^
else()
add_test(NAME ${vtk-module}Cxx-${TName}
COMMAND ${vtk-module}CxxTests ${TName})
endif()
endforeach() | 15 | 0.340909 | 5 | 10 |
c9478d183fd69649cc479d77b36eb5734b778c4b | .landscape.yml | .landscape.yml | python-targets:
- 3
max-line-length: 120
ignore-paths:
- odinweb/_compat
| python-targets:
- 3
max-line-length: 120
ignore-paths:
- odinweb/_compat
pylint:
disable:
- too-many-arguments
| Disable too-many-arguments warning as this is used to simplify API! | Disable too-many-arguments warning as this is used to simplify API!
| YAML | bsd-3-clause | python-odin/odinweb,python-odin/odinweb | yaml | ## Code Before:
python-targets:
- 3
max-line-length: 120
ignore-paths:
- odinweb/_compat
## Instruction:
Disable too-many-arguments warning as this is used to simplify API!
## Code After:
python-targets:
- 3
max-line-length: 120
ignore-paths:
- odinweb/_compat
pylint:
disable:
- too-many-arguments
| python-targets:
- 3
max-line-length: 120
ignore-paths:
- odinweb/_compat
+ pylint:
+ disable:
+ - too-many-arguments | 3 | 0.6 | 3 | 0 |
e45f219a13b8d7c130fa64847026b81866e04535 | lib/Predictions.js | lib/Predictions.js | import React, { Component } from 'react';
import {
StyleSheet,
FlatList,
View
} from 'react-native';
import Prediction from './Prediction';
class Predictions extends Component {
constructor(props) {
super(props);
}
render() {
return (
<View style={style.container}>
<FlatList
data={this.props.predictions}
keyExtractor={this._keyExtractor}
renderItem={this._renderItem} />
</View>
);
}
_keyExtractor = (prediction) => {
return prediction.id;
}
_renderItem = (data) => {
return (
<Prediction
prediction={data.item}
title={data.item.description}
description={data.item.description}
onPress={this.props.onPressPrediction} />
);
}
}
export const style = StyleSheet.create({
container: {
backgroundColor: 'white',
},
});
export default Predictions;
| import React, { Component } from 'react';
import {
StyleSheet,
FlatList,
View
} from 'react-native';
import Prediction from './Prediction';
class Predictions extends Component {
constructor(props) {
super(props);
}
render() {
return (
<View style={style.container}>
<FlatList
data={this.props.predictions}
keyExtractor={this._keyExtractor}
renderItem={this._renderItem} />
</View>
);
}
_keyExtractor = (prediction) => {
return prediction.place_id;
}
_renderItem = (data) => {
return (
<Prediction
prediction={data.item}
title={data.item.structured_formatting.main_text}
description={data.item.structured_formatting.secondary_text}
onPress={this.props.onPressPrediction} />
);
}
}
export const style = StyleSheet.create({
container: {
backgroundColor: 'white',
},
});
export default Predictions;
| Use correct properties from predictions response | Use correct properties from predictions response
| JavaScript | mit | chrislam/react-native-google-place-autocomplete | javascript | ## Code Before:
import React, { Component } from 'react';
import {
StyleSheet,
FlatList,
View
} from 'react-native';
import Prediction from './Prediction';
class Predictions extends Component {
constructor(props) {
super(props);
}
render() {
return (
<View style={style.container}>
<FlatList
data={this.props.predictions}
keyExtractor={this._keyExtractor}
renderItem={this._renderItem} />
</View>
);
}
_keyExtractor = (prediction) => {
return prediction.id;
}
_renderItem = (data) => {
return (
<Prediction
prediction={data.item}
title={data.item.description}
description={data.item.description}
onPress={this.props.onPressPrediction} />
);
}
}
export const style = StyleSheet.create({
container: {
backgroundColor: 'white',
},
});
export default Predictions;
## Instruction:
Use correct properties from predictions response
## Code After:
import React, { Component } from 'react';
import {
StyleSheet,
FlatList,
View
} from 'react-native';
import Prediction from './Prediction';
class Predictions extends Component {
constructor(props) {
super(props);
}
render() {
return (
<View style={style.container}>
<FlatList
data={this.props.predictions}
keyExtractor={this._keyExtractor}
renderItem={this._renderItem} />
</View>
);
}
_keyExtractor = (prediction) => {
return prediction.place_id;
}
_renderItem = (data) => {
return (
<Prediction
prediction={data.item}
title={data.item.structured_formatting.main_text}
description={data.item.structured_formatting.secondary_text}
onPress={this.props.onPressPrediction} />
);
}
}
export const style = StyleSheet.create({
container: {
backgroundColor: 'white',
},
});
export default Predictions;
| import React, { Component } from 'react';
import {
StyleSheet,
FlatList,
View
} from 'react-native';
import Prediction from './Prediction';
class Predictions extends Component {
constructor(props) {
super(props);
}
render() {
return (
<View style={style.container}>
<FlatList
data={this.props.predictions}
keyExtractor={this._keyExtractor}
renderItem={this._renderItem} />
</View>
);
}
_keyExtractor = (prediction) => {
- return prediction.id;
+ return prediction.place_id;
? ++++++
}
_renderItem = (data) => {
return (
<Prediction
prediction={data.item}
- title={data.item.description}
- description={data.item.description}
+ title={data.item.structured_formatting.main_text}
+ description={data.item.structured_formatting.secondary_text}
onPress={this.props.onPressPrediction} />
);
}
}
export const style = StyleSheet.create({
container: {
backgroundColor: 'white',
},
});
export default Predictions; | 6 | 0.130435 | 3 | 3 |
e501b91a4a8f680ed453a6ad372f07d0836ab42b | Core/Code/Testing/mitkRenderingTestHelper.h | Core/Code/Testing/mitkRenderingTestHelper.h | /*=========================================================================
Program: Medical Imaging & Interaction Toolkit
Language: C++
Date: $Date: 2010-03-31 17:34:48 +0200 (Wed, 31 Mar 2010) $
Version: $Revision: 21985 $
Copyright (c) German Cancer Research Center, Division of Medical and
Biological Informatics. All rights reserved.
See MITKCopyright.txt or http://www.mitk.org/copyright.html for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notices for more information.
=========================================================================*/
#ifndef mitkRenderingTestHelper_h
#define mitkRenderingTestHelper_h
#include <string>
#include <vtkSmartPointer.h>
#include <vtkRenderWindow.h>
#include <mitkRenderWindow.h>
class vtkRenderWindow;
class vtkRenderer;
namespace mitk
{
class DataStorage;
}
class MITK_CORE_EXPORT mitkRenderingTestHelper
{
public:
mitkRenderingTestHelper(int width, int height, mitk::DataStorage* ds);
~mitkRenderingTestHelper();
vtkRenderer* GetVtkRenderer();
vtkRenderWindow* GetVtkRenderWindow();
void SaveAsPNG(std::string fileName);
protected:
mitk::RenderWindow::Pointer m_RenderWindow;
};
#endif
| /*=========================================================================
Program: Medical Imaging & Interaction Toolkit
Language: C++
Date: $Date: 2010-03-31 17:34:48 +0200 (Wed, 31 Mar 2010) $
Version: $Revision: 21985 $
Copyright (c) German Cancer Research Center, Division of Medical and
Biological Informatics. All rights reserved.
See MITKCopyright.txt or http://www.mitk.org/copyright.html for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notices for more information.
=========================================================================*/
#ifndef mitkRenderingTestHelper_h
#define mitkRenderingTestHelper_h
#include <string>
#include <vtkSmartPointer.h>
#include <vtkRenderWindow.h>
#include <mitkRenderWindow.h>
class vtkRenderWindow;
class vtkRenderer;
namespace mitk
{
class DataStorage;
}
class mitkRenderingTestHelper
{
public:
mitkRenderingTestHelper(int width, int height, mitk::DataStorage* ds);
~mitkRenderingTestHelper();
vtkRenderer* GetVtkRenderer();
vtkRenderWindow* GetVtkRenderWindow();
void SaveAsPNG(std::string fileName);
protected:
mitk::RenderWindow::Pointer m_RenderWindow;
};
#endif
| Fix linker warnings in rendering tests | Fix linker warnings in rendering tests
| C | bsd-3-clause | nocnokneo/MITK,danielknorr/MITK,iwegner/MITK,NifTK/MITK,danielknorr/MITK,danielknorr/MITK,NifTK/MITK,lsanzdiaz/MITK-BiiG,MITK/MITK,nocnokneo/MITK,rfloca/MITK,fmilano/mitk,fmilano/mitk,lsanzdiaz/MITK-BiiG,rfloca/MITK,MITK/MITK,lsanzdiaz/MITK-BiiG,iwegner/MITK,lsanzdiaz/MITK-BiiG,iwegner/MITK,MITK/MITK,NifTK/MITK,danielknorr/MITK,fmilano/mitk,fmilano/mitk,rfloca/MITK,danielknorr/MITK,MITK/MITK,iwegner/MITK,RabadanLab/MITKats,danielknorr/MITK,NifTK/MITK,danielknorr/MITK,nocnokneo/MITK,nocnokneo/MITK,RabadanLab/MITKats,nocnokneo/MITK,fmilano/mitk,iwegner/MITK,RabadanLab/MITKats,nocnokneo/MITK,rfloca/MITK,MITK/MITK,rfloca/MITK,lsanzdiaz/MITK-BiiG,fmilano/mitk,nocnokneo/MITK,iwegner/MITK,lsanzdiaz/MITK-BiiG,NifTK/MITK,RabadanLab/MITKats,MITK/MITK,rfloca/MITK,RabadanLab/MITKats,RabadanLab/MITKats,NifTK/MITK,fmilano/mitk,lsanzdiaz/MITK-BiiG,rfloca/MITK,lsanzdiaz/MITK-BiiG | c | ## Code Before:
/*=========================================================================
Program: Medical Imaging & Interaction Toolkit
Language: C++
Date: $Date: 2010-03-31 17:34:48 +0200 (Wed, 31 Mar 2010) $
Version: $Revision: 21985 $
Copyright (c) German Cancer Research Center, Division of Medical and
Biological Informatics. All rights reserved.
See MITKCopyright.txt or http://www.mitk.org/copyright.html for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notices for more information.
=========================================================================*/
#ifndef mitkRenderingTestHelper_h
#define mitkRenderingTestHelper_h
#include <string>
#include <vtkSmartPointer.h>
#include <vtkRenderWindow.h>
#include <mitkRenderWindow.h>
class vtkRenderWindow;
class vtkRenderer;
namespace mitk
{
class DataStorage;
}
class MITK_CORE_EXPORT mitkRenderingTestHelper
{
public:
mitkRenderingTestHelper(int width, int height, mitk::DataStorage* ds);
~mitkRenderingTestHelper();
vtkRenderer* GetVtkRenderer();
vtkRenderWindow* GetVtkRenderWindow();
void SaveAsPNG(std::string fileName);
protected:
mitk::RenderWindow::Pointer m_RenderWindow;
};
#endif
## Instruction:
Fix linker warnings in rendering tests
## Code After:
/*=========================================================================
Program: Medical Imaging & Interaction Toolkit
Language: C++
Date: $Date: 2010-03-31 17:34:48 +0200 (Wed, 31 Mar 2010) $
Version: $Revision: 21985 $
Copyright (c) German Cancer Research Center, Division of Medical and
Biological Informatics. All rights reserved.
See MITKCopyright.txt or http://www.mitk.org/copyright.html for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notices for more information.
=========================================================================*/
#ifndef mitkRenderingTestHelper_h
#define mitkRenderingTestHelper_h
#include <string>
#include <vtkSmartPointer.h>
#include <vtkRenderWindow.h>
#include <mitkRenderWindow.h>
class vtkRenderWindow;
class vtkRenderer;
namespace mitk
{
class DataStorage;
}
class mitkRenderingTestHelper
{
public:
mitkRenderingTestHelper(int width, int height, mitk::DataStorage* ds);
~mitkRenderingTestHelper();
vtkRenderer* GetVtkRenderer();
vtkRenderWindow* GetVtkRenderWindow();
void SaveAsPNG(std::string fileName);
protected:
mitk::RenderWindow::Pointer m_RenderWindow;
};
#endif
| /*=========================================================================
Program: Medical Imaging & Interaction Toolkit
Language: C++
Date: $Date: 2010-03-31 17:34:48 +0200 (Wed, 31 Mar 2010) $
Version: $Revision: 21985 $
Copyright (c) German Cancer Research Center, Division of Medical and
Biological Informatics. All rights reserved.
See MITKCopyright.txt or http://www.mitk.org/copyright.html for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notices for more information.
=========================================================================*/
#ifndef mitkRenderingTestHelper_h
#define mitkRenderingTestHelper_h
#include <string>
#include <vtkSmartPointer.h>
#include <vtkRenderWindow.h>
#include <mitkRenderWindow.h>
class vtkRenderWindow;
class vtkRenderer;
namespace mitk
{
class DataStorage;
}
- class MITK_CORE_EXPORT mitkRenderingTestHelper
? -----------------
+ class mitkRenderingTestHelper
{
public:
mitkRenderingTestHelper(int width, int height, mitk::DataStorage* ds);
~mitkRenderingTestHelper();
vtkRenderer* GetVtkRenderer();
vtkRenderWindow* GetVtkRenderWindow();
void SaveAsPNG(std::string fileName);
protected:
mitk::RenderWindow::Pointer m_RenderWindow;
};
#endif
| 2 | 0.039216 | 1 | 1 |
3ceb06bb42c156b58e25888b8c97c41f8b320de0 | sixpack/static/js/script.js | sixpack/static/js/script.js | $(function () {
// Display correct URL on "no-experiments" page.
$('#base-domain').html(document.location.origin);
// Draw charts on Details page.
if ($('#details-page').length) {
var id, alternative_name, color;
var colors = $('#details-page').find('span.circle').get();
var chart = new Chart($('.chart').data('experiment'), function () {
$('.chart').each(function (index, val) {
id = $(this).attr('id');
alternative_name = id.substring(6, id.length);
color = $(colors[index]).css('stroke');
chart.drawAlternative(alternative_name, color);
});
});
}
// Draw charts on Dashboard page.
$('#dashboard-page ul.experiments .chart').each(function (index, val) {
var colors = [];
var circles = $(this).parent().find('span.circle').get();
_.each(circles, function (val, index) {
colors.push($(circles[index]).css('stroke'));
});
var experiment_name = $(this).data('experiment');
var chart = new Chart(experiment_name, function () {
chart.drawExperiment(experiment_name, colors);
});
});
}); | $(function () {
// Display correct URL on "no-experiments" page.
$('#base-domain').html(document.location.origin);
// Draw charts on Details page.
if ($('#details-page').length) {
var id, alternative_name, color;
var colors = $('#details-page').find('span.circle').get();
var chart = new Chart($('.chart').data('experiment'), function () {
$('.chart').each(function (index, val) {
id = $(this).attr('id');
alternative_name = id.substring(6, id.length);
color = $(colors[index]).css('stroke');
chart.drawAlternative(alternative_name, color);
});
});
}
// Draw charts on Dashboard page.
if ($('#dashboard-page').length) {
$('li').waypoint(function (direction) {
var el = $(this).find('.chart');
// Prevent loading more than once:
if (el.data('loaded')) return;
el.data('loaded', true);
var colors = [];
var circles = el.parent().find('span.circle').get();
_.each(circles, function (val, index) {
colors.push($(circles[index]).css('stroke'));
});
var experiment_name = el.data('experiment');
var chart = new Chart(experiment_name, function () {
chart.drawExperiment(experiment_name, colors);
});
}, {
offset: 'bottom-in-view'
});
}
}); | Load Dashboard charts on scroll. | Load Dashboard charts on scroll.
| JavaScript | bsd-2-clause | seatgeek/sixpack,seatgeek/sixpack,llonchj/sixpack,vpuzzella/sixpack,vpuzzella/sixpack,nickveenhof/sixpack,blackskad/sixpack,smokymountains/sixpack,llonchj/sixpack,spjwebster/sixpack,llonchj/sixpack,blackskad/sixpack,vpuzzella/sixpack,smokymountains/sixpack,seatgeek/sixpack,seatgeek/sixpack,vpuzzella/sixpack,nickveenhof/sixpack,nickveenhof/sixpack,blackskad/sixpack,smokymountains/sixpack,spjwebster/sixpack,blackskad/sixpack,llonchj/sixpack,spjwebster/sixpack | javascript | ## Code Before:
$(function () {
// Display correct URL on "no-experiments" page.
$('#base-domain').html(document.location.origin);
// Draw charts on Details page.
if ($('#details-page').length) {
var id, alternative_name, color;
var colors = $('#details-page').find('span.circle').get();
var chart = new Chart($('.chart').data('experiment'), function () {
$('.chart').each(function (index, val) {
id = $(this).attr('id');
alternative_name = id.substring(6, id.length);
color = $(colors[index]).css('stroke');
chart.drawAlternative(alternative_name, color);
});
});
}
// Draw charts on Dashboard page.
$('#dashboard-page ul.experiments .chart').each(function (index, val) {
var colors = [];
var circles = $(this).parent().find('span.circle').get();
_.each(circles, function (val, index) {
colors.push($(circles[index]).css('stroke'));
});
var experiment_name = $(this).data('experiment');
var chart = new Chart(experiment_name, function () {
chart.drawExperiment(experiment_name, colors);
});
});
});
## Instruction:
Load Dashboard charts on scroll.
## Code After:
$(function () {
// Display correct URL on "no-experiments" page.
$('#base-domain').html(document.location.origin);
// Draw charts on Details page.
if ($('#details-page').length) {
var id, alternative_name, color;
var colors = $('#details-page').find('span.circle').get();
var chart = new Chart($('.chart').data('experiment'), function () {
$('.chart').each(function (index, val) {
id = $(this).attr('id');
alternative_name = id.substring(6, id.length);
color = $(colors[index]).css('stroke');
chart.drawAlternative(alternative_name, color);
});
});
}
// Draw charts on Dashboard page.
if ($('#dashboard-page').length) {
$('li').waypoint(function (direction) {
var el = $(this).find('.chart');
// Prevent loading more than once:
if (el.data('loaded')) return;
el.data('loaded', true);
var colors = [];
var circles = el.parent().find('span.circle').get();
_.each(circles, function (val, index) {
colors.push($(circles[index]).css('stroke'));
});
var experiment_name = el.data('experiment');
var chart = new Chart(experiment_name, function () {
chart.drawExperiment(experiment_name, colors);
});
}, {
offset: 'bottom-in-view'
});
}
}); | $(function () {
// Display correct URL on "no-experiments" page.
$('#base-domain').html(document.location.origin);
// Draw charts on Details page.
if ($('#details-page').length) {
var id, alternative_name, color;
var colors = $('#details-page').find('span.circle').get();
var chart = new Chart($('.chart').data('experiment'), function () {
$('.chart').each(function (index, val) {
id = $(this).attr('id');
alternative_name = id.substring(6, id.length);
color = $(colors[index]).css('stroke');
chart.drawAlternative(alternative_name, color);
});
});
}
// Draw charts on Dashboard page.
- $('#dashboard-page ul.experiments .chart').each(function (index, val) {
+ if ($('#dashboard-page').length) {
+ $('li').waypoint(function (direction) {
+ var el = $(this).find('.chart');
+
+ // Prevent loading more than once:
+ if (el.data('loaded')) return;
+ el.data('loaded', true);
+
- var colors = [];
+ var colors = [];
? ++
- var circles = $(this).parent().find('span.circle').get();
? ^^^^^^^
+ var circles = el.parent().find('span.circle').get();
? ++ ^^
- _.each(circles, function (val, index) {
+ _.each(circles, function (val, index) {
? ++
- colors.push($(circles[index]).css('stroke'));
+ colors.push($(circles[index]).css('stroke'));
? ++
+ });
+ var experiment_name = el.data('experiment');
+ var chart = new Chart(experiment_name, function () {
+ chart.drawExperiment(experiment_name, colors);
+ });
+ }, {
+ offset: 'bottom-in-view'
});
- var experiment_name = $(this).data('experiment');
- var chart = new Chart(experiment_name, function () {
- chart.drawExperiment(experiment_name, colors);
- });
- });
? --
+ }
}); | 30 | 0.9375 | 20 | 10 |
4db65f97ded39d02e9f8a8fb686f1b3a9ff282f1 | .travis.yml | .travis.yml | language: python
python:
- 2.6
- 2.7
- 3.3
- 3.4
env:
matrix:
- DJANGO=1.2
- DJANGO=1.3
- DJANGO=1.4
- DJANGO=1.5
- DJANGO=1.6
- DJANGO=1.7
matrix:
exclude:
- python: 3.3
env: DJANGO=1.3
- python: 3.3
env: DJANGO=1.4
- python: 3.4
env: DJANGO=1.3
- python: 3.4
env: DJANGO=1.4
include:
- python: 2.7
env: DJANGO=1.6 COVERAGE=true
allow_failures:
- env: COVERAGE=true
install:
- pip install --quiet --use-mirrors "Django>="$DJANGO",<"$DJANGO".99" flake8
- make install
script:
- make flake8 test
after_script:
- if [ $COVERAGE == "true" ]; then
pip install --quiet --use-mirrors python-coveralls
make coverage;
coverage report;
coveralls;
fi
| language: python
python:
- 2.6
- 2.7
- 3.3
- 3.4
env:
matrix:
- DJANGO=1.2
- DJANGO=1.3
- DJANGO=1.4
- DJANGO=1.5
- DJANGO=1.6
- DJANGO=1.7
matrix:
exclude:
- python: 3.3
env: DJANGO=1.2
- python: 3.3
env: DJANGO=1.3
- python: 3.3
env: DJANGO=1.4
- python: 3.4
env: DJANGO=1.2
- python: 3.4
env: DJANGO=1.3
- python: 3.4
env: DJANGO=1.4
include:
- python: 2.7
env: DJANGO=1.6 COVERAGE=true
allow_failures:
- env: COVERAGE=true
install:
- pip install --quiet --use-mirrors "Django>="$DJANGO",<"$DJANGO".99" flake8
- make install
script:
- make flake8 test
after_script:
- if [ $COVERAGE == "true" ]; then
pip install --quiet --use-mirrors python-coveralls
make coverage;
coverage report;
coveralls;
fi
| Exclude Django 1.2 on Python 3.x | Exclude Django 1.2 on Python 3.x | YAML | mit | 5monkeys/django-viewlet,5monkeys/django-viewlet | yaml | ## Code Before:
language: python
python:
- 2.6
- 2.7
- 3.3
- 3.4
env:
matrix:
- DJANGO=1.2
- DJANGO=1.3
- DJANGO=1.4
- DJANGO=1.5
- DJANGO=1.6
- DJANGO=1.7
matrix:
exclude:
- python: 3.3
env: DJANGO=1.3
- python: 3.3
env: DJANGO=1.4
- python: 3.4
env: DJANGO=1.3
- python: 3.4
env: DJANGO=1.4
include:
- python: 2.7
env: DJANGO=1.6 COVERAGE=true
allow_failures:
- env: COVERAGE=true
install:
- pip install --quiet --use-mirrors "Django>="$DJANGO",<"$DJANGO".99" flake8
- make install
script:
- make flake8 test
after_script:
- if [ $COVERAGE == "true" ]; then
pip install --quiet --use-mirrors python-coveralls
make coverage;
coverage report;
coveralls;
fi
## Instruction:
Exclude Django 1.2 on Python 3.x
## Code After:
language: python
python:
- 2.6
- 2.7
- 3.3
- 3.4
env:
matrix:
- DJANGO=1.2
- DJANGO=1.3
- DJANGO=1.4
- DJANGO=1.5
- DJANGO=1.6
- DJANGO=1.7
matrix:
exclude:
- python: 3.3
env: DJANGO=1.2
- python: 3.3
env: DJANGO=1.3
- python: 3.3
env: DJANGO=1.4
- python: 3.4
env: DJANGO=1.2
- python: 3.4
env: DJANGO=1.3
- python: 3.4
env: DJANGO=1.4
include:
- python: 2.7
env: DJANGO=1.6 COVERAGE=true
allow_failures:
- env: COVERAGE=true
install:
- pip install --quiet --use-mirrors "Django>="$DJANGO",<"$DJANGO".99" flake8
- make install
script:
- make flake8 test
after_script:
- if [ $COVERAGE == "true" ]; then
pip install --quiet --use-mirrors python-coveralls
make coverage;
coverage report;
coveralls;
fi
| language: python
python:
- 2.6
- 2.7
- 3.3
- 3.4
env:
matrix:
- DJANGO=1.2
- DJANGO=1.3
- DJANGO=1.4
- DJANGO=1.5
- DJANGO=1.6
- DJANGO=1.7
matrix:
exclude:
- python: 3.3
+ env: DJANGO=1.2
+ - python: 3.3
env: DJANGO=1.3
- python: 3.3
env: DJANGO=1.4
+ - python: 3.4
+ env: DJANGO=1.2
- python: 3.4
env: DJANGO=1.3
- python: 3.4
env: DJANGO=1.4
include:
- python: 2.7
env: DJANGO=1.6 COVERAGE=true
allow_failures:
- env: COVERAGE=true
install:
- pip install --quiet --use-mirrors "Django>="$DJANGO",<"$DJANGO".99" flake8
- make install
script:
- make flake8 test
after_script:
- if [ $COVERAGE == "true" ]; then
pip install --quiet --use-mirrors python-coveralls
make coverage;
coverage report;
coveralls;
fi | 4 | 0.085106 | 4 | 0 |
cb9d79c1b5911a8e4f4cafa4d9bbc2bbc7a13e0d | api/config/routes.rb | api/config/routes.rb | Rails.application.routes.draw do
namespace :v1 do
get 'ping', to: 'ping#ping'
get 'repo/*all', constraints: { all: /.*/ }, to: 'repo#file'
get 'clubs/intake', to: 'intake#show'
post 'leaders/intake'
post 'cloud9/send_invite'
resources :clubs, only: [:index, :show]
resources :club_applications, only: [:create]
resources :tech_domain_redemptions, only: [:create]
resources :donations, only: [:create]
namespace :home do
resources :slack_users, only: [:index]
end
namespace :analytics do
post 'identify'
post 'track'
post 'page'
post 'group'
end
namespace :hackbot do
post 'auth', to: 'auth#create'
namespace :webhooks do
post 'interactive_messages'
post 'events'
end
end
namespace :slack_invitation do
resources :invite, only: [:create, :show]
resources :webhook, only: [:create]
resources :strategies, only: [:show]
end
end
end
# rubocop:enable Metrics/BlockLength
| Rails.application.routes.draw do
namespace :v1 do
get 'ping', to: 'ping#ping'
get 'repo/*all', constraints: { all: /.*/ }, to: 'repo#file'
get 'clubs/intake', to: 'intake#show'
post 'leaders/intake'
post 'cloud9/send_invite'
resources :clubs, only: [:index, :show]
resources :club_applications, only: [:create]
resources :tech_domain_redemptions, only: [:create]
resources :donations, only: [:create]
namespace :home do
resources :slack_users, only: [:index]
end
# Using 'bigbrother' as the path to get past ad-blockers
post 'bigbrother/identify', to: 'analytics#identify'
post 'bigbrother/track', to: 'analytics#track'
post 'bigbrother/page', to: 'analytics#page'
post 'bigbrother/group', to: 'analytics#group'
namespace :hackbot do
post 'auth', to: 'auth#create'
namespace :webhooks do
post 'interactive_messages'
post 'events'
end
end
namespace :slack_invitation do
resources :invite, only: [:create, :show]
resources :webhook, only: [:create]
resources :strategies, only: [:show]
end
end
end
# rubocop:enable Metrics/BlockLength
| Update analytics endpoint to get past ad-blockers | Update analytics endpoint to get past ad-blockers
| Ruby | mit | hackclub/api,hackclub/api,hackclub/api | ruby | ## Code Before:
Rails.application.routes.draw do
namespace :v1 do
get 'ping', to: 'ping#ping'
get 'repo/*all', constraints: { all: /.*/ }, to: 'repo#file'
get 'clubs/intake', to: 'intake#show'
post 'leaders/intake'
post 'cloud9/send_invite'
resources :clubs, only: [:index, :show]
resources :club_applications, only: [:create]
resources :tech_domain_redemptions, only: [:create]
resources :donations, only: [:create]
namespace :home do
resources :slack_users, only: [:index]
end
namespace :analytics do
post 'identify'
post 'track'
post 'page'
post 'group'
end
namespace :hackbot do
post 'auth', to: 'auth#create'
namespace :webhooks do
post 'interactive_messages'
post 'events'
end
end
namespace :slack_invitation do
resources :invite, only: [:create, :show]
resources :webhook, only: [:create]
resources :strategies, only: [:show]
end
end
end
# rubocop:enable Metrics/BlockLength
## Instruction:
Update analytics endpoint to get past ad-blockers
## Code After:
Rails.application.routes.draw do
namespace :v1 do
get 'ping', to: 'ping#ping'
get 'repo/*all', constraints: { all: /.*/ }, to: 'repo#file'
get 'clubs/intake', to: 'intake#show'
post 'leaders/intake'
post 'cloud9/send_invite'
resources :clubs, only: [:index, :show]
resources :club_applications, only: [:create]
resources :tech_domain_redemptions, only: [:create]
resources :donations, only: [:create]
namespace :home do
resources :slack_users, only: [:index]
end
# Using 'bigbrother' as the path to get past ad-blockers
post 'bigbrother/identify', to: 'analytics#identify'
post 'bigbrother/track', to: 'analytics#track'
post 'bigbrother/page', to: 'analytics#page'
post 'bigbrother/group', to: 'analytics#group'
namespace :hackbot do
post 'auth', to: 'auth#create'
namespace :webhooks do
post 'interactive_messages'
post 'events'
end
end
namespace :slack_invitation do
resources :invite, only: [:create, :show]
resources :webhook, only: [:create]
resources :strategies, only: [:show]
end
end
end
# rubocop:enable Metrics/BlockLength
| Rails.application.routes.draw do
namespace :v1 do
get 'ping', to: 'ping#ping'
get 'repo/*all', constraints: { all: /.*/ }, to: 'repo#file'
get 'clubs/intake', to: 'intake#show'
post 'leaders/intake'
post 'cloud9/send_invite'
resources :clubs, only: [:index, :show]
resources :club_applications, only: [:create]
resources :tech_domain_redemptions, only: [:create]
resources :donations, only: [:create]
namespace :home do
resources :slack_users, only: [:index]
end
+ # Using 'bigbrother' as the path to get past ad-blockers
+ post 'bigbrother/identify', to: 'analytics#identify'
+ post 'bigbrother/track', to: 'analytics#track'
+ post 'bigbrother/page', to: 'analytics#page'
+ post 'bigbrother/group', to: 'analytics#group'
- namespace :analytics do
- post 'identify'
- post 'track'
- post 'page'
- post 'group'
- end
namespace :hackbot do
post 'auth', to: 'auth#create'
namespace :webhooks do
post 'interactive_messages'
post 'events'
end
end
namespace :slack_invitation do
resources :invite, only: [:create, :show]
resources :webhook, only: [:create]
resources :strategies, only: [:show]
end
end
end
# rubocop:enable Metrics/BlockLength | 11 | 0.255814 | 5 | 6 |
237af3f0d84dc45ef038b557269c0cb5b8619393 | tests/src/JIT/Directed/pinning/object-pin/mirror.cpp | tests/src/JIT/Directed/pinning/object-pin/mirror.cpp | unsigned __int32 Ret_Int(unsigned __int32 argVal){
unsigned __int32 retVal = (unsigned __int32)argVal;
return retVal;
}
unsigned __int32 Ret_Ptr(void *argVal){
unsigned __int32 retVal = (unsigned __int32)argVal;
return retVal;
}
void Set_Val(__int32 *argVal, __int32 val){
*argVal = val;;
}
void Mul_Val(__int32 *arg1,__int32 *arg2,__int32 *arg3){
*arg3 = (*arg1)*(*arg2);
}
|
EXPORT_API unsigned __int32 Ret_Int(unsigned __int32 argVal){
unsigned __int32 retVal = (unsigned __int32)argVal;
return retVal;
}
EXPORT_API unsigned __int32 Ret_Ptr(void *argVal){
unsigned __int32 retVal = (unsigned __int32)argVal;
return retVal;
}
EXPORT_API void Set_Val(__int32 *argVal, __int32 val){
*argVal = val;;
}
EXPORT_API void Mul_Val(__int32 *arg1,__int32 *arg2,__int32 *arg3){
*arg3 = (*arg1)*(*arg2);
}
| Fix a test bug where dllexport qualifier was missing. | Fix a test bug where dllexport qualifier was missing.
| C++ | mit | poizan42/coreclr,ZhichengZhu/coreclr,wateret/coreclr,josteink/coreclr,cshung/coreclr,jamesqo/coreclr,swgillespie/coreclr,bartonjs/coreclr,yizhang82/coreclr,sperling/coreclr,pgavlin/coreclr,vinnyrom/coreclr,cmckinsey/coreclr,bartonjs/coreclr,chuck-mitchell/coreclr,bartonjs/coreclr,benpye/coreclr,alexperovich/coreclr,parjong/coreclr,manu-silicon/coreclr,yeaicc/coreclr,rartemev/coreclr,gkhanna79/coreclr,roncain/coreclr,Godin/coreclr,qiudesong/coreclr,James-Ko/coreclr,cydhaselton/coreclr,Dmitry-Me/coreclr,dasMulli/coreclr,JosephTremoulet/coreclr,manu-silicon/coreclr,Godin/coreclr,stormleoxia/coreclr,bartdesmet/coreclr,JonHanna/coreclr,tijoytom/coreclr,neurospeech/coreclr,SlavaRa/coreclr,cydhaselton/coreclr,JonHanna/coreclr,ruben-ayrapetyan/coreclr,cshung/coreclr,stormleoxia/coreclr,martinwoodward/coreclr,Dmitry-Me/coreclr,ZhichengZhu/coreclr,LLITCHEV/coreclr,sejongoh/coreclr,James-Ko/coreclr,mskvortsov/coreclr,sperling/coreclr,krk/coreclr,bartonjs/coreclr,parjong/coreclr,bartdesmet/coreclr,parjong/coreclr,schellap/coreclr,JosephTremoulet/coreclr,roncain/coreclr,LLITCHEV/coreclr,swgillespie/coreclr,James-Ko/coreclr,YongseopKim/coreclr,rartemev/coreclr,benpye/coreclr,mocsy/coreclr,naamunds/coreclr,yeaicc/coreclr,tijoytom/coreclr,alexperovich/coreclr,mmitche/coreclr,poizan42/coreclr,Lucrecious/coreclr,russellhadley/coreclr,Godin/coreclr,KrzysztofCwalina/coreclr,Godin/coreclr,neurospeech/coreclr,cydhaselton/coreclr,sperling/coreclr,andschwa/coreclr,jamesqo/coreclr,cmckinsey/coreclr,bartdesmet/coreclr,roncain/coreclr,Lucrecious/coreclr,JosephTremoulet/coreclr,bartdesmet/coreclr,jamesqo/coreclr,YongseopKim/coreclr,bartonjs/coreclr,gkhanna79/coreclr,KrzysztofCwalina/coreclr,yizhang82/coreclr,ramarag/coreclr,manu-silicon/coreclr,kyulee1/coreclr,schellap/coreclr,wkchoy74/coreclr,shahid-pk/coreclr,wateret/coreclr,alexperovich/coreclr,naamunds/coreclr,mmitche/coreclr,krytarowski/coreclr,bartdesmet/coreclr,Lucrecious/coreclr,mocsy/coreclr,jamesqo/coreclr,yizhang82/coreclr,hseok-oh/coreclr,AlexGhiondea/coreclr,James-Ko/coreclr,mokchhya/coreclr,cydhaselton/coreclr,swgillespie/coreclr,JosephTremoulet/coreclr,sejongoh/coreclr,bartonjs/coreclr,josteink/coreclr,josteink/coreclr,YongseopKim/coreclr,chuck-mitchell/coreclr,sjsinju/coreclr,YongseopKim/coreclr,dasMulli/coreclr,mocsy/coreclr,cshung/coreclr,wkchoy74/coreclr,sejongoh/coreclr,ruben-ayrapetyan/coreclr,shahid-pk/coreclr,russellhadley/coreclr,dpodder/coreclr,chuck-mitchell/coreclr,cydhaselton/coreclr,mokchhya/coreclr,Godin/coreclr,sjsinju/coreclr,ZhichengZhu/coreclr,chuck-mitchell/coreclr,poizan42/coreclr,krytarowski/coreclr,Lucrecious/coreclr,ZhichengZhu/coreclr,LLITCHEV/coreclr,poizan42/coreclr,ramarag/coreclr,krk/coreclr,mokchhya/coreclr,andschwa/coreclr,LLITCHEV/coreclr,krk/coreclr,ramarag/coreclr,shahid-pk/coreclr,gkhanna79/coreclr,mokchhya/coreclr,swgillespie/coreclr,wtgodbe/coreclr,stormleoxia/coreclr,martinwoodward/coreclr,ramarag/coreclr,schellap/coreclr,Lucrecious/coreclr,Godin/coreclr,AlexGhiondea/coreclr,shahid-pk/coreclr,AlexGhiondea/coreclr,shahid-pk/coreclr,krk/coreclr,cmckinsey/coreclr,cmckinsey/coreclr,Lucrecious/coreclr,neurospeech/coreclr,krk/coreclr,roncain/coreclr,mocsy/coreclr,sjsinju/coreclr,dpodder/coreclr,swgillespie/coreclr,cmckinsey/coreclr,naamunds/coreclr,qiudesong/coreclr,chuck-mitchell/coreclr,JonHanna/coreclr,ramarag/coreclr,hseok-oh/coreclr,bartonjs/coreclr,kyulee1/coreclr,jhendrixMSFT/coreclr,benpye/coreclr,yeaicc/coreclr,mskvortsov/coreclr,vinnyrom/coreclr,roncain/coreclr,wtgodbe/coreclr,martinwoodward/coreclr,botaberg/coreclr,sperling/coreclr,ragmani/coreclr,andschwa/coreclr,ruben-ayrapetyan/coreclr,botaberg/coreclr,Dmitry-Me/coreclr,sjsinju/coreclr,russellhadley/coreclr,roncain/coreclr,roncain/coreclr,sejongoh/coreclr,neurospeech/coreclr,KrzysztofCwalina/coreclr,ragmani/coreclr,bartdesmet/coreclr,schellap/coreclr,qiudesong/coreclr,mokchhya/coreclr,parjong/coreclr,mocsy/coreclr,benpye/coreclr,wateret/coreclr,hseok-oh/coreclr,jhendrixMSFT/coreclr,naamunds/coreclr,bartdesmet/coreclr,krk/coreclr,jamesqo/coreclr,botaberg/coreclr,naamunds/coreclr,dasMulli/coreclr,sagood/coreclr,wkchoy74/coreclr,ZhichengZhu/coreclr,wtgodbe/coreclr,rartemev/coreclr,sagood/coreclr,ruben-ayrapetyan/coreclr,pgavlin/coreclr,yeaicc/coreclr,dasMulli/coreclr,swgillespie/coreclr,andschwa/coreclr,mskvortsov/coreclr,hseok-oh/coreclr,SlavaRa/coreclr,qiudesong/coreclr,rartemev/coreclr,manu-silicon/coreclr,sagood/coreclr,Dmitry-Me/coreclr,shahid-pk/coreclr,wkchoy74/coreclr,mocsy/coreclr,sagood/coreclr,schellap/coreclr,YongseopKim/coreclr,LLITCHEV/coreclr,alexperovich/coreclr,tijoytom/coreclr,AlexGhiondea/coreclr,wtgodbe/coreclr,mskvortsov/coreclr,kyulee1/coreclr,wkchoy74/coreclr,cshung/coreclr,yeaicc/coreclr,cydhaselton/coreclr,vinnyrom/coreclr,gkhanna79/coreclr,krytarowski/coreclr,sperling/coreclr,wkchoy74/coreclr,Dmitry-Me/coreclr,JonHanna/coreclr,vinnyrom/coreclr,KrzysztofCwalina/coreclr,ragmani/coreclr,mskvortsov/coreclr,wtgodbe/coreclr,josteink/coreclr,JonHanna/coreclr,qiudesong/coreclr,josteink/coreclr,JonHanna/coreclr,martinwoodward/coreclr,yeaicc/coreclr,pgavlin/coreclr,sperling/coreclr,wateret/coreclr,dpodder/coreclr,wateret/coreclr,neurospeech/coreclr,dpodder/coreclr,James-Ko/coreclr,dpodder/coreclr,stormleoxia/coreclr,JosephTremoulet/coreclr,jhendrixMSFT/coreclr,yeaicc/coreclr,swgillespie/coreclr,jhendrixMSFT/coreclr,wkchoy74/coreclr,pgavlin/coreclr,parjong/coreclr,SlavaRa/coreclr,gkhanna79/coreclr,tijoytom/coreclr,josteink/coreclr,dasMulli/coreclr,mokchhya/coreclr,josteink/coreclr,dasMulli/coreclr,manu-silicon/coreclr,kyulee1/coreclr,yizhang82/coreclr,KrzysztofCwalina/coreclr,neurospeech/coreclr,sejongoh/coreclr,benpye/coreclr,cmckinsey/coreclr,stormleoxia/coreclr,JosephTremoulet/coreclr,cmckinsey/coreclr,KrzysztofCwalina/coreclr,alexperovich/coreclr,Godin/coreclr,LLITCHEV/coreclr,vinnyrom/coreclr,ragmani/coreclr,cshung/coreclr,alexperovich/coreclr,yizhang82/coreclr,James-Ko/coreclr,kyulee1/coreclr,qiudesong/coreclr,benpye/coreclr,stormleoxia/coreclr,ZhichengZhu/coreclr,sjsinju/coreclr,rartemev/coreclr,ragmani/coreclr,gkhanna79/coreclr,schellap/coreclr,poizan42/coreclr,pgavlin/coreclr,tijoytom/coreclr,jamesqo/coreclr,Dmitry-Me/coreclr,mmitche/coreclr,tijoytom/coreclr,ramarag/coreclr,jhendrixMSFT/coreclr,poizan42/coreclr,pgavlin/coreclr,sejongoh/coreclr,Dmitry-Me/coreclr,ZhichengZhu/coreclr,cshung/coreclr,botaberg/coreclr,SlavaRa/coreclr,ruben-ayrapetyan/coreclr,botaberg/coreclr,shahid-pk/coreclr,ragmani/coreclr,krytarowski/coreclr,Lucrecious/coreclr,ruben-ayrapetyan/coreclr,yizhang82/coreclr,mmitche/coreclr,hseok-oh/coreclr,vinnyrom/coreclr,mmitche/coreclr,mskvortsov/coreclr,martinwoodward/coreclr,krytarowski/coreclr,sperling/coreclr,AlexGhiondea/coreclr,andschwa/coreclr,LLITCHEV/coreclr,sjsinju/coreclr,wateret/coreclr,benpye/coreclr,dpodder/coreclr,naamunds/coreclr,sejongoh/coreclr,rartemev/coreclr,mocsy/coreclr,parjong/coreclr,SlavaRa/coreclr,vinnyrom/coreclr,botaberg/coreclr,chuck-mitchell/coreclr,manu-silicon/coreclr,andschwa/coreclr,SlavaRa/coreclr,kyulee1/coreclr,mmitche/coreclr,jhendrixMSFT/coreclr,sagood/coreclr,YongseopKim/coreclr,hseok-oh/coreclr,martinwoodward/coreclr,manu-silicon/coreclr,russellhadley/coreclr,dasMulli/coreclr,AlexGhiondea/coreclr,andschwa/coreclr,KrzysztofCwalina/coreclr,russellhadley/coreclr,schellap/coreclr,sagood/coreclr,ramarag/coreclr,stormleoxia/coreclr,naamunds/coreclr,chuck-mitchell/coreclr,krytarowski/coreclr,russellhadley/coreclr,jhendrixMSFT/coreclr,mokchhya/coreclr,martinwoodward/coreclr,wtgodbe/coreclr | c++ | ## Code Before:
unsigned __int32 Ret_Int(unsigned __int32 argVal){
unsigned __int32 retVal = (unsigned __int32)argVal;
return retVal;
}
unsigned __int32 Ret_Ptr(void *argVal){
unsigned __int32 retVal = (unsigned __int32)argVal;
return retVal;
}
void Set_Val(__int32 *argVal, __int32 val){
*argVal = val;;
}
void Mul_Val(__int32 *arg1,__int32 *arg2,__int32 *arg3){
*arg3 = (*arg1)*(*arg2);
}
## Instruction:
Fix a test bug where dllexport qualifier was missing.
## Code After:
EXPORT_API unsigned __int32 Ret_Int(unsigned __int32 argVal){
unsigned __int32 retVal = (unsigned __int32)argVal;
return retVal;
}
EXPORT_API unsigned __int32 Ret_Ptr(void *argVal){
unsigned __int32 retVal = (unsigned __int32)argVal;
return retVal;
}
EXPORT_API void Set_Val(__int32 *argVal, __int32 val){
*argVal = val;;
}
EXPORT_API void Mul_Val(__int32 *arg1,__int32 *arg2,__int32 *arg3){
*arg3 = (*arg1)*(*arg2);
}
| +
+
- unsigned __int32 Ret_Int(unsigned __int32 argVal){
+ EXPORT_API unsigned __int32 Ret_Int(unsigned __int32 argVal){
? +++++++++++
unsigned __int32 retVal = (unsigned __int32)argVal;
return retVal;
}
- unsigned __int32 Ret_Ptr(void *argVal){
+ EXPORT_API unsigned __int32 Ret_Ptr(void *argVal){
? +++++++++++
unsigned __int32 retVal = (unsigned __int32)argVal;
return retVal;
}
- void Set_Val(__int32 *argVal, __int32 val){
+ EXPORT_API void Set_Val(__int32 *argVal, __int32 val){
? +++++++++++
*argVal = val;;
}
- void Mul_Val(__int32 *arg1,__int32 *arg2,__int32 *arg3){
+ EXPORT_API void Mul_Val(__int32 *arg1,__int32 *arg2,__int32 *arg3){
? +++++++++++
*arg3 = (*arg1)*(*arg2);
}
| 10 | 0.526316 | 6 | 4 |
791d0e389dc3382b298f8b2d83fceca2a2640754 | package.json | package.json | {
"name": "wagner-core",
"version": "0.0.2",
"description": "Dependency-injection-inspired async framework that doubles as an isomorphic AngularJS-compatible dependency injector.",
"main": "index.js",
"scripts": {
"test": "./node_modules/mocha/bin/mocha ./test/*.test.js"
},
"dependencies": {
"bluebird": "2.3.11",
"get-parameter-names": "0.2.0",
"underscore": "1.5.2"
},
"devDependencies": {
"acquit": "0.0.3",
"mocha": "2.0.1"
},
"author": "Valeri Karpov",
"license": "Apache 2.0"
}
| {
"name": "wagner-core",
"version": "0.0.2",
"description": "Dependency-injection-inspired async framework that doubles as an isomorphic AngularJS-compatible dependency injector.",
"main": "index.js",
"scripts": {
"test": "./node_modules/mocha/bin/mocha ./test/*.test.js",
"coverage": "./node_modules/istanbul/lib/cli.js cover ./node_modules/mocha/bin/_mocha -- -R spec ./test/*"
},
"dependencies": {
"bluebird": "2.3.11",
"get-parameter-names": "0.2.0",
"underscore": "1.5.2"
},
"devDependencies": {
"acquit": "0.0.3",
"istanbul": "0.3.2",
"mocha": "2.0.1"
},
"author": "Valeri Karpov",
"license": "Apache 2.0"
}
| Add istanbul and code coverage | Add istanbul and code coverage
| JSON | apache-2.0 | vkarpov15/wagner-core | json | ## Code Before:
{
"name": "wagner-core",
"version": "0.0.2",
"description": "Dependency-injection-inspired async framework that doubles as an isomorphic AngularJS-compatible dependency injector.",
"main": "index.js",
"scripts": {
"test": "./node_modules/mocha/bin/mocha ./test/*.test.js"
},
"dependencies": {
"bluebird": "2.3.11",
"get-parameter-names": "0.2.0",
"underscore": "1.5.2"
},
"devDependencies": {
"acquit": "0.0.3",
"mocha": "2.0.1"
},
"author": "Valeri Karpov",
"license": "Apache 2.0"
}
## Instruction:
Add istanbul and code coverage
## Code After:
{
"name": "wagner-core",
"version": "0.0.2",
"description": "Dependency-injection-inspired async framework that doubles as an isomorphic AngularJS-compatible dependency injector.",
"main": "index.js",
"scripts": {
"test": "./node_modules/mocha/bin/mocha ./test/*.test.js",
"coverage": "./node_modules/istanbul/lib/cli.js cover ./node_modules/mocha/bin/_mocha -- -R spec ./test/*"
},
"dependencies": {
"bluebird": "2.3.11",
"get-parameter-names": "0.2.0",
"underscore": "1.5.2"
},
"devDependencies": {
"acquit": "0.0.3",
"istanbul": "0.3.2",
"mocha": "2.0.1"
},
"author": "Valeri Karpov",
"license": "Apache 2.0"
}
| {
"name": "wagner-core",
"version": "0.0.2",
"description": "Dependency-injection-inspired async framework that doubles as an isomorphic AngularJS-compatible dependency injector.",
"main": "index.js",
"scripts": {
- "test": "./node_modules/mocha/bin/mocha ./test/*.test.js"
+ "test": "./node_modules/mocha/bin/mocha ./test/*.test.js",
? +
+ "coverage": "./node_modules/istanbul/lib/cli.js cover ./node_modules/mocha/bin/_mocha -- -R spec ./test/*"
},
"dependencies": {
"bluebird": "2.3.11",
"get-parameter-names": "0.2.0",
"underscore": "1.5.2"
},
"devDependencies": {
"acquit": "0.0.3",
+ "istanbul": "0.3.2",
"mocha": "2.0.1"
},
"author": "Valeri Karpov",
"license": "Apache 2.0"
} | 4 | 0.2 | 3 | 1 |
01145693b263c4c403aa901291bfc58b73a51e85 | .travis.yml | .travis.yml | language: csharp
matrix:
include:
- os: linux
dist: trusty
sudo: required
env: DOTNETCORE=1
before_install:
- sudo sh -c 'echo "deb [arch=amd64] https://apt-mo.trafficmanager.net/repos/dotnet-release/ trusty main" > /etc/apt/sources.list.d/dotnetdev.list'
- sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 417A0893
- sudo apt-get update
- sudo apt-get install dotnet
script:
- bash build.sh | language: csharp
matrix:
include:
- os: linux
dist: trusty
sudo: required
env: DOTNETCORE=1
before_install:
- sudo sh -c 'echo "deb [arch=amd64] https://apt-mo.trafficmanager.net/repos/dotnet-release/ trusty main" > /etc/apt/sources.list.d/dotnetdev.list'
- sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 417A0893
- sudo apt-get update
- sudo apt-get install dotnet-dev-1.0.0
script:
- bash build.sh | Use the right package from apt | Use the right package from apt
| YAML | isc | foxbot/Discord.Addons.EmojiTools,foxbot/Discord.Addons.EmojiTools | yaml | ## Code Before:
language: csharp
matrix:
include:
- os: linux
dist: trusty
sudo: required
env: DOTNETCORE=1
before_install:
- sudo sh -c 'echo "deb [arch=amd64] https://apt-mo.trafficmanager.net/repos/dotnet-release/ trusty main" > /etc/apt/sources.list.d/dotnetdev.list'
- sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 417A0893
- sudo apt-get update
- sudo apt-get install dotnet
script:
- bash build.sh
## Instruction:
Use the right package from apt
## Code After:
language: csharp
matrix:
include:
- os: linux
dist: trusty
sudo: required
env: DOTNETCORE=1
before_install:
- sudo sh -c 'echo "deb [arch=amd64] https://apt-mo.trafficmanager.net/repos/dotnet-release/ trusty main" > /etc/apt/sources.list.d/dotnetdev.list'
- sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 417A0893
- sudo apt-get update
- sudo apt-get install dotnet-dev-1.0.0
script:
- bash build.sh | language: csharp
matrix:
include:
- os: linux
dist: trusty
sudo: required
env: DOTNETCORE=1
before_install:
- sudo sh -c 'echo "deb [arch=amd64] https://apt-mo.trafficmanager.net/repos/dotnet-release/ trusty main" > /etc/apt/sources.list.d/dotnetdev.list'
- sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 417A0893
- sudo apt-get update
- - sudo apt-get install dotnet
+ - sudo apt-get install dotnet-dev-1.0.0
? ++++++++++
script:
- bash build.sh | 2 | 0.142857 | 1 | 1 |
d2a0c86b30847d334a630d6df32793ef5a650da5 | README.rst | README.rst | What is calm?
-----------------------
**calm** is a python library for denoising 1D time series.
.. image:: calm_architecture.png
:align: center
:width: 80%
Links
-----
Snapshot versions will be available at
http://geoffrollins.com/code.html
Development version available at
https://github.com/grollins/calm
License information
-------------------
See the file "LICENSE" for information terms & conditions for usage and a DISCLAIMER OF ALL WARRANTIES.
| What is calm?
-----------------------
**calm** is a python library for denoising 1D time series.
.. image:: examples/denoising/plots/trajectory0.png
:align: center
:width: 80%
.. image:: calm_architecture.png
:align: center
:width: 80%
License information
-------------------
See the file "LICENSE" for information terms & conditions for usage and a DISCLAIMER OF ALL WARRANTIES.
| Add sample denoising plot to front page readme. | Add sample denoising plot to front page readme. | reStructuredText | bsd-2-clause | grollins/calm | restructuredtext | ## Code Before:
What is calm?
-----------------------
**calm** is a python library for denoising 1D time series.
.. image:: calm_architecture.png
:align: center
:width: 80%
Links
-----
Snapshot versions will be available at
http://geoffrollins.com/code.html
Development version available at
https://github.com/grollins/calm
License information
-------------------
See the file "LICENSE" for information terms & conditions for usage and a DISCLAIMER OF ALL WARRANTIES.
## Instruction:
Add sample denoising plot to front page readme.
## Code After:
What is calm?
-----------------------
**calm** is a python library for denoising 1D time series.
.. image:: examples/denoising/plots/trajectory0.png
:align: center
:width: 80%
.. image:: calm_architecture.png
:align: center
:width: 80%
License information
-------------------
See the file "LICENSE" for information terms & conditions for usage and a DISCLAIMER OF ALL WARRANTIES.
| What is calm?
-----------------------
**calm** is a python library for denoising 1D time series.
+ .. image:: examples/denoising/plots/trajectory0.png
+ :align: center
+ :width: 80%
+
.. image:: calm_architecture.png
:align: center
:width: 80%
-
- Links
- -----
-
- Snapshot versions will be available at
- http://geoffrollins.com/code.html
-
- Development version available at
- https://github.com/grollins/calm
License information
-------------------
See the file "LICENSE" for information terms & conditions for usage and a DISCLAIMER OF ALL WARRANTIES.
| 13 | 0.565217 | 4 | 9 |
abfe24acc0c7d37bd59f91b66c8479730b8dad27 | grammar.js | grammar.js | module.exports = grammar({
name: 'ruby',
rules: {
program: $ => $._compound_statement,
_compound_statement: $ => seq($._statement, rep(seq($._terminator, $._expression)), optional($._terminator)),
_statement: $ => choice($._expression),
_expression: $ => choice($._argument),
_argument: $ => choice($._primary),
_primary: $ => choice($._variable),
_variable: $ => choice($.identifier , 'nil', 'self'),
identifier: $ => seq(rep(choice('@', '$')), /[a-zA-Z_][a-zA-Z0-9_]*/),
_line_break: $ => '\n',
_terminator: $ => choice($._line_break, ';'),
}
});
| module.exports = grammar({
name: 'ruby',
rules: {
program: $ => $._compound_statement,
_compound_statement: $ => seq($._statement, rep(seq($._terminator, $._expression)), optional($._terminator)),
_statement: $ => choice($._expression),
_expression: $ => choice($._argument),
_argument: $ => choice($._primary),
_primary: $ => choice($._variable),
_variable: $ => choice($.identifier , 'nil', 'self'),
identifier: $ => seq(rep(choice('@', '$')), /[a-zA-Z_][a-zA-Z0-9_]*/),
comment: $ => seq('#', /.*/),
_line_break: $ => '\n',
_terminator: $ => choice($._line_break, ';'),
}
});
| Define a dubious comment rule. | Define a dubious comment rule.
| JavaScript | mit | tree-sitter/tree-sitter-ruby,tree-sitter/tree-sitter-ruby,tree-sitter/tree-sitter-ruby,tree-sitter/tree-sitter-ruby,tree-sitter/tree-sitter-ruby,tree-sitter/tree-sitter-ruby,tree-sitter/tree-sitter-ruby,tree-sitter/tree-sitter-ruby | javascript | ## Code Before:
module.exports = grammar({
name: 'ruby',
rules: {
program: $ => $._compound_statement,
_compound_statement: $ => seq($._statement, rep(seq($._terminator, $._expression)), optional($._terminator)),
_statement: $ => choice($._expression),
_expression: $ => choice($._argument),
_argument: $ => choice($._primary),
_primary: $ => choice($._variable),
_variable: $ => choice($.identifier , 'nil', 'self'),
identifier: $ => seq(rep(choice('@', '$')), /[a-zA-Z_][a-zA-Z0-9_]*/),
_line_break: $ => '\n',
_terminator: $ => choice($._line_break, ';'),
}
});
## Instruction:
Define a dubious comment rule.
## Code After:
module.exports = grammar({
name: 'ruby',
rules: {
program: $ => $._compound_statement,
_compound_statement: $ => seq($._statement, rep(seq($._terminator, $._expression)), optional($._terminator)),
_statement: $ => choice($._expression),
_expression: $ => choice($._argument),
_argument: $ => choice($._primary),
_primary: $ => choice($._variable),
_variable: $ => choice($.identifier , 'nil', 'self'),
identifier: $ => seq(rep(choice('@', '$')), /[a-zA-Z_][a-zA-Z0-9_]*/),
comment: $ => seq('#', /.*/),
_line_break: $ => '\n',
_terminator: $ => choice($._line_break, ';'),
}
});
| module.exports = grammar({
name: 'ruby',
rules: {
program: $ => $._compound_statement,
_compound_statement: $ => seq($._statement, rep(seq($._terminator, $._expression)), optional($._terminator)),
_statement: $ => choice($._expression),
_expression: $ => choice($._argument),
_argument: $ => choice($._primary),
_primary: $ => choice($._variable),
_variable: $ => choice($.identifier , 'nil', 'self'),
identifier: $ => seq(rep(choice('@', '$')), /[a-zA-Z_][a-zA-Z0-9_]*/),
+ comment: $ => seq('#', /.*/),
+
_line_break: $ => '\n',
_terminator: $ => choice($._line_break, ';'),
}
}); | 2 | 0.086957 | 2 | 0 |
ea207796c1230407043f8278bcb0e41ab4ec9a84 | cmake/subprojects.cmake | cmake/subprojects.cmake | function(adopt_subprojects)
# Add subprojects for CMSIS
set(NAME "CMSIS")
if (";${SUBPROJECTS};" MATCHES ";${NAME};")
list(REMOVE_ITEM SUBPROJECTS ${NAME})
list(APPEND SUBPROJECTS
CMSIS/BasicMathFunctions
CMSIS/CommonTables
CMSIS/ComplexMathFunctions
CMSIS/ControllerFunctions
CMSIS/FastMathFunctions
CMSIS/FilteringFunctions
CMSIS/MatrixFunctions
CMSIS/StatisticsFunctions
CMSIS/SupportFunctions
CMSIS/TransformFunctions)
set(SUBPROJECTS ${SUBPROJECTS} PARENT_SCOPE)
set(CMSIS_BASE_DIR ${CSiBE_SRC_DIR}/CMSIS PARENT_SCOPE)
endif()
endfunction(adopt_subprojects)
| function(adopt_subprojects)
# Add subprojects for CMSIS
set(CMSIS_NAME "CMSIS")
if (";${SUBPROJECTS};" MATCHES ";${CMSIS_NAME};")
list(REMOVE_ITEM SUBPROJECTS ${CMSIS_NAME})
list(APPEND SUBPROJECTS
CMSIS/BasicMathFunctions
CMSIS/CommonTables
CMSIS/ComplexMathFunctions
CMSIS/ControllerFunctions
CMSIS/FastMathFunctions
CMSIS/FilteringFunctions
CMSIS/MatrixFunctions
CMSIS/StatisticsFunctions
CMSIS/SupportFunctions
CMSIS/TransformFunctions)
set(SUBPROJECTS ${SUBPROJECTS} PARENT_SCOPE)
set(CMSIS_BASE_DIR ${CSiBE_SRC_DIR}/CMSIS PARENT_SCOPE)
endif()
endfunction(adopt_subprojects)
| Rename generic NAME variable to the more specific CMSIS_NAME | Rename generic NAME variable to the more specific CMSIS_NAME
| CMake | bsd-3-clause | bgabor666/csibe,bgabor666/csibe,loki04/csibe,bgabor666/csibe,szeged/csibe,szeged/csibe,loki04/csibe,bgabor666/csibe,bgabor666/csibe,loki04/csibe,szeged/csibe,szeged/csibe,loki04/csibe,loki04/csibe,loki04/csibe,loki04/csibe,szeged/csibe,szeged/csibe,bgabor666/csibe,szeged/csibe,bgabor666/csibe | cmake | ## Code Before:
function(adopt_subprojects)
# Add subprojects for CMSIS
set(NAME "CMSIS")
if (";${SUBPROJECTS};" MATCHES ";${NAME};")
list(REMOVE_ITEM SUBPROJECTS ${NAME})
list(APPEND SUBPROJECTS
CMSIS/BasicMathFunctions
CMSIS/CommonTables
CMSIS/ComplexMathFunctions
CMSIS/ControllerFunctions
CMSIS/FastMathFunctions
CMSIS/FilteringFunctions
CMSIS/MatrixFunctions
CMSIS/StatisticsFunctions
CMSIS/SupportFunctions
CMSIS/TransformFunctions)
set(SUBPROJECTS ${SUBPROJECTS} PARENT_SCOPE)
set(CMSIS_BASE_DIR ${CSiBE_SRC_DIR}/CMSIS PARENT_SCOPE)
endif()
endfunction(adopt_subprojects)
## Instruction:
Rename generic NAME variable to the more specific CMSIS_NAME
## Code After:
function(adopt_subprojects)
# Add subprojects for CMSIS
set(CMSIS_NAME "CMSIS")
if (";${SUBPROJECTS};" MATCHES ";${CMSIS_NAME};")
list(REMOVE_ITEM SUBPROJECTS ${CMSIS_NAME})
list(APPEND SUBPROJECTS
CMSIS/BasicMathFunctions
CMSIS/CommonTables
CMSIS/ComplexMathFunctions
CMSIS/ControllerFunctions
CMSIS/FastMathFunctions
CMSIS/FilteringFunctions
CMSIS/MatrixFunctions
CMSIS/StatisticsFunctions
CMSIS/SupportFunctions
CMSIS/TransformFunctions)
set(SUBPROJECTS ${SUBPROJECTS} PARENT_SCOPE)
set(CMSIS_BASE_DIR ${CSiBE_SRC_DIR}/CMSIS PARENT_SCOPE)
endif()
endfunction(adopt_subprojects)
| function(adopt_subprojects)
# Add subprojects for CMSIS
- set(NAME "CMSIS")
+ set(CMSIS_NAME "CMSIS")
? ++++++
- if (";${SUBPROJECTS};" MATCHES ";${NAME};")
+ if (";${SUBPROJECTS};" MATCHES ";${CMSIS_NAME};")
? ++++++
- list(REMOVE_ITEM SUBPROJECTS ${NAME})
+ list(REMOVE_ITEM SUBPROJECTS ${CMSIS_NAME})
? ++++++
list(APPEND SUBPROJECTS
CMSIS/BasicMathFunctions
CMSIS/CommonTables
CMSIS/ComplexMathFunctions
CMSIS/ControllerFunctions
CMSIS/FastMathFunctions
CMSIS/FilteringFunctions
CMSIS/MatrixFunctions
CMSIS/StatisticsFunctions
CMSIS/SupportFunctions
CMSIS/TransformFunctions)
set(SUBPROJECTS ${SUBPROJECTS} PARENT_SCOPE)
set(CMSIS_BASE_DIR ${CSiBE_SRC_DIR}/CMSIS PARENT_SCOPE)
endif()
endfunction(adopt_subprojects) | 6 | 0.272727 | 3 | 3 |
d101b7f023db1583ca7b65899bfdef296f838ad2 | openspending/ui/validation/source.py | openspending/ui/validation/source.py | from urlparse import urlparse
from openspending.validation.model.common import mapping
from openspending.validation.model.common import key
from openspending.validation.model.predicates import chained, \
nonempty_string
def valid_url(url):
parsed = urlparse(url)
if parsed.scheme.lower() not in ('http', 'https'):
return "Only HTTP/HTTPS web addresses are supported " \
"at the moment."
return True
def source_schema():
schema = mapping('source')
schema.add(key('url', validator=chained(
nonempty_string,
valid_url
)))
return schema
| from urlparse import urlparse
from openspending.validation.model.common import mapping
from openspending.validation.model.common import key
from openspending.validation.model.predicates import chained, \
nonempty_string
def valid_url(url):
parsed = urlparse(url)
if parsed.scheme.lower() not in ('http', 'https'):
return "Only HTTP/HTTPS web addresses are supported " \
"at the moment."
return True
def source_schema():
schema = mapping('source')
schema.add(key('url', validator=chained(
nonempty_string,
valid_url
)))
return schema
| Fix PEP8 issues in openspending/ui/validation. | Fix PEP8 issues in openspending/ui/validation.
| Python | agpl-3.0 | CivicVision/datahub,openspending/spendb,CivicVision/datahub,spendb/spendb,spendb/spendb,johnjohndoe/spendb,USStateDept/FPA_Core,nathanhilbert/FPA_Core,openspending/spendb,spendb/spendb,USStateDept/FPA_Core,USStateDept/FPA_Core,johnjohndoe/spendb,openspending/spendb,nathanhilbert/FPA_Core,johnjohndoe/spendb,pudo/spendb,nathanhilbert/FPA_Core,CivicVision/datahub,pudo/spendb,pudo/spendb | python | ## Code Before:
from urlparse import urlparse
from openspending.validation.model.common import mapping
from openspending.validation.model.common import key
from openspending.validation.model.predicates import chained, \
nonempty_string
def valid_url(url):
parsed = urlparse(url)
if parsed.scheme.lower() not in ('http', 'https'):
return "Only HTTP/HTTPS web addresses are supported " \
"at the moment."
return True
def source_schema():
schema = mapping('source')
schema.add(key('url', validator=chained(
nonempty_string,
valid_url
)))
return schema
## Instruction:
Fix PEP8 issues in openspending/ui/validation.
## Code After:
from urlparse import urlparse
from openspending.validation.model.common import mapping
from openspending.validation.model.common import key
from openspending.validation.model.predicates import chained, \
nonempty_string
def valid_url(url):
parsed = urlparse(url)
if parsed.scheme.lower() not in ('http', 'https'):
return "Only HTTP/HTTPS web addresses are supported " \
"at the moment."
return True
def source_schema():
schema = mapping('source')
schema.add(key('url', validator=chained(
nonempty_string,
valid_url
)))
return schema
| from urlparse import urlparse
from openspending.validation.model.common import mapping
from openspending.validation.model.common import key
from openspending.validation.model.predicates import chained, \
nonempty_string
+
def valid_url(url):
parsed = urlparse(url)
if parsed.scheme.lower() not in ('http', 'https'):
return "Only HTTP/HTTPS web addresses are supported " \
- "at the moment."
? -
+ "at the moment."
return True
+
def source_schema():
schema = mapping('source')
schema.add(key('url', validator=chained(
- nonempty_string,
? ----
+ nonempty_string,
- valid_url
? ----
+ valid_url
- )))
? ----
+ )))
return schema
-
-
-
- | 14 | 0.56 | 6 | 8 |
c24742874dfed797bdc20d145ab4feaa83656f49 | README.md | README.md |
There's a Python script to cache all GitHub avatars into the repository.
Install the following:
pip install pyyaml requests
And then just execute:
python download_avatars.py
Don't forget to commit the downloaded images.
|
`git clone` the repo and install the dependencies:
bundle install
# or without bundler
gem install github-pages
Then build the site and serve it:
jekyll serve -w
## Download avatars
There's a Python script to cache all GitHub avatars into the repository.
Install the following:
pip install pyyaml requests
And then just execute:
python download_avatars.py
Don't forget to commit the downloaded images.
| Add some jekyll explanations to readme | Add some jekyll explanations to readme | Markdown | mit | webwurst/codefor.de,ironjan/codefor.de,konstin/codefor.de,OffenesJena/codefor.de,zfhui/codefor.de,metawops/codefor.de,codeforfrankfurt/codefor.de,philippgeisler/codefor.de,webwurst/codefor.de,marcel12bell/codefor.de,saerdnaer/codefor.de,saerdnaer/codefor.de,balzer82/codefor.de,philippgeisler/codefor.de,metawops/codefor.de,balzer82/codefor.de,kiliankoe/codefor.de,ironjan/codefor.de,ChristianSch/codefor.de,saerdnaer/codefor.de,ironjan/codefor.de,saerdnaer/codefor.de,kiliankoe/codefor.de,metawops/codefor.de,OffenesJena/codefor.de,codeforfrankfurt/codefor.de,philippgeisler/codefor.de,webwurst/codefor.de,konstin/codefor.de,saerdnaer/codefor.de,zfhui/codefor.de,OffenesJena/codefor.de,zfhui/codefor.de,OffenesJena/codefor.de,ChristianSch/codefor.de,webwurst/codefor.de,balzer82/codefor.de,konstin/codefor.de,philippgeisler/codefor.de,marcel12bell/codefor.de,karen-sch/codefor.de,ironjan/codefor.de,philippgeisler/codefor.de,OffenesJena/codefor.de,codeforfrankfurt/codefor.de,kiliankoe/codefor.de,konstin/codefor.de,marcel12bell/codefor.de,karen-sch/codefor.de,marcel12bell/codefor.de,karen-sch/codefor.de,karen-sch/codefor.de,webwurst/codefor.de,metawops/codefor.de,zfhui/codefor.de,kiliankoe/codefor.de,kiliankoe/codefor.de,karen-sch/codefor.de,balzer82/codefor.de,metawops/codefor.de,codeforfrankfurt/codefor.de,zfhui/codefor.de,ChristianSch/codefor.de | markdown | ## Code Before:
There's a Python script to cache all GitHub avatars into the repository.
Install the following:
pip install pyyaml requests
And then just execute:
python download_avatars.py
Don't forget to commit the downloaded images.
## Instruction:
Add some jekyll explanations to readme
## Code After:
`git clone` the repo and install the dependencies:
bundle install
# or without bundler
gem install github-pages
Then build the site and serve it:
jekyll serve -w
## Download avatars
There's a Python script to cache all GitHub avatars into the repository.
Install the following:
pip install pyyaml requests
And then just execute:
python download_avatars.py
Don't forget to commit the downloaded images.
| +
+ `git clone` the repo and install the dependencies:
+
+ bundle install
+ # or without bundler
+ gem install github-pages
+
+ Then build the site and serve it:
+
+ jekyll serve -w
+
+
+ ## Download avatars
There's a Python script to cache all GitHub avatars into the repository.
Install the following:
pip install pyyaml requests
And then just execute:
python download_avatars.py
Don't forget to commit the downloaded images. | 13 | 1.181818 | 13 | 0 |
9d9f7892ef05e30a96808d6ffd68006480cf8973 | server/publicapi/prepopulate/prepopulate-data/app_prepopulate_data.json | server/publicapi/prepopulate/prepopulate-data/app_prepopulate_data.json | [
{
"resource": "items",
"data": {
"_id": "tag:example.com,0000:newsml_BRE9A605",
"type": "picture",
"versioncreated": "2014-03-16T08:12:00Z"
}
},
{
"resource": "items",
"data": {
"_id": "tag:example.com,0001:newsml_BRE9A606",
"type": "composite",
"headline": "foo bar",
"versioncreated": "2015-02-10T16:20:08Z"
}
}
]
| [
{
"resource": "items",
"data": {
"_id": "tag:example.com,0000:newsml_BRE9A605",
"type": "picture",
"versioncreated": "2014-03-16T06:49:47+0000"
}
},
{
"resource": "items",
"data": {
"_id": "tag:example.com,0001:newsml_BRE9A606",
"type": "composite",
"headline": "foo bar",
"versioncreated": "2015-02-10T06:49:47+0000"
}
}
]
| Fix publicapi behave tests. Treat versioncreated as a date instead of string | Fix publicapi behave tests. Treat versioncreated as a date instead of string
| JSON | agpl-3.0 | superdesk/superdesk,sivakuna-aap/superdesk,liveblog/superdesk,thnkloud9/superdesk,darconny/superdesk,verifiedpixel/superdesk,hlmnrmr/superdesk,petrjasek/superdesk,marwoodandrew/superdesk-aap,gbbr/superdesk,sjunaid/superdesk,akintolga/superdesk-aap,marwoodandrew/superdesk,petrjasek/superdesk,pavlovicnemanja92/superdesk,Aca-jov/superdesk,akintolga/superdesk-aap,superdesk/superdesk-aap,thnkloud9/superdesk,mugurrus/superdesk,darconny/superdesk,petrjasek/superdesk-ntb,mdhaman/superdesk,sivakuna-aap/superdesk,plamut/superdesk,gbbr/superdesk,mdhaman/superdesk,sivakuna-aap/superdesk,ancafarcas/superdesk,sivakuna-aap/superdesk,petrjasek/superdesk-ntb,ancafarcas/superdesk,superdesk/superdesk-aap,akintolga/superdesk,liveblog/superdesk,fritzSF/superdesk,marwoodandrew/superdesk,amagdas/superdesk,ioanpocol/superdesk-ntb,fritzSF/superdesk,amagdas/superdesk,plamut/superdesk,ioanpocol/superdesk-ntb,marwoodandrew/superdesk-aap,liveblog/superdesk,gbbr/superdesk,verifiedpixel/superdesk,mdhaman/superdesk-aap,superdesk/superdesk,superdesk/superdesk,ioanpocol/superdesk,superdesk/superdesk-aap,superdesk/superdesk-ntb,plamut/superdesk,marwoodandrew/superdesk,sjunaid/superdesk,petrjasek/superdesk,verifiedpixel/superdesk,ioanpocol/superdesk,petrjasek/superdesk,marwoodandrew/superdesk,mugurrus/superdesk,marwoodandrew/superdesk-aap,liveblog/superdesk,akintolga/superdesk,ioanpocol/superdesk,ioanpocol/superdesk-ntb,fritzSF/superdesk,superdesk/superdesk-ntb,pavlovicnemanja92/superdesk,pavlovicnemanja92/superdesk,verifiedpixel/superdesk,mdhaman/superdesk-aap,pavlovicnemanja/superdesk,mdhaman/superdesk-aap,amagdas/superdesk,liveblog/superdesk,superdesk/superdesk-ntb,sjunaid/superdesk,petrjasek/superdesk-ntb,darconny/superdesk,plamut/superdesk,mdhaman/superdesk-aap,mdhaman/superdesk,hlmnrmr/superdesk,mugurrus/superdesk,akintolga/superdesk-aap,fritzSF/superdesk,thnkloud9/superdesk,petrjasek/superdesk-ntb,superdesk/superdesk-ntb,akintolga/superdesk,pavlovicnemanja/superdesk,sivakuna-aap/superdesk,akintolga/superdesk-aap,verifiedpixel/superdesk,fritzSF/superdesk,akintolga/superdesk,pavlovicnemanja92/superdesk,pavlovicnemanja/superdesk,hlmnrmr/superdesk,superdesk/superdesk,marwoodandrew/superdesk,plamut/superdesk,superdesk/superdesk-aap,pavlovicnemanja92/superdesk,ancafarcas/superdesk,amagdas/superdesk,marwoodandrew/superdesk-aap,Aca-jov/superdesk,pavlovicnemanja/superdesk,Aca-jov/superdesk,akintolga/superdesk,amagdas/superdesk | json | ## Code Before:
[
{
"resource": "items",
"data": {
"_id": "tag:example.com,0000:newsml_BRE9A605",
"type": "picture",
"versioncreated": "2014-03-16T08:12:00Z"
}
},
{
"resource": "items",
"data": {
"_id": "tag:example.com,0001:newsml_BRE9A606",
"type": "composite",
"headline": "foo bar",
"versioncreated": "2015-02-10T16:20:08Z"
}
}
]
## Instruction:
Fix publicapi behave tests. Treat versioncreated as a date instead of string
## Code After:
[
{
"resource": "items",
"data": {
"_id": "tag:example.com,0000:newsml_BRE9A605",
"type": "picture",
"versioncreated": "2014-03-16T06:49:47+0000"
}
},
{
"resource": "items",
"data": {
"_id": "tag:example.com,0001:newsml_BRE9A606",
"type": "composite",
"headline": "foo bar",
"versioncreated": "2015-02-10T06:49:47+0000"
}
}
]
| [
{
"resource": "items",
"data": {
"_id": "tag:example.com,0000:newsml_BRE9A605",
"type": "picture",
- "versioncreated": "2014-03-16T08:12:00Z"
? ^ ^^ ^
+ "versioncreated": "2014-03-16T06:49:47+0000"
? ^ ^^ +++ ^^
}
},
{
"resource": "items",
"data": {
"_id": "tag:example.com,0001:newsml_BRE9A606",
"type": "composite",
"headline": "foo bar",
- "versioncreated": "2015-02-10T16:20:08Z"
? ^ ^ - ^^
+ "versioncreated": "2015-02-10T06:49:47+0000"
? ^ ^^^^^^ ^^
}
}
] | 4 | 0.210526 | 2 | 2 |
c2b19fd1a0b0478e644b815d6e5473de33a44f88 | tests/dummy/app/templates/application.hbs | tests/dummy/app/templates/application.hbs | <h2 id="title">Ember Mailcheck</h2>
{{mail-check inputClass='form-input'}}
{{outlet}}
| <h2 id="title">Ember Mailcheck</h2>
<a href="https://github.com/johnotander/ember-mailcheck">https://github.com/johnotander/ember-mailcheck</a> <br>
{{mail-check inputClass='form-input'}} <br>
{{outlet}}
| Add a link to github on the example site | Add a link to github on the example site
| Handlebars | mit | johnotander/ember-mailcheck,johnotander/ember-mailcheck | handlebars | ## Code Before:
<h2 id="title">Ember Mailcheck</h2>
{{mail-check inputClass='form-input'}}
{{outlet}}
## Instruction:
Add a link to github on the example site
## Code After:
<h2 id="title">Ember Mailcheck</h2>
<a href="https://github.com/johnotander/ember-mailcheck">https://github.com/johnotander/ember-mailcheck</a> <br>
{{mail-check inputClass='form-input'}} <br>
{{outlet}}
| <h2 id="title">Ember Mailcheck</h2>
+ <a href="https://github.com/johnotander/ember-mailcheck">https://github.com/johnotander/ember-mailcheck</a> <br>
+
- {{mail-check inputClass='form-input'}}
+ {{mail-check inputClass='form-input'}} <br>
? +++++
{{outlet}} | 4 | 0.8 | 3 | 1 |
959897478bbda18f02aa6e38f2ebdd837581f1f0 | tests/test_sct_verify_signature.py | tests/test_sct_verify_signature.py | from os.path import join, dirname
from utlz import flo
from ctutlz.sct.verification import verify_signature
def test_verify_signature():
basedir = join(dirname(__file__), 'data', 'test_sct_verify_signature')
signature_input = \
open(flo('{basedir}/signature_input_valid.bin'), 'rb').read()
signature = open(flo('{basedir}/signature.der'), 'rb').read()
pubkey = open(flo('{basedir}/pubkey.pem'), 'rb').read()
got_verified, got_output, got_cmd_res = \
verify_signature(signature_input, signature, pubkey)
assert got_verified is True
assert got_output == 'Verified OK\n'
assert got_cmd_res.exitcode == 0
signature_input = b'some invalid signature input'
got_verified, got_output, got_cmd_res = \
verify_signature(signature_input, signature, pubkey)
assert got_verified is False
assert got_output == 'Verification Failure\n'
assert got_cmd_res.exitcode == 1
| from os.path import join, dirname
from utlz import flo
from ctutlz.sct.verification import verify_signature
def test_verify_signature():
basedir = join(dirname(__file__), 'data', 'test_sct_verify_signature')
signature_input = \
open(flo('{basedir}/signature_input_valid.bin'), 'rb').read()
signature = open(flo('{basedir}/signature.der'), 'rb').read()
pubkey = open(flo('{basedir}/pubkey.pem'), 'rb').read()
assert verify_signature(signature_input, signature, pubkey) is True
signature_input = b'some invalid signature input'
assert verify_signature(signature_input, signature, pubkey) is False
| Fix test for changed SctVerificationResult | Fix test for changed SctVerificationResult
| Python | mit | theno/ctutlz,theno/ctutlz | python | ## Code Before:
from os.path import join, dirname
from utlz import flo
from ctutlz.sct.verification import verify_signature
def test_verify_signature():
basedir = join(dirname(__file__), 'data', 'test_sct_verify_signature')
signature_input = \
open(flo('{basedir}/signature_input_valid.bin'), 'rb').read()
signature = open(flo('{basedir}/signature.der'), 'rb').read()
pubkey = open(flo('{basedir}/pubkey.pem'), 'rb').read()
got_verified, got_output, got_cmd_res = \
verify_signature(signature_input, signature, pubkey)
assert got_verified is True
assert got_output == 'Verified OK\n'
assert got_cmd_res.exitcode == 0
signature_input = b'some invalid signature input'
got_verified, got_output, got_cmd_res = \
verify_signature(signature_input, signature, pubkey)
assert got_verified is False
assert got_output == 'Verification Failure\n'
assert got_cmd_res.exitcode == 1
## Instruction:
Fix test for changed SctVerificationResult
## Code After:
from os.path import join, dirname
from utlz import flo
from ctutlz.sct.verification import verify_signature
def test_verify_signature():
basedir = join(dirname(__file__), 'data', 'test_sct_verify_signature')
signature_input = \
open(flo('{basedir}/signature_input_valid.bin'), 'rb').read()
signature = open(flo('{basedir}/signature.der'), 'rb').read()
pubkey = open(flo('{basedir}/pubkey.pem'), 'rb').read()
assert verify_signature(signature_input, signature, pubkey) is True
signature_input = b'some invalid signature input'
assert verify_signature(signature_input, signature, pubkey) is False
| from os.path import join, dirname
from utlz import flo
from ctutlz.sct.verification import verify_signature
def test_verify_signature():
basedir = join(dirname(__file__), 'data', 'test_sct_verify_signature')
signature_input = \
open(flo('{basedir}/signature_input_valid.bin'), 'rb').read()
signature = open(flo('{basedir}/signature.der'), 'rb').read()
pubkey = open(flo('{basedir}/pubkey.pem'), 'rb').read()
- got_verified, got_output, got_cmd_res = \
- verify_signature(signature_input, signature, pubkey)
? ^^^
+ assert verify_signature(signature_input, signature, pubkey) is True
? ^^^^^^ ++++++++
-
- assert got_verified is True
- assert got_output == 'Verified OK\n'
- assert got_cmd_res.exitcode == 0
signature_input = b'some invalid signature input'
- got_verified, got_output, got_cmd_res = \
- verify_signature(signature_input, signature, pubkey)
? ^^^
+ assert verify_signature(signature_input, signature, pubkey) is False
? ^^^^^^ +++++++++
-
- assert got_verified is False
- assert got_output == 'Verification Failure\n'
- assert got_cmd_res.exitcode == 1 | 14 | 0.466667 | 2 | 12 |
b2e0cfe1f877507295abc574b128a0ccfe5d7f2b | annotation-rest/src/main/java/uk/ac/ebi/quickgo/annotation/download/converter/helpers/DateConverter.java | annotation-rest/src/main/java/uk/ac/ebi/quickgo/annotation/download/converter/helpers/DateConverter.java | package uk.ac.ebi.quickgo.annotation.download.converter.helpers;
import java.time.ZoneId;
import java.time.format.DateTimeFormatter;
import java.util.Date;
import java.util.function.Function;
/**
* A home for the logic to format dates into Strings.
*
* @author Tony Wardell
* Date: 09/04/2018
* Time: 14:54
* Created with IntelliJ IDEA.
*/
public class DateConverter {
private DateConverter() {
}
private static final DateTimeFormatter YYYYMMDD_DATE_FORMAT = DateTimeFormatter.ofPattern("yyyyMMdd");
public static final Function<java.util.Date, String> toYYYYMMDD =
d -> d.toInstant().atZone(ZoneId.systemDefault()).format(YYYYMMDD_DATE_FORMAT);
public static String toYearMonthDay(Date date) {
return toYYYYMMDD.apply(date);
}
}
| package uk.ac.ebi.quickgo.annotation.download.converter.helpers;
import java.time.ZoneId;
import java.time.format.DateTimeFormatter;
import java.util.Date;
import java.util.function.Function;
/**
* A home for the logic to format dates into Strings.
*
* @author Tony Wardell
* Date: 09/04/2018
* Time: 14:54
* Created with IntelliJ IDEA.
*/
public class DateConverter {
private DateConverter() {
}
private static final DateTimeFormatter YYYYMMDD_DATE_FORMAT = DateTimeFormatter.ofPattern("yyyyMMdd");
public static final Function<java.util.Date, String> toYYYYMMDD =
d -> d.toInstant().atZone(ZoneId.systemDefault()).format(YYYYMMDD_DATE_FORMAT);
public static String toYearMonthDay(Date date) {
return date != null ? toYYYYMMDD.apply(date) : "";
}
}
| Add test for null date. | Add test for null date.
| Java | apache-2.0 | ebi-uniprot/QuickGOBE,ebi-uniprot/QuickGOBE,ebi-uniprot/QuickGOBE,ebi-uniprot/QuickGOBE,ebi-uniprot/QuickGOBE | java | ## Code Before:
package uk.ac.ebi.quickgo.annotation.download.converter.helpers;
import java.time.ZoneId;
import java.time.format.DateTimeFormatter;
import java.util.Date;
import java.util.function.Function;
/**
* A home for the logic to format dates into Strings.
*
* @author Tony Wardell
* Date: 09/04/2018
* Time: 14:54
* Created with IntelliJ IDEA.
*/
public class DateConverter {
private DateConverter() {
}
private static final DateTimeFormatter YYYYMMDD_DATE_FORMAT = DateTimeFormatter.ofPattern("yyyyMMdd");
public static final Function<java.util.Date, String> toYYYYMMDD =
d -> d.toInstant().atZone(ZoneId.systemDefault()).format(YYYYMMDD_DATE_FORMAT);
public static String toYearMonthDay(Date date) {
return toYYYYMMDD.apply(date);
}
}
## Instruction:
Add test for null date.
## Code After:
package uk.ac.ebi.quickgo.annotation.download.converter.helpers;
import java.time.ZoneId;
import java.time.format.DateTimeFormatter;
import java.util.Date;
import java.util.function.Function;
/**
* A home for the logic to format dates into Strings.
*
* @author Tony Wardell
* Date: 09/04/2018
* Time: 14:54
* Created with IntelliJ IDEA.
*/
public class DateConverter {
private DateConverter() {
}
private static final DateTimeFormatter YYYYMMDD_DATE_FORMAT = DateTimeFormatter.ofPattern("yyyyMMdd");
public static final Function<java.util.Date, String> toYYYYMMDD =
d -> d.toInstant().atZone(ZoneId.systemDefault()).format(YYYYMMDD_DATE_FORMAT);
public static String toYearMonthDay(Date date) {
return date != null ? toYYYYMMDD.apply(date) : "";
}
}
| package uk.ac.ebi.quickgo.annotation.download.converter.helpers;
import java.time.ZoneId;
import java.time.format.DateTimeFormatter;
import java.util.Date;
import java.util.function.Function;
/**
* A home for the logic to format dates into Strings.
*
* @author Tony Wardell
* Date: 09/04/2018
* Time: 14:54
* Created with IntelliJ IDEA.
*/
public class DateConverter {
private DateConverter() {
}
private static final DateTimeFormatter YYYYMMDD_DATE_FORMAT = DateTimeFormatter.ofPattern("yyyyMMdd");
public static final Function<java.util.Date, String> toYYYYMMDD =
d -> d.toInstant().atZone(ZoneId.systemDefault()).format(YYYYMMDD_DATE_FORMAT);
public static String toYearMonthDay(Date date) {
- return toYYYYMMDD.apply(date);
+ return date != null ? toYYYYMMDD.apply(date) : "";
? +++++++++++++++ +++++
}
} | 2 | 0.064516 | 1 | 1 |
d18a284222ba74c577ef66dcbe28bd11c5d0bb7c | bin/serve.js | bin/serve.js |
// Native
const path = require('path')
// Packages
const asyncToGen = require('async-to-gen/register')
const updateNotifier = require('update-notifier')
const {red} = require('chalk')
const nodeVersion = require('node-version')
const isAsyncSupported = require('is-async-supported')
// Ours
const pkg = require('../package')
// Support for keywords "async" and "await"
if (!isAsyncSupported()) {
const pathSep = process.platform === 'win32' ? '\\\\' : '/'
const directoryName = path.parse(path.join(__dirname, '..')).base
asyncToGen({
includes: new RegExp(`.*${directoryName}?${pathSep}(lib|bin).*`),
excludes: null,
sourceMaps: false
})
}
// Throw an error if node version is too low
if (nodeVersion.major < 6) {
console.error(`${red('Error!')} Serve requires at least version 6 of Node. Please upgrade!`)
process.exit(1)
}
// Let user know if there's an update
// This isn't important when deployed to Now
if (!process.env.NOW && pkg.dist) {
updateNotifier({pkg}).notify()
}
// Load package core with async/await support
require('../lib')
|
// Native
const path = require('path')
// Packages
const asyncToGen = require('async-to-gen/register')
const updateNotifier = require('update-notifier')
const {red} = require('chalk')
const nodeVersion = require('node-version')
const isAsyncSupported = require('is-async-supported')
// Ours
const pkg = require('../package')
// Support for keywords "async" and "await"
if (!isAsyncSupported()) {
const modulesDir = path.join(__dirname, '..', 'node_modules')
asyncToGen({
excludes: new RegExp(`.*${modulesDir}.*`),
sourceMaps: false
})
}
// Throw an error if node version is too low
if (nodeVersion.major < 6) {
console.error(`${red('Error!')} Serve requires at least version 6 of Node. Please upgrade!`)
process.exit(1)
}
// Let user know if there's an update
// This isn't important when deployed to Now
if (!process.env.NOW && pkg.dist) {
updateNotifier({pkg}).notify()
}
// Load package core with async/await support
require('../lib')
| Exclude `node_modules` from transpilation explicitly | Exclude `node_modules` from transpilation explicitly
| JavaScript | mit | zeit/micro-list,zeit/serve,zeit/micro-list,disquisition/serve,disquisition/serve | javascript | ## Code Before:
// Native
const path = require('path')
// Packages
const asyncToGen = require('async-to-gen/register')
const updateNotifier = require('update-notifier')
const {red} = require('chalk')
const nodeVersion = require('node-version')
const isAsyncSupported = require('is-async-supported')
// Ours
const pkg = require('../package')
// Support for keywords "async" and "await"
if (!isAsyncSupported()) {
const pathSep = process.platform === 'win32' ? '\\\\' : '/'
const directoryName = path.parse(path.join(__dirname, '..')).base
asyncToGen({
includes: new RegExp(`.*${directoryName}?${pathSep}(lib|bin).*`),
excludes: null,
sourceMaps: false
})
}
// Throw an error if node version is too low
if (nodeVersion.major < 6) {
console.error(`${red('Error!')} Serve requires at least version 6 of Node. Please upgrade!`)
process.exit(1)
}
// Let user know if there's an update
// This isn't important when deployed to Now
if (!process.env.NOW && pkg.dist) {
updateNotifier({pkg}).notify()
}
// Load package core with async/await support
require('../lib')
## Instruction:
Exclude `node_modules` from transpilation explicitly
## Code After:
// Native
const path = require('path')
// Packages
const asyncToGen = require('async-to-gen/register')
const updateNotifier = require('update-notifier')
const {red} = require('chalk')
const nodeVersion = require('node-version')
const isAsyncSupported = require('is-async-supported')
// Ours
const pkg = require('../package')
// Support for keywords "async" and "await"
if (!isAsyncSupported()) {
const modulesDir = path.join(__dirname, '..', 'node_modules')
asyncToGen({
excludes: new RegExp(`.*${modulesDir}.*`),
sourceMaps: false
})
}
// Throw an error if node version is too low
if (nodeVersion.major < 6) {
console.error(`${red('Error!')} Serve requires at least version 6 of Node. Please upgrade!`)
process.exit(1)
}
// Let user know if there's an update
// This isn't important when deployed to Now
if (!process.env.NOW && pkg.dist) {
updateNotifier({pkg}).notify()
}
// Load package core with async/await support
require('../lib')
|
// Native
const path = require('path')
// Packages
const asyncToGen = require('async-to-gen/register')
const updateNotifier = require('update-notifier')
const {red} = require('chalk')
const nodeVersion = require('node-version')
const isAsyncSupported = require('is-async-supported')
// Ours
const pkg = require('../package')
// Support for keywords "async" and "await"
if (!isAsyncSupported()) {
+ const modulesDir = path.join(__dirname, '..', 'node_modules')
- const pathSep = process.platform === 'win32' ? '\\\\' : '/'
- const directoryName = path.parse(path.join(__dirname, '..')).base
asyncToGen({
+ excludes: new RegExp(`.*${modulesDir}.*`),
- includes: new RegExp(`.*${directoryName}?${pathSep}(lib|bin).*`),
- excludes: null,
sourceMaps: false
})
}
// Throw an error if node version is too low
if (nodeVersion.major < 6) {
console.error(`${red('Error!')} Serve requires at least version 6 of Node. Please upgrade!`)
process.exit(1)
}
// Let user know if there's an update
// This isn't important when deployed to Now
if (!process.env.NOW && pkg.dist) {
updateNotifier({pkg}).notify()
}
// Load package core with async/await support
require('../lib') | 6 | 0.15 | 2 | 4 |
972b900129b91751c78fec7f952b655a4ea53330 | src/Eluceo/iCal/Property/ArrayValue.php | src/Eluceo/iCal/Property/ArrayValue.php | <?php
namespace Eluceo\iCal\Property;
class ArrayValue implements ValueInterface
{
/**
* The value.
*
* @var array
*/
protected $values;
public function __construct(array $values)
{
$this->values = $values;
}
public function setValues(array $values)
{
$this->values = $values;
return $this;
}
public function getEscapedValue()
{
$escapedValues = array_map(function ($value) {
return (new StringValue($value))->getEscapedValue();
}, $this->values);
return implode(',', $escapedValues);
}
}
| <?php
namespace Eluceo\iCal\Property;
class ArrayValue implements ValueInterface
{
/**
* The value.
*
* @var array
*/
protected $values;
public function __construct($values)
{
$this->values = $values;
}
public function setValues($values)
{
$this->values = $values;
return $this;
}
public function getEscapedValue()
{
$escapedValues = array_map(function ($value) {
return (new StringValue($value))->getEscapedValue();
}, $this->values);
return implode(',', $escapedValues);
}
}
| Make implementation compatible with PHP 5.3 | Make implementation compatible with PHP 5.3
| PHP | mit | cbdr/iCal,youngguns-nl/iCal,xima-media/iCal,jrjohnson/iCal,markuspoerschke/iCal,markuspoerschke/iCal | php | ## Code Before:
<?php
namespace Eluceo\iCal\Property;
class ArrayValue implements ValueInterface
{
/**
* The value.
*
* @var array
*/
protected $values;
public function __construct(array $values)
{
$this->values = $values;
}
public function setValues(array $values)
{
$this->values = $values;
return $this;
}
public function getEscapedValue()
{
$escapedValues = array_map(function ($value) {
return (new StringValue($value))->getEscapedValue();
}, $this->values);
return implode(',', $escapedValues);
}
}
## Instruction:
Make implementation compatible with PHP 5.3
## Code After:
<?php
namespace Eluceo\iCal\Property;
class ArrayValue implements ValueInterface
{
/**
* The value.
*
* @var array
*/
protected $values;
public function __construct($values)
{
$this->values = $values;
}
public function setValues($values)
{
$this->values = $values;
return $this;
}
public function getEscapedValue()
{
$escapedValues = array_map(function ($value) {
return (new StringValue($value))->getEscapedValue();
}, $this->values);
return implode(',', $escapedValues);
}
}
| <?php
namespace Eluceo\iCal\Property;
class ArrayValue implements ValueInterface
{
/**
* The value.
*
* @var array
*/
protected $values;
- public function __construct(array $values)
? ------
+ public function __construct($values)
{
$this->values = $values;
}
- public function setValues(array $values)
? ------
+ public function setValues($values)
{
$this->values = $values;
return $this;
}
public function getEscapedValue()
{
$escapedValues = array_map(function ($value) {
return (new StringValue($value))->getEscapedValue();
}, $this->values);
return implode(',', $escapedValues);
}
} | 4 | 0.117647 | 2 | 2 |
6bc2ca412e526b58462215ee7d75e907e6e92198 | resources/assets/css/shared/shame.less | resources/assets/css/shared/shame.less | //
// see: http://csswizardry.com/2013/04/shame-css/
//
#app {
.aside-item {
+ .tooltip {
display: none !important;
}
}
}
.inspector {
.flex(0 0 auto);
height: 100vh;
overflow-y: auto;
padding: 0 1em;
color: @grayDark;
}
[role="button"] {
cursor: pointer;
}
//
// To any unfortunate soul that happens upon the following hack... please forgive me...
//
// NOTE: find a better place for this, perhaps in shared styles,
// and get rid of the id (moved from the overly-strict "outer" directory)
.home.page {
.backface-visibility(hidden);
.home-practice svg[class*="logo"] { .backface-visibility(hidden); }
}
| //
// see: http://csswizardry.com/2013/04/shame-css/
//
.inspector {
.flex(0 0 auto);
height: 100vh;
overflow-y: auto;
padding: 0 1em;
color: @grayDark;
}
[role="button"] {
cursor: pointer;
}
//
// To any unfortunate soul that happens upon the following hack... please forgive me...
//
// NOTE: find a better place for this, perhaps in shared styles,
// and get rid of the id (moved from the overly-strict "outer" directory)
.home.page {
.backface-visibility(hidden);
.home-practice svg[class*="logo"] { .backface-visibility(hidden); }
}
| Make some of the tooltips work. | Make some of the tooltips work.
For reasons I don't understand yet the tooltips don't work when looking
at project settings.
| Less | epl-1.0 | circleci/frontend,circleci/frontend,circleci/frontend,RayRutjes/frontend,RayRutjes/frontend,prathamesh-sonpatki/frontend,prathamesh-sonpatki/frontend | less | ## Code Before:
//
// see: http://csswizardry.com/2013/04/shame-css/
//
#app {
.aside-item {
+ .tooltip {
display: none !important;
}
}
}
.inspector {
.flex(0 0 auto);
height: 100vh;
overflow-y: auto;
padding: 0 1em;
color: @grayDark;
}
[role="button"] {
cursor: pointer;
}
//
// To any unfortunate soul that happens upon the following hack... please forgive me...
//
// NOTE: find a better place for this, perhaps in shared styles,
// and get rid of the id (moved from the overly-strict "outer" directory)
.home.page {
.backface-visibility(hidden);
.home-practice svg[class*="logo"] { .backface-visibility(hidden); }
}
## Instruction:
Make some of the tooltips work.
For reasons I don't understand yet the tooltips don't work when looking
at project settings.
## Code After:
//
// see: http://csswizardry.com/2013/04/shame-css/
//
.inspector {
.flex(0 0 auto);
height: 100vh;
overflow-y: auto;
padding: 0 1em;
color: @grayDark;
}
[role="button"] {
cursor: pointer;
}
//
// To any unfortunate soul that happens upon the following hack... please forgive me...
//
// NOTE: find a better place for this, perhaps in shared styles,
// and get rid of the id (moved from the overly-strict "outer" directory)
.home.page {
.backface-visibility(hidden);
.home-practice svg[class*="logo"] { .backface-visibility(hidden); }
}
| //
// see: http://csswizardry.com/2013/04/shame-css/
//
- #app {
- .aside-item {
- + .tooltip {
- display: none !important;
- }
- }
- }
.inspector {
.flex(0 0 auto);
height: 100vh;
overflow-y: auto;
padding: 0 1em;
color: @grayDark;
}
[role="button"] {
cursor: pointer;
}
//
// To any unfortunate soul that happens upon the following hack... please forgive me...
//
// NOTE: find a better place for this, perhaps in shared styles,
// and get rid of the id (moved from the overly-strict "outer" directory)
.home.page {
.backface-visibility(hidden);
.home-practice svg[class*="logo"] { .backface-visibility(hidden); }
} | 7 | 0.225806 | 0 | 7 |
2cc4e4ac07cf65e7a88638f0599ef1dcc17c3a1f | lib/rc_rest/net_http_stub.rb | lib/rc_rest/net_http_stub.rb | require 'net/http'
class Net::HTTPResponse
##
# Setter for body content
attr_accessor :body
end
class Net::HTTP
@params = nil
@paths = nil
@responses = nil
class << self
##
# Records submitted POST params
attr_accessor :params
##
# Records POST paths
attr_accessor :paths
##
# Holds POST body responses
attr_accessor :responses
remove_method :start
end
##
# Override Net::HTTP::start to not connect
def self.start(host, port)
yield Net::HTTP.new(host)
end
remove_method :request
##
# Override Net::HTTP#request to fake its results
def request(req)
self.class.paths << req.path
self.class.params << req.body
res = Net::HTTPResponse.new '1.0', 200, 'OK'
res.body = self.class.responses.shift
res
end
end
| require 'net/http'
class Net::HTTPResponse
##
# Setter for body content
attr_accessor :body
end
class Net::HTTP
@params = nil
@paths = nil
@responses = nil
class << self
##
# Records submitted POST params
attr_accessor :params
##
# Records POST paths
attr_accessor :paths
##
# Holds POST body responses
attr_accessor :responses
remove_method :start
end
##
# Override Net::HTTP::start to not connect
def self.start(host, port)
yield Net::HTTP.new(host)
end
remove_method :request
##
# Override Net::HTTP#request to fake its results
def request(req)
self.class.paths << req.path
self.class.params << req.body
response = self.class.responses.shift
if response.respond_to? :call then
response.call req
else
res = Net::HTTPResponse.new '1.0', 200, 'OK'
res.body = response
res
end
end
end
| Allow Net::HTTP stub to raise exceptions. | Allow Net::HTTP stub to raise exceptions.
[git-p4: depot-paths = "//src/rc-rest/dev/": change = 2812]
| Ruby | bsd-3-clause | seattlerb/rc-rest | ruby | ## Code Before:
require 'net/http'
class Net::HTTPResponse
##
# Setter for body content
attr_accessor :body
end
class Net::HTTP
@params = nil
@paths = nil
@responses = nil
class << self
##
# Records submitted POST params
attr_accessor :params
##
# Records POST paths
attr_accessor :paths
##
# Holds POST body responses
attr_accessor :responses
remove_method :start
end
##
# Override Net::HTTP::start to not connect
def self.start(host, port)
yield Net::HTTP.new(host)
end
remove_method :request
##
# Override Net::HTTP#request to fake its results
def request(req)
self.class.paths << req.path
self.class.params << req.body
res = Net::HTTPResponse.new '1.0', 200, 'OK'
res.body = self.class.responses.shift
res
end
end
## Instruction:
Allow Net::HTTP stub to raise exceptions.
[git-p4: depot-paths = "//src/rc-rest/dev/": change = 2812]
## Code After:
require 'net/http'
class Net::HTTPResponse
##
# Setter for body content
attr_accessor :body
end
class Net::HTTP
@params = nil
@paths = nil
@responses = nil
class << self
##
# Records submitted POST params
attr_accessor :params
##
# Records POST paths
attr_accessor :paths
##
# Holds POST body responses
attr_accessor :responses
remove_method :start
end
##
# Override Net::HTTP::start to not connect
def self.start(host, port)
yield Net::HTTP.new(host)
end
remove_method :request
##
# Override Net::HTTP#request to fake its results
def request(req)
self.class.paths << req.path
self.class.params << req.body
response = self.class.responses.shift
if response.respond_to? :call then
response.call req
else
res = Net::HTTPResponse.new '1.0', 200, 'OK'
res.body = response
res
end
end
end
| require 'net/http'
class Net::HTTPResponse
##
# Setter for body content
attr_accessor :body
end
class Net::HTTP
@params = nil
@paths = nil
@responses = nil
class << self
##
# Records submitted POST params
attr_accessor :params
##
# Records POST paths
attr_accessor :paths
##
# Holds POST body responses
attr_accessor :responses
remove_method :start
end
##
# Override Net::HTTP::start to not connect
def self.start(host, port)
yield Net::HTTP.new(host)
end
remove_method :request
##
# Override Net::HTTP#request to fake its results
def request(req)
self.class.paths << req.path
self.class.params << req.body
+ response = self.class.responses.shift
+ if response.respond_to? :call then
+ response.call req
+ else
- res = Net::HTTPResponse.new '1.0', 200, 'OK'
+ res = Net::HTTPResponse.new '1.0', 200, 'OK'
? ++
- res.body = self.class.responses.shift
+ res.body = response
- res
+ res
? ++
+ end
end
end
| 11 | 0.183333 | 8 | 3 |
1fda534ddbd1e65ddeb52a97ac44a7c4c41fbef7 | README.md | README.md | Proof of Concept tests
Just a sandbox with code examples and fun stuff (it doesn't always work).
. | Proof of Concept tests
Just a sandbox with code examples and fun stuff (it doesn't always work).
git push https://GITHUB_TOKEN@github.com/alexhausen/examples.git
| Update push with token reminder | Update push with token reminder
| Markdown | mit | alexhausen/examples,alexhausen/examples,alexhausen/examples,alexhausen/examples,alexhausen/examples,alexhausen/examples,alexhausen/examples,alexhausen/examples,alexhausen/examples,alexhausen/examples,alexhausen/examples | markdown | ## Code Before:
Proof of Concept tests
Just a sandbox with code examples and fun stuff (it doesn't always work).
.
## Instruction:
Update push with token reminder
## Code After:
Proof of Concept tests
Just a sandbox with code examples and fun stuff (it doesn't always work).
git push https://GITHUB_TOKEN@github.com/alexhausen/examples.git
| Proof of Concept tests
Just a sandbox with code examples and fun stuff (it doesn't always work).
- .
+ git push https://GITHUB_TOKEN@github.com/alexhausen/examples.git | 2 | 0.4 | 1 | 1 |
9217bfc6bab0d152e33d9fda60218c404b61d064 | cmd2/__init__.py | cmd2/__init__.py | from .cmd2 import __version__, Cmd, CmdResult, Statement, categorize
from .cmd2 import with_argument_list, with_argparser, with_argparser_and_unknown_args, with_category
| from .cmd2 import __version__, Cmd, CmdResult, Statement, EmptyStatement, categorize
from .cmd2 import with_argument_list, with_argparser, with_argparser_and_unknown_args, with_category
| Add EmptyStatement exception to default imports | Add EmptyStatement exception to default imports
| Python | mit | python-cmd2/cmd2,python-cmd2/cmd2 | python | ## Code Before:
from .cmd2 import __version__, Cmd, CmdResult, Statement, categorize
from .cmd2 import with_argument_list, with_argparser, with_argparser_and_unknown_args, with_category
## Instruction:
Add EmptyStatement exception to default imports
## Code After:
from .cmd2 import __version__, Cmd, CmdResult, Statement, EmptyStatement, categorize
from .cmd2 import with_argument_list, with_argparser, with_argparser_and_unknown_args, with_category
| - from .cmd2 import __version__, Cmd, CmdResult, Statement, categorize
+ from .cmd2 import __version__, Cmd, CmdResult, Statement, EmptyStatement, categorize
? ++++++++++++++++
from .cmd2 import with_argument_list, with_argparser, with_argparser_and_unknown_args, with_category | 2 | 1 | 1 | 1 |
95d1497aa560f7bb01069fb1cc191607edec51dd | test/unit/pages/location/controller-test.js | test/unit/pages/location/controller-test.js | 'use strict';
import chai, { expect } from 'chai';
import sinon from 'sinon';
import { default as sinonChai } from 'sinon-chai';
import 'sinon-as-promised';
require('../../../angular-test-helper');
require('browser/main');
chai.use(sinonChai);
describe('LocationController', function() {
describe('initial state', function() {
beforeEach(ngModule('devPlatInstaller'));
var $controller;
beforeEach(inject(function(_$controller_) {
// The injector unwraps the underscores (_) from around the parameter names when matching
$controller = _$controller_;
}));
it('sets correct default target install location', function() {
let $watch = sinon.stub();
let $scope = {$watch};
let ctrl = $controller('LocationController', { $scope });
expect(ctrl.folder).to.be.equal(ctrl.installerDataSvc.installDir());
});
});
});
| 'use strict';
import LocationController from 'browser/pages/location/controller';
import InstallerDataService from 'browser/services/data';
import chai, { expect } from 'chai';
import sinon from 'sinon';
import { default as sinonChai } from 'sinon-chai';
import 'sinon-as-promised';
require('../../../angular-test-helper');
require('browser/main');
chai.use(sinonChai);
describe('LocationController', function() {
let sandbox, locationcontroller, scope, timeout;
let installerDataSvc;
beforeEach(function() {
scope = { '$apply': function() { } };
timeout = function(cb) { cb(); };
sandbox = sinon.sandbox.create();
installerDataSvc = sinon.stub(new InstallerDataService());
locationcontroller = new LocationController(scope, {}, timeout, installerDataSvc);
});
afterEach(function() {
sandbox.restore();
});
describe('initial state', function() {
beforeEach(ngModule('devPlatInstaller'));
var $controller;
beforeEach(inject(function(_$controller_) {
// The injector unwraps the underscores (_) from around the parameter names when matching
$controller = _$controller_;
}));
it('sets correct default target install location', function() {
let $watch = sinon.stub();
let $scope = {$watch};
let ctrl = $controller('LocationController', { $scope });
expect(ctrl.folder).to.be.equal(ctrl.installerDataSvc.installDir());
});
});
describe('checkFolder', function(){
it('should able to check folder exist status', function(){
locationcontroller.checkFolder();
expect(locationcontroller.folderExists).to.be.equal(false);
});
});
});
| Increase unit tests code coverage controller location | Increase unit tests code coverage controller location
| JavaScript | apache-2.0 | dgolovin/developer-platform-install,dgolovin/developer-platform-install,redhat-developer-tooling/developer-platform-install,redhat-developer-tooling/developer-platform-install | javascript | ## Code Before:
'use strict';
import chai, { expect } from 'chai';
import sinon from 'sinon';
import { default as sinonChai } from 'sinon-chai';
import 'sinon-as-promised';
require('../../../angular-test-helper');
require('browser/main');
chai.use(sinonChai);
describe('LocationController', function() {
describe('initial state', function() {
beforeEach(ngModule('devPlatInstaller'));
var $controller;
beforeEach(inject(function(_$controller_) {
// The injector unwraps the underscores (_) from around the parameter names when matching
$controller = _$controller_;
}));
it('sets correct default target install location', function() {
let $watch = sinon.stub();
let $scope = {$watch};
let ctrl = $controller('LocationController', { $scope });
expect(ctrl.folder).to.be.equal(ctrl.installerDataSvc.installDir());
});
});
});
## Instruction:
Increase unit tests code coverage controller location
## Code After:
'use strict';
import LocationController from 'browser/pages/location/controller';
import InstallerDataService from 'browser/services/data';
import chai, { expect } from 'chai';
import sinon from 'sinon';
import { default as sinonChai } from 'sinon-chai';
import 'sinon-as-promised';
require('../../../angular-test-helper');
require('browser/main');
chai.use(sinonChai);
describe('LocationController', function() {
let sandbox, locationcontroller, scope, timeout;
let installerDataSvc;
beforeEach(function() {
scope = { '$apply': function() { } };
timeout = function(cb) { cb(); };
sandbox = sinon.sandbox.create();
installerDataSvc = sinon.stub(new InstallerDataService());
locationcontroller = new LocationController(scope, {}, timeout, installerDataSvc);
});
afterEach(function() {
sandbox.restore();
});
describe('initial state', function() {
beforeEach(ngModule('devPlatInstaller'));
var $controller;
beforeEach(inject(function(_$controller_) {
// The injector unwraps the underscores (_) from around the parameter names when matching
$controller = _$controller_;
}));
it('sets correct default target install location', function() {
let $watch = sinon.stub();
let $scope = {$watch};
let ctrl = $controller('LocationController', { $scope });
expect(ctrl.folder).to.be.equal(ctrl.installerDataSvc.installDir());
});
});
describe('checkFolder', function(){
it('should able to check folder exist status', function(){
locationcontroller.checkFolder();
expect(locationcontroller.folderExists).to.be.equal(false);
});
});
});
| 'use strict';
+ import LocationController from 'browser/pages/location/controller';
+ import InstallerDataService from 'browser/services/data';
import chai, { expect } from 'chai';
import sinon from 'sinon';
import { default as sinonChai } from 'sinon-chai';
import 'sinon-as-promised';
require('../../../angular-test-helper');
require('browser/main');
chai.use(sinonChai);
describe('LocationController', function() {
+
+ let sandbox, locationcontroller, scope, timeout;
+ let installerDataSvc;
+
+ beforeEach(function() {
+
+ scope = { '$apply': function() { } };
+ timeout = function(cb) { cb(); };
+ sandbox = sinon.sandbox.create();
+ installerDataSvc = sinon.stub(new InstallerDataService());
+ locationcontroller = new LocationController(scope, {}, timeout, installerDataSvc);
+ });
+
+ afterEach(function() {
+ sandbox.restore();
+ });
+
describe('initial state', function() {
beforeEach(ngModule('devPlatInstaller'));
var $controller;
beforeEach(inject(function(_$controller_) {
// The injector unwraps the underscores (_) from around the parameter names when matching
$controller = _$controller_;
}));
it('sets correct default target install location', function() {
let $watch = sinon.stub();
let $scope = {$watch};
let ctrl = $controller('LocationController', { $scope });
expect(ctrl.folder).to.be.equal(ctrl.installerDataSvc.installDir());
});
});
+
+ describe('checkFolder', function(){
+ it('should able to check folder exist status', function(){
+ locationcontroller.checkFolder();
+ expect(locationcontroller.folderExists).to.be.equal(false);
+
+ });
+ });
}); | 27 | 0.818182 | 27 | 0 |
269c08e53cabc02a21f5d667553fc6da4d53fdc5 | source/PluginDev/Assets/Extensions/CloudOnce/Internal/Editor/Utils/GooglePlayGamesSetup/template-AndroidManifest.txt | source/PluginDev/Assets/Extensions/CloudOnce/Internal/Editor/Utils/GooglePlayGamesSetup/template-AndroidManifest.txt | <?xml version="1.0" encoding="utf-8"?>
<!-- This file was automatically generated by the Google Play Games plugin for Unity
Do not edit. -->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.google.example.games.mainlibproj"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk android:minSdkVersion="14" />
<application>
<!-- Required for Nearby Connections API -->
<meta-data android:name="com.google.android.gms.nearby.connection.SERVICE_ID"
android:value="__NEARBY_SERVICE_ID__" />
<!-- The space in these forces it to be interpreted as a string vs. int -->
<meta-data android:name="com.google.android.gms.games.APP_ID"
android:value="\u003__APP_ID__" />
<!-- Keep track of which plugin is being used -->
<meta-data android:name="com.google.android.gms.games.unityVersion"
android:value="\u003__PLUGIN_VERSION__" />
<activity android:name="com.google.games.bridge.NativeBridgeActivity"
android:theme="@android:style/Theme.Translucent.NoTitleBar.Fullscreen" />
</application>
</manifest>
| <?xml version="1.0" encoding="utf-8"?>
<!-- This file was automatically generated by the Google Play Games plugin for Unity
Do not edit. -->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.google.example.games.mainlibproj"
android:versionCode="1"
android:versionName="1.0" >
<application>
<!-- Required for Nearby Connections API -->
<meta-data android:name="com.google.android.gms.nearby.connection.SERVICE_ID"
android:value="__NEARBY_SERVICE_ID__" />
<!-- The space in these forces it to be interpreted as a string vs. int -->
<meta-data android:name="com.google.android.gms.games.APP_ID"
android:value="\u003__APP_ID__" />
<!-- Keep track of which plugin is being used -->
<meta-data android:name="com.google.android.gms.games.unityVersion"
android:value="\u003__PLUGIN_VERSION__" />
<activity android:name="com.google.games.bridge.NativeBridgeActivity"
android:theme="@android:style/Theme.Translucent.NoTitleBar.Fullscreen" />
</application>
</manifest>
| Remove minSdk from AndroidManifest template | Remove minSdk from AndroidManifest template | Text | mit | jizc/CloudOnce,Trollpants/CloudOnce,Trollpants/CloudOnce | text | ## Code Before:
<?xml version="1.0" encoding="utf-8"?>
<!-- This file was automatically generated by the Google Play Games plugin for Unity
Do not edit. -->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.google.example.games.mainlibproj"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk android:minSdkVersion="14" />
<application>
<!-- Required for Nearby Connections API -->
<meta-data android:name="com.google.android.gms.nearby.connection.SERVICE_ID"
android:value="__NEARBY_SERVICE_ID__" />
<!-- The space in these forces it to be interpreted as a string vs. int -->
<meta-data android:name="com.google.android.gms.games.APP_ID"
android:value="\u003__APP_ID__" />
<!-- Keep track of which plugin is being used -->
<meta-data android:name="com.google.android.gms.games.unityVersion"
android:value="\u003__PLUGIN_VERSION__" />
<activity android:name="com.google.games.bridge.NativeBridgeActivity"
android:theme="@android:style/Theme.Translucent.NoTitleBar.Fullscreen" />
</application>
</manifest>
## Instruction:
Remove minSdk from AndroidManifest template
## Code After:
<?xml version="1.0" encoding="utf-8"?>
<!-- This file was automatically generated by the Google Play Games plugin for Unity
Do not edit. -->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.google.example.games.mainlibproj"
android:versionCode="1"
android:versionName="1.0" >
<application>
<!-- Required for Nearby Connections API -->
<meta-data android:name="com.google.android.gms.nearby.connection.SERVICE_ID"
android:value="__NEARBY_SERVICE_ID__" />
<!-- The space in these forces it to be interpreted as a string vs. int -->
<meta-data android:name="com.google.android.gms.games.APP_ID"
android:value="\u003__APP_ID__" />
<!-- Keep track of which plugin is being used -->
<meta-data android:name="com.google.android.gms.games.unityVersion"
android:value="\u003__PLUGIN_VERSION__" />
<activity android:name="com.google.games.bridge.NativeBridgeActivity"
android:theme="@android:style/Theme.Translucent.NoTitleBar.Fullscreen" />
</application>
</manifest>
| <?xml version="1.0" encoding="utf-8"?>
<!-- This file was automatically generated by the Google Play Games plugin for Unity
Do not edit. -->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.google.example.games.mainlibproj"
android:versionCode="1"
android:versionName="1.0" >
-
- <uses-sdk android:minSdkVersion="14" />
<application>
<!-- Required for Nearby Connections API -->
<meta-data android:name="com.google.android.gms.nearby.connection.SERVICE_ID"
android:value="__NEARBY_SERVICE_ID__" />
<!-- The space in these forces it to be interpreted as a string vs. int -->
<meta-data android:name="com.google.android.gms.games.APP_ID"
android:value="\u003__APP_ID__" />
<!-- Keep track of which plugin is being used -->
<meta-data android:name="com.google.android.gms.games.unityVersion"
android:value="\u003__PLUGIN_VERSION__" />
<activity android:name="com.google.games.bridge.NativeBridgeActivity"
android:theme="@android:style/Theme.Translucent.NoTitleBar.Fullscreen" />
</application>
</manifest> | 2 | 0.071429 | 0 | 2 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.