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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
b8c4c9f7f9d914db6f64bbf96fde137334c6ccee | README.md | README.md | # Playlist-Scheduler
This is an application for playing mp3 files according to a schedule. By using this java-written application you can play the songs anytime you want. This application can be used in schools, houses or other social activities that may require a song in a specific time.
This is one of my first projects. I hope you enjoy it.
## How-to
The file named 'Playlist-Scheduler.jar' is an executable jar, which means you can simply start the application by using this file.
1. Click Add Music
2. Click on the music you added.
3. Select a day to set the time.
4. The textbox named 'S:' is for starting time.
5. Set it to a specific time. (For example 12:24)
6. Set a time for pause 'P:' textbox (For example 12:25)
7. Click 'Set'
8. The time is now set. The program will start playing the music when the time comes.
## Notes
- Program only supports mp3 files for now. That may be changed if needed in the future.
- You have to click on the music after you add it in order to activate the menu.
- To set a time more than one for a song, you have to add the file more than once then set the time.
## Pictures from the software

Enjoy
| # Playlist-Scheduler
This is an application for playing mp3 files according to a schedule. By using this java-written application you can play the songs anytime you want. This application can be used in schools, houses or other social activities that may require a song in a specific time.
This is one of my first projects. I hope you enjoy it.
## How-to
The file named 'Playlist-Scheduler.jar' is an executable jar, which means you can simply start the application by using this file.
1. Click Add Music
2. Click on the music you added.
3. Select a day to set the time.
4. The textbox named 'S:' is for starting time.
5. Set it to a specific time. (For example 12:24)
6. Set a time for pause 'P:' textbox (For example 12:25)
7. Click 'Set'
8. The time is now set. The program will start playing the music when the time comes.
## Notes
- Program only supports mp3 files for now. That may be changed if needed in the future.
- You have to click on the music after you add it in order to activate the menu.
- To set a time more than one for a song, you have to add the file more than once then set the time.
## Pictures from the software
<img src="https://github.com/aktasfatih/Playlist-Scheduler/blob/windowShot/Pictures/WindowShot_1.png?raw=true" style="width:200px;height:auto" alt="Screenshot of Playlist-Scheduler"/>
Enjoy
| Fix height of the image | Fix height of the image
| Markdown | mit | Seriusam/Playlist-Scheduler | markdown | ## Code Before:
# Playlist-Scheduler
This is an application for playing mp3 files according to a schedule. By using this java-written application you can play the songs anytime you want. This application can be used in schools, houses or other social activities that may require a song in a specific time.
This is one of my first projects. I hope you enjoy it.
## How-to
The file named 'Playlist-Scheduler.jar' is an executable jar, which means you can simply start the application by using this file.
1. Click Add Music
2. Click on the music you added.
3. Select a day to set the time.
4. The textbox named 'S:' is for starting time.
5. Set it to a specific time. (For example 12:24)
6. Set a time for pause 'P:' textbox (For example 12:25)
7. Click 'Set'
8. The time is now set. The program will start playing the music when the time comes.
## Notes
- Program only supports mp3 files for now. That may be changed if needed in the future.
- You have to click on the music after you add it in order to activate the menu.
- To set a time more than one for a song, you have to add the file more than once then set the time.
## Pictures from the software

Enjoy
## Instruction:
Fix height of the image
## Code After:
# Playlist-Scheduler
This is an application for playing mp3 files according to a schedule. By using this java-written application you can play the songs anytime you want. This application can be used in schools, houses or other social activities that may require a song in a specific time.
This is one of my first projects. I hope you enjoy it.
## How-to
The file named 'Playlist-Scheduler.jar' is an executable jar, which means you can simply start the application by using this file.
1. Click Add Music
2. Click on the music you added.
3. Select a day to set the time.
4. The textbox named 'S:' is for starting time.
5. Set it to a specific time. (For example 12:24)
6. Set a time for pause 'P:' textbox (For example 12:25)
7. Click 'Set'
8. The time is now set. The program will start playing the music when the time comes.
## Notes
- Program only supports mp3 files for now. That may be changed if needed in the future.
- You have to click on the music after you add it in order to activate the menu.
- To set a time more than one for a song, you have to add the file more than once then set the time.
## Pictures from the software
<img src="https://github.com/aktasfatih/Playlist-Scheduler/blob/windowShot/Pictures/WindowShot_1.png?raw=true" style="width:200px;height:auto" alt="Screenshot of Playlist-Scheduler"/>
Enjoy
| # Playlist-Scheduler
This is an application for playing mp3 files according to a schedule. By using this java-written application you can play the songs anytime you want. This application can be used in schools, houses or other social activities that may require a song in a specific time.
This is one of my first projects. I hope you enjoy it.
## How-to
The file named 'Playlist-Scheduler.jar' is an executable jar, which means you can simply start the application by using this file.
1. Click Add Music
2. Click on the music you added.
3. Select a day to set the time.
4. The textbox named 'S:' is for starting time.
5. Set it to a specific time. (For example 12:24)
6. Set a time for pause 'P:' textbox (For example 12:25)
7. Click 'Set'
8. The time is now set. The program will start playing the music when the time comes.
## Notes
- Program only supports mp3 files for now. That may be changed if needed in the future.
- You have to click on the music after you add it in order to activate the menu.
- To set a time more than one for a song, you have to add the file more than once then set the time.
## Pictures from the software
- 
+ <img src="https://github.com/aktasfatih/Playlist-Scheduler/blob/windowShot/Pictures/WindowShot_1.png?raw=true" style="width:200px;height:auto" alt="Screenshot of Playlist-Scheduler"/>
+
Enjoy | 3 | 0.107143 | 2 | 1 |
f8fc5c0523c174e27e670525f5fa22d087315507 | src/test/ui/issue-49257.rs | src/test/ui/issue-49257.rs | // Copyright 2018 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// Test for #49257:
// emits good diagnostics for `..` pattern fragments not in the last position.
#![allow(unused)]
struct Point { x: u8, y: u8 }
fn main() {
let p = Point { x: 0, y: 0 };
let Point { .., y } = p; //~ ERROR expected `}`, found `,`
//~^ pattern does not mention field `x`
//~^^ pattern does not mention field `y`
}
| // Copyright 2018 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// Test for #49257:
// emits good diagnostics for `..` pattern fragments not in the last position.
#![allow(unused)]
struct Point { x: u8, y: u8 }
fn main() {
let p = Point { x: 0, y: 0 };
let Point { .., y } = p; //~ ERROR expected `}`, found `,`
//~| ERROR pattern does not mention field `x`
//~| ERROR pattern does not mention field `y`
}
| Fix error annotations in test | Fix error annotations in test
| Rust | apache-2.0 | graydon/rust,GBGamer/rust,GBGamer/rust,graydon/rust,aidancully/rust,graydon/rust,GBGamer/rust,aidancully/rust,GBGamer/rust,GBGamer/rust,GBGamer/rust,graydon/rust,GBGamer/rust,aidancully/rust,aidancully/rust,graydon/rust,aidancully/rust,GBGamer/rust,aidancully/rust,graydon/rust | rust | ## Code Before:
// Copyright 2018 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// Test for #49257:
// emits good diagnostics for `..` pattern fragments not in the last position.
#![allow(unused)]
struct Point { x: u8, y: u8 }
fn main() {
let p = Point { x: 0, y: 0 };
let Point { .., y } = p; //~ ERROR expected `}`, found `,`
//~^ pattern does not mention field `x`
//~^^ pattern does not mention field `y`
}
## Instruction:
Fix error annotations in test
## Code After:
// Copyright 2018 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// Test for #49257:
// emits good diagnostics for `..` pattern fragments not in the last position.
#![allow(unused)]
struct Point { x: u8, y: u8 }
fn main() {
let p = Point { x: 0, y: 0 };
let Point { .., y } = p; //~ ERROR expected `}`, found `,`
//~| ERROR pattern does not mention field `x`
//~| ERROR pattern does not mention field `y`
}
| // Copyright 2018 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// Test for #49257:
// emits good diagnostics for `..` pattern fragments not in the last position.
#![allow(unused)]
struct Point { x: u8, y: u8 }
fn main() {
let p = Point { x: 0, y: 0 };
let Point { .., y } = p; //~ ERROR expected `}`, found `,`
- //~^ pattern does not mention field `x`
? ^
+ //~| ERROR pattern does not mention field `x`
? ^^^^^^^
- //~^^ pattern does not mention field `y`
? ^^
+ //~| ERROR pattern does not mention field `y`
? ^^^^^^^
} | 4 | 0.173913 | 2 | 2 |
977b87be2bd6d05ee626e09b5ec7faff0edf888b | src/proxy.js | src/proxy.js | var http = require('http');
exports.proxy = function(proxy_port, proxy_host, client_req, client_resp) {
var proxy_req = http.createClient(proxy_port, proxy_host).request(
client_req.method, client_req.url, client_req.headers);
client_req.setEncoding('binary');
proxy_req.setEncoding('binary');
proxy_req.addListener('response', function (proxy_resp) {
client_resp.writeHeader(proxy_resp.statusCode, proxy_resp.headers);
proxy_resp.addListener('data', function (chunk) {
client_resp.write(chunk, 'binary');
});
proxy_resp.addListener('end', function () {
client_resp.end();
});
});
client_req.addListener('data', function (chunk) {
proxy_req.write(chunk, 'binary');
});
client_req.addListener('end', function() {
proxy_req.end();
});
};
| var http = require('http');
exports.proxy = function(proxy_port, proxy_host, client_req, client_resp) {
var proxy_req = http.createClient(proxy_port, proxy_host).request(
client_req.method, client_req.url, client_req.headers);
client_req.setEncoding('binary');
proxy_req.addListener('response', function (proxy_resp) {
client_resp.writeHeader(proxy_resp.statusCode, proxy_resp.headers);
proxy_resp.addListener('data', function (chunk) {
client_resp.write(chunk, 'binary');
});
proxy_resp.addListener('end', function () {
client_resp.end();
});
});
client_req.addListener('data', function (chunk) {
proxy_req.write(chunk, 'binary');
});
client_req.addListener('end', function() {
proxy_req.end();
});
};
| Revert "more encoding settings." because it's stupid. | Revert "more encoding settings." because it's stupid.
This reverts commit ccb99882a11a9edd301de8c6e42bf9700e6f8bf5.
| JavaScript | apache-2.0 | tilgovi/lode,tilgovi/lode | javascript | ## Code Before:
var http = require('http');
exports.proxy = function(proxy_port, proxy_host, client_req, client_resp) {
var proxy_req = http.createClient(proxy_port, proxy_host).request(
client_req.method, client_req.url, client_req.headers);
client_req.setEncoding('binary');
proxy_req.setEncoding('binary');
proxy_req.addListener('response', function (proxy_resp) {
client_resp.writeHeader(proxy_resp.statusCode, proxy_resp.headers);
proxy_resp.addListener('data', function (chunk) {
client_resp.write(chunk, 'binary');
});
proxy_resp.addListener('end', function () {
client_resp.end();
});
});
client_req.addListener('data', function (chunk) {
proxy_req.write(chunk, 'binary');
});
client_req.addListener('end', function() {
proxy_req.end();
});
};
## Instruction:
Revert "more encoding settings." because it's stupid.
This reverts commit ccb99882a11a9edd301de8c6e42bf9700e6f8bf5.
## Code After:
var http = require('http');
exports.proxy = function(proxy_port, proxy_host, client_req, client_resp) {
var proxy_req = http.createClient(proxy_port, proxy_host).request(
client_req.method, client_req.url, client_req.headers);
client_req.setEncoding('binary');
proxy_req.addListener('response', function (proxy_resp) {
client_resp.writeHeader(proxy_resp.statusCode, proxy_resp.headers);
proxy_resp.addListener('data', function (chunk) {
client_resp.write(chunk, 'binary');
});
proxy_resp.addListener('end', function () {
client_resp.end();
});
});
client_req.addListener('data', function (chunk) {
proxy_req.write(chunk, 'binary');
});
client_req.addListener('end', function() {
proxy_req.end();
});
};
| var http = require('http');
exports.proxy = function(proxy_port, proxy_host, client_req, client_resp) {
var proxy_req = http.createClient(proxy_port, proxy_host).request(
client_req.method, client_req.url, client_req.headers);
client_req.setEncoding('binary');
- proxy_req.setEncoding('binary');
proxy_req.addListener('response', function (proxy_resp) {
client_resp.writeHeader(proxy_resp.statusCode, proxy_resp.headers);
proxy_resp.addListener('data', function (chunk) {
client_resp.write(chunk, 'binary');
});
proxy_resp.addListener('end', function () {
client_resp.end();
});
});
client_req.addListener('data', function (chunk) {
proxy_req.write(chunk, 'binary');
});
client_req.addListener('end', function() {
proxy_req.end();
});
}; | 1 | 0.043478 | 0 | 1 |
0c137c1a8045b718163c01131731f5a1ec0a4d96 | _includes/download.html | _includes/download.html | <!-- Download Section -->
<section id="download" class="content-section text-center">
<div class="download-section">
<div class="container">
<div class="col-lg-8 col-lg-offset-2">
<h2>Download Grayscale</h2>
<p>You can download Grayscale for free on the preview page at Start Bootstrap.</p>
<a href="http://startbootstrap.com/template-overviews/grayscale/" class="btn btn-default btn-lg">Visit Download Page</a>
</div>
</div>
</div>
</section> | <!-- Download Section -->
<section id="download" class="content-section text-center">
<div class="download-section">
<div class="container">
<div class="col-lg-8 col-lg-offset-2">
<h2>訂購</h2>
<p>請經由以下連結填寫訂購單</p>
<a href="https://docs.google.com/forms/d/e/1FAIpQLSf6rkeibUCE6K6w27e3ny7PMKhEPyu-OibeYa-SrdXgzYjfFA/viewform?usp=pp_url&entry.295222137=0&entry.1745588004=0&entry.130858949=0&entry.1748847373=0&entry.1315668675=0&entry.540436354=0&entry.1500606216=0&entry.1785801050=0&entry.951702395=0&entry.315216916=0&entry.1121344884=evil3378@gmail.com&entry.91208040=2017-08-08" class="btn btn-default btn-lg">填寫訂購單</a>
</div>
</div>
</div>
</section>
| Add google form for order | Add google form for order
| HTML | apache-2.0 | EvanceChen/EvanceChen.github.io,EvanceChen/EvanceChen.github.io | html | ## Code Before:
<!-- Download Section -->
<section id="download" class="content-section text-center">
<div class="download-section">
<div class="container">
<div class="col-lg-8 col-lg-offset-2">
<h2>Download Grayscale</h2>
<p>You can download Grayscale for free on the preview page at Start Bootstrap.</p>
<a href="http://startbootstrap.com/template-overviews/grayscale/" class="btn btn-default btn-lg">Visit Download Page</a>
</div>
</div>
</div>
</section>
## Instruction:
Add google form for order
## Code After:
<!-- Download Section -->
<section id="download" class="content-section text-center">
<div class="download-section">
<div class="container">
<div class="col-lg-8 col-lg-offset-2">
<h2>訂購</h2>
<p>請經由以下連結填寫訂購單</p>
<a href="https://docs.google.com/forms/d/e/1FAIpQLSf6rkeibUCE6K6w27e3ny7PMKhEPyu-OibeYa-SrdXgzYjfFA/viewform?usp=pp_url&entry.295222137=0&entry.1745588004=0&entry.130858949=0&entry.1748847373=0&entry.1315668675=0&entry.540436354=0&entry.1500606216=0&entry.1785801050=0&entry.951702395=0&entry.315216916=0&entry.1121344884=evil3378@gmail.com&entry.91208040=2017-08-08" class="btn btn-default btn-lg">填寫訂購單</a>
</div>
</div>
</div>
</section>
| <!-- Download Section -->
<section id="download" class="content-section text-center">
<div class="download-section">
<div class="container">
<div class="col-lg-8 col-lg-offset-2">
- <h2>Download Grayscale</h2>
- <p>You can download Grayscale for free on the preview page at Start Bootstrap.</p>
- <a href="http://startbootstrap.com/template-overviews/grayscale/" class="btn btn-default btn-lg">Visit Download Page</a>
+ <h2>訂購</h2>
+ <p>請經由以下連結填寫訂購單</p>
+ <a href="https://docs.google.com/forms/d/e/1FAIpQLSf6rkeibUCE6K6w27e3ny7PMKhEPyu-OibeYa-SrdXgzYjfFA/viewform?usp=pp_url&entry.295222137=0&entry.1745588004=0&entry.130858949=0&entry.1748847373=0&entry.1315668675=0&entry.540436354=0&entry.1500606216=0&entry.1785801050=0&entry.951702395=0&entry.315216916=0&entry.1121344884=evil3378@gmail.com&entry.91208040=2017-08-08" class="btn btn-default btn-lg">填寫訂購單</a>
</div>
</div>
</div>
</section> | 6 | 0.5 | 3 | 3 |
78f5cba71bd85fdb6d7d68eb5950150681c13a6b | app/views/settings/import_export.html.erb | app/views/settings/import_export.html.erb | <h2>Import/Export</h2>
<% if ENV['AWS_ACCESS_KEY_ID'] %>
<h3>Import</h3>
<%= direct_upload_form_for @uploader do |f| %>
<p><%= f.file_field :upload %></p>
<p><%= f.submit "Import", class: 'button' %></p>
<% end %>
<p><small>You can import OPML or starred.json files. Import is done in the background so you may not see every subscription or starred item right away.</small></p>
<hr />
<% else %>
<p>Import disabled. <code>AWS_ACCESS_KEY_ID</code>, <code>AWS_SECRET_ACCESS_KEY</code> and <code>AWS_S3_BUCKET</code> are missing.</p>
<% end %>
<h3>Export</h3>
<p><%= link_to "Download Subscriptions", subscriptions_path(format: :xml), class: "button" %></p> | <h2>Import/Export</h2>
<h3>Import</h3>
<% if ENV['AWS_ACCESS_KEY_ID'] %>
<%= direct_upload_form_for @uploader do |f| %>
<p><%= f.file_field :upload %></p>
<p><%= f.submit "Import", class: 'button' %></p>
<% end %>
<p><small>You can import OPML or starred.json files. Import is done in the background so you may not see every subscription or starred item right away.</small></p>
<hr />
<% else %>
<p>Import disabled. <code>AWS_ACCESS_KEY_ID</code>, <code>AWS_SECRET_ACCESS_KEY</code> and <code>AWS_S3_BUCKET</code> are missing.</p>
<% end %>
<h3>Export</h3>
<p><%= link_to "Download Subscriptions", subscriptions_path(format: :xml), class: "button" %></p> | Move header above conditional so it always shows up. | Move header above conditional so it always shows up.
| HTML+ERB | mit | feedbin/feedbin,nota-ja/feedbin,feedbin/feedbin,azukiapp/feedbin,feedbin/feedbin,azukiapp/feedbin,nota-ja/feedbin,brendanlong/feedbin,feedbin/feedbin,brendanlong/feedbin,fearenales/feedbin,saitodisse/feedbin,saitodisse/feedbin,fearenales/feedbin,azukiapp/feedbin,fearenales/feedbin,nota-ja/feedbin,saitodisse/feedbin,brendanlong/feedbin | html+erb | ## Code Before:
<h2>Import/Export</h2>
<% if ENV['AWS_ACCESS_KEY_ID'] %>
<h3>Import</h3>
<%= direct_upload_form_for @uploader do |f| %>
<p><%= f.file_field :upload %></p>
<p><%= f.submit "Import", class: 'button' %></p>
<% end %>
<p><small>You can import OPML or starred.json files. Import is done in the background so you may not see every subscription or starred item right away.</small></p>
<hr />
<% else %>
<p>Import disabled. <code>AWS_ACCESS_KEY_ID</code>, <code>AWS_SECRET_ACCESS_KEY</code> and <code>AWS_S3_BUCKET</code> are missing.</p>
<% end %>
<h3>Export</h3>
<p><%= link_to "Download Subscriptions", subscriptions_path(format: :xml), class: "button" %></p>
## Instruction:
Move header above conditional so it always shows up.
## Code After:
<h2>Import/Export</h2>
<h3>Import</h3>
<% if ENV['AWS_ACCESS_KEY_ID'] %>
<%= direct_upload_form_for @uploader do |f| %>
<p><%= f.file_field :upload %></p>
<p><%= f.submit "Import", class: 'button' %></p>
<% end %>
<p><small>You can import OPML or starred.json files. Import is done in the background so you may not see every subscription or starred item right away.</small></p>
<hr />
<% else %>
<p>Import disabled. <code>AWS_ACCESS_KEY_ID</code>, <code>AWS_SECRET_ACCESS_KEY</code> and <code>AWS_S3_BUCKET</code> are missing.</p>
<% end %>
<h3>Export</h3>
<p><%= link_to "Download Subscriptions", subscriptions_path(format: :xml), class: "button" %></p> | <h2>Import/Export</h2>
+
+ <h3>Import</h3>
<% if ENV['AWS_ACCESS_KEY_ID'] %>
- <h3>Import</h3>
<%= direct_upload_form_for @uploader do |f| %>
<p><%= f.file_field :upload %></p>
<p><%= f.submit "Import", class: 'button' %></p>
<% end %>
<p><small>You can import OPML or starred.json files. Import is done in the background so you may not see every subscription or starred item right away.</small></p>
<hr />
<% else %>
- <p>Import disabled. <code>AWS_ACCESS_KEY_ID</code>, <code>AWS_SECRET_ACCESS_KEY</code> and <code>AWS_S3_BUCKET</code> are missing.</p>
+ <p>Import disabled. <code>AWS_ACCESS_KEY_ID</code>, <code>AWS_SECRET_ACCESS_KEY</code> and <code>AWS_S3_BUCKET</code> are missing.</p>
? ++
<% end %>
<h3>Export</h3>
<p><%= link_to "Download Subscriptions", subscriptions_path(format: :xml), class: "button" %></p> | 5 | 0.294118 | 3 | 2 |
86f2bbdae5d110760bdcd24d3a7a27603fd61181 | interfaces/queryable/support/fixtures/crud.fixture.js | interfaces/queryable/support/fixtures/crud.fixture.js | /**
* Dependencies
*/
var Waterline = require('waterline');
module.exports = Waterline.Collection.extend({
tableName: 'userTable2',
identity: 'user',
datastore: 'queryable',
primaryKey: 'id',
fetchRecordsOnUpdate: true,
fetchRecordsOnDestroy: false,
fetchRecordsOnCreate: true,
fetchRecordsOnCreateEach: true,
attributes: {
// Primary Key
id: {
type: 'number',
autoMigrations: {
columnType: 'integer',
autoIncrement: true,
unique: true
}
},
first_name: {
type: 'string',
columnName: 'fName',
autoMigrations: {
columnType: 'varchar'
}
},
last_name: {
type: 'string',
autoMigrations: {
columnType: 'varchar'
}
},
type: {
type: 'string',
autoMigrations: {
columnType: 'varchar'
}
},
age: {
type: 'number',
autoMigrations: {
columnType: 'integer'
}
},
email: {
type: 'string',
autoMigrations: {
columnType: 'varchar'
}
},
// Timestamps
updatedAt: {
type: 'number',
autoUpdatedAt: true,
autoMigrations: {
columnType: 'bigint'
}
},
createdAt: {
type: 'number',
autoCreatedAt: true,
autoMigrations: {
columnType: 'bigint'
}
}
}
});
| /**
* Dependencies
*/
var Waterline = require('waterline');
module.exports = Waterline.Collection.extend({
tableName: 'userTable2',
identity: 'user',
datastore: 'queryable',
primaryKey: 'id',
fetchRecordsOnUpdate: true,
fetchRecordsOnDestroy: false,
fetchRecordsOnCreate: true,
fetchRecordsOnCreateEach: true,
attributes: {
// Primary Key
id: {
type: 'number',
autoMigrations: {
columnType: 'integer',
autoIncrement: true,
unique: true
}
},
first_name: {
type: 'string',
columnName: 'fName',
autoMigrations: {
columnType: 'varchar'
}
},
last_name: {
type: 'string',
columnName: 'lName',
autoMigrations: {
columnType: 'varchar'
}
},
type: {
type: 'string',
columnName: 't',
autoMigrations: {
columnType: 'varchar'
}
},
age: {
type: 'number',
columnName: 'a',
autoMigrations: {
columnType: 'integer'
}
},
email: {
type: 'string',
autoMigrations: {
columnType: 'varchar'
}
},
// Timestamps
updatedAt: {
type: 'number',
autoUpdatedAt: true,
autoMigrations: {
columnType: 'bigint'
}
},
createdAt: {
type: 'number',
autoCreatedAt: true,
autoMigrations: {
columnType: 'bigint'
}
}
}
});
| Use custom column names for some attributes in queryable tests | Use custom column names for some attributes in queryable tests
(shouldn't affect the tests, which is the point)
| JavaScript | mit | balderdashy/waterline-adapter-tests | javascript | ## Code Before:
/**
* Dependencies
*/
var Waterline = require('waterline');
module.exports = Waterline.Collection.extend({
tableName: 'userTable2',
identity: 'user',
datastore: 'queryable',
primaryKey: 'id',
fetchRecordsOnUpdate: true,
fetchRecordsOnDestroy: false,
fetchRecordsOnCreate: true,
fetchRecordsOnCreateEach: true,
attributes: {
// Primary Key
id: {
type: 'number',
autoMigrations: {
columnType: 'integer',
autoIncrement: true,
unique: true
}
},
first_name: {
type: 'string',
columnName: 'fName',
autoMigrations: {
columnType: 'varchar'
}
},
last_name: {
type: 'string',
autoMigrations: {
columnType: 'varchar'
}
},
type: {
type: 'string',
autoMigrations: {
columnType: 'varchar'
}
},
age: {
type: 'number',
autoMigrations: {
columnType: 'integer'
}
},
email: {
type: 'string',
autoMigrations: {
columnType: 'varchar'
}
},
// Timestamps
updatedAt: {
type: 'number',
autoUpdatedAt: true,
autoMigrations: {
columnType: 'bigint'
}
},
createdAt: {
type: 'number',
autoCreatedAt: true,
autoMigrations: {
columnType: 'bigint'
}
}
}
});
## Instruction:
Use custom column names for some attributes in queryable tests
(shouldn't affect the tests, which is the point)
## Code After:
/**
* Dependencies
*/
var Waterline = require('waterline');
module.exports = Waterline.Collection.extend({
tableName: 'userTable2',
identity: 'user',
datastore: 'queryable',
primaryKey: 'id',
fetchRecordsOnUpdate: true,
fetchRecordsOnDestroy: false,
fetchRecordsOnCreate: true,
fetchRecordsOnCreateEach: true,
attributes: {
// Primary Key
id: {
type: 'number',
autoMigrations: {
columnType: 'integer',
autoIncrement: true,
unique: true
}
},
first_name: {
type: 'string',
columnName: 'fName',
autoMigrations: {
columnType: 'varchar'
}
},
last_name: {
type: 'string',
columnName: 'lName',
autoMigrations: {
columnType: 'varchar'
}
},
type: {
type: 'string',
columnName: 't',
autoMigrations: {
columnType: 'varchar'
}
},
age: {
type: 'number',
columnName: 'a',
autoMigrations: {
columnType: 'integer'
}
},
email: {
type: 'string',
autoMigrations: {
columnType: 'varchar'
}
},
// Timestamps
updatedAt: {
type: 'number',
autoUpdatedAt: true,
autoMigrations: {
columnType: 'bigint'
}
},
createdAt: {
type: 'number',
autoCreatedAt: true,
autoMigrations: {
columnType: 'bigint'
}
}
}
});
| /**
* Dependencies
*/
var Waterline = require('waterline');
module.exports = Waterline.Collection.extend({
tableName: 'userTable2',
identity: 'user',
datastore: 'queryable',
primaryKey: 'id',
fetchRecordsOnUpdate: true,
fetchRecordsOnDestroy: false,
fetchRecordsOnCreate: true,
fetchRecordsOnCreateEach: true,
attributes: {
// Primary Key
id: {
type: 'number',
autoMigrations: {
columnType: 'integer',
autoIncrement: true,
unique: true
}
},
first_name: {
type: 'string',
columnName: 'fName',
autoMigrations: {
columnType: 'varchar'
}
},
last_name: {
type: 'string',
+ columnName: 'lName',
autoMigrations: {
columnType: 'varchar'
}
},
type: {
type: 'string',
+ columnName: 't',
autoMigrations: {
columnType: 'varchar'
}
},
age: {
type: 'number',
+ columnName: 'a',
autoMigrations: {
columnType: 'integer'
}
},
email: {
type: 'string',
autoMigrations: {
columnType: 'varchar'
}
},
// Timestamps
updatedAt: {
type: 'number',
autoUpdatedAt: true,
autoMigrations: {
columnType: 'bigint'
}
},
createdAt: {
type: 'number',
autoCreatedAt: true,
autoMigrations: {
columnType: 'bigint'
}
}
}
}); | 3 | 0.036145 | 3 | 0 |
e1a27161621038cc3bdfd4030aef130ee09e92ec | troposphere/dax.py | troposphere/dax.py |
from . import AWSObject, AWSProperty
from .validators import boolean
class SSESpecification(AWSProperty):
props = {
"SSEEnabled": (boolean, False),
}
class Cluster(AWSObject):
resource_type = "AWS::DAX::Cluster"
props = {
"AvailabilityZones": (str, False),
"ClusterName": (str, False),
"Description": (str, False),
"IAMRoleARN": (str, True),
"NodeType": (str, True),
"NotificationTopicARN": (str, False),
"ParameterGroupName": (str, False),
"PreferredMaintenanceWindow": (str, False),
"ReplicationFactor": (str, True),
"SSESpecification": (SSESpecification, False),
"SecurityGroupIds": ([str], False),
"SubnetGroupName": (str, True),
"Tags": (dict, False),
}
class ParameterGroup(AWSObject):
resource_type = "AWS::DAX::ParameterGroup"
props = {
"Description": (str, False),
"ParameterGroupName": (str, False),
"ParameterNameValues": (dict, False),
}
class SubnetGroup(AWSObject):
resource_type = "AWS::DAX::SubnetGroup"
props = {
"Description": (str, False),
"SubnetGroupName": (str, False),
"SubnetIds": ([str], False),
}
|
from . import AWSObject, AWSProperty
from .validators import boolean
class SSESpecification(AWSProperty):
props = {
"SSEEnabled": (boolean, False),
}
class Cluster(AWSObject):
resource_type = "AWS::DAX::Cluster"
props = {
"AvailabilityZones": (str, False),
"ClusterEndpointEncryptionType": (str, False),
"ClusterName": (str, False),
"Description": (str, False),
"IAMRoleARN": (str, True),
"NodeType": (str, True),
"NotificationTopicARN": (str, False),
"ParameterGroupName": (str, False),
"PreferredMaintenanceWindow": (str, False),
"ReplicationFactor": (str, True),
"SSESpecification": (SSESpecification, False),
"SecurityGroupIds": ([str], False),
"SubnetGroupName": (str, True),
"Tags": (dict, False),
}
class ParameterGroup(AWSObject):
resource_type = "AWS::DAX::ParameterGroup"
props = {
"Description": (str, False),
"ParameterGroupName": (str, False),
"ParameterNameValues": (dict, False),
}
class SubnetGroup(AWSObject):
resource_type = "AWS::DAX::SubnetGroup"
props = {
"Description": (str, False),
"SubnetGroupName": (str, False),
"SubnetIds": ([str], False),
}
| Update DAX per 2021-06-24 changes | Update DAX per 2021-06-24 changes
| Python | bsd-2-clause | cloudtools/troposphere,cloudtools/troposphere | python | ## Code Before:
from . import AWSObject, AWSProperty
from .validators import boolean
class SSESpecification(AWSProperty):
props = {
"SSEEnabled": (boolean, False),
}
class Cluster(AWSObject):
resource_type = "AWS::DAX::Cluster"
props = {
"AvailabilityZones": (str, False),
"ClusterName": (str, False),
"Description": (str, False),
"IAMRoleARN": (str, True),
"NodeType": (str, True),
"NotificationTopicARN": (str, False),
"ParameterGroupName": (str, False),
"PreferredMaintenanceWindow": (str, False),
"ReplicationFactor": (str, True),
"SSESpecification": (SSESpecification, False),
"SecurityGroupIds": ([str], False),
"SubnetGroupName": (str, True),
"Tags": (dict, False),
}
class ParameterGroup(AWSObject):
resource_type = "AWS::DAX::ParameterGroup"
props = {
"Description": (str, False),
"ParameterGroupName": (str, False),
"ParameterNameValues": (dict, False),
}
class SubnetGroup(AWSObject):
resource_type = "AWS::DAX::SubnetGroup"
props = {
"Description": (str, False),
"SubnetGroupName": (str, False),
"SubnetIds": ([str], False),
}
## Instruction:
Update DAX per 2021-06-24 changes
## Code After:
from . import AWSObject, AWSProperty
from .validators import boolean
class SSESpecification(AWSProperty):
props = {
"SSEEnabled": (boolean, False),
}
class Cluster(AWSObject):
resource_type = "AWS::DAX::Cluster"
props = {
"AvailabilityZones": (str, False),
"ClusterEndpointEncryptionType": (str, False),
"ClusterName": (str, False),
"Description": (str, False),
"IAMRoleARN": (str, True),
"NodeType": (str, True),
"NotificationTopicARN": (str, False),
"ParameterGroupName": (str, False),
"PreferredMaintenanceWindow": (str, False),
"ReplicationFactor": (str, True),
"SSESpecification": (SSESpecification, False),
"SecurityGroupIds": ([str], False),
"SubnetGroupName": (str, True),
"Tags": (dict, False),
}
class ParameterGroup(AWSObject):
resource_type = "AWS::DAX::ParameterGroup"
props = {
"Description": (str, False),
"ParameterGroupName": (str, False),
"ParameterNameValues": (dict, False),
}
class SubnetGroup(AWSObject):
resource_type = "AWS::DAX::SubnetGroup"
props = {
"Description": (str, False),
"SubnetGroupName": (str, False),
"SubnetIds": ([str], False),
}
|
from . import AWSObject, AWSProperty
from .validators import boolean
class SSESpecification(AWSProperty):
props = {
"SSEEnabled": (boolean, False),
}
class Cluster(AWSObject):
resource_type = "AWS::DAX::Cluster"
props = {
"AvailabilityZones": (str, False),
+ "ClusterEndpointEncryptionType": (str, False),
"ClusterName": (str, False),
"Description": (str, False),
"IAMRoleARN": (str, True),
"NodeType": (str, True),
"NotificationTopicARN": (str, False),
"ParameterGroupName": (str, False),
"PreferredMaintenanceWindow": (str, False),
"ReplicationFactor": (str, True),
"SSESpecification": (SSESpecification, False),
"SecurityGroupIds": ([str], False),
"SubnetGroupName": (str, True),
"Tags": (dict, False),
}
class ParameterGroup(AWSObject):
resource_type = "AWS::DAX::ParameterGroup"
props = {
"Description": (str, False),
"ParameterGroupName": (str, False),
"ParameterNameValues": (dict, False),
}
class SubnetGroup(AWSObject):
resource_type = "AWS::DAX::SubnetGroup"
props = {
"Description": (str, False),
"SubnetGroupName": (str, False),
"SubnetIds": ([str], False),
} | 1 | 0.020408 | 1 | 0 |
9ac748f6d3907cf8e39725c8a6562741d881d5cc | src/libp11/Makefile.mak | src/libp11/Makefile.mak | TOPDIR = ..\..
TARGET = libp11.dll
OBJECTS = p11_attr.obj p11_cert.obj p11_err.obj \
p11_key.obj p11_load.obj p11_misc.obj p11_rsa.obj p11_slot.obj
all: $(TARGET)
!INCLUDE $(TOPDIR)\win32\Make.rules.mak
$(TARGET): $(OBJECTS) ..\scdl\scdl.lib
perl $(TOPDIR)\win32\makedef.pl $*.def $* $(OBJECTS)
link $(LINKFLAGS) /dll /def:$*.def /implib:$*.lib /out:$(TARGET) $(OBJECTS) ..\scdl\scdl.lib $(OPENSSL_LIB)
| TOPDIR = ..\..
TARGET = libp11.dll
HEADERS = libp11.h
HEADERSDIR = $(TOPDIR)\src\include
OBJECTS = p11_attr.obj p11_cert.obj p11_err.obj \
p11_key.obj p11_load.obj p11_misc.obj p11_rsa.obj p11_slot.obj p11_ops.obj
all: install-headers $(TARGET)
!INCLUDE $(TOPDIR)\win32\Make.rules.mak
$(TARGET): $(OBJECTS) ..\scdl\scdl.lib
perl $(TOPDIR)\win32\makedef.pl $*.def $* $(OBJECTS)
link $(LINKFLAGS) /dll /def:$*.def /implib:$*.lib /out:$(TARGET) $(OBJECTS) ..\pkcs11\libpkcs11.lib ..\scdl\scdl.lib $(OPENSSL_LIB)
| Install libp11.h + small fixes | Install libp11.h + small fixes
git-svn-id: 444ed946b9c2220da791e84c3dd156a05f92db99@2430 c6295689-39f2-0310-b995-f0e70906c6a9
| Makefile | lgpl-2.1 | kasparsd/opensc-latvia-id,UIKit0/OpenSC,dirkx/OpenSC,dirkx/OpenSC.tokend,germanblanco/OpenSC,hongquan/OpenSC-main,mouse07410/OpenSC,Jakuje/OpenSC,gentoo/OpenSC,LudovicRousseau/OpenSC,marschap/pkg-opensc,OpenSC/OpenSC,viktorTarasov/OpenSC-SM,kasparsd/opensc-latvia-id,aobaid/OpenSC,carlhoerberg/OpenSC,mouse07410/OpenSC,velter/OpenSC,philipWendland/OpenSC,tidatida/OpenSC,0x7678/myOpenSC,metsma/OpenSC,carlhoerberg/OpenSC,gentoo/OpenSC,ieugen/OpenSC,martinpaljak/OpenSC,dirkx/OpenSC,dirkx/OpenSC.tokend,CardContact/OpenSC,carlhoerberg/OpenSC,jpki/OpenSC,fabled/OpenSC,UIKit0/OpenSC,marschap/pkg-opensc,ieugen/OpenSC,rickyepoderi/OpenSC,mtrojnar/OpenSC,marschap/pkg-opensc,mouse07410/OpenSC,adminmt/OpenSC,gemini/OpenSC,ieugen/OpenSC,CardContact/OpenSC,tidatida/OpenSC,dirkx/OpenSC.tokend,financeX/OpenSC,metsma/OpenSC,0x7678/OpenSC,aobaid/OpenSC,hhonkanen/OpenSC,carlhoerberg/OpenSC,dirkx/OpenSC.tokend,adminmt/OpenSC,hhonkanen/OpenSC,philipWendland/OpenSC,frankmorgner/OpenSC,fabled/OpenSC,nmav/OpenSC,dirkx/OpenSC,Jakuje/OpenSC,dengert/OpenSC,jpki/OpenSC,marschap/pkg-opensc,UIKit0/OpenSC,CardContact/OpenSC,germanblanco/OpenSC,0x7678/OpenSC,Jakuje/OpenSC,carlhoerberg/OpenSC,financeX/OpenSC,gentoo/OpenSC,velter/OpenSC,nmav/OpenSC,frankmorgner/OpenSC,LudovicRousseau/OpenSC,viktorTarasov/OpenSC-SM,viktorTarasov/OpenSC-SM,aobaid/OpenSC,OpenSC/OpenSC,frankmorgner/OpenSC,hongquan/OpenSC-main,gentoo/OpenSC,nmav/OpenSC,financeX/OpenSC,AktivCo/OpenSC,gentoo/OpenSC,fabled/OpenSC,dirkx/OpenSC.tokend,martinpaljak/OpenSC,tidatida/OpenSC,0x7678/OpenSC,UIKit0/OpenSC,philipWendland/OpenSC,AktivCo/OpenSC,l1k/OpenSC,velter/OpenSC,AktivCo/OpenSC,hhonkanen/OpenSC,dengert/OpenSC,dengert/OpenSC,metsma/OpenSC,LudovicRousseau/OpenSC,kasparsd/opensc-latvia-id,0x7678/myOpenSC,financeX/OpenSC,velter/OpenSC,martinpaljak/OpenSC,OpenSC/OpenSC,dirkx/OpenSC,0x7678/OpenSC,ieugen/OpenSC,rickyepoderi/OpenSC,aobaid/OpenSC,dirkx/OpenSC,0x7678/myOpenSC,kasparsd/opensc-latvia-id,rickyepoderi/OpenSC,fabled/OpenSC,0x7678/myOpenSC,gemini/OpenSC,gemini/OpenSC,financeX/OpenSC,dirkx/OpenSC.tokend,frankmorgner/OpenSC,ieugen/OpenSC,Jakuje/OpenSC,l1k/OpenSC,jpki/OpenSC,hongquan/OpenSC-main,0x7678/myOpenSC,adminmt/OpenSC,mtrojnar/OpenSC,l1k/OpenSC,mtrojnar/OpenSC,germanblanco/OpenSC,adminmt/OpenSC,tidatida/OpenSC | makefile | ## Code Before:
TOPDIR = ..\..
TARGET = libp11.dll
OBJECTS = p11_attr.obj p11_cert.obj p11_err.obj \
p11_key.obj p11_load.obj p11_misc.obj p11_rsa.obj p11_slot.obj
all: $(TARGET)
!INCLUDE $(TOPDIR)\win32\Make.rules.mak
$(TARGET): $(OBJECTS) ..\scdl\scdl.lib
perl $(TOPDIR)\win32\makedef.pl $*.def $* $(OBJECTS)
link $(LINKFLAGS) /dll /def:$*.def /implib:$*.lib /out:$(TARGET) $(OBJECTS) ..\scdl\scdl.lib $(OPENSSL_LIB)
## Instruction:
Install libp11.h + small fixes
git-svn-id: 444ed946b9c2220da791e84c3dd156a05f92db99@2430 c6295689-39f2-0310-b995-f0e70906c6a9
## Code After:
TOPDIR = ..\..
TARGET = libp11.dll
HEADERS = libp11.h
HEADERSDIR = $(TOPDIR)\src\include
OBJECTS = p11_attr.obj p11_cert.obj p11_err.obj \
p11_key.obj p11_load.obj p11_misc.obj p11_rsa.obj p11_slot.obj p11_ops.obj
all: install-headers $(TARGET)
!INCLUDE $(TOPDIR)\win32\Make.rules.mak
$(TARGET): $(OBJECTS) ..\scdl\scdl.lib
perl $(TOPDIR)\win32\makedef.pl $*.def $* $(OBJECTS)
link $(LINKFLAGS) /dll /def:$*.def /implib:$*.lib /out:$(TARGET) $(OBJECTS) ..\pkcs11\libpkcs11.lib ..\scdl\scdl.lib $(OPENSSL_LIB)
| TOPDIR = ..\..
TARGET = libp11.dll
+ HEADERS = libp11.h
+ HEADERSDIR = $(TOPDIR)\src\include
+
OBJECTS = p11_attr.obj p11_cert.obj p11_err.obj \
- p11_key.obj p11_load.obj p11_misc.obj p11_rsa.obj p11_slot.obj
+ p11_key.obj p11_load.obj p11_misc.obj p11_rsa.obj p11_slot.obj p11_ops.obj
? ++++++++++++
- all: $(TARGET)
+ all: install-headers $(TARGET)
!INCLUDE $(TOPDIR)\win32\Make.rules.mak
$(TARGET): $(OBJECTS) ..\scdl\scdl.lib
perl $(TOPDIR)\win32\makedef.pl $*.def $* $(OBJECTS)
- link $(LINKFLAGS) /dll /def:$*.def /implib:$*.lib /out:$(TARGET) $(OBJECTS) ..\scdl\scdl.lib $(OPENSSL_LIB)
+ link $(LINKFLAGS) /dll /def:$*.def /implib:$*.lib /out:$(TARGET) $(OBJECTS) ..\pkcs11\libpkcs11.lib ..\scdl\scdl.lib $(OPENSSL_LIB)
? ++++++++++++++++++++++++
| 9 | 0.642857 | 6 | 3 |
0c8484323be566e3bd362bcd99efc24d26c74afd | java/src/main/java/me/gowdru/notes/sort/Sorter.java | java/src/main/java/me/gowdru/notes/sort/Sorter.java | package me.gowdru.notes.sort;
import java.util.Comparator;
/**
* Defines contract for Sorter algorithm implementations
*/
public interface Sorter<T> {
/**
* sorts {@code items}i in an array by comparing them using {@code comparator}
* @param items items to be sorted
* @param comparator comparison assistant
*/
public void sort(T[] items, Comparator<T> comparator);
}
| package me.gowdru.notes.sort;
import java.util.Comparator;
/**
* Defines contract for Sorter algorithm implementations
*/
public interface Sorter<T> {
/**
* sorts {@code items}i in an array by comparing them using {@code comparator}
* @param items items to be sorted
* @param comparator comparison assistant
*/
public void sort(T[] items, Comparator<T> comparator);
/**
* swaps a pair of elements in array
* @param array - array of items
* @param pos1 position of an item to be swapped to/with
* @param pos2 position of another item to be swapped to/with
*/
public default void swap(T[] array, int pos1, int pos2){
T tmp = array[pos1];
array[pos1] = array[pos2];
array[pos2] = tmp;
}
}
| Add swap method to base class | Add swap method to base class
| Java | apache-2.0 | thammegowda/algos,thammegowda/algos,thammegowda/notes,thammegowda/notes,thammegowda/notes,thammegowda/algos | java | ## Code Before:
package me.gowdru.notes.sort;
import java.util.Comparator;
/**
* Defines contract for Sorter algorithm implementations
*/
public interface Sorter<T> {
/**
* sorts {@code items}i in an array by comparing them using {@code comparator}
* @param items items to be sorted
* @param comparator comparison assistant
*/
public void sort(T[] items, Comparator<T> comparator);
}
## Instruction:
Add swap method to base class
## Code After:
package me.gowdru.notes.sort;
import java.util.Comparator;
/**
* Defines contract for Sorter algorithm implementations
*/
public interface Sorter<T> {
/**
* sorts {@code items}i in an array by comparing them using {@code comparator}
* @param items items to be sorted
* @param comparator comparison assistant
*/
public void sort(T[] items, Comparator<T> comparator);
/**
* swaps a pair of elements in array
* @param array - array of items
* @param pos1 position of an item to be swapped to/with
* @param pos2 position of another item to be swapped to/with
*/
public default void swap(T[] array, int pos1, int pos2){
T tmp = array[pos1];
array[pos1] = array[pos2];
array[pos2] = tmp;
}
}
| package me.gowdru.notes.sort;
import java.util.Comparator;
/**
* Defines contract for Sorter algorithm implementations
*/
public interface Sorter<T> {
/**
* sorts {@code items}i in an array by comparing them using {@code comparator}
* @param items items to be sorted
* @param comparator comparison assistant
*/
public void sort(T[] items, Comparator<T> comparator);
+ /**
+ * swaps a pair of elements in array
+ * @param array - array of items
+ * @param pos1 position of an item to be swapped to/with
+ * @param pos2 position of another item to be swapped to/with
+ */
+ public default void swap(T[] array, int pos1, int pos2){
+ T tmp = array[pos1];
+ array[pos1] = array[pos2];
+ array[pos2] = tmp;
+ }
} | 11 | 0.647059 | 11 | 0 |
58473f9be3658d88d6601dca55850e8c7d909363 | camsnap.js | camsnap.js | var MjpegCamera = require('mjpeg-camera');
var fs = require('fs');
var express = require('express');
var app = express();
//app.use(express.static(__dirname + '/snapshot'));
app.listen(8083, function () {
console.log('Server running on port 8083');
});
var camera = new MjpegCamera( { url: 'http://127.0.0.1:8082/' } );
app.get( '/snap.jpg',
function (req, res) {
console.log('GET \'/snap.jpg\'');
camera.getScreenshot( function (err,
frame ) {
//res.writeHead(200, {'Content-Type': 'text/plain' });
res.send( frame )
}
);
});
| // Set the server listen port
var port = '8083';
var camPath = 'http://127.0.0.1:8082/';
// no configuration below here
var MjpegCamera = require('mjpeg-camera');
var fs = require('fs');
var express = require('express');
var app = express();
app.listen(port, function () {
console.log('Server running on port ' + port);
});
var camera = new MjpegCamera( { url: camPath } );
app.get( '/snap.jpg', function (req, res) {
console.log('GET \'/snap.jpg\'');
camera.getScreenshot( function (err, frame ) {
//res.writeHead(200, {'Content-Type': 'text/plain' });
res.send( frame )
}
);
}); | Format tidying and adding configurability | Format tidying and adding configurability
| JavaScript | mit | hardybm/camsnap | javascript | ## Code Before:
var MjpegCamera = require('mjpeg-camera');
var fs = require('fs');
var express = require('express');
var app = express();
//app.use(express.static(__dirname + '/snapshot'));
app.listen(8083, function () {
console.log('Server running on port 8083');
});
var camera = new MjpegCamera( { url: 'http://127.0.0.1:8082/' } );
app.get( '/snap.jpg',
function (req, res) {
console.log('GET \'/snap.jpg\'');
camera.getScreenshot( function (err,
frame ) {
//res.writeHead(200, {'Content-Type': 'text/plain' });
res.send( frame )
}
);
});
## Instruction:
Format tidying and adding configurability
## Code After:
// Set the server listen port
var port = '8083';
var camPath = 'http://127.0.0.1:8082/';
// no configuration below here
var MjpegCamera = require('mjpeg-camera');
var fs = require('fs');
var express = require('express');
var app = express();
app.listen(port, function () {
console.log('Server running on port ' + port);
});
var camera = new MjpegCamera( { url: camPath } );
app.get( '/snap.jpg', function (req, res) {
console.log('GET \'/snap.jpg\'');
camera.getScreenshot( function (err, frame ) {
//res.writeHead(200, {'Content-Type': 'text/plain' });
res.send( frame )
}
);
}); | + // Set the server listen port
+ var port = '8083';
+ var camPath = 'http://127.0.0.1:8082/';
+
+
+ // no configuration below here
var MjpegCamera = require('mjpeg-camera');
var fs = require('fs');
var express = require('express');
+ var app = express();
- var app = express();
- //app.use(express.static(__dirname + '/snapshot'));
-
- app.listen(8083, function () {
? ^^^^
+ app.listen(port, function () {
? ^^^^
- console.log('Server running on port 8083');
? ----
+ console.log('Server running on port ' + port);
? +++++++
});
- var camera = new MjpegCamera( { url: 'http://127.0.0.1:8082/' } );
+ var camera = new MjpegCamera( { url: camPath } );
+ app.get( '/snap.jpg', function (req, res) {
- app.get( '/snap.jpg',
- function (req, res) {
- console.log('GET \'/snap.jpg\'');
? ---
+ console.log('GET \'/snap.jpg\'');
- camera.getScreenshot( function (err,
? ---
+ camera.getScreenshot( function (err, frame ) {
? +++++++++++
- frame ) {
- //res.writeHead(200, {'Content-Type': 'text/plain' });
? -----------
+ //res.writeHead(200, {'Content-Type': 'text/plain' });
- res.send( frame )
? -----------
+ res.send( frame )
+ }
+ );
- }
- );
-
});
- | 34 | 1.307692 | 17 | 17 |
d5655325bc8b0ec7c6459f692d3f52b1dddb88a5 | .travis.yml | .travis.yml | language: php
php:
- 5.5
- 5.6
- 7.0
- 7.1
- nightly
matrix:
include:
- php: 5.6
env: setup=pre-5.3
- php: 7.1
env: setup=pre-5.3
- php: nightly
env: setup=pre-5.3
- php: hhvm
env: setup=pre-5.3
before_script:
- if [[ $setup = 'pre-5.3' ]]; then travis_retry composer require --dev "orchestra/testbench=3.2.*"; fi
- if [[ $setup = 'pre-5.3' ]]; then travis_retry composer require "illuminate/contracts=5.2.*" "illuminate/http=5.2.*" "illuminate/support=5.2.*" "illuminate/database=5.2.*" "illuminate/view=5.2.*" --no-interaction; fi
- travis_retry composer install --no-interaction --prefer-source --no-suggest
notifications:
slack: laravel-br:cdt7z4D0Eybo0eJrH7tOErzh
script:
# - vendor/bin/phpspec run -v
- phpunit --process-isolation
| language: php
php:
- 5.6
- 7.0
- 7.1
- nightly
matrix:
include:
- php: 5.6
env: setup=pre-5.3
- php: 7.1
env: setup=pre-5.3
- php: nightly
env: setup=pre-5.3
- php: hhvm
env: setup=pre-5.3
before_script:
- if [[ $setup = 'pre-5.3' ]]; then travis_retry composer require --dev "orchestra/testbench=3.2.*"; fi
- if [[ $setup = 'pre-5.3' ]]; then travis_retry composer require "illuminate/contracts=5.2.*" "illuminate/http=5.2.*" "illuminate/support=5.2.*" "illuminate/database=5.2.*" "illuminate/view=5.2.*" --no-interaction; fi
- travis_retry composer install --no-interaction --prefer-source --no-suggest
notifications:
slack: laravel-br:cdt7z4D0Eybo0eJrH7tOErzh
script:
# - vendor/bin/phpspec run -v
- phpunit --process-isolation
| Remove php 5.5 EOL from builds | Remove php 5.5 EOL from builds
| YAML | mit | artesaos/defender | yaml | ## Code Before:
language: php
php:
- 5.5
- 5.6
- 7.0
- 7.1
- nightly
matrix:
include:
- php: 5.6
env: setup=pre-5.3
- php: 7.1
env: setup=pre-5.3
- php: nightly
env: setup=pre-5.3
- php: hhvm
env: setup=pre-5.3
before_script:
- if [[ $setup = 'pre-5.3' ]]; then travis_retry composer require --dev "orchestra/testbench=3.2.*"; fi
- if [[ $setup = 'pre-5.3' ]]; then travis_retry composer require "illuminate/contracts=5.2.*" "illuminate/http=5.2.*" "illuminate/support=5.2.*" "illuminate/database=5.2.*" "illuminate/view=5.2.*" --no-interaction; fi
- travis_retry composer install --no-interaction --prefer-source --no-suggest
notifications:
slack: laravel-br:cdt7z4D0Eybo0eJrH7tOErzh
script:
# - vendor/bin/phpspec run -v
- phpunit --process-isolation
## Instruction:
Remove php 5.5 EOL from builds
## Code After:
language: php
php:
- 5.6
- 7.0
- 7.1
- nightly
matrix:
include:
- php: 5.6
env: setup=pre-5.3
- php: 7.1
env: setup=pre-5.3
- php: nightly
env: setup=pre-5.3
- php: hhvm
env: setup=pre-5.3
before_script:
- if [[ $setup = 'pre-5.3' ]]; then travis_retry composer require --dev "orchestra/testbench=3.2.*"; fi
- if [[ $setup = 'pre-5.3' ]]; then travis_retry composer require "illuminate/contracts=5.2.*" "illuminate/http=5.2.*" "illuminate/support=5.2.*" "illuminate/database=5.2.*" "illuminate/view=5.2.*" --no-interaction; fi
- travis_retry composer install --no-interaction --prefer-source --no-suggest
notifications:
slack: laravel-br:cdt7z4D0Eybo0eJrH7tOErzh
script:
# - vendor/bin/phpspec run -v
- phpunit --process-isolation
| language: php
php:
- - 5.5
- 5.6
- 7.0
- 7.1
- nightly
matrix:
include:
- php: 5.6
env: setup=pre-5.3
- php: 7.1
- env: setup=pre-5.3
? --
+ env: setup=pre-5.3
- php: nightly
env: setup=pre-5.3
- php: hhvm
env: setup=pre-5.3
before_script:
- if [[ $setup = 'pre-5.3' ]]; then travis_retry composer require --dev "orchestra/testbench=3.2.*"; fi
- if [[ $setup = 'pre-5.3' ]]; then travis_retry composer require "illuminate/contracts=5.2.*" "illuminate/http=5.2.*" "illuminate/support=5.2.*" "illuminate/database=5.2.*" "illuminate/view=5.2.*" --no-interaction; fi
- travis_retry composer install --no-interaction --prefer-source --no-suggest
notifications:
- slack: laravel-br:cdt7z4D0Eybo0eJrH7tOErzh
? --
+ slack: laravel-br:cdt7z4D0Eybo0eJrH7tOErzh
-
+
script:
# - vendor/bin/phpspec run -v
- phpunit --process-isolation | 7 | 0.225806 | 3 | 4 |
9540d909d0af9586b83b8bc504760e1f8b7768bb | vscode-extensions/commons/commons-language-server/src/main/java/org/springframework/ide/vscode/commons/languageserver/java/DefaultJavaProjectFinder.java | vscode-extensions/commons/commons-language-server/src/main/java/org/springframework/ide/vscode/commons/languageserver/java/DefaultJavaProjectFinder.java | package org.springframework.ide.vscode.commons.languageserver.java;
import org.springframework.ide.vscode.commons.java.IJavaProject;
import org.springframework.ide.vscode.commons.languageserver.util.IDocument;
public class DefaultJavaProjectFinder implements JavaProjectFinder {
private final IJavaProjectFinderStrategy[] STRATEGIES = new IJavaProjectFinderStrategy[] {
new JavaProjectWithClasspathFileFinderStrategy(),
new MavenProjectFinderStrategy()
};
@Override
public IJavaProject find(IDocument d) {
for (IJavaProjectFinderStrategy strategy : STRATEGIES) {
try {
return strategy.find(d);
} catch (Throwable t) {
// Log perhaps?
}
}
return null;
}
}
| package org.springframework.ide.vscode.commons.languageserver.java;
import org.springframework.ide.vscode.commons.java.IJavaProject;
import org.springframework.ide.vscode.commons.languageserver.util.IDocument;
public class DefaultJavaProjectFinder implements JavaProjectFinder {
private final IJavaProjectFinderStrategy[] STRATEGIES = new IJavaProjectFinderStrategy[] {
new JavaProjectWithClasspathFileFinderStrategy(),
new MavenProjectFinderStrategy()
};
@Override
public IJavaProject find(IDocument d) {
for (IJavaProjectFinderStrategy strategy : STRATEGIES) {
try {
IJavaProject project = strategy.find(d);
if (project != null) {
return project;
}
} catch (Throwable t) {
// Log perhaps?
}
}
return null;
}
}
| Handle null found project for default java project finder | Handle null found project for default java project finder | Java | epl-1.0 | spring-projects/sts4,spring-projects/sts4,spring-projects/sts4,spring-projects/sts4,spring-projects/sts4,spring-projects/sts4 | java | ## Code Before:
package org.springframework.ide.vscode.commons.languageserver.java;
import org.springframework.ide.vscode.commons.java.IJavaProject;
import org.springframework.ide.vscode.commons.languageserver.util.IDocument;
public class DefaultJavaProjectFinder implements JavaProjectFinder {
private final IJavaProjectFinderStrategy[] STRATEGIES = new IJavaProjectFinderStrategy[] {
new JavaProjectWithClasspathFileFinderStrategy(),
new MavenProjectFinderStrategy()
};
@Override
public IJavaProject find(IDocument d) {
for (IJavaProjectFinderStrategy strategy : STRATEGIES) {
try {
return strategy.find(d);
} catch (Throwable t) {
// Log perhaps?
}
}
return null;
}
}
## Instruction:
Handle null found project for default java project finder
## Code After:
package org.springframework.ide.vscode.commons.languageserver.java;
import org.springframework.ide.vscode.commons.java.IJavaProject;
import org.springframework.ide.vscode.commons.languageserver.util.IDocument;
public class DefaultJavaProjectFinder implements JavaProjectFinder {
private final IJavaProjectFinderStrategy[] STRATEGIES = new IJavaProjectFinderStrategy[] {
new JavaProjectWithClasspathFileFinderStrategy(),
new MavenProjectFinderStrategy()
};
@Override
public IJavaProject find(IDocument d) {
for (IJavaProjectFinderStrategy strategy : STRATEGIES) {
try {
IJavaProject project = strategy.find(d);
if (project != null) {
return project;
}
} catch (Throwable t) {
// Log perhaps?
}
}
return null;
}
}
| package org.springframework.ide.vscode.commons.languageserver.java;
import org.springframework.ide.vscode.commons.java.IJavaProject;
import org.springframework.ide.vscode.commons.languageserver.util.IDocument;
public class DefaultJavaProjectFinder implements JavaProjectFinder {
private final IJavaProjectFinderStrategy[] STRATEGIES = new IJavaProjectFinderStrategy[] {
new JavaProjectWithClasspathFileFinderStrategy(),
new MavenProjectFinderStrategy()
};
@Override
public IJavaProject find(IDocument d) {
for (IJavaProjectFinderStrategy strategy : STRATEGIES) {
try {
- return strategy.find(d);
+ IJavaProject project = strategy.find(d);
+ if (project != null) {
+ return project;
+ }
} catch (Throwable t) {
// Log perhaps?
}
}
return null;
}
} | 5 | 0.208333 | 4 | 1 |
3763fc570fc863a0343f26fdcc2671be39ab7498 | phoneProfilesPlus/src/main/java/sk/henrichg/phoneprofilesplus/CmdMobileData.java | phoneProfilesPlus/src/main/java/sk/henrichg/phoneprofilesplus/CmdMobileData.java | package sk.henrichg.phoneprofilesplus;
import android.net.IConnectivityManager;
import android.os.ServiceManager;
@SuppressWarnings("WeakerAccess")
public class CmdMobileData {
public static void main(String[] args) {
if (!(run())) {
System.exit(1);
}
}
private static boolean run() {
try {
IConnectivityManager adapter = IConnectivityManager.Stub.asInterface(ServiceManager.getService("connectivity"));
//adapter.;
return true;
} catch (Throwable e) {
return false;
}
}
}
| package sk.henrichg.phoneprofilesplus;
import android.os.ServiceManager;
import com.android.internal.telephony.ITelephony;
@SuppressWarnings("WeakerAccess")
public class CmdMobileData {
public static void main(String[] args) {
int subId= Integer.parseInt(args[0]);
boolean enable = Boolean.parseBoolean(args[1]);
if (!(run(subId, enable))) {
System.exit(1);
}
}
private static boolean run(int subId, boolean enable) {
try {
ITelephony adapter = ITelephony.Stub.asInterface(ServiceManager.getService("phone"));
//adapter.getDataEnabled(subId); // hm podpora pre dual sim
adapter.setUserDataEnabled(subId, enable); // hm podpora pre dual sim
return true;
} catch (Throwable e) {
return false;
}
}
}
| Set mobile data without reflections for Android 9. (1) | Set mobile data without reflections for Android 9. (1)
| Java | apache-2.0 | henrichg/PhoneProfilesPlus | java | ## Code Before:
package sk.henrichg.phoneprofilesplus;
import android.net.IConnectivityManager;
import android.os.ServiceManager;
@SuppressWarnings("WeakerAccess")
public class CmdMobileData {
public static void main(String[] args) {
if (!(run())) {
System.exit(1);
}
}
private static boolean run() {
try {
IConnectivityManager adapter = IConnectivityManager.Stub.asInterface(ServiceManager.getService("connectivity"));
//adapter.;
return true;
} catch (Throwable e) {
return false;
}
}
}
## Instruction:
Set mobile data without reflections for Android 9. (1)
## Code After:
package sk.henrichg.phoneprofilesplus;
import android.os.ServiceManager;
import com.android.internal.telephony.ITelephony;
@SuppressWarnings("WeakerAccess")
public class CmdMobileData {
public static void main(String[] args) {
int subId= Integer.parseInt(args[0]);
boolean enable = Boolean.parseBoolean(args[1]);
if (!(run(subId, enable))) {
System.exit(1);
}
}
private static boolean run(int subId, boolean enable) {
try {
ITelephony adapter = ITelephony.Stub.asInterface(ServiceManager.getService("phone"));
//adapter.getDataEnabled(subId); // hm podpora pre dual sim
adapter.setUserDataEnabled(subId, enable); // hm podpora pre dual sim
return true;
} catch (Throwable e) {
return false;
}
}
}
| package sk.henrichg.phoneprofilesplus;
- import android.net.IConnectivityManager;
import android.os.ServiceManager;
+
+ import com.android.internal.telephony.ITelephony;
@SuppressWarnings("WeakerAccess")
public class CmdMobileData {
public static void main(String[] args) {
+ int subId= Integer.parseInt(args[0]);
+ boolean enable = Boolean.parseBoolean(args[1]);
- if (!(run())) {
+ if (!(run(subId, enable))) {
? +++++++++++++
System.exit(1);
}
}
- private static boolean run() {
+ private static boolean run(int subId, boolean enable) {
try {
- IConnectivityManager adapter = IConnectivityManager.Stub.asInterface(ServiceManager.getService("connectivity"));
? ^ -------- ------- ^ -------- ------- ^ - -------
+ ITelephony adapter = ITelephony.Stub.asInterface(ServiceManager.getService("phone"));
? ^^^^^^ ^^^^^^ ^^
- //adapter.;
+ //adapter.getDataEnabled(subId); // hm podpora pre dual sim
+ adapter.setUserDataEnabled(subId, enable); // hm podpora pre dual sim
return true;
} catch (Throwable e) {
return false;
}
}
} | 14 | 0.56 | 9 | 5 |
30fcfb5fec7933d69d9117be6219945406012ef5 | setup.py | setup.py | from setuptools import setup
description = 'New testament greek app for django.'
long_desc = open('README.rst').read()
setup(
name='django-greekapp',
version='0.0.1',
url='https://github.com/honza/greekapp',
install_requires=['django', 'redis'],
description=description,
long_description=long_desc,
author='Honza Pokorny',
author_email='me@honza.ca',
maintainer='Honza Pokorny',
maintainer_email='me@honza.ca',
packages=['greekapp'],
package_data={
'greekapp': [
'templates/greekapp/index.html',
'static/greekapp.min.js',
'static/greekapp.css'
]
}
)
| from setuptools import setup
description = 'New testament greek app for django.'
long_desc = open('README.rst').read()
setup(
name='django-greekapp',
version='0.0.1',
url='https://github.com/honza/greekapp',
install_requires=['django', 'redis'],
description=description,
long_description=long_desc,
author='Honza Pokorny',
author_email='me@honza.ca',
maintainer='Honza Pokorny',
maintainer_email='me@honza.ca',
packages=['greekapp'],
package_data={
'greekapp': [
'templates/greekapp/index.html',
'static/greekapp.min.js',
'static/greekapp.css',
'managements/commands/nt.db'
]
}
)
| Include nt.db with package data. | Include nt.db with package data.
| Python | bsd-2-clause | honza/greekapp,honza/greekapp,honza/greekapp | python | ## Code Before:
from setuptools import setup
description = 'New testament greek app for django.'
long_desc = open('README.rst').read()
setup(
name='django-greekapp',
version='0.0.1',
url='https://github.com/honza/greekapp',
install_requires=['django', 'redis'],
description=description,
long_description=long_desc,
author='Honza Pokorny',
author_email='me@honza.ca',
maintainer='Honza Pokorny',
maintainer_email='me@honza.ca',
packages=['greekapp'],
package_data={
'greekapp': [
'templates/greekapp/index.html',
'static/greekapp.min.js',
'static/greekapp.css'
]
}
)
## Instruction:
Include nt.db with package data.
## Code After:
from setuptools import setup
description = 'New testament greek app for django.'
long_desc = open('README.rst').read()
setup(
name='django-greekapp',
version='0.0.1',
url='https://github.com/honza/greekapp',
install_requires=['django', 'redis'],
description=description,
long_description=long_desc,
author='Honza Pokorny',
author_email='me@honza.ca',
maintainer='Honza Pokorny',
maintainer_email='me@honza.ca',
packages=['greekapp'],
package_data={
'greekapp': [
'templates/greekapp/index.html',
'static/greekapp.min.js',
'static/greekapp.css',
'managements/commands/nt.db'
]
}
)
| from setuptools import setup
description = 'New testament greek app for django.'
long_desc = open('README.rst').read()
setup(
name='django-greekapp',
version='0.0.1',
url='https://github.com/honza/greekapp',
install_requires=['django', 'redis'],
description=description,
long_description=long_desc,
author='Honza Pokorny',
author_email='me@honza.ca',
maintainer='Honza Pokorny',
maintainer_email='me@honza.ca',
packages=['greekapp'],
package_data={
'greekapp': [
'templates/greekapp/index.html',
'static/greekapp.min.js',
- 'static/greekapp.css'
+ 'static/greekapp.css',
? +
+ 'managements/commands/nt.db'
]
}
) | 3 | 0.12 | 2 | 1 |
305342cffdae386afdf2e3790d8d1bbc29044dac | generators/app/prompts.js | generators/app/prompts.js | 'use strict';
function notEmpty(src) {
return !!src;
}
module.exports = [{
type: 'input',
name: 'name',
message: 'Project Name',
validate: notEmpty
}, {
type: 'input',
name: 'description',
message: 'Description',
validate: notEmpty
}, {
type: 'list',
name: 'engine',
message: 'Which templating engine?',
choices: [{
name: 'Handlebars',
value: 'handlebars'
}, {
name: 'DustJS',
value: 'dust'
}],
default: 'handlebars'
}, {
type: 'list',
name: 'grid',
message: 'Which grid system?',
choices: [{
name: 'Bootstrap',
value: 'bootstrap'
}, {
name: 'Susy',
value: 'susy'
}]
}];
| 'use strict';
function notEmpty(src) {
return !!src;
}
module.exports = [{
type: 'input',
name: 'name',
message: 'Project Name',
validate: notEmpty
}, {
type: 'input',
name: 'description',
message: 'Description',
validate: notEmpty
}, {
type: 'list',
name: 'engine',
message: 'Which templating engine?',
choices: [{
name: 'Handlebars',
value: 'handlebars'
}, {
name: 'DustJS',
value: 'dust'
}],
default: 'handlebars'
}, {
type: 'list',
name: 'grid',
message: 'Which grid system?',
choices: [{
name: 'Bootstrap',
value: 'bootstrap'
}, {
name: 'Susy',
value: 'susy'
}],
default: 'bootstrap'
}];
| Add default grid system prompt | Add default grid system prompt | JavaScript | mit | log-oscon/generator-log-marionette,log-oscon/generator-log-marionette | javascript | ## Code Before:
'use strict';
function notEmpty(src) {
return !!src;
}
module.exports = [{
type: 'input',
name: 'name',
message: 'Project Name',
validate: notEmpty
}, {
type: 'input',
name: 'description',
message: 'Description',
validate: notEmpty
}, {
type: 'list',
name: 'engine',
message: 'Which templating engine?',
choices: [{
name: 'Handlebars',
value: 'handlebars'
}, {
name: 'DustJS',
value: 'dust'
}],
default: 'handlebars'
}, {
type: 'list',
name: 'grid',
message: 'Which grid system?',
choices: [{
name: 'Bootstrap',
value: 'bootstrap'
}, {
name: 'Susy',
value: 'susy'
}]
}];
## Instruction:
Add default grid system prompt
## Code After:
'use strict';
function notEmpty(src) {
return !!src;
}
module.exports = [{
type: 'input',
name: 'name',
message: 'Project Name',
validate: notEmpty
}, {
type: 'input',
name: 'description',
message: 'Description',
validate: notEmpty
}, {
type: 'list',
name: 'engine',
message: 'Which templating engine?',
choices: [{
name: 'Handlebars',
value: 'handlebars'
}, {
name: 'DustJS',
value: 'dust'
}],
default: 'handlebars'
}, {
type: 'list',
name: 'grid',
message: 'Which grid system?',
choices: [{
name: 'Bootstrap',
value: 'bootstrap'
}, {
name: 'Susy',
value: 'susy'
}],
default: 'bootstrap'
}];
| 'use strict';
function notEmpty(src) {
return !!src;
}
module.exports = [{
type: 'input',
name: 'name',
message: 'Project Name',
validate: notEmpty
}, {
type: 'input',
name: 'description',
message: 'Description',
validate: notEmpty
}, {
type: 'list',
name: 'engine',
message: 'Which templating engine?',
choices: [{
name: 'Handlebars',
value: 'handlebars'
}, {
name: 'DustJS',
value: 'dust'
}],
default: 'handlebars'
}, {
type: 'list',
name: 'grid',
message: 'Which grid system?',
choices: [{
name: 'Bootstrap',
value: 'bootstrap'
}, {
name: 'Susy',
value: 'susy'
- }]
+ }],
? +
+ default: 'bootstrap'
}]; | 3 | 0.075 | 2 | 1 |
9b5029a7b5fa83df459d551577fff50a7c99a52d | .travis.yml | .travis.yml | language: node_js
node_js:
- '6.9'
before_install:
- pip install --user codecov
after_success:
- codecov --file coverage/lcov.info --disable search
| language: node_js
node_js:
- '6.9'
before_install:
- sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
- sudo apt-get -qq update
- sudo apt-get -qq install g++-4.8
env:
- CXX=g++-4.8
before_install:
- pip install --user codecov
after_success:
- codecov --file coverage/lcov.info --disable search
| Add script to try to fix Travis build | Add script to try to fix Travis build
| YAML | mit | centrepoint-exresapp/cpapp-salesforce,centrepoint-exresapp/cpapp-salesforce,lucy-marko/centrepoint,lucy-marko/centrepoint | yaml | ## Code Before:
language: node_js
node_js:
- '6.9'
before_install:
- pip install --user codecov
after_success:
- codecov --file coverage/lcov.info --disable search
## Instruction:
Add script to try to fix Travis build
## Code After:
language: node_js
node_js:
- '6.9'
before_install:
- sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
- sudo apt-get -qq update
- sudo apt-get -qq install g++-4.8
env:
- CXX=g++-4.8
before_install:
- pip install --user codecov
after_success:
- codecov --file coverage/lcov.info --disable search
| language: node_js
node_js:
- '6.9'
before_install:
+ - sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
+ - sudo apt-get -qq update
+ - sudo apt-get -qq install g++-4.8
+ env:
+ - CXX=g++-4.8
+ before_install:
- pip install --user codecov
after_success:
- codecov --file coverage/lcov.info --disable search | 6 | 0.857143 | 6 | 0 |
fe18e2f72c4f31e2262f8310f7bf2487668e25f2 | README.md | README.md | overview-multi-search
=====================
This [Overview](https://github.com/overview/overview-server) plugin uses
nothing but flat files. Any web server can serve it.
Running on a dev machine
------------------------
1. `npm install`
2. `npm install -g gulp`
3. `gulp server`
4. Point your local Overview instance to `http://localhost:9001`
Deploying to S3
---------------
1. Run it on your dev machine
2. Set `AWS_ACCESS_KEY_ID` and `AWS_SECRET_ACCESS_KEY` environment variables
3. `gulp deploy`
| overview-multi-search
=====================
This [Overview](https://github.com/overview/overview-server) plugin uses
nothing but flat files. Any web server can serve it.
Running as a docker image
-------------------------
1. Run the image, mapping port 3000 to a free port on your host
Running on a dev machine
------------------------
1. `npm install`
2. `npm install -g gulp`
3. `gulp server`
4. Point your local Overview instance to `http://localhost:3000`
Deploying to S3
---------------
1. Run it on your dev machine
2. Set `AWS_ACCESS_KEY_ID` and `AWS_SECRET_ACCESS_KEY` environment variables
3. `gulp deploy`
| Add some docker specific words | Add some docker specific words
| Markdown | agpl-3.0 | overview/overview-multi-search,overview/overview-multi-search,overview/overview-multi-search,overview/overview-multi-search | markdown | ## Code Before:
overview-multi-search
=====================
This [Overview](https://github.com/overview/overview-server) plugin uses
nothing but flat files. Any web server can serve it.
Running on a dev machine
------------------------
1. `npm install`
2. `npm install -g gulp`
3. `gulp server`
4. Point your local Overview instance to `http://localhost:9001`
Deploying to S3
---------------
1. Run it on your dev machine
2. Set `AWS_ACCESS_KEY_ID` and `AWS_SECRET_ACCESS_KEY` environment variables
3. `gulp deploy`
## Instruction:
Add some docker specific words
## Code After:
overview-multi-search
=====================
This [Overview](https://github.com/overview/overview-server) plugin uses
nothing but flat files. Any web server can serve it.
Running as a docker image
-------------------------
1. Run the image, mapping port 3000 to a free port on your host
Running on a dev machine
------------------------
1. `npm install`
2. `npm install -g gulp`
3. `gulp server`
4. Point your local Overview instance to `http://localhost:3000`
Deploying to S3
---------------
1. Run it on your dev machine
2. Set `AWS_ACCESS_KEY_ID` and `AWS_SECRET_ACCESS_KEY` environment variables
3. `gulp deploy`
| overview-multi-search
=====================
This [Overview](https://github.com/overview/overview-server) plugin uses
nothing but flat files. Any web server can serve it.
+
+ Running as a docker image
+ -------------------------
+
+ 1. Run the image, mapping port 3000 to a free port on your host
Running on a dev machine
------------------------
1. `npm install`
2. `npm install -g gulp`
3. `gulp server`
- 4. Point your local Overview instance to `http://localhost:9001`
? ^ ^
+ 4. Point your local Overview instance to `http://localhost:3000`
? ^ ^
Deploying to S3
---------------
1. Run it on your dev machine
2. Set `AWS_ACCESS_KEY_ID` and `AWS_SECRET_ACCESS_KEY` environment variables
3. `gulp deploy` | 7 | 0.35 | 6 | 1 |
ec6a4c4d4a0ebf237c0fcd89f1dbf7ec0ea3c6f7 | api/app/policies/new_club_application_policy.rb | api/app/policies/new_club_application_policy.rb |
class NewClubApplicationPolicy < ApplicationPolicy
def show?
user_added?
end
def update?
if user.admin?
true
else
user_added?
end
end
def add_user?
user_added?
end
def remove_user?
user_added? && record.point_of_contact == user
end
def submit?
user_added?
end
def accept?
user.admin?
end
private
def user_added?
record.users.include? user
end
end
|
class NewClubApplicationPolicy < ApplicationPolicy
def show?
user_added?
end
def update?
if user.admin?
true
else
user_added?
end
end
def add_user?
user_added?
end
def remove_user?
user_added? && record.point_of_contact == user
end
def submit?
user_added?
end
def accept?
user.admin?
end
private
def user_added?
record.users.exists? user.id
end
end
| Reduce unneeded DB calls when checking if user_added? | Reduce unneeded DB calls when checking if user_added?
| Ruby | mit | hackclub/api,hackclub/api,hackclub/api | ruby | ## Code Before:
class NewClubApplicationPolicy < ApplicationPolicy
def show?
user_added?
end
def update?
if user.admin?
true
else
user_added?
end
end
def add_user?
user_added?
end
def remove_user?
user_added? && record.point_of_contact == user
end
def submit?
user_added?
end
def accept?
user.admin?
end
private
def user_added?
record.users.include? user
end
end
## Instruction:
Reduce unneeded DB calls when checking if user_added?
## Code After:
class NewClubApplicationPolicy < ApplicationPolicy
def show?
user_added?
end
def update?
if user.admin?
true
else
user_added?
end
end
def add_user?
user_added?
end
def remove_user?
user_added? && record.point_of_contact == user
end
def submit?
user_added?
end
def accept?
user.admin?
end
private
def user_added?
record.users.exists? user.id
end
end
|
class NewClubApplicationPolicy < ApplicationPolicy
def show?
user_added?
end
def update?
if user.admin?
true
else
user_added?
end
end
def add_user?
user_added?
end
def remove_user?
user_added? && record.point_of_contact == user
end
def submit?
user_added?
end
def accept?
user.admin?
end
private
def user_added?
- record.users.include? user
? ^^^^^^
+ record.users.exists? user.id
? ++ ^^^ +++
end
end | 2 | 0.055556 | 1 | 1 |
a5017cc8d3db6fad613f7c1c5e5e0d58c0d57d17 | application/config/Platform.php | application/config/Platform.php | <?php defined('BASEPATH') OR exit('No direct script access allowed');
// Application name.
$config['name'] = 'Starter template';
// Costum images.
$config['front_image'] = 'https://placeholdit.imgix.net/~text?txtsize=28&bg=0099ff&txtclr=ffffff&txt=300%C3%97300&w=300&h=300&fm=png';
$config['back_image'] = 'http://placehold.it/350x150';
// Meta data
$config['description'] = '';
$config['author'] = ''; | <?php defined('BASEPATH') OR exit('No direct script access allowed');
// Application name.
$config['name'] = 'Starter template';
// Costum images.
$config['front_image'] = 'https://placeholdit.imgix.net/~text?txtsize=28&bg=0099ff&txtclr=ffffff&txt=300%C3%97300&w=300&h=300&fm=png';
$config['back_image'] = 'http://placehold.it/350x150';
// Meta data
$config['description'] = '';
$config['author'] = '';
// Signature count
$config['sign_count'] = '100.000';
| Set config var for the signatures counter | Set config var for the signatures counter
| PHP | mit | Tjoosten/Platt,Tjoosten/Platt,Tjoosten/Platt | php | ## Code Before:
<?php defined('BASEPATH') OR exit('No direct script access allowed');
// Application name.
$config['name'] = 'Starter template';
// Costum images.
$config['front_image'] = 'https://placeholdit.imgix.net/~text?txtsize=28&bg=0099ff&txtclr=ffffff&txt=300%C3%97300&w=300&h=300&fm=png';
$config['back_image'] = 'http://placehold.it/350x150';
// Meta data
$config['description'] = '';
$config['author'] = '';
## Instruction:
Set config var for the signatures counter
## Code After:
<?php defined('BASEPATH') OR exit('No direct script access allowed');
// Application name.
$config['name'] = 'Starter template';
// Costum images.
$config['front_image'] = 'https://placeholdit.imgix.net/~text?txtsize=28&bg=0099ff&txtclr=ffffff&txt=300%C3%97300&w=300&h=300&fm=png';
$config['back_image'] = 'http://placehold.it/350x150';
// Meta data
$config['description'] = '';
$config['author'] = '';
// Signature count
$config['sign_count'] = '100.000';
| <?php defined('BASEPATH') OR exit('No direct script access allowed');
// Application name.
$config['name'] = 'Starter template';
// Costum images.
$config['front_image'] = 'https://placeholdit.imgix.net/~text?txtsize=28&bg=0099ff&txtclr=ffffff&txt=300%C3%97300&w=300&h=300&fm=png';
$config['back_image'] = 'http://placehold.it/350x150';
// Meta data
$config['description'] = '';
$config['author'] = '';
+
+ // Signature count
+ $config['sign_count'] = '100.000'; | 3 | 0.25 | 3 | 0 |
aee1b084e3136063edb91e618bb4b5527c479dea | init-package/init-cc-mode.el | init-package/init-cc-mode.el | (require 'cc-mode)
(add-hook 'c-mode-hook '(lambda () (c-toggle-auto-state t)))
(add-hook 'c++-mode-hook '(lambda () (c-toggle-auto-state t)))
;; From http://xugx2007.blogspot.ca/2007/06/benjamin-rutts-emacs-c-development-tips.html
(setq compilation-finish-function
(lambda (buf str)
(if (string-match "exited abnormally" str)
;;there were errors
(message "compilation errors, press C-x ` to visit")
;;no errors, make the compilation window go away in 0.5 seconds
(run-at-time 0.5 nil 'delete-windows-on buf)
(message "No compilation errors."))))
| (require 'cc-mode)
(add-hook 'c-mode-hook '(lambda () (c-toggle-auto-state t)))
(add-hook 'c++-mode-hook '(lambda () (c-toggle-auto-state t)))
;; From http://xugx2007.blogspot.ca/2007/06/benjamin-rutts-emacs-c-development-tips.html
(setq compilation-finish-function
(lambda (buf str)
(if (or (string-match "exited abnormally" str)
(string-match "FAILED" (buffer-string)))
;;there were errors
(message "There were errors. SPC-e-n to visit.")
;;no errors, make the compilation window go away in 0.5 seconds
(run-at-time 1.0 nil 'delete-windows-on buf)
(message "Ok."))))
| Tweak auto-closing of compilation window | Tweak auto-closing of compilation window
| Emacs Lisp | mit | tsonntag/dotemacs,tsonntag/dotemacs,tsonntag/dotemacs,tsonntag/dotemacs | emacs-lisp | ## Code Before:
(require 'cc-mode)
(add-hook 'c-mode-hook '(lambda () (c-toggle-auto-state t)))
(add-hook 'c++-mode-hook '(lambda () (c-toggle-auto-state t)))
;; From http://xugx2007.blogspot.ca/2007/06/benjamin-rutts-emacs-c-development-tips.html
(setq compilation-finish-function
(lambda (buf str)
(if (string-match "exited abnormally" str)
;;there were errors
(message "compilation errors, press C-x ` to visit")
;;no errors, make the compilation window go away in 0.5 seconds
(run-at-time 0.5 nil 'delete-windows-on buf)
(message "No compilation errors."))))
## Instruction:
Tweak auto-closing of compilation window
## Code After:
(require 'cc-mode)
(add-hook 'c-mode-hook '(lambda () (c-toggle-auto-state t)))
(add-hook 'c++-mode-hook '(lambda () (c-toggle-auto-state t)))
;; From http://xugx2007.blogspot.ca/2007/06/benjamin-rutts-emacs-c-development-tips.html
(setq compilation-finish-function
(lambda (buf str)
(if (or (string-match "exited abnormally" str)
(string-match "FAILED" (buffer-string)))
;;there were errors
(message "There were errors. SPC-e-n to visit.")
;;no errors, make the compilation window go away in 0.5 seconds
(run-at-time 1.0 nil 'delete-windows-on buf)
(message "Ok."))))
| (require 'cc-mode)
(add-hook 'c-mode-hook '(lambda () (c-toggle-auto-state t)))
(add-hook 'c++-mode-hook '(lambda () (c-toggle-auto-state t)))
;; From http://xugx2007.blogspot.ca/2007/06/benjamin-rutts-emacs-c-development-tips.html
(setq compilation-finish-function
(lambda (buf str)
- (if (string-match "exited abnormally" str)
+ (if (or (string-match "exited abnormally" str)
? ++++
+ (string-match "FAILED" (buffer-string)))
;;there were errors
- (message "compilation errors, press C-x ` to visit")
+ (message "There were errors. SPC-e-n to visit.")
;;no errors, make the compilation window go away in 0.5 seconds
- (run-at-time 0.5 nil 'delete-windows-on buf)
? --
+ (run-at-time 1.0 nil 'delete-windows-on buf)
? ++
- (message "No compilation errors."))))
+ (message "Ok.")))) | 9 | 0.5625 | 5 | 4 |
8fed9c42343cd131d231bd00e041e104703b8a94 | CMakeLists.txt | CMakeLists.txt | cmake_minimum_required(VERSION 2.8)
project(waysome C)
#
# Where to look for modules
#
set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/Modules)
#
# Project options
#
option(HARD_MODE "Enables extra checks for use during development" OFF)
#
# Dependencies
#
find_package(PNG REQUIRED 1.6)
find_package(WaylandEgl REQUIRED)
find_package(WaylandServer REQUIRED)
find_package(WaylandCursor REQUIRED)
find_package(WaylandScanner REQUIRED)
#
# Enable testing
#
enable_testing()
#
# Add subdirectories for the project
#
add_subdirectory(src)
| cmake_minimum_required(VERSION 2.8)
project(waysome C)
#
# Where to look for modules
#
set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/Modules)
#
# Project options
#
option(HARD_MODE "Enables extra checks for use during development" OFF)
#
# Dependencies
#
find_package(Libudev)
find_package(PNG REQUIRED 1.6)
find_package(WaylandEgl REQUIRED)
find_package(WaylandServer REQUIRED)
find_package(WaylandCursor REQUIRED)
find_package(WaylandScanner REQUIRED)
#
# Enable testing
#
enable_testing()
#
# Add subdirectories for the project
#
add_subdirectory(src)
| Add udev to build dependencies | Add udev to build dependencies
| Text | lgpl-2.1 | waysome/waysome,waysome/waysome | text | ## Code Before:
cmake_minimum_required(VERSION 2.8)
project(waysome C)
#
# Where to look for modules
#
set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/Modules)
#
# Project options
#
option(HARD_MODE "Enables extra checks for use during development" OFF)
#
# Dependencies
#
find_package(PNG REQUIRED 1.6)
find_package(WaylandEgl REQUIRED)
find_package(WaylandServer REQUIRED)
find_package(WaylandCursor REQUIRED)
find_package(WaylandScanner REQUIRED)
#
# Enable testing
#
enable_testing()
#
# Add subdirectories for the project
#
add_subdirectory(src)
## Instruction:
Add udev to build dependencies
## Code After:
cmake_minimum_required(VERSION 2.8)
project(waysome C)
#
# Where to look for modules
#
set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/Modules)
#
# Project options
#
option(HARD_MODE "Enables extra checks for use during development" OFF)
#
# Dependencies
#
find_package(Libudev)
find_package(PNG REQUIRED 1.6)
find_package(WaylandEgl REQUIRED)
find_package(WaylandServer REQUIRED)
find_package(WaylandCursor REQUIRED)
find_package(WaylandScanner REQUIRED)
#
# Enable testing
#
enable_testing()
#
# Add subdirectories for the project
#
add_subdirectory(src)
| cmake_minimum_required(VERSION 2.8)
project(waysome C)
#
# Where to look for modules
#
set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/Modules)
#
# Project options
#
option(HARD_MODE "Enables extra checks for use during development" OFF)
#
# Dependencies
#
+ find_package(Libudev)
find_package(PNG REQUIRED 1.6)
find_package(WaylandEgl REQUIRED)
find_package(WaylandServer REQUIRED)
find_package(WaylandCursor REQUIRED)
find_package(WaylandScanner REQUIRED)
#
# Enable testing
#
enable_testing()
#
# Add subdirectories for the project
#
add_subdirectory(src)
| 1 | 0.029412 | 1 | 0 |
ad7f9dd633e9af84af3e68d22817a2a1f4c19149 | app/jobs/scrape_page_job.rb | app/jobs/scrape_page_job.rb | class ScrapePageJob < ApplicationJob
queue_as :default
def perform(url)
ScrapePageUrl.new(url).call
end
end
| class ScrapePageJob < ApplicationJob
queue_as :default
def perform(url)
content = ScrapePageUrl.new(url).call
Page.create(url: url, content: content)
end
end
| Store scraped content in db | Store scraped content in db
| Ruby | mit | januszm/combthedesert-tmp,januszm/combthedesert-tmp | ruby | ## Code Before:
class ScrapePageJob < ApplicationJob
queue_as :default
def perform(url)
ScrapePageUrl.new(url).call
end
end
## Instruction:
Store scraped content in db
## Code After:
class ScrapePageJob < ApplicationJob
queue_as :default
def perform(url)
content = ScrapePageUrl.new(url).call
Page.create(url: url, content: content)
end
end
| class ScrapePageJob < ApplicationJob
queue_as :default
def perform(url)
- ScrapePageUrl.new(url).call
+ content = ScrapePageUrl.new(url).call
? ++++++++++
+ Page.create(url: url, content: content)
end
end | 3 | 0.428571 | 2 | 1 |
dabb4f7d46d2c2f4fd79dc5e277a582bb3794faa | config/core.extension.yml | config/core.extension.yml | module:
automated_cron: 0
block: 0
breakpoint: 0
ckeditor: 0
color: 0
comment: 0
config: 0
config_direct_save: 0
contact: 0
contextual: 0
datetime: 0
dblog: 0
dynamic_page_cache: 0
editor: 0
entity: 0
entity_reference_revisions: 0
field: 0
field_ui: 0
file: 0
filter: 0
help: 0
history: 0
image: 0
link: 0
media_entity: 0
media_entity_image: 0
menu_ui: 0
node: 0
options: 0
page_cache: 0
path: 0
quickedit: 0
rdf: 0
search: 0
shortcut: 0
simple_block: 0
system: 0
taxonomy: 0
text: 0
toolbar: 0
tour: 0
update: 0
user: 0
views_ui: 0
menu_link_content: 1
views: 10
paragraphs: 11
standard: 1000
theme:
stable: 0
classy: 0
seven: 0
bootstrap: 0
university_bootstrap: 0
profile: standard
_core:
default_config_hash: R4IF-ClDHXxblLcG0L7MgsLvfBIMAvi_skumNFQwkDc
| module:
automated_cron: 0
block: 0
breakpoint: 0
ckeditor: 0
color: 0
comment: 0
config: 0
config_direct_save: 0
contact: 0
contextual: 0
datetime: 0
dblog: 0
dynamic_page_cache: 0
editor: 0
entity: 0
entity_browser: 0
entity_browser_entity_form: 0
entity_reference_revisions: 0
field: 0
field_ui: 0
file: 0
filter: 0
help: 0
history: 0
image: 0
inline_entity_form: 0
link: 0
media_entity: 0
media_entity_image: 0
menu_ui: 0
node: 0
options: 0
page_cache: 0
path: 0
quickedit: 0
rdf: 0
search: 0
shortcut: 0
simple_block: 0
system: 0
taxonomy: 0
text: 0
toolbar: 0
tour: 0
update: 0
user: 0
views_ui: 0
menu_link_content: 1
views: 10
paragraphs: 11
standard: 1000
theme:
stable: 0
classy: 0
seven: 0
bootstrap: 0
university_bootstrap: 0
profile: standard
_core:
default_config_hash: R4IF-ClDHXxblLcG0L7MgsLvfBIMAvi_skumNFQwkDc
| Install and enable entity browser, entity browser IEF and IEF | Install and enable entity browser, entity browser IEF and IEF
| YAML | mit | cainaru/natalie-sandbox,cainaru/natalie-sandbox,cainaru/natalie-sandbox | yaml | ## Code Before:
module:
automated_cron: 0
block: 0
breakpoint: 0
ckeditor: 0
color: 0
comment: 0
config: 0
config_direct_save: 0
contact: 0
contextual: 0
datetime: 0
dblog: 0
dynamic_page_cache: 0
editor: 0
entity: 0
entity_reference_revisions: 0
field: 0
field_ui: 0
file: 0
filter: 0
help: 0
history: 0
image: 0
link: 0
media_entity: 0
media_entity_image: 0
menu_ui: 0
node: 0
options: 0
page_cache: 0
path: 0
quickedit: 0
rdf: 0
search: 0
shortcut: 0
simple_block: 0
system: 0
taxonomy: 0
text: 0
toolbar: 0
tour: 0
update: 0
user: 0
views_ui: 0
menu_link_content: 1
views: 10
paragraphs: 11
standard: 1000
theme:
stable: 0
classy: 0
seven: 0
bootstrap: 0
university_bootstrap: 0
profile: standard
_core:
default_config_hash: R4IF-ClDHXxblLcG0L7MgsLvfBIMAvi_skumNFQwkDc
## Instruction:
Install and enable entity browser, entity browser IEF and IEF
## Code After:
module:
automated_cron: 0
block: 0
breakpoint: 0
ckeditor: 0
color: 0
comment: 0
config: 0
config_direct_save: 0
contact: 0
contextual: 0
datetime: 0
dblog: 0
dynamic_page_cache: 0
editor: 0
entity: 0
entity_browser: 0
entity_browser_entity_form: 0
entity_reference_revisions: 0
field: 0
field_ui: 0
file: 0
filter: 0
help: 0
history: 0
image: 0
inline_entity_form: 0
link: 0
media_entity: 0
media_entity_image: 0
menu_ui: 0
node: 0
options: 0
page_cache: 0
path: 0
quickedit: 0
rdf: 0
search: 0
shortcut: 0
simple_block: 0
system: 0
taxonomy: 0
text: 0
toolbar: 0
tour: 0
update: 0
user: 0
views_ui: 0
menu_link_content: 1
views: 10
paragraphs: 11
standard: 1000
theme:
stable: 0
classy: 0
seven: 0
bootstrap: 0
university_bootstrap: 0
profile: standard
_core:
default_config_hash: R4IF-ClDHXxblLcG0L7MgsLvfBIMAvi_skumNFQwkDc
| module:
automated_cron: 0
block: 0
breakpoint: 0
ckeditor: 0
color: 0
comment: 0
config: 0
config_direct_save: 0
contact: 0
contextual: 0
datetime: 0
dblog: 0
dynamic_page_cache: 0
editor: 0
entity: 0
+ entity_browser: 0
+ entity_browser_entity_form: 0
entity_reference_revisions: 0
field: 0
field_ui: 0
file: 0
filter: 0
help: 0
history: 0
image: 0
+ inline_entity_form: 0
link: 0
media_entity: 0
media_entity_image: 0
menu_ui: 0
node: 0
options: 0
page_cache: 0
path: 0
quickedit: 0
rdf: 0
search: 0
shortcut: 0
simple_block: 0
system: 0
taxonomy: 0
text: 0
toolbar: 0
tour: 0
update: 0
user: 0
views_ui: 0
menu_link_content: 1
views: 10
paragraphs: 11
standard: 1000
theme:
stable: 0
classy: 0
seven: 0
bootstrap: 0
university_bootstrap: 0
profile: standard
_core:
default_config_hash: R4IF-ClDHXxblLcG0L7MgsLvfBIMAvi_skumNFQwkDc | 3 | 0.051724 | 3 | 0 |
ddd71f41b1e4942610de5e3f6cac667a6d2dd53b | targets/arty/Makefile.mk | targets/arty/Makefile.mk |
ifneq ($(PLATFORM),arty)
$(error "Platform should be arty when using this file!?")
endif
# Settings
DEFAULT_TARGET = net
TARGET ?= $(DEFAULT_TARGET)
PROG_PORT ?= /dev/ttyUSB0
COMM_PORT ?= /dev/ttyUSB1
BAUD ?= 115200
# Image
image-flash-$(PLATFORM): image-flash-py
@true
# Gateware
gateware-load-$(PLATFORM):
openocd -f board/digilent_$(PLATFORM).cfg -c "init; pld load 0 $(TARGET_BUILD_DIR)/gateware/top.bit; exit"
gateware-flash-$(PLATFORM): gateware-flash-py
@true
# Firmware
firmware-load-$(PLATFORM):
flterm --port=$(COMM_PORT) --kernel=$(TARGET_BUILD_DIR)/software/firmware/firmware.bin --speed=$(BAUD)
firmware-flash-$(PLATFORM): firmwage-flash-py
@true
firmware-connect-$(PLATFORM):
flterm --port=$(COMM_PORT) --speed=$(BAUD)
# Bios
bios-flash-$(PLATFORM):
@echo "Unsupported."
@false
# Extra commands
help-$(PLATFORM):
@true
reset-$(PLATFORM):
@echo "Unsupported."
@false
|
ifneq ($(PLATFORM),arty)
$(error "Platform should be arty when using this file!?")
endif
# Settings
DEFAULT_TARGET = net
TARGET ?= $(DEFAULT_TARGET)
PROG_PORT ?= /dev/ttyUSB0
COMM_PORT ?= /dev/ttyUSB1
BAUD ?= 115200
# Image
image-flash-$(PLATFORM): image-flash-py
@true
# Gateware
gateware-load-$(PLATFORM):
openocd -f board/digilent_$(PLATFORM).cfg -c "init; pld load 0 $(TARGET_BUILD_DIR)/gateware/top.bit; exit"
gateware-flash-$(PLATFORM): gateware-flash-py
@true
# Firmware
firmware-load-$(PLATFORM):
flterm --port=$(COMM_PORT) --kernel=$(FIRMWARE_FILEBASE).bin --speed=$(BAUD)
firmware-flash-$(PLATFORM): firmwage-flash-py
@true
firmware-connect-$(PLATFORM):
flterm --port=$(COMM_PORT) --speed=$(BAUD)
# Bios
bios-flash-$(PLATFORM):
@echo "Unsupported."
@false
# Extra commands
help-$(PLATFORM):
@true
reset-$(PLATFORM):
@echo "Unsupported."
@false
| Support "make firmware-load" for F=micropython | arty: Support "make firmware-load" for F=micropython
| Makefile | bsd-2-clause | cr1901/HDMI2USB-litex-firmware,mithro/HDMI2USB-litex-firmware,mithro/HDMI2USB-litex-firmware,cr1901/HDMI2USB-litex-firmware,mithro/HDMI2USB-litex-firmware,cr1901/HDMI2USB-litex-firmware,cr1901/HDMI2USB-litex-firmware,mithro/HDMI2USB-litex-firmware | makefile | ## Code Before:
ifneq ($(PLATFORM),arty)
$(error "Platform should be arty when using this file!?")
endif
# Settings
DEFAULT_TARGET = net
TARGET ?= $(DEFAULT_TARGET)
PROG_PORT ?= /dev/ttyUSB0
COMM_PORT ?= /dev/ttyUSB1
BAUD ?= 115200
# Image
image-flash-$(PLATFORM): image-flash-py
@true
# Gateware
gateware-load-$(PLATFORM):
openocd -f board/digilent_$(PLATFORM).cfg -c "init; pld load 0 $(TARGET_BUILD_DIR)/gateware/top.bit; exit"
gateware-flash-$(PLATFORM): gateware-flash-py
@true
# Firmware
firmware-load-$(PLATFORM):
flterm --port=$(COMM_PORT) --kernel=$(TARGET_BUILD_DIR)/software/firmware/firmware.bin --speed=$(BAUD)
firmware-flash-$(PLATFORM): firmwage-flash-py
@true
firmware-connect-$(PLATFORM):
flterm --port=$(COMM_PORT) --speed=$(BAUD)
# Bios
bios-flash-$(PLATFORM):
@echo "Unsupported."
@false
# Extra commands
help-$(PLATFORM):
@true
reset-$(PLATFORM):
@echo "Unsupported."
@false
## Instruction:
arty: Support "make firmware-load" for F=micropython
## Code After:
ifneq ($(PLATFORM),arty)
$(error "Platform should be arty when using this file!?")
endif
# Settings
DEFAULT_TARGET = net
TARGET ?= $(DEFAULT_TARGET)
PROG_PORT ?= /dev/ttyUSB0
COMM_PORT ?= /dev/ttyUSB1
BAUD ?= 115200
# Image
image-flash-$(PLATFORM): image-flash-py
@true
# Gateware
gateware-load-$(PLATFORM):
openocd -f board/digilent_$(PLATFORM).cfg -c "init; pld load 0 $(TARGET_BUILD_DIR)/gateware/top.bit; exit"
gateware-flash-$(PLATFORM): gateware-flash-py
@true
# Firmware
firmware-load-$(PLATFORM):
flterm --port=$(COMM_PORT) --kernel=$(FIRMWARE_FILEBASE).bin --speed=$(BAUD)
firmware-flash-$(PLATFORM): firmwage-flash-py
@true
firmware-connect-$(PLATFORM):
flterm --port=$(COMM_PORT) --speed=$(BAUD)
# Bios
bios-flash-$(PLATFORM):
@echo "Unsupported."
@false
# Extra commands
help-$(PLATFORM):
@true
reset-$(PLATFORM):
@echo "Unsupported."
@false
|
ifneq ($(PLATFORM),arty)
$(error "Platform should be arty when using this file!?")
endif
# Settings
DEFAULT_TARGET = net
TARGET ?= $(DEFAULT_TARGET)
PROG_PORT ?= /dev/ttyUSB0
COMM_PORT ?= /dev/ttyUSB1
BAUD ?= 115200
# Image
image-flash-$(PLATFORM): image-flash-py
@true
# Gateware
gateware-load-$(PLATFORM):
openocd -f board/digilent_$(PLATFORM).cfg -c "init; pld load 0 $(TARGET_BUILD_DIR)/gateware/top.bit; exit"
gateware-flash-$(PLATFORM): gateware-flash-py
@true
# Firmware
firmware-load-$(PLATFORM):
- flterm --port=$(COMM_PORT) --kernel=$(TARGET_BUILD_DIR)/software/firmware/firmware.bin --speed=$(BAUD)
+ flterm --port=$(COMM_PORT) --kernel=$(FIRMWARE_FILEBASE).bin --speed=$(BAUD)
+
firmware-flash-$(PLATFORM): firmwage-flash-py
@true
firmware-connect-$(PLATFORM):
flterm --port=$(COMM_PORT) --speed=$(BAUD)
# Bios
bios-flash-$(PLATFORM):
@echo "Unsupported."
@false
# Extra commands
help-$(PLATFORM):
@true
reset-$(PLATFORM):
@echo "Unsupported."
@false | 3 | 0.065217 | 2 | 1 |
353ea6f70e81267f5bcf8145cd5a1997b1e63c08 | ports/atmel-samd/boards/feather_m4_can/mpconfigboard.mk | ports/atmel-samd/boards/feather_m4_can/mpconfigboard.mk | USB_VID = 0x239A
USB_PID = 0x80CE
USB_PRODUCT = "Feather M4 CAN"
USB_MANUFACTURER = "Adafruit Industries LLC"
CHIP_VARIANT = SAME51J19A
CHIP_FAMILY = same51
QSPI_FLASH_FILESYSTEM = 1
EXTERNAL_FLASH_DEVICES = GD25Q16C
LONGINT_IMPL = MPZ
CIRCUITPY_CANIO = 1
| USB_VID = 0x239A
USB_PID = 0x80CE
USB_PRODUCT = "Feather M4 CAN"
USB_MANUFACTURER = "Adafruit Industries LLC"
CHIP_VARIANT = SAME51J19A
CHIP_FAMILY = same51
QSPI_FLASH_FILESYSTEM = 1
EXTERNAL_FLASH_DEVICES = GD25Q16C
LONGINT_IMPL = MPZ
CIRCUITPY__EVE = 1
CIRCUITPY_CANIO = 1
| Add EVE support to Feather M4 CAN | Add EVE support to Feather M4 CAN
| Makefile | mit | adafruit/circuitpython,adafruit/circuitpython,adafruit/circuitpython,adafruit/circuitpython,adafruit/circuitpython,adafruit/circuitpython | makefile | ## Code Before:
USB_VID = 0x239A
USB_PID = 0x80CE
USB_PRODUCT = "Feather M4 CAN"
USB_MANUFACTURER = "Adafruit Industries LLC"
CHIP_VARIANT = SAME51J19A
CHIP_FAMILY = same51
QSPI_FLASH_FILESYSTEM = 1
EXTERNAL_FLASH_DEVICES = GD25Q16C
LONGINT_IMPL = MPZ
CIRCUITPY_CANIO = 1
## Instruction:
Add EVE support to Feather M4 CAN
## Code After:
USB_VID = 0x239A
USB_PID = 0x80CE
USB_PRODUCT = "Feather M4 CAN"
USB_MANUFACTURER = "Adafruit Industries LLC"
CHIP_VARIANT = SAME51J19A
CHIP_FAMILY = same51
QSPI_FLASH_FILESYSTEM = 1
EXTERNAL_FLASH_DEVICES = GD25Q16C
LONGINT_IMPL = MPZ
CIRCUITPY__EVE = 1
CIRCUITPY_CANIO = 1
| USB_VID = 0x239A
USB_PID = 0x80CE
USB_PRODUCT = "Feather M4 CAN"
USB_MANUFACTURER = "Adafruit Industries LLC"
CHIP_VARIANT = SAME51J19A
CHIP_FAMILY = same51
QSPI_FLASH_FILESYSTEM = 1
EXTERNAL_FLASH_DEVICES = GD25Q16C
LONGINT_IMPL = MPZ
+ CIRCUITPY__EVE = 1
CIRCUITPY_CANIO = 1 | 1 | 0.076923 | 1 | 0 |
9ee349dee9230502fd92d96763e01894549b2316 | etc/taskcluster/docker/build.dockerfile | etc/taskcluster/docker/build.dockerfile | % include base.dockerfile
RUN \
apt-get install -qy --no-install-recommends \
#
# Testing decisionlib (see etc/taskcluster/mock.py)
python3-coverage \
#
# Multiple C/C++ dependencies built from source
g++ \
make \
cmake \
#
# Fontconfig
gperf \
#
# ANGLE
xorg-dev \
#
# mozjs (SpiderMonkey)
autoconf2.13 \
#
# Bindgen (for SpiderMonkey bindings)
clang \
llvm \
llvm-dev \
#
# GStreamer
libgstreamer-plugins-bad1.0-dev \
#
# OpenSSL
libssl-dev \
#
# blurz
libdbus-1-dev \
#
# sampling profiler
libunwind-dev \
#
#
&& \
#
# Install the version of rustup that is current when this Docker image is being built:
# We want at least 1.21 (increment in this comment to force an image rebuild).
curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain none --profile=minimal -y && \
#
#
curl -sSfL \
https://github.com/mozilla/sccache/releases/download/0.2.12/sccache-0.2.12-x86_64-unknown-linux-musl.tar.gz \
| tar -xz --strip-components=1 -C /usr/local/bin/ \
sccache-0.2.12-x86_64-unknown-linux-musl/sccache
| % include base.dockerfile
RUN \
apt-get install -qy --no-install-recommends \
#
# Testing decisionlib (see etc/taskcluster/mock.py)
python3-coverage \
#
# Multiple C/C++ dependencies built from source
g++ \
make \
cmake \
#
# Fontconfig
gperf \
#
# ANGLE
xorg-dev \
#
# mozjs (SpiderMonkey)
autoconf2.13 \
#
# Bindgen (for SpiderMonkey bindings)
clang \
llvm \
llvm-dev \
#
# OpenSSL
libssl-dev \
#
# blurz
libdbus-1-dev \
#
# sampling profiler
libunwind-dev \
#
#
&& \
#
# Install the version of rustup that is current when this Docker image is being built:
# We want at least 1.21 (increment in this comment to force an image rebuild).
curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain none --profile=minimal -y && \
#
#
curl -sSfL \
https://github.com/mozilla/sccache/releases/download/0.2.12/sccache-0.2.12-x86_64-unknown-linux-musl.tar.gz \
| tar -xz --strip-components=1 -C /usr/local/bin/ \
sccache-0.2.12-x86_64-unknown-linux-musl/sccache
| Remove gstreamer installation from docker. | Remove gstreamer installation from docker. | Dockerfile | mpl-2.0 | KiChjang/servo,KiChjang/servo,KiChjang/servo,KiChjang/servo,KiChjang/servo,KiChjang/servo,KiChjang/servo,KiChjang/servo,KiChjang/servo,KiChjang/servo | dockerfile | ## Code Before:
% include base.dockerfile
RUN \
apt-get install -qy --no-install-recommends \
#
# Testing decisionlib (see etc/taskcluster/mock.py)
python3-coverage \
#
# Multiple C/C++ dependencies built from source
g++ \
make \
cmake \
#
# Fontconfig
gperf \
#
# ANGLE
xorg-dev \
#
# mozjs (SpiderMonkey)
autoconf2.13 \
#
# Bindgen (for SpiderMonkey bindings)
clang \
llvm \
llvm-dev \
#
# GStreamer
libgstreamer-plugins-bad1.0-dev \
#
# OpenSSL
libssl-dev \
#
# blurz
libdbus-1-dev \
#
# sampling profiler
libunwind-dev \
#
#
&& \
#
# Install the version of rustup that is current when this Docker image is being built:
# We want at least 1.21 (increment in this comment to force an image rebuild).
curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain none --profile=minimal -y && \
#
#
curl -sSfL \
https://github.com/mozilla/sccache/releases/download/0.2.12/sccache-0.2.12-x86_64-unknown-linux-musl.tar.gz \
| tar -xz --strip-components=1 -C /usr/local/bin/ \
sccache-0.2.12-x86_64-unknown-linux-musl/sccache
## Instruction:
Remove gstreamer installation from docker.
## Code After:
% include base.dockerfile
RUN \
apt-get install -qy --no-install-recommends \
#
# Testing decisionlib (see etc/taskcluster/mock.py)
python3-coverage \
#
# Multiple C/C++ dependencies built from source
g++ \
make \
cmake \
#
# Fontconfig
gperf \
#
# ANGLE
xorg-dev \
#
# mozjs (SpiderMonkey)
autoconf2.13 \
#
# Bindgen (for SpiderMonkey bindings)
clang \
llvm \
llvm-dev \
#
# OpenSSL
libssl-dev \
#
# blurz
libdbus-1-dev \
#
# sampling profiler
libunwind-dev \
#
#
&& \
#
# Install the version of rustup that is current when this Docker image is being built:
# We want at least 1.21 (increment in this comment to force an image rebuild).
curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain none --profile=minimal -y && \
#
#
curl -sSfL \
https://github.com/mozilla/sccache/releases/download/0.2.12/sccache-0.2.12-x86_64-unknown-linux-musl.tar.gz \
| tar -xz --strip-components=1 -C /usr/local/bin/ \
sccache-0.2.12-x86_64-unknown-linux-musl/sccache
| % include base.dockerfile
RUN \
apt-get install -qy --no-install-recommends \
#
# Testing decisionlib (see etc/taskcluster/mock.py)
python3-coverage \
#
# Multiple C/C++ dependencies built from source
g++ \
make \
cmake \
#
# Fontconfig
gperf \
#
# ANGLE
xorg-dev \
#
# mozjs (SpiderMonkey)
autoconf2.13 \
#
# Bindgen (for SpiderMonkey bindings)
clang \
llvm \
llvm-dev \
#
- # GStreamer
- libgstreamer-plugins-bad1.0-dev \
- #
# OpenSSL
libssl-dev \
#
# blurz
libdbus-1-dev \
#
# sampling profiler
libunwind-dev \
#
#
&& \
#
# Install the version of rustup that is current when this Docker image is being built:
# We want at least 1.21 (increment in this comment to force an image rebuild).
curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain none --profile=minimal -y && \
#
#
curl -sSfL \
https://github.com/mozilla/sccache/releases/download/0.2.12/sccache-0.2.12-x86_64-unknown-linux-musl.tar.gz \
| tar -xz --strip-components=1 -C /usr/local/bin/ \
sccache-0.2.12-x86_64-unknown-linux-musl/sccache | 3 | 0.058824 | 0 | 3 |
615ca283ffdeec53f1c9394eb695f017142c58aa | composer.json | composer.json | {
"name": "sylius/ui-bundle",
"type": "symfony-bundle",
"description": "Generic UI bundle for Sylius eCommerce components.",
"keywords": ["shop", "ecommerce", "store", "webshop", "sylius", "ui", "user interface"],
"homepage": "http://sylius.org",
"license": "MIT",
"authors": [
{
"name": "Paweł Jędrzejewski",
"homepage": "http://pjedrzejewski.com"
},
{
"name": "Sylius project",
"homepage": "http://sylius.org"
},
{
"name": "Community contributions",
"homepage": "http://github.com/Sylius/Sylius/contributors"
}
],
"require": {
"php": "^5.5.9|^7.0",
"knplabs/knp-menu-bundle": "^1.1",
"symfony/framework-bundle": "^2.7.7"
},
"require-dev": {
"phpspec/phpspec": "^2.4",
"symfony/form": "^2.7.7"
},
"config": {
"bin-dir": "bin"
},
"autoload": {
"psr-4": { "Sylius\\Bundle\\UiBundle\\": "" }
},
"minimum-stability": "dev",
"extra": {
"branch-alias": {
"dev-master": "0.17-dev"
}
}
}
| {
"name": "sylius/ui-bundle",
"type": "symfony-bundle",
"description": "Generic UI bundle for Sylius eCommerce components.",
"keywords": ["shop", "ecommerce", "store", "webshop", "sylius", "ui", "user interface"],
"homepage": "http://sylius.org",
"license": "MIT",
"authors": [
{
"name": "Paweł Jędrzejewski",
"homepage": "http://pjedrzejewski.com"
},
{
"name": "Sylius project",
"homepage": "http://sylius.org"
},
{
"name": "Community contributions",
"homepage": "http://github.com/Sylius/Sylius/contributors"
}
],
"require": {
"php": "^5.5.9|^7.0",
"knplabs/knp-menu-bundle": "^1.1",
"symfony/framework-bundle": "^2.7.7",
"symfony/security": "^2.7"
},
"require-dev": {
"phpspec/phpspec": "^2.4",
"symfony/form": "^2.7.7"
},
"config": {
"bin-dir": "bin"
},
"autoload": {
"psr-4": { "Sylius\\Bundle\\UiBundle\\": "" }
},
"minimum-stability": "dev",
"extra": {
"branch-alias": {
"dev-master": "0.17-dev"
}
}
}
| Fix various missing deps and not needed coupling to Symfony | Fix various missing deps and not needed coupling to Symfony
| JSON | mit | Sylius/SyliusUiBundle,Sylius/SyliusUiBundle | json | ## Code Before:
{
"name": "sylius/ui-bundle",
"type": "symfony-bundle",
"description": "Generic UI bundle for Sylius eCommerce components.",
"keywords": ["shop", "ecommerce", "store", "webshop", "sylius", "ui", "user interface"],
"homepage": "http://sylius.org",
"license": "MIT",
"authors": [
{
"name": "Paweł Jędrzejewski",
"homepage": "http://pjedrzejewski.com"
},
{
"name": "Sylius project",
"homepage": "http://sylius.org"
},
{
"name": "Community contributions",
"homepage": "http://github.com/Sylius/Sylius/contributors"
}
],
"require": {
"php": "^5.5.9|^7.0",
"knplabs/knp-menu-bundle": "^1.1",
"symfony/framework-bundle": "^2.7.7"
},
"require-dev": {
"phpspec/phpspec": "^2.4",
"symfony/form": "^2.7.7"
},
"config": {
"bin-dir": "bin"
},
"autoload": {
"psr-4": { "Sylius\\Bundle\\UiBundle\\": "" }
},
"minimum-stability": "dev",
"extra": {
"branch-alias": {
"dev-master": "0.17-dev"
}
}
}
## Instruction:
Fix various missing deps and not needed coupling to Symfony
## Code After:
{
"name": "sylius/ui-bundle",
"type": "symfony-bundle",
"description": "Generic UI bundle for Sylius eCommerce components.",
"keywords": ["shop", "ecommerce", "store", "webshop", "sylius", "ui", "user interface"],
"homepage": "http://sylius.org",
"license": "MIT",
"authors": [
{
"name": "Paweł Jędrzejewski",
"homepage": "http://pjedrzejewski.com"
},
{
"name": "Sylius project",
"homepage": "http://sylius.org"
},
{
"name": "Community contributions",
"homepage": "http://github.com/Sylius/Sylius/contributors"
}
],
"require": {
"php": "^5.5.9|^7.0",
"knplabs/knp-menu-bundle": "^1.1",
"symfony/framework-bundle": "^2.7.7",
"symfony/security": "^2.7"
},
"require-dev": {
"phpspec/phpspec": "^2.4",
"symfony/form": "^2.7.7"
},
"config": {
"bin-dir": "bin"
},
"autoload": {
"psr-4": { "Sylius\\Bundle\\UiBundle\\": "" }
},
"minimum-stability": "dev",
"extra": {
"branch-alias": {
"dev-master": "0.17-dev"
}
}
}
| {
"name": "sylius/ui-bundle",
"type": "symfony-bundle",
"description": "Generic UI bundle for Sylius eCommerce components.",
"keywords": ["shop", "ecommerce", "store", "webshop", "sylius", "ui", "user interface"],
"homepage": "http://sylius.org",
"license": "MIT",
"authors": [
{
"name": "Paweł Jędrzejewski",
"homepage": "http://pjedrzejewski.com"
},
{
"name": "Sylius project",
"homepage": "http://sylius.org"
},
{
"name": "Community contributions",
"homepage": "http://github.com/Sylius/Sylius/contributors"
}
],
"require": {
"php": "^5.5.9|^7.0",
"knplabs/knp-menu-bundle": "^1.1",
- "symfony/framework-bundle": "^2.7.7"
+ "symfony/framework-bundle": "^2.7.7",
? +
+ "symfony/security": "^2.7"
},
"require-dev": {
"phpspec/phpspec": "^2.4",
"symfony/form": "^2.7.7"
},
"config": {
"bin-dir": "bin"
},
"autoload": {
"psr-4": { "Sylius\\Bundle\\UiBundle\\": "" }
},
"minimum-stability": "dev",
"extra": {
"branch-alias": {
"dev-master": "0.17-dev"
}
}
} | 3 | 0.068182 | 2 | 1 |
0ea80d7eba9c1895426d9f6c8fc90704fdeeb97b | .travis.yml | .travis.yml | language: ruby
rvm:
- 2.2.10
- 2.3
- 2.4
- 2.5
matrix:
fast_finish: true
allow_failures:
- gemfile: gemfiles/rails_5.2.gemfile
gemfile:
- gemfiles/rails_4.gemfile
- gemfiles/rails_5.0.gemfile
- gemfiles/rails_5.1.gemfile
- gemfiles/rails_5.2.gemfile
| language: ruby
rvm:
- 2.2.10
- 2.3
- 2.4
- 2.5
matrix:
fast_finish: true
gemfile:
- gemfiles/rails_4.gemfile
- gemfiles/rails_5.0.gemfile
- gemfiles/rails_5.1.gemfile
- gemfiles/rails_5.2.gemfile
| Remove Rails 5.2 from allowed failures | Remove Rails 5.2 from allowed failures
| YAML | mit | jpmcgrath/shortener,jpmcgrath/shortener | yaml | ## Code Before:
language: ruby
rvm:
- 2.2.10
- 2.3
- 2.4
- 2.5
matrix:
fast_finish: true
allow_failures:
- gemfile: gemfiles/rails_5.2.gemfile
gemfile:
- gemfiles/rails_4.gemfile
- gemfiles/rails_5.0.gemfile
- gemfiles/rails_5.1.gemfile
- gemfiles/rails_5.2.gemfile
## Instruction:
Remove Rails 5.2 from allowed failures
## Code After:
language: ruby
rvm:
- 2.2.10
- 2.3
- 2.4
- 2.5
matrix:
fast_finish: true
gemfile:
- gemfiles/rails_4.gemfile
- gemfiles/rails_5.0.gemfile
- gemfiles/rails_5.1.gemfile
- gemfiles/rails_5.2.gemfile
| language: ruby
rvm:
- 2.2.10
- 2.3
- 2.4
- 2.5
matrix:
fast_finish: true
- allow_failures:
- - gemfile: gemfiles/rails_5.2.gemfile
gemfile:
- gemfiles/rails_4.gemfile
- gemfiles/rails_5.0.gemfile
- gemfiles/rails_5.1.gemfile
- gemfiles/rails_5.2.gemfile | 2 | 0.111111 | 0 | 2 |
dd2708b664a636aa1fe934efcfc7735f17f65dc5 | .travis.yml | .travis.yml | sudo: false
language: go
go:
- "1.9.x"
- "1.10.x"
- "1.11.x"
script:
- go get golang.org/x/tools/cmd/cover
- go get github.com/mattn/goveralls
- go get github.com/kisielk/errcheck
- go get -u github.com/FiloSottile/gvt
- gvt restore
- go test -race -v $(go list ./... | grep -v vendor/)
- go vet $(go list ./... | grep -v vendor/)
- go test ./test -v -indexType scorch
- errcheck -ignorepkg fmt $(go list ./... | grep -v vendor/)
- docs/project-code-coverage.sh
- docs/build_children.sh
notifications:
email:
- marty.schoch@gmail.com
| sudo: false
language: go
go:
- "1.9.x"
- "1.10.x"
- "1.11.x"
script:
- go get golang.org/x/tools/cmd/cover
- go get github.com/mattn/goveralls
- go get github.com/kisielk/errcheck
- go get -u github.com/FiloSottile/gvt
- gvt restore
- go test -race -v $(go list ./... | grep -v vendor/)
- go vet $(go list ./... | grep -v vendor/)
- go test ./test -v -indexType scorch
- if [[ ${TRAVIS_GO_VERSION} =~ ^1\.11 ]]; then
errcheck -ignorepkg fmt $(go list ./... | grep -v vendor/);
else
echo "errcheck skipped for go version" $TRAVIS_GO_VERSION;
fi
- docs/project-code-coverage.sh
- docs/build_children.sh
notifications:
email:
- marty.schoch@gmail.com
| Deploy errcheck only for go1.11 | Deploy errcheck only for go1.11
| YAML | apache-2.0 | blevesearch/bleve,blevesearch/bleve | yaml | ## Code Before:
sudo: false
language: go
go:
- "1.9.x"
- "1.10.x"
- "1.11.x"
script:
- go get golang.org/x/tools/cmd/cover
- go get github.com/mattn/goveralls
- go get github.com/kisielk/errcheck
- go get -u github.com/FiloSottile/gvt
- gvt restore
- go test -race -v $(go list ./... | grep -v vendor/)
- go vet $(go list ./... | grep -v vendor/)
- go test ./test -v -indexType scorch
- errcheck -ignorepkg fmt $(go list ./... | grep -v vendor/)
- docs/project-code-coverage.sh
- docs/build_children.sh
notifications:
email:
- marty.schoch@gmail.com
## Instruction:
Deploy errcheck only for go1.11
## Code After:
sudo: false
language: go
go:
- "1.9.x"
- "1.10.x"
- "1.11.x"
script:
- go get golang.org/x/tools/cmd/cover
- go get github.com/mattn/goveralls
- go get github.com/kisielk/errcheck
- go get -u github.com/FiloSottile/gvt
- gvt restore
- go test -race -v $(go list ./... | grep -v vendor/)
- go vet $(go list ./... | grep -v vendor/)
- go test ./test -v -indexType scorch
- if [[ ${TRAVIS_GO_VERSION} =~ ^1\.11 ]]; then
errcheck -ignorepkg fmt $(go list ./... | grep -v vendor/);
else
echo "errcheck skipped for go version" $TRAVIS_GO_VERSION;
fi
- docs/project-code-coverage.sh
- docs/build_children.sh
notifications:
email:
- marty.schoch@gmail.com
| sudo: false
language: go
go:
- "1.9.x"
- "1.10.x"
- "1.11.x"
script:
- go get golang.org/x/tools/cmd/cover
- go get github.com/mattn/goveralls
- go get github.com/kisielk/errcheck
- go get -u github.com/FiloSottile/gvt
- gvt restore
- go test -race -v $(go list ./... | grep -v vendor/)
- go vet $(go list ./... | grep -v vendor/)
- go test ./test -v -indexType scorch
+ - if [[ ${TRAVIS_GO_VERSION} =~ ^1\.11 ]]; then
- - errcheck -ignorepkg fmt $(go list ./... | grep -v vendor/)
? ^
+ errcheck -ignorepkg fmt $(go list ./... | grep -v vendor/);
? ^^^^^ +
+ else
+ echo "errcheck skipped for go version" $TRAVIS_GO_VERSION;
+ fi
- docs/project-code-coverage.sh
- docs/build_children.sh
notifications:
email:
- marty.schoch@gmail.com | 6 | 0.24 | 5 | 1 |
4039bbb7d9e34f351a14456236201b0cb859fc46 | README.md | README.md | An [ArchivesSpace ](http://archivesspace.org/ "ArchivesSpace") plugin to support the bulk uploading via Excel SpreadSheet of Archival Objects and (optionally) their associated Creator Agents, Top Containers, Subjects, Digital Objects etc.
##Initial development
Initial development will support interactive selection of an archival object (or resource) as the starting point of the bulk upload.
The Excel template will be found in the templates/ folder as [**aspace_import_excel_template.xlsx**](/aspace_import_excel_template.xlsx). As we expand this plugin to support background job bulk-ingest, there may be more templates provided, or this template will be refined.
The intention is not to completely reproduce a Finding Aid as presented in an EAD XML, or to allow for every permutation of Archival Object creation within ArchivesSpace. We are aiming for the "80% rule"; that is, at least 80% of the work that would be done interactively can be replaced by an excel spreadsheet; additional refinements to individual archival objects (such as addition of agents-as-subjects, assignment of locations to top-level containers, etc.) would take place interactively.
## Contributors
* Bobbi Fox: https://github.com/bobbi-SMR (maintainer)
| An [ArchivesSpace ](http://archivesspace.org/ "ArchivesSpace") plugin to support the bulk uploading via Excel SpreadSheet of Archival Objects and (optionally) their associated Creator Agents, Top Containers, Subjects, Digital Objects etc.
##Initial development
Initial development will support interactive selection of an archival object (or resource) as the starting point of the bulk upload.
The Excel template will be found in the templates/ folder as [**aspace_import_excel_template.xlsx**](/aspace_import_excel_template.xlsx). As we expand this plugin to support background job bulk-ingest, there may be more templates provided, or this template will be refined.
The intention is not to completely reproduce a Finding Aid as presented in an EAD XML, or to allow for every permutation of Archival Object creation within ArchivesSpace. We are aiming for the "80% rule"; that is, at least 80% of the work that would be done interactively can be replaced by an excel spreadsheet; additional refinements to individual archival objects (such as addition of agents-as-subjects, assignment of locations to top-level containers, etc.) would take place interactively.
## Contributors
* Bobbi Fox: https://github.com/bobbi-SMR (maintainer)
* Robin Wendler: https://github.com/rwendler
| Add Robin to Contributors list | Add Robin to Contributors list | Markdown | apache-2.0 | harvard-library/aspace-import-excel,harvard-library/aspace-import-excel,harvard-library/aspace-import-excel | markdown | ## Code Before:
An [ArchivesSpace ](http://archivesspace.org/ "ArchivesSpace") plugin to support the bulk uploading via Excel SpreadSheet of Archival Objects and (optionally) their associated Creator Agents, Top Containers, Subjects, Digital Objects etc.
##Initial development
Initial development will support interactive selection of an archival object (or resource) as the starting point of the bulk upload.
The Excel template will be found in the templates/ folder as [**aspace_import_excel_template.xlsx**](/aspace_import_excel_template.xlsx). As we expand this plugin to support background job bulk-ingest, there may be more templates provided, or this template will be refined.
The intention is not to completely reproduce a Finding Aid as presented in an EAD XML, or to allow for every permutation of Archival Object creation within ArchivesSpace. We are aiming for the "80% rule"; that is, at least 80% of the work that would be done interactively can be replaced by an excel spreadsheet; additional refinements to individual archival objects (such as addition of agents-as-subjects, assignment of locations to top-level containers, etc.) would take place interactively.
## Contributors
* Bobbi Fox: https://github.com/bobbi-SMR (maintainer)
## Instruction:
Add Robin to Contributors list
## Code After:
An [ArchivesSpace ](http://archivesspace.org/ "ArchivesSpace") plugin to support the bulk uploading via Excel SpreadSheet of Archival Objects and (optionally) their associated Creator Agents, Top Containers, Subjects, Digital Objects etc.
##Initial development
Initial development will support interactive selection of an archival object (or resource) as the starting point of the bulk upload.
The Excel template will be found in the templates/ folder as [**aspace_import_excel_template.xlsx**](/aspace_import_excel_template.xlsx). As we expand this plugin to support background job bulk-ingest, there may be more templates provided, or this template will be refined.
The intention is not to completely reproduce a Finding Aid as presented in an EAD XML, or to allow for every permutation of Archival Object creation within ArchivesSpace. We are aiming for the "80% rule"; that is, at least 80% of the work that would be done interactively can be replaced by an excel spreadsheet; additional refinements to individual archival objects (such as addition of agents-as-subjects, assignment of locations to top-level containers, etc.) would take place interactively.
## Contributors
* Bobbi Fox: https://github.com/bobbi-SMR (maintainer)
* Robin Wendler: https://github.com/rwendler
| An [ArchivesSpace ](http://archivesspace.org/ "ArchivesSpace") plugin to support the bulk uploading via Excel SpreadSheet of Archival Objects and (optionally) their associated Creator Agents, Top Containers, Subjects, Digital Objects etc.
##Initial development
Initial development will support interactive selection of an archival object (or resource) as the starting point of the bulk upload.
The Excel template will be found in the templates/ folder as [**aspace_import_excel_template.xlsx**](/aspace_import_excel_template.xlsx). As we expand this plugin to support background job bulk-ingest, there may be more templates provided, or this template will be refined.
The intention is not to completely reproduce a Finding Aid as presented in an EAD XML, or to allow for every permutation of Archival Object creation within ArchivesSpace. We are aiming for the "80% rule"; that is, at least 80% of the work that would be done interactively can be replaced by an excel spreadsheet; additional refinements to individual archival objects (such as addition of agents-as-subjects, assignment of locations to top-level containers, etc.) would take place interactively.
## Contributors
* Bobbi Fox: https://github.com/bobbi-SMR (maintainer)
+ * Robin Wendler: https://github.com/rwendler
| 1 | 0.0625 | 1 | 0 |
80f42ed3bac03d619f0290b1ed88a3733c8d797b | src/index.ts | src/index.ts | /**
* This file is the entry-point to start Cerveau
*/
process.title = "Cerveau Game Server";
// Check for npm install first, as many developers forget this pre step
import { lstatSync } from "fs";
try {
const lstat = lstatSync("./node_modules/");
if (!lstat.isDirectory()) {
throw new Error(); // to trigger catch below
}
}
catch (err) {
// tslint:disable-next-line no-console
console.error(`ERROR: "node_modules/" not found.
Did you forget to run 'npm install'?`);
process.exit(1);
}
// if we get here then the node_modules should be installed, let's go!
// tslint:disable-next-line:no-import-side-effect - we want them below
import { setupThread } from "./core/setup-thread";
setupThread(); // we must do this before doing any aliased imports below
import { Lobby } from "./core/server";
Lobby.getInstance(); // this will create the singleton Lobby instance
import { setupWebServer } from "./web/app";
setupWebServer();
| /** This file is the entry-point to start Cerveau */
// first code to execute, like a mini sanity test
console.log("~~~ Cerveau is starting ~~~"); // tslint:disable-line:no-console
process.title = "Cerveau Game Server";
import { setupThread } from "./core/setup-thread";
setupThread(); // We must do this before doing any aliased imports below
import { Lobby } from "./core/server";
Lobby.getInstance(); // This will create the singleton Lobby instance
import { setupWebServer } from "./web/app";
setupWebServer();
| Disable node_modules check on code that requires node_modules to run | Disable node_modules check on code that requires node_modules to run
| TypeScript | mit | siggame/Cerveau,siggame/Cerveau,JacobFischer/Cerveau,JacobFischer/Cerveau | typescript | ## Code Before:
/**
* This file is the entry-point to start Cerveau
*/
process.title = "Cerveau Game Server";
// Check for npm install first, as many developers forget this pre step
import { lstatSync } from "fs";
try {
const lstat = lstatSync("./node_modules/");
if (!lstat.isDirectory()) {
throw new Error(); // to trigger catch below
}
}
catch (err) {
// tslint:disable-next-line no-console
console.error(`ERROR: "node_modules/" not found.
Did you forget to run 'npm install'?`);
process.exit(1);
}
// if we get here then the node_modules should be installed, let's go!
// tslint:disable-next-line:no-import-side-effect - we want them below
import { setupThread } from "./core/setup-thread";
setupThread(); // we must do this before doing any aliased imports below
import { Lobby } from "./core/server";
Lobby.getInstance(); // this will create the singleton Lobby instance
import { setupWebServer } from "./web/app";
setupWebServer();
## Instruction:
Disable node_modules check on code that requires node_modules to run
## Code After:
/** This file is the entry-point to start Cerveau */
// first code to execute, like a mini sanity test
console.log("~~~ Cerveau is starting ~~~"); // tslint:disable-line:no-console
process.title = "Cerveau Game Server";
import { setupThread } from "./core/setup-thread";
setupThread(); // We must do this before doing any aliased imports below
import { Lobby } from "./core/server";
Lobby.getInstance(); // This will create the singleton Lobby instance
import { setupWebServer } from "./web/app";
setupWebServer();
| - /**
- * This file is the entry-point to start Cerveau
? ^
+ /** This file is the entry-point to start Cerveau */
? ^^ +++
- */
+
+ // first code to execute, like a mini sanity test
+ console.log("~~~ Cerveau is starting ~~~"); // tslint:disable-line:no-console
+
process.title = "Cerveau Game Server";
- // Check for npm install first, as many developers forget this pre step
- import { lstatSync } from "fs";
-
- try {
- const lstat = lstatSync("./node_modules/");
- if (!lstat.isDirectory()) {
- throw new Error(); // to trigger catch below
- }
- }
- catch (err) {
- // tslint:disable-next-line no-console
- console.error(`ERROR: "node_modules/" not found.
- Did you forget to run 'npm install'?`);
- process.exit(1);
- }
-
- // if we get here then the node_modules should be installed, let's go!
-
- // tslint:disable-next-line:no-import-side-effect - we want them below
import { setupThread } from "./core/setup-thread";
- setupThread(); // we must do this before doing any aliased imports below
? ^
+ setupThread(); // We must do this before doing any aliased imports below
? ^
import { Lobby } from "./core/server";
- Lobby.getInstance(); // this will create the singleton Lobby instance
? ^
+ Lobby.getInstance(); // This will create the singleton Lobby instance
? ^
import { setupWebServer } from "./web/app";
setupWebServer(); | 31 | 0.96875 | 7 | 24 |
f622e11536c4ebf8f82985329d06efc58c2fe60e | blog/tests/test_views.py | blog/tests/test_views.py | from django.test import TestCase
class BlogViewsTestCase(TestCase):
def setUp(self):
| from django import test
from django.core.urlresolvers import reverse
from blog.models import Post, Category
class BlogViewsTestCase(test.TestCase):
def setUp(self):
# Add parent category and post category
parent = Category(name='Writing', parent=None)
parent.save()
category = Category(name='Thoughts', parent=parent)
category.save()
# Create a draft
_post = Post(title='Random thoughts of the author',
body='Thoughts turned to words.', category=category)
_post.save()
self.draft = _post
# Publish a post
post = Post(title='New thoughts from without',
body='A post fit to be published!', category=category)
post.save()
post.publish()
self.post = post
self.client = test.Client()
def test_index(self):
response = self.client.get('/')
self.assertEqual(response.status_code, 200)
posts = response.context['posts']
self.assertNotIn(self.draft, posts)
self.assertIn(self.post, posts)
def test_post_view(self):
post_url = reverse('blog:post', kwargs=dict(pid=self.post.id,
slug=self.post.slug))
response = self.client.get(post_url)
self.assertEqual(response.status_code, 200)
post = response.context['post']
posts = response.context['posts']
self.assertEqual(post, self.post)
self.assertEqual(posts.count(), 0)
def test_draft_view(self):
draft_url = reverse('blog:post', kwargs=dict(pid=self.draft.id,
slug=self.draft.slug))
response = self.client.get(draft_url)
self.assertEqual(response.status_code, 404)
| Add tests for blog index view and post view | Add tests for blog index view and post view
| Python | mit | ajoyoommen/weblog,ajoyoommen/weblog | python | ## Code Before:
from django.test import TestCase
class BlogViewsTestCase(TestCase):
def setUp(self):
## Instruction:
Add tests for blog index view and post view
## Code After:
from django import test
from django.core.urlresolvers import reverse
from blog.models import Post, Category
class BlogViewsTestCase(test.TestCase):
def setUp(self):
# Add parent category and post category
parent = Category(name='Writing', parent=None)
parent.save()
category = Category(name='Thoughts', parent=parent)
category.save()
# Create a draft
_post = Post(title='Random thoughts of the author',
body='Thoughts turned to words.', category=category)
_post.save()
self.draft = _post
# Publish a post
post = Post(title='New thoughts from without',
body='A post fit to be published!', category=category)
post.save()
post.publish()
self.post = post
self.client = test.Client()
def test_index(self):
response = self.client.get('/')
self.assertEqual(response.status_code, 200)
posts = response.context['posts']
self.assertNotIn(self.draft, posts)
self.assertIn(self.post, posts)
def test_post_view(self):
post_url = reverse('blog:post', kwargs=dict(pid=self.post.id,
slug=self.post.slug))
response = self.client.get(post_url)
self.assertEqual(response.status_code, 200)
post = response.context['post']
posts = response.context['posts']
self.assertEqual(post, self.post)
self.assertEqual(posts.count(), 0)
def test_draft_view(self):
draft_url = reverse('blog:post', kwargs=dict(pid=self.draft.id,
slug=self.draft.slug))
response = self.client.get(draft_url)
self.assertEqual(response.status_code, 404)
| - from django.test import TestCase
? ----- ^ ----
+ from django import test
? ^
+ from django.core.urlresolvers import reverse
+
+ from blog.models import Post, Category
- class BlogViewsTestCase(TestCase):
+ class BlogViewsTestCase(test.TestCase):
? +++++
def setUp(self):
+ # Add parent category and post category
+ parent = Category(name='Writing', parent=None)
+ parent.save()
+ category = Category(name='Thoughts', parent=parent)
+ category.save()
+ # Create a draft
+ _post = Post(title='Random thoughts of the author',
+ body='Thoughts turned to words.', category=category)
+ _post.save()
+ self.draft = _post
+ # Publish a post
+ post = Post(title='New thoughts from without',
+ body='A post fit to be published!', category=category)
+ post.save()
+ post.publish()
+ self.post = post
+
+ self.client = test.Client()
+
+ def test_index(self):
+ response = self.client.get('/')
+ self.assertEqual(response.status_code, 200)
+ posts = response.context['posts']
+ self.assertNotIn(self.draft, posts)
+ self.assertIn(self.post, posts)
+
+ def test_post_view(self):
+ post_url = reverse('blog:post', kwargs=dict(pid=self.post.id,
+ slug=self.post.slug))
+ response = self.client.get(post_url)
+ self.assertEqual(response.status_code, 200)
+ post = response.context['post']
+ posts = response.context['posts']
+ self.assertEqual(post, self.post)
+ self.assertEqual(posts.count(), 0)
+
+ def test_draft_view(self):
+ draft_url = reverse('blog:post', kwargs=dict(pid=self.draft.id,
+ slug=self.draft.slug))
+ response = self.client.get(draft_url)
+ self.assertEqual(response.status_code, 404) | 48 | 9.6 | 46 | 2 |
b948a7388cbac3ee4b079afd07751fab6a82bd75 | t/204_AliTV-Seq-id.t | t/204_AliTV-Seq-id.t | use strict;
use warnings;
use Test::More;
use Test::Exception;
BEGIN { use_ok('AliTV::Seq') };
can_ok('AliTV::Seq', qw(id));
my $obj = new_ok('AliTV::Seq');
# is the default id undef?
ok(! defined $obj->id(), 'Empty object id is undef');
# empty the attribute
$obj->{_seq_obj} = "";
# this should cause an exception
throws_ok { $obj->id(); }
qr/The sequence storage attribute is not a Bio::Seq object/,
'Exception when using a not Bio::Seq attribute';
# as well as a missing attribute
delete $obj->{_seq_obj};
throws_ok { $obj->id(); }
qr/The sequence storage attribute does not exist/,
'Exception when using without an existing attribute';
done_testing;
| use strict;
use warnings;
use Test::More;
use Test::Exception;
BEGIN { use_ok('AliTV::Seq') };
can_ok('AliTV::Seq', qw(id));
my $obj = new_ok('AliTV::Seq');
# is the default id undef?
ok(! defined $obj->id(), 'Empty object id is undef');
# empty the attribute
$obj->{_seq_obj} = "";
# this should cause an exception
throws_ok { $obj->id(); }
qr/The sequence storage attribute is not a Bio::Seq object/,
'Exception when using a not Bio::Seq attribute';
# as well as a missing attribute
delete $obj->{_seq_obj};
throws_ok { $obj->id(); }
qr/The sequence storage attribute does not exist/,
'Exception when using without an existing attribute';
my $new_id = "TESTID";
$obj = new_ok('AliTV::Seq');
ok($obj->id($new_id) eq $new_id, 'Setter/getter works as expected');
done_testing;
| Test if setter/getter id works | Test if setter/getter id works
| Perl | mit | greatfireball/AliTV-perl-interface,AliTVTeam/AliTV-perl-interface | perl | ## Code Before:
use strict;
use warnings;
use Test::More;
use Test::Exception;
BEGIN { use_ok('AliTV::Seq') };
can_ok('AliTV::Seq', qw(id));
my $obj = new_ok('AliTV::Seq');
# is the default id undef?
ok(! defined $obj->id(), 'Empty object id is undef');
# empty the attribute
$obj->{_seq_obj} = "";
# this should cause an exception
throws_ok { $obj->id(); }
qr/The sequence storage attribute is not a Bio::Seq object/,
'Exception when using a not Bio::Seq attribute';
# as well as a missing attribute
delete $obj->{_seq_obj};
throws_ok { $obj->id(); }
qr/The sequence storage attribute does not exist/,
'Exception when using without an existing attribute';
done_testing;
## Instruction:
Test if setter/getter id works
## Code After:
use strict;
use warnings;
use Test::More;
use Test::Exception;
BEGIN { use_ok('AliTV::Seq') };
can_ok('AliTV::Seq', qw(id));
my $obj = new_ok('AliTV::Seq');
# is the default id undef?
ok(! defined $obj->id(), 'Empty object id is undef');
# empty the attribute
$obj->{_seq_obj} = "";
# this should cause an exception
throws_ok { $obj->id(); }
qr/The sequence storage attribute is not a Bio::Seq object/,
'Exception when using a not Bio::Seq attribute';
# as well as a missing attribute
delete $obj->{_seq_obj};
throws_ok { $obj->id(); }
qr/The sequence storage attribute does not exist/,
'Exception when using without an existing attribute';
my $new_id = "TESTID";
$obj = new_ok('AliTV::Seq');
ok($obj->id($new_id) eq $new_id, 'Setter/getter works as expected');
done_testing;
| use strict;
use warnings;
use Test::More;
use Test::Exception;
BEGIN { use_ok('AliTV::Seq') };
can_ok('AliTV::Seq', qw(id));
my $obj = new_ok('AliTV::Seq');
# is the default id undef?
ok(! defined $obj->id(), 'Empty object id is undef');
# empty the attribute
$obj->{_seq_obj} = "";
# this should cause an exception
throws_ok { $obj->id(); }
qr/The sequence storage attribute is not a Bio::Seq object/,
'Exception when using a not Bio::Seq attribute';
# as well as a missing attribute
delete $obj->{_seq_obj};
throws_ok { $obj->id(); }
qr/The sequence storage attribute does not exist/,
'Exception when using without an existing attribute';
+ my $new_id = "TESTID";
+ $obj = new_ok('AliTV::Seq');
+ ok($obj->id($new_id) eq $new_id, 'Setter/getter works as expected');
+
done_testing; | 4 | 0.137931 | 4 | 0 |
2301e2a1c3418b4588653e26f9171577e0077aec | test/data/testrunner.js | test/data/testrunner.js | jQuery.noConflict(); // Allow the test to run with other libs or jQuery's.
// load testswarm agent
(function() {
var url = window.location.search;
url = decodeURIComponent( url.slice( url.indexOf("swarmURL=") + 9 ) );
if ( !url || url.indexOf("http") !== 0 ) {
return;
}
document.write("<scr" + "ipt src='http://testswarm.com/js/inject.js?" + (new Date).getTime() + "'></scr" + "ipt>");
})();
| jQuery.noConflict(); // Allow the test to run with other libs or jQuery's.
// load testswarm agent
(function() {
var url = window.location.search;
url = decodeURIComponent( url.slice( url.indexOf("swarmURL=") + 9 ) );
if ( !url || url.indexOf("http") !== 0 ) {
return;
}
document.write("<scr" + "ipt src='http://swarm.jquery.org/js/inject.js?" + (new Date).getTime() + "'></scr" + "ipt>");
})();
| Update the TestSwarm URL to point to the new jQuery swarm location. | Update the TestSwarm URL to point to the new jQuery swarm location.
| JavaScript | mit | roytoo/jquery,scottjehl/jquery,diracdeltas/jquery,roytoo/jquery,chitranshi/jquery,Karyotyper/jquery,scottjehl/jquery,diracdeltas/jquery,rwaldron/jquery,isaacs/jquery,npmcomponent/component-jquery,roytoo/jquery,fat/jquery,jquery/jquery,Karyotyper/jquery,dtjm/jquery,npmcomponent/component-jquery,sancao2/jquery,gnarf/jquery,chitranshi/jquery,RubyLouvre/jquery,jquery/jquery,eburgos/jquery,Karyotyper/jquery,isaacs/jquery,jcutrell/jquery,kpozin/jquery-nodom,eburgos/jquery,jcutrell/jquery,mislav/jquery,mislav/jquery,demetr84/Jquery,ilyakharlamov/jquery-xul,jquery/jquery,eburgos/jquery,rwaldron/jquery,sancao2/jquery,quiaro/request-agent,hoorayimhelping/jquery,dtjm/jquery,demetr84/Jquery,kpozin/jquery-nodom,ilyakharlamov/jquery-xul,praveen9102/Shazam,gnarf/jquery,RubyLouvre/jquery,hoorayimhelping/jquery,sancao2/jquery,praveen9102/Shazam,fat/jquery,diracdeltas/jquery | javascript | ## Code Before:
jQuery.noConflict(); // Allow the test to run with other libs or jQuery's.
// load testswarm agent
(function() {
var url = window.location.search;
url = decodeURIComponent( url.slice( url.indexOf("swarmURL=") + 9 ) );
if ( !url || url.indexOf("http") !== 0 ) {
return;
}
document.write("<scr" + "ipt src='http://testswarm.com/js/inject.js?" + (new Date).getTime() + "'></scr" + "ipt>");
})();
## Instruction:
Update the TestSwarm URL to point to the new jQuery swarm location.
## Code After:
jQuery.noConflict(); // Allow the test to run with other libs or jQuery's.
// load testswarm agent
(function() {
var url = window.location.search;
url = decodeURIComponent( url.slice( url.indexOf("swarmURL=") + 9 ) );
if ( !url || url.indexOf("http") !== 0 ) {
return;
}
document.write("<scr" + "ipt src='http://swarm.jquery.org/js/inject.js?" + (new Date).getTime() + "'></scr" + "ipt>");
})();
| jQuery.noConflict(); // Allow the test to run with other libs or jQuery's.
// load testswarm agent
(function() {
var url = window.location.search;
url = decodeURIComponent( url.slice( url.indexOf("swarmURL=") + 9 ) );
if ( !url || url.indexOf("http") !== 0 ) {
return;
}
- document.write("<scr" + "ipt src='http://testswarm.com/js/inject.js?" + (new Date).getTime() + "'></scr" + "ipt>");
? ---- ^ ^
+ document.write("<scr" + "ipt src='http://swarm.jquery.org/js/inject.js?" + (new Date).getTime() + "'></scr" + "ipt>");
? ^^^^^^^ ^^
})(); | 2 | 0.181818 | 1 | 1 |
73e5fe29074f52e0b769fd2a6c40669040bef330 | app/notify_client/invite_api_client.py | app/notify_client/invite_api_client.py |
from notifications_python_client.base import BaseAPIClient
from app.notify_client.models import User
class InviteApiClient(BaseAPIClient):
def __init__(self, base_url=None, client_id=None, secret=None):
super(self.__class__, self).__init__(base_url=base_url or 'base_url',
client_id=client_id or 'client_id',
secret=secret or 'secret')
def init_app(self, app):
self.base_url = app.config['API_HOST_NAME']
self.client_id = app.config['ADMIN_CLIENT_USER_NAME']
self.secret = app.config['ADMIN_CLIENT_SECRET']
def create_invite(self, invite_from_id, service_id, email_address, permissions):
data = {
'service': str(service_id),
'email_address': email_address,
'from_user': invite_from_id,
'permissions': permissions
}
resp = self.post(url='/service/{}/invite'.format(service_id), data=data)
return resp['data']
def get_invites_for_service(self, service_id):
endpoint = '/service/{}/invite'.format(service_id)
resp = self.get(endpoint)
return [User(data) for data in resp['data']]
def cancel_invited_user(self, service_id, invited_user_id):
data = {'status': 'cancelled'}
resp = self.post(url='/service/{0}/invite/{1}'.format(service_id, invited_user_id),
data=data)
return resp['data']
|
from notifications_python_client.base import BaseAPIClient
from app.notify_client.models import User
class InviteApiClient(BaseAPIClient):
def __init__(self, base_url=None, client_id=None, secret=None):
super(self.__class__, self).__init__(base_url=base_url or 'base_url',
client_id=client_id or 'client_id',
secret=secret or 'secret')
def init_app(self, app):
self.base_url = app.config['API_HOST_NAME']
self.client_id = app.config['ADMIN_CLIENT_USER_NAME']
self.secret = app.config['ADMIN_CLIENT_SECRET']
def create_invite(self, invite_from_id, service_id, email_address, permissions):
data = {
'service': str(service_id),
'email_address': email_address,
'from_user': invite_from_id,
'permissions': permissions
}
resp = self.post(url='/service/{}/invite'.format(service_id), data=data)
return resp['data']
def get_invites_for_service(self, service_id):
endpoint = '/service/{}/invite'.format(service_id)
resp = self.get(endpoint)
return [User(data) for data in resp['data']]
def cancel_invited_user(self, service_id, invited_user_id):
data = {'status': 'cancelled'}
self.post(url='/service/{0}/invite/{1}'.format(service_id, invited_user_id),
data=data)
| Change cancel_invited_user client to not return anything. | Change cancel_invited_user client to not return anything.
| Python | mit | alphagov/notifications-admin,gov-cjwaszczuk/notifications-admin,alphagov/notifications-admin,gov-cjwaszczuk/notifications-admin,gov-cjwaszczuk/notifications-admin,alphagov/notifications-admin,alphagov/notifications-admin,gov-cjwaszczuk/notifications-admin | python | ## Code Before:
from notifications_python_client.base import BaseAPIClient
from app.notify_client.models import User
class InviteApiClient(BaseAPIClient):
def __init__(self, base_url=None, client_id=None, secret=None):
super(self.__class__, self).__init__(base_url=base_url or 'base_url',
client_id=client_id or 'client_id',
secret=secret or 'secret')
def init_app(self, app):
self.base_url = app.config['API_HOST_NAME']
self.client_id = app.config['ADMIN_CLIENT_USER_NAME']
self.secret = app.config['ADMIN_CLIENT_SECRET']
def create_invite(self, invite_from_id, service_id, email_address, permissions):
data = {
'service': str(service_id),
'email_address': email_address,
'from_user': invite_from_id,
'permissions': permissions
}
resp = self.post(url='/service/{}/invite'.format(service_id), data=data)
return resp['data']
def get_invites_for_service(self, service_id):
endpoint = '/service/{}/invite'.format(service_id)
resp = self.get(endpoint)
return [User(data) for data in resp['data']]
def cancel_invited_user(self, service_id, invited_user_id):
data = {'status': 'cancelled'}
resp = self.post(url='/service/{0}/invite/{1}'.format(service_id, invited_user_id),
data=data)
return resp['data']
## Instruction:
Change cancel_invited_user client to not return anything.
## Code After:
from notifications_python_client.base import BaseAPIClient
from app.notify_client.models import User
class InviteApiClient(BaseAPIClient):
def __init__(self, base_url=None, client_id=None, secret=None):
super(self.__class__, self).__init__(base_url=base_url or 'base_url',
client_id=client_id or 'client_id',
secret=secret or 'secret')
def init_app(self, app):
self.base_url = app.config['API_HOST_NAME']
self.client_id = app.config['ADMIN_CLIENT_USER_NAME']
self.secret = app.config['ADMIN_CLIENT_SECRET']
def create_invite(self, invite_from_id, service_id, email_address, permissions):
data = {
'service': str(service_id),
'email_address': email_address,
'from_user': invite_from_id,
'permissions': permissions
}
resp = self.post(url='/service/{}/invite'.format(service_id), data=data)
return resp['data']
def get_invites_for_service(self, service_id):
endpoint = '/service/{}/invite'.format(service_id)
resp = self.get(endpoint)
return [User(data) for data in resp['data']]
def cancel_invited_user(self, service_id, invited_user_id):
data = {'status': 'cancelled'}
self.post(url='/service/{0}/invite/{1}'.format(service_id, invited_user_id),
data=data)
|
from notifications_python_client.base import BaseAPIClient
from app.notify_client.models import User
class InviteApiClient(BaseAPIClient):
def __init__(self, base_url=None, client_id=None, secret=None):
super(self.__class__, self).__init__(base_url=base_url or 'base_url',
client_id=client_id or 'client_id',
secret=secret or 'secret')
def init_app(self, app):
self.base_url = app.config['API_HOST_NAME']
self.client_id = app.config['ADMIN_CLIENT_USER_NAME']
self.secret = app.config['ADMIN_CLIENT_SECRET']
def create_invite(self, invite_from_id, service_id, email_address, permissions):
data = {
'service': str(service_id),
'email_address': email_address,
'from_user': invite_from_id,
'permissions': permissions
}
resp = self.post(url='/service/{}/invite'.format(service_id), data=data)
return resp['data']
def get_invites_for_service(self, service_id):
endpoint = '/service/{}/invite'.format(service_id)
resp = self.get(endpoint)
return [User(data) for data in resp['data']]
def cancel_invited_user(self, service_id, invited_user_id):
data = {'status': 'cancelled'}
- resp = self.post(url='/service/{0}/invite/{1}'.format(service_id, invited_user_id),
? -------
+ self.post(url='/service/{0}/invite/{1}'.format(service_id, invited_user_id),
- data=data)
? -------
+ data=data)
- return resp['data'] | 5 | 0.138889 | 2 | 3 |
c3dd93cb63b4deaaa7b2109ebed3da35e3c16a6c | packages/re/reflex-external-ref.yaml | packages/re/reflex-external-ref.yaml | homepage: https://github.com/hexresearch/ergvein
changelog-type: ''
hash: 316ee7571ac183352b009ecd4b6aa929822db9868a190630b856a144a72fd08c
test-bench-deps: {}
maintainer: |-
- Anton Gushcha <ncrashed@gmail.com>
- Aminion <>
- Vladimir Krutkin <krutkinvs@gmail.com>
- Levon Oganyan
synopsis: External reference with reactivity support
changelog: ''
basic-deps:
base: '>=4.5 && <4.15'
reflex: '>=0.4 && <0.9'
deepseq: '>=1.4 && <1.5'
all-versions:
- 1.0.3.0
author: |-
- Anton Gushcha
- Aminion
- Vladimir Krutkin
- Levon Oganyan
latest: 1.0.3.0
description-type: haddock
description: See README.md
license-name: MIT
| homepage: https://github.com/hexresearch/ergvein
changelog-type: markdown
hash: ca7af67eb4aadf0d738ddfc7a9ceffbb3633784dba71e34d9e28e2caf2f8097d
test-bench-deps: {}
maintainer: |-
- Anton Gushcha <ncrashed@gmail.com>
- Aminion <>
- Vladimir Krutkin <krutkinvs@gmail.com>
- Levon Oganyan
synopsis: External reference with reactivity support
changelog: |
1.0.3.1
=======
Add description and README file.
1.0.3.0
=======
Bump versions of reflex. Drop dependency on `reflex-dom`
1.0.2.0
=======
Added extra modify functions: modifyExternalRef_, modifyExternalRefMaybe etc
1.0.1.0
=======
Fix firing old value of external ref in modify.
basic-deps:
base: '>=4.5 && <4.15'
reflex: '>=0.4 && <0.9'
deepseq: '>=1.4 && <1.5'
all-versions:
- 1.0.3.0
- 1.0.3.1
author: |-
- Anton Gushcha
- Aminion
- Vladimir Krutkin
- Levon Oganyan
latest: 1.0.3.1
description-type: markdown
description: |
# reflex-external-ref
The package provides you with `IORef` that has attached reflex `Event`. Each time
the variable changes the event fires. It is very useful for communication with
external event sources or using it as environment level state.
license-name: MIT
| Update from Hackage at 2020-11-24T17:10:37Z | Update from Hackage at 2020-11-24T17:10:37Z
| YAML | mit | commercialhaskell/all-cabal-metadata | yaml | ## Code Before:
homepage: https://github.com/hexresearch/ergvein
changelog-type: ''
hash: 316ee7571ac183352b009ecd4b6aa929822db9868a190630b856a144a72fd08c
test-bench-deps: {}
maintainer: |-
- Anton Gushcha <ncrashed@gmail.com>
- Aminion <>
- Vladimir Krutkin <krutkinvs@gmail.com>
- Levon Oganyan
synopsis: External reference with reactivity support
changelog: ''
basic-deps:
base: '>=4.5 && <4.15'
reflex: '>=0.4 && <0.9'
deepseq: '>=1.4 && <1.5'
all-versions:
- 1.0.3.0
author: |-
- Anton Gushcha
- Aminion
- Vladimir Krutkin
- Levon Oganyan
latest: 1.0.3.0
description-type: haddock
description: See README.md
license-name: MIT
## Instruction:
Update from Hackage at 2020-11-24T17:10:37Z
## Code After:
homepage: https://github.com/hexresearch/ergvein
changelog-type: markdown
hash: ca7af67eb4aadf0d738ddfc7a9ceffbb3633784dba71e34d9e28e2caf2f8097d
test-bench-deps: {}
maintainer: |-
- Anton Gushcha <ncrashed@gmail.com>
- Aminion <>
- Vladimir Krutkin <krutkinvs@gmail.com>
- Levon Oganyan
synopsis: External reference with reactivity support
changelog: |
1.0.3.1
=======
Add description and README file.
1.0.3.0
=======
Bump versions of reflex. Drop dependency on `reflex-dom`
1.0.2.0
=======
Added extra modify functions: modifyExternalRef_, modifyExternalRefMaybe etc
1.0.1.0
=======
Fix firing old value of external ref in modify.
basic-deps:
base: '>=4.5 && <4.15'
reflex: '>=0.4 && <0.9'
deepseq: '>=1.4 && <1.5'
all-versions:
- 1.0.3.0
- 1.0.3.1
author: |-
- Anton Gushcha
- Aminion
- Vladimir Krutkin
- Levon Oganyan
latest: 1.0.3.1
description-type: markdown
description: |
# reflex-external-ref
The package provides you with `IORef` that has attached reflex `Event`. Each time
the variable changes the event fires. It is very useful for communication with
external event sources or using it as environment level state.
license-name: MIT
| homepage: https://github.com/hexresearch/ergvein
- changelog-type: ''
? ^^
+ changelog-type: markdown
? ^^^^^^^^
- hash: 316ee7571ac183352b009ecd4b6aa929822db9868a190630b856a144a72fd08c
+ hash: ca7af67eb4aadf0d738ddfc7a9ceffbb3633784dba71e34d9e28e2caf2f8097d
test-bench-deps: {}
maintainer: |-
- Anton Gushcha <ncrashed@gmail.com>
- Aminion <>
- Vladimir Krutkin <krutkinvs@gmail.com>
- Levon Oganyan
synopsis: External reference with reactivity support
- changelog: ''
? ^^
+ changelog: |
? ^
+ 1.0.3.1
+ =======
+
+ Add description and README file.
+
+ 1.0.3.0
+ =======
+
+ Bump versions of reflex. Drop dependency on `reflex-dom`
+
+ 1.0.2.0
+ =======
+
+ Added extra modify functions: modifyExternalRef_, modifyExternalRefMaybe etc
+
+ 1.0.1.0
+ =======
+
+ Fix firing old value of external ref in modify.
basic-deps:
base: '>=4.5 && <4.15'
reflex: '>=0.4 && <0.9'
deepseq: '>=1.4 && <1.5'
all-versions:
- 1.0.3.0
+ - 1.0.3.1
author: |-
- Anton Gushcha
- Aminion
- Vladimir Krutkin
- Levon Oganyan
- latest: 1.0.3.0
? ^
+ latest: 1.0.3.1
? ^
- description-type: haddock
? ^ ^ ^^
+ description-type: markdown
? ^ ^^ ^^
- description: See README.md
+ description: |
+ # reflex-external-ref
+
+ The package provides you with `IORef` that has attached reflex `Event`. Each time
+ the variable changes the event fires. It is very useful for communication with
+ external event sources or using it as environment level state.
license-name: MIT | 37 | 1.423077 | 31 | 6 |
bf7b6a8e6cabc9e66a08e795c7fa977626df5f1a | px-checkout/src/main/java/com/mercadopago/android/px/internal/features/payment_result/remedies/RemediesBodyMapper.kt | px-checkout/src/main/java/com/mercadopago/android/px/internal/features/payment_result/remedies/RemediesBodyMapper.kt | package com.mercadopago.android.px.internal.features.payment_result.remedies
import com.mercadopago.android.px.internal.repository.UserSelectionRepository
import com.mercadopago.android.px.internal.viewmodel.mappers.Mapper
import com.mercadopago.android.px.model.PaymentData
import com.mercadopago.android.px.model.internal.remedies.PayerPaymentMethodRejected
import com.mercadopago.android.px.model.internal.remedies.RemediesBody
internal class RemediesBodyMapper(private val userSelectionRepository: UserSelectionRepository)
: Mapper<PaymentData, RemediesBody>() {
override fun map(data: PaymentData): RemediesBody {
val securityCodeLocation = userSelectionRepository.card?.securityCodeLocation
with(data) {
val payerPaymentMethodRejected = PayerPaymentMethodRejected(payerCost?.installments,
issuer?.name, token?.lastFourDigits, paymentMethod.id, paymentMethod.paymentTypeId,
token?.securityCodeLength, securityCodeLocation, rawAmount)
return RemediesBody(payerPaymentMethodRejected)
}
}
} | package com.mercadopago.android.px.internal.features.payment_result.remedies
import com.mercadopago.android.px.internal.repository.UserSelectionRepository
import com.mercadopago.android.px.internal.viewmodel.mappers.Mapper
import com.mercadopago.android.px.model.PaymentData
import com.mercadopago.android.px.model.internal.remedies.PayerPaymentMethodRejected
import com.mercadopago.android.px.model.internal.remedies.RemediesBody
internal class RemediesBodyMapper(private val userSelectionRepository: UserSelectionRepository)
: Mapper<PaymentData, RemediesBody>() {
override fun map(data: PaymentData): RemediesBody {
val (secCodeLocation, secCodeLength) = userSelectionRepository.card?.let{
Pair(it.securityCodeLocation, it.securityCodeLength)
} ?: Pair(null, null)
with(data) {
val payerPaymentMethodRejected = PayerPaymentMethodRejected(payerCost?.installments,
issuer?.name, token?.lastFourDigits, paymentMethod.id, paymentMethod.paymentTypeId,
secCodeLength, secCodeLocation, rawAmount)
return RemediesBody(payerPaymentMethodRejected)
}
}
} | Fix sec code length null after invalid esc | Fix sec code length null after invalid esc
| Kotlin | mit | mercadopago/px-android,mercadopago/px-android,mercadopago/px-android | kotlin | ## Code Before:
package com.mercadopago.android.px.internal.features.payment_result.remedies
import com.mercadopago.android.px.internal.repository.UserSelectionRepository
import com.mercadopago.android.px.internal.viewmodel.mappers.Mapper
import com.mercadopago.android.px.model.PaymentData
import com.mercadopago.android.px.model.internal.remedies.PayerPaymentMethodRejected
import com.mercadopago.android.px.model.internal.remedies.RemediesBody
internal class RemediesBodyMapper(private val userSelectionRepository: UserSelectionRepository)
: Mapper<PaymentData, RemediesBody>() {
override fun map(data: PaymentData): RemediesBody {
val securityCodeLocation = userSelectionRepository.card?.securityCodeLocation
with(data) {
val payerPaymentMethodRejected = PayerPaymentMethodRejected(payerCost?.installments,
issuer?.name, token?.lastFourDigits, paymentMethod.id, paymentMethod.paymentTypeId,
token?.securityCodeLength, securityCodeLocation, rawAmount)
return RemediesBody(payerPaymentMethodRejected)
}
}
}
## Instruction:
Fix sec code length null after invalid esc
## Code After:
package com.mercadopago.android.px.internal.features.payment_result.remedies
import com.mercadopago.android.px.internal.repository.UserSelectionRepository
import com.mercadopago.android.px.internal.viewmodel.mappers.Mapper
import com.mercadopago.android.px.model.PaymentData
import com.mercadopago.android.px.model.internal.remedies.PayerPaymentMethodRejected
import com.mercadopago.android.px.model.internal.remedies.RemediesBody
internal class RemediesBodyMapper(private val userSelectionRepository: UserSelectionRepository)
: Mapper<PaymentData, RemediesBody>() {
override fun map(data: PaymentData): RemediesBody {
val (secCodeLocation, secCodeLength) = userSelectionRepository.card?.let{
Pair(it.securityCodeLocation, it.securityCodeLength)
} ?: Pair(null, null)
with(data) {
val payerPaymentMethodRejected = PayerPaymentMethodRejected(payerCost?.installments,
issuer?.name, token?.lastFourDigits, paymentMethod.id, paymentMethod.paymentTypeId,
secCodeLength, secCodeLocation, rawAmount)
return RemediesBody(payerPaymentMethodRejected)
}
}
} | package com.mercadopago.android.px.internal.features.payment_result.remedies
import com.mercadopago.android.px.internal.repository.UserSelectionRepository
import com.mercadopago.android.px.internal.viewmodel.mappers.Mapper
import com.mercadopago.android.px.model.PaymentData
import com.mercadopago.android.px.model.internal.remedies.PayerPaymentMethodRejected
import com.mercadopago.android.px.model.internal.remedies.RemediesBody
internal class RemediesBodyMapper(private val userSelectionRepository: UserSelectionRepository)
: Mapper<PaymentData, RemediesBody>() {
override fun map(data: PaymentData): RemediesBody {
- val securityCodeLocation = userSelectionRepository.card?.securityCodeLocation
+ val (secCodeLocation, secCodeLength) = userSelectionRepository.card?.let{
+ Pair(it.securityCodeLocation, it.securityCodeLength)
+ } ?: Pair(null, null)
with(data) {
val payerPaymentMethodRejected = PayerPaymentMethodRejected(payerCost?.installments,
issuer?.name, token?.lastFourDigits, paymentMethod.id, paymentMethod.paymentTypeId,
- token?.securityCodeLength, securityCodeLocation, rawAmount)
? ------- ----- -----
+ secCodeLength, secCodeLocation, rawAmount)
return RemediesBody(payerPaymentMethodRejected)
}
}
} | 6 | 0.285714 | 4 | 2 |
0736453287987b2221129475d5c2fedfb160d8a2 | gulp-tasks/link-js.js | gulp-tasks/link-js.js | 'use strict';
(() => {
module.exports = (gulp, plugins, config) => {
return () => {
return plugins.vinylFs.src([config.patternsPath + '/**/*.js',
config.patternsPath + '/**/*.json',
'!' + config.patternsPath + '/**/rocketbelt.slipsum-cache.json'])
.pipe(plugins.plumber({ errorHandler: plugins.notify.onError('Error: <%= error.message %>') }))
.pipe(plugins.vinylFs.symlink(config.templatesPath, { relative: true }));
};
};
})();
| 'use strict';
(() => {
module.exports = (gulp, plugins, config) => {
return () => {
return plugins.vinylFs.src([`${config.patternsPath}/**/*.js`,
`${config.patternsPath}/**/*.json`,
`!${config.patternsPath}/**/rocketbelt.slipsum-cache.json`,
`!${config.patternsPath}/tools/**/*`])
.pipe(plugins.plumber({
errorHandler: plugins.notify.onError('Error: <%= error.message %>')
}))
.pipe(plugins.vinylFs.symlink(config.templatesPath, { relative: true }));
};
};
})();
| Exclude JS files in tools directory from symlinking. | fix(Build): Exclude JS files in tools directory from symlinking.
| JavaScript | mit | Pier1/rocketbelt,Pier1/rocketbelt | javascript | ## Code Before:
'use strict';
(() => {
module.exports = (gulp, plugins, config) => {
return () => {
return plugins.vinylFs.src([config.patternsPath + '/**/*.js',
config.patternsPath + '/**/*.json',
'!' + config.patternsPath + '/**/rocketbelt.slipsum-cache.json'])
.pipe(plugins.plumber({ errorHandler: plugins.notify.onError('Error: <%= error.message %>') }))
.pipe(plugins.vinylFs.symlink(config.templatesPath, { relative: true }));
};
};
})();
## Instruction:
fix(Build): Exclude JS files in tools directory from symlinking.
## Code After:
'use strict';
(() => {
module.exports = (gulp, plugins, config) => {
return () => {
return plugins.vinylFs.src([`${config.patternsPath}/**/*.js`,
`${config.patternsPath}/**/*.json`,
`!${config.patternsPath}/**/rocketbelt.slipsum-cache.json`,
`!${config.patternsPath}/tools/**/*`])
.pipe(plugins.plumber({
errorHandler: plugins.notify.onError('Error: <%= error.message %>')
}))
.pipe(plugins.vinylFs.symlink(config.templatesPath, { relative: true }));
};
};
})();
| 'use strict';
(() => {
module.exports = (gulp, plugins, config) => {
return () => {
- return plugins.vinylFs.src([config.patternsPath + '/**/*.js',
? ^^^^ ^
+ return plugins.vinylFs.src([`${config.patternsPath}/**/*.js`,
? +++ ^ ^
- config.patternsPath + '/**/*.json',
? ^^^^ ^
+ `${config.patternsPath}/**/*.json`,
? +++ ^ ^
- '!' + config.patternsPath + '/**/rocketbelt.slipsum-cache.json'])
? ^ ^^^^ ^^^^ ^^^
+ `!${config.patternsPath}/**/rocketbelt.slipsum-cache.json`,
? ^ ^^ ^ ^^
+ `!${config.patternsPath}/tools/**/*`])
+ .pipe(plugins.plumber({
- .pipe(plugins.plumber({ errorHandler: plugins.notify.onError('Error: <%= error.message %>') }))
? ^^^^^^^^^^^^^^^^^^^^^^^ ----
+ errorHandler: plugins.notify.onError('Error: <%= error.message %>')
? ^
+ }))
.pipe(plugins.vinylFs.symlink(config.templatesPath, { relative: true }));
};
};
})(); | 11 | 0.916667 | 7 | 4 |
b52eaee2911202fd3ef365747dbde946e0cb59e2 | docs/source/contrib_guide_welcome.rst | docs/source/contrib_guide_welcome.rst | =======
Welcome
=======
Welcome. Whether you are a new, returning, or current contributor to Project
Jupyter's subprojects, such as Jupyter Notebook, or language kernels, like
IPython, we welcome and appreciate your contributions.
Project Jupyter is a quickly growing group of projects. Our project
maintainers are balancing many requirements, needs, and resources. We ask
contributors to take some time to become familiar with our contribution
guides and spend some time learning about our project communication and
workflow. The contribution guides here and project specific Contributor
information are helpful in getting started. If questions arise, please ask us.
`Community Resources <https://jupyter.org/community.html>`_ provides contact
information.
By fostering a respectful, courteous participation, we believe that the
projects will thrive and continue to fulfill the evolving community needs. On
a personal note, we ask you to be reflective on your communication with
others as well as keeping discussions about the issues and not the individuals
involved.
We are very pleased to have you as a contributor, and we hope you
will find valuable your impact on the projects. Again, **thank you** for
sharing your interests, ideas, and skills with us. | =======
Welcome
=======
Whether you are a new, returning, or current contributor to Project
Jupyter's subprojects, such as Jupyter Notebook, or language kernels, like
IPython, **we welcome you**.
Project Jupyter has seen strong growth over the past several years, and it is
wonderful to see the many ways people are using these projects. As a result of
this rapid growth, our project maintainers are balancing many requirements,
needs, and resources. We ask contributors to take some time to become familiar
with our contribution guides and spend some time learning about our project
communication and workflow.
The contribution guides here and project specific Contributor information,
which are found in the individual project repos, offer helpful tips and
guidance. If you have a question, please ask us. `Community Resources
<https://jupyter.org/community.html>`_ provides information on our commonly
used communication methods.
By fostering respectful, courteous participation within the projects, we
believe that Project Jupyter will thrive and evolve to meet community needs.
On a personal note, we ask you to be mindful in your communication with
others as well as focusing discussions on the issues and not the individuals
involved.
We are very pleased to have you as a contributor, and we hope you
will find valuable your impact on the projects. Again, **thank you** for
sharing your interests, ideas, and skills with us. | Make a few content edits | Make a few content edits
| reStructuredText | bsd-3-clause | willingc/jupyter,Carreau/jupyter,jupyter/jupyter,minrk/jupyter | restructuredtext | ## Code Before:
=======
Welcome
=======
Welcome. Whether you are a new, returning, or current contributor to Project
Jupyter's subprojects, such as Jupyter Notebook, or language kernels, like
IPython, we welcome and appreciate your contributions.
Project Jupyter is a quickly growing group of projects. Our project
maintainers are balancing many requirements, needs, and resources. We ask
contributors to take some time to become familiar with our contribution
guides and spend some time learning about our project communication and
workflow. The contribution guides here and project specific Contributor
information are helpful in getting started. If questions arise, please ask us.
`Community Resources <https://jupyter.org/community.html>`_ provides contact
information.
By fostering a respectful, courteous participation, we believe that the
projects will thrive and continue to fulfill the evolving community needs. On
a personal note, we ask you to be reflective on your communication with
others as well as keeping discussions about the issues and not the individuals
involved.
We are very pleased to have you as a contributor, and we hope you
will find valuable your impact on the projects. Again, **thank you** for
sharing your interests, ideas, and skills with us.
## Instruction:
Make a few content edits
## Code After:
=======
Welcome
=======
Whether you are a new, returning, or current contributor to Project
Jupyter's subprojects, such as Jupyter Notebook, or language kernels, like
IPython, **we welcome you**.
Project Jupyter has seen strong growth over the past several years, and it is
wonderful to see the many ways people are using these projects. As a result of
this rapid growth, our project maintainers are balancing many requirements,
needs, and resources. We ask contributors to take some time to become familiar
with our contribution guides and spend some time learning about our project
communication and workflow.
The contribution guides here and project specific Contributor information,
which are found in the individual project repos, offer helpful tips and
guidance. If you have a question, please ask us. `Community Resources
<https://jupyter.org/community.html>`_ provides information on our commonly
used communication methods.
By fostering respectful, courteous participation within the projects, we
believe that Project Jupyter will thrive and evolve to meet community needs.
On a personal note, we ask you to be mindful in your communication with
others as well as focusing discussions on the issues and not the individuals
involved.
We are very pleased to have you as a contributor, and we hope you
will find valuable your impact on the projects. Again, **thank you** for
sharing your interests, ideas, and skills with us. | =======
Welcome
=======
- Welcome. Whether you are a new, returning, or current contributor to Project
? ---------
+ Whether you are a new, returning, or current contributor to Project
Jupyter's subprojects, such as Jupyter Notebook, or language kernels, like
- IPython, we welcome and appreciate your contributions.
+ IPython, **we welcome you**.
+ Project Jupyter has seen strong growth over the past several years, and it is
+ wonderful to see the many ways people are using these projects. As a result of
+ this rapid growth, our project maintainers are balancing many requirements,
+ needs, and resources. We ask contributors to take some time to become familiar
+ with our contribution guides and spend some time learning about our project
+ communication and workflow.
- Project Jupyter is a quickly growing group of projects. Our project
- maintainers are balancing many requirements, needs, and resources. We ask
- contributors to take some time to become familiar with our contribution
- guides and spend some time learning about our project communication and
- workflow. The contribution guides here and project specific Contributor
- information are helpful in getting started. If questions arise, please ask us.
- `Community Resources <https://jupyter.org/community.html>`_ provides contact
- information.
+ The contribution guides here and project specific Contributor information,
+ which are found in the individual project repos, offer helpful tips and
+ guidance. If you have a question, please ask us. `Community Resources
+ <https://jupyter.org/community.html>`_ provides information on our commonly
+ used communication methods.
+
- By fostering a respectful, courteous participation, we believe that the
? -- - ----- ---- ^^
+ By fostering respectful, courteous participation within the projects, we
? ^^ ++++++++++++
- projects will thrive and continue to fulfill the evolving community needs. On
+ believe that Project Jupyter will thrive and evolve to meet community needs.
- a personal note, we ask you to be reflective on your communication with
? ^^ ^^^ ----
+ On a personal note, we ask you to be mindful in your communication with
? +++ ^^^^ + ^
- others as well as keeping discussions about the issues and not the individuals
? ^^^^ -- ^^
+ others as well as focusing discussions on the issues and not the individuals
? ^^^^^ ^
involved.
We are very pleased to have you as a contributor, and we hope you
will find valuable your impact on the projects. Again, **thank you** for
sharing your interests, ideas, and skills with us. | 32 | 1.230769 | 18 | 14 |
43ff7c6e9d9ff2e965eb3a73018c98230088d4aa | README.md | README.md | Interactive map of telemetry | Interactive map of telemetry.
REST web-service for check and mapping of data of telemetering measurement for boiler station, using interactive map of the Rostov region.
In this project were used: Spring, Angular, Maven, JDBC, MySQL, H2, TestNG, Tomcat.
In DEV-ENV for login you can use login - "name", password - "pswd". | Add some lines of readme. | Add some lines of readme.
| Markdown | mit | finke-ba/imap,finke-ba/imap,finke-ba/imap | markdown | ## Code Before:
Interactive map of telemetry
## Instruction:
Add some lines of readme.
## Code After:
Interactive map of telemetry.
REST web-service for check and mapping of data of telemetering measurement for boiler station, using interactive map of the Rostov region.
In this project were used: Spring, Angular, Maven, JDBC, MySQL, H2, TestNG, Tomcat.
In DEV-ENV for login you can use login - "name", password - "pswd". | - Interactive map of telemetry
+ Interactive map of telemetry.
? +
+
+ REST web-service for check and mapping of data of telemetering measurement for boiler station, using interactive map of the Rostov region.
+
+ In this project were used: Spring, Angular, Maven, JDBC, MySQL, H2, TestNG, Tomcat.
+
+ In DEV-ENV for login you can use login - "name", password - "pswd". | 8 | 8 | 7 | 1 |
96bedff14bbc831daa2ed2a04d651d03322a47d6 | src/toil/test/provisioners/azure/delete-azure-vm.yml | src/toil/test/provisioners/azure/delete-azure-vm.yml | - name: Remove Virtual Machine and associated objects
hosts: localhost
connection: local
gather_facts: no
tasks:
- name: Remove VM and all resources
azure_rm_virtualmachine:
resource_group: '{{ resgrp }}'
name: '{{ vmname }}'
state: absent
# ignore_errors: yes
remove_on_absent:
- network_interfaces
- virtual_storage
- public_ips
- name: Remove storage account
azure_rm_storageaccount:
resource_group: '{{ resgrp }}'
name: '{{ vmname }}'
state: absent
# ignore_errors: yes
| - name: Remove Virtual Machine and associated objects
hosts: localhost
connection: local
gather_facts: no
tasks:
- name: Remove VM and all resources
azure_rm_virtualmachine:
resource_group: '{{ resgrp }}'
name: '{{ vmname }}'
state: absent
# ignore_errors: yes
remove_on_absent:
- network_interfaces
- virtual_storage
- public_ips
- name: Remove storage account
azure_rm_storageaccount:
resource_group: '{{ resgrp }}'
name: '{{ vmname }}'
state: absent
# ignore_errors: yes
- name: Remove security group
azure_rm_securitygroup:
resource_group: '{{ resgrp }}'
name: '{{ vmname }}'
state: absent
| Fix Azure teardown not removing created security group | Fix Azure teardown not removing created security group
| YAML | apache-2.0 | BD2KGenomics/slugflow,BD2KGenomics/slugflow | yaml | ## Code Before:
- name: Remove Virtual Machine and associated objects
hosts: localhost
connection: local
gather_facts: no
tasks:
- name: Remove VM and all resources
azure_rm_virtualmachine:
resource_group: '{{ resgrp }}'
name: '{{ vmname }}'
state: absent
# ignore_errors: yes
remove_on_absent:
- network_interfaces
- virtual_storage
- public_ips
- name: Remove storage account
azure_rm_storageaccount:
resource_group: '{{ resgrp }}'
name: '{{ vmname }}'
state: absent
# ignore_errors: yes
## Instruction:
Fix Azure teardown not removing created security group
## Code After:
- name: Remove Virtual Machine and associated objects
hosts: localhost
connection: local
gather_facts: no
tasks:
- name: Remove VM and all resources
azure_rm_virtualmachine:
resource_group: '{{ resgrp }}'
name: '{{ vmname }}'
state: absent
# ignore_errors: yes
remove_on_absent:
- network_interfaces
- virtual_storage
- public_ips
- name: Remove storage account
azure_rm_storageaccount:
resource_group: '{{ resgrp }}'
name: '{{ vmname }}'
state: absent
# ignore_errors: yes
- name: Remove security group
azure_rm_securitygroup:
resource_group: '{{ resgrp }}'
name: '{{ vmname }}'
state: absent
| - name: Remove Virtual Machine and associated objects
hosts: localhost
connection: local
gather_facts: no
tasks:
- name: Remove VM and all resources
azure_rm_virtualmachine:
resource_group: '{{ resgrp }}'
name: '{{ vmname }}'
state: absent
# ignore_errors: yes
remove_on_absent:
- network_interfaces
- virtual_storage
- public_ips
- name: Remove storage account
azure_rm_storageaccount:
resource_group: '{{ resgrp }}'
name: '{{ vmname }}'
state: absent
# ignore_errors: yes
+ - name: Remove security group
+ azure_rm_securitygroup:
+ resource_group: '{{ resgrp }}'
+ name: '{{ vmname }}'
+ state: absent | 5 | 0.238095 | 5 | 0 |
189d686ef4415fd611de37fdfec5c14550ec860c | config.mk | config.mk | VERSION = 0.6
# paths
PREFIX = /usr/local
MANPREFIX = $(PREFIX)/man
CC = cc
LD = $(CC)
CPPFLAGS =
CFLAGS = -Wall -Os $(CPPFLAGS)
LDFLAGS = -static
| VERSION = 0.6
# paths
PREFIX = /usr/local
MANPREFIX = $(PREFIX)/man
CC = cc
LD = $(CC)
CPPFLAGS =
CFLAGS = -Wextra -Werror -Wall -Os $(CPPFLAGS)
LDFLAGS = -static
| Add -Wextra and -Werror by default | Add -Wextra and -Werror by default
| Makefile | mit | ScoreUnder/fjinit,gdm85/sinit,henrysher/sinit | makefile | ## Code Before:
VERSION = 0.6
# paths
PREFIX = /usr/local
MANPREFIX = $(PREFIX)/man
CC = cc
LD = $(CC)
CPPFLAGS =
CFLAGS = -Wall -Os $(CPPFLAGS)
LDFLAGS = -static
## Instruction:
Add -Wextra and -Werror by default
## Code After:
VERSION = 0.6
# paths
PREFIX = /usr/local
MANPREFIX = $(PREFIX)/man
CC = cc
LD = $(CC)
CPPFLAGS =
CFLAGS = -Wextra -Werror -Wall -Os $(CPPFLAGS)
LDFLAGS = -static
| VERSION = 0.6
# paths
PREFIX = /usr/local
MANPREFIX = $(PREFIX)/man
CC = cc
LD = $(CC)
CPPFLAGS =
- CFLAGS = -Wall -Os $(CPPFLAGS)
+ CFLAGS = -Wextra -Werror -Wall -Os $(CPPFLAGS)
? ++++++++++++++++
LDFLAGS = -static | 2 | 0.181818 | 1 | 1 |
ce50406ab7995f33fcaa063bd4c08bb8d68544fe | metadata/de.freewarepoint.whohasmystuff.txt | metadata/de.freewarepoint.whohasmystuff.txt | Categories:Office
License:GPLv3
Web Site:https://github.com/stovocor/whohasmystuff
Source Code:https://github.com/stovocor/whohasmystuff
Issue Tracker:https://github.com/stovocor/whohasmystuff/issues
Auto Name:Who Has My Stuff?
Summary:Manager for lent items
Description:
Did you ever search for a book, wondering who might have borrowed it from you?
Do you often forget how much money people are owing you?
Now you can keep track of your lent things with this very simple application. It
lets you define a description, date and contact person from your address book
for each object.
.
Repo Type:git
Repo:https://github.com/stovocor/whohasmystuff.git
Build:1.0.7,8
commit=1.0.7
target=android-15
Build:1.0.9,10
commit=1.0.9
target=android-15
Build:1.0.10,11
commit=1.0.10
target=android-15
Build:1.0.12,13
commit=1.0.12
target=android-15
Auto Update Mode:None
Update Check Mode:Tags
Current Version:1.0.13
Current Version Code:14
| Categories:Office
License:GPLv3
Web Site:https://github.com/stovocor/whohasmystuff
Source Code:https://github.com/stovocor/whohasmystuff
Issue Tracker:https://github.com/stovocor/whohasmystuff/issues
Auto Name:Who Has My Stuff?
Summary:Manager for lent items
Description:
Did you ever search for a book, wondering who might have borrowed it from you?
Do you often forget how much money people are owing you?
Now you can keep track of your lent things with this very simple application. It
lets you define a description, date and contact person from your address book
for each object.
.
Repo Type:git
Repo:https://github.com/stovocor/whohasmystuff.git
Build:1.0.7,8
commit=1.0.7
target=android-15
Build:1.0.9,10
commit=1.0.9
target=android-15
Build:1.0.10,11
commit=1.0.10
target=android-15
Build:1.0.12,13
commit=1.0.12
target=android-15
Build:1.0.13,14
commit=1.0.13
target=android-15
Auto Update Mode:None
Update Check Mode:Tags
Current Version:1.0.13
Current Version Code:14
| Update Who Has My Stuff? to 1.0.13 (14) | Update Who Has My Stuff? to 1.0.13 (14)
| Text | agpl-3.0 | f-droid/fdroid-data,f-droid/fdroiddata,f-droid/fdroiddata | text | ## Code Before:
Categories:Office
License:GPLv3
Web Site:https://github.com/stovocor/whohasmystuff
Source Code:https://github.com/stovocor/whohasmystuff
Issue Tracker:https://github.com/stovocor/whohasmystuff/issues
Auto Name:Who Has My Stuff?
Summary:Manager for lent items
Description:
Did you ever search for a book, wondering who might have borrowed it from you?
Do you often forget how much money people are owing you?
Now you can keep track of your lent things with this very simple application. It
lets you define a description, date and contact person from your address book
for each object.
.
Repo Type:git
Repo:https://github.com/stovocor/whohasmystuff.git
Build:1.0.7,8
commit=1.0.7
target=android-15
Build:1.0.9,10
commit=1.0.9
target=android-15
Build:1.0.10,11
commit=1.0.10
target=android-15
Build:1.0.12,13
commit=1.0.12
target=android-15
Auto Update Mode:None
Update Check Mode:Tags
Current Version:1.0.13
Current Version Code:14
## Instruction:
Update Who Has My Stuff? to 1.0.13 (14)
## Code After:
Categories:Office
License:GPLv3
Web Site:https://github.com/stovocor/whohasmystuff
Source Code:https://github.com/stovocor/whohasmystuff
Issue Tracker:https://github.com/stovocor/whohasmystuff/issues
Auto Name:Who Has My Stuff?
Summary:Manager for lent items
Description:
Did you ever search for a book, wondering who might have borrowed it from you?
Do you often forget how much money people are owing you?
Now you can keep track of your lent things with this very simple application. It
lets you define a description, date and contact person from your address book
for each object.
.
Repo Type:git
Repo:https://github.com/stovocor/whohasmystuff.git
Build:1.0.7,8
commit=1.0.7
target=android-15
Build:1.0.9,10
commit=1.0.9
target=android-15
Build:1.0.10,11
commit=1.0.10
target=android-15
Build:1.0.12,13
commit=1.0.12
target=android-15
Build:1.0.13,14
commit=1.0.13
target=android-15
Auto Update Mode:None
Update Check Mode:Tags
Current Version:1.0.13
Current Version Code:14
| Categories:Office
License:GPLv3
Web Site:https://github.com/stovocor/whohasmystuff
Source Code:https://github.com/stovocor/whohasmystuff
Issue Tracker:https://github.com/stovocor/whohasmystuff/issues
Auto Name:Who Has My Stuff?
Summary:Manager for lent items
Description:
Did you ever search for a book, wondering who might have borrowed it from you?
Do you often forget how much money people are owing you?
Now you can keep track of your lent things with this very simple application. It
lets you define a description, date and contact person from your address book
for each object.
.
Repo Type:git
Repo:https://github.com/stovocor/whohasmystuff.git
Build:1.0.7,8
commit=1.0.7
target=android-15
Build:1.0.9,10
commit=1.0.9
target=android-15
Build:1.0.10,11
commit=1.0.10
target=android-15
Build:1.0.12,13
commit=1.0.12
target=android-15
+ Build:1.0.13,14
+ commit=1.0.13
+ target=android-15
+
Auto Update Mode:None
Update Check Mode:Tags
Current Version:1.0.13
Current Version Code:14
| 4 | 0.1 | 4 | 0 |
8b41a38b50b1676f500aeacf9e4d0ee93a92b2d1 | sometimes/decorators.py | sometimes/decorators.py | import random
in_percentage = lambda x: random.randint(1,100) <= x
"""
They've done studies, you know. 50% of the time,
it works every time.
"""
def sometimes(fn):
def wrapped(*args, **kwargs):
wrapped.x += 1
if wrapped.x % 2 == 1:
return fn(*args, **kwargs)
return
wrapped.x = 0
return wrapped
"""
Has a 50/50 chance of calling a function
"""
def sometimesish(fn):
def wrapped(*args, **kwargs):
if random.randint(1,2) == 1:
return fn(*args, **kwargs)
return
return wrapped
"""
Function has a X percentage chance of running
"""
def percent_of_the_time(p):
def decorator(fn):
def wrapped(*args, **kwargs):
if in_percentage(p):
fn(*args, **kwargs)
return
return wrapped
return decorator
"""
Do something a random amount of times
between x & y
"""
def times(x,y):
def decorator(fn):
def wrapped(*args, **kwargs):
while wrapped.min <= wrapped.max:
wrapped.min += 1
fn(*args, **kwargs)
return
wrapped.min = x
wrapped.max = random.randint(x,y)
return wrapped
return decorator | import random
in_percentage = lambda x: random.randint(1,100) <= x
"""
They've done studies, you know. 50% of the time,
it works every time.
"""
def sometimes(fn):
def wrapped(*args, **kwargs):
wrapped.x += 1
if wrapped.x % 2 == 1:
return fn(*args, **kwargs)
wrapped.x = 0
return wrapped
half_the_time = sometimes
"""
Has a 50/50 chance of calling a function
"""
def sometimesish(fn):
def wrapped(*args, **kwargs):
if random.randint(1,2) == 1:
return fn(*args, **kwargs)
return wrapped
"""
Function has a X percentage chance of running
"""
def percent_of_the_time(p):
def decorator(fn):
def wrapped(*args, **kwargs):
if in_percentage(p):
fn(*args, **kwargs)
return wrapped
return decorator
"""
Only 5% chance of happening
"""
def rarely(fn):
def wrapped(*args, **kwargs):
if in_percentage(5):
fn(*args, **kwargs)
return wrapped
"""
95% chance of happening
"""
def mostly(fn):
def wrapped(*args, **kwargs):
if in_percentage(95):
fn(*args, **kwargs)
return wrapped
"""
Do something a random amount of times
between x & y
"""
def times(x,y):
def decorator(fn):
def wrapped(*args, **kwargs):
while wrapped.min <= wrapped.max:
wrapped.min += 1
fn(*args, **kwargs)
wrapped.min = x
wrapped.max = random.randint(x,y)
return wrapped
return decorator | Add rarely, mostly and other alias | Add rarely, mostly and other alias
| Python | mit | aaronbassett/sometimes | python | ## Code Before:
import random
in_percentage = lambda x: random.randint(1,100) <= x
"""
They've done studies, you know. 50% of the time,
it works every time.
"""
def sometimes(fn):
def wrapped(*args, **kwargs):
wrapped.x += 1
if wrapped.x % 2 == 1:
return fn(*args, **kwargs)
return
wrapped.x = 0
return wrapped
"""
Has a 50/50 chance of calling a function
"""
def sometimesish(fn):
def wrapped(*args, **kwargs):
if random.randint(1,2) == 1:
return fn(*args, **kwargs)
return
return wrapped
"""
Function has a X percentage chance of running
"""
def percent_of_the_time(p):
def decorator(fn):
def wrapped(*args, **kwargs):
if in_percentage(p):
fn(*args, **kwargs)
return
return wrapped
return decorator
"""
Do something a random amount of times
between x & y
"""
def times(x,y):
def decorator(fn):
def wrapped(*args, **kwargs):
while wrapped.min <= wrapped.max:
wrapped.min += 1
fn(*args, **kwargs)
return
wrapped.min = x
wrapped.max = random.randint(x,y)
return wrapped
return decorator
## Instruction:
Add rarely, mostly and other alias
## Code After:
import random
in_percentage = lambda x: random.randint(1,100) <= x
"""
They've done studies, you know. 50% of the time,
it works every time.
"""
def sometimes(fn):
def wrapped(*args, **kwargs):
wrapped.x += 1
if wrapped.x % 2 == 1:
return fn(*args, **kwargs)
wrapped.x = 0
return wrapped
half_the_time = sometimes
"""
Has a 50/50 chance of calling a function
"""
def sometimesish(fn):
def wrapped(*args, **kwargs):
if random.randint(1,2) == 1:
return fn(*args, **kwargs)
return wrapped
"""
Function has a X percentage chance of running
"""
def percent_of_the_time(p):
def decorator(fn):
def wrapped(*args, **kwargs):
if in_percentage(p):
fn(*args, **kwargs)
return wrapped
return decorator
"""
Only 5% chance of happening
"""
def rarely(fn):
def wrapped(*args, **kwargs):
if in_percentage(5):
fn(*args, **kwargs)
return wrapped
"""
95% chance of happening
"""
def mostly(fn):
def wrapped(*args, **kwargs):
if in_percentage(95):
fn(*args, **kwargs)
return wrapped
"""
Do something a random amount of times
between x & y
"""
def times(x,y):
def decorator(fn):
def wrapped(*args, **kwargs):
while wrapped.min <= wrapped.max:
wrapped.min += 1
fn(*args, **kwargs)
wrapped.min = x
wrapped.max = random.randint(x,y)
return wrapped
return decorator | import random
in_percentage = lambda x: random.randint(1,100) <= x
"""
They've done studies, you know. 50% of the time,
it works every time.
"""
def sometimes(fn):
def wrapped(*args, **kwargs):
wrapped.x += 1
if wrapped.x % 2 == 1:
return fn(*args, **kwargs)
- return
wrapped.x = 0
return wrapped
+
+ half_the_time = sometimes
"""
Has a 50/50 chance of calling a function
"""
def sometimesish(fn):
def wrapped(*args, **kwargs):
if random.randint(1,2) == 1:
return fn(*args, **kwargs)
- return
return wrapped
"""
Function has a X percentage chance of running
"""
def percent_of_the_time(p):
def decorator(fn):
def wrapped(*args, **kwargs):
if in_percentage(p):
fn(*args, **kwargs)
- return
return wrapped
return decorator
+
+ """
+ Only 5% chance of happening
+ """
+ def rarely(fn):
+ def wrapped(*args, **kwargs):
+ if in_percentage(5):
+ fn(*args, **kwargs)
+ return wrapped
+
+ """
+ 95% chance of happening
+ """
+ def mostly(fn):
+ def wrapped(*args, **kwargs):
+ if in_percentage(95):
+ fn(*args, **kwargs)
+ return wrapped
"""
Do something a random amount of times
between x & y
"""
def times(x,y):
def decorator(fn):
def wrapped(*args, **kwargs):
while wrapped.min <= wrapped.max:
wrapped.min += 1
fn(*args, **kwargs)
- return
wrapped.min = x
wrapped.max = random.randint(x,y)
return wrapped
return decorator | 24 | 0.333333 | 20 | 4 |
a194de9c50cc6f6ad4e3a1b34c0e5323c5084747 | README.md | README.md |
[](https://travis-ci.org/ProgrammingLife2016/PL1-2016.png)
|
[](https://travis-ci.org/ProgrammingLife2016/PL1-2016.png)
## Group Information
Group name: Byzantine Generals
Group members: Ravi Shivam Autar, Adam el Khalki, Ali Smesseim, Samuel D. Sital,
Kamran Tadzjibov.
## Build information
### First time running
git clone https://github.com/ProgrammingLife2016/PL1-2016.git
cd PL1-2016
mvn package
java -cp target/byzantinegenerals-0.1.0.jar io.github.programminglife2016.pl1_2016.Launcher
### Subsequent runs
Go to the `PL1-2016` directory.
git pull
mvn package
java -cp target/byzantinegenerals-0.1.0.jar io.github.programminglife2016.pl1_2016.Launcher
## Usage
The server is running on `http://localhost:8081`.
Open the web app at `http://localhost:8081/static/index.html`.
If you are a developer, you might be interested in interacting with the server
directly. In that case, consult the API documentation below.
## API documentation
- `/api/nodes` returns all nodes of a dataset, without collapsion.
- `/api/nodes/<xmin>/<xmax>/<ymin>/<ymax>/<totalx>/<totaly> returns all nodes of
a dataset with coordinates between `<xmin>`, `<xmax>`, `<ymin>`, `<ymax>`.
`<totalx>` and `<totaly>` are the dimensions of the viewport of the client.
The server may or may not base the node coordinates on the dimensions of the
viewport.
- `/api/dataset/<dataset>` returns all nodes of the dataset named `<dataset>`,
without collapsion.
- `/api/dataset/<dataset>/<xmin>/<xmax>/<ymin>/<ymax>/<totalx>/<totaly>` returns
all nodes of a dataset with coordinates between `<xmin>`, `<xmax>`, `<ymin>`,
`<ymax>`. `<totalx>` and `<totaly>` are the dimensions of the viewport of the
client. The server may or may not base the node coordinates on the dimensions
of the viewport.
| Add build, usage and API information | Add build, usage and API information
| Markdown | apache-2.0 | ProgrammingLife2016/PL1-2016,ProgrammingLife2016/PL1-2016,ProgrammingLife2016/PL1-2016 | markdown | ## Code Before:
[](https://travis-ci.org/ProgrammingLife2016/PL1-2016.png)
## Instruction:
Add build, usage and API information
## Code After:
[](https://travis-ci.org/ProgrammingLife2016/PL1-2016.png)
## Group Information
Group name: Byzantine Generals
Group members: Ravi Shivam Autar, Adam el Khalki, Ali Smesseim, Samuel D. Sital,
Kamran Tadzjibov.
## Build information
### First time running
git clone https://github.com/ProgrammingLife2016/PL1-2016.git
cd PL1-2016
mvn package
java -cp target/byzantinegenerals-0.1.0.jar io.github.programminglife2016.pl1_2016.Launcher
### Subsequent runs
Go to the `PL1-2016` directory.
git pull
mvn package
java -cp target/byzantinegenerals-0.1.0.jar io.github.programminglife2016.pl1_2016.Launcher
## Usage
The server is running on `http://localhost:8081`.
Open the web app at `http://localhost:8081/static/index.html`.
If you are a developer, you might be interested in interacting with the server
directly. In that case, consult the API documentation below.
## API documentation
- `/api/nodes` returns all nodes of a dataset, without collapsion.
- `/api/nodes/<xmin>/<xmax>/<ymin>/<ymax>/<totalx>/<totaly> returns all nodes of
a dataset with coordinates between `<xmin>`, `<xmax>`, `<ymin>`, `<ymax>`.
`<totalx>` and `<totaly>` are the dimensions of the viewport of the client.
The server may or may not base the node coordinates on the dimensions of the
viewport.
- `/api/dataset/<dataset>` returns all nodes of the dataset named `<dataset>`,
without collapsion.
- `/api/dataset/<dataset>/<xmin>/<xmax>/<ymin>/<ymax>/<totalx>/<totaly>` returns
all nodes of a dataset with coordinates between `<xmin>`, `<xmax>`, `<ymin>`,
`<ymax>`. `<totalx>` and `<totaly>` are the dimensions of the viewport of the
client. The server may or may not base the node coordinates on the dimensions
of the viewport.
|
[](https://travis-ci.org/ProgrammingLife2016/PL1-2016.png)
+ ## Group Information
+
+ Group name: Byzantine Generals
+
+ Group members: Ravi Shivam Autar, Adam el Khalki, Ali Smesseim, Samuel D. Sital,
+ Kamran Tadzjibov.
+
+ ## Build information
+
+ ### First time running
+
+ git clone https://github.com/ProgrammingLife2016/PL1-2016.git
+ cd PL1-2016
+ mvn package
+ java -cp target/byzantinegenerals-0.1.0.jar io.github.programminglife2016.pl1_2016.Launcher
+
+ ### Subsequent runs
+
+ Go to the `PL1-2016` directory.
+
+ git pull
+ mvn package
+ java -cp target/byzantinegenerals-0.1.0.jar io.github.programminglife2016.pl1_2016.Launcher
+
+ ## Usage
+
+ The server is running on `http://localhost:8081`.
+
+ Open the web app at `http://localhost:8081/static/index.html`.
+
+ If you are a developer, you might be interested in interacting with the server
+ directly. In that case, consult the API documentation below.
+
+ ## API documentation
+
+ - `/api/nodes` returns all nodes of a dataset, without collapsion.
+ - `/api/nodes/<xmin>/<xmax>/<ymin>/<ymax>/<totalx>/<totaly> returns all nodes of
+ a dataset with coordinates between `<xmin>`, `<xmax>`, `<ymin>`, `<ymax>`.
+ `<totalx>` and `<totaly>` are the dimensions of the viewport of the client.
+ The server may or may not base the node coordinates on the dimensions of the
+ viewport.
+ - `/api/dataset/<dataset>` returns all nodes of the dataset named `<dataset>`,
+ without collapsion.
+ - `/api/dataset/<dataset>/<xmin>/<xmax>/<ymin>/<ymax>/<totalx>/<totaly>` returns
+ all nodes of a dataset with coordinates between `<xmin>`, `<xmax>`, `<ymin>`,
+ `<ymax>`. `<totalx>` and `<totaly>` are the dimensions of the viewport of the
+ client. The server may or may not base the node coordinates on the dimensions
+ of the viewport.
+ | 49 | 16.333333 | 49 | 0 |
f6f4df5e0122fb2593e277ff3a2bf25f89a3dada | lib/components/FilterBar.js | lib/components/FilterBar.js | import React from 'react'
export default class FilterBar extends React.Component {
constructor() {
super();
this.state = {
input: '',
};
}
inputField(e) {
this.setState({ input: e.target.value })
}
render() {
return (
<div className='filter-bar'>
<h1 className='app-name'>Shoot Thou Breeze</h1>
<input
type='text'
placeholder='Filter'
value={this.state.input}
onChange={(e) => { this.inputField(e) }}/>
/>
</div>
)
}
}
| import React from 'react'
export default class FilterBar extends React.Component {
constructor() {
super();
this.state = {
input: '',
};
}
inputField(e) {
this.setState({ input: e.target.value })
}
render() {
return (
<div className='filter-bar'>
<h1 className='app-name'>Shoot Thou Breeze</h1>
<input
type='text'
placeholder='Filter'
value={this.state.input}
onChange={(e) => { this.inputField(e) }}
/>
<button
className='sort-btn sort-chrono-btn'
onClick={ () => {this.sortMessages() }}
>Sort Up
</button>
<button
className='sort-btn sort-reverse-chrono-btn'
onClick={ () => {this.sortMessages() }}
>Sort Down
</button>
</div>
)
}
}
| Add sort buttons: non-functioning at this time | Add sort buttons: non-functioning at this time
| JavaScript | mit | ejwill04/shoot-the-breeze,ejwill04/shoot-the-breeze | javascript | ## Code Before:
import React from 'react'
export default class FilterBar extends React.Component {
constructor() {
super();
this.state = {
input: '',
};
}
inputField(e) {
this.setState({ input: e.target.value })
}
render() {
return (
<div className='filter-bar'>
<h1 className='app-name'>Shoot Thou Breeze</h1>
<input
type='text'
placeholder='Filter'
value={this.state.input}
onChange={(e) => { this.inputField(e) }}/>
/>
</div>
)
}
}
## Instruction:
Add sort buttons: non-functioning at this time
## Code After:
import React from 'react'
export default class FilterBar extends React.Component {
constructor() {
super();
this.state = {
input: '',
};
}
inputField(e) {
this.setState({ input: e.target.value })
}
render() {
return (
<div className='filter-bar'>
<h1 className='app-name'>Shoot Thou Breeze</h1>
<input
type='text'
placeholder='Filter'
value={this.state.input}
onChange={(e) => { this.inputField(e) }}
/>
<button
className='sort-btn sort-chrono-btn'
onClick={ () => {this.sortMessages() }}
>Sort Up
</button>
<button
className='sort-btn sort-reverse-chrono-btn'
onClick={ () => {this.sortMessages() }}
>Sort Down
</button>
</div>
)
}
}
| import React from 'react'
export default class FilterBar extends React.Component {
constructor() {
super();
this.state = {
input: '',
};
}
inputField(e) {
this.setState({ input: e.target.value })
}
render() {
return (
<div className='filter-bar'>
<h1 className='app-name'>Shoot Thou Breeze</h1>
<input
type='text'
placeholder='Filter'
value={this.state.input}
- onChange={(e) => { this.inputField(e) }}/>
? --
+ onChange={(e) => { this.inputField(e) }}
/>
+ <button
+ className='sort-btn sort-chrono-btn'
+ onClick={ () => {this.sortMessages() }}
+ >Sort Up
+ </button>
+ <button
+ className='sort-btn sort-reverse-chrono-btn'
+ onClick={ () => {this.sortMessages() }}
+ >Sort Down
+ </button>
</div>
)
}
} | 12 | 0.428571 | 11 | 1 |
06fd1674239de71ccbe52398516642d9b19b743b | setup.py | setup.py |
from distutils.core import setup
from distutils.command.sdist import sdist as _sdist
class sdist(_sdist):
def run(self):
try:
import sys
sys.path.append("contrib")
import git2changes
print('generating CHANGES.txt')
with open('CHANGES.txt', 'w+') as f:
git2changes.run(f)
except ImportError:
pass
_sdist.run(self)
setup(
name='pyppd',
version='1.0.2',
author='Vitor Baptista',
author_email='vitor@vitorbaptista.com',
packages=['pyppd'],
package_data={'pyppd': ['*.in']},
scripts=['bin/pyppd'],
url='http://github.com/vitorbaptista/pyppd/',
license='MIT',
description='A CUPS PostScript Printer Driver\'s compressor and generator',
long_description=open('README', 'rb').read().decode('UTF-8') + "\n" +
open('ISSUES', 'rb').read().decode('UTF-8'),
cmdclass={'sdist': sdist},
classifiers=[
'Development Status :: 5 - Production/Stable',
'Intended Audience :: System Administrators',
'Operating System :: POSIX',
'License :: OSI Approved :: MIT License',
'Topic :: Printing',
],
)
|
from distutils.core import setup
from distutils.command.sdist import sdist as _sdist
class sdist(_sdist):
def run(self):
try:
import sys
sys.path.append("contrib")
import git2changes
print('generating CHANGES.txt')
with open('CHANGES.txt', 'w+') as f:
git2changes.run(f)
except ImportError:
pass
_sdist.run(self)
setup(
name='pyppd',
version='1.0.2',
author='Vitor Baptista',
author_email='vitor@vitorbaptista.com',
packages=['pyppd'],
package_data={'pyppd': ['*.in']},
scripts=['bin/pyppd'],
url='https://github.com/OpenPrinting/pyppd/',
license='MIT',
description='A CUPS PostScript Printer Driver\'s compressor and generator',
long_description=open('README', 'rb').read().decode('UTF-8') + "\n" +
open('ISSUES', 'rb').read().decode('UTF-8'),
cmdclass={'sdist': sdist},
classifiers=[
'Development Status :: 5 - Production/Stable',
'Intended Audience :: System Administrators',
'Operating System :: POSIX',
'License :: OSI Approved :: MIT License',
'Topic :: Printing',
],
)
| Change repository URL to point to OpenPrinting's organisation | Change repository URL to point to OpenPrinting's organisation
| Python | mit | vitorbaptista/pyppd | python | ## Code Before:
from distutils.core import setup
from distutils.command.sdist import sdist as _sdist
class sdist(_sdist):
def run(self):
try:
import sys
sys.path.append("contrib")
import git2changes
print('generating CHANGES.txt')
with open('CHANGES.txt', 'w+') as f:
git2changes.run(f)
except ImportError:
pass
_sdist.run(self)
setup(
name='pyppd',
version='1.0.2',
author='Vitor Baptista',
author_email='vitor@vitorbaptista.com',
packages=['pyppd'],
package_data={'pyppd': ['*.in']},
scripts=['bin/pyppd'],
url='http://github.com/vitorbaptista/pyppd/',
license='MIT',
description='A CUPS PostScript Printer Driver\'s compressor and generator',
long_description=open('README', 'rb').read().decode('UTF-8') + "\n" +
open('ISSUES', 'rb').read().decode('UTF-8'),
cmdclass={'sdist': sdist},
classifiers=[
'Development Status :: 5 - Production/Stable',
'Intended Audience :: System Administrators',
'Operating System :: POSIX',
'License :: OSI Approved :: MIT License',
'Topic :: Printing',
],
)
## Instruction:
Change repository URL to point to OpenPrinting's organisation
## Code After:
from distutils.core import setup
from distutils.command.sdist import sdist as _sdist
class sdist(_sdist):
def run(self):
try:
import sys
sys.path.append("contrib")
import git2changes
print('generating CHANGES.txt')
with open('CHANGES.txt', 'w+') as f:
git2changes.run(f)
except ImportError:
pass
_sdist.run(self)
setup(
name='pyppd',
version='1.0.2',
author='Vitor Baptista',
author_email='vitor@vitorbaptista.com',
packages=['pyppd'],
package_data={'pyppd': ['*.in']},
scripts=['bin/pyppd'],
url='https://github.com/OpenPrinting/pyppd/',
license='MIT',
description='A CUPS PostScript Printer Driver\'s compressor and generator',
long_description=open('README', 'rb').read().decode('UTF-8') + "\n" +
open('ISSUES', 'rb').read().decode('UTF-8'),
cmdclass={'sdist': sdist},
classifiers=[
'Development Status :: 5 - Production/Stable',
'Intended Audience :: System Administrators',
'Operating System :: POSIX',
'License :: OSI Approved :: MIT License',
'Topic :: Printing',
],
)
|
from distutils.core import setup
from distutils.command.sdist import sdist as _sdist
class sdist(_sdist):
def run(self):
try:
import sys
sys.path.append("contrib")
import git2changes
print('generating CHANGES.txt')
with open('CHANGES.txt', 'w+') as f:
git2changes.run(f)
except ImportError:
pass
_sdist.run(self)
setup(
name='pyppd',
version='1.0.2',
author='Vitor Baptista',
author_email='vitor@vitorbaptista.com',
packages=['pyppd'],
package_data={'pyppd': ['*.in']},
scripts=['bin/pyppd'],
- url='http://github.com/vitorbaptista/pyppd/',
? ^ ^^^^^^ ^^^
+ url='https://github.com/OpenPrinting/pyppd/',
? + ^^^^^^ ^ ^^
license='MIT',
description='A CUPS PostScript Printer Driver\'s compressor and generator',
long_description=open('README', 'rb').read().decode('UTF-8') + "\n" +
open('ISSUES', 'rb').read().decode('UTF-8'),
cmdclass={'sdist': sdist},
classifiers=[
'Development Status :: 5 - Production/Stable',
'Intended Audience :: System Administrators',
'Operating System :: POSIX',
'License :: OSI Approved :: MIT License',
'Topic :: Printing',
],
) | 2 | 0.05 | 1 | 1 |
2d14befa273b08dc78470f2804cc37727f07b987 | README.md | README.md | source-code-watermark
=====================
Utility to add release number to source code files
| source-code-watermark
=====================
Utility to add release number to source code files.
Supported comment symbols and file extensions are contained inside `src/CommentSymbols.txt`.
Files are processed using the [Parallel Loop pattern link](http://msdn.microsoft.com/en-us/library/ff963552.aspx).
| Add link to the Parallel Loop pattern MSDN article | Add link to the Parallel Loop pattern MSDN article
| Markdown | mit | jdecuyper/source-code-watermark,jdecuyper/source-code-watermark | markdown | ## Code Before:
source-code-watermark
=====================
Utility to add release number to source code files
## Instruction:
Add link to the Parallel Loop pattern MSDN article
## Code After:
source-code-watermark
=====================
Utility to add release number to source code files.
Supported comment symbols and file extensions are contained inside `src/CommentSymbols.txt`.
Files are processed using the [Parallel Loop pattern link](http://msdn.microsoft.com/en-us/library/ff963552.aspx).
| source-code-watermark
=====================
- Utility to add release number to source code files
+ Utility to add release number to source code files.
? +
+
+ Supported comment symbols and file extensions are contained inside `src/CommentSymbols.txt`.
+
+ Files are processed using the [Parallel Loop pattern link](http://msdn.microsoft.com/en-us/library/ff963552.aspx).
+ | 7 | 1.75 | 6 | 1 |
c4323eb9fc82b34872c39cced0d76414f8e42722 | doc/recipes/nginx-reverse.md | doc/recipes/nginx-reverse.md | Just configure your VirtualHost as usual (or your default site), with a section `location` like this one:
```
location / {
proxy_pass http://<XOA_IP_ADDRESS[:port]>/;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
```
That's all!
| Just configure your VirtualHost as usual (or your default site), with a section `location` like this one:
```nginx
location /[<path>] {
proxy_pass http://<XOA ip address>[:<port>]/;
proxy_http_version 1.1;
proxy_set_header Connection "upgrade";
proxy_set_header Upgrade $http_upgrade;
proxy_redirect default;
}
```
That's all!
| Fix path support in nginx proxy. | Fix path support in nginx proxy.
| Markdown | agpl-3.0 | lmcro/xo-web,vatesfr/xo-web,vatesfr/xo-web,lmcro/xo-web,lmcro/xo-web | markdown | ## Code Before:
Just configure your VirtualHost as usual (or your default site), with a section `location` like this one:
```
location / {
proxy_pass http://<XOA_IP_ADDRESS[:port]>/;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
```
That's all!
## Instruction:
Fix path support in nginx proxy.
## Code After:
Just configure your VirtualHost as usual (or your default site), with a section `location` like this one:
```nginx
location /[<path>] {
proxy_pass http://<XOA ip address>[:<port>]/;
proxy_http_version 1.1;
proxy_set_header Connection "upgrade";
proxy_set_header Upgrade $http_upgrade;
proxy_redirect default;
}
```
That's all!
| Just configure your VirtualHost as usual (or your default site), with a section `location` like this one:
- ```
+ ```nginx
+ location /[<path>] {
+ proxy_pass http://<XOA ip address>[:<port>]/;
- location / {
- proxy_pass http://<XOA_IP_ADDRESS[:port]>/;
- proxy_http_version 1.1;
? --------------
+ proxy_http_version 1.1;
+ proxy_set_header Connection "upgrade";
- proxy_set_header Upgrade $http_upgrade;
? --------------
+ proxy_set_header Upgrade $http_upgrade;
- proxy_set_header Connection "upgrade";
- }
+
+ proxy_redirect default;
+ }
```
That's all! | 16 | 1.142857 | 9 | 7 |
d2f60267d0c097ad3002c10491a8cf001c3e87e9 | README.md | README.md | A repository for testing MochaJS, chai and chai-as-promises.
# Deploy
1- git clone git@github.com:facundovictor/mocha-testing.git
2- npm install -g mocha
3- npm install (for installing package devDependencies)
| A repository for testing MochaJS, chai and chai-as-promises.
# Deploy
1- git clone git@github.com:facundovictor/mocha-testing.git
2- npm install -g mocha
3- npm install (for installing package devDependencies)
# To run the tests
Just type **mocha**
| Add how to use it | Add how to use it
| Markdown | mit | facundovictor/mocha-testing | markdown | ## Code Before:
A repository for testing MochaJS, chai and chai-as-promises.
# Deploy
1- git clone git@github.com:facundovictor/mocha-testing.git
2- npm install -g mocha
3- npm install (for installing package devDependencies)
## Instruction:
Add how to use it
## Code After:
A repository for testing MochaJS, chai and chai-as-promises.
# Deploy
1- git clone git@github.com:facundovictor/mocha-testing.git
2- npm install -g mocha
3- npm install (for installing package devDependencies)
# To run the tests
Just type **mocha**
| A repository for testing MochaJS, chai and chai-as-promises.
# Deploy
1- git clone git@github.com:facundovictor/mocha-testing.git
2- npm install -g mocha
3- npm install (for installing package devDependencies)
+
+ # To run the tests
+
+ Just type **mocha** | 4 | 0.444444 | 4 | 0 |
7bf4083ef44585116f0eff86753080612a26b374 | src/__init__.py | src/__init__.py | from bayeslite.api import barplot
from bayeslite.api import cardinality
from bayeslite.api import draw_crosscat
from bayeslite.api import estimate_log_likelihood
from bayeslite.api import heatmap
from bayeslite.api import histogram
from bayeslite.api import mi_hist
from bayeslite.api import nullify
from bayeslite.api import pairplot
from bayeslite.api import plot_crosscat_chain_diagnostics
"""Main bdbcontrib API.
The bdbcontrib module servers a sandbox for experimental and semi-stable
features that are not yet ready for integreation to the bayeslite repository.
"""
__all__ = [
'barplot',
'cardinality',
'draw_crosscat',
'estimate_log_likelihood',
'heatmap',
'histogram',
'mi_hist',
'nullify',
'pairplot',
'plot_crosscat_chain_diagnostics'
] | from bdbcontrib.api import barplot
from bdbcontrib.api import cardinality
from bdbcontrib.api import draw_crosscat
from bdbcontrib.api import estimate_log_likelihood
from bdbcontrib.api import heatmap
from bdbcontrib.api import histogram
from bdbcontrib.api import mi_hist
from bdbcontrib.api import nullify
from bdbcontrib.api import pairplot
from bdbcontrib.api import plot_crosscat_chain_diagnostics
"""Main bdbcontrib API.
The bdbcontrib module servers a sandbox for experimental and semi-stable
features that are not yet ready for integreation to the bayeslite repository.
"""
__all__ = [
'barplot',
'cardinality',
'draw_crosscat',
'estimate_log_likelihood',
'heatmap',
'histogram',
'mi_hist',
'nullify',
'pairplot',
'plot_crosscat_chain_diagnostics'
] | Fix big from bayeslite to bdbcontrib. | Fix big from bayeslite to bdbcontrib.
| Python | apache-2.0 | probcomp/bdbcontrib,probcomp/bdbcontrib | python | ## Code Before:
from bayeslite.api import barplot
from bayeslite.api import cardinality
from bayeslite.api import draw_crosscat
from bayeslite.api import estimate_log_likelihood
from bayeslite.api import heatmap
from bayeslite.api import histogram
from bayeslite.api import mi_hist
from bayeslite.api import nullify
from bayeslite.api import pairplot
from bayeslite.api import plot_crosscat_chain_diagnostics
"""Main bdbcontrib API.
The bdbcontrib module servers a sandbox for experimental and semi-stable
features that are not yet ready for integreation to the bayeslite repository.
"""
__all__ = [
'barplot',
'cardinality',
'draw_crosscat',
'estimate_log_likelihood',
'heatmap',
'histogram',
'mi_hist',
'nullify',
'pairplot',
'plot_crosscat_chain_diagnostics'
]
## Instruction:
Fix big from bayeslite to bdbcontrib.
## Code After:
from bdbcontrib.api import barplot
from bdbcontrib.api import cardinality
from bdbcontrib.api import draw_crosscat
from bdbcontrib.api import estimate_log_likelihood
from bdbcontrib.api import heatmap
from bdbcontrib.api import histogram
from bdbcontrib.api import mi_hist
from bdbcontrib.api import nullify
from bdbcontrib.api import pairplot
from bdbcontrib.api import plot_crosscat_chain_diagnostics
"""Main bdbcontrib API.
The bdbcontrib module servers a sandbox for experimental and semi-stable
features that are not yet ready for integreation to the bayeslite repository.
"""
__all__ = [
'barplot',
'cardinality',
'draw_crosscat',
'estimate_log_likelihood',
'heatmap',
'histogram',
'mi_hist',
'nullify',
'pairplot',
'plot_crosscat_chain_diagnostics'
] | - from bayeslite.api import barplot
? ^^^^^ ^^
+ from bdbcontrib.api import barplot
? ^^^^^^^ ^
- from bayeslite.api import cardinality
? ^^^^^ ^^
+ from bdbcontrib.api import cardinality
? ^^^^^^^ ^
- from bayeslite.api import draw_crosscat
? ^^^^^ ^^
+ from bdbcontrib.api import draw_crosscat
? ^^^^^^^ ^
- from bayeslite.api import estimate_log_likelihood
? ^^^^^ ^^
+ from bdbcontrib.api import estimate_log_likelihood
? ^^^^^^^ ^
- from bayeslite.api import heatmap
? ^^^^^ ^^
+ from bdbcontrib.api import heatmap
? ^^^^^^^ ^
- from bayeslite.api import histogram
? ^^^^^ ^^
+ from bdbcontrib.api import histogram
? ^^^^^^^ ^
- from bayeslite.api import mi_hist
? ^^^^^ ^^
+ from bdbcontrib.api import mi_hist
? ^^^^^^^ ^
- from bayeslite.api import nullify
? ^^^^^ ^^
+ from bdbcontrib.api import nullify
? ^^^^^^^ ^
- from bayeslite.api import pairplot
? ^^^^^ ^^
+ from bdbcontrib.api import pairplot
? ^^^^^^^ ^
- from bayeslite.api import plot_crosscat_chain_diagnostics
? ^^^^^ ^^
+ from bdbcontrib.api import plot_crosscat_chain_diagnostics
? ^^^^^^^ ^
"""Main bdbcontrib API.
The bdbcontrib module servers a sandbox for experimental and semi-stable
features that are not yet ready for integreation to the bayeslite repository.
"""
__all__ = [
'barplot',
'cardinality',
'draw_crosscat',
'estimate_log_likelihood',
'heatmap',
'histogram',
'mi_hist',
'nullify',
'pairplot',
'plot_crosscat_chain_diagnostics'
] | 20 | 0.689655 | 10 | 10 |
e7be3ef7ebe3e68d33fb42a434867b6138da8a7f | lib/templates/users/createUser.html | lib/templates/users/createUser.html | <template name="umAddUser">
<!-- Temporary go back CSI - No momento nao funciona!!! -->
<button id="goBackTo_showUser" class="">Go back to User Information</button>
{{#autoForm collection=users id="createUserForm" type="method" meteormethod="createUserWithoutPassword" validation="keyup"}}
<h4>Create User</h4>
<div class="um list-group">
<div class="input-field input-with-icon list-group-item">
<i class="mdi-action-perm-identity prefix"></i>
{{> afQuickField name="profile.fullname" autocomplete="off"}}
</div>
<div class="input-field input-with-icon list-group-item">
<i class="mdi-communication-email prefix"></i>
{{> afQuickField name="emails.0.address" autocomplete="off"}}
</div>
<div class="input-field input-with-icon list-group-item">
<i class="mdi-action-perm-identity prefix"></i>
{{> afQuickField name="username" autocomplete="off"}}
</div>
<div class="list-group-item">
<input type="submit" data-bind="click: okay" class="btn btn-primary" value="create">
</div>
</div>
{{/autoForm}}
</template>
| <template name="umAddUser">
<!-- Temporary go back CSI - No momento nao funciona!!! -->
<button id="goBackTo_showUser" class="">Go back to User Information</button>
{{#autoForm collection=users id="createUserForm" type="method" meteormethod="createUserWithoutPassword" validation="keyup"}}
<h4>Create User</h4>
<div class="um list-group">
<div class="input-field input-with-icon list-group-item">
<i class="mdi-action-perm-identity prefix"></i>
{{> afQuickField name="profile.fullname" autocomplete="off"}}
</div>
<div class="input-field input-with-icon list-group-item">
<i class="mdi-communication-email prefix"></i>
{{> afQuickField name="emails.0.address" autocomplete="off"}}
</div>
<div class="input-field input-with-icon list-group-item">
<i class="mdi-action-perm-identity prefix"></i>
{{> afQuickField name="username" autocomplete="off"}}
</div>
{{#if groups}}
{{> afQuickField name="profile.groups"}}
{{/if}}
{{#each globalFields}}
{{> afQuickField name=this.name}}
{{/each}}
<div class="list-group-item">
<input type="submit" data-bind="click: okay" class="btn btn-primary" value="create">
</div>
</div>
{{/autoForm}}
</template>
| Add placeholders to Groups in AddUser Template. | Add placeholders to Groups in AddUser Template.
| HTML | mit | SoftBricks/user-management-bootstrap,SoftBricks/user-management-bootstrap | html | ## Code Before:
<template name="umAddUser">
<!-- Temporary go back CSI - No momento nao funciona!!! -->
<button id="goBackTo_showUser" class="">Go back to User Information</button>
{{#autoForm collection=users id="createUserForm" type="method" meteormethod="createUserWithoutPassword" validation="keyup"}}
<h4>Create User</h4>
<div class="um list-group">
<div class="input-field input-with-icon list-group-item">
<i class="mdi-action-perm-identity prefix"></i>
{{> afQuickField name="profile.fullname" autocomplete="off"}}
</div>
<div class="input-field input-with-icon list-group-item">
<i class="mdi-communication-email prefix"></i>
{{> afQuickField name="emails.0.address" autocomplete="off"}}
</div>
<div class="input-field input-with-icon list-group-item">
<i class="mdi-action-perm-identity prefix"></i>
{{> afQuickField name="username" autocomplete="off"}}
</div>
<div class="list-group-item">
<input type="submit" data-bind="click: okay" class="btn btn-primary" value="create">
</div>
</div>
{{/autoForm}}
</template>
## Instruction:
Add placeholders to Groups in AddUser Template.
## Code After:
<template name="umAddUser">
<!-- Temporary go back CSI - No momento nao funciona!!! -->
<button id="goBackTo_showUser" class="">Go back to User Information</button>
{{#autoForm collection=users id="createUserForm" type="method" meteormethod="createUserWithoutPassword" validation="keyup"}}
<h4>Create User</h4>
<div class="um list-group">
<div class="input-field input-with-icon list-group-item">
<i class="mdi-action-perm-identity prefix"></i>
{{> afQuickField name="profile.fullname" autocomplete="off"}}
</div>
<div class="input-field input-with-icon list-group-item">
<i class="mdi-communication-email prefix"></i>
{{> afQuickField name="emails.0.address" autocomplete="off"}}
</div>
<div class="input-field input-with-icon list-group-item">
<i class="mdi-action-perm-identity prefix"></i>
{{> afQuickField name="username" autocomplete="off"}}
</div>
{{#if groups}}
{{> afQuickField name="profile.groups"}}
{{/if}}
{{#each globalFields}}
{{> afQuickField name=this.name}}
{{/each}}
<div class="list-group-item">
<input type="submit" data-bind="click: okay" class="btn btn-primary" value="create">
</div>
</div>
{{/autoForm}}
</template>
| <template name="umAddUser">
<!-- Temporary go back CSI - No momento nao funciona!!! -->
<button id="goBackTo_showUser" class="">Go back to User Information</button>
{{#autoForm collection=users id="createUserForm" type="method" meteormethod="createUserWithoutPassword" validation="keyup"}}
<h4>Create User</h4>
<div class="um list-group">
<div class="input-field input-with-icon list-group-item">
<i class="mdi-action-perm-identity prefix"></i>
{{> afQuickField name="profile.fullname" autocomplete="off"}}
</div>
<div class="input-field input-with-icon list-group-item">
<i class="mdi-communication-email prefix"></i>
{{> afQuickField name="emails.0.address" autocomplete="off"}}
</div>
<div class="input-field input-with-icon list-group-item">
<i class="mdi-action-perm-identity prefix"></i>
{{> afQuickField name="username" autocomplete="off"}}
</div>
+ {{#if groups}}
+ {{> afQuickField name="profile.groups"}}
+ {{/if}}
+
+ {{#each globalFields}}
+ {{> afQuickField name=this.name}}
+ {{/each}}
+
<div class="list-group-item">
<input type="submit" data-bind="click: okay" class="btn btn-primary" value="create">
</div>
</div>
{{/autoForm}}
</template> | 8 | 0.266667 | 8 | 0 |
0d172e3080f768fd419f0c97f5246983797db243 | shared/server.go | shared/server.go | package shared
type ServerStateEnvironment struct {
Addresses []string `json:"addresses"`
Architectures []string `json:"architectures"`
Certificate string `json:"certificate"`
CertificateFingerprint string `json:"certificate_fingerprint"`
Driver string `json:"driver"`
DriverVersion string `json:"driver_version"`
Kernel string `json:"kernel"`
KernelArchitecture string `json:"kernel_architecture"`
KernelVersion string `json:"kernel_version"`
Server string `json:"server"`
ServerPid int `json:"server_pid"`
ServerVersion string `json:"server_version"`
Storage string `json:"storage"`
StorageVersion string `json:"storage_version"`
}
type ServerState struct {
APICompat int `json:"api_compat"`
Auth string `json:"auth"`
Environment ServerStateEnvironment `json:"environment"`
Config map[string]interface{} `json:"config"`
Public bool `json:"public"`
}
type BriefServerState struct {
Config map[string]interface{} `json:"config"`
}
func (c *ServerState) Brief() BriefServerState {
retstate := BriefServerState{Config: c.Config}
return retstate
}
| package shared
type ServerStateEnvironment struct {
Addresses []string `json:"addresses"`
Architectures []string `json:"architectures"`
Certificate string `json:"certificate"`
CertificateFingerprint string `json:"certificate_fingerprint"`
Driver string `json:"driver"`
DriverVersion string `json:"driver_version"`
Kernel string `json:"kernel"`
KernelArchitecture string `json:"kernel_architecture"`
KernelVersion string `json:"kernel_version"`
Server string `json:"server"`
ServerPid int `json:"server_pid"`
ServerVersion string `json:"server_version"`
Storage string `json:"storage"`
StorageVersion string `json:"storage_version"`
}
type ServerState struct {
APIExtensions []string `json:"api_extensions"`
APIStatus string `json:"api_status"`
APIVersion string `json:"api_version"`
Auth string `json:"auth"`
Environment ServerStateEnvironment `json:"environment"`
Config map[string]interface{} `json:"config"`
Public bool `json:"public"`
}
type BriefServerState struct {
Config map[string]interface{} `json:"config"`
}
func (c *ServerState) Brief() BriefServerState {
retstate := BriefServerState{Config: c.Config}
return retstate
}
| Fix API info reporting in "lxc info" | Fix API info reporting in "lxc info"
Signed-off-by: Stéphane Graber <089afc6d81f66f1168a9849e15660feae286e024@ubuntu.com>
| Go | apache-2.0 | ollie314/lxd,Skarlso/lxd,stgraber/lxd,lxc/lxd,stgraber/lxd,lxc/lxd,chrisglass/lxd,stgraber/lxd,stgraber/lxd,jsavikko/lxd,techtonik/lxd,georghopp/lxd,erikmack/lxd,hallyn/lxd,hallyn/lxd,lxc/lxd,atxwebs/lxd,chrisglass/lxd,lxc/lxd,pcdummy/lxd,akshaykarle/lxd,jsavikko/lxd,Skarlso/lxd,mjeanson/lxd,atxwebs/lxd,pcdummy/lxd,lxc/lxd,akshaykarle/lxd,lxc/lxd,mjeanson/lxd,chrisglass/lxd,stgraber/lxd,georghopp/lxd,Skarlso/lxd,hallyn/lxd,lxc/lxd,techtonik/lxd,pcdummy/lxd,mjeanson/lxd,hallyn/lxd,atxwebs/lxd,erikmack/lxd,georghopp/lxd,techtonik/lxd,ollie314/lxd,hallyn/lxd,stgraber/lxd,akshaykarle/lxd,stgraber/lxd,atxwebs/lxd,jsavikko/lxd,Skarlso/lxd,hallyn/lxd,ollie314/lxd,erikmack/lxd | go | ## Code Before:
package shared
type ServerStateEnvironment struct {
Addresses []string `json:"addresses"`
Architectures []string `json:"architectures"`
Certificate string `json:"certificate"`
CertificateFingerprint string `json:"certificate_fingerprint"`
Driver string `json:"driver"`
DriverVersion string `json:"driver_version"`
Kernel string `json:"kernel"`
KernelArchitecture string `json:"kernel_architecture"`
KernelVersion string `json:"kernel_version"`
Server string `json:"server"`
ServerPid int `json:"server_pid"`
ServerVersion string `json:"server_version"`
Storage string `json:"storage"`
StorageVersion string `json:"storage_version"`
}
type ServerState struct {
APICompat int `json:"api_compat"`
Auth string `json:"auth"`
Environment ServerStateEnvironment `json:"environment"`
Config map[string]interface{} `json:"config"`
Public bool `json:"public"`
}
type BriefServerState struct {
Config map[string]interface{} `json:"config"`
}
func (c *ServerState) Brief() BriefServerState {
retstate := BriefServerState{Config: c.Config}
return retstate
}
## Instruction:
Fix API info reporting in "lxc info"
Signed-off-by: Stéphane Graber <089afc6d81f66f1168a9849e15660feae286e024@ubuntu.com>
## Code After:
package shared
type ServerStateEnvironment struct {
Addresses []string `json:"addresses"`
Architectures []string `json:"architectures"`
Certificate string `json:"certificate"`
CertificateFingerprint string `json:"certificate_fingerprint"`
Driver string `json:"driver"`
DriverVersion string `json:"driver_version"`
Kernel string `json:"kernel"`
KernelArchitecture string `json:"kernel_architecture"`
KernelVersion string `json:"kernel_version"`
Server string `json:"server"`
ServerPid int `json:"server_pid"`
ServerVersion string `json:"server_version"`
Storage string `json:"storage"`
StorageVersion string `json:"storage_version"`
}
type ServerState struct {
APIExtensions []string `json:"api_extensions"`
APIStatus string `json:"api_status"`
APIVersion string `json:"api_version"`
Auth string `json:"auth"`
Environment ServerStateEnvironment `json:"environment"`
Config map[string]interface{} `json:"config"`
Public bool `json:"public"`
}
type BriefServerState struct {
Config map[string]interface{} `json:"config"`
}
func (c *ServerState) Brief() BriefServerState {
retstate := BriefServerState{Config: c.Config}
return retstate
}
| package shared
type ServerStateEnvironment struct {
Addresses []string `json:"addresses"`
Architectures []string `json:"architectures"`
Certificate string `json:"certificate"`
CertificateFingerprint string `json:"certificate_fingerprint"`
Driver string `json:"driver"`
DriverVersion string `json:"driver_version"`
Kernel string `json:"kernel"`
KernelArchitecture string `json:"kernel_architecture"`
KernelVersion string `json:"kernel_version"`
Server string `json:"server"`
ServerPid int `json:"server_pid"`
ServerVersion string `json:"server_version"`
Storage string `json:"storage"`
StorageVersion string `json:"storage_version"`
}
type ServerState struct {
+ APIExtensions []string `json:"api_extensions"`
- APICompat int `json:"api_compat"`
? ^^^^ ^^^^ ^^^^
+ APIStatus string `json:"api_status"`
? ^^ ++ +++++ ^ ^^ ++
+ APIVersion string `json:"api_version"`
- Auth string `json:"auth"`
+ Auth string `json:"auth"`
? ++
- Environment ServerStateEnvironment `json:"environment"`
+ Environment ServerStateEnvironment `json:"environment"`
? ++
- Config map[string]interface{} `json:"config"`
+ Config map[string]interface{} `json:"config"`
? ++
- Public bool `json:"public"`
+ Public bool `json:"public"`
? ++
}
type BriefServerState struct {
Config map[string]interface{} `json:"config"`
}
func (c *ServerState) Brief() BriefServerState {
retstate := BriefServerState{Config: c.Config}
return retstate
} | 12 | 0.342857 | 7 | 5 |
dda24383dd8b808d5498e28ec8826e2f9e1ffe08 | .travis.yml | .travis.yml | sudo: false
cache: bundler
language: ruby
before_script:
- 'echo ''gem: --no-ri --no-rdoc'' > ~/.gemrc' # skip installing docs for gems
before_install:
- gem install bundler -v="1.8.0" # Minimum version of bundler required
bundler_args: --without development
script: 'bundle exec rake test'
services:
- mongodb
- redis-server
rvm:
- 1.9.3
- 2.0.0
- 2.1.0
- 2.2.0
- jruby-19mode
env:
- DB=mongodb
- DB=redis
- DB=active_record
gemfile:
- gemfiles/rails32.gemfile
- gemfiles/rails4.gemfile
- gemfiles/rails41.gemfile
- gemfiles/rails42.gemfile
- gemfiles/rails42_protected_attributes.gemfile
| sudo: false
cache: bundler
language: ruby
before_script:
- 'echo ''gem: --no-ri --no-rdoc'' > ~/.gemrc' # skip installing docs for gems
before_install:
- gem install bundler -v="1.8.0" # Minimum version of bundler required
bundler_args: --without development
script: 'bundle exec rake test'
services:
- mongodb
- redis-server
rvm:
- 2.0.0
- 2.1.0
- 2.2.0
- jruby-19mode
env:
- DB=mongodb
- DB=redis
- DB=active_record
gemfile:
- gemfiles/rails32.gemfile
- gemfiles/rails4.gemfile
- gemfiles/rails41.gemfile
- gemfiles/rails42.gemfile
- gemfiles/rails42_protected_attributes.gemfile
| Remove testing support for ruby 1.9.3. | Remove testing support for ruby 1.9.3.
Reached end of life on February 23, 2015. Vanity shouldn't run on
Ruby versions that don't receive security patches.
See:
https://www.ruby-lang.org/en/news/2014/01/10/ruby-1-9-3-will-end-on-2015/
| YAML | mit | assaf/vanity,Futurelearn/vanity,assaf/vanity,HealthyDelivery/vanity,peterkovacs/vanity,HealthyDelivery/vanity,Futurelearn/vanity,peterkovacs/vanity,assaf/vanity,peterkovacs/vanity,Futurelearn/vanity,HealthyDelivery/vanity | yaml | ## Code Before:
sudo: false
cache: bundler
language: ruby
before_script:
- 'echo ''gem: --no-ri --no-rdoc'' > ~/.gemrc' # skip installing docs for gems
before_install:
- gem install bundler -v="1.8.0" # Minimum version of bundler required
bundler_args: --without development
script: 'bundle exec rake test'
services:
- mongodb
- redis-server
rvm:
- 1.9.3
- 2.0.0
- 2.1.0
- 2.2.0
- jruby-19mode
env:
- DB=mongodb
- DB=redis
- DB=active_record
gemfile:
- gemfiles/rails32.gemfile
- gemfiles/rails4.gemfile
- gemfiles/rails41.gemfile
- gemfiles/rails42.gemfile
- gemfiles/rails42_protected_attributes.gemfile
## Instruction:
Remove testing support for ruby 1.9.3.
Reached end of life on February 23, 2015. Vanity shouldn't run on
Ruby versions that don't receive security patches.
See:
https://www.ruby-lang.org/en/news/2014/01/10/ruby-1-9-3-will-end-on-2015/
## Code After:
sudo: false
cache: bundler
language: ruby
before_script:
- 'echo ''gem: --no-ri --no-rdoc'' > ~/.gemrc' # skip installing docs for gems
before_install:
- gem install bundler -v="1.8.0" # Minimum version of bundler required
bundler_args: --without development
script: 'bundle exec rake test'
services:
- mongodb
- redis-server
rvm:
- 2.0.0
- 2.1.0
- 2.2.0
- jruby-19mode
env:
- DB=mongodb
- DB=redis
- DB=active_record
gemfile:
- gemfiles/rails32.gemfile
- gemfiles/rails4.gemfile
- gemfiles/rails41.gemfile
- gemfiles/rails42.gemfile
- gemfiles/rails42_protected_attributes.gemfile
| sudo: false
cache: bundler
language: ruby
before_script:
- 'echo ''gem: --no-ri --no-rdoc'' > ~/.gemrc' # skip installing docs for gems
before_install:
- gem install bundler -v="1.8.0" # Minimum version of bundler required
bundler_args: --without development
script: 'bundle exec rake test'
services:
- mongodb
- redis-server
rvm:
- - 1.9.3
- 2.0.0
- 2.1.0
- 2.2.0
- jruby-19mode
env:
- DB=mongodb
- DB=redis
- DB=active_record
gemfile:
- gemfiles/rails32.gemfile
- gemfiles/rails4.gemfile
- gemfiles/rails41.gemfile
- gemfiles/rails42.gemfile
- gemfiles/rails42_protected_attributes.gemfile | 1 | 0.035714 | 0 | 1 |
8cdb269f37fd4217761ea54d0f52e3d9f0429cd9 | lib/on_the_spot/controller_extension.rb | lib/on_the_spot/controller_extension.rb | module OnTheSpot
module ControllerExtension
def self.included(base)
base.extend ClassMethods
end
# if this method is called inside a controller, the edit-on-the-spot
# controller action is added that will allow to edit fields in place
module ClassMethods
def can_edit_on_the_spot
define_method :update_attribute_on_the_spot do
klass, field, id = params[:id].split('__')
select_data = params[:select_array]
object = klass.camelize.constantize.find(id)
if object.update_attributes(field => params[:value])
if select_data.nil?
render :text => CGI::escapeHTML(object.send(field).to_s)
else
parsed_data = JSON.parse(select_data.gsub("'", '"'))
render :text => parsed_data[object.send(field).to_s]
end
else
render :text => object.errors.full_messages.join("\n"), :status => 422
end
end
end
end
end
end | module OnTheSpot
module ControllerExtension
def self.included(base)
base.extend ClassMethods
end
# if this method is called inside a controller, the edit-on-the-spot
# controller action is added that will allow to edit fields in place
module ClassMethods
def can_edit_on_the_spot(check_acces_method=nil)
define_method :update_attribute_on_the_spot do
klass, field, id = params[:id].split('__')
select_data = params[:select_array]
object = klass.camelize.constantize.find(id)
is_allowed = check_acces_method.present? ? self.send(check_acces_method, object, field) : true
if is_allowed
if object.update_attributes(field => params[:value])
if select_data.nil?
render :text => CGI::escapeHTML(object.send(field).to_s)
else
parsed_data = JSON.parse(select_data.gsub("'", '"'))
render :text => parsed_data[object.send(field).to_s]
end
else
render :text => object.errors.full_messages.join("\n"), :status => 422
end
else
render :text => "Acces is not allowed", :status => 422
end
end
end
end
end
end | Add an optional method to allow checking if access is allowed. | Add an optional method to allow checking if access is allowed. | Ruby | mit | nathanvda/on_the_spot,nathanvda/on_the_spot,nathanvda/on_the_spot | ruby | ## Code Before:
module OnTheSpot
module ControllerExtension
def self.included(base)
base.extend ClassMethods
end
# if this method is called inside a controller, the edit-on-the-spot
# controller action is added that will allow to edit fields in place
module ClassMethods
def can_edit_on_the_spot
define_method :update_attribute_on_the_spot do
klass, field, id = params[:id].split('__')
select_data = params[:select_array]
object = klass.camelize.constantize.find(id)
if object.update_attributes(field => params[:value])
if select_data.nil?
render :text => CGI::escapeHTML(object.send(field).to_s)
else
parsed_data = JSON.parse(select_data.gsub("'", '"'))
render :text => parsed_data[object.send(field).to_s]
end
else
render :text => object.errors.full_messages.join("\n"), :status => 422
end
end
end
end
end
end
## Instruction:
Add an optional method to allow checking if access is allowed.
## Code After:
module OnTheSpot
module ControllerExtension
def self.included(base)
base.extend ClassMethods
end
# if this method is called inside a controller, the edit-on-the-spot
# controller action is added that will allow to edit fields in place
module ClassMethods
def can_edit_on_the_spot(check_acces_method=nil)
define_method :update_attribute_on_the_spot do
klass, field, id = params[:id].split('__')
select_data = params[:select_array]
object = klass.camelize.constantize.find(id)
is_allowed = check_acces_method.present? ? self.send(check_acces_method, object, field) : true
if is_allowed
if object.update_attributes(field => params[:value])
if select_data.nil?
render :text => CGI::escapeHTML(object.send(field).to_s)
else
parsed_data = JSON.parse(select_data.gsub("'", '"'))
render :text => parsed_data[object.send(field).to_s]
end
else
render :text => object.errors.full_messages.join("\n"), :status => 422
end
else
render :text => "Acces is not allowed", :status => 422
end
end
end
end
end
end | module OnTheSpot
module ControllerExtension
def self.included(base)
base.extend ClassMethods
end
# if this method is called inside a controller, the edit-on-the-spot
# controller action is added that will allow to edit fields in place
module ClassMethods
- def can_edit_on_the_spot
+ def can_edit_on_the_spot(check_acces_method=nil)
define_method :update_attribute_on_the_spot do
klass, field, id = params[:id].split('__')
select_data = params[:select_array]
object = klass.camelize.constantize.find(id)
+
+ is_allowed = check_acces_method.present? ? self.send(check_acces_method, object, field) : true
+
+ if is_allowed
- if object.update_attributes(field => params[:value])
+ if object.update_attributes(field => params[:value])
? ++
- if select_data.nil?
+ if select_data.nil?
? ++
- render :text => CGI::escapeHTML(object.send(field).to_s)
+ render :text => CGI::escapeHTML(object.send(field).to_s)
? ++
+ else
+ parsed_data = JSON.parse(select_data.gsub("'", '"'))
+ render :text => parsed_data[object.send(field).to_s]
+ end
else
+ render :text => object.errors.full_messages.join("\n"), :status => 422
- parsed_data = JSON.parse(select_data.gsub("'", '"'))
- render :text => parsed_data[object.send(field).to_s]
end
else
- render :text => object.errors.full_messages.join("\n"), :status => 422
+ render :text => "Acces is not allowed", :status => 422
end
end
end
end
end
end | 21 | 0.677419 | 14 | 7 |
3b53b0fd26aadff170c5335fc4d8e71637d90df8 | Casks/macpaw-gemini.rb | Casks/macpaw-gemini.rb | cask 'macpaw-gemini' do
version '1.5.14,1448360907'
sha256 '07779ae4175a18c821bed55ab2776e403f8c50e0a94d3b44e5dae4552aa9753e'
# devmate.com/com.macpaw.site.Gemini was verified as official when first introduced to the cask
url "https://dl.devmate.com/com.macpaw.site.Gemini/#{version.before_comma}/#{version.after_comma}/MacPawGemini-#{version.before_comma}.zip"
appcast 'https://updates.devmate.com/com.macpaw.site.Gemini.xml',
checkpoint: 'c5e98cb5ad6b531a34850e48b6cb29611cd504e6ee3c7d970cf651c6fe571baf'
name 'MacPaw Gemini'
homepage 'https://macpaw.com/gemini'
license :commercial
app 'MacPaw Gemini.app'
zap delete: [
'~/Library/Application Support/MacPaw Gemini',
'~/Library/Caches/com.macpaw.site.Gemini',
'~/Library/Preferences/com.macpaw.site.Gemini.plist',
'~/Library/Saved Application State/com.macpaw.site.Gemini.savedState',
]
end
| cask 'macpaw-gemini' do
version '1.5.15,1458054655'
sha256 '187498bfc83cc8ff84c604ba52e1a28f564156e6d7a686870f1ae938ebeb4da9'
# devmate.com/com.macpaw.site.Gemini was verified as official when first introduced to the cask
url "https://dl.devmate.com/com.macpaw.site.Gemini/#{version.before_comma}/#{version.after_comma}/MacPawGemini-#{version.before_comma}.zip"
appcast 'https://updates.devmate.com/com.macpaw.site.Gemini.xml',
checkpoint: '3de2c7b377fb8684e7038c330fa4dd3ba2bb2119a458e33834f57dcb9f32c3bf'
name 'MacPaw Gemini'
homepage 'https://macpaw.com/gemini'
license :commercial
app 'MacPaw Gemini.app'
zap delete: [
'~/Library/Application Support/MacPaw Gemini',
'~/Library/Caches/com.macpaw.site.Gemini',
'~/Library/Preferences/com.macpaw.site.Gemini.plist',
'~/Library/Saved Application State/com.macpaw.site.Gemini.savedState',
]
end
| Upgrade Macpaw Gemini to v1.5.15 | Upgrade Macpaw Gemini to v1.5.15
| Ruby | bsd-2-clause | ptb/homebrew-cask,tan9/homebrew-cask,aguynamedryan/homebrew-cask,ebraminio/homebrew-cask,leipert/homebrew-cask,mjgardner/homebrew-cask,malford/homebrew-cask,thomanq/homebrew-cask,mjgardner/homebrew-cask,hristozov/homebrew-cask,gmkey/homebrew-cask,sgnh/homebrew-cask,Amorymeltzer/homebrew-cask,gabrielizaias/homebrew-cask,shorshe/homebrew-cask,victorpopkov/homebrew-cask,diguage/homebrew-cask,JosephViolago/homebrew-cask,vitorgalvao/homebrew-cask,jaredsampson/homebrew-cask,deiga/homebrew-cask,tolbkni/homebrew-cask,ericbn/homebrew-cask,tjt263/homebrew-cask,imgarylai/homebrew-cask,jmeridth/homebrew-cask,tedski/homebrew-cask,yurikoles/homebrew-cask,theoriginalgri/homebrew-cask,inz/homebrew-cask,mahori/homebrew-cask,FinalDes/homebrew-cask,vin047/homebrew-cask,thehunmonkgroup/homebrew-cask,jellyfishcoder/homebrew-cask,diguage/homebrew-cask,BenjaminHCCarr/homebrew-cask,miccal/homebrew-cask,stigkj/homebrew-caskroom-cask,wickedsp1d3r/homebrew-cask,mchlrmrz/homebrew-cask,mahori/homebrew-cask,a1russell/homebrew-cask,sanchezm/homebrew-cask,wickles/homebrew-cask,Amorymeltzer/homebrew-cask,schneidmaster/homebrew-cask,opsdev-ws/homebrew-cask,sanyer/homebrew-cask,FredLackeyOfficial/homebrew-cask,koenrh/homebrew-cask,mrmachine/homebrew-cask,ninjahoahong/homebrew-cask,cliffcotino/homebrew-cask,reitermarkus/homebrew-cask,yutarody/homebrew-cask,moimikey/homebrew-cask,optikfluffel/homebrew-cask,mathbunnyru/homebrew-cask,stonehippo/homebrew-cask,Bombenleger/homebrew-cask,rajiv/homebrew-cask,13k/homebrew-cask,patresi/homebrew-cask,xakraz/homebrew-cask,chuanxd/homebrew-cask,janlugt/homebrew-cask,doits/homebrew-cask,bric3/homebrew-cask,jeroenj/homebrew-cask,uetchy/homebrew-cask,hristozov/homebrew-cask,kingthorin/homebrew-cask,tan9/homebrew-cask,xight/homebrew-cask,cliffcotino/homebrew-cask,tolbkni/homebrew-cask,samdoran/homebrew-cask,MircoT/homebrew-cask,seanorama/homebrew-cask,guerrero/homebrew-cask,nathancahill/homebrew-cask,nrlquaker/homebrew-cask,jacobbednarz/homebrew-cask,blainesch/homebrew-cask,0rax/homebrew-cask,a1russell/homebrew-cask,JikkuJose/homebrew-cask,muan/homebrew-cask,mathbunnyru/homebrew-cask,BenjaminHCCarr/homebrew-cask,squid314/homebrew-cask,JosephViolago/homebrew-cask,jalaziz/homebrew-cask,0rax/homebrew-cask,neverfox/homebrew-cask,hovancik/homebrew-cask,colindunn/homebrew-cask,farmerchris/homebrew-cask,danielbayley/homebrew-cask,gyndav/homebrew-cask,alexg0/homebrew-cask,moogar0880/homebrew-cask,wastrachan/homebrew-cask,stephenwade/homebrew-cask,KosherBacon/homebrew-cask,AnastasiaSulyagina/homebrew-cask,elnappo/homebrew-cask,chadcatlett/caskroom-homebrew-cask,renaudguerin/homebrew-cask,forevergenin/homebrew-cask,deanmorin/homebrew-cask,mattrobenolt/homebrew-cask,johndbritton/homebrew-cask,BenjaminHCCarr/homebrew-cask,fharbe/homebrew-cask,asins/homebrew-cask,renard/homebrew-cask,tyage/homebrew-cask,alebcay/homebrew-cask,jawshooah/homebrew-cask,MoOx/homebrew-cask,athrunsun/homebrew-cask,jconley/homebrew-cask,stonehippo/homebrew-cask,deiga/homebrew-cask,jellyfishcoder/homebrew-cask,doits/homebrew-cask,alebcay/homebrew-cask,dcondrey/homebrew-cask,wmorin/homebrew-cask,n0ts/homebrew-cask,jedahan/homebrew-cask,jalaziz/homebrew-cask,jiashuw/homebrew-cask,cfillion/homebrew-cask,usami-k/homebrew-cask,johnjelinek/homebrew-cask,lantrix/homebrew-cask,mahori/homebrew-cask,flaviocamilo/homebrew-cask,Ephemera/homebrew-cask,dictcp/homebrew-cask,Cottser/homebrew-cask,amatos/homebrew-cask,amatos/homebrew-cask,riyad/homebrew-cask,mhubig/homebrew-cask,Ketouem/homebrew-cask,cprecioso/homebrew-cask,Bombenleger/homebrew-cask,paour/homebrew-cask,markhuber/homebrew-cask,winkelsdorf/homebrew-cask,inz/homebrew-cask,troyxmccall/homebrew-cask,samshadwell/homebrew-cask,mazehall/homebrew-cask,Saklad5/homebrew-cask,syscrusher/homebrew-cask,skatsuta/homebrew-cask,mattrobenolt/homebrew-cask,markthetech/homebrew-cask,toonetown/homebrew-cask,scottsuch/homebrew-cask,m3nu/homebrew-cask,FredLackeyOfficial/homebrew-cask,boecko/homebrew-cask,vitorgalvao/homebrew-cask,shoichiaizawa/homebrew-cask,puffdad/homebrew-cask,0xadada/homebrew-cask,joshka/homebrew-cask,phpwutz/homebrew-cask,rajiv/homebrew-cask,moogar0880/homebrew-cask,scribblemaniac/homebrew-cask,sanchezm/homebrew-cask,andrewdisley/homebrew-cask,thii/homebrew-cask,syscrusher/homebrew-cask,julionc/homebrew-cask,riyad/homebrew-cask,kTitan/homebrew-cask,ksylvan/homebrew-cask,tedski/homebrew-cask,stonehippo/homebrew-cask,mwean/homebrew-cask,michelegera/homebrew-cask,psibre/homebrew-cask,phpwutz/homebrew-cask,yurikoles/homebrew-cask,coeligena/homebrew-customized,cprecioso/homebrew-cask,ywfwj2008/homebrew-cask,sjackman/homebrew-cask,jalaziz/homebrew-cask,jgarber623/homebrew-cask,blogabe/homebrew-cask,elnappo/homebrew-cask,FranklinChen/homebrew-cask,MoOx/homebrew-cask,lumaxis/homebrew-cask,dvdoliveira/homebrew-cask,artdevjs/homebrew-cask,jconley/homebrew-cask,FranklinChen/homebrew-cask,FinalDes/homebrew-cask,cblecker/homebrew-cask,Labutin/homebrew-cask,hyuna917/homebrew-cask,reelsense/homebrew-cask,forevergenin/homebrew-cask,cobyism/homebrew-cask,cblecker/homebrew-cask,andrewdisley/homebrew-cask,inta/homebrew-cask,chrisfinazzo/homebrew-cask,Ephemera/homebrew-cask,coeligena/homebrew-customized,jaredsampson/homebrew-cask,lucasmezencio/homebrew-cask,winkelsdorf/homebrew-cask,kassi/homebrew-cask,josa42/homebrew-cask,flaviocamilo/homebrew-cask,nshemonsky/homebrew-cask,Gasol/homebrew-cask,arronmabrey/homebrew-cask,wmorin/homebrew-cask,mchlrmrz/homebrew-cask,kongslund/homebrew-cask,gerrypower/homebrew-cask,kpearson/homebrew-cask,janlugt/homebrew-cask,uetchy/homebrew-cask,rogeriopradoj/homebrew-cask,hanxue/caskroom,zerrot/homebrew-cask,julionc/homebrew-cask,MircoT/homebrew-cask,optikfluffel/homebrew-cask,sscotth/homebrew-cask,sjackman/homebrew-cask,afh/homebrew-cask,stigkj/homebrew-caskroom-cask,ksato9700/homebrew-cask,patresi/homebrew-cask,howie/homebrew-cask,elyscape/homebrew-cask,gyndav/homebrew-cask,sanyer/homebrew-cask,markhuber/homebrew-cask,franklouwers/homebrew-cask,wKovacs64/homebrew-cask,wickedsp1d3r/homebrew-cask,joschi/homebrew-cask,mjdescy/homebrew-cask,AnastasiaSulyagina/homebrew-cask,nathanielvarona/homebrew-cask,mauricerkelly/homebrew-cask,samdoran/homebrew-cask,andyli/homebrew-cask,malob/homebrew-cask,hellosky806/homebrew-cask,reelsense/homebrew-cask,timsutton/homebrew-cask,My2ndAngelic/homebrew-cask,malob/homebrew-cask,Gasol/homebrew-cask,troyxmccall/homebrew-cask,kronicd/homebrew-cask,lucasmezencio/homebrew-cask,andrewdisley/homebrew-cask,kTitan/homebrew-cask,esebastian/homebrew-cask,devmynd/homebrew-cask,greg5green/homebrew-cask,ywfwj2008/homebrew-cask,imgarylai/homebrew-cask,lukasbestle/homebrew-cask,zmwangx/homebrew-cask,josa42/homebrew-cask,bosr/homebrew-cask,optikfluffel/homebrew-cask,xtian/homebrew-cask,jacobbednarz/homebrew-cask,lifepillar/homebrew-cask,kingthorin/homebrew-cask,caskroom/homebrew-cask,sohtsuka/homebrew-cask,colindean/homebrew-cask,RJHsiao/homebrew-cask,KosherBacon/homebrew-cask,asins/homebrew-cask,m3nu/homebrew-cask,rogeriopradoj/homebrew-cask,renaudguerin/homebrew-cask,mhubig/homebrew-cask,retrography/homebrew-cask,scribblemaniac/homebrew-cask,hyuna917/homebrew-cask,Amorymeltzer/homebrew-cask,scribblemaniac/homebrew-cask,mjdescy/homebrew-cask,alexg0/homebrew-cask,jpmat296/homebrew-cask,sosedoff/homebrew-cask,vigosan/homebrew-cask,skatsuta/homebrew-cask,sebcode/homebrew-cask,pacav69/homebrew-cask,vin047/homebrew-cask,kongslund/homebrew-cask,diogodamiani/homebrew-cask,hellosky806/homebrew-cask,antogg/homebrew-cask,exherb/homebrew-cask,13k/homebrew-cask,hakamadare/homebrew-cask,claui/homebrew-cask,antogg/homebrew-cask,tsparber/homebrew-cask,Keloran/homebrew-cask,fharbe/homebrew-cask,lukasbestle/homebrew-cask,morganestes/homebrew-cask,gyndav/homebrew-cask,mishari/homebrew-cask,psibre/homebrew-cask,ksylvan/homebrew-cask,coeligena/homebrew-customized,fanquake/homebrew-cask,chuanxd/homebrew-cask,MerelyAPseudonym/homebrew-cask,deanmorin/homebrew-cask,colindean/homebrew-cask,jgarber623/homebrew-cask,JosephViolago/homebrew-cask,boecko/homebrew-cask,howie/homebrew-cask,yutarody/homebrew-cask,hanxue/caskroom,slack4u/homebrew-cask,samshadwell/homebrew-cask,shonjir/homebrew-cask,haha1903/homebrew-cask,johndbritton/homebrew-cask,xyb/homebrew-cask,bdhess/homebrew-cask,Ketouem/homebrew-cask,okket/homebrew-cask,tsparber/homebrew-cask,timsutton/homebrew-cask,ericbn/homebrew-cask,Cottser/homebrew-cask,ericbn/homebrew-cask,thii/homebrew-cask,kamilboratynski/homebrew-cask,mlocher/homebrew-cask,sgnh/homebrew-cask,asbachb/homebrew-cask,hanxue/caskroom,dictcp/homebrew-cask,uetchy/homebrew-cask,joshka/homebrew-cask,inta/homebrew-cask,singingwolfboy/homebrew-cask,muan/homebrew-cask,JacopKane/homebrew-cask,opsdev-ws/homebrew-cask,koenrh/homebrew-cask,JikkuJose/homebrew-cask,wastrachan/homebrew-cask,klane/homebrew-cask,artdevjs/homebrew-cask,kamilboratynski/homebrew-cask,onlynone/homebrew-cask,decrement/homebrew-cask,schneidmaster/homebrew-cask,alexg0/homebrew-cask,kronicd/homebrew-cask,jeanregisser/homebrew-cask,chrisfinazzo/homebrew-cask,shoichiaizawa/homebrew-cask,sanyer/homebrew-cask,blogabe/homebrew-cask,feigaochn/homebrew-cask,blogabe/homebrew-cask,reitermarkus/homebrew-cask,Ephemera/homebrew-cask,bric3/homebrew-cask,stephenwade/homebrew-cask,mauricerkelly/homebrew-cask,JacopKane/homebrew-cask,joshka/homebrew-cask,n8henrie/homebrew-cask,claui/homebrew-cask,seanzxx/homebrew-cask,Saklad5/homebrew-cask,franklouwers/homebrew-cask,giannitm/homebrew-cask,caskroom/homebrew-cask,mjgardner/homebrew-cask,mchlrmrz/homebrew-cask,gerrypower/homebrew-cask,y00rb/homebrew-cask,tjnycum/homebrew-cask,kesara/homebrew-cask,joschi/homebrew-cask,timsutton/homebrew-cask,cfillion/homebrew-cask,hovancik/homebrew-cask,m3nu/homebrew-cask,sohtsuka/homebrew-cask,neverfox/homebrew-cask,toonetown/homebrew-cask,pkq/homebrew-cask,chadcatlett/caskroom-homebrew-cask,farmerchris/homebrew-cask,afh/homebrew-cask,JacopKane/homebrew-cask,arronmabrey/homebrew-cask,anbotero/homebrew-cask,Keloran/homebrew-cask,decrement/homebrew-cask,nrlquaker/homebrew-cask,dcondrey/homebrew-cask,chrisfinazzo/homebrew-cask,RJHsiao/homebrew-cask,SentinelWarren/homebrew-cask,Ngrd/homebrew-cask,kassi/homebrew-cask,nathanielvarona/homebrew-cask,klane/homebrew-cask,zmwangx/homebrew-cask,feigaochn/homebrew-cask,zerrot/homebrew-cask,sebcode/homebrew-cask,wmorin/homebrew-cask,jiashuw/homebrew-cask,mathbunnyru/homebrew-cask,lifepillar/homebrew-cask,usami-k/homebrew-cask,jasmas/homebrew-cask,hakamadare/homebrew-cask,goxberry/homebrew-cask,mishari/homebrew-cask,MichaelPei/homebrew-cask,robertgzr/homebrew-cask,mrmachine/homebrew-cask,guerrero/homebrew-cask,michelegera/homebrew-cask,retrography/homebrew-cask,n8henrie/homebrew-cask,kkdd/homebrew-cask,lumaxis/homebrew-cask,larseggert/homebrew-cask,xight/homebrew-cask,singingwolfboy/homebrew-cask,cblecker/homebrew-cask,vigosan/homebrew-cask,malford/homebrew-cask,sosedoff/homebrew-cask,giannitm/homebrew-cask,nrlquaker/homebrew-cask,claui/homebrew-cask,jedahan/homebrew-cask,nshemonsky/homebrew-cask,kesara/homebrew-cask,rajiv/homebrew-cask,mikem/homebrew-cask,thehunmonkgroup/homebrew-cask,colindunn/homebrew-cask,sscotth/homebrew-cask,tyage/homebrew-cask,haha1903/homebrew-cask,danielbayley/homebrew-cask,daften/homebrew-cask,kingthorin/homebrew-cask,tjnycum/homebrew-cask,seanorama/homebrew-cask,puffdad/homebrew-cask,scottsuch/homebrew-cask,0xadada/homebrew-cask,shonjir/homebrew-cask,danielbayley/homebrew-cask,theoriginalgri/homebrew-cask,daften/homebrew-cask,winkelsdorf/homebrew-cask,cobyism/homebrew-cask,y00rb/homebrew-cask,imgarylai/homebrew-cask,athrunsun/homebrew-cask,malob/homebrew-cask,jmeridth/homebrew-cask,mikem/homebrew-cask,pkq/homebrew-cask,larseggert/homebrew-cask,renard/homebrew-cask,aguynamedryan/homebrew-cask,maxnordlund/homebrew-cask,maxnordlund/homebrew-cask,leipert/homebrew-cask,xakraz/homebrew-cask,jangalinski/homebrew-cask,thomanq/homebrew-cask,shonjir/homebrew-cask,onlynone/homebrew-cask,shoichiaizawa/homebrew-cask,mlocher/homebrew-cask,yumitsu/homebrew-cask,yutarody/homebrew-cask,MichaelPei/homebrew-cask,xcezx/homebrew-cask,julionc/homebrew-cask,ebraminio/homebrew-cask,SentinelWarren/homebrew-cask,shorshe/homebrew-cask,xtian/homebrew-cask,esebastian/homebrew-cask,bdhess/homebrew-cask,adrianchia/homebrew-cask,n0ts/homebrew-cask,mwean/homebrew-cask,jeanregisser/homebrew-cask,joschi/homebrew-cask,fanquake/homebrew-cask,seanzxx/homebrew-cask,moimikey/homebrew-cask,dvdoliveira/homebrew-cask,xcezx/homebrew-cask,jbeagley52/homebrew-cask,lantrix/homebrew-cask,tangestani/homebrew-cask,diogodamiani/homebrew-cask,goxberry/homebrew-cask,deiga/homebrew-cask,dictcp/homebrew-cask,reitermarkus/homebrew-cask,greg5green/homebrew-cask,tjt263/homebrew-cask,jasmas/homebrew-cask,ninjahoahong/homebrew-cask,miccal/homebrew-cask,rogeriopradoj/homebrew-cask,slack4u/homebrew-cask,squid314/homebrew-cask,samnung/homebrew-cask,blainesch/homebrew-cask,devmynd/homebrew-cask,singingwolfboy/homebrew-cask,kkdd/homebrew-cask,tjnycum/homebrew-cask,tangestani/homebrew-cask,jeroenj/homebrew-cask,paour/homebrew-cask,victorpopkov/homebrew-cask,paour/homebrew-cask,okket/homebrew-cask,josa42/homebrew-cask,samnung/homebrew-cask,asbachb/homebrew-cask,perfide/homebrew-cask,bosr/homebrew-cask,yuhki50/homebrew-cask,MerelyAPseudonym/homebrew-cask,xyb/homebrew-cask,perfide/homebrew-cask,gilesdring/homebrew-cask,cobyism/homebrew-cask,esebastian/homebrew-cask,neverfox/homebrew-cask,gilesdring/homebrew-cask,sscotth/homebrew-cask,elyscape/homebrew-cask,alebcay/homebrew-cask,xyb/homebrew-cask,wickles/homebrew-cask,nathancahill/homebrew-cask,nathanielvarona/homebrew-cask,miccal/homebrew-cask,Ngrd/homebrew-cask,yuhki50/homebrew-cask,kpearson/homebrew-cask,pacav69/homebrew-cask,anbotero/homebrew-cask,wKovacs64/homebrew-cask,ksato9700/homebrew-cask,andyli/homebrew-cask,adrianchia/homebrew-cask,gabrielizaias/homebrew-cask,exherb/homebrew-cask,gmkey/homebrew-cask,moimikey/homebrew-cask,xight/homebrew-cask,ptb/homebrew-cask,jgarber623/homebrew-cask,kesara/homebrew-cask,pkq/homebrew-cask,ianyh/homebrew-cask,a1russell/homebrew-cask,scottsuch/homebrew-cask,yurikoles/homebrew-cask,jpmat296/homebrew-cask,bric3/homebrew-cask,Labutin/homebrew-cask,My2ndAngelic/homebrew-cask,stephenwade/homebrew-cask,jangalinski/homebrew-cask,markthetech/homebrew-cask,ianyh/homebrew-cask,adrianchia/homebrew-cask,antogg/homebrew-cask,johnjelinek/homebrew-cask,yumitsu/homebrew-cask,robertgzr/homebrew-cask,jawshooah/homebrew-cask,mazehall/homebrew-cask,tangestani/homebrew-cask,morganestes/homebrew-cask,jbeagley52/homebrew-cask,mattrobenolt/homebrew-cask | ruby | ## Code Before:
cask 'macpaw-gemini' do
version '1.5.14,1448360907'
sha256 '07779ae4175a18c821bed55ab2776e403f8c50e0a94d3b44e5dae4552aa9753e'
# devmate.com/com.macpaw.site.Gemini was verified as official when first introduced to the cask
url "https://dl.devmate.com/com.macpaw.site.Gemini/#{version.before_comma}/#{version.after_comma}/MacPawGemini-#{version.before_comma}.zip"
appcast 'https://updates.devmate.com/com.macpaw.site.Gemini.xml',
checkpoint: 'c5e98cb5ad6b531a34850e48b6cb29611cd504e6ee3c7d970cf651c6fe571baf'
name 'MacPaw Gemini'
homepage 'https://macpaw.com/gemini'
license :commercial
app 'MacPaw Gemini.app'
zap delete: [
'~/Library/Application Support/MacPaw Gemini',
'~/Library/Caches/com.macpaw.site.Gemini',
'~/Library/Preferences/com.macpaw.site.Gemini.plist',
'~/Library/Saved Application State/com.macpaw.site.Gemini.savedState',
]
end
## Instruction:
Upgrade Macpaw Gemini to v1.5.15
## Code After:
cask 'macpaw-gemini' do
version '1.5.15,1458054655'
sha256 '187498bfc83cc8ff84c604ba52e1a28f564156e6d7a686870f1ae938ebeb4da9'
# devmate.com/com.macpaw.site.Gemini was verified as official when first introduced to the cask
url "https://dl.devmate.com/com.macpaw.site.Gemini/#{version.before_comma}/#{version.after_comma}/MacPawGemini-#{version.before_comma}.zip"
appcast 'https://updates.devmate.com/com.macpaw.site.Gemini.xml',
checkpoint: '3de2c7b377fb8684e7038c330fa4dd3ba2bb2119a458e33834f57dcb9f32c3bf'
name 'MacPaw Gemini'
homepage 'https://macpaw.com/gemini'
license :commercial
app 'MacPaw Gemini.app'
zap delete: [
'~/Library/Application Support/MacPaw Gemini',
'~/Library/Caches/com.macpaw.site.Gemini',
'~/Library/Preferences/com.macpaw.site.Gemini.plist',
'~/Library/Saved Application State/com.macpaw.site.Gemini.savedState',
]
end
| cask 'macpaw-gemini' do
- version '1.5.14,1448360907'
? ^ -- ^^^^
+ version '1.5.15,1458054655'
? ^ ++++ ^^
- sha256 '07779ae4175a18c821bed55ab2776e403f8c50e0a94d3b44e5dae4552aa9753e'
+ sha256 '187498bfc83cc8ff84c604ba52e1a28f564156e6d7a686870f1ae938ebeb4da9'
# devmate.com/com.macpaw.site.Gemini was verified as official when first introduced to the cask
url "https://dl.devmate.com/com.macpaw.site.Gemini/#{version.before_comma}/#{version.after_comma}/MacPawGemini-#{version.before_comma}.zip"
appcast 'https://updates.devmate.com/com.macpaw.site.Gemini.xml',
- checkpoint: 'c5e98cb5ad6b531a34850e48b6cb29611cd504e6ee3c7d970cf651c6fe571baf'
+ checkpoint: '3de2c7b377fb8684e7038c330fa4dd3ba2bb2119a458e33834f57dcb9f32c3bf'
name 'MacPaw Gemini'
homepage 'https://macpaw.com/gemini'
license :commercial
app 'MacPaw Gemini.app'
zap delete: [
'~/Library/Application Support/MacPaw Gemini',
'~/Library/Caches/com.macpaw.site.Gemini',
'~/Library/Preferences/com.macpaw.site.Gemini.plist',
'~/Library/Saved Application State/com.macpaw.site.Gemini.savedState',
]
end | 6 | 0.285714 | 3 | 3 |
6a7fee8365141059db2e9e6faf2d4fa93618fc6c | app/views/storytime/dashboard/media/_gallery.html.erb | app/views/storytime/dashboard/media/_gallery.html.erb | <div id="media_gallery">
<% @media.in_groups_of(5, false) do |media_row| %>
<div class="row">
<% media_row.each do |media| %>
<%= render partial: "storytime/dashboard/media/media.html.erb", locals: { media: media } %>
<% end %>
</div>
<% end %>
<%= paginate @media, remote: true, params: { controller: "dashboard/media",
action: "index",
id: nil,
large_gallery: @large_gallery.nil? ? true : @large_gallery } %>
</div>
| <div id="media_gallery">
<% if @media.any? %>
<% @media.in_groups_of(5, false) do |media_row| %>
<div class="row">
<% media_row.each do |media| %>
<%= render partial: "storytime/dashboard/media/media.html.erb", locals: { media: media } %>
<% end %>
</div>
<% end %>
<%= paginate @media, remote: true, params: { controller: "dashboard/media",
action: "index",
id: nil,
large_gallery: @large_gallery.nil? ? true : @large_gallery } %>
<% end %>
</div>
| Add nil check to media gallery | Add nil check to media gallery
| HTML+ERB | mit | braindeaf/storytime,hoanghiep90/storytime,CultivateLabs/storytime,hoanghiep90/storytime,harrykiselev/storytime,harrykiselev/storytime,FlyoverWorks/storytime,bidah/storytime-manentail,braindeaf/storytime,braindeaf/storytime,harrykiselev/storytime,CultivateLabs/storytime,bidah/storytime-manentail,matiasgarcia/storytime,FlyoverWorks/storytime,matiasgarcia/storytime,bidah/storytime-manentail,FlyoverWorks/storytime,CultivateLabs/storytime,matiasgarcia/storytime,hoanghiep90/storytime | html+erb | ## Code Before:
<div id="media_gallery">
<% @media.in_groups_of(5, false) do |media_row| %>
<div class="row">
<% media_row.each do |media| %>
<%= render partial: "storytime/dashboard/media/media.html.erb", locals: { media: media } %>
<% end %>
</div>
<% end %>
<%= paginate @media, remote: true, params: { controller: "dashboard/media",
action: "index",
id: nil,
large_gallery: @large_gallery.nil? ? true : @large_gallery } %>
</div>
## Instruction:
Add nil check to media gallery
## Code After:
<div id="media_gallery">
<% if @media.any? %>
<% @media.in_groups_of(5, false) do |media_row| %>
<div class="row">
<% media_row.each do |media| %>
<%= render partial: "storytime/dashboard/media/media.html.erb", locals: { media: media } %>
<% end %>
</div>
<% end %>
<%= paginate @media, remote: true, params: { controller: "dashboard/media",
action: "index",
id: nil,
large_gallery: @large_gallery.nil? ? true : @large_gallery } %>
<% end %>
</div>
| <div id="media_gallery">
+ <% if @media.any? %>
+ <% @media.in_groups_of(5, false) do |media_row| %>
+ <div class="row">
+ <% media_row.each do |media| %>
+ <%= render partial: "storytime/dashboard/media/media.html.erb", locals: { media: media } %>
+ <% end %>
+ </div>
+ <% end %>
+ <%= paginate @media, remote: true, params: { controller: "dashboard/media",
+ action: "index",
+ id: nil,
+ large_gallery: @large_gallery.nil? ? true : @large_gallery } %>
- <% @media.in_groups_of(5, false) do |media_row| %>
- <div class="row">
- <% media_row.each do |media| %>
- <%= render partial: "storytime/dashboard/media/media.html.erb", locals: { media: media } %>
- <% end %>
- </div>
<% end %>
-
- <%= paginate @media, remote: true, params: { controller: "dashboard/media",
- action: "index",
- id: nil,
- large_gallery: @large_gallery.nil? ? true : @large_gallery } %>
</div> | 23 | 1.533333 | 12 | 11 |
c1e5d6873b20dd0c17d2e246782d98b5d8fc9c8c | docs/list-of-processes.md | docs/list-of-processes.md | This is the current list of processes and tests that have been implemented.
Last updated: **2016-11-25**
**ADDML FlatFile (Fagsystem, Noark 3, Noark 4)**
*File processes*
- Analyse_CountRecords
- Analyse_CountChars
- Control_AllFixedLength
- Control_NumberOfRecords
*Record processes*
- Analyse_FindExtremeRecords
- Analyse_CountRecordDefinitionOccurences
- Analyse_AllFrequenceList
- Analyse_CrossTable
- Control_FixedLength
- Control_NotUsedRecordDef
- Control_Key
- Control_ForeignKey
*Field processes*
- Analyse_CountNULL
- Analyse_FindExtremeValues
- Analyse_FindMinMaxValues
- Analyse_FrequenceList
- Control_MinLength
- Control_MaxLength
- Control_DataFormat
- Control_NotNull
- Control_Uniqueness
- Control_Codes
- Control_Birthno
- Control_Organisationno
- Control_Accountno
- Control_Date_Value
- Control_Boolean_Value
**ADDML DataObject (Noark 5)**
- NumberOfArchives
- NumberOfArchiveParts
- NumberOfClasses
- NumberOfClasssesInMainClassificationSystem
- NumberOfClassificationSystems
- NumberOfFolders
- StatusOfArchiveParts | This is the current list of processes and tests that have been implemented.
Last updated: **2016-11-25**
**ADDML FlatFile (Fagsystem, Noark 3, Noark 4)**
*File processes*
* Analyse_CountRecords
* Analyse_CountChars
* Control_AllFixedLength
* Control_NumberOfRecords
*Record processes*
* Analyse_FindExtremeRecords
* Analyse_CountRecordDefinitionOccurences
* Analyse_AllFrequenceList
* Analyse_CrossTable
* Control_FixedLength
* Control_NotUsedRecordDef
* Control_Key
* Control_ForeignKey
*Field processes*
* Analyse_CountNULL
* Analyse_FindExtremeValues
* Analyse_FindMinMaxValues
* Analyse_FrequenceList
* Control_MinLength
* Control_MaxLength
* Control_DataFormat
* Control_NotNull
* Control_Uniqueness
* Control_Codes
* Control_Birthno
* Control_Organisationno
* Control_Accountno
* Control_Date_Value
* Control_Boolean_Value
**ADDML DataObject (Noark 5)**
* NumberOfArchives
* NumberOfArchiveParts
* NumberOfClasses
* NumberOfClasssesInMainClassificationSystem
* NumberOfClassificationSystems
* NumberOfFolders
* StatusOfArchiveParts | Use * instead of - for bullet list | Use * instead of - for bullet list
| Markdown | agpl-3.0 | arkivverket/arkade5,arkivverket/arkade5,arkivverket/arkade5 | markdown | ## Code Before:
This is the current list of processes and tests that have been implemented.
Last updated: **2016-11-25**
**ADDML FlatFile (Fagsystem, Noark 3, Noark 4)**
*File processes*
- Analyse_CountRecords
- Analyse_CountChars
- Control_AllFixedLength
- Control_NumberOfRecords
*Record processes*
- Analyse_FindExtremeRecords
- Analyse_CountRecordDefinitionOccurences
- Analyse_AllFrequenceList
- Analyse_CrossTable
- Control_FixedLength
- Control_NotUsedRecordDef
- Control_Key
- Control_ForeignKey
*Field processes*
- Analyse_CountNULL
- Analyse_FindExtremeValues
- Analyse_FindMinMaxValues
- Analyse_FrequenceList
- Control_MinLength
- Control_MaxLength
- Control_DataFormat
- Control_NotNull
- Control_Uniqueness
- Control_Codes
- Control_Birthno
- Control_Organisationno
- Control_Accountno
- Control_Date_Value
- Control_Boolean_Value
**ADDML DataObject (Noark 5)**
- NumberOfArchives
- NumberOfArchiveParts
- NumberOfClasses
- NumberOfClasssesInMainClassificationSystem
- NumberOfClassificationSystems
- NumberOfFolders
- StatusOfArchiveParts
## Instruction:
Use * instead of - for bullet list
## Code After:
This is the current list of processes and tests that have been implemented.
Last updated: **2016-11-25**
**ADDML FlatFile (Fagsystem, Noark 3, Noark 4)**
*File processes*
* Analyse_CountRecords
* Analyse_CountChars
* Control_AllFixedLength
* Control_NumberOfRecords
*Record processes*
* Analyse_FindExtremeRecords
* Analyse_CountRecordDefinitionOccurences
* Analyse_AllFrequenceList
* Analyse_CrossTable
* Control_FixedLength
* Control_NotUsedRecordDef
* Control_Key
* Control_ForeignKey
*Field processes*
* Analyse_CountNULL
* Analyse_FindExtremeValues
* Analyse_FindMinMaxValues
* Analyse_FrequenceList
* Control_MinLength
* Control_MaxLength
* Control_DataFormat
* Control_NotNull
* Control_Uniqueness
* Control_Codes
* Control_Birthno
* Control_Organisationno
* Control_Accountno
* Control_Date_Value
* Control_Boolean_Value
**ADDML DataObject (Noark 5)**
* NumberOfArchives
* NumberOfArchiveParts
* NumberOfClasses
* NumberOfClasssesInMainClassificationSystem
* NumberOfClassificationSystems
* NumberOfFolders
* StatusOfArchiveParts | This is the current list of processes and tests that have been implemented.
Last updated: **2016-11-25**
**ADDML FlatFile (Fagsystem, Noark 3, Noark 4)**
*File processes*
- - Analyse_CountRecords
? ^
+ * Analyse_CountRecords
? ^
- - Analyse_CountChars
? ^
+ * Analyse_CountChars
? ^
- - Control_AllFixedLength
? ^
+ * Control_AllFixedLength
? ^
- - Control_NumberOfRecords
? ^
+ * Control_NumberOfRecords
? ^
*Record processes*
- - Analyse_FindExtremeRecords
? ^
+ * Analyse_FindExtremeRecords
? ^
- - Analyse_CountRecordDefinitionOccurences
? ^
+ * Analyse_CountRecordDefinitionOccurences
? ^
- - Analyse_AllFrequenceList
? ^
+ * Analyse_AllFrequenceList
? ^
- - Analyse_CrossTable
? ^
+ * Analyse_CrossTable
? ^
- - Control_FixedLength
? ^
+ * Control_FixedLength
? ^
- - Control_NotUsedRecordDef
? ^
+ * Control_NotUsedRecordDef
? ^
- - Control_Key
? ^
+ * Control_Key
? ^
- - Control_ForeignKey
? ^
+ * Control_ForeignKey
? ^
*Field processes*
- - Analyse_CountNULL
? ^
+ * Analyse_CountNULL
? ^
- - Analyse_FindExtremeValues
? ^
+ * Analyse_FindExtremeValues
? ^
- - Analyse_FindMinMaxValues
? ^
+ * Analyse_FindMinMaxValues
? ^
- - Analyse_FrequenceList
? ^
+ * Analyse_FrequenceList
? ^
- - Control_MinLength
? ^
+ * Control_MinLength
? ^
- - Control_MaxLength
? ^
+ * Control_MaxLength
? ^
- - Control_DataFormat
? ^
+ * Control_DataFormat
? ^
- - Control_NotNull
? ^
+ * Control_NotNull
? ^
- - Control_Uniqueness
? ^
+ * Control_Uniqueness
? ^
- - Control_Codes
? ^
+ * Control_Codes
? ^
- - Control_Birthno
? ^
+ * Control_Birthno
? ^
- - Control_Organisationno
? ^
+ * Control_Organisationno
? ^
- - Control_Accountno
? ^
+ * Control_Accountno
? ^
- - Control_Date_Value
? ^
+ * Control_Date_Value
? ^
- - Control_Boolean_Value
? ^
+ * Control_Boolean_Value
? ^
**ADDML DataObject (Noark 5)**
- - NumberOfArchives
? ^
+ * NumberOfArchives
? ^
- - NumberOfArchiveParts
? ^
+ * NumberOfArchiveParts
? ^
- - NumberOfClasses
? ^
+ * NumberOfClasses
? ^
- - NumberOfClasssesInMainClassificationSystem
? ^
+ * NumberOfClasssesInMainClassificationSystem
? ^
- - NumberOfClassificationSystems
? ^
+ * NumberOfClassificationSystems
? ^
- - NumberOfFolders
? ^
+ * NumberOfFolders
? ^
- - StatusOfArchiveParts
? ^
+ * StatusOfArchiveParts
? ^
| 68 | 1.446809 | 34 | 34 |
9bff3fd5a53c0f605fc941d960308a7212689ac5 | .kitchen.yml | .kitchen.yml | ---
driver:
name: vagrant
provisioner:
name: ansible_playbook
hosts: all
platforms:
- name: ubuntu-14.04
driver_config:
box: ubuntu/trusty64
- name: centos-6.5
driver_config:
box: chef/centos-6.5
suites:
- name: default
| ---
driver:
name: vagrant
provisioner:
name: ansible_playbook
hosts: all
platforms:
- name: ubuntu-14.04
driver_config:
box: ubuntu/trusty64
box_url: 'https://atlas.hashicorp.com/ubuntu/boxes/trusty64/versions/14.04/providers/virtualbox.box'
- name: centos-6.5
driver_config:
box: chef/centos-6.5
box_url: 'https://atlas.hashicorp.com/chef/boxes/centos-6.5/versions/1.0.0/providers/virtualbox.box'
- name: centos-7.0
driver_config:
box: grampajoe/centos-7.0-ansible
box_url: 'https://atlas.hashicorp.com/grampajoe/boxes/centos-7.0-ansible/versions/1.0.0/providers/virtualbox.box'
suites:
- name: default
| Add CentOS 7 to tests | Add CentOS 7 to tests
| YAML | mit | grampajoe/ansible-docker-multi | yaml | ## Code Before:
---
driver:
name: vagrant
provisioner:
name: ansible_playbook
hosts: all
platforms:
- name: ubuntu-14.04
driver_config:
box: ubuntu/trusty64
- name: centos-6.5
driver_config:
box: chef/centos-6.5
suites:
- name: default
## Instruction:
Add CentOS 7 to tests
## Code After:
---
driver:
name: vagrant
provisioner:
name: ansible_playbook
hosts: all
platforms:
- name: ubuntu-14.04
driver_config:
box: ubuntu/trusty64
box_url: 'https://atlas.hashicorp.com/ubuntu/boxes/trusty64/versions/14.04/providers/virtualbox.box'
- name: centos-6.5
driver_config:
box: chef/centos-6.5
box_url: 'https://atlas.hashicorp.com/chef/boxes/centos-6.5/versions/1.0.0/providers/virtualbox.box'
- name: centos-7.0
driver_config:
box: grampajoe/centos-7.0-ansible
box_url: 'https://atlas.hashicorp.com/grampajoe/boxes/centos-7.0-ansible/versions/1.0.0/providers/virtualbox.box'
suites:
- name: default
| ---
driver:
name: vagrant
provisioner:
name: ansible_playbook
hosts: all
platforms:
- name: ubuntu-14.04
driver_config:
box: ubuntu/trusty64
+ box_url: 'https://atlas.hashicorp.com/ubuntu/boxes/trusty64/versions/14.04/providers/virtualbox.box'
- name: centos-6.5
driver_config:
box: chef/centos-6.5
+ box_url: 'https://atlas.hashicorp.com/chef/boxes/centos-6.5/versions/1.0.0/providers/virtualbox.box'
+ - name: centos-7.0
+ driver_config:
+ box: grampajoe/centos-7.0-ansible
+ box_url: 'https://atlas.hashicorp.com/grampajoe/boxes/centos-7.0-ansible/versions/1.0.0/providers/virtualbox.box'
suites:
- name: default | 6 | 0.333333 | 6 | 0 |
f3cf0f7f70dd0322808acb6ae4a91d236ecf9ede | .travis.yml | .travis.yml | language: java
env:
- secure: "h08AjZZ0G2A9gHFbUrLNwBgjqj52On0+psV82JAopZxcdynIK2QQ5uDavZKOU/W3rUSUHJvl7pjzZkZgUccJX+iqUXZh7hJxY79nTPSjMNW4Hl9I7qQp1etKZMxfc0x+1ikZVpzbsfpYaypkf8hTYVKVZTcFDg6yueHL+Q2rI0Q="
after_success:
"mvn -B package cargo:redeploy"
| language: java
env:
- secure: "h08AjZZ0G2A9gHFbUrLNwBgjqj52On0+psV82JAopZxcdynIK2QQ5uDavZKOU/W3rUSUHJvl7pjzZkZgUccJX+iqUXZh7hJxY79nTPSjMNW4Hl9I7qQp1etKZMxfc0x+1ikZVpzbsfpYaypkf8hTYVKVZTcFDg6yueHL+Q2rI0Q="
after_success:
"if [ $TRAVIS_PULL_REQUEST -eq false ]; then mvn -B package cargo:redeploy; fi"
| Disable deploy of pull requests | Disable deploy of pull requests
| YAML | agpl-3.0 | mvk13ogb/qwait,mvk13ogb/qwait,mvk13ogb/qwait | yaml | ## Code Before:
language: java
env:
- secure: "h08AjZZ0G2A9gHFbUrLNwBgjqj52On0+psV82JAopZxcdynIK2QQ5uDavZKOU/W3rUSUHJvl7pjzZkZgUccJX+iqUXZh7hJxY79nTPSjMNW4Hl9I7qQp1etKZMxfc0x+1ikZVpzbsfpYaypkf8hTYVKVZTcFDg6yueHL+Q2rI0Q="
after_success:
"mvn -B package cargo:redeploy"
## Instruction:
Disable deploy of pull requests
## Code After:
language: java
env:
- secure: "h08AjZZ0G2A9gHFbUrLNwBgjqj52On0+psV82JAopZxcdynIK2QQ5uDavZKOU/W3rUSUHJvl7pjzZkZgUccJX+iqUXZh7hJxY79nTPSjMNW4Hl9I7qQp1etKZMxfc0x+1ikZVpzbsfpYaypkf8hTYVKVZTcFDg6yueHL+Q2rI0Q="
after_success:
"if [ $TRAVIS_PULL_REQUEST -eq false ]; then mvn -B package cargo:redeploy; fi"
| language: java
env:
- secure: "h08AjZZ0G2A9gHFbUrLNwBgjqj52On0+psV82JAopZxcdynIK2QQ5uDavZKOU/W3rUSUHJvl7pjzZkZgUccJX+iqUXZh7hJxY79nTPSjMNW4Hl9I7qQp1etKZMxfc0x+1ikZVpzbsfpYaypkf8hTYVKVZTcFDg6yueHL+Q2rI0Q="
after_success:
- "mvn -B package cargo:redeploy"
+ "if [ $TRAVIS_PULL_REQUEST -eq false ]; then mvn -B package cargo:redeploy; fi" | 2 | 0.4 | 1 | 1 |
d2838b76fead42e68d46d090cda0699e4ad11650 | .gitlab-ci.yml | .gitlab-ci.yml | image: node:latest
stages:
- test
- deploy
test:
stage: test
script:
- npm install
- npm test
deploy-npm:
stage: deploy
script:
- npm install
- npm publish
only:
- master
when: manual
| image: node:latest
stages:
- test
- deploy
test:
stage: test
script:
- npm install
- npm test
deploy-npm:
stage: deploy
script:
- npm install
- npm publish
only:
- /^release-.*$/
when: manual
| Enable deployment only on release branches | Enable deployment only on release branches
| YAML | mit | AEB-labs/graphql-weaver,AEB-labs/graphql-weaver | yaml | ## Code Before:
image: node:latest
stages:
- test
- deploy
test:
stage: test
script:
- npm install
- npm test
deploy-npm:
stage: deploy
script:
- npm install
- npm publish
only:
- master
when: manual
## Instruction:
Enable deployment only on release branches
## Code After:
image: node:latest
stages:
- test
- deploy
test:
stage: test
script:
- npm install
- npm test
deploy-npm:
stage: deploy
script:
- npm install
- npm publish
only:
- /^release-.*$/
when: manual
| image: node:latest
stages:
- test
- deploy
test:
stage: test
script:
- npm install
- npm test
deploy-npm:
stage: deploy
script:
- npm install
- npm publish
only:
- - master
+ - /^release-.*$/
when: manual | 2 | 0.1 | 1 | 1 |
4addd4d2f127736b08c15bba26384c9be518d102 | fluent-react/src/index.js | fluent-react/src/index.js | /*
* @module fluent-react
* @overview
*
* `fluent-react` provides React bindings for Fluent. It takes advantage of
* React's Components system and the virtual DOM. Translations are exposed to
* components via the provider pattern.
*
* <LocalizationProvider bundles={…}>
* <Localized id="hello-world">
* <p>{'Hello, world!'}</p>
* </Localized>
* </LocalizationProvider>
*
* Consult the documentation of the `LocalizationProvider` and the `Localized`
* components for more information.
*/
export { default as FluentContext } from "./context";
export { default as LocalizationProvider } from "./provider";
export { default as withLocalization } from "./with_localization";
export { default as Localized } from "./localized";
| /*
* @module fluent-react
* @overview
*
* `fluent-react` provides React bindings for Fluent. It takes advantage of
* React's Components system and the virtual DOM. Translations are exposed to
* components via the provider pattern.
*
* <LocalizationProvider bundles={…}>
* <Localized id="hello-world">
* <p>{'Hello, world!'}</p>
* </Localized>
* </LocalizationProvider>
*
* Consult the documentation of the `LocalizationProvider` and the `Localized`
* components for more information.
*/
export { default as LocalizationProvider } from "./provider";
export { default as withLocalization } from "./with_localization";
export { default as Localized } from "./localized";
| Revert "Expose FluentContext as public API" | Revert "Expose FluentContext as public API"
This reverts commit 397cfd06eba71b980c7ef7258acf605fb363f7d1. The
current public API is sufficient for all supported use-cases. We might
want to extend it in the future, e.g. if we implement a useLocalization
hook. For now however, it's safer to keep the public API as minimal as
possible.
| JavaScript | apache-2.0 | projectfluent/fluent.js,projectfluent/fluent.js,projectfluent/fluent.js | javascript | ## Code Before:
/*
* @module fluent-react
* @overview
*
* `fluent-react` provides React bindings for Fluent. It takes advantage of
* React's Components system and the virtual DOM. Translations are exposed to
* components via the provider pattern.
*
* <LocalizationProvider bundles={…}>
* <Localized id="hello-world">
* <p>{'Hello, world!'}</p>
* </Localized>
* </LocalizationProvider>
*
* Consult the documentation of the `LocalizationProvider` and the `Localized`
* components for more information.
*/
export { default as FluentContext } from "./context";
export { default as LocalizationProvider } from "./provider";
export { default as withLocalization } from "./with_localization";
export { default as Localized } from "./localized";
## Instruction:
Revert "Expose FluentContext as public API"
This reverts commit 397cfd06eba71b980c7ef7258acf605fb363f7d1. The
current public API is sufficient for all supported use-cases. We might
want to extend it in the future, e.g. if we implement a useLocalization
hook. For now however, it's safer to keep the public API as minimal as
possible.
## Code After:
/*
* @module fluent-react
* @overview
*
* `fluent-react` provides React bindings for Fluent. It takes advantage of
* React's Components system and the virtual DOM. Translations are exposed to
* components via the provider pattern.
*
* <LocalizationProvider bundles={…}>
* <Localized id="hello-world">
* <p>{'Hello, world!'}</p>
* </Localized>
* </LocalizationProvider>
*
* Consult the documentation of the `LocalizationProvider` and the `Localized`
* components for more information.
*/
export { default as LocalizationProvider } from "./provider";
export { default as withLocalization } from "./with_localization";
export { default as Localized } from "./localized";
| /*
* @module fluent-react
* @overview
*
* `fluent-react` provides React bindings for Fluent. It takes advantage of
* React's Components system and the virtual DOM. Translations are exposed to
* components via the provider pattern.
*
* <LocalizationProvider bundles={…}>
* <Localized id="hello-world">
* <p>{'Hello, world!'}</p>
* </Localized>
* </LocalizationProvider>
*
* Consult the documentation of the `LocalizationProvider` and the `Localized`
* components for more information.
*/
- export { default as FluentContext } from "./context";
export { default as LocalizationProvider } from "./provider";
export { default as withLocalization } from "./with_localization";
export { default as Localized } from "./localized"; | 1 | 0.043478 | 0 | 1 |
927cece17e7ef78cd1bf0e41b332cdce0227d165 | _posts/2016-02-03-guest-post.md | _posts/2016-02-03-guest-post.md | ---
layout: post
title: Guest Blog Post: Bruno Grande
---
I'm saying something very controversial here.
| ---
layout: post
title: Guest Blog Post: Bruno Grande
---
I'm saying something very controversial here.
Source: wikipedia.org
| Add source to guest blog post | Add source to guest blog post
| Markdown | mit | hirezbaz/hirezbaz.github.io | markdown | ## Code Before:
---
layout: post
title: Guest Blog Post: Bruno Grande
---
I'm saying something very controversial here.
## Instruction:
Add source to guest blog post
## Code After:
---
layout: post
title: Guest Blog Post: Bruno Grande
---
I'm saying something very controversial here.
Source: wikipedia.org
| ---
layout: post
title: Guest Blog Post: Bruno Grande
---
I'm saying something very controversial here.
+ Source: wikipedia.org | 1 | 0.142857 | 1 | 0 |
c5f452b443b6e198d5ebeee9e2fa9b9efafcf61e | include/swift/Basic/Timer.h | include/swift/Basic/Timer.h | //===--- Timer.h - Shared timers for compilation phases ---------*- C++ -*-===//
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
//
//===----------------------------------------------------------------------===//
#ifndef SWIFT_BASIC_TIMER_H
#define SWIFT_BASIC_TIMER_H
#include "swift/Basic/LLVM.h"
#include "llvm/ADT/Optional.h"
#include "llvm/Support/Timer.h"
namespace swift {
/// A convenience class for declaring a timer that's part of the Swift
/// compilation timers group.
class SharedTimer {
enum class State {
Initial,
Skipped,
Enabled
};
static State CompilationTimersEnabled;
Optional<llvm::NamedRegionTimer> Timer;
public:
explicit SharedTimer(StringRef name) {
if (CompilationTimersEnabled == State::Enabled)
Timer.emplace(name, StringRef("Swift compilation"), StringRef("swift"),
StringRef("swift related timers"));
else
CompilationTimersEnabled = State::Skipped;
}
/// Must be called before any SharedTimers have been created.
static void enableCompilationTimers() {
assert(CompilationTimersEnabled != State::Skipped &&
"a timer has already been created");
CompilationTimersEnabled = State::Enabled;
}
};
} // end namespace swift
#endif // SWIFT_BASIC_TIMER_H
| //===--- Timer.h - Shared timers for compilation phases ---------*- C++ -*-===//
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
//
//===----------------------------------------------------------------------===//
#ifndef SWIFT_BASIC_TIMER_H
#define SWIFT_BASIC_TIMER_H
#include "swift/Basic/LLVM.h"
#include "llvm/ADT/Optional.h"
#include "llvm/Support/Timer.h"
namespace swift {
/// A convenience class for declaring a timer that's part of the Swift
/// compilation timers group.
class SharedTimer {
enum class State {
Initial,
Skipped,
Enabled
};
static State CompilationTimersEnabled;
Optional<llvm::NamedRegionTimer> Timer;
public:
explicit SharedTimer(StringRef name) {
if (CompilationTimersEnabled == State::Enabled)
Timer.emplace(name, name, "swift", "Swift compilation");
else
CompilationTimersEnabled = State::Skipped;
}
/// Must be called before any SharedTimers have been created.
static void enableCompilationTimers() {
assert(CompilationTimersEnabled != State::Skipped &&
"a timer has already been created");
CompilationTimersEnabled = State::Enabled;
}
};
} // end namespace swift
#endif // SWIFT_BASIC_TIMER_H
| Fix 2f21735 to actually distinguish phases. | -debug-time-compilation: Fix 2f21735 to actually distinguish phases.
https://bugs.swift.org/browse/SR-4100
| C | apache-2.0 | bitjammer/swift,brentdax/swift,natecook1000/swift,atrick/swift,frootloops/swift,karwa/swift,shahmishal/swift,return/swift,OscarSwanros/swift,devincoughlin/swift,frootloops/swift,jopamer/swift,bitjammer/swift,tkremenek/swift,airspeedswift/swift,tjw/swift,felix91gr/swift,jckarter/swift,milseman/swift,hooman/swift,xwu/swift,JGiola/swift,xedin/swift,jtbandes/swift,djwbrown/swift,CodaFi/swift,lorentey/swift,codestergit/swift,harlanhaskins/swift,xwu/swift,manavgabhawala/swift,jtbandes/swift,felix91gr/swift,codestergit/swift,devincoughlin/swift,tjw/swift,jckarter/swift,OscarSwanros/swift,jckarter/swift,bitjammer/swift,arvedviehweger/swift,jmgc/swift,airspeedswift/swift,frootloops/swift,practicalswift/swift,practicalswift/swift,djwbrown/swift,karwa/swift,calebd/swift,roambotics/swift,tkremenek/swift,hughbe/swift,gregomni/swift,xedin/swift,devincoughlin/swift,aschwaighofer/swift,danielmartin/swift,sschiau/swift,aschwaighofer/swift,stephentyrone/swift,Jnosh/swift,manavgabhawala/swift,jopamer/swift,natecook1000/swift,JGiola/swift,tkremenek/swift,danielmartin/swift,glessard/swift,jmgc/swift,xwu/swift,aschwaighofer/swift,ahoppen/swift,tkremenek/swift,milseman/swift,allevato/swift,Jnosh/swift,CodaFi/swift,swiftix/swift,swiftix/swift,Jnosh/swift,atrick/swift,huonw/swift,deyton/swift,roambotics/swift,gribozavr/swift,djwbrown/swift,hughbe/swift,glessard/swift,amraboelela/swift,xedin/swift,roambotics/swift,austinzheng/swift,sschiau/swift,felix91gr/swift,CodaFi/swift,stephentyrone/swift,shahmishal/swift,gregomni/swift,stephentyrone/swift,calebd/swift,jopamer/swift,uasys/swift,OscarSwanros/swift,manavgabhawala/swift,parkera/swift,Jnosh/swift,airspeedswift/swift,nathawes/swift,jopamer/swift,atrick/swift,alblue/swift,stephentyrone/swift,natecook1000/swift,Jnosh/swift,karwa/swift,shajrawi/swift,shahmishal/swift,amraboelela/swift,hooman/swift,tinysun212/swift-windows,arvedviehweger/swift,aschwaighofer/swift,deyton/swift,atrick/swift,milseman/swift,brentdax/swift,benlangmuir/swift,felix91gr/swift,gribozavr/swift,devincoughlin/swift,harlanhaskins/swift,shajrawi/swift,allevato/swift,CodaFi/swift,deyton/swift,apple/swift,roambotics/swift,practicalswift/swift,jmgc/swift,jmgc/swift,uasys/swift,frootloops/swift,jtbandes/swift,glessard/swift,CodaFi/swift,lorentey/swift,Jnosh/swift,tjw/swift,rudkx/swift,shahmishal/swift,huonw/swift,bitjammer/swift,jopamer/swift,natecook1000/swift,benlangmuir/swift,airspeedswift/swift,allevato/swift,karwa/swift,huonw/swift,ahoppen/swift,calebd/swift,jtbandes/swift,devincoughlin/swift,parkera/swift,rudkx/swift,benlangmuir/swift,danielmartin/swift,jckarter/swift,zisko/swift,hooman/swift,milseman/swift,airspeedswift/swift,alblue/swift,allevato/swift,harlanhaskins/swift,stephentyrone/swift,shahmishal/swift,arvedviehweger/swift,tinysun212/swift-windows,hughbe/swift,codestergit/swift,calebd/swift,return/swift,uasys/swift,karwa/swift,gribozavr/swift,parkera/swift,xedin/swift,benlangmuir/swift,return/swift,codestergit/swift,xedin/swift,gribozavr/swift,amraboelela/swift,rudkx/swift,glessard/swift,practicalswift/swift,austinzheng/swift,natecook1000/swift,ahoppen/swift,gribozavr/swift,hooman/swift,amraboelela/swift,shajrawi/swift,practicalswift/swift,gribozavr/swift,arvedviehweger/swift,bitjammer/swift,allevato/swift,alblue/swift,brentdax/swift,deyton/swift,nathawes/swift,bitjammer/swift,lorentey/swift,shajrawi/swift,parkera/swift,shahmishal/swift,tkremenek/swift,manavgabhawala/swift,austinzheng/swift,djwbrown/swift,huonw/swift,danielmartin/swift,hughbe/swift,parkera/swift,return/swift,jtbandes/swift,uasys/swift,lorentey/swift,parkera/swift,sschiau/swift,xwu/swift,swiftix/swift,milseman/swift,djwbrown/swift,devincoughlin/swift,rudkx/swift,glessard/swift,apple/swift,manavgabhawala/swift,tjw/swift,amraboelela/swift,sschiau/swift,milseman/swift,OscarSwanros/swift,danielmartin/swift,atrick/swift,xwu/swift,deyton/swift,sschiau/swift,OscarSwanros/swift,amraboelela/swift,rudkx/swift,return/swift,jckarter/swift,codestergit/swift,gregomni/swift,sschiau/swift,natecook1000/swift,jckarter/swift,felix91gr/swift,benlangmuir/swift,practicalswift/swift,karwa/swift,danielmartin/swift,jtbandes/swift,zisko/swift,hooman/swift,harlanhaskins/swift,lorentey/swift,tinysun212/swift-windows,arvedviehweger/swift,frootloops/swift,tinysun212/swift-windows,JGiola/swift,nathawes/swift,JGiola/swift,manavgabhawala/swift,codestergit/swift,apple/swift,apple/swift,glessard/swift,arvedviehweger/swift,zisko/swift,jckarter/swift,hughbe/swift,allevato/swift,xedin/swift,harlanhaskins/swift,uasys/swift,CodaFi/swift,calebd/swift,return/swift,rudkx/swift,lorentey/swift,sschiau/swift,apple/swift,brentdax/swift,brentdax/swift,lorentey/swift,zisko/swift,hooman/swift,nathawes/swift,devincoughlin/swift,alblue/swift,JGiola/swift,jtbandes/swift,xedin/swift,shahmishal/swift,lorentey/swift,shajrawi/swift,manavgabhawala/swift,danielmartin/swift,hooman/swift,swiftix/swift,hughbe/swift,tinysun212/swift-windows,tinysun212/swift-windows,shahmishal/swift,apple/swift,huonw/swift,huonw/swift,jmgc/swift,tinysun212/swift-windows,ahoppen/swift,codestergit/swift,amraboelela/swift,xwu/swift,harlanhaskins/swift,stephentyrone/swift,tkremenek/swift,milseman/swift,jopamer/swift,calebd/swift,zisko/swift,nathawes/swift,zisko/swift,austinzheng/swift,sschiau/swift,calebd/swift,tkremenek/swift,stephentyrone/swift,gregomni/swift,swiftix/swift,ahoppen/swift,uasys/swift,deyton/swift,gribozavr/swift,djwbrown/swift,austinzheng/swift,airspeedswift/swift,gregomni/swift,aschwaighofer/swift,alblue/swift,brentdax/swift,djwbrown/swift,austinzheng/swift,harlanhaskins/swift,tjw/swift,deyton/swift,karwa/swift,felix91gr/swift,natecook1000/swift,frootloops/swift,swiftix/swift,uasys/swift,airspeedswift/swift,shajrawi/swift,jmgc/swift,ahoppen/swift,felix91gr/swift,frootloops/swift,arvedviehweger/swift,nathawes/swift,tjw/swift,devincoughlin/swift,aschwaighofer/swift,CodaFi/swift,swiftix/swift,roambotics/swift,alblue/swift,bitjammer/swift,atrick/swift,gribozavr/swift,huonw/swift,JGiola/swift,hughbe/swift,benlangmuir/swift,practicalswift/swift,allevato/swift,zisko/swift,xwu/swift,OscarSwanros/swift,gregomni/swift,Jnosh/swift,alblue/swift,jopamer/swift,jmgc/swift,aschwaighofer/swift,karwa/swift,shajrawi/swift,shajrawi/swift,practicalswift/swift,roambotics/swift,nathawes/swift,austinzheng/swift,parkera/swift,parkera/swift,return/swift,xedin/swift,OscarSwanros/swift,brentdax/swift,tjw/swift | c | ## Code Before:
//===--- Timer.h - Shared timers for compilation phases ---------*- C++ -*-===//
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
//
//===----------------------------------------------------------------------===//
#ifndef SWIFT_BASIC_TIMER_H
#define SWIFT_BASIC_TIMER_H
#include "swift/Basic/LLVM.h"
#include "llvm/ADT/Optional.h"
#include "llvm/Support/Timer.h"
namespace swift {
/// A convenience class for declaring a timer that's part of the Swift
/// compilation timers group.
class SharedTimer {
enum class State {
Initial,
Skipped,
Enabled
};
static State CompilationTimersEnabled;
Optional<llvm::NamedRegionTimer> Timer;
public:
explicit SharedTimer(StringRef name) {
if (CompilationTimersEnabled == State::Enabled)
Timer.emplace(name, StringRef("Swift compilation"), StringRef("swift"),
StringRef("swift related timers"));
else
CompilationTimersEnabled = State::Skipped;
}
/// Must be called before any SharedTimers have been created.
static void enableCompilationTimers() {
assert(CompilationTimersEnabled != State::Skipped &&
"a timer has already been created");
CompilationTimersEnabled = State::Enabled;
}
};
} // end namespace swift
#endif // SWIFT_BASIC_TIMER_H
## Instruction:
-debug-time-compilation: Fix 2f21735 to actually distinguish phases.
https://bugs.swift.org/browse/SR-4100
## Code After:
//===--- Timer.h - Shared timers for compilation phases ---------*- C++ -*-===//
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
//
//===----------------------------------------------------------------------===//
#ifndef SWIFT_BASIC_TIMER_H
#define SWIFT_BASIC_TIMER_H
#include "swift/Basic/LLVM.h"
#include "llvm/ADT/Optional.h"
#include "llvm/Support/Timer.h"
namespace swift {
/// A convenience class for declaring a timer that's part of the Swift
/// compilation timers group.
class SharedTimer {
enum class State {
Initial,
Skipped,
Enabled
};
static State CompilationTimersEnabled;
Optional<llvm::NamedRegionTimer> Timer;
public:
explicit SharedTimer(StringRef name) {
if (CompilationTimersEnabled == State::Enabled)
Timer.emplace(name, name, "swift", "Swift compilation");
else
CompilationTimersEnabled = State::Skipped;
}
/// Must be called before any SharedTimers have been created.
static void enableCompilationTimers() {
assert(CompilationTimersEnabled != State::Skipped &&
"a timer has already been created");
CompilationTimersEnabled = State::Enabled;
}
};
} // end namespace swift
#endif // SWIFT_BASIC_TIMER_H
| //===--- Timer.h - Shared timers for compilation phases ---------*- C++ -*-===//
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
//
//===----------------------------------------------------------------------===//
#ifndef SWIFT_BASIC_TIMER_H
#define SWIFT_BASIC_TIMER_H
#include "swift/Basic/LLVM.h"
#include "llvm/ADT/Optional.h"
#include "llvm/Support/Timer.h"
namespace swift {
/// A convenience class for declaring a timer that's part of the Swift
/// compilation timers group.
class SharedTimer {
enum class State {
Initial,
Skipped,
Enabled
};
static State CompilationTimersEnabled;
Optional<llvm::NamedRegionTimer> Timer;
public:
explicit SharedTimer(StringRef name) {
if (CompilationTimersEnabled == State::Enabled)
+ Timer.emplace(name, name, "swift", "Swift compilation");
- Timer.emplace(name, StringRef("Swift compilation"), StringRef("swift"),
- StringRef("swift related timers"));
else
CompilationTimersEnabled = State::Skipped;
}
/// Must be called before any SharedTimers have been created.
static void enableCompilationTimers() {
assert(CompilationTimersEnabled != State::Skipped &&
"a timer has already been created");
CompilationTimersEnabled = State::Enabled;
}
};
} // end namespace swift
#endif // SWIFT_BASIC_TIMER_H | 3 | 0.058824 | 1 | 2 |
c0de2a081cfe9af7f6b9d39daae557d45f5d69ee | middleware/module_yaml.py | middleware/module_yaml.py | from __future__ import unicode_literals
import os
import yaml
def main(app, data):
filepath = os.path.join(app.data_dir, data.get('filename'))
with open(filepath, 'r') as f:
contents = yaml.load(f)
return contents
| from __future__ import unicode_literals
import os
import yaml
import requests
def local(app, data):
filepath = os.path.join(app.data_dir, data.get('filename'))
with open(filepath, 'r') as f:
contents = yaml.load(f)
return contents
def remote(app, data):
r = requests.get(data.get('url'))
contents = yaml.load(r.data)
return contents
def main(app, data):
if data.get('filename'):
return local(app, data)
if data.get('url'):
return remote(app, data)
| Allow remote and local files. | Allow remote and local files.
| Python | mit | myles/me-api,myles/me-api | python | ## Code Before:
from __future__ import unicode_literals
import os
import yaml
def main(app, data):
filepath = os.path.join(app.data_dir, data.get('filename'))
with open(filepath, 'r') as f:
contents = yaml.load(f)
return contents
## Instruction:
Allow remote and local files.
## Code After:
from __future__ import unicode_literals
import os
import yaml
import requests
def local(app, data):
filepath = os.path.join(app.data_dir, data.get('filename'))
with open(filepath, 'r') as f:
contents = yaml.load(f)
return contents
def remote(app, data):
r = requests.get(data.get('url'))
contents = yaml.load(r.data)
return contents
def main(app, data):
if data.get('filename'):
return local(app, data)
if data.get('url'):
return remote(app, data)
| from __future__ import unicode_literals
import os
import yaml
+ import requests
- def main(app, data):
? ^ ^^
+ def local(app, data):
? ^^^ ^
filepath = os.path.join(app.data_dir, data.get('filename'))
with open(filepath, 'r') as f:
contents = yaml.load(f)
return contents
+
+
+ def remote(app, data):
+ r = requests.get(data.get('url'))
+
+ contents = yaml.load(r.data)
+
+ return contents
+
+
+ def main(app, data):
+ if data.get('filename'):
+ return local(app, data)
+
+ if data.get('url'):
+ return remote(app, data) | 19 | 1.357143 | 18 | 1 |
ae8cc8d73994e72bc42e1c6bfc9070ebc3faa29b | lib/twterm/user.rb | lib/twterm/user.rb | module Twterm
class User
attr_reader :color, :description, :favorites_count, :followers_count,
:friends_count, :id, :location, :name, :protected,
:screen_name, :statuses_count, :verified, :website
alias_method :protected?, :protected
alias_method :verified?, :verified
MAX_CACHED_TIME = 3600
COLORS = [:red, :blue, :green, :cyan, :yellow, :magenta]
def initialize(user)
@id = user.id
update!(user)
@color = COLORS[@id % 6]
end
def update!(user)
return self if recently_updated?
@name = user.name
@screen_name = user.screen_name
@description = user.description.is_a?(Twitter::NullObject) ? '' : user.description
@location = user.location.is_a?(Twitter::NullObject) ? '' : user.location
@website = user.website
@protected = user.protected?
@statuses_count = user.statuses_count
@favorites_count = user.favorites_count
@friends_count = user.friends_count
@followers_count = user.followers_count
@verified = user.verified?
@updated_at = Time.now
self
end
private
def recently_updated?
!@updated_at.nil? && @updated_at + 60 > Time.now
end
end
end
| module Twterm
class User
attr_reader :color, :description, :favorites_count, :followers_count,
:friends_count, :id, :location, :name, :protected,
:screen_name, :statuses_count, :verified, :website
alias_method :protected?, :protected
alias_method :verified?, :verified
COLORS = [:red, :blue, :green, :cyan, :yellow, :magenta]
def initialize(user)
@id = user.id
update!(user)
@color = COLORS[@id % 6]
end
def update!(user)
return self if recently_updated?
@name = user.name
@screen_name = user.screen_name
@description = user.description.is_a?(Twitter::NullObject) ? '' : user.description
@location = user.location.is_a?(Twitter::NullObject) ? '' : user.location
@website = user.website
@protected = user.protected?
@statuses_count = user.statuses_count
@favorites_count = user.favorites_count
@friends_count = user.friends_count
@followers_count = user.followers_count
@verified = user.verified?
@updated_at = Time.now
self
end
private
def recently_updated?
!@updated_at.nil? && @updated_at + 60 > Time.now
end
end
end
| Remove MAX_CACHED_TIME constant from User class | Remove MAX_CACHED_TIME constant from User class
| Ruby | mit | ryota-ka/twterm | ruby | ## Code Before:
module Twterm
class User
attr_reader :color, :description, :favorites_count, :followers_count,
:friends_count, :id, :location, :name, :protected,
:screen_name, :statuses_count, :verified, :website
alias_method :protected?, :protected
alias_method :verified?, :verified
MAX_CACHED_TIME = 3600
COLORS = [:red, :blue, :green, :cyan, :yellow, :magenta]
def initialize(user)
@id = user.id
update!(user)
@color = COLORS[@id % 6]
end
def update!(user)
return self if recently_updated?
@name = user.name
@screen_name = user.screen_name
@description = user.description.is_a?(Twitter::NullObject) ? '' : user.description
@location = user.location.is_a?(Twitter::NullObject) ? '' : user.location
@website = user.website
@protected = user.protected?
@statuses_count = user.statuses_count
@favorites_count = user.favorites_count
@friends_count = user.friends_count
@followers_count = user.followers_count
@verified = user.verified?
@updated_at = Time.now
self
end
private
def recently_updated?
!@updated_at.nil? && @updated_at + 60 > Time.now
end
end
end
## Instruction:
Remove MAX_CACHED_TIME constant from User class
## Code After:
module Twterm
class User
attr_reader :color, :description, :favorites_count, :followers_count,
:friends_count, :id, :location, :name, :protected,
:screen_name, :statuses_count, :verified, :website
alias_method :protected?, :protected
alias_method :verified?, :verified
COLORS = [:red, :blue, :green, :cyan, :yellow, :magenta]
def initialize(user)
@id = user.id
update!(user)
@color = COLORS[@id % 6]
end
def update!(user)
return self if recently_updated?
@name = user.name
@screen_name = user.screen_name
@description = user.description.is_a?(Twitter::NullObject) ? '' : user.description
@location = user.location.is_a?(Twitter::NullObject) ? '' : user.location
@website = user.website
@protected = user.protected?
@statuses_count = user.statuses_count
@favorites_count = user.favorites_count
@friends_count = user.friends_count
@followers_count = user.followers_count
@verified = user.verified?
@updated_at = Time.now
self
end
private
def recently_updated?
!@updated_at.nil? && @updated_at + 60 > Time.now
end
end
end
| module Twterm
class User
attr_reader :color, :description, :favorites_count, :followers_count,
:friends_count, :id, :location, :name, :protected,
:screen_name, :statuses_count, :verified, :website
alias_method :protected?, :protected
alias_method :verified?, :verified
- MAX_CACHED_TIME = 3600
COLORS = [:red, :blue, :green, :cyan, :yellow, :magenta]
def initialize(user)
@id = user.id
update!(user)
@color = COLORS[@id % 6]
end
def update!(user)
return self if recently_updated?
@name = user.name
@screen_name = user.screen_name
@description = user.description.is_a?(Twitter::NullObject) ? '' : user.description
@location = user.location.is_a?(Twitter::NullObject) ? '' : user.location
@website = user.website
@protected = user.protected?
@statuses_count = user.statuses_count
@favorites_count = user.favorites_count
@friends_count = user.friends_count
@followers_count = user.followers_count
@verified = user.verified?
@updated_at = Time.now
self
end
private
def recently_updated?
!@updated_at.nil? && @updated_at + 60 > Time.now
end
end
end | 1 | 0.022727 | 0 | 1 |
c6c0d3f53a4c24e79ea0691d89e52669da7ea7cb | src/config.js | src/config.js | const itemsPerPage = 100;
export const GITHUB_URL = `https://api.github.com/search/code?per_page=${itemsPerPage}&q=repo%3Atddbin%2Fkatas+language%3AJavaScript+path%3Akatas%2Fes6%2Flanguage`;
| const itemsPerPage = 100;
const searchQuery = encodeURIComponent('repo:tddbin/katas+language:JavaScript+path:katas/es6/language');
export const GITHUB_URL = `https://api.github.com/search/code?per_page=${itemsPerPage}&q=${searchQuery}`;
| Clean up this looong constant. | Clean up this looong constant. | JavaScript | mit | tddbin/es6katas.org | javascript | ## Code Before:
const itemsPerPage = 100;
export const GITHUB_URL = `https://api.github.com/search/code?per_page=${itemsPerPage}&q=repo%3Atddbin%2Fkatas+language%3AJavaScript+path%3Akatas%2Fes6%2Flanguage`;
## Instruction:
Clean up this looong constant.
## Code After:
const itemsPerPage = 100;
const searchQuery = encodeURIComponent('repo:tddbin/katas+language:JavaScript+path:katas/es6/language');
export const GITHUB_URL = `https://api.github.com/search/code?per_page=${itemsPerPage}&q=${searchQuery}`;
| const itemsPerPage = 100;
- export const GITHUB_URL = `https://api.github.com/search/code?per_page=${itemsPerPage}&q=repo%3Atddbin%2Fkatas+language%3AJavaScript+path%3Akatas%2Fes6%2Flanguage`;
+ const searchQuery = encodeURIComponent('repo:tddbin/katas+language:JavaScript+path:katas/es6/language');
+ export const GITHUB_URL = `https://api.github.com/search/code?per_page=${itemsPerPage}&q=${searchQuery}`;
| 3 | 1 | 2 | 1 |
1aa65a9da9c73cc212244e9fee7e9e18699c5972 | app/views/partials/foyer/ressources/montants.html | app/views/partials/foyer/ressources/montants.html | <div class="frame-foyer">
<h1>{{ pageTitle }}</h1>
<p>
Indiquez toutes vos ressources <strong>nettes</strong> perçues en France comme à l'étranger.
</p>
<form method="post" name="form" novalidate ng-submit="submit(form)">
<div class="ressources-individu">
<div class="clearfix"></div>
<div class="content">
<div ng-if="ressources.length">
<div ng-include="'partials/foyer/ressources/detail-montants.html'"></div>
</div>
</div>
<hr>
</div>
<div class="text-right">
<a title="Déclarer d'autres ressources" ui-sref="foyer.ressources.individu.types" class="btn btn-success">
Déclarer d'autres ressources
</a>
<button type="submit" class="btn btn-primary">
Valider <i class="fa fa-arrow-circle-right" aria-hidden="true"></i>
</button>
</div>
</form>
</div>
| <div class="frame-foyer">
<h1>{{ pageTitle }}</h1>
<p>
Indiquez toutes vos ressources <strong>nettes</strong> perçues en France comme à l'étranger.
</p>
<form method="post" name="form" novalidate ng-submit="submit(form)">
<div class="ressources-individu">
<div class="clearfix"></div>
<div class="content">
<div ng-if="ressources.length">
<div ng-include="'partials/foyer/ressources/detail-montants.html'"></div>
</div>
</div>
<hr>
</div>
<div class="pull-left">
<a title="Déclarer d'autres ressources" ui-sref="foyer.ressources.individu.types" class="btn btn-default">
<i class="fa fa-sm fa-arrow-left" aria-hidden="true"></i>
Déclarer d'autres ressources
</a>
</div>
<div class="text-right">
<button type="submit" class="btn btn-primary">
Valider <i class="fa fa-arrow-circle-right" aria-hidden="true"></i>
</button>
</div>
</form>
</div>
| Move and make ressources back button more discrete | Move and make ressources back button more discrete
| HTML | agpl-3.0 | sgmap/mes-aides-ui,sgmap/mes-aides-ui,sgmap/mes-aides-ui,sgmap/mes-aides-ui | html | ## Code Before:
<div class="frame-foyer">
<h1>{{ pageTitle }}</h1>
<p>
Indiquez toutes vos ressources <strong>nettes</strong> perçues en France comme à l'étranger.
</p>
<form method="post" name="form" novalidate ng-submit="submit(form)">
<div class="ressources-individu">
<div class="clearfix"></div>
<div class="content">
<div ng-if="ressources.length">
<div ng-include="'partials/foyer/ressources/detail-montants.html'"></div>
</div>
</div>
<hr>
</div>
<div class="text-right">
<a title="Déclarer d'autres ressources" ui-sref="foyer.ressources.individu.types" class="btn btn-success">
Déclarer d'autres ressources
</a>
<button type="submit" class="btn btn-primary">
Valider <i class="fa fa-arrow-circle-right" aria-hidden="true"></i>
</button>
</div>
</form>
</div>
## Instruction:
Move and make ressources back button more discrete
## Code After:
<div class="frame-foyer">
<h1>{{ pageTitle }}</h1>
<p>
Indiquez toutes vos ressources <strong>nettes</strong> perçues en France comme à l'étranger.
</p>
<form method="post" name="form" novalidate ng-submit="submit(form)">
<div class="ressources-individu">
<div class="clearfix"></div>
<div class="content">
<div ng-if="ressources.length">
<div ng-include="'partials/foyer/ressources/detail-montants.html'"></div>
</div>
</div>
<hr>
</div>
<div class="pull-left">
<a title="Déclarer d'autres ressources" ui-sref="foyer.ressources.individu.types" class="btn btn-default">
<i class="fa fa-sm fa-arrow-left" aria-hidden="true"></i>
Déclarer d'autres ressources
</a>
</div>
<div class="text-right">
<button type="submit" class="btn btn-primary">
Valider <i class="fa fa-arrow-circle-right" aria-hidden="true"></i>
</button>
</div>
</form>
</div>
| <div class="frame-foyer">
<h1>{{ pageTitle }}</h1>
<p>
Indiquez toutes vos ressources <strong>nettes</strong> perçues en France comme à l'étranger.
</p>
<form method="post" name="form" novalidate ng-submit="submit(form)">
<div class="ressources-individu">
<div class="clearfix"></div>
<div class="content">
<div ng-if="ressources.length">
<div ng-include="'partials/foyer/ressources/detail-montants.html'"></div>
</div>
</div>
<hr>
</div>
- <div class="text-right">
+ <div class="pull-left">
- <a title="Déclarer d'autres ressources" ui-sref="foyer.ressources.individu.types" class="btn btn-success">
? ^ ^^^^^
+ <a title="Déclarer d'autres ressources" ui-sref="foyer.ressources.individu.types" class="btn btn-default">
? ^^^^ ^^
+ <i class="fa fa-sm fa-arrow-left" aria-hidden="true"></i>
Déclarer d'autres ressources
</a>
+ </div>
+ <div class="text-right">
<button type="submit" class="btn btn-primary">
Valider <i class="fa fa-arrow-circle-right" aria-hidden="true"></i>
</button>
</div>
</form>
</div> | 7 | 0.28 | 5 | 2 |
0f248ea09dcbf80bcdc7ec6e54d310b17de04b6f | Casks/font-pt-sans.rb | Casks/font-pt-sans.rb | class FontPtSans < Cask
version '2.004'
sha256 'c70b683ab35d28cc65367f6b9ef5f04d6d83b1217f2e727648bbaeb12dc140e7'
url 'http://www.fontstock.com/public/PTSans.zip'
homepage 'http://www.paratype.com/public/'
license :ofl
font 'PTC55F.ttf'
font 'PTC75F.ttf'
font 'PTN57F.ttf'
font 'PTN77F.ttf'
font 'PTS55F.ttf'
font 'PTS56F.ttf'
font 'PTS75F.ttf'
font 'PTS76F.ttf'
end
| class FontPtSans < Cask
version '2.005'
sha256 '65c3352a864ac711e5381d56dc76ca4edfb511b5293f5560bca877e8f19a2fc9'
url 'http://www.paratype.com/uni/public/PTSans.zip'
homepage 'http://www.paratype.com/public/'
license :ofl
font 'PTC55F.ttf'
font 'PTC75F.ttf'
font 'PTN57F.ttf'
font 'PTN77F.ttf'
font 'PTS55F.ttf'
font 'PTS56F.ttf'
font 'PTS75F.ttf'
font 'PTS76F.ttf'
end
| Update PT Sans to 2.005 | Update PT Sans to 2.005
| Ruby | bsd-2-clause | kkung/homebrew-fonts,caskroom/homebrew-fonts,rstacruz/homebrew-fonts,scw/homebrew-fonts,bkudria/homebrew-fonts,RJHsiao/homebrew-fonts,scw/homebrew-fonts,sscotth/homebrew-fonts,guerrero/homebrew-fonts,RJHsiao/homebrew-fonts,victorpopkov/homebrew-fonts,psibre/homebrew-fonts,sscotth/homebrew-fonts,andrewsardone/homebrew-fonts,zorosteven/homebrew-fonts,kostasdizas/homebrew-fonts,kostasdizas/homebrew-fonts,psibre/homebrew-fonts,guerrero/homebrew-fonts,bkudria/homebrew-fonts,kkung/homebrew-fonts,andrewsardone/homebrew-fonts,zorosteven/homebrew-fonts,alerque/homebrew-fonts,elmariofredo/homebrew-fonts,herblover/homebrew-fonts,caskroom/homebrew-fonts,herblover/homebrew-fonts,mtakayuki/homebrew-fonts,alerque/homebrew-fonts,mtakayuki/homebrew-fonts,joeyhoer/homebrew-fonts,rstacruz/homebrew-fonts,elmariofredo/homebrew-fonts,joeyhoer/homebrew-fonts,unasuke/homebrew-fonts,victorpopkov/homebrew-fonts | ruby | ## Code Before:
class FontPtSans < Cask
version '2.004'
sha256 'c70b683ab35d28cc65367f6b9ef5f04d6d83b1217f2e727648bbaeb12dc140e7'
url 'http://www.fontstock.com/public/PTSans.zip'
homepage 'http://www.paratype.com/public/'
license :ofl
font 'PTC55F.ttf'
font 'PTC75F.ttf'
font 'PTN57F.ttf'
font 'PTN77F.ttf'
font 'PTS55F.ttf'
font 'PTS56F.ttf'
font 'PTS75F.ttf'
font 'PTS76F.ttf'
end
## Instruction:
Update PT Sans to 2.005
## Code After:
class FontPtSans < Cask
version '2.005'
sha256 '65c3352a864ac711e5381d56dc76ca4edfb511b5293f5560bca877e8f19a2fc9'
url 'http://www.paratype.com/uni/public/PTSans.zip'
homepage 'http://www.paratype.com/public/'
license :ofl
font 'PTC55F.ttf'
font 'PTC75F.ttf'
font 'PTN57F.ttf'
font 'PTN77F.ttf'
font 'PTS55F.ttf'
font 'PTS56F.ttf'
font 'PTS75F.ttf'
font 'PTS76F.ttf'
end
| class FontPtSans < Cask
- version '2.004'
? ^
+ version '2.005'
? ^
- sha256 'c70b683ab35d28cc65367f6b9ef5f04d6d83b1217f2e727648bbaeb12dc140e7'
+ sha256 '65c3352a864ac711e5381d56dc76ca4edfb511b5293f5560bca877e8f19a2fc9'
- url 'http://www.fontstock.com/public/PTSans.zip'
? ^^^ ^^^^^
+ url 'http://www.paratype.com/uni/public/PTSans.zip'
? ^^^^ ^^^ ++++
homepage 'http://www.paratype.com/public/'
license :ofl
font 'PTC55F.ttf'
font 'PTC75F.ttf'
font 'PTN57F.ttf'
font 'PTN77F.ttf'
font 'PTS55F.ttf'
font 'PTS56F.ttf'
font 'PTS75F.ttf'
font 'PTS76F.ttf'
end | 6 | 0.352941 | 3 | 3 |
47c94d8b2efa7d1a3641223665a1fbf0a2aab2c8 | config/govuk_index/migrated_formats.yaml | config/govuk_index/migrated_formats.yaml | migrated:
- answer
- help_page
- guide
- licence
- local_transaction
- place
- transaction
- simple_smart_answer
indexable: []
| migrated:
- answer
- help_page
- guide
- licence
- local_transaction
- place
- transaction
- simple_smart_answer
indexable: []
# We have not migrated the specialist formats as we encountered too many issues
# to resolve in the allotted time when we ran the comparer.
# The next step if to resolve the difference identified by the comparer task.
| Add note about Specialist formats migration | Add note about Specialist formats migration
| YAML | mit | alphagov/rummager,alphagov/rummager | yaml | ## Code Before:
migrated:
- answer
- help_page
- guide
- licence
- local_transaction
- place
- transaction
- simple_smart_answer
indexable: []
## Instruction:
Add note about Specialist formats migration
## Code After:
migrated:
- answer
- help_page
- guide
- licence
- local_transaction
- place
- transaction
- simple_smart_answer
indexable: []
# We have not migrated the specialist formats as we encountered too many issues
# to resolve in the allotted time when we ran the comparer.
# The next step if to resolve the difference identified by the comparer task.
| migrated:
- answer
- help_page
- guide
- licence
- local_transaction
- place
- transaction
- simple_smart_answer
indexable: []
+ # We have not migrated the specialist formats as we encountered too many issues
+ # to resolve in the allotted time when we ran the comparer.
+ # The next step if to resolve the difference identified by the comparer task. | 3 | 0.272727 | 3 | 0 |
39fb8e8ef10506fb4ae401d2de1c6ef0e27086f0 | regulations/static/regulations/js/source/models/preamble-model.js | regulations/static/regulations/js/source/models/preamble-model.js | 'use strict';
var URI = require('urijs');
var _ = require('underscore');
var Backbone = require('backbone');
var MetaModel = require('./meta-model');
Backbone.PreambleModel = MetaModel.extend({
getAJAXUrl: function(id) {
var path = ['preamble'].concat(id.split('-'));
if (window.APP_PREFIX) {
path = [window.APP_PREFIX].concat(path);
}
return URI()
.path(path.join('/'))
.addQuery({partial: 'true'})
.toString();
}
});
module.exports = new Backbone.PreambleModel({});
| 'use strict';
var URI = require('urijs');
var _ = require('underscore');
var Backbone = require('backbone');
var MetaModel = require('./meta-model');
Backbone.PreambleModel = MetaModel.extend({
getAJAXUrl: function(id) {
// window.APP_PREFIX always ends in a slash
var path = [window.APP_PREFIX + 'preamble'].concat(id.split('-'));
return URI()
.path(path.join('/'))
.addQuery({partial: 'true'})
.toString();
}
});
module.exports = new Backbone.PreambleModel({});
| Fix logic around AJAXing in preamble sections | Fix logic around AJAXing in preamble sections
| JavaScript | cc0-1.0 | eregs/regulations-site,tadhg-ohiggins/regulations-site,tadhg-ohiggins/regulations-site,eregs/regulations-site,18F/regulations-site,18F/regulations-site,18F/regulations-site,18F/regulations-site,tadhg-ohiggins/regulations-site,eregs/regulations-site,eregs/regulations-site,tadhg-ohiggins/regulations-site | javascript | ## Code Before:
'use strict';
var URI = require('urijs');
var _ = require('underscore');
var Backbone = require('backbone');
var MetaModel = require('./meta-model');
Backbone.PreambleModel = MetaModel.extend({
getAJAXUrl: function(id) {
var path = ['preamble'].concat(id.split('-'));
if (window.APP_PREFIX) {
path = [window.APP_PREFIX].concat(path);
}
return URI()
.path(path.join('/'))
.addQuery({partial: 'true'})
.toString();
}
});
module.exports = new Backbone.PreambleModel({});
## Instruction:
Fix logic around AJAXing in preamble sections
## Code After:
'use strict';
var URI = require('urijs');
var _ = require('underscore');
var Backbone = require('backbone');
var MetaModel = require('./meta-model');
Backbone.PreambleModel = MetaModel.extend({
getAJAXUrl: function(id) {
// window.APP_PREFIX always ends in a slash
var path = [window.APP_PREFIX + 'preamble'].concat(id.split('-'));
return URI()
.path(path.join('/'))
.addQuery({partial: 'true'})
.toString();
}
});
module.exports = new Backbone.PreambleModel({});
| 'use strict';
var URI = require('urijs');
var _ = require('underscore');
var Backbone = require('backbone');
var MetaModel = require('./meta-model');
Backbone.PreambleModel = MetaModel.extend({
getAJAXUrl: function(id) {
+ // window.APP_PREFIX always ends in a slash
- var path = ['preamble'].concat(id.split('-'));
+ var path = [window.APP_PREFIX + 'preamble'].concat(id.split('-'));
? ++++++++++++++++++++
- if (window.APP_PREFIX) {
- path = [window.APP_PREFIX].concat(path);
- }
return URI()
.path(path.join('/'))
.addQuery({partial: 'true'})
.toString();
}
});
module.exports = new Backbone.PreambleModel({}); | 6 | 0.285714 | 2 | 4 |
0939f9e32aa620132b444799f864056a097ead2d | test/e2e/main.js | test/e2e/main.js | 'use strict';
describe('Sign up page', function () {
var watchButton;
beforeEach(function () {
watchButton = element('.btn-primary');
});
it('should have Watch/Unwatch disabled by default', function() {
expect(watchButton.attr('disabled')).toBeTruthy();
});
it('should enable Watch/Unwatch button', function() {
input('#email').enter('banan@fluga.com');
expect(watchButton.attr('disabled')).toBeTruthy();
input('#url').enter('http://github.com');
expect(watchButton.attr('disabled')).toBeFalsy();
});
});
| 'use strict';
describe('Sign up page', function () {
var watchButton;
beforeEach(function () {
watchButton = element('.btn-primary');
});
it('should have Watch enabled by default', function() {
expect(watchButton.attr('disabled')).toBeFalsy();
});
it('should enable Watch/Unwatch button', function() {
input('#email').enter('banan@fluga.com');
expect(watchButton.attr('disabled')).toBeTruthy();
input('#url').enter('http://github.com');
expect(watchButton.attr('disabled')).toBeFalsy();
});
});
| Update default behavior of Watch button | Update default behavior of Watch button
| JavaScript | mit | seriema/npmalerts-web,seriema/npmalerts-web | javascript | ## Code Before:
'use strict';
describe('Sign up page', function () {
var watchButton;
beforeEach(function () {
watchButton = element('.btn-primary');
});
it('should have Watch/Unwatch disabled by default', function() {
expect(watchButton.attr('disabled')).toBeTruthy();
});
it('should enable Watch/Unwatch button', function() {
input('#email').enter('banan@fluga.com');
expect(watchButton.attr('disabled')).toBeTruthy();
input('#url').enter('http://github.com');
expect(watchButton.attr('disabled')).toBeFalsy();
});
});
## Instruction:
Update default behavior of Watch button
## Code After:
'use strict';
describe('Sign up page', function () {
var watchButton;
beforeEach(function () {
watchButton = element('.btn-primary');
});
it('should have Watch enabled by default', function() {
expect(watchButton.attr('disabled')).toBeFalsy();
});
it('should enable Watch/Unwatch button', function() {
input('#email').enter('banan@fluga.com');
expect(watchButton.attr('disabled')).toBeTruthy();
input('#url').enter('http://github.com');
expect(watchButton.attr('disabled')).toBeFalsy();
});
});
| 'use strict';
describe('Sign up page', function () {
var watchButton;
beforeEach(function () {
watchButton = element('.btn-primary');
});
- it('should have Watch/Unwatch disabled by default', function() {
? ^^ ---------
+ it('should have Watch enabled by default', function() {
? ^^
- expect(watchButton.attr('disabled')).toBeTruthy();
? ^^^^^
+ expect(watchButton.attr('disabled')).toBeFalsy();
? ^^^^
});
it('should enable Watch/Unwatch button', function() {
input('#email').enter('banan@fluga.com');
expect(watchButton.attr('disabled')).toBeTruthy();
input('#url').enter('http://github.com');
expect(watchButton.attr('disabled')).toBeFalsy();
});
}); | 4 | 0.181818 | 2 | 2 |
b1e6ac0eb389b3bd656bdc44892abae4911cde58 | validate.php | validate.php | <?php
namespace Lighwand\Validate;
use Lighwand\Validate\Loader\VideoLoader;
use Lighwand\Validate\Video\VideoValidator;
use Zend\ServiceManager\Config;
use Zend\ServiceManager\ServiceManager;
try {
require_once __DIR__ . '/vendor/autoload.php';
$config = include __DIR__ . '/validate/config.php';
$serviceManager = new ServiceManager(new Config($config['services']));
$return = 0;
$videoValidator = $serviceManager->get(VideoValidator::class);
$videoFiles = $serviceManager->get(VideoLoader::class)->getFiles();
foreach ($videoFiles as $file) {
if (!$videoValidator->isValid($file)) {
$return = 1;
echo join(PHP_EOL, $videoValidator->getMessages()) . PHP_EOL;
}
}
return $return;
} catch (\Exception $e) {
echo $e->getMessage();
return 1;
} | <?php
namespace Lighwand\Validate;
use Lighwand\Validate\Loader\VideoLoader;
use Lighwand\Validate\Video\VideoValidator;
use Zend\ServiceManager\Config;
use Zend\ServiceManager\ServiceManager;
try {
require_once __DIR__ . '/vendor/autoload.php';
$config = include __DIR__ . '/validate/config.php';
$serviceManager = new ServiceManager(new Config($config['services']));
$return = 0;
$videoValidator = $serviceManager->get(VideoValidator::class);
$videoFiles = $serviceManager->get(VideoLoader::class)->getFiles();
foreach ($videoFiles as $file) {
if (!$videoValidator->isValid($file)) {
$return = 1;
echo join(PHP_EOL, $videoValidator->getMessages()) . PHP_EOL;
}
}
if ($return === 0) {
echo 'Everything is valid!' . PHP_EOL;
} else {
echo 'Invalid data found.' . PHP_EOL;
}
return $return;
} catch (\Exception $e) {
echo $e->getMessage();
return 1;
} | Add message to tell if there were errors or not | Add message to tell if there were errors or not
| PHP | mit | chrstphlbr/techtalks_data,MidnightDesign/techtalks_data | php | ## Code Before:
<?php
namespace Lighwand\Validate;
use Lighwand\Validate\Loader\VideoLoader;
use Lighwand\Validate\Video\VideoValidator;
use Zend\ServiceManager\Config;
use Zend\ServiceManager\ServiceManager;
try {
require_once __DIR__ . '/vendor/autoload.php';
$config = include __DIR__ . '/validate/config.php';
$serviceManager = new ServiceManager(new Config($config['services']));
$return = 0;
$videoValidator = $serviceManager->get(VideoValidator::class);
$videoFiles = $serviceManager->get(VideoLoader::class)->getFiles();
foreach ($videoFiles as $file) {
if (!$videoValidator->isValid($file)) {
$return = 1;
echo join(PHP_EOL, $videoValidator->getMessages()) . PHP_EOL;
}
}
return $return;
} catch (\Exception $e) {
echo $e->getMessage();
return 1;
}
## Instruction:
Add message to tell if there were errors or not
## Code After:
<?php
namespace Lighwand\Validate;
use Lighwand\Validate\Loader\VideoLoader;
use Lighwand\Validate\Video\VideoValidator;
use Zend\ServiceManager\Config;
use Zend\ServiceManager\ServiceManager;
try {
require_once __DIR__ . '/vendor/autoload.php';
$config = include __DIR__ . '/validate/config.php';
$serviceManager = new ServiceManager(new Config($config['services']));
$return = 0;
$videoValidator = $serviceManager->get(VideoValidator::class);
$videoFiles = $serviceManager->get(VideoLoader::class)->getFiles();
foreach ($videoFiles as $file) {
if (!$videoValidator->isValid($file)) {
$return = 1;
echo join(PHP_EOL, $videoValidator->getMessages()) . PHP_EOL;
}
}
if ($return === 0) {
echo 'Everything is valid!' . PHP_EOL;
} else {
echo 'Invalid data found.' . PHP_EOL;
}
return $return;
} catch (\Exception $e) {
echo $e->getMessage();
return 1;
} | <?php
namespace Lighwand\Validate;
use Lighwand\Validate\Loader\VideoLoader;
use Lighwand\Validate\Video\VideoValidator;
use Zend\ServiceManager\Config;
use Zend\ServiceManager\ServiceManager;
try {
require_once __DIR__ . '/vendor/autoload.php';
$config = include __DIR__ . '/validate/config.php';
$serviceManager = new ServiceManager(new Config($config['services']));
$return = 0;
$videoValidator = $serviceManager->get(VideoValidator::class);
$videoFiles = $serviceManager->get(VideoLoader::class)->getFiles();
foreach ($videoFiles as $file) {
if (!$videoValidator->isValid($file)) {
$return = 1;
echo join(PHP_EOL, $videoValidator->getMessages()) . PHP_EOL;
}
}
+ if ($return === 0) {
+ echo 'Everything is valid!' . PHP_EOL;
+ } else {
+ echo 'Invalid data found.' . PHP_EOL;
+ }
+
return $return;
} catch (\Exception $e) {
echo $e->getMessage();
return 1;
} | 6 | 0.193548 | 6 | 0 |
bac36a47dbc0dc89e2cc63dc3b692aa182dace20 | metadata/com.corvettecole.gotosleep.yml | metadata/com.corvettecole.gotosleep.yml | Categories:
- Sports & Health
License: GPL-3.0-only
WebSite: https://sleep.corvettecole.com/
SourceCode: https://github.com/CorvetteCole/GotoSleep
IssueTracker: https://github.com/CorvetteCole/GotoSleep/issues
Changelog: https://github.com/CorvetteCole/GotoSleep/releases
Donate: http://paypal.me/CGerdemann
AutoName: Go to Sleep
Summary: Reminds you to go to sleep... until you do
Description: |-
GotoSleep reminds you when it's time to go to bed. But it also lets you
setup custom reminders. It also lets you use "smart reminders" – which nag
you until you keep your fingers off the device.
RepoType: git
Repo: https://github.com/CorvetteCole/GotoSleep
Builds:
- versionName: 1.2.4.10
versionCode: 50
commit: 1.2.4.10
subdir: app
gradle:
- yes
AutoUpdateMode: Version %v
UpdateCheckMode: Tags
CurrentVersion: 1.2.4.10
CurrentVersionCode: 50
| Categories:
- Sports & Health
License: GPL-3.0-only
WebSite: https://sleep.corvettecole.com/
SourceCode: https://github.com/CorvetteCole/GotoSleep
IssueTracker: https://github.com/CorvetteCole/GotoSleep/issues
Changelog: https://github.com/CorvetteCole/GotoSleep/releases
Donate: http://paypal.me/CGerdemann
AutoName: Go to Sleep
Summary: Reminds you to go to sleep... until you do
Description: |-
GotoSleep reminds you when it's time to go to bed. But it also lets you
setup custom reminders. It also lets you use "smart reminders" – which nag
you until you keep your fingers off the device.
RepoType: git
Repo: https://github.com/CorvetteCole/GotoSleep
Builds:
- versionName: 1.2.4.10
versionCode: 50
commit: 1.2.4.10
subdir: app
gradle:
- yes
- versionName: 1.2.5.5
versionCode: 57
commit: 1.2.5.5
subdir: app
gradle:
- yes
AutoUpdateMode: Version %v
UpdateCheckMode: Tags
CurrentVersion: 1.2.5.5
CurrentVersionCode: 57
| Update Go to Sleep to 1.2.5.5 (57) | Update Go to Sleep to 1.2.5.5 (57)
| YAML | agpl-3.0 | f-droid/fdroiddata,f-droid/fdroid-data,f-droid/fdroiddata | yaml | ## Code Before:
Categories:
- Sports & Health
License: GPL-3.0-only
WebSite: https://sleep.corvettecole.com/
SourceCode: https://github.com/CorvetteCole/GotoSleep
IssueTracker: https://github.com/CorvetteCole/GotoSleep/issues
Changelog: https://github.com/CorvetteCole/GotoSleep/releases
Donate: http://paypal.me/CGerdemann
AutoName: Go to Sleep
Summary: Reminds you to go to sleep... until you do
Description: |-
GotoSleep reminds you when it's time to go to bed. But it also lets you
setup custom reminders. It also lets you use "smart reminders" – which nag
you until you keep your fingers off the device.
RepoType: git
Repo: https://github.com/CorvetteCole/GotoSleep
Builds:
- versionName: 1.2.4.10
versionCode: 50
commit: 1.2.4.10
subdir: app
gradle:
- yes
AutoUpdateMode: Version %v
UpdateCheckMode: Tags
CurrentVersion: 1.2.4.10
CurrentVersionCode: 50
## Instruction:
Update Go to Sleep to 1.2.5.5 (57)
## Code After:
Categories:
- Sports & Health
License: GPL-3.0-only
WebSite: https://sleep.corvettecole.com/
SourceCode: https://github.com/CorvetteCole/GotoSleep
IssueTracker: https://github.com/CorvetteCole/GotoSleep/issues
Changelog: https://github.com/CorvetteCole/GotoSleep/releases
Donate: http://paypal.me/CGerdemann
AutoName: Go to Sleep
Summary: Reminds you to go to sleep... until you do
Description: |-
GotoSleep reminds you when it's time to go to bed. But it also lets you
setup custom reminders. It also lets you use "smart reminders" – which nag
you until you keep your fingers off the device.
RepoType: git
Repo: https://github.com/CorvetteCole/GotoSleep
Builds:
- versionName: 1.2.4.10
versionCode: 50
commit: 1.2.4.10
subdir: app
gradle:
- yes
- versionName: 1.2.5.5
versionCode: 57
commit: 1.2.5.5
subdir: app
gradle:
- yes
AutoUpdateMode: Version %v
UpdateCheckMode: Tags
CurrentVersion: 1.2.5.5
CurrentVersionCode: 57
| Categories:
- Sports & Health
License: GPL-3.0-only
WebSite: https://sleep.corvettecole.com/
SourceCode: https://github.com/CorvetteCole/GotoSleep
IssueTracker: https://github.com/CorvetteCole/GotoSleep/issues
Changelog: https://github.com/CorvetteCole/GotoSleep/releases
Donate: http://paypal.me/CGerdemann
AutoName: Go to Sleep
Summary: Reminds you to go to sleep... until you do
Description: |-
GotoSleep reminds you when it's time to go to bed. But it also lets you
setup custom reminders. It also lets you use "smart reminders" – which nag
you until you keep your fingers off the device.
RepoType: git
Repo: https://github.com/CorvetteCole/GotoSleep
Builds:
- versionName: 1.2.4.10
versionCode: 50
commit: 1.2.4.10
subdir: app
gradle:
- yes
+ - versionName: 1.2.5.5
+ versionCode: 57
+ commit: 1.2.5.5
+ subdir: app
+ gradle:
+ - yes
+
AutoUpdateMode: Version %v
UpdateCheckMode: Tags
- CurrentVersion: 1.2.4.10
? ^ ^^
+ CurrentVersion: 1.2.5.5
? ^ ^
- CurrentVersionCode: 50
? ^
+ CurrentVersionCode: 57
? ^
| 11 | 0.354839 | 9 | 2 |
7474762bb4264eb1d98eec6020e519ef9deb81fa | app/assets/stylesheets/components/cards/cards/_cards-articles.scss | app/assets/stylesheets/components/cards/cards/_cards-articles.scss | //--------------------------------------------------
// classes
//--------------------------------------------------
&--articles {
.cards {
&__cards {
@include flex;
@include flex-h-between;
@include flex-wrap;
}
}
.card {
@include responsive(margin-bottom, rem-calc(20), rem-calc(30), rem-calc(30));
@include responsive(width, 100%, 48.5%, 48.5%);
text-decoration: none;
&__content {
@include responsive(padding, rem-calc(26 20), rem-calc(28 20), rem-calc(30 20));
}
&__date { margin: 0; }
&__h3 { margin: .5em 0; }
&__summary { margin: 0 }
&__image {
@include flex-center;
background-color: $grey-light;
background-position: center;
background-size: cover;
width: 100%; height: rem-calc(265);
}
&__icon {
@include icon-placeholder-image;
}
}
} | //--------------------------------------------------
// classes
//--------------------------------------------------
&--articles {
.cards {
&__cards {
@include flex;
@include flex-h-between;
@include flex-wrap;
}
}
.card {
@include responsive(margin-bottom, rem-calc(20), rem-calc(30), rem-calc(30));
@include responsive(width, 100%, 48.5%, 48.5%);
text-decoration: none;
&__content {
@include responsive(padding, rem-calc(26 20), rem-calc(28 20), rem-calc(30 20));
}
&__date {
font-size: rem-calc(14);
margin: 0;
}
&__h3 { margin: .5em 0; }
&__summary { margin: 0 }
&__image {
@include flex-center;
background-color: $grey-light;
background-position: center;
background-size: cover;
width: 100%; height: rem-calc(265);
}
&__icon {
@include icon-placeholder-image;
}
}
} | Update font size of date in the news article cards | Update font size of date in the news article cards
| SCSS | bsd-3-clause | unepwcmc/ProtectedPlanet,unepwcmc/ProtectedPlanet,unepwcmc/ProtectedPlanet,unepwcmc/ProtectedPlanet,unepwcmc/ProtectedPlanet | scss | ## Code Before:
//--------------------------------------------------
// classes
//--------------------------------------------------
&--articles {
.cards {
&__cards {
@include flex;
@include flex-h-between;
@include flex-wrap;
}
}
.card {
@include responsive(margin-bottom, rem-calc(20), rem-calc(30), rem-calc(30));
@include responsive(width, 100%, 48.5%, 48.5%);
text-decoration: none;
&__content {
@include responsive(padding, rem-calc(26 20), rem-calc(28 20), rem-calc(30 20));
}
&__date { margin: 0; }
&__h3 { margin: .5em 0; }
&__summary { margin: 0 }
&__image {
@include flex-center;
background-color: $grey-light;
background-position: center;
background-size: cover;
width: 100%; height: rem-calc(265);
}
&__icon {
@include icon-placeholder-image;
}
}
}
## Instruction:
Update font size of date in the news article cards
## Code After:
//--------------------------------------------------
// classes
//--------------------------------------------------
&--articles {
.cards {
&__cards {
@include flex;
@include flex-h-between;
@include flex-wrap;
}
}
.card {
@include responsive(margin-bottom, rem-calc(20), rem-calc(30), rem-calc(30));
@include responsive(width, 100%, 48.5%, 48.5%);
text-decoration: none;
&__content {
@include responsive(padding, rem-calc(26 20), rem-calc(28 20), rem-calc(30 20));
}
&__date {
font-size: rem-calc(14);
margin: 0;
}
&__h3 { margin: .5em 0; }
&__summary { margin: 0 }
&__image {
@include flex-center;
background-color: $grey-light;
background-position: center;
background-size: cover;
width: 100%; height: rem-calc(265);
}
&__icon {
@include icon-placeholder-image;
}
}
} | //--------------------------------------------------
// classes
//--------------------------------------------------
&--articles {
.cards {
&__cards {
@include flex;
@include flex-h-between;
@include flex-wrap;
}
}
.card {
@include responsive(margin-bottom, rem-calc(20), rem-calc(30), rem-calc(30));
@include responsive(width, 100%, 48.5%, 48.5%);
text-decoration: none;
&__content {
@include responsive(padding, rem-calc(26 20), rem-calc(28 20), rem-calc(30 20));
}
+ &__date {
+ font-size: rem-calc(14);
- &__date { margin: 0; }
? ------- - -
+ margin: 0;
+ }
+
&__h3 { margin: .5em 0; }
&__summary { margin: 0 }
&__image {
@include flex-center;
background-color: $grey-light;
background-position: center;
background-size: cover;
width: 100%; height: rem-calc(265);
}
&__icon {
@include icon-placeholder-image;
}
}
} | 6 | 0.157895 | 5 | 1 |
41e591ff426be8102abfd21e45043d3bad6b5e80 | config/settings.example.yml | config/settings.example.yml | development: &base
database_url: 'postgres://localhost/formalist_demo_development'
session_secret: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
assets_server_url: "http://localhost:1234"
attache_host:
attache_secret_key:
test:
<<: *base
database_url: 'postgres://localhost/formalist_demo_test'
production:
<<: *base
| development: &base
database_url: 'postgres://localhost/formalist_demo_development'
session_secret: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
assets_server_link_url: "http://localhost:1234"
assets_server_read_url: "http://localhost:1234"
attache_host:
attache_secret_key:
test:
<<: *base
database_url: 'postgres://localhost/formalist_demo_test'
production:
<<: *base
| Fix missing settings 'assets_server_link_url' and 'assets_server_read_url' | Fix missing settings 'assets_server_link_url' and 'assets_server_read_url'
| YAML | mit | icelab/formalist-demo,icelab/formalist-demo,icelab/formalist-demo | yaml | ## Code Before:
development: &base
database_url: 'postgres://localhost/formalist_demo_development'
session_secret: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
assets_server_url: "http://localhost:1234"
attache_host:
attache_secret_key:
test:
<<: *base
database_url: 'postgres://localhost/formalist_demo_test'
production:
<<: *base
## Instruction:
Fix missing settings 'assets_server_link_url' and 'assets_server_read_url'
## Code After:
development: &base
database_url: 'postgres://localhost/formalist_demo_development'
session_secret: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
assets_server_link_url: "http://localhost:1234"
assets_server_read_url: "http://localhost:1234"
attache_host:
attache_secret_key:
test:
<<: *base
database_url: 'postgres://localhost/formalist_demo_test'
production:
<<: *base
| development: &base
database_url: 'postgres://localhost/formalist_demo_development'
session_secret: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
- assets_server_url: "http://localhost:1234"
+ assets_server_link_url: "http://localhost:1234"
? +++++
+ assets_server_read_url: "http://localhost:1234"
attache_host:
attache_secret_key:
test:
<<: *base
database_url: 'postgres://localhost/formalist_demo_test'
production:
<<: *base | 3 | 0.272727 | 2 | 1 |
bc47862e89f73ec152a57bf43126653a981cd411 | suggestions/tests.py | suggestions/tests.py | from django.test import TestCase
from django.contrib.auth.models import User
from mks.models import Member
from .models import Suggestion
class SuggestionsTests(TestCase):
def setUp(self):
self.member = Member.objects.create(name='mk_1')
self.regular_user = User.objects.create_user('reg_user')
def test_simple_text_suggestion(self):
MK_SITE = 'http://mk1.example.com'
suggestion = Suggestion.objects.create_suggestion(
suggested_by=self.regular_user,
content_object=self.member,
suggestion_action=Suggestion.UPDATE,
suggested_field='website',
suggested_text=MK_SITE
)
self.assertIsNone(self.member.website)
suggestion.auto_apply()
mk = Member.objects.get(pk=self.member.pk)
self.assertEqual(mk.website, MK_SITE)
| from django.test import TestCase
from django.contrib.auth.models import User
from mks.models import Member
from .models import Suggestion
class SuggestionsTests(TestCase):
def setUp(self):
self.member = Member.objects.create(name='mk_1')
self.regular_user = User.objects.create_user('reg_user')
def test_simple_text_suggestion(self):
MK_SITE = 'http://mk1.example.com'
suggestion = Suggestion.objects.create_suggestion(
suggested_by=self.regular_user,
content_object=self.member,
suggestion_action=Suggestion.UPDATE,
suggested_field='website',
suggested_text=MK_SITE
)
self.assertIsNone(self.member.website)
suggestion.auto_apply()
mk = Member.objects.get(pk=self.member.pk)
self.assertEqual(mk.website, MK_SITE)
# cleanup
mk.website = None
mk.save()
self.member = mk
| Undo member changes in test | Undo member changes in test
| Python | bsd-3-clause | MeirKriheli/Open-Knesset,jspan/Open-Knesset,navotsil/Open-Knesset,navotsil/Open-Knesset,DanaOshri/Open-Knesset,alonisser/Open-Knesset,jspan/Open-Knesset,noamelf/Open-Knesset,daonb/Open-Knesset,habeanf/Open-Knesset,noamelf/Open-Knesset,DanaOshri/Open-Knesset,OriHoch/Open-Knesset,otadmor/Open-Knesset,alonisser/Open-Knesset,MeirKriheli/Open-Knesset,ofri/Open-Knesset,Shrulik/Open-Knesset,navotsil/Open-Knesset,Shrulik/Open-Knesset,ofri/Open-Knesset,ofri/Open-Knesset,otadmor/Open-Knesset,otadmor/Open-Knesset,Shrulik/Open-Knesset,daonb/Open-Knesset,daonb/Open-Knesset,MeirKriheli/Open-Knesset,navotsil/Open-Knesset,noamelf/Open-Knesset,Shrulik/Open-Knesset,jspan/Open-Knesset,OriHoch/Open-Knesset,OriHoch/Open-Knesset,alonisser/Open-Knesset,habeanf/Open-Knesset,DanaOshri/Open-Knesset,OriHoch/Open-Knesset,otadmor/Open-Knesset,daonb/Open-Knesset,habeanf/Open-Knesset,ofri/Open-Knesset,noamelf/Open-Knesset,alonisser/Open-Knesset,MeirKriheli/Open-Knesset,habeanf/Open-Knesset,jspan/Open-Knesset,DanaOshri/Open-Knesset | python | ## Code Before:
from django.test import TestCase
from django.contrib.auth.models import User
from mks.models import Member
from .models import Suggestion
class SuggestionsTests(TestCase):
def setUp(self):
self.member = Member.objects.create(name='mk_1')
self.regular_user = User.objects.create_user('reg_user')
def test_simple_text_suggestion(self):
MK_SITE = 'http://mk1.example.com'
suggestion = Suggestion.objects.create_suggestion(
suggested_by=self.regular_user,
content_object=self.member,
suggestion_action=Suggestion.UPDATE,
suggested_field='website',
suggested_text=MK_SITE
)
self.assertIsNone(self.member.website)
suggestion.auto_apply()
mk = Member.objects.get(pk=self.member.pk)
self.assertEqual(mk.website, MK_SITE)
## Instruction:
Undo member changes in test
## Code After:
from django.test import TestCase
from django.contrib.auth.models import User
from mks.models import Member
from .models import Suggestion
class SuggestionsTests(TestCase):
def setUp(self):
self.member = Member.objects.create(name='mk_1')
self.regular_user = User.objects.create_user('reg_user')
def test_simple_text_suggestion(self):
MK_SITE = 'http://mk1.example.com'
suggestion = Suggestion.objects.create_suggestion(
suggested_by=self.regular_user,
content_object=self.member,
suggestion_action=Suggestion.UPDATE,
suggested_field='website',
suggested_text=MK_SITE
)
self.assertIsNone(self.member.website)
suggestion.auto_apply()
mk = Member.objects.get(pk=self.member.pk)
self.assertEqual(mk.website, MK_SITE)
# cleanup
mk.website = None
mk.save()
self.member = mk
| from django.test import TestCase
from django.contrib.auth.models import User
from mks.models import Member
from .models import Suggestion
class SuggestionsTests(TestCase):
def setUp(self):
self.member = Member.objects.create(name='mk_1')
self.regular_user = User.objects.create_user('reg_user')
def test_simple_text_suggestion(self):
MK_SITE = 'http://mk1.example.com'
suggestion = Suggestion.objects.create_suggestion(
suggested_by=self.regular_user,
content_object=self.member,
suggestion_action=Suggestion.UPDATE,
suggested_field='website',
suggested_text=MK_SITE
)
self.assertIsNone(self.member.website)
suggestion.auto_apply()
mk = Member.objects.get(pk=self.member.pk)
self.assertEqual(mk.website, MK_SITE)
+
+ # cleanup
+ mk.website = None
+ mk.save()
+
+ self.member = mk | 6 | 0.2 | 6 | 0 |
f6ac4ee3be575b32167142f33ac5bf76ccedff3d | quattor/filesystems.pan | quattor/filesystems.pan | @{
type definitions for filesystems
}
declaration template quattor/filesystems;
@{
Filestystem definition
}
type structure_filesystem = {
"block_device" : string with exists ("/system/blockdevices/" + SELF)
# "References an entry in /software/components/blockdevices"
"format" : boolean
"preserve" : boolean
"mountpoint" : string
"mount" : boolean
"mountopts" : string = "defaults" # "Mount options"
"type" : string with match (SELF,
"^(ext[2-4]|reiserfs|reiser4|xfs|swap|vfat|jfs|ntfs|tmpfs|none)$")
# "Filesystem type."
"quota" ? long # "Quota percentage"
"freq" : long = 0 # "Dump frequency"
"pass" : long = 0 # "fsck pass number"
"mkfsopts" ? string # Extra options passed to mkfs.
"tuneopts" ? string # Options for filesystem tuning commands (tune2fs, xfs_admin...)
"label" ? string # Filesystem label, as in LABEL=foo
};
| @{
type definitions for filesystems
}
declaration template quattor/filesystems;
@{
Filestystem definition
}
type structure_filesystem = {
"block_device" : string with exists ("/system/blockdevices/" + SELF)
# "References an entry in /software/components/blockdevices"
"format" : boolean
"preserve" : boolean
"mountpoint" : string
"mount" : boolean
"mountopts" : string = "defaults" # "Mount options"
"type" : string with match (SELF,
"^(ext[2-4]|reiserfs|reiser4|xfs|swap|vfat|jfs|ntfs|tmpfs|none)$")
# "Filesystem type."
"quota" ? long # "Quota percentage"
"freq" : long = 0 # "Dump frequency"
"pass" : long = 0 # "fsck pass number"
"mkfsopts" ? string # Extra options passed to mkfs.
"tuneopts" ? string # Options for filesystem tuning commands (tune2fs, xfs_admin...)
"label" ? string # Filesystem label, as in LABEL=foo
"ksfsformat" ? boolean # If true, anaconda formats the filesystem (with undef/false, --noformat is used)
};
| Add optional ksfsformat filesystem attribute | Add optional ksfsformat filesystem attribute
| Pan | apache-2.0 | jrha/template-library-core,jouvin/template-library-core,quattor/template-library-core,apdibbo/template-library-core,alvarosimon/template-library-core | pan | ## Code Before:
@{
type definitions for filesystems
}
declaration template quattor/filesystems;
@{
Filestystem definition
}
type structure_filesystem = {
"block_device" : string with exists ("/system/blockdevices/" + SELF)
# "References an entry in /software/components/blockdevices"
"format" : boolean
"preserve" : boolean
"mountpoint" : string
"mount" : boolean
"mountopts" : string = "defaults" # "Mount options"
"type" : string with match (SELF,
"^(ext[2-4]|reiserfs|reiser4|xfs|swap|vfat|jfs|ntfs|tmpfs|none)$")
# "Filesystem type."
"quota" ? long # "Quota percentage"
"freq" : long = 0 # "Dump frequency"
"pass" : long = 0 # "fsck pass number"
"mkfsopts" ? string # Extra options passed to mkfs.
"tuneopts" ? string # Options for filesystem tuning commands (tune2fs, xfs_admin...)
"label" ? string # Filesystem label, as in LABEL=foo
};
## Instruction:
Add optional ksfsformat filesystem attribute
## Code After:
@{
type definitions for filesystems
}
declaration template quattor/filesystems;
@{
Filestystem definition
}
type structure_filesystem = {
"block_device" : string with exists ("/system/blockdevices/" + SELF)
# "References an entry in /software/components/blockdevices"
"format" : boolean
"preserve" : boolean
"mountpoint" : string
"mount" : boolean
"mountopts" : string = "defaults" # "Mount options"
"type" : string with match (SELF,
"^(ext[2-4]|reiserfs|reiser4|xfs|swap|vfat|jfs|ntfs|tmpfs|none)$")
# "Filesystem type."
"quota" ? long # "Quota percentage"
"freq" : long = 0 # "Dump frequency"
"pass" : long = 0 # "fsck pass number"
"mkfsopts" ? string # Extra options passed to mkfs.
"tuneopts" ? string # Options for filesystem tuning commands (tune2fs, xfs_admin...)
"label" ? string # Filesystem label, as in LABEL=foo
"ksfsformat" ? boolean # If true, anaconda formats the filesystem (with undef/false, --noformat is used)
};
| @{
type definitions for filesystems
}
declaration template quattor/filesystems;
@{
Filestystem definition
}
type structure_filesystem = {
"block_device" : string with exists ("/system/blockdevices/" + SELF)
# "References an entry in /software/components/blockdevices"
"format" : boolean
"preserve" : boolean
"mountpoint" : string
"mount" : boolean
"mountopts" : string = "defaults" # "Mount options"
"type" : string with match (SELF,
"^(ext[2-4]|reiserfs|reiser4|xfs|swap|vfat|jfs|ntfs|tmpfs|none)$")
# "Filesystem type."
"quota" ? long # "Quota percentage"
"freq" : long = 0 # "Dump frequency"
"pass" : long = 0 # "fsck pass number"
"mkfsopts" ? string # Extra options passed to mkfs.
"tuneopts" ? string # Options for filesystem tuning commands (tune2fs, xfs_admin...)
"label" ? string # Filesystem label, as in LABEL=foo
+ "ksfsformat" ? boolean # If true, anaconda formats the filesystem (with undef/false, --noformat is used)
}; | 1 | 0.038462 | 1 | 0 |
a5dc54dfaed0949b49f1b25329a50601710991f4 | src/components/assets/Credits.sass | src/components/assets/Credits.sass | @import ../../vendor/lib
.Credits
+sans-typeset
transition: color $speed ease, opacity $speed ease
position: absolute
bottom: rem(10)
right: rem(10)
color: white
.no-touch .Credits:hover
color: #ccc
.CreditsAuthor
display: inline-block
line-height: 1.2
margin-left: rem(10)
margin-right: rem(15)
border-bottom: 1px solid
.hideCredits .Credits
opacity: 0
pointer-events: none
@media(min-width: #{$break-2})
.Credits
bottom: rem(20)
right: rem(20)
@media(min-width: #{$break-4})
.Credits
right: rem(40)
| @import ../../vendor/lib
.Credits
+sans-typeset
transition: color $speed ease, opacity $speed ease
position: absolute
bottom: rem(10)
right: rem(10)
color: white
.no-touch .Credits:hover
color: #ccc
.CreditsAuthor
display: inline-block
line-height: 1.2
margin-left: rem(10)
margin-right: rem(15)
border-bottom: 1px solid
.hideCredits .Credits
opacity: 0
pointer-events: none
.Credits .Avatar.isFailing
display: none
@media(min-width: #{$break-2})
.Credits
bottom: rem(20)
right: rem(20)
@media(min-width: #{$break-4})
.Credits
right: rem(40)
| Hide missing Avatars in a promotions credits | Hide missing Avatars in a promotions credits
At times user’s may change their existing Avatar which results in Avatars displaying their error state. This just hides them entirely. | Sass | mit | ello/webapp,ello/webapp,ello/webapp | sass | ## Code Before:
@import ../../vendor/lib
.Credits
+sans-typeset
transition: color $speed ease, opacity $speed ease
position: absolute
bottom: rem(10)
right: rem(10)
color: white
.no-touch .Credits:hover
color: #ccc
.CreditsAuthor
display: inline-block
line-height: 1.2
margin-left: rem(10)
margin-right: rem(15)
border-bottom: 1px solid
.hideCredits .Credits
opacity: 0
pointer-events: none
@media(min-width: #{$break-2})
.Credits
bottom: rem(20)
right: rem(20)
@media(min-width: #{$break-4})
.Credits
right: rem(40)
## Instruction:
Hide missing Avatars in a promotions credits
At times user’s may change their existing Avatar which results in Avatars displaying their error state. This just hides them entirely.
## Code After:
@import ../../vendor/lib
.Credits
+sans-typeset
transition: color $speed ease, opacity $speed ease
position: absolute
bottom: rem(10)
right: rem(10)
color: white
.no-touch .Credits:hover
color: #ccc
.CreditsAuthor
display: inline-block
line-height: 1.2
margin-left: rem(10)
margin-right: rem(15)
border-bottom: 1px solid
.hideCredits .Credits
opacity: 0
pointer-events: none
.Credits .Avatar.isFailing
display: none
@media(min-width: #{$break-2})
.Credits
bottom: rem(20)
right: rem(20)
@media(min-width: #{$break-4})
.Credits
right: rem(40)
| @import ../../vendor/lib
.Credits
+sans-typeset
transition: color $speed ease, opacity $speed ease
position: absolute
bottom: rem(10)
right: rem(10)
color: white
.no-touch .Credits:hover
color: #ccc
.CreditsAuthor
display: inline-block
line-height: 1.2
margin-left: rem(10)
margin-right: rem(15)
border-bottom: 1px solid
.hideCredits .Credits
opacity: 0
pointer-events: none
+ .Credits .Avatar.isFailing
+ display: none
+
@media(min-width: #{$break-2})
.Credits
bottom: rem(20)
right: rem(20)
@media(min-width: #{$break-4})
.Credits
right: rem(40)
| 3 | 0.09375 | 3 | 0 |
ca6a4973688d84be1396a75ae83ea278296e01ac | src/app/elements/ContentHtml/index.jsx | src/app/elements/ContentHtml/index.jsx | /* eslint-disable react/no-danger */
import React from 'react';
import cheerio from 'cheerio';
import CaptureLinks from '../CaptureLinks';
import * as libs from '../../libs';
const ContentHtml = ({ html, linksColor }) => {
const $ = cheerio.load(html);
$('a').attr('style', `color: ${libs.darkenColor(linksColor)};`).attr('target', '_blank');
return (
<CaptureLinks>
<div
style={{ overflow: 'hidden' }}
className="content is-medium"
dangerouslySetInnerHTML={{ __html: $.html() }}
/>
</CaptureLinks>
);
};
ContentHtml.propTypes = {
html: React.PropTypes.string,
linksColor: React.PropTypes.string,
};
export default ContentHtml;
| /* eslint-disable react/no-danger, no-undef */
import React from 'react';
import cheerio from 'cheerio';
import CaptureLinks from '../CaptureLinks';
import * as libs from '../../libs';
const ContentHtml = ({ html, linksColor }) => {
const $ = cheerio.load(html);
$('a').attr('style', `color: ${libs.darkenColor(linksColor)};`).attr('target', '_blank');
$('img').each((i, e) => {
const src = $(e).attr('src');
const srcset = $(e).attr('srcset');
if (src.startsWith('http://') && window.location.protocol === 'https:') {
$(e).attr('src', `https://cors.worona.io/${src}`);
$(e).attr('srcset', srcset.replace(/http:\/\//g, 'https://cors.worona.io/http://'));
}
});
return (
<CaptureLinks>
<div
style={{ overflow: 'hidden' }}
className="content is-medium"
dangerouslySetInnerHTML={{ __html: $.html() }}
/>
</CaptureLinks>
);
};
ContentHtml.propTypes = {
html: React.PropTypes.string,
linksColor: React.PropTypes.string,
};
export default ContentHtml;
| Add cors if protocol is https | Add cors if protocol is https
| JSX | mit | worona/starter-pro-app-theme-worona | jsx | ## Code Before:
/* eslint-disable react/no-danger */
import React from 'react';
import cheerio from 'cheerio';
import CaptureLinks from '../CaptureLinks';
import * as libs from '../../libs';
const ContentHtml = ({ html, linksColor }) => {
const $ = cheerio.load(html);
$('a').attr('style', `color: ${libs.darkenColor(linksColor)};`).attr('target', '_blank');
return (
<CaptureLinks>
<div
style={{ overflow: 'hidden' }}
className="content is-medium"
dangerouslySetInnerHTML={{ __html: $.html() }}
/>
</CaptureLinks>
);
};
ContentHtml.propTypes = {
html: React.PropTypes.string,
linksColor: React.PropTypes.string,
};
export default ContentHtml;
## Instruction:
Add cors if protocol is https
## Code After:
/* eslint-disable react/no-danger, no-undef */
import React from 'react';
import cheerio from 'cheerio';
import CaptureLinks from '../CaptureLinks';
import * as libs from '../../libs';
const ContentHtml = ({ html, linksColor }) => {
const $ = cheerio.load(html);
$('a').attr('style', `color: ${libs.darkenColor(linksColor)};`).attr('target', '_blank');
$('img').each((i, e) => {
const src = $(e).attr('src');
const srcset = $(e).attr('srcset');
if (src.startsWith('http://') && window.location.protocol === 'https:') {
$(e).attr('src', `https://cors.worona.io/${src}`);
$(e).attr('srcset', srcset.replace(/http:\/\//g, 'https://cors.worona.io/http://'));
}
});
return (
<CaptureLinks>
<div
style={{ overflow: 'hidden' }}
className="content is-medium"
dangerouslySetInnerHTML={{ __html: $.html() }}
/>
</CaptureLinks>
);
};
ContentHtml.propTypes = {
html: React.PropTypes.string,
linksColor: React.PropTypes.string,
};
export default ContentHtml;
| - /* eslint-disable react/no-danger */
+ /* eslint-disable react/no-danger, no-undef */
? ++++++++++
import React from 'react';
import cheerio from 'cheerio';
import CaptureLinks from '../CaptureLinks';
import * as libs from '../../libs';
const ContentHtml = ({ html, linksColor }) => {
const $ = cheerio.load(html);
$('a').attr('style', `color: ${libs.darkenColor(linksColor)};`).attr('target', '_blank');
+ $('img').each((i, e) => {
+ const src = $(e).attr('src');
+ const srcset = $(e).attr('srcset');
+ if (src.startsWith('http://') && window.location.protocol === 'https:') {
+ $(e).attr('src', `https://cors.worona.io/${src}`);
+ $(e).attr('srcset', srcset.replace(/http:\/\//g, 'https://cors.worona.io/http://'));
+ }
+ });
return (
<CaptureLinks>
<div
style={{ overflow: 'hidden' }}
className="content is-medium"
dangerouslySetInnerHTML={{ __html: $.html() }}
/>
</CaptureLinks>
);
};
ContentHtml.propTypes = {
html: React.PropTypes.string,
linksColor: React.PropTypes.string,
};
export default ContentHtml; | 10 | 0.4 | 9 | 1 |
81a02c41a4489953352178a01360f63fe5bbf255 | .travis.yml | .travis.yml | language: ruby
rvm:
- 1.9.3
- 2.0.0
- 2.1.2
- ruby-head
| language: ruby
rvm:
- 1.9.3
- 2.0.0
- 2.1.2
- ruby-head
env:
- WITH_LIBXML=true
- WITH_LIBXML=false
before_script: |
if [ "$WITH_LIBXML" == "false" ]; then
sudo apt-get remove libxml2-dev
fi
| Build with and without libxml | Build with and without libxml
| YAML | apache-2.0 | rubys/nokogumbo,jbotelho2-bb/nokogumbo,rubys/nokogumbo,jbotelho2-bb/nokogumbo,rubys/nokogumbo,rubys/nokogumbo | yaml | ## Code Before:
language: ruby
rvm:
- 1.9.3
- 2.0.0
- 2.1.2
- ruby-head
## Instruction:
Build with and without libxml
## Code After:
language: ruby
rvm:
- 1.9.3
- 2.0.0
- 2.1.2
- ruby-head
env:
- WITH_LIBXML=true
- WITH_LIBXML=false
before_script: |
if [ "$WITH_LIBXML" == "false" ]; then
sudo apt-get remove libxml2-dev
fi
| language: ruby
rvm:
- 1.9.3
- 2.0.0
- 2.1.2
- ruby-head
+ env:
+ - WITH_LIBXML=true
+ - WITH_LIBXML=false
+ before_script: |
+ if [ "$WITH_LIBXML" == "false" ]; then
+ sudo apt-get remove libxml2-dev
+ fi | 7 | 1.166667 | 7 | 0 |
a6fc5c17aaa05713fd065d0f30d6960c21efe9d5 | build.xml | build.xml | <?xml version="1.0" encoding="UTF-8"?>
<project name="bdd_videoannotator" default="build" basedir=".">
<target name="build" depends="prepare, generate_stubs, test">
</target>
<target name="prepare">
<!--Phing has no built-in property for directory separator-->
<if>
<equals arg1="Linux" arg2="${host.os}"/>
<then>
<property name="scriptstartprefix" value="./" override="true"/>
</then>
<else>
<property name="scriptstartprefix" value=".\" override="true"/>
</else>
</if>
</target>
<target name="generate_stubs">
<delete dir="tmp" includeemptydirs="true" failonerror="false"/>
<unzip file="bdd_videoannotator/bdd-videoannotator-server-standalone.jar"
todir="tmp">
</unzip>
<exec command = "php wsdl2php.php -i tmp/META-INF/wsdl/AnnotationServiceService.wsdl -n bdd_videoannotator\stub_php"
dir="." logoutput="true" checkreturn="true"/>
<delete dir="tmp" includeemptydirs="true"/>
</target>
<target name="test">
<exec command="${scriptstartprefix}behat" checkreturn="true" logoutput="true"/>
</target>
</project> | <?xml version="1.0" encoding="UTF-8"?>
<project name="bdd_videoannotator" default="build" basedir=".">
<target name="build" depends="prepare, generate_stubs, test">
</target>
<target name="prepare">
<!--Phing has no built-in property for directory separator-->
<if>
<equals arg1="Linux" arg2="${host.os}"/>
<then>
<property name="scriptstartprefix" value="./" override="true"/>
</then>
<else>
<property name="scriptstartprefix" value=".\" override="true"/>
</else>
</if>
</target>
<target name="generate_stubs">
<delete dir="tmp" includeemptydirs="true" failonerror="false"/>
<unzip file="bdd_videoannotator/bdd-videoannotator-server-standalone.jar"
todir="tmp">
</unzip>
<exec command = "php wsdl2php.php -i tmp/META-INF/wsdl/AnnotationServiceService.wsdl -n bdd_videoannotator\stub_php"
dir="." logoutput="true" checkreturn="true"/>
<delete dir="tmp" includeemptydirs="true"/>
</target>
<target name="test" depends="prepare">
<exec command="${scriptstartprefix}behat" checkreturn="true" logoutput="true"/>
</target>
</project> | Prepare was missing for target test | Prepare was missing for target test
| XML | apache-2.0 | shell88/bdd_videoannotator_php | xml | ## Code Before:
<?xml version="1.0" encoding="UTF-8"?>
<project name="bdd_videoannotator" default="build" basedir=".">
<target name="build" depends="prepare, generate_stubs, test">
</target>
<target name="prepare">
<!--Phing has no built-in property for directory separator-->
<if>
<equals arg1="Linux" arg2="${host.os}"/>
<then>
<property name="scriptstartprefix" value="./" override="true"/>
</then>
<else>
<property name="scriptstartprefix" value=".\" override="true"/>
</else>
</if>
</target>
<target name="generate_stubs">
<delete dir="tmp" includeemptydirs="true" failonerror="false"/>
<unzip file="bdd_videoannotator/bdd-videoannotator-server-standalone.jar"
todir="tmp">
</unzip>
<exec command = "php wsdl2php.php -i tmp/META-INF/wsdl/AnnotationServiceService.wsdl -n bdd_videoannotator\stub_php"
dir="." logoutput="true" checkreturn="true"/>
<delete dir="tmp" includeemptydirs="true"/>
</target>
<target name="test">
<exec command="${scriptstartprefix}behat" checkreturn="true" logoutput="true"/>
</target>
</project>
## Instruction:
Prepare was missing for target test
## Code After:
<?xml version="1.0" encoding="UTF-8"?>
<project name="bdd_videoannotator" default="build" basedir=".">
<target name="build" depends="prepare, generate_stubs, test">
</target>
<target name="prepare">
<!--Phing has no built-in property for directory separator-->
<if>
<equals arg1="Linux" arg2="${host.os}"/>
<then>
<property name="scriptstartprefix" value="./" override="true"/>
</then>
<else>
<property name="scriptstartprefix" value=".\" override="true"/>
</else>
</if>
</target>
<target name="generate_stubs">
<delete dir="tmp" includeemptydirs="true" failonerror="false"/>
<unzip file="bdd_videoannotator/bdd-videoannotator-server-standalone.jar"
todir="tmp">
</unzip>
<exec command = "php wsdl2php.php -i tmp/META-INF/wsdl/AnnotationServiceService.wsdl -n bdd_videoannotator\stub_php"
dir="." logoutput="true" checkreturn="true"/>
<delete dir="tmp" includeemptydirs="true"/>
</target>
<target name="test" depends="prepare">
<exec command="${scriptstartprefix}behat" checkreturn="true" logoutput="true"/>
</target>
</project> | <?xml version="1.0" encoding="UTF-8"?>
<project name="bdd_videoannotator" default="build" basedir=".">
<target name="build" depends="prepare, generate_stubs, test">
</target>
<target name="prepare">
<!--Phing has no built-in property for directory separator-->
<if>
<equals arg1="Linux" arg2="${host.os}"/>
<then>
<property name="scriptstartprefix" value="./" override="true"/>
</then>
<else>
<property name="scriptstartprefix" value=".\" override="true"/>
</else>
</if>
</target>
<target name="generate_stubs">
<delete dir="tmp" includeemptydirs="true" failonerror="false"/>
<unzip file="bdd_videoannotator/bdd-videoannotator-server-standalone.jar"
todir="tmp">
</unzip>
<exec command = "php wsdl2php.php -i tmp/META-INF/wsdl/AnnotationServiceService.wsdl -n bdd_videoannotator\stub_php"
dir="." logoutput="true" checkreturn="true"/>
<delete dir="tmp" includeemptydirs="true"/>
</target>
- <target name="test">
+ <target name="test" depends="prepare">
<exec command="${scriptstartprefix}behat" checkreturn="true" logoutput="true"/>
</target>
</project> | 2 | 0.068966 | 1 | 1 |
98e2b6d1f42f823946db5e7b30f35b6a8894f1f2 | README.md | README.md |
Synced through dropbox. Currently set up manually:
ln -s ~/Dropbox/syncs/dotfiles/dotgitconfig .gitconfig
|
Synced through dropbox. Currently set up manually:
ln -s ~/Dropbox/syncs/dotfiles/dotgitconfig .gitconfig
### Emacs keybindings for all.
Add this file: `~/Library/KeyBindings/DefaultKeyBinding.dict`
```
{
"~d" = "deleteWordForward:";
"^w" = "deleteWordBackward:";
"~f" = "moveWordForward:";
"~b" = "moveWordBackward:";
}
```
[source](http://blog.sensible.io/2012/10/19/mac-os-x-emacs-style-keybindings-everywhere.html)
| Add emacs keybindings for all section. | Add emacs keybindings for all section.
| Markdown | mit | vroy/dotfiles,vroy/dotfiles,vroy/dotfiles,vroy/dotfiles | markdown | ## Code Before:
Synced through dropbox. Currently set up manually:
ln -s ~/Dropbox/syncs/dotfiles/dotgitconfig .gitconfig
## Instruction:
Add emacs keybindings for all section.
## Code After:
Synced through dropbox. Currently set up manually:
ln -s ~/Dropbox/syncs/dotfiles/dotgitconfig .gitconfig
### Emacs keybindings for all.
Add this file: `~/Library/KeyBindings/DefaultKeyBinding.dict`
```
{
"~d" = "deleteWordForward:";
"^w" = "deleteWordBackward:";
"~f" = "moveWordForward:";
"~b" = "moveWordBackward:";
}
```
[source](http://blog.sensible.io/2012/10/19/mac-os-x-emacs-style-keybindings-everywhere.html)
|
Synced through dropbox. Currently set up manually:
ln -s ~/Dropbox/syncs/dotfiles/dotgitconfig .gitconfig
+
+
+ ### Emacs keybindings for all.
+
+ Add this file: `~/Library/KeyBindings/DefaultKeyBinding.dict`
+
+ ```
+ {
+ "~d" = "deleteWordForward:";
+ "^w" = "deleteWordBackward:";
+ "~f" = "moveWordForward:";
+ "~b" = "moveWordBackward:";
+ }
+ ```
+
+ [source](http://blog.sensible.io/2012/10/19/mac-os-x-emacs-style-keybindings-everywhere.html) | 16 | 4 | 16 | 0 |
cbca468490e81f87461967ff2b4f7c9a8fcb07ca | quizbot_test.rb | quizbot_test.rb | require 'minitest/autorun'
require "#{__dir__}/quizbot"
class TestQuestionpool < Minitest::Test
def setup
@questionpool = Questionpool.new
# Load our actual questions as fixtures
@questionpool.load
end
def test_load
assert !@questionpool.instance_variable_get(:@questions).empty?
end
def test_any_key_has_value?
assert @questionpool.any_key_has_value?('dontcare', 'all')
assert @questionpool.any_key_has_value?('Category', 'Werkstoffe')
assert !@questionpool.any_key_has_value?('NonExistingCategory', 'dontcare')
assert !@questionpool.any_key_has_value?('Category', 'NonExisting')
end
def test_number_of_questions_per
qp = Questionpool.new
qp.instance_variable_set :@questions, [
{'Category' => 'category1'}, {'Category' => 'category1'},
{ 'Category' => 'category2'}, {'Answer' => '42'},
]
assert_equal "category1 (2), category2 (1)",
qp.number_of_questions_per('Category')
end
end
| require 'minitest/autorun'
require "#{__dir__}/quizbot"
class TestQuestionpool < Minitest::Unit::TestCase
def setup
@questionpool = Questionpool.new
# Load our actual questions as fixtures
@questionpool.load
end
def test_load
assert !@questionpool.instance_variable_get(:@questions).empty?
end
def test_any_key_has_value?
assert @questionpool.any_key_has_value?('dontcare', 'all')
assert @questionpool.any_key_has_value?('Category', 'Werkstoffe')
assert !@questionpool.any_key_has_value?('NonExistingCategory', 'dontcare')
assert !@questionpool.any_key_has_value?('Category', 'NonExisting')
end
def test_number_of_questions_per
qp = Questionpool.new
qp.instance_variable_set :@questions, [
{'Category' => 'category1'}, {'Category' => 'category1'},
{ 'Category' => 'category2'}, {'Answer' => '42'},
]
assert_equal "category1 (2), category2 (1)",
qp.number_of_questions_per('Category')
end
end
| Use old way to create a test class, Rubinius only has Minitest 4.x | Use old way to create a test class, Rubinius only has Minitest 4.x
| Ruby | mit | foobar0815/guenther,marius/guenther | ruby | ## Code Before:
require 'minitest/autorun'
require "#{__dir__}/quizbot"
class TestQuestionpool < Minitest::Test
def setup
@questionpool = Questionpool.new
# Load our actual questions as fixtures
@questionpool.load
end
def test_load
assert !@questionpool.instance_variable_get(:@questions).empty?
end
def test_any_key_has_value?
assert @questionpool.any_key_has_value?('dontcare', 'all')
assert @questionpool.any_key_has_value?('Category', 'Werkstoffe')
assert !@questionpool.any_key_has_value?('NonExistingCategory', 'dontcare')
assert !@questionpool.any_key_has_value?('Category', 'NonExisting')
end
def test_number_of_questions_per
qp = Questionpool.new
qp.instance_variable_set :@questions, [
{'Category' => 'category1'}, {'Category' => 'category1'},
{ 'Category' => 'category2'}, {'Answer' => '42'},
]
assert_equal "category1 (2), category2 (1)",
qp.number_of_questions_per('Category')
end
end
## Instruction:
Use old way to create a test class, Rubinius only has Minitest 4.x
## Code After:
require 'minitest/autorun'
require "#{__dir__}/quizbot"
class TestQuestionpool < Minitest::Unit::TestCase
def setup
@questionpool = Questionpool.new
# Load our actual questions as fixtures
@questionpool.load
end
def test_load
assert !@questionpool.instance_variable_get(:@questions).empty?
end
def test_any_key_has_value?
assert @questionpool.any_key_has_value?('dontcare', 'all')
assert @questionpool.any_key_has_value?('Category', 'Werkstoffe')
assert !@questionpool.any_key_has_value?('NonExistingCategory', 'dontcare')
assert !@questionpool.any_key_has_value?('Category', 'NonExisting')
end
def test_number_of_questions_per
qp = Questionpool.new
qp.instance_variable_set :@questions, [
{'Category' => 'category1'}, {'Category' => 'category1'},
{ 'Category' => 'category2'}, {'Answer' => '42'},
]
assert_equal "category1 (2), category2 (1)",
qp.number_of_questions_per('Category')
end
end
| require 'minitest/autorun'
require "#{__dir__}/quizbot"
- class TestQuestionpool < Minitest::Test
+ class TestQuestionpool < Minitest::Unit::TestCase
? ++++++ ++++
def setup
@questionpool = Questionpool.new
# Load our actual questions as fixtures
@questionpool.load
end
def test_load
assert !@questionpool.instance_variable_get(:@questions).empty?
end
def test_any_key_has_value?
assert @questionpool.any_key_has_value?('dontcare', 'all')
assert @questionpool.any_key_has_value?('Category', 'Werkstoffe')
assert !@questionpool.any_key_has_value?('NonExistingCategory', 'dontcare')
assert !@questionpool.any_key_has_value?('Category', 'NonExisting')
end
def test_number_of_questions_per
qp = Questionpool.new
qp.instance_variable_set :@questions, [
{'Category' => 'category1'}, {'Category' => 'category1'},
{ 'Category' => 'category2'}, {'Answer' => '42'},
]
assert_equal "category1 (2), category2 (1)",
qp.number_of_questions_per('Category')
end
end | 2 | 0.064516 | 1 | 1 |
39934c662c9512e216b4bb47482d9ee9cb2b7b82 | lib/generators/pinkman/model_generator.rb | lib/generators/pinkman/model_generator.rb | require 'rails/generators/base'
module Pinkman
class ModelGenerator < ::Rails::Generators::Base
source_root File.expand_path('../templates', __FILE__)
argument :class_name, type: :string, default: "nameHere"
def generate_files
template "object.coffee.erb", "app/assets/javascripts/pinkman/models/#{directory_name}/#{object_file_name}"
template "collection.coffee.erb", "app/assets/javascripts/pinkman/models/#{directory_name}/#{collection_file_name}"
end
private
def directory_name
class_name.pluralize.underscore
end
def object_class_name
class_name.camelize
end
def object_file_name
class_name.underscore + ".coffee"
end
def collection_class_name
class_name.pluralize.camelize
end
def collection_file_name
class_name.pluralize.underscore + ".coffee"
end
def guess_api_url
"api/#{class_name.pluralize.underscore}"
end
def app_name
Rails.application.class.parent_name
end
def app_object_name
app_name.camelize + 'Object'
end
def app_collection_name
app_name.camelize + 'Collection'
end
end
end | require 'rails/generators/base'
module Pinkman
class ModelGenerator < ::Rails::Generators::Base
source_root File.expand_path('../templates', __FILE__)
argument :class_name, type: :string, default: "nameHere"
def generate_files
template "object.coffee.erb", "app/assets/javascripts/pinkman/models/#{directory_name}/#{object_file_name}"
template "collection.coffee.erb", "app/assets/javascripts/pinkman/models/#{directory_name}/#{collection_file_name}"
end
private
def directory_name
class_name.pluralize.underscore
end
def object_class_name
class_name.camelize
end
def object_file_name
class_name.underscore + ".coffee"
end
def collection_class_name
class_name.pluralize.camelize
end
def collection_file_name
class_name.pluralize.underscore + ".coffee"
end
def guess_api_url
"api/#{class_name.pluralize.underscore}"
end
def app_name
'App'
end
def app_object_name
app_name + 'Object'
end
def app_collection_name
app_name + 'Collection'
end
end
end | Change "If" method and change class name of generators | Change "If" method and change class name of generators
| Ruby | mit | agilso/pinkman,agilso/pinkman,agilso/pinkman,agilso/pinkman | ruby | ## Code Before:
require 'rails/generators/base'
module Pinkman
class ModelGenerator < ::Rails::Generators::Base
source_root File.expand_path('../templates', __FILE__)
argument :class_name, type: :string, default: "nameHere"
def generate_files
template "object.coffee.erb", "app/assets/javascripts/pinkman/models/#{directory_name}/#{object_file_name}"
template "collection.coffee.erb", "app/assets/javascripts/pinkman/models/#{directory_name}/#{collection_file_name}"
end
private
def directory_name
class_name.pluralize.underscore
end
def object_class_name
class_name.camelize
end
def object_file_name
class_name.underscore + ".coffee"
end
def collection_class_name
class_name.pluralize.camelize
end
def collection_file_name
class_name.pluralize.underscore + ".coffee"
end
def guess_api_url
"api/#{class_name.pluralize.underscore}"
end
def app_name
Rails.application.class.parent_name
end
def app_object_name
app_name.camelize + 'Object'
end
def app_collection_name
app_name.camelize + 'Collection'
end
end
end
## Instruction:
Change "If" method and change class name of generators
## Code After:
require 'rails/generators/base'
module Pinkman
class ModelGenerator < ::Rails::Generators::Base
source_root File.expand_path('../templates', __FILE__)
argument :class_name, type: :string, default: "nameHere"
def generate_files
template "object.coffee.erb", "app/assets/javascripts/pinkman/models/#{directory_name}/#{object_file_name}"
template "collection.coffee.erb", "app/assets/javascripts/pinkman/models/#{directory_name}/#{collection_file_name}"
end
private
def directory_name
class_name.pluralize.underscore
end
def object_class_name
class_name.camelize
end
def object_file_name
class_name.underscore + ".coffee"
end
def collection_class_name
class_name.pluralize.camelize
end
def collection_file_name
class_name.pluralize.underscore + ".coffee"
end
def guess_api_url
"api/#{class_name.pluralize.underscore}"
end
def app_name
'App'
end
def app_object_name
app_name + 'Object'
end
def app_collection_name
app_name + 'Collection'
end
end
end | require 'rails/generators/base'
module Pinkman
class ModelGenerator < ::Rails::Generators::Base
source_root File.expand_path('../templates', __FILE__)
argument :class_name, type: :string, default: "nameHere"
def generate_files
template "object.coffee.erb", "app/assets/javascripts/pinkman/models/#{directory_name}/#{object_file_name}"
template "collection.coffee.erb", "app/assets/javascripts/pinkman/models/#{directory_name}/#{collection_file_name}"
end
private
def directory_name
class_name.pluralize.underscore
end
def object_class_name
class_name.camelize
end
def object_file_name
class_name.underscore + ".coffee"
end
def collection_class_name
class_name.pluralize.camelize
end
def collection_file_name
class_name.pluralize.underscore + ".coffee"
end
def guess_api_url
"api/#{class_name.pluralize.underscore}"
end
def app_name
- Rails.application.class.parent_name
+ 'App'
end
def app_object_name
- app_name.camelize + 'Object'
? ---------
+ app_name + 'Object'
end
def app_collection_name
- app_name.camelize + 'Collection'
? ---------
+ app_name + 'Collection'
end
end
end | 6 | 0.113208 | 3 | 3 |
0b08d34452583460b74fb31624a3e743641fc615 | src/printdird/printdird.c | src/printdird/printdird.c |
int main(int argc, char *argv[]) {
int notify;
char buf[BUF_LEN];
struct inotify_event *event;
cups_dest_t *dest;
char *printer;
char *filename;
int job_id;
const char *watchpath = "/home/ian/.PRINT";
notify = inotify_init();
if (inotify_add_watch(notify, watchpath, IN_CLOSE_WRITE) == -1)
return 1;
if (chdir(watchpath) !=0)
return 1;
//Get default printer
if ((dest = cupsGetNamedDest(NULL, NULL, NULL)) == NULL )
return 1;
printer = dest->name;
while (1) {
read(notify, buf, BUF_LEN);
event = (struct inotify_event *) &buf[0];
filename = event->name;
if (filename[0] == '.')
continue;
job_id = cupsPrintFile(printer, filename, filename, 0, NULL);
cupsStartDocument(CUPS_HTTP_DEFAULT, printer,
job_id, NULL, CUPS_FORMAT_AUTO, 1);
unlink(filename);
}
}
|
int main(int argc, char *argv[]) {
int notify;
cups_dest_t *dest;
char *printer;
const char *watchpath = "/home/ian/.PRINT";
notify = inotify_init();
if (inotify_add_watch(notify, watchpath, IN_CLOSE_WRITE) == -1)
return 1;
if (chdir(watchpath) !=0)
return 1;
//Get default printer
if ((dest = cupsGetNamedDest(NULL, NULL, NULL)) == NULL )
return 1;
printer = dest->name;
while (1) {
char buf[BUF_LEN];
struct inotify_event *event;
char *filename;
int job_id;
read(notify, buf, BUF_LEN);
event = (struct inotify_event *) &buf[0];
filename = event->name;
if (filename[0] == '.')
continue;
job_id = cupsPrintFile(printer, filename, filename, 0, NULL);
cupsStartDocument(CUPS_HTTP_DEFAULT, printer,
job_id, NULL, CUPS_FORMAT_AUTO, 1);
unlink(filename);
}
}
| Move variable declarations to while loop | Move variable declarations to while loop
| C | mit | ids1024/Utilities,ids1024/Utilities,ids1024/Utilities | c | ## Code Before:
int main(int argc, char *argv[]) {
int notify;
char buf[BUF_LEN];
struct inotify_event *event;
cups_dest_t *dest;
char *printer;
char *filename;
int job_id;
const char *watchpath = "/home/ian/.PRINT";
notify = inotify_init();
if (inotify_add_watch(notify, watchpath, IN_CLOSE_WRITE) == -1)
return 1;
if (chdir(watchpath) !=0)
return 1;
//Get default printer
if ((dest = cupsGetNamedDest(NULL, NULL, NULL)) == NULL )
return 1;
printer = dest->name;
while (1) {
read(notify, buf, BUF_LEN);
event = (struct inotify_event *) &buf[0];
filename = event->name;
if (filename[0] == '.')
continue;
job_id = cupsPrintFile(printer, filename, filename, 0, NULL);
cupsStartDocument(CUPS_HTTP_DEFAULT, printer,
job_id, NULL, CUPS_FORMAT_AUTO, 1);
unlink(filename);
}
}
## Instruction:
Move variable declarations to while loop
## Code After:
int main(int argc, char *argv[]) {
int notify;
cups_dest_t *dest;
char *printer;
const char *watchpath = "/home/ian/.PRINT";
notify = inotify_init();
if (inotify_add_watch(notify, watchpath, IN_CLOSE_WRITE) == -1)
return 1;
if (chdir(watchpath) !=0)
return 1;
//Get default printer
if ((dest = cupsGetNamedDest(NULL, NULL, NULL)) == NULL )
return 1;
printer = dest->name;
while (1) {
char buf[BUF_LEN];
struct inotify_event *event;
char *filename;
int job_id;
read(notify, buf, BUF_LEN);
event = (struct inotify_event *) &buf[0];
filename = event->name;
if (filename[0] == '.')
continue;
job_id = cupsPrintFile(printer, filename, filename, 0, NULL);
cupsStartDocument(CUPS_HTTP_DEFAULT, printer,
job_id, NULL, CUPS_FORMAT_AUTO, 1);
unlink(filename);
}
}
|
int main(int argc, char *argv[]) {
int notify;
- char buf[BUF_LEN];
- struct inotify_event *event;
cups_dest_t *dest;
char *printer;
- char *filename;
- int job_id;
const char *watchpath = "/home/ian/.PRINT";
notify = inotify_init();
if (inotify_add_watch(notify, watchpath, IN_CLOSE_WRITE) == -1)
return 1;
if (chdir(watchpath) !=0)
return 1;
//Get default printer
if ((dest = cupsGetNamedDest(NULL, NULL, NULL)) == NULL )
return 1;
printer = dest->name;
while (1) {
+ char buf[BUF_LEN];
+ struct inotify_event *event;
+ char *filename;
+ int job_id;
+
read(notify, buf, BUF_LEN);
event = (struct inotify_event *) &buf[0];
filename = event->name;
if (filename[0] == '.')
continue;
job_id = cupsPrintFile(printer, filename, filename, 0, NULL);
cupsStartDocument(CUPS_HTTP_DEFAULT, printer,
job_id, NULL, CUPS_FORMAT_AUTO, 1);
unlink(filename);
}
} | 9 | 0.243243 | 5 | 4 |
fea9d8ca8416ca25781196574bd8e74e7bee73c0 | recipes/deeptools/meta.yaml | recipes/deeptools/meta.yaml | package:
name: deeptools
version: '2.0.0'
source:
fn: deepTools-2.0.0.tar.gz
url: https://pypi.python.org/packages/source/d/deepTools/deepTools-2.0.0.tar.gz
md5: 09821e73f56ddb744a35d01173c6eb29
build:
number: 0
skip: True # [not py27]
requirements:
build:
- python
- setuptools
- numpy >=1.8.0
- scipy >=0.15.0
- matplotlib >=1.4.0
- pysam >=0.8.2
- bx-python >=0.7.2
run:
- python
- pybigwig >=0.2.3
- numpy >=1.8.0
- scipy >=0.15.0
- matplotlib >=1.4.0
- pysam >=0.8.2
- bx-python >=0.7.2
test:
imports:
- deeptools
commands:
- nosetests --with-doctest deeptools
requires:
- nose
about:
home: https://github.com/fidelram/deepTools
license: GPL3
summary: A set of user-friendly tools for normalization and visualzation of deep-sequencing data
| package:
name: deeptools
version: '2.0.0'
source:
fn: deepTools-2.0.0.tar.gz
url: https://pypi.python.org/packages/source/d/deepTools/deepTools-2.0.0.tar.gz
md5: 09821e73f56ddb744a35d01173c6eb29
build:
number: 0
skip: True # [not py27]
requirements:
build:
- python
- setuptools
- numpy x.x
- scipy >=0.15.0
- matplotlib >=1.4.0
- pysam >=0.8.2
- bx-python >=0.7.2
run:
- python
- pybigwig >=0.2.3
- numpy x.x
- scipy >=0.15.0
- matplotlib >=1.4.0
- pysam >=0.8.2
- bx-python >=0.7.2
test:
imports:
- deeptools
commands:
- nosetests --with-doctest deeptools
requires:
- nose
about:
home: https://github.com/fidelram/deepTools
license: GPL3
summary: A set of user-friendly tools for normalization and visualzation of deep-sequencing data
| Include the numpy version in the tarball | Include the numpy version in the tarball
| YAML | mit | abims-sbr/bioconda-recipes,saketkc/bioconda-recipes,instituteofpathologyheidelberg/bioconda-recipes,xguse/bioconda-recipes,HassanAmr/bioconda-recipes,guowei-he/bioconda-recipes,hardingnj/bioconda-recipes,roryk/recipes,CGATOxford/bioconda-recipes,daler/bioconda-recipes,oena/bioconda-recipes,bow/bioconda-recipes,mdehollander/bioconda-recipes,mdehollander/bioconda-recipes,blankenberg/bioconda-recipes,abims-sbr/bioconda-recipes,gvlproject/bioconda-recipes,HassanAmr/bioconda-recipes,acaprez/recipes,ivirshup/bioconda-recipes,rvalieris/bioconda-recipes,jfallmann/bioconda-recipes,gvlproject/bioconda-recipes,keuv-grvl/bioconda-recipes,bioconda/bioconda-recipes,blankenberg/bioconda-recipes,acaprez/recipes,daler/bioconda-recipes,colinbrislawn/bioconda-recipes,bebatut/bioconda-recipes,pinguinkiste/bioconda-recipes,lpantano/recipes,bow/bioconda-recipes,zwanli/bioconda-recipes,CGATOxford/bioconda-recipes,gregvonkuster/bioconda-recipes,bow/bioconda-recipes,rvalieris/bioconda-recipes,joachimwolff/bioconda-recipes,shenwei356/bioconda-recipes,omicsnut/bioconda-recipes,gregvonkuster/bioconda-recipes,saketkc/bioconda-recipes,CGATOxford/bioconda-recipes,phac-nml/bioconda-recipes,jasper1918/bioconda-recipes,JenCabral/bioconda-recipes,hardingnj/bioconda-recipes,instituteofpathologyheidelberg/bioconda-recipes,chapmanb/bioconda-recipes,colinbrislawn/bioconda-recipes,BIMSBbioinfo/bioconda-recipes,HassanAmr/bioconda-recipes,chapmanb/bioconda-recipes,pinguinkiste/bioconda-recipes,bioconda/bioconda-recipes,instituteofpathologyheidelberg/bioconda-recipes,acaprez/recipes,JingchaoZhang/bioconda-recipes,chapmanb/bioconda-recipes,JingchaoZhang/bioconda-recipes,bioconda/recipes,rob-p/bioconda-recipes,joachimwolff/bioconda-recipes,omicsnut/bioconda-recipes,daler/bioconda-recipes,ostrokach/bioconda-recipes,zachcp/bioconda-recipes,zwanli/bioconda-recipes,ThomasWollmann/bioconda-recipes,phac-nml/bioconda-recipes,peterjc/bioconda-recipes,cokelaer/bioconda-recipes,colinbrislawn/bioconda-recipes,yesimon/bioconda-recipes,saketkc/bioconda-recipes,JenCabral/bioconda-recipes,cokelaer/bioconda-recipes,BIMSBbioinfo/bioconda-recipes,dmaticzka/bioconda-recipes,phac-nml/bioconda-recipes,ostrokach/bioconda-recipes,abims-sbr/bioconda-recipes,lpantano/recipes,jasper1918/bioconda-recipes,joachimwolff/bioconda-recipes,ThomasWollmann/bioconda-recipes,dmaticzka/bioconda-recipes,chapmanb/bioconda-recipes,mcornwell1957/bioconda-recipes,bioconda/recipes,cokelaer/bioconda-recipes,dkoppstein/recipes,ostrokach/bioconda-recipes,zachcp/bioconda-recipes,zachcp/bioconda-recipes,martin-mann/bioconda-recipes,jasper1918/bioconda-recipes,yesimon/bioconda-recipes,rvalieris/bioconda-recipes,Luobiny/bioconda-recipes,bow/bioconda-recipes,hardingnj/bioconda-recipes,rvalieris/bioconda-recipes,peterjc/bioconda-recipes,guowei-he/bioconda-recipes,zachcp/bioconda-recipes,gregvonkuster/bioconda-recipes,bow/bioconda-recipes,npavlovikj/bioconda-recipes,ThomasWollmann/bioconda-recipes,Luobiny/bioconda-recipes,ThomasWollmann/bioconda-recipes,yesimon/bioconda-recipes,matthdsm/bioconda-recipes,guowei-he/bioconda-recipes,npavlovikj/bioconda-recipes,zwanli/bioconda-recipes,mcornwell1957/bioconda-recipes,bioconda/bioconda-recipes,shenwei356/bioconda-recipes,joachimwolff/bioconda-recipes,daler/bioconda-recipes,HassanAmr/bioconda-recipes,gvlproject/bioconda-recipes,dmaticzka/bioconda-recipes,keuv-grvl/bioconda-recipes,abims-sbr/bioconda-recipes,abims-sbr/bioconda-recipes,pinguinkiste/bioconda-recipes,dmaticzka/bioconda-recipes,Luobiny/bioconda-recipes,omicsnut/bioconda-recipes,JenCabral/bioconda-recipes,CGATOxford/bioconda-recipes,lpantano/recipes,instituteofpathologyheidelberg/bioconda-recipes,ostrokach/bioconda-recipes,joachimwolff/bioconda-recipes,guowei-he/bioconda-recipes,peterjc/bioconda-recipes,xguse/bioconda-recipes,matthdsm/bioconda-recipes,keuv-grvl/bioconda-recipes,instituteofpathologyheidelberg/bioconda-recipes,ivirshup/bioconda-recipes,jfallmann/bioconda-recipes,jfallmann/bioconda-recipes,shenwei356/bioconda-recipes,ivirshup/bioconda-recipes,dmaticzka/bioconda-recipes,BIMSBbioinfo/bioconda-recipes,keuv-grvl/bioconda-recipes,Luobiny/bioconda-recipes,blankenberg/bioconda-recipes,mdehollander/bioconda-recipes,matthdsm/bioconda-recipes,martin-mann/bioconda-recipes,ivirshup/bioconda-recipes,ThomasWollmann/bioconda-recipes,roryk/recipes,rob-p/bioconda-recipes,gvlproject/bioconda-recipes,lpantano/recipes,matthdsm/bioconda-recipes,gvlproject/bioconda-recipes,xguse/bioconda-recipes,ThomasWollmann/bioconda-recipes,omicsnut/bioconda-recipes,peterjc/bioconda-recipes,saketkc/bioconda-recipes,colinbrislawn/bioconda-recipes,ostrokach/bioconda-recipes,oena/bioconda-recipes,hardingnj/bioconda-recipes,dkoppstein/recipes,peterjc/bioconda-recipes,mdehollander/bioconda-recipes,mcornwell1957/bioconda-recipes,martin-mann/bioconda-recipes,npavlovikj/bioconda-recipes,keuv-grvl/bioconda-recipes,joachimwolff/bioconda-recipes,gvlproject/bioconda-recipes,zwanli/bioconda-recipes,mdehollander/bioconda-recipes,shenwei356/bioconda-recipes,cokelaer/bioconda-recipes,martin-mann/bioconda-recipes,chapmanb/bioconda-recipes,peterjc/bioconda-recipes,ivirshup/bioconda-recipes,rvalieris/bioconda-recipes,xguse/bioconda-recipes,jasper1918/bioconda-recipes,CGATOxford/bioconda-recipes,phac-nml/bioconda-recipes,acaprez/recipes,omicsnut/bioconda-recipes,ivirshup/bioconda-recipes,HassanAmr/bioconda-recipes,rob-p/bioconda-recipes,JenCabral/bioconda-recipes,phac-nml/bioconda-recipes,jfallmann/bioconda-recipes,npavlovikj/bioconda-recipes,guowei-he/bioconda-recipes,pinguinkiste/bioconda-recipes,rob-p/bioconda-recipes,saketkc/bioconda-recipes,saketkc/bioconda-recipes,bebatut/bioconda-recipes,blankenberg/bioconda-recipes,bebatut/bioconda-recipes,oena/bioconda-recipes,bow/bioconda-recipes,bioconda/recipes,pinguinkiste/bioconda-recipes,bioconda/bioconda-recipes,gregvonkuster/bioconda-recipes,JingchaoZhang/bioconda-recipes,dkoppstein/recipes,HassanAmr/bioconda-recipes,jasper1918/bioconda-recipes,JenCabral/bioconda-recipes,JingchaoZhang/bioconda-recipes,BIMSBbioinfo/bioconda-recipes,zwanli/bioconda-recipes,abims-sbr/bioconda-recipes,oena/bioconda-recipes,martin-mann/bioconda-recipes,mdehollander/bioconda-recipes,mcornwell1957/bioconda-recipes,BIMSBbioinfo/bioconda-recipes,ostrokach/bioconda-recipes,xguse/bioconda-recipes,pinguinkiste/bioconda-recipes,rvalieris/bioconda-recipes,bebatut/bioconda-recipes,matthdsm/bioconda-recipes,matthdsm/bioconda-recipes,daler/bioconda-recipes,keuv-grvl/bioconda-recipes,CGATOxford/bioconda-recipes,BIMSBbioinfo/bioconda-recipes,mcornwell1957/bioconda-recipes,dmaticzka/bioconda-recipes,daler/bioconda-recipes,colinbrislawn/bioconda-recipes,JenCabral/bioconda-recipes,yesimon/bioconda-recipes,oena/bioconda-recipes,colinbrislawn/bioconda-recipes,zwanli/bioconda-recipes,roryk/recipes,hardingnj/bioconda-recipes | yaml | ## Code Before:
package:
name: deeptools
version: '2.0.0'
source:
fn: deepTools-2.0.0.tar.gz
url: https://pypi.python.org/packages/source/d/deepTools/deepTools-2.0.0.tar.gz
md5: 09821e73f56ddb744a35d01173c6eb29
build:
number: 0
skip: True # [not py27]
requirements:
build:
- python
- setuptools
- numpy >=1.8.0
- scipy >=0.15.0
- matplotlib >=1.4.0
- pysam >=0.8.2
- bx-python >=0.7.2
run:
- python
- pybigwig >=0.2.3
- numpy >=1.8.0
- scipy >=0.15.0
- matplotlib >=1.4.0
- pysam >=0.8.2
- bx-python >=0.7.2
test:
imports:
- deeptools
commands:
- nosetests --with-doctest deeptools
requires:
- nose
about:
home: https://github.com/fidelram/deepTools
license: GPL3
summary: A set of user-friendly tools for normalization and visualzation of deep-sequencing data
## Instruction:
Include the numpy version in the tarball
## Code After:
package:
name: deeptools
version: '2.0.0'
source:
fn: deepTools-2.0.0.tar.gz
url: https://pypi.python.org/packages/source/d/deepTools/deepTools-2.0.0.tar.gz
md5: 09821e73f56ddb744a35d01173c6eb29
build:
number: 0
skip: True # [not py27]
requirements:
build:
- python
- setuptools
- numpy x.x
- scipy >=0.15.0
- matplotlib >=1.4.0
- pysam >=0.8.2
- bx-python >=0.7.2
run:
- python
- pybigwig >=0.2.3
- numpy x.x
- scipy >=0.15.0
- matplotlib >=1.4.0
- pysam >=0.8.2
- bx-python >=0.7.2
test:
imports:
- deeptools
commands:
- nosetests --with-doctest deeptools
requires:
- nose
about:
home: https://github.com/fidelram/deepTools
license: GPL3
summary: A set of user-friendly tools for normalization and visualzation of deep-sequencing data
| package:
name: deeptools
version: '2.0.0'
source:
fn: deepTools-2.0.0.tar.gz
url: https://pypi.python.org/packages/source/d/deepTools/deepTools-2.0.0.tar.gz
md5: 09821e73f56ddb744a35d01173c6eb29
build:
number: 0
skip: True # [not py27]
requirements:
build:
- python
- setuptools
- - numpy >=1.8.0
? ^^^ ^^^
+ - numpy x.x
? ^ ^
- scipy >=0.15.0
- matplotlib >=1.4.0
- pysam >=0.8.2
- bx-python >=0.7.2
run:
- python
- pybigwig >=0.2.3
- - numpy >=1.8.0
? ^^^ ^^^
+ - numpy x.x
? ^ ^
- scipy >=0.15.0
- matplotlib >=1.4.0
- pysam >=0.8.2
- bx-python >=0.7.2
test:
imports:
- deeptools
commands:
- nosetests --with-doctest deeptools
requires:
- nose
about:
home: https://github.com/fidelram/deepTools
license: GPL3
summary: A set of user-friendly tools for normalization and visualzation of deep-sequencing data | 4 | 0.088889 | 2 | 2 |
c56542adca38e4f51055c08dc741d5a48b657c9f | tests/hamming_test.go | tests/hamming_test.go | package tests
import (
"fmt"
"testing"
"github.com/xrash/smetrics"
)
func TestHamming(t *testing.T) {
cases := []hammingcase{
{"a", "a", 0},
{"a", "b", 1},
{"AAAA", "AABB", 2},
{"BAAA", "AAAA", 1},
{"BAAA", "CCCC", 4},
}
for _, c := range cases {
r, err := smetrics.Hamming(c.a, c.b)
if err != nil {
t.Fatalf("got error from hamming err=%s", err)
}
if r != c.diff {
fmt.Println(r, "instead of", c.diff)
t.Fail()
}
}
}
func TestHammingError(t *testing.T) {
res, err := smetrics.Hamming("a", "bbb")
if err == nil {
t.Fatalf("expected error from 'a' and 'bbb' on hamming")
}
if res != -1 {
t.Fatalf("erroring response wasn't -1, but %d", res)
}
}
| package tests
import (
"fmt"
"testing"
"github.com/xrash/smetrics"
)
func TestHamming(t *testing.T) {
cases := []hammingcase{
{"a", "a", 0},
{"a", "b", 1},
{"AAAA", "AABB", 2},
{"BAAA", "AAAA", 1},
{"BAAA", "CCCC", 4},
{"karolin", "kathrin", 3},
{"karolin", "kerstin", 3},
{"1011101", "1001001", 2},
{"2173896", "2233796", 3},
}
for _, c := range cases {
r, err := smetrics.Hamming(c.a, c.b)
if err != nil {
t.Fatalf("got error from hamming err=%s", err)
}
if r != c.diff {
fmt.Println(r, "instead of", c.diff)
t.Fail()
}
}
}
func TestHammingError(t *testing.T) {
res, err := smetrics.Hamming("a", "bbb")
if err == nil {
t.Fatalf("expected error from 'a' and 'bbb' on hamming")
}
if res != -1 {
t.Fatalf("erroring response wasn't -1, but %d", res)
}
}
| Add more tests to the Hamming function. | Add more tests to the Hamming function.
| Go | mit | xrash/smetrics | go | ## Code Before:
package tests
import (
"fmt"
"testing"
"github.com/xrash/smetrics"
)
func TestHamming(t *testing.T) {
cases := []hammingcase{
{"a", "a", 0},
{"a", "b", 1},
{"AAAA", "AABB", 2},
{"BAAA", "AAAA", 1},
{"BAAA", "CCCC", 4},
}
for _, c := range cases {
r, err := smetrics.Hamming(c.a, c.b)
if err != nil {
t.Fatalf("got error from hamming err=%s", err)
}
if r != c.diff {
fmt.Println(r, "instead of", c.diff)
t.Fail()
}
}
}
func TestHammingError(t *testing.T) {
res, err := smetrics.Hamming("a", "bbb")
if err == nil {
t.Fatalf("expected error from 'a' and 'bbb' on hamming")
}
if res != -1 {
t.Fatalf("erroring response wasn't -1, but %d", res)
}
}
## Instruction:
Add more tests to the Hamming function.
## Code After:
package tests
import (
"fmt"
"testing"
"github.com/xrash/smetrics"
)
func TestHamming(t *testing.T) {
cases := []hammingcase{
{"a", "a", 0},
{"a", "b", 1},
{"AAAA", "AABB", 2},
{"BAAA", "AAAA", 1},
{"BAAA", "CCCC", 4},
{"karolin", "kathrin", 3},
{"karolin", "kerstin", 3},
{"1011101", "1001001", 2},
{"2173896", "2233796", 3},
}
for _, c := range cases {
r, err := smetrics.Hamming(c.a, c.b)
if err != nil {
t.Fatalf("got error from hamming err=%s", err)
}
if r != c.diff {
fmt.Println(r, "instead of", c.diff)
t.Fail()
}
}
}
func TestHammingError(t *testing.T) {
res, err := smetrics.Hamming("a", "bbb")
if err == nil {
t.Fatalf("expected error from 'a' and 'bbb' on hamming")
}
if res != -1 {
t.Fatalf("erroring response wasn't -1, but %d", res)
}
}
| package tests
import (
"fmt"
"testing"
"github.com/xrash/smetrics"
)
func TestHamming(t *testing.T) {
cases := []hammingcase{
{"a", "a", 0},
{"a", "b", 1},
{"AAAA", "AABB", 2},
{"BAAA", "AAAA", 1},
{"BAAA", "CCCC", 4},
+ {"karolin", "kathrin", 3},
+ {"karolin", "kerstin", 3},
+ {"1011101", "1001001", 2},
+ {"2173896", "2233796", 3},
}
for _, c := range cases {
r, err := smetrics.Hamming(c.a, c.b)
if err != nil {
t.Fatalf("got error from hamming err=%s", err)
}
if r != c.diff {
fmt.Println(r, "instead of", c.diff)
t.Fail()
}
}
}
func TestHammingError(t *testing.T) {
res, err := smetrics.Hamming("a", "bbb")
if err == nil {
t.Fatalf("expected error from 'a' and 'bbb' on hamming")
}
if res != -1 {
t.Fatalf("erroring response wasn't -1, but %d", res)
}
} | 4 | 0.105263 | 4 | 0 |
bdf3c4b6d649707bdd98574b41e4d4bd307e0f9e | sky/compositor/opacity_layer.cc | sky/compositor/opacity_layer.cc | // Copyright 2015 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "sky/compositor/opacity_layer.h"
namespace sky {
namespace compositor {
OpacityLayer::OpacityLayer() {
}
OpacityLayer::~OpacityLayer() {
}
void OpacityLayer::Paint(PaintContext::ScopedFrame& frame) {
SkColor color = SkColorSetARGB(alpha_, 0, 0, 0);
RefPtr<SkColorFilter> colorFilter = adoptRef(
SkColorFilter::CreateModeFilter(color, SkXfermode::kSrcOver_Mode));
SkPaint paint;
paint.setColorFilter(colorFilter.get());
SkCanvas& canvas = frame.canvas();
canvas.saveLayer(has_paint_bounds() ? &paint_bounds() : nullptr, &paint);
PaintChildren(frame);
canvas.restore();
}
} // namespace compositor
} // namespace sky
| // Copyright 2015 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "sky/compositor/opacity_layer.h"
namespace sky {
namespace compositor {
OpacityLayer::OpacityLayer() {
}
OpacityLayer::~OpacityLayer() {
}
void OpacityLayer::Paint(PaintContext::ScopedFrame& frame) {
SkPaint paint;
paint.setColor(SkColorSetARGB(alpha_, 0, 0, 0));
paint.setXfermodeMode(SkXfermode::kSrcOver_Mode);
SkCanvas& canvas = frame.canvas();
canvas.saveLayer(has_paint_bounds() ? &paint_bounds() : nullptr, &paint);
PaintChildren(frame);
canvas.restore();
}
} // namespace compositor
} // namespace sky
| Fix OpacityLayer to blend in the correct direction | Fix OpacityLayer to blend in the correct direction
Fixes #610
| C++ | bsd-3-clause | cdotstout/sky_engine,rmacnak-google/engine,devoncarew/engine,cdotstout/sky_engine,tvolkert/engine,devoncarew/sky_engine,rmacnak-google/engine,lyceel/engine,aam/engine,jason-simmons/flutter_engine,jason-simmons/sky_engine,jamesr/flutter_engine,aam/engine,lyceel/engine,jamesr/sky_engine,jason-simmons/flutter_engine,cdotstout/sky_engine,jamesr/sky_engine,mpcomplete/flutter_engine,jason-simmons/flutter_engine,Hixie/sky_engine,krisgiesing/sky_engine,mpcomplete/flutter_engine,cdotstout/sky_engine,cdotstout/sky_engine,mpcomplete/flutter_engine,lyceel/engine,jason-simmons/flutter_engine,aam/engine,flutter/engine,Hixie/sky_engine,tvolkert/engine,flutter/engine,krisgiesing/sky_engine,jamesr/sky_engine,devoncarew/sky_engine,tvolkert/engine,mpcomplete/engine,chinmaygarde/flutter_engine,tvolkert/engine,mikejurka/engine,flutter/engine,flutter/engine,chinmaygarde/sky_engine,chinmaygarde/sky_engine,aam/engine,aam/engine,jason-simmons/flutter_engine,cdotstout/sky_engine,chinmaygarde/flutter_engine,devoncarew/sky_engine,mpcomplete/engine,jason-simmons/sky_engine,mikejurka/engine,tvolkert/engine,Hixie/sky_engine,mpcomplete/engine,krisgiesing/sky_engine,abarth/sky_engine,chinmaygarde/flutter_engine,lyceel/engine,jamesr/flutter_engine,chinmaygarde/sky_engine,Hixie/sky_engine,devoncarew/sky_engine,jason-simmons/flutter_engine,abarth/sky_engine,krisgiesing/sky_engine,lyceel/engine,jason-simmons/flutter_engine,chinmaygarde/flutter_engine,rmacnak-google/engine,mpcomplete/engine,devoncarew/sky_engine,lyceel/engine,chinmaygarde/sky_engine,jason-simmons/sky_engine,devoncarew/sky_engine,flutter/engine,rmacnak-google/engine,jamesr/flutter_engine,mikejurka/engine,abarth/sky_engine,devoncarew/engine,jamesr/flutter_engine,lyceel/engine,devoncarew/engine,Hixie/sky_engine,krisgiesing/sky_engine,chinmaygarde/sky_engine,jason-simmons/sky_engine,mpcomplete/engine,krisgiesing/sky_engine,chinmaygarde/flutter_engine,chinmaygarde/flutter_engine,mikejurka/engine,jason-simmons/sky_engine,jamesr/sky_engine,chinmaygarde/sky_engine,Hixie/sky_engine,mpcomplete/engine,Hixie/sky_engine,mikejurka/engine,jamesr/flutter_engine,aam/engine,jamesr/flutter_engine,flutter/engine,krisgiesing/sky_engine,devoncarew/engine,devoncarew/sky_engine,mikejurka/engine,tvolkert/engine,jamesr/sky_engine,jamesr/sky_engine,rmacnak-google/engine,devoncarew/engine,Hixie/sky_engine,devoncarew/engine,mikejurka/engine,rmacnak-google/engine,tvolkert/engine,mpcomplete/flutter_engine,mpcomplete/flutter_engine,aam/engine,jamesr/sky_engine,rmacnak-google/engine,jason-simmons/sky_engine,cdotstout/sky_engine,mikejurka/engine,jason-simmons/flutter_engine,abarth/sky_engine,jamesr/flutter_engine,chinmaygarde/flutter_engine,aam/engine,flutter/engine,mikejurka/engine,flutter/engine,chinmaygarde/sky_engine,devoncarew/engine,jamesr/flutter_engine,jason-simmons/sky_engine,jamesr/flutter_engine,abarth/sky_engine,abarth/sky_engine,mpcomplete/engine,abarth/sky_engine,mpcomplete/flutter_engine,mpcomplete/engine | c++ | ## Code Before:
// Copyright 2015 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "sky/compositor/opacity_layer.h"
namespace sky {
namespace compositor {
OpacityLayer::OpacityLayer() {
}
OpacityLayer::~OpacityLayer() {
}
void OpacityLayer::Paint(PaintContext::ScopedFrame& frame) {
SkColor color = SkColorSetARGB(alpha_, 0, 0, 0);
RefPtr<SkColorFilter> colorFilter = adoptRef(
SkColorFilter::CreateModeFilter(color, SkXfermode::kSrcOver_Mode));
SkPaint paint;
paint.setColorFilter(colorFilter.get());
SkCanvas& canvas = frame.canvas();
canvas.saveLayer(has_paint_bounds() ? &paint_bounds() : nullptr, &paint);
PaintChildren(frame);
canvas.restore();
}
} // namespace compositor
} // namespace sky
## Instruction:
Fix OpacityLayer to blend in the correct direction
Fixes #610
## Code After:
// Copyright 2015 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "sky/compositor/opacity_layer.h"
namespace sky {
namespace compositor {
OpacityLayer::OpacityLayer() {
}
OpacityLayer::~OpacityLayer() {
}
void OpacityLayer::Paint(PaintContext::ScopedFrame& frame) {
SkPaint paint;
paint.setColor(SkColorSetARGB(alpha_, 0, 0, 0));
paint.setXfermodeMode(SkXfermode::kSrcOver_Mode);
SkCanvas& canvas = frame.canvas();
canvas.saveLayer(has_paint_bounds() ? &paint_bounds() : nullptr, &paint);
PaintChildren(frame);
canvas.restore();
}
} // namespace compositor
} // namespace sky
| // Copyright 2015 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "sky/compositor/opacity_layer.h"
namespace sky {
namespace compositor {
OpacityLayer::OpacityLayer() {
}
OpacityLayer::~OpacityLayer() {
}
void OpacityLayer::Paint(PaintContext::ScopedFrame& frame) {
- SkColor color = SkColorSetARGB(alpha_, 0, 0, 0);
- RefPtr<SkColorFilter> colorFilter = adoptRef(
- SkColorFilter::CreateModeFilter(color, SkXfermode::kSrcOver_Mode));
SkPaint paint;
- paint.setColorFilter(colorFilter.get());
+ paint.setColor(SkColorSetARGB(alpha_, 0, 0, 0));
+ paint.setXfermodeMode(SkXfermode::kSrcOver_Mode);
SkCanvas& canvas = frame.canvas();
canvas.saveLayer(has_paint_bounds() ? &paint_bounds() : nullptr, &paint);
PaintChildren(frame);
canvas.restore();
}
} // namespace compositor
} // namespace sky | 6 | 0.206897 | 2 | 4 |
e7d121a70d359be1c9bd14772d24245fc5e416df | examples/consumer-example.html | examples/consumer-example.html | <!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Signal K consumer</title>
<script src="/signalk/stream/primus.js"></script>
</head>
<body>
<pre>
<div id="data"/>
</pre>
</body>
<script>
var signalKStream = Primus.connect(window.location.hostname + "/primus/signalk?stream=delta", {
reconnect: {
maxDelay: 15000,
minDelay: 500,
retries: Infinity
}
});
var dataDiv = document.getElementById('data');
signalKStream.on('data', function(data) {
dataDiv.innerHTML = JSON.stringify(data, null, 2);
});
</script>
</html> | <!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Signal K consumer</title>
<script src="/signalk/stream/v1/primus.js"></script>
</head>
<body>
<pre>
<div id="data"/>
</pre>
</body>
<script>
var signalKStream = Primus.connect(window.location.hostname + "/signalk/stream/v1?stream=delta", {
reconnect: {
maxDelay: 15000,
minDelay: 500,
retries: Infinity
}
});
var dataDiv = document.getElementById('data');
signalKStream.on('data', function(data) {
dataDiv.innerHTML = JSON.stringify(data, null, 2);
});
</script>
</html> | Fix paths in the example consumer | Fix paths in the example consumer
| HTML | apache-2.0 | SignalK/signalk-server-node,sbender9/signalk-server-node,lsoltero/signalk-server-node,webmasterkai/signalk-server-node,jaittola/signalk-server-node,SignalK/signalk-server-node,mauroc/signalk-oauth-node,lsoltero/signalk-server-node,SignalK/signalk-server-node,mauroc/signalk-oauth-node,jaittola/signalk-server-node,webmasterkai/signalk-server-node,jaittola/signalk-server-node,sbender9/signalk-server-node,mauroc/signalk-oauth-node,SignalK/signalk-server-node,webmasterkai/signalk-server-node,sbender9/signalk-server-node | html | ## Code Before:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Signal K consumer</title>
<script src="/signalk/stream/primus.js"></script>
</head>
<body>
<pre>
<div id="data"/>
</pre>
</body>
<script>
var signalKStream = Primus.connect(window.location.hostname + "/primus/signalk?stream=delta", {
reconnect: {
maxDelay: 15000,
minDelay: 500,
retries: Infinity
}
});
var dataDiv = document.getElementById('data');
signalKStream.on('data', function(data) {
dataDiv.innerHTML = JSON.stringify(data, null, 2);
});
</script>
</html>
## Instruction:
Fix paths in the example consumer
## Code After:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Signal K consumer</title>
<script src="/signalk/stream/v1/primus.js"></script>
</head>
<body>
<pre>
<div id="data"/>
</pre>
</body>
<script>
var signalKStream = Primus.connect(window.location.hostname + "/signalk/stream/v1?stream=delta", {
reconnect: {
maxDelay: 15000,
minDelay: 500,
retries: Infinity
}
});
var dataDiv = document.getElementById('data');
signalKStream.on('data', function(data) {
dataDiv.innerHTML = JSON.stringify(data, null, 2);
});
</script>
</html> | <!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Signal K consumer</title>
- <script src="/signalk/stream/primus.js"></script>
+ <script src="/signalk/stream/v1/primus.js"></script>
? +++
</head>
<body>
<pre>
<div id="data"/>
</pre>
</body>
<script>
- var signalKStream = Primus.connect(window.location.hostname + "/primus/signalk?stream=delta", {
? -------
+ var signalKStream = Primus.connect(window.location.hostname + "/signalk/stream/v1?stream=delta", {
? ++++++++++
reconnect: {
maxDelay: 15000,
minDelay: 500,
retries: Infinity
}
});
var dataDiv = document.getElementById('data');
signalKStream.on('data', function(data) {
dataDiv.innerHTML = JSON.stringify(data, null, 2);
});
</script>
</html> | 4 | 0.129032 | 2 | 2 |
8dfd6eecac3026bdcd393f91324bb50b3f77809a | travis.yml | travis.yml | language: cpp
os:
- linux
- osx
sudo: required
env:
# - RECIPE=gmp
# - RECIPE=mpfr
# - RECIPE=mpc
# - RECIPE=isl
# - RECIPE=binutils
# - RECIPE=glibc
# - RECIPE=gcc
# - RECIPE=libgcc
- RECIPE=python-scons
- RECIPE=libdev
- RECIPE=python-dev
- RECIPE=python-dbg
- RECIPE=llvm
- RECIPE=clang
- RECIPE=python-clang
- RECIPE=libboost
install:
- git clone https://gist.github.com/319558c83d145620a6d4decdcadfbfb0.git travis-ci
- cd travis-ci
- source install.sh
before_script:
- source before_script.sh
script:
- source script.sh
after_success:
- source after_success.sh
after_failure:
- source after_failure.sh
before_deploy:
- source before_deploy.sh
deploy:
skip_cleanup: true
provider: script
on:
branch: master
script: chmod +x deploy_script.sh && env && bash deploy_script.sh
after_deploy:
- source after_deploy.sh
after_script:
- source after_script.sh
| language: cpp
os:
- linux
- osx
sudo: required
env:
# - RECIPE=gmp
# - RECIPE=mpfr
# - RECIPE=mpc
# - RECIPE=isl
# - RECIPE=binutils
# - RECIPE=glibc
# - RECIPE=gcc
# - RECIPE=libgcc
- RECIPE=python-scons
- RECIPE=libdev
- RECIPE=python-dev
- RECIPE=python-dbg
- RECIPE=llvm
- RECIPE=clang
- RECIPE=python-clang
- RECIPE=libboost
install:
- git clone https://gist.github.com/319558c83d145620a6d4decdcadfbfb0.git travis-ci
- cd travis-ci
- source install.sh
before_script:
- source before_script.sh
script:
- source script.sh
after_success:
- source after_success.sh
after_failure:
- source after_failure.sh
before_deploy:
- source before_deploy.sh
deploy:
skip_cleanup: true
provider: script
on:
branch: master
script: bash deploy_script.sh
after_deploy:
- source after_deploy.sh
after_script:
- source after_script.sh
| Update Travis CI configuration file | Update Travis CI configuration file
| YAML | apache-2.0 | StatisKit/StatisKit,StatisKit/StatisKit | yaml | ## Code Before:
language: cpp
os:
- linux
- osx
sudo: required
env:
# - RECIPE=gmp
# - RECIPE=mpfr
# - RECIPE=mpc
# - RECIPE=isl
# - RECIPE=binutils
# - RECIPE=glibc
# - RECIPE=gcc
# - RECIPE=libgcc
- RECIPE=python-scons
- RECIPE=libdev
- RECIPE=python-dev
- RECIPE=python-dbg
- RECIPE=llvm
- RECIPE=clang
- RECIPE=python-clang
- RECIPE=libboost
install:
- git clone https://gist.github.com/319558c83d145620a6d4decdcadfbfb0.git travis-ci
- cd travis-ci
- source install.sh
before_script:
- source before_script.sh
script:
- source script.sh
after_success:
- source after_success.sh
after_failure:
- source after_failure.sh
before_deploy:
- source before_deploy.sh
deploy:
skip_cleanup: true
provider: script
on:
branch: master
script: chmod +x deploy_script.sh && env && bash deploy_script.sh
after_deploy:
- source after_deploy.sh
after_script:
- source after_script.sh
## Instruction:
Update Travis CI configuration file
## Code After:
language: cpp
os:
- linux
- osx
sudo: required
env:
# - RECIPE=gmp
# - RECIPE=mpfr
# - RECIPE=mpc
# - RECIPE=isl
# - RECIPE=binutils
# - RECIPE=glibc
# - RECIPE=gcc
# - RECIPE=libgcc
- RECIPE=python-scons
- RECIPE=libdev
- RECIPE=python-dev
- RECIPE=python-dbg
- RECIPE=llvm
- RECIPE=clang
- RECIPE=python-clang
- RECIPE=libboost
install:
- git clone https://gist.github.com/319558c83d145620a6d4decdcadfbfb0.git travis-ci
- cd travis-ci
- source install.sh
before_script:
- source before_script.sh
script:
- source script.sh
after_success:
- source after_success.sh
after_failure:
- source after_failure.sh
before_deploy:
- source before_deploy.sh
deploy:
skip_cleanup: true
provider: script
on:
branch: master
script: bash deploy_script.sh
after_deploy:
- source after_deploy.sh
after_script:
- source after_script.sh
| language: cpp
os:
- linux
- osx
sudo: required
env:
# - RECIPE=gmp
# - RECIPE=mpfr
# - RECIPE=mpc
# - RECIPE=isl
# - RECIPE=binutils
# - RECIPE=glibc
# - RECIPE=gcc
# - RECIPE=libgcc
- RECIPE=python-scons
- RECIPE=libdev
- RECIPE=python-dev
- RECIPE=python-dbg
- RECIPE=llvm
- RECIPE=clang
- RECIPE=python-clang
- RECIPE=libboost
install:
- git clone https://gist.github.com/319558c83d145620a6d4decdcadfbfb0.git travis-ci
- cd travis-ci
- source install.sh
before_script:
- source before_script.sh
script:
- source script.sh
after_success:
- source after_success.sh
after_failure:
- source after_failure.sh
before_deploy:
- source before_deploy.sh
deploy:
skip_cleanup: true
provider: script
on:
branch: master
- script: chmod +x deploy_script.sh && env && bash deploy_script.sh
+ script: bash deploy_script.sh
after_deploy:
- source after_deploy.sh
after_script:
- source after_script.sh | 2 | 0.034483 | 1 | 1 |
ae096aa53823d48635aae67fda8d0f96e20181a7 | PFoundation/Extensions/Dictionary.swift | PFoundation/Extensions/Dictionary.swift |
extension Dictionary {
public func toURLEncodedString() -> String {
var pairs = [String]()
for element in self {
if let key = encode(element.0 as! AnyObject),
let value = encode(element.1 as! AnyObject) where (!value.isEmpty && !key.isEmpty) {
pairs.append([key, value].joinWithSeparator("="))
} else {
continue
}
}
guard !pairs.isEmpty else {
return ""
}
return pairs.joinWithSeparator("&")
}
}
|
extension Dictionary {
public init<Sequence: SequenceType where Sequence.Generator.Element == Value>(sequence: Sequence, @noescape keyMapper: Value -> Key?) {
self.init()
for item in sequence {
if let key = keyMapper(item) {
self[key] = item
}
}
}
public func toURLEncodedString() -> String {
var pairs = [String]()
for element in self {
if let key = encode(element.0 as! AnyObject),
let value = encode(element.1 as! AnyObject) where (!value.isEmpty && !key.isEmpty) {
pairs.append([key, value].joinWithSeparator("="))
} else {
continue
}
}
guard !pairs.isEmpty else {
return ""
}
return pairs.joinWithSeparator("&")
}
}
| Add sequence init to dictionary | Add sequence init to dictionary
| Swift | mit | Pacific3/P3Foundation,Pacific3/PFoundation | swift | ## Code Before:
extension Dictionary {
public func toURLEncodedString() -> String {
var pairs = [String]()
for element in self {
if let key = encode(element.0 as! AnyObject),
let value = encode(element.1 as! AnyObject) where (!value.isEmpty && !key.isEmpty) {
pairs.append([key, value].joinWithSeparator("="))
} else {
continue
}
}
guard !pairs.isEmpty else {
return ""
}
return pairs.joinWithSeparator("&")
}
}
## Instruction:
Add sequence init to dictionary
## Code After:
extension Dictionary {
public init<Sequence: SequenceType where Sequence.Generator.Element == Value>(sequence: Sequence, @noescape keyMapper: Value -> Key?) {
self.init()
for item in sequence {
if let key = keyMapper(item) {
self[key] = item
}
}
}
public func toURLEncodedString() -> String {
var pairs = [String]()
for element in self {
if let key = encode(element.0 as! AnyObject),
let value = encode(element.1 as! AnyObject) where (!value.isEmpty && !key.isEmpty) {
pairs.append([key, value].joinWithSeparator("="))
} else {
continue
}
}
guard !pairs.isEmpty else {
return ""
}
return pairs.joinWithSeparator("&")
}
}
|
extension Dictionary {
+ public init<Sequence: SequenceType where Sequence.Generator.Element == Value>(sequence: Sequence, @noescape keyMapper: Value -> Key?) {
+ self.init()
+
+ for item in sequence {
+ if let key = keyMapper(item) {
+ self[key] = item
+ }
+ }
+ }
+
public func toURLEncodedString() -> String {
var pairs = [String]()
for element in self {
if let key = encode(element.0 as! AnyObject),
let value = encode(element.1 as! AnyObject) where (!value.isEmpty && !key.isEmpty) {
pairs.append([key, value].joinWithSeparator("="))
} else {
continue
}
}
guard !pairs.isEmpty else {
return ""
}
return pairs.joinWithSeparator("&")
}
} | 10 | 0.5 | 10 | 0 |
34354e172e1f5cc4c6534ebf89b47c61157d7170 | app/helpers/manageiq/providers/lenovo/toolbar_overrides/ems_physical_infra_center.rb | app/helpers/manageiq/providers/lenovo/toolbar_overrides/ems_physical_infra_center.rb | module ManageIQ
module Providers
module Lenovo
module ToolbarOverrides
class EmsPhysicalInfraCenter < ::ApplicationHelper::Toolbar::Override
button_group(
'provider_provision',
[
select(
:provider_provision_choice,
'pficon pficon-process-automation pficon-lg',
N_('Provision'),
:enabled => true,
:items => [
button(
:provision_apply_pattern,
'fa fa-clipboard fa-lg',
t = N_('Apply Config Pattern'),
t,
:data => {
'function' => 'sendDataWithRx',
'function-data' => {:controller => 'provider_dialogs', # this one is required
:button => :provision_apply_pattern,
:modal_title => N_('Apply Config Pattern'),
:component_name => 'ApplyConfigPatternFormProvider'}.to_json
},
:klass => ApplicationHelper::Button::ButtonWithoutRbacCheck
),
button(
:provision_firmware_update,
'fa fa-clipboard fa-lg',
t = N_('Firmware Update'),
t,
:data => {
'function' => 'sendDataWithRx',
'function-data' => {:controller => 'provider_dialogs', # this one is required
:button => :provision_firmware_update,
:modal_title => N_('Firmware Update'),
:component_name => 'FirmwareUpdateFormProvider'}.to_json
},
:klass => ApplicationHelper::Button::ButtonWithoutRbacCheck
)
]
)
]
)
end
end
end
end
end
| module ManageIQ
module Providers
module Lenovo
module ToolbarOverrides
class EmsPhysicalInfraCenter < ::ApplicationHelper::Toolbar::Override
button_group(
'provider_provision',
[
select(
:provider_provision_choice,
'pficon pficon-process-automation pficon-lg',
N_('Provision'),
:enabled => true,
:items => [
button(
:provision_apply_pattern,
'fa fa-clipboard fa-lg',
t = N_('Apply Config Pattern'),
t,
:data => {
'function' => 'sendDataWithRx',
'function-data' => {:controller => 'provider_dialogs', # this one is required
:button => :provision_apply_pattern,
:modal_title => N_('Apply Config Pattern'),
:component_name => 'ApplyConfigPatternFormProvider'}
},
:klass => ApplicationHelper::Button::ButtonWithoutRbacCheck
),
button(
:provision_firmware_update,
'fa fa-clipboard fa-lg',
t = N_('Firmware Update'),
t,
:data => {
'function' => 'sendDataWithRx',
'function-data' => {:controller => 'provider_dialogs', # this one is required
:button => :provision_firmware_update,
:modal_title => N_('Firmware Update'),
:component_name => 'FirmwareUpdateFormProvider'}
},
:klass => ApplicationHelper::Button::ButtonWithoutRbacCheck
)
]
)
]
)
end
end
end
end
end
| Remove to_json from toolbar data as it's not needed | Remove to_json from toolbar data as it's not needed
After https://github.com/ManageIQ/manageiq-ui-classic/pull/5997 `to_json` is not needed and will break the data format.
Related to https://github.com/ManageIQ/manageiq-ui-classic/pull/6289 fix
| Ruby | apache-2.0 | juliancheal/manageiq-providers-lenovo,juliancheal/manageiq-providers-lenovo | ruby | ## Code Before:
module ManageIQ
module Providers
module Lenovo
module ToolbarOverrides
class EmsPhysicalInfraCenter < ::ApplicationHelper::Toolbar::Override
button_group(
'provider_provision',
[
select(
:provider_provision_choice,
'pficon pficon-process-automation pficon-lg',
N_('Provision'),
:enabled => true,
:items => [
button(
:provision_apply_pattern,
'fa fa-clipboard fa-lg',
t = N_('Apply Config Pattern'),
t,
:data => {
'function' => 'sendDataWithRx',
'function-data' => {:controller => 'provider_dialogs', # this one is required
:button => :provision_apply_pattern,
:modal_title => N_('Apply Config Pattern'),
:component_name => 'ApplyConfigPatternFormProvider'}.to_json
},
:klass => ApplicationHelper::Button::ButtonWithoutRbacCheck
),
button(
:provision_firmware_update,
'fa fa-clipboard fa-lg',
t = N_('Firmware Update'),
t,
:data => {
'function' => 'sendDataWithRx',
'function-data' => {:controller => 'provider_dialogs', # this one is required
:button => :provision_firmware_update,
:modal_title => N_('Firmware Update'),
:component_name => 'FirmwareUpdateFormProvider'}.to_json
},
:klass => ApplicationHelper::Button::ButtonWithoutRbacCheck
)
]
)
]
)
end
end
end
end
end
## Instruction:
Remove to_json from toolbar data as it's not needed
After https://github.com/ManageIQ/manageiq-ui-classic/pull/5997 `to_json` is not needed and will break the data format.
Related to https://github.com/ManageIQ/manageiq-ui-classic/pull/6289 fix
## Code After:
module ManageIQ
module Providers
module Lenovo
module ToolbarOverrides
class EmsPhysicalInfraCenter < ::ApplicationHelper::Toolbar::Override
button_group(
'provider_provision',
[
select(
:provider_provision_choice,
'pficon pficon-process-automation pficon-lg',
N_('Provision'),
:enabled => true,
:items => [
button(
:provision_apply_pattern,
'fa fa-clipboard fa-lg',
t = N_('Apply Config Pattern'),
t,
:data => {
'function' => 'sendDataWithRx',
'function-data' => {:controller => 'provider_dialogs', # this one is required
:button => :provision_apply_pattern,
:modal_title => N_('Apply Config Pattern'),
:component_name => 'ApplyConfigPatternFormProvider'}
},
:klass => ApplicationHelper::Button::ButtonWithoutRbacCheck
),
button(
:provision_firmware_update,
'fa fa-clipboard fa-lg',
t = N_('Firmware Update'),
t,
:data => {
'function' => 'sendDataWithRx',
'function-data' => {:controller => 'provider_dialogs', # this one is required
:button => :provision_firmware_update,
:modal_title => N_('Firmware Update'),
:component_name => 'FirmwareUpdateFormProvider'}
},
:klass => ApplicationHelper::Button::ButtonWithoutRbacCheck
)
]
)
]
)
end
end
end
end
end
| module ManageIQ
module Providers
module Lenovo
module ToolbarOverrides
class EmsPhysicalInfraCenter < ::ApplicationHelper::Toolbar::Override
button_group(
'provider_provision',
[
select(
:provider_provision_choice,
'pficon pficon-process-automation pficon-lg',
N_('Provision'),
:enabled => true,
:items => [
button(
:provision_apply_pattern,
'fa fa-clipboard fa-lg',
t = N_('Apply Config Pattern'),
t,
:data => {
'function' => 'sendDataWithRx',
'function-data' => {:controller => 'provider_dialogs', # this one is required
:button => :provision_apply_pattern,
:modal_title => N_('Apply Config Pattern'),
- :component_name => 'ApplyConfigPatternFormProvider'}.to_json
? --------
+ :component_name => 'ApplyConfigPatternFormProvider'}
},
:klass => ApplicationHelper::Button::ButtonWithoutRbacCheck
),
button(
:provision_firmware_update,
'fa fa-clipboard fa-lg',
t = N_('Firmware Update'),
t,
:data => {
'function' => 'sendDataWithRx',
'function-data' => {:controller => 'provider_dialogs', # this one is required
:button => :provision_firmware_update,
:modal_title => N_('Firmware Update'),
- :component_name => 'FirmwareUpdateFormProvider'}.to_json
? --------
+ :component_name => 'FirmwareUpdateFormProvider'}
},
:klass => ApplicationHelper::Button::ButtonWithoutRbacCheck
)
]
)
]
)
end
end
end
end
end | 4 | 0.078431 | 2 | 2 |
f56707266a62ca735a690fdc75031e235019b922 | lib/pgpool/pcpwrapper.rb | lib/pgpool/pcpwrapper.rb | require 'forwardable'
require 'core_extensions/string/percentage'
require 'pgpool/command_launcher'
require 'pgpool/response'
require 'pgpool/node_info'
require 'pgpool/version'
#
# = module: PGPool module as namespace
module PGPool
#
# = class: PCPWrapper, the main gem module
class PCPWrapper
extend Forwardable
DEFAULT_TIMEOUT = 10
DEFAULT_HOSTNAME = 'localhost'
DEFAULT_PORT = 9898
DEFAULT_USER = 'postgres'
DEFAULT_PASSWORD = 'postgres'
def_delegators :@command_launcher, :node_information, :nodes_information
def initialize(parameters={ })
parameters = {
hostname: DEFAULT_HOSTNAME,
port: DEFAULT_PORT,
user: DEFAULT_USER,
password: DEFAULT_PASSWORD,
timeout: DEFAULT_TIMEOUT
}.merge(parameters)
@command_launcher = CommandLauncher.new(
parameters[:hostname],
parameters[:port],
parameters[:user],
parameters[:password],
parameters[:timeout])
self
end
end
end
| require 'forwardable'
require 'core_extensions/string/percentage'
require 'pgpool/command_launcher'
require 'pgpool/response'
require 'pgpool/node_info'
require 'pgpool/version'
#
# = module: PGPool module as namespace
module PGPool
#
# = class: PCPWrapper, the main gem module
class PCPWrapper
extend Forwardable
DEFAULT_TIMEOUT = 10
DEFAULT_HOSTNAME = 'localhost'
DEFAULT_PORT = 9898
DEFAULT_USER = 'postgres'
DEFAULT_PASSWORD = 'postgres'
def_delegators :@command_launcher, :valid_node_id?, :node_information, :nodes_information
def initialize(parameters={ })
parameters = {
hostname: DEFAULT_HOSTNAME,
port: DEFAULT_PORT,
user: DEFAULT_USER,
password: DEFAULT_PASSWORD,
timeout: DEFAULT_TIMEOUT
}.merge(parameters)
@command_launcher = CommandLauncher.new(
parameters[:hostname],
parameters[:port],
parameters[:user],
parameters[:password],
parameters[:timeout])
self
end
end
end
| Delete all of the CommandLauncher methods | Delete all of the CommandLauncher methods
| Ruby | mit | jjuarez/pgpool-pcpwrapper,jjuarez/pgpool-pcpwrapper | ruby | ## Code Before:
require 'forwardable'
require 'core_extensions/string/percentage'
require 'pgpool/command_launcher'
require 'pgpool/response'
require 'pgpool/node_info'
require 'pgpool/version'
#
# = module: PGPool module as namespace
module PGPool
#
# = class: PCPWrapper, the main gem module
class PCPWrapper
extend Forwardable
DEFAULT_TIMEOUT = 10
DEFAULT_HOSTNAME = 'localhost'
DEFAULT_PORT = 9898
DEFAULT_USER = 'postgres'
DEFAULT_PASSWORD = 'postgres'
def_delegators :@command_launcher, :node_information, :nodes_information
def initialize(parameters={ })
parameters = {
hostname: DEFAULT_HOSTNAME,
port: DEFAULT_PORT,
user: DEFAULT_USER,
password: DEFAULT_PASSWORD,
timeout: DEFAULT_TIMEOUT
}.merge(parameters)
@command_launcher = CommandLauncher.new(
parameters[:hostname],
parameters[:port],
parameters[:user],
parameters[:password],
parameters[:timeout])
self
end
end
end
## Instruction:
Delete all of the CommandLauncher methods
## Code After:
require 'forwardable'
require 'core_extensions/string/percentage'
require 'pgpool/command_launcher'
require 'pgpool/response'
require 'pgpool/node_info'
require 'pgpool/version'
#
# = module: PGPool module as namespace
module PGPool
#
# = class: PCPWrapper, the main gem module
class PCPWrapper
extend Forwardable
DEFAULT_TIMEOUT = 10
DEFAULT_HOSTNAME = 'localhost'
DEFAULT_PORT = 9898
DEFAULT_USER = 'postgres'
DEFAULT_PASSWORD = 'postgres'
def_delegators :@command_launcher, :valid_node_id?, :node_information, :nodes_information
def initialize(parameters={ })
parameters = {
hostname: DEFAULT_HOSTNAME,
port: DEFAULT_PORT,
user: DEFAULT_USER,
password: DEFAULT_PASSWORD,
timeout: DEFAULT_TIMEOUT
}.merge(parameters)
@command_launcher = CommandLauncher.new(
parameters[:hostname],
parameters[:port],
parameters[:user],
parameters[:password],
parameters[:timeout])
self
end
end
end
| require 'forwardable'
require 'core_extensions/string/percentage'
require 'pgpool/command_launcher'
require 'pgpool/response'
require 'pgpool/node_info'
require 'pgpool/version'
#
# = module: PGPool module as namespace
module PGPool
#
# = class: PCPWrapper, the main gem module
class PCPWrapper
extend Forwardable
DEFAULT_TIMEOUT = 10
DEFAULT_HOSTNAME = 'localhost'
DEFAULT_PORT = 9898
DEFAULT_USER = 'postgres'
DEFAULT_PASSWORD = 'postgres'
- def_delegators :@command_launcher, :node_information, :nodes_information
+ def_delegators :@command_launcher, :valid_node_id?, :node_information, :nodes_information
? +++++++++++++++++
def initialize(parameters={ })
parameters = {
hostname: DEFAULT_HOSTNAME,
port: DEFAULT_PORT,
user: DEFAULT_USER,
password: DEFAULT_PASSWORD,
timeout: DEFAULT_TIMEOUT
}.merge(parameters)
@command_launcher = CommandLauncher.new(
parameters[:hostname],
parameters[:port],
parameters[:user],
parameters[:password],
parameters[:timeout])
self
end
end
end | 2 | 0.045455 | 1 | 1 |
25e019fa56d1a2bc8fd2c94e27591d0f7e30b9ab | lib/defaultHeadersMiddleware.js | lib/defaultHeadersMiddleware.js | // sets default headers for all responses
// USAGE
// (should come AFTER any express.static middleware, including
// react-scripts/lib/assetMiddleware)
//
// app.use(defaultHeadersMiddleware);
module.exports = (req, res, next) => {
res.set({
// this should come after express.static otherwise it overrides
'Cache-Control': 'max-age=300',
'Strict-Transport-Security': 'max-age=15768000; includeSubDomains; preload',
});
next();
};
| // sets default headers for all responses
// USAGE
// (should come AFTER any express.static middleware, including
// react-scripts/lib/assetMiddleware)
//
// app.use(defaultHeadersMiddleware);
module.exports = (req, res, next) => {
res.set({
// this should come after express.static otherwise it overrides
'Cache-Control': 'max-age=300',
// https://observatory.mozilla.org/ for recommended settings
'Strict-Transport-Security': 'max-age=15768000; includeSubDomains; preload',
'Referrer-Policy': 'no-referrer',
'X-Content-Type-Options': 'nosniff',
'X-XSS-Protection': '1; mode=block',
'X-Frame-Options': 'SAMEORIGIN'
});
next();
};
| Add additional suggested security headers | Add additional suggested security headers
| JavaScript | mit | firstlookmedia/react-scripts,firstlookmedia/react-scripts | javascript | ## Code Before:
// sets default headers for all responses
// USAGE
// (should come AFTER any express.static middleware, including
// react-scripts/lib/assetMiddleware)
//
// app.use(defaultHeadersMiddleware);
module.exports = (req, res, next) => {
res.set({
// this should come after express.static otherwise it overrides
'Cache-Control': 'max-age=300',
'Strict-Transport-Security': 'max-age=15768000; includeSubDomains; preload',
});
next();
};
## Instruction:
Add additional suggested security headers
## Code After:
// sets default headers for all responses
// USAGE
// (should come AFTER any express.static middleware, including
// react-scripts/lib/assetMiddleware)
//
// app.use(defaultHeadersMiddleware);
module.exports = (req, res, next) => {
res.set({
// this should come after express.static otherwise it overrides
'Cache-Control': 'max-age=300',
// https://observatory.mozilla.org/ for recommended settings
'Strict-Transport-Security': 'max-age=15768000; includeSubDomains; preload',
'Referrer-Policy': 'no-referrer',
'X-Content-Type-Options': 'nosniff',
'X-XSS-Protection': '1; mode=block',
'X-Frame-Options': 'SAMEORIGIN'
});
next();
};
| // sets default headers for all responses
// USAGE
// (should come AFTER any express.static middleware, including
// react-scripts/lib/assetMiddleware)
//
// app.use(defaultHeadersMiddleware);
module.exports = (req, res, next) => {
res.set({
// this should come after express.static otherwise it overrides
'Cache-Control': 'max-age=300',
+
+ // https://observatory.mozilla.org/ for recommended settings
'Strict-Transport-Security': 'max-age=15768000; includeSubDomains; preload',
+ 'Referrer-Policy': 'no-referrer',
+ 'X-Content-Type-Options': 'nosniff',
+ 'X-XSS-Protection': '1; mode=block',
+ 'X-Frame-Options': 'SAMEORIGIN'
});
next();
}; | 6 | 0.375 | 6 | 0 |
1a6821c0cd468f01abe26ff9cb61ffc952e34d98 | README.md | README.md |
A backbone + moment.js date picker
## Getting Started
Download the [production version][min] or the [development version][max].
[min]: https://raw.github.com/jonotron/jquery.moment.picker/master/dist/jquery.moment.picker.min.js
[max]: https://raw.github.com/jonotron/jquery.moment.picker/master/dist/jquery.moment.picker.js
In your web page:
```html
<script src="jquery.js"></script>
<script src="dist/jquery.moment.picker.min.js"></script>
<script>
jQuery(function($) {
$.awesome(); // "awesome"
});
</script>
```
## Documentation
_(Coming soon)_
## Examples
_(Coming soon)_
## Contributing
In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using [grunt](https://github.com/cowboy/grunt).
_Also, please don't edit files in the "dist" subdirectory as they are generated via grunt. You'll find source code in the "src" subdirectory!_
## Release History
_(Nothing yet)_
## License
Copyright (c) 2012 Jonathan Bowers
Licensed under the MIT license.
|
A backbone + moment.js date picker.
## Why another date picker?
I wanted a date picker that did not make too many UI assumptions (forcing you to use a popover/popunder), but did make some assumptions about the environment it was used in (backbone view with events, returning moments).
It tries to be as small as possible, and use libraries that you are already using.
It is suitable to be placed on a screen as is so as to be easily touched (on touch devices)
## Documentation
_(Coming soon)_
## Examples
_(Coming soon)_
## Contributing
In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using [grunt](https://github.com/cowboy/grunt).
_Also, please don't edit files in the "dist" subdirectory as they are generated via grunt. You'll find source code in the "src" subdirectory!_
## Release History
_(Nothing yet)_
## License
Copyright (c) 2012 Jonathan Bowers
Licensed under the MIT license.
| Remove the generated readme, more detailed description | Remove the generated readme, more detailed description
The old readme was generated by something (probably yeoman), and didn't describe anything about moment.picker. | Markdown | mit | jonotron/moment.picker | markdown | ## Code Before:
A backbone + moment.js date picker
## Getting Started
Download the [production version][min] or the [development version][max].
[min]: https://raw.github.com/jonotron/jquery.moment.picker/master/dist/jquery.moment.picker.min.js
[max]: https://raw.github.com/jonotron/jquery.moment.picker/master/dist/jquery.moment.picker.js
In your web page:
```html
<script src="jquery.js"></script>
<script src="dist/jquery.moment.picker.min.js"></script>
<script>
jQuery(function($) {
$.awesome(); // "awesome"
});
</script>
```
## Documentation
_(Coming soon)_
## Examples
_(Coming soon)_
## Contributing
In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using [grunt](https://github.com/cowboy/grunt).
_Also, please don't edit files in the "dist" subdirectory as they are generated via grunt. You'll find source code in the "src" subdirectory!_
## Release History
_(Nothing yet)_
## License
Copyright (c) 2012 Jonathan Bowers
Licensed under the MIT license.
## Instruction:
Remove the generated readme, more detailed description
The old readme was generated by something (probably yeoman), and didn't describe anything about moment.picker.
## Code After:
A backbone + moment.js date picker.
## Why another date picker?
I wanted a date picker that did not make too many UI assumptions (forcing you to use a popover/popunder), but did make some assumptions about the environment it was used in (backbone view with events, returning moments).
It tries to be as small as possible, and use libraries that you are already using.
It is suitable to be placed on a screen as is so as to be easily touched (on touch devices)
## Documentation
_(Coming soon)_
## Examples
_(Coming soon)_
## Contributing
In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using [grunt](https://github.com/cowboy/grunt).
_Also, please don't edit files in the "dist" subdirectory as they are generated via grunt. You'll find source code in the "src" subdirectory!_
## Release History
_(Nothing yet)_
## License
Copyright (c) 2012 Jonathan Bowers
Licensed under the MIT license.
|
- A backbone + moment.js date picker
+ A backbone + moment.js date picker.
? +
+ ## Why another date picker?
- ## Getting Started
- Download the [production version][min] or the [development version][max].
+ I wanted a date picker that did not make too many UI assumptions (forcing you to use a popover/popunder), but did make some assumptions about the environment it was used in (backbone view with events, returning moments).
- [min]: https://raw.github.com/jonotron/jquery.moment.picker/master/dist/jquery.moment.picker.min.js
- [max]: https://raw.github.com/jonotron/jquery.moment.picker/master/dist/jquery.moment.picker.js
- In your web page:
+ It tries to be as small as possible, and use libraries that you are already using.
+ It is suitable to be placed on a screen as is so as to be easily touched (on touch devices)
- ```html
- <script src="jquery.js"></script>
- <script src="dist/jquery.moment.picker.min.js"></script>
- <script>
- jQuery(function($) {
- $.awesome(); // "awesome"
- });
- </script>
- ```
## Documentation
_(Coming soon)_
## Examples
_(Coming soon)_
## Contributing
In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using [grunt](https://github.com/cowboy/grunt).
_Also, please don't edit files in the "dist" subdirectory as they are generated via grunt. You'll find source code in the "src" subdirectory!_
## Release History
_(Nothing yet)_
## License
Copyright (c) 2012 Jonathan Bowers
Licensed under the MIT license. | 20 | 0.526316 | 5 | 15 |
0952eae9092327c4dac6b24162c02d0b17e53ef5 | packages/re/remote-json-server.yaml | packages/re/remote-json-server.yaml | homepage: ''
changelog-type: ''
hash: f0164cc7b5a6fcdc714afa794ef07d5768e85d095d07cdf2e005009803010894
test-bench-deps: {}
maintainer: JDawson@ku.edu
synopsis: Web server wrapper for remote-json
changelog: ''
basic-deps:
warp: ! '>=3.2 && <3.3'
base: ! '>=4 && <5'
data-default-class: ==0.0.1
text: ! '>=1.2 && <1.3'
remote-json: ! '>=0.2 && <0.3'
natural-transformation: ! '>=0.3.1 && <0.4'
transformers: ! '>=0.4 && <0.6'
scotty: ! '>=0.10'
aeson: ! '>=0.8 && <0.12'
all-versions:
- '0.2'
author: Justin Dawson and Andy Gill
latest: '0.2'
description-type: markdown
description: ! 'A sub-package of remote-json that provides the ReceiveAPI capabilities.
'
license-name: BSD3
| homepage: ''
changelog-type: ''
hash: ac909fe14af25e4218cbad5dd35f40ca9d40faa87a8a18239356124c96e5a8d6
test-bench-deps: {}
maintainer: JDawson@ku.edu
synopsis: Web server wrapper for remote-json
changelog: ''
basic-deps:
warp: ! '>=3.2 && <3.3'
base: ! '>=4 && <5'
data-default-class: ==0.0.1
text: ! '>=1.2 && <1.3'
remote-json: ! '>=0.2 && <0.3'
natural-transformation: ! '>=0.3.1 && <0.4'
transformers: ! '>=0.4 && <0.6'
scotty: ! '>=0.10'
aeson: ! '>=0.8 && <0.12'
all-versions:
- '0.2'
- '0.2.0.1'
author: Justin Dawson and Andy Gill
latest: '0.2.0.1'
description-type: markdown
description: ! 'A sub-package of remote-json that provides the ReceiveAPI capabilities.
'
license-name: BSD3
| Update from Hackage at 2016-02-10T16:22:44+0000 | Update from Hackage at 2016-02-10T16:22:44+0000
| YAML | mit | commercialhaskell/all-cabal-metadata | yaml | ## Code Before:
homepage: ''
changelog-type: ''
hash: f0164cc7b5a6fcdc714afa794ef07d5768e85d095d07cdf2e005009803010894
test-bench-deps: {}
maintainer: JDawson@ku.edu
synopsis: Web server wrapper for remote-json
changelog: ''
basic-deps:
warp: ! '>=3.2 && <3.3'
base: ! '>=4 && <5'
data-default-class: ==0.0.1
text: ! '>=1.2 && <1.3'
remote-json: ! '>=0.2 && <0.3'
natural-transformation: ! '>=0.3.1 && <0.4'
transformers: ! '>=0.4 && <0.6'
scotty: ! '>=0.10'
aeson: ! '>=0.8 && <0.12'
all-versions:
- '0.2'
author: Justin Dawson and Andy Gill
latest: '0.2'
description-type: markdown
description: ! 'A sub-package of remote-json that provides the ReceiveAPI capabilities.
'
license-name: BSD3
## Instruction:
Update from Hackage at 2016-02-10T16:22:44+0000
## Code After:
homepage: ''
changelog-type: ''
hash: ac909fe14af25e4218cbad5dd35f40ca9d40faa87a8a18239356124c96e5a8d6
test-bench-deps: {}
maintainer: JDawson@ku.edu
synopsis: Web server wrapper for remote-json
changelog: ''
basic-deps:
warp: ! '>=3.2 && <3.3'
base: ! '>=4 && <5'
data-default-class: ==0.0.1
text: ! '>=1.2 && <1.3'
remote-json: ! '>=0.2 && <0.3'
natural-transformation: ! '>=0.3.1 && <0.4'
transformers: ! '>=0.4 && <0.6'
scotty: ! '>=0.10'
aeson: ! '>=0.8 && <0.12'
all-versions:
- '0.2'
- '0.2.0.1'
author: Justin Dawson and Andy Gill
latest: '0.2.0.1'
description-type: markdown
description: ! 'A sub-package of remote-json that provides the ReceiveAPI capabilities.
'
license-name: BSD3
| homepage: ''
changelog-type: ''
- hash: f0164cc7b5a6fcdc714afa794ef07d5768e85d095d07cdf2e005009803010894
+ hash: ac909fe14af25e4218cbad5dd35f40ca9d40faa87a8a18239356124c96e5a8d6
test-bench-deps: {}
maintainer: JDawson@ku.edu
synopsis: Web server wrapper for remote-json
changelog: ''
basic-deps:
warp: ! '>=3.2 && <3.3'
base: ! '>=4 && <5'
data-default-class: ==0.0.1
text: ! '>=1.2 && <1.3'
remote-json: ! '>=0.2 && <0.3'
natural-transformation: ! '>=0.3.1 && <0.4'
transformers: ! '>=0.4 && <0.6'
scotty: ! '>=0.10'
aeson: ! '>=0.8 && <0.12'
all-versions:
- '0.2'
+ - '0.2.0.1'
author: Justin Dawson and Andy Gill
- latest: '0.2'
+ latest: '0.2.0.1'
? ++++
description-type: markdown
description: ! 'A sub-package of remote-json that provides the ReceiveAPI capabilities.
'
license-name: BSD3 | 5 | 0.185185 | 3 | 2 |
d12a33fe849fab836df590d2027730f0c42ff3a2 | index.html | index.html | <!DOCTYPE html>
<head>
<style>
body {
text-align: center;
background: url("http://129py2f4h71f5aob2rwijjqjf.wpengine.netdna-cdn.com/wp-content/uploads/2013/07/seattle-slider.jpg");
color: grey;
font-family: Verdana;
background-size: cover;
background-position: center center;
}
</style>
</head>
<body>
<img src="http://img3.findthebest.com/sites/default/files/2077/media/images/t2/University_of_Washington-Seattle_Campus_394544.gif" height = "150" width = "200">
<h1>Borui "Andy" Li</h1>
<p>Hi there! Welcome to Awesome Andy's personal website!</p>
<input type="email" placeholder="Your Email please">
<input type="submit">
</body> | <!DOCTYPE html>
<head>
<style>
body {
text-align: center;
background: url("http://129py2f4h71f5aob2rwijjqjf.wpengine.netdna-cdn.com/wp-content/uploads/2013/07/seattle-slider.jpg");
color: grey;
font-family: Verdana;
background-size: cover;
background-position: center center;
background-repeat: no-repeat;
}
</style>
</head>
<body>
<img src="http://img3.findthebest.com/sites/default/files/2077/media/images/t2/University_of_Washington-Seattle_Campus_394544.gif" height = "150" width = "200">
<h1>Borui "Andy" Li</h1>
<p>Hi there! Welcome to Awesome Andy's personal website!</p>
<input type="email" placeholder="Your Email please">
<input type="submit">
</body> | Put the image does not repeat | Put the image does not repeat
| HTML | mit | boruil/Personal-Website | html | ## Code Before:
<!DOCTYPE html>
<head>
<style>
body {
text-align: center;
background: url("http://129py2f4h71f5aob2rwijjqjf.wpengine.netdna-cdn.com/wp-content/uploads/2013/07/seattle-slider.jpg");
color: grey;
font-family: Verdana;
background-size: cover;
background-position: center center;
}
</style>
</head>
<body>
<img src="http://img3.findthebest.com/sites/default/files/2077/media/images/t2/University_of_Washington-Seattle_Campus_394544.gif" height = "150" width = "200">
<h1>Borui "Andy" Li</h1>
<p>Hi there! Welcome to Awesome Andy's personal website!</p>
<input type="email" placeholder="Your Email please">
<input type="submit">
</body>
## Instruction:
Put the image does not repeat
## Code After:
<!DOCTYPE html>
<head>
<style>
body {
text-align: center;
background: url("http://129py2f4h71f5aob2rwijjqjf.wpengine.netdna-cdn.com/wp-content/uploads/2013/07/seattle-slider.jpg");
color: grey;
font-family: Verdana;
background-size: cover;
background-position: center center;
background-repeat: no-repeat;
}
</style>
</head>
<body>
<img src="http://img3.findthebest.com/sites/default/files/2077/media/images/t2/University_of_Washington-Seattle_Campus_394544.gif" height = "150" width = "200">
<h1>Borui "Andy" Li</h1>
<p>Hi there! Welcome to Awesome Andy's personal website!</p>
<input type="email" placeholder="Your Email please">
<input type="submit">
</body> | <!DOCTYPE html>
<head>
<style>
body {
text-align: center;
background: url("http://129py2f4h71f5aob2rwijjqjf.wpengine.netdna-cdn.com/wp-content/uploads/2013/07/seattle-slider.jpg");
color: grey;
font-family: Verdana;
background-size: cover;
background-position: center center;
+ background-repeat: no-repeat;
}
</style>
</head>
<body>
<img src="http://img3.findthebest.com/sites/default/files/2077/media/images/t2/University_of_Washington-Seattle_Campus_394544.gif" height = "150" width = "200">
<h1>Borui "Andy" Li</h1>
<p>Hi there! Welcome to Awesome Andy's personal website!</p>
<input type="email" placeholder="Your Email please">
<input type="submit">
</body> | 1 | 0.037037 | 1 | 0 |
e608283c48625861e71ed789943ba0ca9be3a115 | .travis.yml | .travis.yml | language: c
os: linux
sudo: required
dist: trusty
before_install:
- sudo apt-get update -qq
- sudo apt-get install -qq build-essential cmake libgmp3-dev gengetopt
libpcap-dev flex byacc libjson-c-dev pkg-config libunistring-dev
libsasl2-dev python-dev python-pip libhiredis-dev
- pip install --user sh
- python ./scripts/install_mongo.py
- export PATH=/opt/bin:$PATH
matrix:
include:
- os: osx
before_install:
- brew update
- brew install gengetopt byacc libdnet libunistring
mongo-c hiredis
script:
- cmake -DENABLE_DEVELOPMENT=ON -DWITH_JSON=ON -DWITH_REDIS=ON -DWITH_MONGO=ON
- make
- python ./scripts/check_manfile.py
compiler: clang
notifications:
email:
- zmap-devel@umich.edu
slack:
secure: gLiX4zUhlYMJ0l7kJlb5Wf5CmAynj+WQufThSBPP7XlLZddl6Vql72sJuqwl1ZV75xEsqP05QDulBMJc9AaED7BP53vhngHHgWLwjt026ne5sbA/s98U735jT/qwwFvKWBCYPZ5BQdTmJO3KCyuBJH+tQnptiolog9abksG1WZk=
| language: c
os: linux
sudo: required
dist: trusty
before_install:
- sudo apt-get update -qq
- sudo apt-get install -qq build-essential cmake libgmp3-dev gengetopt
libpcap-dev flex byacc libjson-c-dev pkg-config libunistring-dev
libsasl2-dev python-dev python-pip libhiredis-dev
- pip install --user sh
- python ./scripts/install_mongo.py
- export PATH=/opt/bin:$PATH
matrix:
include:
- os: osx
before_install:
- brew update
- brew install gengetopt byacc libdnet libunistring
mongo-c hiredis
script:
- cmake -DENABLE_DEVELOPMENT=ON -DWITH_REDIS=ON -DWITH_MONGO=ON
- make
- python ./scripts/check_manfile.py
compiler: clang
notifications:
email:
- zmap-devel@umich.edu
slack:
secure: gLiX4zUhlYMJ0l7kJlb5Wf5CmAynj+WQufThSBPP7XlLZddl6Vql72sJuqwl1ZV75xEsqP05QDulBMJc9AaED7BP53vhngHHgWLwjt026ne5sbA/s98U735jT/qwwFvKWBCYPZ5BQdTmJO3KCyuBJH+tQnptiolog9abksG1WZk=
| Remove -DWITH_JSON from TravisCI config | Remove -DWITH_JSON from TravisCI config
The flag is now always enabled and unnecessary.
| YAML | apache-2.0 | shakenetwork/zmap,willscott/zmap,willscott/zmap,zmap/zmap,shakenetwork/zmap,willscott/zmap,willscott/zmap,zmap/zmap,zmap/zmap,shakenetwork/zmap,shakenetwork/zmap,willscott/zmap,shakenetwork/zmap | yaml | ## Code Before:
language: c
os: linux
sudo: required
dist: trusty
before_install:
- sudo apt-get update -qq
- sudo apt-get install -qq build-essential cmake libgmp3-dev gengetopt
libpcap-dev flex byacc libjson-c-dev pkg-config libunistring-dev
libsasl2-dev python-dev python-pip libhiredis-dev
- pip install --user sh
- python ./scripts/install_mongo.py
- export PATH=/opt/bin:$PATH
matrix:
include:
- os: osx
before_install:
- brew update
- brew install gengetopt byacc libdnet libunistring
mongo-c hiredis
script:
- cmake -DENABLE_DEVELOPMENT=ON -DWITH_JSON=ON -DWITH_REDIS=ON -DWITH_MONGO=ON
- make
- python ./scripts/check_manfile.py
compiler: clang
notifications:
email:
- zmap-devel@umich.edu
slack:
secure: gLiX4zUhlYMJ0l7kJlb5Wf5CmAynj+WQufThSBPP7XlLZddl6Vql72sJuqwl1ZV75xEsqP05QDulBMJc9AaED7BP53vhngHHgWLwjt026ne5sbA/s98U735jT/qwwFvKWBCYPZ5BQdTmJO3KCyuBJH+tQnptiolog9abksG1WZk=
## Instruction:
Remove -DWITH_JSON from TravisCI config
The flag is now always enabled and unnecessary.
## Code After:
language: c
os: linux
sudo: required
dist: trusty
before_install:
- sudo apt-get update -qq
- sudo apt-get install -qq build-essential cmake libgmp3-dev gengetopt
libpcap-dev flex byacc libjson-c-dev pkg-config libunistring-dev
libsasl2-dev python-dev python-pip libhiredis-dev
- pip install --user sh
- python ./scripts/install_mongo.py
- export PATH=/opt/bin:$PATH
matrix:
include:
- os: osx
before_install:
- brew update
- brew install gengetopt byacc libdnet libunistring
mongo-c hiredis
script:
- cmake -DENABLE_DEVELOPMENT=ON -DWITH_REDIS=ON -DWITH_MONGO=ON
- make
- python ./scripts/check_manfile.py
compiler: clang
notifications:
email:
- zmap-devel@umich.edu
slack:
secure: gLiX4zUhlYMJ0l7kJlb5Wf5CmAynj+WQufThSBPP7XlLZddl6Vql72sJuqwl1ZV75xEsqP05QDulBMJc9AaED7BP53vhngHHgWLwjt026ne5sbA/s98U735jT/qwwFvKWBCYPZ5BQdTmJO3KCyuBJH+tQnptiolog9abksG1WZk=
| language: c
os: linux
sudo: required
dist: trusty
before_install:
- sudo apt-get update -qq
- sudo apt-get install -qq build-essential cmake libgmp3-dev gengetopt
libpcap-dev flex byacc libjson-c-dev pkg-config libunistring-dev
libsasl2-dev python-dev python-pip libhiredis-dev
- pip install --user sh
- python ./scripts/install_mongo.py
- export PATH=/opt/bin:$PATH
matrix:
include:
- os: osx
before_install:
- brew update
- brew install gengetopt byacc libdnet libunistring
mongo-c hiredis
script:
- - cmake -DENABLE_DEVELOPMENT=ON -DWITH_JSON=ON -DWITH_REDIS=ON -DWITH_MONGO=ON
? ---------------
+ - cmake -DENABLE_DEVELOPMENT=ON -DWITH_REDIS=ON -DWITH_MONGO=ON
- make
- python ./scripts/check_manfile.py
compiler: clang
notifications:
email:
- zmap-devel@umich.edu
slack:
secure: gLiX4zUhlYMJ0l7kJlb5Wf5CmAynj+WQufThSBPP7XlLZddl6Vql72sJuqwl1ZV75xEsqP05QDulBMJc9AaED7BP53vhngHHgWLwjt026ne5sbA/s98U735jT/qwwFvKWBCYPZ5BQdTmJO3KCyuBJH+tQnptiolog9abksG1WZk= | 2 | 0.068966 | 1 | 1 |
789eb9cc78ecaf8e7e04dc8ca1dc8ac7b48f86de | src/node.js | src/node.js | import fs from 'fs';
import {
pdf,
View,
Text,
Link,
Page,
Font,
Note,
Image,
version,
Document,
StyleSheet,
PDFRenderer,
createInstance,
} from './index';
export const renderToStream = function(element) {
return pdf(element).toBuffer();
};
export const renderToFile = function(element, filePath, callback) {
const output = renderToStream(element);
const stream = fs.createWriteStream(filePath);
output.pipe(stream);
return new Promise((resolve, reject) => {
stream.on('finish', () => {
if (callback) callback(output, filePath);
resolve(output);
});
stream.on('error', reject);
});
};
export const render = renderToFile;
export {
pdf,
View,
Text,
Link,
Page,
Font,
Note,
Image,
version,
Document,
StyleSheet,
PDFRenderer,
createInstance,
} from './index';
export default {
pdf,
View,
Text,
Link,
Page,
Font,
Note,
Image,
version,
Document,
StyleSheet,
PDFRenderer,
createInstance,
renderToStream,
renderToFile,
render,
};
| import fs from 'fs';
import {
pdf,
View,
Text,
Link,
Page,
Font,
Note,
Image,
version,
Document,
StyleSheet,
PDFRenderer,
createInstance,
} from './index';
export const renderToStream = function(element) {
return pdf(element).toBuffer();
};
export const renderToFile = function(element, filePath, callback) {
const output = renderToStream(element);
const stream = fs.createWriteStream(filePath);
output.pipe(stream);
return new Promise((resolve, reject) => {
stream.on('finish', () => {
if (callback) callback(output, filePath);
resolve(output);
});
stream.on('error', reject);
});
};
const throwEnvironmentError = name => {
throw new Error(
`${name} is a web specific API. Or you're either using this component on Node, or your bundler is not loading react-pdf from the appropiate web build.`,
);
};
export const PDFViewer = () => {
throwEnvironmentError('PDFViewer');
};
export const PDFDownloadLink = () => {
throwEnvironmentError('PDFDownloadLink');
};
export const BlobProvider = () => {
throwEnvironmentError('BlobProvider');
};
export const render = renderToFile;
export {
pdf,
View,
Text,
Link,
Page,
Font,
Note,
Image,
version,
Document,
StyleSheet,
PDFRenderer,
createInstance,
} from './index';
export default {
pdf,
View,
Text,
Link,
Page,
Font,
Note,
Image,
version,
Document,
StyleSheet,
PDFRenderer,
createInstance,
renderToStream,
renderToFile,
render,
};
| Throw error when trying to use web specific APIs on Node | Throw error when trying to use web specific APIs on Node
| JavaScript | mit | diegomura/react-pdf,diegomura/react-pdf | javascript | ## Code Before:
import fs from 'fs';
import {
pdf,
View,
Text,
Link,
Page,
Font,
Note,
Image,
version,
Document,
StyleSheet,
PDFRenderer,
createInstance,
} from './index';
export const renderToStream = function(element) {
return pdf(element).toBuffer();
};
export const renderToFile = function(element, filePath, callback) {
const output = renderToStream(element);
const stream = fs.createWriteStream(filePath);
output.pipe(stream);
return new Promise((resolve, reject) => {
stream.on('finish', () => {
if (callback) callback(output, filePath);
resolve(output);
});
stream.on('error', reject);
});
};
export const render = renderToFile;
export {
pdf,
View,
Text,
Link,
Page,
Font,
Note,
Image,
version,
Document,
StyleSheet,
PDFRenderer,
createInstance,
} from './index';
export default {
pdf,
View,
Text,
Link,
Page,
Font,
Note,
Image,
version,
Document,
StyleSheet,
PDFRenderer,
createInstance,
renderToStream,
renderToFile,
render,
};
## Instruction:
Throw error when trying to use web specific APIs on Node
## Code After:
import fs from 'fs';
import {
pdf,
View,
Text,
Link,
Page,
Font,
Note,
Image,
version,
Document,
StyleSheet,
PDFRenderer,
createInstance,
} from './index';
export const renderToStream = function(element) {
return pdf(element).toBuffer();
};
export const renderToFile = function(element, filePath, callback) {
const output = renderToStream(element);
const stream = fs.createWriteStream(filePath);
output.pipe(stream);
return new Promise((resolve, reject) => {
stream.on('finish', () => {
if (callback) callback(output, filePath);
resolve(output);
});
stream.on('error', reject);
});
};
const throwEnvironmentError = name => {
throw new Error(
`${name} is a web specific API. Or you're either using this component on Node, or your bundler is not loading react-pdf from the appropiate web build.`,
);
};
export const PDFViewer = () => {
throwEnvironmentError('PDFViewer');
};
export const PDFDownloadLink = () => {
throwEnvironmentError('PDFDownloadLink');
};
export const BlobProvider = () => {
throwEnvironmentError('BlobProvider');
};
export const render = renderToFile;
export {
pdf,
View,
Text,
Link,
Page,
Font,
Note,
Image,
version,
Document,
StyleSheet,
PDFRenderer,
createInstance,
} from './index';
export default {
pdf,
View,
Text,
Link,
Page,
Font,
Note,
Image,
version,
Document,
StyleSheet,
PDFRenderer,
createInstance,
renderToStream,
renderToFile,
render,
};
| import fs from 'fs';
import {
pdf,
View,
Text,
Link,
Page,
Font,
Note,
Image,
version,
Document,
StyleSheet,
PDFRenderer,
createInstance,
} from './index';
export const renderToStream = function(element) {
return pdf(element).toBuffer();
};
export const renderToFile = function(element, filePath, callback) {
const output = renderToStream(element);
const stream = fs.createWriteStream(filePath);
output.pipe(stream);
return new Promise((resolve, reject) => {
stream.on('finish', () => {
if (callback) callback(output, filePath);
resolve(output);
});
stream.on('error', reject);
});
+ };
+
+ const throwEnvironmentError = name => {
+ throw new Error(
+ `${name} is a web specific API. Or you're either using this component on Node, or your bundler is not loading react-pdf from the appropiate web build.`,
+ );
+ };
+
+ export const PDFViewer = () => {
+ throwEnvironmentError('PDFViewer');
+ };
+
+ export const PDFDownloadLink = () => {
+ throwEnvironmentError('PDFDownloadLink');
+ };
+
+ export const BlobProvider = () => {
+ throwEnvironmentError('BlobProvider');
};
export const render = renderToFile;
export {
pdf,
View,
Text,
Link,
Page,
Font,
Note,
Image,
version,
Document,
StyleSheet,
PDFRenderer,
createInstance,
} from './index';
export default {
pdf,
View,
Text,
Link,
Page,
Font,
Note,
Image,
version,
Document,
StyleSheet,
PDFRenderer,
createInstance,
renderToStream,
renderToFile,
render,
}; | 18 | 0.25 | 18 | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.