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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
d2601e19d766fc1593ef3c8ca421f5dc9ead12d0 | src/Hackspace/Bundle/CalciferBundle/Resources/views/Event/index.html.twig | src/Hackspace/Bundle/CalciferBundle/Resources/views/Event/index.html.twig | {% extends 'CalciferBundle::layout.html.twig' %}
{% block css %}
{% stylesheets filter="compass"
"@CalciferBundle/Resources/assets/css/events.scss"
%}
<link rel="stylesheet" href="{{ asset_url }}" />
{% endstylesheets %}
{% endblock %}
{% block javascripts %}
{% javascripts
"@CalciferBundle/Resources/assets/js/events.js"
%}
<script src="{{ asset_url }}"></script>
{% endjavascripts %}
{% endblock %}
{% block body -%}
<div class="ui one column page grid title">
<div class="ui column">
<h1>
Termine
{% if tag|default(false) %} für Tag „{{ tag.name }}“{% endif %}
{% if location|default(false) %} für Ort „{{ location.name }}{% endif %}
</h1>
</div>
</div>
<div class="ui three column page grid">
{% for entity in entities %}
{{ include('CalciferBundle:Event:event_box.html.twig',{'truncate_summary':true}) }}
{% endfor %}
</div>
{% endblock %}
| {% extends 'CalciferBundle::layout.html.twig' %}
{% block css %}
{% stylesheets filter="compass"
"@CalciferBundle/Resources/assets/css/events.scss"
%}
<link rel="stylesheet" href="{{ asset_url }}" />
{% endstylesheets %}
{% endblock %}
{% block javascripts %}
{% javascripts
"@CalciferBundle/Resources/assets/js/events.js"
%}
<script src="{{ asset_url }}"></script>
{% endjavascripts %}
{% endblock %}
{% block body -%}
<div class="ui one column page grid title">
<div class="ui column">
<h1>
Termine
{% if tag|default(false) %} für Tag „{{ tag.name }}“{% endif %}
{% if location|default(false) %} für Ort „{{ location.name }}{% endif %}
</h1>
</div>
</div>
<div class="ui three column page grid stackable">
{% for entity in entities %}
{{ include('CalciferBundle:Event:event_box.html.twig',{'truncate_summary':true}) }}
{% endfor %}
</div>
{% endblock %}
| Make the event grid on the startpage responsive. | Make the event grid on the startpage responsive.
| Twig | mit | HackspaceJena/calcifer,andibraeu/calcifer,andibraeu/calcifer,HackspaceJena/calcifer,andibraeu/calcifer,HackspaceJena/calcifer | twig | ## Code Before:
{% extends 'CalciferBundle::layout.html.twig' %}
{% block css %}
{% stylesheets filter="compass"
"@CalciferBundle/Resources/assets/css/events.scss"
%}
<link rel="stylesheet" href="{{ asset_url }}" />
{% endstylesheets %}
{% endblock %}
{% block javascripts %}
{% javascripts
"@CalciferBundle/Resources/assets/js/events.js"
%}
<script src="{{ asset_url }}"></script>
{% endjavascripts %}
{% endblock %}
{% block body -%}
<div class="ui one column page grid title">
<div class="ui column">
<h1>
Termine
{% if tag|default(false) %} für Tag „{{ tag.name }}“{% endif %}
{% if location|default(false) %} für Ort „{{ location.name }}{% endif %}
</h1>
</div>
</div>
<div class="ui three column page grid">
{% for entity in entities %}
{{ include('CalciferBundle:Event:event_box.html.twig',{'truncate_summary':true}) }}
{% endfor %}
</div>
{% endblock %}
## Instruction:
Make the event grid on the startpage responsive.
## Code After:
{% extends 'CalciferBundle::layout.html.twig' %}
{% block css %}
{% stylesheets filter="compass"
"@CalciferBundle/Resources/assets/css/events.scss"
%}
<link rel="stylesheet" href="{{ asset_url }}" />
{% endstylesheets %}
{% endblock %}
{% block javascripts %}
{% javascripts
"@CalciferBundle/Resources/assets/js/events.js"
%}
<script src="{{ asset_url }}"></script>
{% endjavascripts %}
{% endblock %}
{% block body -%}
<div class="ui one column page grid title">
<div class="ui column">
<h1>
Termine
{% if tag|default(false) %} für Tag „{{ tag.name }}“{% endif %}
{% if location|default(false) %} für Ort „{{ location.name }}{% endif %}
</h1>
</div>
</div>
<div class="ui three column page grid stackable">
{% for entity in entities %}
{{ include('CalciferBundle:Event:event_box.html.twig',{'truncate_summary':true}) }}
{% endfor %}
</div>
{% endblock %}
| {% extends 'CalciferBundle::layout.html.twig' %}
{% block css %}
{% stylesheets filter="compass"
"@CalciferBundle/Resources/assets/css/events.scss"
%}
<link rel="stylesheet" href="{{ asset_url }}" />
{% endstylesheets %}
{% endblock %}
{% block javascripts %}
{% javascripts
"@CalciferBundle/Resources/assets/js/events.js"
%}
<script src="{{ asset_url }}"></script>
{% endjavascripts %}
{% endblock %}
{% block body -%}
<div class="ui one column page grid title">
<div class="ui column">
<h1>
Termine
{% if tag|default(false) %} für Tag „{{ tag.name }}“{% endif %}
{% if location|default(false) %} für Ort „{{ location.name }}{% endif %}
</h1>
</div>
</div>
- <div class="ui three column page grid">
+ <div class="ui three column page grid stackable">
? ++++++++++
{% for entity in entities %}
{{ include('CalciferBundle:Event:event_box.html.twig',{'truncate_summary':true}) }}
{% endfor %}
</div>
{% endblock %} | 2 | 0.055556 | 1 | 1 |
68f55e7afaa08aa19aa903adb0fffd4c0e64baf2 | src/liftN.js | src/liftN.js | var _curry2 = require('./internal/_curry2');
var _reduce = require('./internal/_reduce');
var _slice = require('./internal/_slice');
var ap = require('./ap');
var curryN = require('./curryN');
var map = require('./map');
/**
* "lifts" a function to be the specified arity, so that it may "map over" that
* many lists (or other Functors).
*
* @func
* @memberOf R
* @since v0.7.0
* @category Function
* @sig Number -> (*... -> *) -> ([*]... -> [*])
* @param {Function} fn The function to lift into higher context
* @return {Function} The function `fn` applicable to mappable objects.
* @see R.lift
* @example
*
* var madd3 = R.liftN(3, R.curryN(3, () => R.reduce(R.add, 0, arguments)));
* madd3([1,2,3], [1,2,3], [1]); //=> [3, 4, 5, 4, 5, 6, 5, 6, 7]
*/
module.exports = _curry2(function liftN(arity, fn) {
var lifted = curryN(arity, fn);
return curryN(arity, function() {
return _reduce(ap, map(lifted, arguments[0]), _slice(arguments, 1));
});
});
| var _curry2 = require('./internal/_curry2');
var _reduce = require('./internal/_reduce');
var _slice = require('./internal/_slice');
var ap = require('./ap');
var curryN = require('./curryN');
var map = require('./map');
/**
* "lifts" a function to be the specified arity, so that it may "map over" that
* many lists (or other Applies).
*
* @func
* @memberOf R
* @since v0.7.0
* @category Function
* @sig Number -> (*... -> *) -> ([*]... -> [*])
* @param {Function} fn The function to lift into higher context
* @return {Function} The function `fn` applicable to applicable objects.
* @see R.lift
* @example
*
* var madd3 = R.liftN(3, R.curryN(3, () => R.reduce(R.add, 0, arguments)));
* madd3([1,2,3], [1,2,3], [1]); //=> [3, 4, 5, 4, 5, 6, 5, 6, 7]
*/
module.exports = _curry2(function liftN(arity, fn) {
var lifted = curryN(arity, fn);
return curryN(arity, function() {
return _reduce(ap, map(lifted, arguments[0]), _slice(arguments, 1));
});
});
| Change Functor to Apply in documentation of R.flip | Change Functor to Apply in documentation of R.flip
it uses `ap` method of object instead of just `map` | JavaScript | mit | asaf-romano/ramda,svozza/ramda,plynch/ramda,besarthoxhaj/ramda,jethrolarson/ramda,jethrolarson/ramda,CrossEye/ramda,besarthoxhaj/ramda,ramda/ramda,jethrolarson/ramda,maowug/ramda,Bradcomp/ramda,jimf/ramda,kedashoe/ramda,maowug/ramda,angeloocana/ramda,asaf-romano/ramda,TheLudd/ramda,jimf/ramda,Nigiss/ramda,ccorcos/ramda,asaf-romano/ramda,paldepind/ramda,arcseldon/ramda,CrossEye/ramda,arcseldon/ramda,kedashoe/ramda,iofjuupasli/ramda,Nigiss/ramda,ramda/ramda,Bradcomp/ramda,iofjuupasli/ramda,paldepind/ramda,ramda/ramda,plynch/ramda,davidchambers/ramda,buzzdecafe/ramda,davidchambers/ramda,svozza/ramda,TheLudd/ramda,benperez/ramda,benperez/ramda,buzzdecafe/ramda,angeloocana/ramda,CrossEye/ramda,ccorcos/ramda,Nigiss/ramda | javascript | ## Code Before:
var _curry2 = require('./internal/_curry2');
var _reduce = require('./internal/_reduce');
var _slice = require('./internal/_slice');
var ap = require('./ap');
var curryN = require('./curryN');
var map = require('./map');
/**
* "lifts" a function to be the specified arity, so that it may "map over" that
* many lists (or other Functors).
*
* @func
* @memberOf R
* @since v0.7.0
* @category Function
* @sig Number -> (*... -> *) -> ([*]... -> [*])
* @param {Function} fn The function to lift into higher context
* @return {Function} The function `fn` applicable to mappable objects.
* @see R.lift
* @example
*
* var madd3 = R.liftN(3, R.curryN(3, () => R.reduce(R.add, 0, arguments)));
* madd3([1,2,3], [1,2,3], [1]); //=> [3, 4, 5, 4, 5, 6, 5, 6, 7]
*/
module.exports = _curry2(function liftN(arity, fn) {
var lifted = curryN(arity, fn);
return curryN(arity, function() {
return _reduce(ap, map(lifted, arguments[0]), _slice(arguments, 1));
});
});
## Instruction:
Change Functor to Apply in documentation of R.flip
it uses `ap` method of object instead of just `map`
## Code After:
var _curry2 = require('./internal/_curry2');
var _reduce = require('./internal/_reduce');
var _slice = require('./internal/_slice');
var ap = require('./ap');
var curryN = require('./curryN');
var map = require('./map');
/**
* "lifts" a function to be the specified arity, so that it may "map over" that
* many lists (or other Applies).
*
* @func
* @memberOf R
* @since v0.7.0
* @category Function
* @sig Number -> (*... -> *) -> ([*]... -> [*])
* @param {Function} fn The function to lift into higher context
* @return {Function} The function `fn` applicable to applicable objects.
* @see R.lift
* @example
*
* var madd3 = R.liftN(3, R.curryN(3, () => R.reduce(R.add, 0, arguments)));
* madd3([1,2,3], [1,2,3], [1]); //=> [3, 4, 5, 4, 5, 6, 5, 6, 7]
*/
module.exports = _curry2(function liftN(arity, fn) {
var lifted = curryN(arity, fn);
return curryN(arity, function() {
return _reduce(ap, map(lifted, arguments[0]), _slice(arguments, 1));
});
});
| var _curry2 = require('./internal/_curry2');
var _reduce = require('./internal/_reduce');
var _slice = require('./internal/_slice');
var ap = require('./ap');
var curryN = require('./curryN');
var map = require('./map');
/**
* "lifts" a function to be the specified arity, so that it may "map over" that
- * many lists (or other Functors).
? ^^^^^^^
+ * many lists (or other Applies).
? ^^^^^^
*
* @func
* @memberOf R
* @since v0.7.0
* @category Function
* @sig Number -> (*... -> *) -> ([*]... -> [*])
* @param {Function} fn The function to lift into higher context
- * @return {Function} The function `fn` applicable to mappable objects.
? -
+ * @return {Function} The function `fn` applicable to applicable objects.
? +++
* @see R.lift
* @example
*
* var madd3 = R.liftN(3, R.curryN(3, () => R.reduce(R.add, 0, arguments)));
* madd3([1,2,3], [1,2,3], [1]); //=> [3, 4, 5, 4, 5, 6, 5, 6, 7]
*/
module.exports = _curry2(function liftN(arity, fn) {
var lifted = curryN(arity, fn);
return curryN(arity, function() {
return _reduce(ap, map(lifted, arguments[0]), _slice(arguments, 1));
});
}); | 4 | 0.129032 | 2 | 2 |
ef3f79f99a5ca216d4416303064246bb4948284a | app/src/main/res/menu/repo_filter_org.xml | app/src/main/res/menu/repo_filter_org.xml | <?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android">
<item android:title="@string/repo_filter">
<menu>
<group android:checkableBehavior="single">
<item
android:id="@+id/filter_type_all"
android:title="@string/repo_type_all" />
<item
android:id="@+id/filter_type_member"
android:title="@string/repo_type_member" />
<item
android:id="@+id/filter_type_public"
android:title="@string/repo_type_public" />
<item
android:id="@+id/filter_type_private"
android:title="@string/repo_type_private" />
<item
android:id="@+id/filter_type_sources"
android:title="@string/repo_type_sources" />
<item
android:id="@+id/filter_type_forks"
android:title="@string/repo_type_forks" />
<item
android:id="@+id/filter_type_watched"
android:title="@string/repo_type_watched" />
<item
android:id="@+id/filter_type_starred"
android:title="@string/repo_type_starred" />
</group>
</menu>
</item>
</menu> | <?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android">
<item android:title="@string/repo_filter">
<menu>
<group android:checkableBehavior="single">
<item
android:id="@+id/filter_type_all"
android:title="@string/repo_type_all" />
<item
android:id="@+id/filter_type_sources"
android:title="@string/repo_type_sources" />
<item
android:id="@+id/filter_type_forks"
android:title="@string/repo_type_forks" />
</group>
</menu>
</item>
</menu> | Remove broken repo filters for organizations | Remove broken repo filters for organizations
Member, Watched and Starred make no sense for organizations,
whereas Public and Private don't work with orgs due to the
API endpoint we are currently using
| XML | apache-2.0 | slapperwan/gh4a,slapperwan/gh4a | xml | ## Code Before:
<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android">
<item android:title="@string/repo_filter">
<menu>
<group android:checkableBehavior="single">
<item
android:id="@+id/filter_type_all"
android:title="@string/repo_type_all" />
<item
android:id="@+id/filter_type_member"
android:title="@string/repo_type_member" />
<item
android:id="@+id/filter_type_public"
android:title="@string/repo_type_public" />
<item
android:id="@+id/filter_type_private"
android:title="@string/repo_type_private" />
<item
android:id="@+id/filter_type_sources"
android:title="@string/repo_type_sources" />
<item
android:id="@+id/filter_type_forks"
android:title="@string/repo_type_forks" />
<item
android:id="@+id/filter_type_watched"
android:title="@string/repo_type_watched" />
<item
android:id="@+id/filter_type_starred"
android:title="@string/repo_type_starred" />
</group>
</menu>
</item>
</menu>
## Instruction:
Remove broken repo filters for organizations
Member, Watched and Starred make no sense for organizations,
whereas Public and Private don't work with orgs due to the
API endpoint we are currently using
## Code After:
<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android">
<item android:title="@string/repo_filter">
<menu>
<group android:checkableBehavior="single">
<item
android:id="@+id/filter_type_all"
android:title="@string/repo_type_all" />
<item
android:id="@+id/filter_type_sources"
android:title="@string/repo_type_sources" />
<item
android:id="@+id/filter_type_forks"
android:title="@string/repo_type_forks" />
</group>
</menu>
</item>
</menu> | <?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android">
<item android:title="@string/repo_filter">
<menu>
<group android:checkableBehavior="single">
<item
android:id="@+id/filter_type_all"
android:title="@string/repo_type_all" />
<item
- android:id="@+id/filter_type_member"
- android:title="@string/repo_type_member" />
- <item
- android:id="@+id/filter_type_public"
- android:title="@string/repo_type_public" />
- <item
- android:id="@+id/filter_type_private"
- android:title="@string/repo_type_private" />
- <item
android:id="@+id/filter_type_sources"
android:title="@string/repo_type_sources" />
<item
android:id="@+id/filter_type_forks"
android:title="@string/repo_type_forks" />
- <item
- android:id="@+id/filter_type_watched"
- android:title="@string/repo_type_watched" />
- <item
- android:id="@+id/filter_type_starred"
- android:title="@string/repo_type_starred" />
</group>
</menu>
</item>
</menu> | 15 | 0.454545 | 0 | 15 |
c6e2320bfe97cf52878a6f2794c8379b695fd57f | test/integration/search_test.rb | test/integration/search_test.rb | require 'test_helper'
require 'support/sphinx'
require 'support/web_mocking'
class Search < ActionDispatch::IntegrationTest
include WebMocking
include SphinxHelpers
before do
ThinkingSphinx::Test.start
create(:ad, woeid_code: 766_273, title: 'muebles oro', status: 1)
create(:ad, woeid_code: 766_273, title: 'tele', type: 2)
create(:ad, woeid_code: 753_692, title: 'muebles plata', status: 1)
index
mocking_yahoo_woeid_info(766_273) do
visit ads_woeid_path(766_273, type: 'give')
end
end
after { ThinkingSphinx::Test.stop }
it 'searchs ads in current location by title' do
fill_in 'q', with: 'muebles'
click_button 'buscar'
page.assert_selector '.ad_excerpt_list', count: 1, text: 'muebles oro'
end
end
| require 'test_helper'
require 'support/sphinx'
require 'support/web_mocking'
class Search < ActionDispatch::IntegrationTest
include WebMocking
include SphinxHelpers
before do
ThinkingSphinx::Test.start
create(:ad, woeid_code: 766_273, title: 'muebles oro', status: 1)
create(:ad, woeid_code: 766_273, title: 'tele', type: 2)
create(:ad, woeid_code: 753_692, title: 'muebles plata', status: 1)
index
mocking_yahoo_woeid_info(766_273) do
visit ads_woeid_path(766_273, type: 'give')
end
end
after { ThinkingSphinx::Test.stop }
it 'searchs ads in current location by title' do
fill_in 'q', with: 'muebles'
click_button 'buscar'
page.assert_selector '.ad_excerpt_list', count: 1, text: 'muebles oro'
end
it 'shows a no results message when nothing found in current location' do
fill_in 'q', with: 'espejo'
click_button 'buscar'
page.assert_selector '.ad_excerpt_list', count: 0
assert_content 'No hay anuncios que coincidan con la búsqueda espejo en ' \
'la ubicación Madrid, Madrid, España'
end
end
| Add a test for the empty search results page | Add a test for the empty search results page
| Ruby | agpl-3.0 | alabs/nolotiro.org,alabs/nolotiro.org,alabs/nolotiro.org,alabs/nolotiro.org | ruby | ## Code Before:
require 'test_helper'
require 'support/sphinx'
require 'support/web_mocking'
class Search < ActionDispatch::IntegrationTest
include WebMocking
include SphinxHelpers
before do
ThinkingSphinx::Test.start
create(:ad, woeid_code: 766_273, title: 'muebles oro', status: 1)
create(:ad, woeid_code: 766_273, title: 'tele', type: 2)
create(:ad, woeid_code: 753_692, title: 'muebles plata', status: 1)
index
mocking_yahoo_woeid_info(766_273) do
visit ads_woeid_path(766_273, type: 'give')
end
end
after { ThinkingSphinx::Test.stop }
it 'searchs ads in current location by title' do
fill_in 'q', with: 'muebles'
click_button 'buscar'
page.assert_selector '.ad_excerpt_list', count: 1, text: 'muebles oro'
end
end
## Instruction:
Add a test for the empty search results page
## Code After:
require 'test_helper'
require 'support/sphinx'
require 'support/web_mocking'
class Search < ActionDispatch::IntegrationTest
include WebMocking
include SphinxHelpers
before do
ThinkingSphinx::Test.start
create(:ad, woeid_code: 766_273, title: 'muebles oro', status: 1)
create(:ad, woeid_code: 766_273, title: 'tele', type: 2)
create(:ad, woeid_code: 753_692, title: 'muebles plata', status: 1)
index
mocking_yahoo_woeid_info(766_273) do
visit ads_woeid_path(766_273, type: 'give')
end
end
after { ThinkingSphinx::Test.stop }
it 'searchs ads in current location by title' do
fill_in 'q', with: 'muebles'
click_button 'buscar'
page.assert_selector '.ad_excerpt_list', count: 1, text: 'muebles oro'
end
it 'shows a no results message when nothing found in current location' do
fill_in 'q', with: 'espejo'
click_button 'buscar'
page.assert_selector '.ad_excerpt_list', count: 0
assert_content 'No hay anuncios que coincidan con la búsqueda espejo en ' \
'la ubicación Madrid, Madrid, España'
end
end
| require 'test_helper'
require 'support/sphinx'
require 'support/web_mocking'
class Search < ActionDispatch::IntegrationTest
include WebMocking
include SphinxHelpers
before do
ThinkingSphinx::Test.start
create(:ad, woeid_code: 766_273, title: 'muebles oro', status: 1)
create(:ad, woeid_code: 766_273, title: 'tele', type: 2)
create(:ad, woeid_code: 753_692, title: 'muebles plata', status: 1)
index
mocking_yahoo_woeid_info(766_273) do
visit ads_woeid_path(766_273, type: 'give')
end
end
after { ThinkingSphinx::Test.stop }
it 'searchs ads in current location by title' do
fill_in 'q', with: 'muebles'
click_button 'buscar'
page.assert_selector '.ad_excerpt_list', count: 1, text: 'muebles oro'
end
+
+ it 'shows a no results message when nothing found in current location' do
+ fill_in 'q', with: 'espejo'
+ click_button 'buscar'
+
+ page.assert_selector '.ad_excerpt_list', count: 0
+ assert_content 'No hay anuncios que coincidan con la búsqueda espejo en ' \
+ 'la ubicación Madrid, Madrid, España'
+ end
end | 9 | 0.290323 | 9 | 0 |
61481b9d5bcfca8b197a0ce4b0f1ed12dca27b96 | lib/tasks/editions.rake | lib/tasks/editions.rake | require 'whole_edition_translator'
namespace :editions do
desc "Take old publications and convert to new top level editions"
task :extract_to_whole_editions => :environment do
WholeEdition.delete_all
Publication.all.each do |publication|
puts "Processing #{publication.class} #{publication.id}"
if publication.panopticon_id.present?
publication.editions.each do |edition|
puts " Into edition #{edition.id}"
whole_edition = WholeEditionTranslator.new(publication, edition).run
whole_edition.save!
end
else
puts "No panopticon ID for #{publication.name} : #{publication.id}"
end
end
end
desc "denormalise associated users"
task :denormalise => :environment do
WholeEdition.all.each do |edition|
begin
puts "Processing #{edition.class} #{edition.id}"
edition.denormalise_users and edition.save!
puts " Done!"
rescue Exception => e
puts " [Err] Could not denormalise edition: #{e}"
end
end
end
end | require 'whole_edition_translator'
namespace :editions do
desc "Take old publications and convert to new top level editions"
task :extract_to_whole_editions => :environment do
WholeEdition.delete_all
Publication.all.each do |publication|
puts "Processing #{publication.class} #{publication.id}"
if publication.panopticon_id.present?
publication.editions.each do |edition|
puts " Into edition #{edition.id}"
whole_edition = WholeEditionTranslator.new(publication, edition).run
whole_edition.save!
end
else
puts "No panopticon ID for #{publication.name} : #{publication.id}"
end
end
end
desc "denormalise associated users"
task :denormalise => :environment do
WholeEdition.all.each do |edition|
begin
puts "Processing #{edition.class} #{edition.id}"
edition.denormalise_users and edition.save!
puts " Done!"
rescue Exception => e
puts " [Err] Could not denormalise edition: #{e}"
end
end
end
desc "cache latest version number against editions"
task :cache_version_numbers => :environment do
WholeEdition.all.each do |edition|
begin
puts "Processing #{edition.class} #{edition.id}"
if edition.subsequent_siblings.any?
edition.latest_version_number = edition.subsequent_siblings.sort_by(&:version_number).last.version_number
else
edition.latest_version_number = edition.version_number
end
edition.save
puts " Done!"
rescue Exception => e
puts " [Err] Could not denormalise edition: #{e}"
end
end
end
end | Add rake task to cache version numbers in the right places | Add rake task to cache version numbers in the right places
| Ruby | mit | theodi/publisher,leftees/publisher,theodi/publisher,theodi/publisher,leftees/publisher,telekomatrix/publisher,telekomatrix/publisher,alphagov/publisher,alphagov/publisher,alphagov/publisher,leftees/publisher,theodi/publisher,leftees/publisher,telekomatrix/publisher,telekomatrix/publisher | ruby | ## Code Before:
require 'whole_edition_translator'
namespace :editions do
desc "Take old publications and convert to new top level editions"
task :extract_to_whole_editions => :environment do
WholeEdition.delete_all
Publication.all.each do |publication|
puts "Processing #{publication.class} #{publication.id}"
if publication.panopticon_id.present?
publication.editions.each do |edition|
puts " Into edition #{edition.id}"
whole_edition = WholeEditionTranslator.new(publication, edition).run
whole_edition.save!
end
else
puts "No panopticon ID for #{publication.name} : #{publication.id}"
end
end
end
desc "denormalise associated users"
task :denormalise => :environment do
WholeEdition.all.each do |edition|
begin
puts "Processing #{edition.class} #{edition.id}"
edition.denormalise_users and edition.save!
puts " Done!"
rescue Exception => e
puts " [Err] Could not denormalise edition: #{e}"
end
end
end
end
## Instruction:
Add rake task to cache version numbers in the right places
## Code After:
require 'whole_edition_translator'
namespace :editions do
desc "Take old publications and convert to new top level editions"
task :extract_to_whole_editions => :environment do
WholeEdition.delete_all
Publication.all.each do |publication|
puts "Processing #{publication.class} #{publication.id}"
if publication.panopticon_id.present?
publication.editions.each do |edition|
puts " Into edition #{edition.id}"
whole_edition = WholeEditionTranslator.new(publication, edition).run
whole_edition.save!
end
else
puts "No panopticon ID for #{publication.name} : #{publication.id}"
end
end
end
desc "denormalise associated users"
task :denormalise => :environment do
WholeEdition.all.each do |edition|
begin
puts "Processing #{edition.class} #{edition.id}"
edition.denormalise_users and edition.save!
puts " Done!"
rescue Exception => e
puts " [Err] Could not denormalise edition: #{e}"
end
end
end
desc "cache latest version number against editions"
task :cache_version_numbers => :environment do
WholeEdition.all.each do |edition|
begin
puts "Processing #{edition.class} #{edition.id}"
if edition.subsequent_siblings.any?
edition.latest_version_number = edition.subsequent_siblings.sort_by(&:version_number).last.version_number
else
edition.latest_version_number = edition.version_number
end
edition.save
puts " Done!"
rescue Exception => e
puts " [Err] Could not denormalise edition: #{e}"
end
end
end
end | require 'whole_edition_translator'
namespace :editions do
desc "Take old publications and convert to new top level editions"
task :extract_to_whole_editions => :environment do
WholeEdition.delete_all
Publication.all.each do |publication|
puts "Processing #{publication.class} #{publication.id}"
if publication.panopticon_id.present?
publication.editions.each do |edition|
puts " Into edition #{edition.id}"
whole_edition = WholeEditionTranslator.new(publication, edition).run
whole_edition.save!
end
else
puts "No panopticon ID for #{publication.name} : #{publication.id}"
end
end
end
desc "denormalise associated users"
task :denormalise => :environment do
WholeEdition.all.each do |edition|
begin
puts "Processing #{edition.class} #{edition.id}"
edition.denormalise_users and edition.save!
puts " Done!"
rescue Exception => e
puts " [Err] Could not denormalise edition: #{e}"
end
end
end
+
+ desc "cache latest version number against editions"
+ task :cache_version_numbers => :environment do
+ WholeEdition.all.each do |edition|
+ begin
+ puts "Processing #{edition.class} #{edition.id}"
+ if edition.subsequent_siblings.any?
+ edition.latest_version_number = edition.subsequent_siblings.sort_by(&:version_number).last.version_number
+ else
+ edition.latest_version_number = edition.version_number
+ end
+ edition.save
+ puts " Done!"
+ rescue Exception => e
+ puts " [Err] Could not denormalise edition: #{e}"
+ end
+ end
+ end
end | 18 | 0.529412 | 18 | 0 |
d2144e338443d030dc11abf1b18215255f0504d9 | scripts/cronRefreshGradesCrTable.sql | scripts/cronRefreshGradesCrTable.sql | CREATE DATABASE IF NOT EXISTS EdxPrivate;
USE EdxPrivate;
CREATE TABLE IF NOT EXISTS EdxPrivate.UserGrade (
name VARCHAR(255) NOT NULL DEFAULT '',
screen_name VARCHAR(255) NOT NULL DEFAULT '',
grade double NOT NULL DEFAULT 0.0,
course_id VARCHAR(255) NOT NULL DEFAULT '',
distinction TINYINT NOT NULL DEFAULT 0,
status VARCHAR(50) NOT NULL DEFAULT '',
user_int_id int NOT NULL PRIMARY KEY,
anon_screen_name varchar(40) NOT NULL DEFAULT ''
) engine = MyISAM;
| CREATE DATABASE IF NOT EXISTS EdxPrivate;
USE EdxPrivate;
CREATE TABLE IF NOT EXISTS EdxPrivate.UserGrade (
name VARCHAR(255) NOT NULL DEFAULT '',
screen_name VARCHAR(255) NOT NULL DEFAULT '',
grade double NOT NULL DEFAULT 0.0,
course_id VARCHAR(255) NOT NULL DEFAULT '',
distinction TINYINT NOT NULL DEFAULT 0,
status VARCHAR(50) NOT NULL DEFAULT '',
user_int_id int NOT NULL,
anon_screen_name varchar(40) NOT NULL DEFAULT ''
) engine = MyISAM;
| Remove primary key from user_int_id | Remove primary key from user_int_id
| SQL | bsd-3-clause | paepcke/json_to_relation,paepcke/json_to_relation,paepcke/json_to_relation,paepcke/json_to_relation | sql | ## Code Before:
CREATE DATABASE IF NOT EXISTS EdxPrivate;
USE EdxPrivate;
CREATE TABLE IF NOT EXISTS EdxPrivate.UserGrade (
name VARCHAR(255) NOT NULL DEFAULT '',
screen_name VARCHAR(255) NOT NULL DEFAULT '',
grade double NOT NULL DEFAULT 0.0,
course_id VARCHAR(255) NOT NULL DEFAULT '',
distinction TINYINT NOT NULL DEFAULT 0,
status VARCHAR(50) NOT NULL DEFAULT '',
user_int_id int NOT NULL PRIMARY KEY,
anon_screen_name varchar(40) NOT NULL DEFAULT ''
) engine = MyISAM;
## Instruction:
Remove primary key from user_int_id
## Code After:
CREATE DATABASE IF NOT EXISTS EdxPrivate;
USE EdxPrivate;
CREATE TABLE IF NOT EXISTS EdxPrivate.UserGrade (
name VARCHAR(255) NOT NULL DEFAULT '',
screen_name VARCHAR(255) NOT NULL DEFAULT '',
grade double NOT NULL DEFAULT 0.0,
course_id VARCHAR(255) NOT NULL DEFAULT '',
distinction TINYINT NOT NULL DEFAULT 0,
status VARCHAR(50) NOT NULL DEFAULT '',
user_int_id int NOT NULL,
anon_screen_name varchar(40) NOT NULL DEFAULT ''
) engine = MyISAM;
| CREATE DATABASE IF NOT EXISTS EdxPrivate;
USE EdxPrivate;
CREATE TABLE IF NOT EXISTS EdxPrivate.UserGrade (
name VARCHAR(255) NOT NULL DEFAULT '',
screen_name VARCHAR(255) NOT NULL DEFAULT '',
grade double NOT NULL DEFAULT 0.0,
course_id VARCHAR(255) NOT NULL DEFAULT '',
distinction TINYINT NOT NULL DEFAULT 0,
status VARCHAR(50) NOT NULL DEFAULT '',
- user_int_id int NOT NULL PRIMARY KEY,
? ------------
+ user_int_id int NOT NULL,
anon_screen_name varchar(40) NOT NULL DEFAULT ''
) engine = MyISAM; | 2 | 0.166667 | 1 | 1 |
e0570ff3f19ec23e8fd849e8a8b30ffc46053cd2 | src/System/Environ/BashEnvironManipulator.php | src/System/Environ/BashEnvironManipulator.php | <?php
namespace Dock\System\Environ;
use Dock\IO\ProcessRunner;
use Symfony\Component\Process\Process;
class BashEnvironManipulator implements EnvironManipulator
{
/**
* @var string
*/
private $file;
/**
* @var ProcessRunner
*/
private $processRunner;
/**
* @param string $file
*/
public function __construct(ProcessRunner $processRunner, $file)
{
$this->file = $file;
$this->processRunner = $processRunner;
}
/**
* {@inheritdoc}
*/
public function save(EnvironmentVariable $environmentVariable)
{
$command = 'echo "'.$environmentVariable->getName().'='.$environmentVariable->getValue().'" >> '.$this->file;
$process = new Process($command);
$this->processRunner->run($process);
}
/**
* {@inheritdoc}
*/
public function has(EnvironmentVariable $environmentVariable)
{
$process = $this->processRunner->run(
new Process("grep {$environmentVariable->getName()} $this->file"),
false
);
$result = $process->getOutput();
return !empty($result);
}
}
| <?php
namespace Dock\System\Environ;
use Dock\IO\ProcessRunner;
use Symfony\Component\Process\Process;
class BashEnvironManipulator implements EnvironManipulator
{
/**
* @var string
*/
private $file;
/**
* @var ProcessRunner
*/
private $processRunner;
/**
* @param string $file
*/
public function __construct(ProcessRunner $processRunner, $file)
{
$this->file = $file;
$this->processRunner = $processRunner;
}
/**
* {@inheritdoc}
*/
public function save(EnvironmentVariable $environmentVariable)
{
$command = 'echo "' . $environmentVariable->getName() . '=' . $environmentVariable->getValue(
) . '" >> ' . $this->file;
$process = new Process($command);
$this->processRunner->run($process);
}
/**
* {@inheritdoc}
*/
public function has(EnvironmentVariable $environmentVariable)
{
$process = $this->processRunner->run(
new Process(sprintf('grep %s %s', $environmentVariable->getName(), $this->file)),
false
);
$result = $process->getOutput();
return !empty($result);
}
}
| Use sprintf for string construction | Use sprintf for string construction
| PHP | mit | tasuk/dock-cli,inviqa/dock-cli,inviqa/dock-cli,sroze/dock-cli,sroze/dock-cli,tasuk/dock-cli | php | ## Code Before:
<?php
namespace Dock\System\Environ;
use Dock\IO\ProcessRunner;
use Symfony\Component\Process\Process;
class BashEnvironManipulator implements EnvironManipulator
{
/**
* @var string
*/
private $file;
/**
* @var ProcessRunner
*/
private $processRunner;
/**
* @param string $file
*/
public function __construct(ProcessRunner $processRunner, $file)
{
$this->file = $file;
$this->processRunner = $processRunner;
}
/**
* {@inheritdoc}
*/
public function save(EnvironmentVariable $environmentVariable)
{
$command = 'echo "'.$environmentVariable->getName().'='.$environmentVariable->getValue().'" >> '.$this->file;
$process = new Process($command);
$this->processRunner->run($process);
}
/**
* {@inheritdoc}
*/
public function has(EnvironmentVariable $environmentVariable)
{
$process = $this->processRunner->run(
new Process("grep {$environmentVariable->getName()} $this->file"),
false
);
$result = $process->getOutput();
return !empty($result);
}
}
## Instruction:
Use sprintf for string construction
## Code After:
<?php
namespace Dock\System\Environ;
use Dock\IO\ProcessRunner;
use Symfony\Component\Process\Process;
class BashEnvironManipulator implements EnvironManipulator
{
/**
* @var string
*/
private $file;
/**
* @var ProcessRunner
*/
private $processRunner;
/**
* @param string $file
*/
public function __construct(ProcessRunner $processRunner, $file)
{
$this->file = $file;
$this->processRunner = $processRunner;
}
/**
* {@inheritdoc}
*/
public function save(EnvironmentVariable $environmentVariable)
{
$command = 'echo "' . $environmentVariable->getName() . '=' . $environmentVariable->getValue(
) . '" >> ' . $this->file;
$process = new Process($command);
$this->processRunner->run($process);
}
/**
* {@inheritdoc}
*/
public function has(EnvironmentVariable $environmentVariable)
{
$process = $this->processRunner->run(
new Process(sprintf('grep %s %s', $environmentVariable->getName(), $this->file)),
false
);
$result = $process->getOutput();
return !empty($result);
}
}
| <?php
namespace Dock\System\Environ;
use Dock\IO\ProcessRunner;
use Symfony\Component\Process\Process;
class BashEnvironManipulator implements EnvironManipulator
{
/**
* @var string
*/
private $file;
/**
* @var ProcessRunner
*/
private $processRunner;
/**
* @param string $file
*/
public function __construct(ProcessRunner $processRunner, $file)
{
$this->file = $file;
$this->processRunner = $processRunner;
}
/**
* {@inheritdoc}
*/
public function save(EnvironmentVariable $environmentVariable)
{
- $command = 'echo "'.$environmentVariable->getName().'='.$environmentVariable->getValue().'" >> '.$this->file;
? ----------------------
+ $command = 'echo "' . $environmentVariable->getName() . '=' . $environmentVariable->getValue(
? + + + + + +
+ ) . '" >> ' . $this->file;
$process = new Process($command);
$this->processRunner->run($process);
}
/**
* {@inheritdoc}
*/
public function has(EnvironmentVariable $environmentVariable)
{
$process = $this->processRunner->run(
- new Process("grep {$environmentVariable->getName()} $this->file"),
? ^ ^ ^ ^
+ new Process(sprintf('grep %s %s', $environmentVariable->getName(), $this->file)),
? ^^^^^^^^^ ^^^^^^^^ ^ ^
false
);
$result = $process->getOutput();
return !empty($result);
}
} | 5 | 0.09434 | 3 | 2 |
0a09e0d940276050d0587ec458b35afc7d998598 | lib/Spark/Controller/ControllerCollection.php | lib/Spark/Controller/ControllerCollection.php | <?php
namespace Spark\Controller;
class ControllerCollection extends \Silex\ControllerCollection
{
function draw(callable $callback)
{
$callback($this);
return $this;
}
}
| <?php
namespace Spark\Controller;
class ControllerCollection extends \Silex\ControllerCollection
{
function draw(callable $callback)
{
$callback($this);
return $this;
}
function resources($resourceName)
{
$this->get("/$resourceName", "$resourceName#index")
->bind("{$resourceName}_index");
$this->get("/$resourceName/new", "$resourceName#new")
->bind("{$resourceName}_new");
$this->get("/$resourceName/{id}", "$resourceName#show")
->bind("{$resourceName}_show");
$this->get("/$resourceName/{id}/edit", "$resourceName#edit")
->bind("{$resourceName}_edit");
$this->post("/$resourceName", "$resourceName#create")
->bind("{$resourceName}_create");
$this->put("/$resourceName/{id}", "$resourceName#update")
->bind("{$resourceName}_update");
$this->delete("/$resourceName/{id}", "$resourceName#delete")
->bind("{$resourceName}_delete");
}
function resource($resourceName)
{
}
}
| Add 'resources' method for easy definition of restful routes | Add 'resources' method for easy definition of restful routes
| PHP | mit | sparkframework/spark | php | ## Code Before:
<?php
namespace Spark\Controller;
class ControllerCollection extends \Silex\ControllerCollection
{
function draw(callable $callback)
{
$callback($this);
return $this;
}
}
## Instruction:
Add 'resources' method for easy definition of restful routes
## Code After:
<?php
namespace Spark\Controller;
class ControllerCollection extends \Silex\ControllerCollection
{
function draw(callable $callback)
{
$callback($this);
return $this;
}
function resources($resourceName)
{
$this->get("/$resourceName", "$resourceName#index")
->bind("{$resourceName}_index");
$this->get("/$resourceName/new", "$resourceName#new")
->bind("{$resourceName}_new");
$this->get("/$resourceName/{id}", "$resourceName#show")
->bind("{$resourceName}_show");
$this->get("/$resourceName/{id}/edit", "$resourceName#edit")
->bind("{$resourceName}_edit");
$this->post("/$resourceName", "$resourceName#create")
->bind("{$resourceName}_create");
$this->put("/$resourceName/{id}", "$resourceName#update")
->bind("{$resourceName}_update");
$this->delete("/$resourceName/{id}", "$resourceName#delete")
->bind("{$resourceName}_delete");
}
function resource($resourceName)
{
}
}
| <?php
namespace Spark\Controller;
class ControllerCollection extends \Silex\ControllerCollection
{
function draw(callable $callback)
{
$callback($this);
return $this;
}
+
+ function resources($resourceName)
+ {
+ $this->get("/$resourceName", "$resourceName#index")
+ ->bind("{$resourceName}_index");
+
+ $this->get("/$resourceName/new", "$resourceName#new")
+ ->bind("{$resourceName}_new");
+
+ $this->get("/$resourceName/{id}", "$resourceName#show")
+ ->bind("{$resourceName}_show");
+
+ $this->get("/$resourceName/{id}/edit", "$resourceName#edit")
+ ->bind("{$resourceName}_edit");
+
+ $this->post("/$resourceName", "$resourceName#create")
+ ->bind("{$resourceName}_create");
+
+ $this->put("/$resourceName/{id}", "$resourceName#update")
+ ->bind("{$resourceName}_update");
+
+ $this->delete("/$resourceName/{id}", "$resourceName#delete")
+ ->bind("{$resourceName}_delete");
+ }
+
+ function resource($resourceName)
+ {
+ }
} | 28 | 2.333333 | 28 | 0 |
339c4e126553fad09fab2db2bd2255e29ab6457b | docs/review-board/README.md | docs/review-board/README.md |
We need a .NET Standard review body. We make the following proposal:
* **.NET Team**. The rationale here is that most, if not all, of the APIs
that are part of .NET Standard are implemented and evolved by the .NET team.
* **Xamarin**. They are a platform vendor and have their own implementation.
While they mostly copy our code, changes and extensions can impact their
ability to support .NET Standard. Thus, we need to coordinate any changes
with them.
* **Unity**. Same rationale as for Xamarin.
Please note that this list isn't meant to be closed: as more platform vendors
and API drivers appear, the review board will expand accordingly.
|
We need a .NET Standard review body. We make the following proposal:
* **.NET Team**. The rationale here is that most, if not all, of the APIs
that are part of .NET Standard are implemented and evolved by the .NET team.
* **Xamarin**. They are a platform vendor and have their own implementation.
While they mostly copy our code, changes and extensions can impact their
ability to support .NET Standard. Thus, we need to coordinate any changes
with them.
* **Unity**. Same rationale as for Xamarin.
Please note that this list isn't meant to be closed: as more platform vendors
and API drivers appear, the review board will expand accordingly.
## Reviews
Decisions made by the review body will be made public and posted here.
| Add note about .NET Standard reviews | Add note about .NET Standard reviews | Markdown | mit | ericstj/standard,weshaggard/standard,weshaggard/standard,ericstj/standard | markdown | ## Code Before:
We need a .NET Standard review body. We make the following proposal:
* **.NET Team**. The rationale here is that most, if not all, of the APIs
that are part of .NET Standard are implemented and evolved by the .NET team.
* **Xamarin**. They are a platform vendor and have their own implementation.
While they mostly copy our code, changes and extensions can impact their
ability to support .NET Standard. Thus, we need to coordinate any changes
with them.
* **Unity**. Same rationale as for Xamarin.
Please note that this list isn't meant to be closed: as more platform vendors
and API drivers appear, the review board will expand accordingly.
## Instruction:
Add note about .NET Standard reviews
## Code After:
We need a .NET Standard review body. We make the following proposal:
* **.NET Team**. The rationale here is that most, if not all, of the APIs
that are part of .NET Standard are implemented and evolved by the .NET team.
* **Xamarin**. They are a platform vendor and have their own implementation.
While they mostly copy our code, changes and extensions can impact their
ability to support .NET Standard. Thus, we need to coordinate any changes
with them.
* **Unity**. Same rationale as for Xamarin.
Please note that this list isn't meant to be closed: as more platform vendors
and API drivers appear, the review board will expand accordingly.
## Reviews
Decisions made by the review body will be made public and posted here.
|
We need a .NET Standard review body. We make the following proposal:
* **.NET Team**. The rationale here is that most, if not all, of the APIs
that are part of .NET Standard are implemented and evolved by the .NET team.
* **Xamarin**. They are a platform vendor and have their own implementation.
While they mostly copy our code, changes and extensions can impact their
ability to support .NET Standard. Thus, we need to coordinate any changes
with them.
* **Unity**. Same rationale as for Xamarin.
Please note that this list isn't meant to be closed: as more platform vendors
and API drivers appear, the review board will expand accordingly.
+
+ ## Reviews
+
+ Decisions made by the review body will be made public and posted here. | 4 | 0.307692 | 4 | 0 |
59eabb74f227ad0b95c5d913eb04013afdbfb936 | continuum-core-it/pom.xml | continuum-core-it/pom.xml | <project>
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.apache.maven.continuum</groupId>
<artifactId>continuum-parent</artifactId>
<version>1.0-beta-1-SNAPSHOT</version>
</parent>
<artifactId>continuum-core-it</artifactId>
<version>1.0-beta-1-SNAPSHOT</version>
<name>Continuum Core Integration Test</name>
<dependencies>
<dependency>
<groupId>org.apache.maven.continuum</groupId>
<artifactId>continuum-plexus-application</artifactId>
</dependency>
<dependency>
<groupId>org.apache.maven.continuum</groupId>
<artifactId>continuum-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.maven.continuum</groupId>
<artifactId>continuum-xmlrpc</artifactId>
</dependency>
<dependency>
<groupId>plexus</groupId>
<artifactId>plexus-log4j-logging</artifactId>
<version>1.0</version>
</dependency>
<dependency>
<groupId>xmlrpc</groupId>
<artifactId>xmlrpc</artifactId>
<version>1.2</version>
</dependency>
<dependency>
<groupId>incubator-derby</groupId>
<artifactId>derby</artifactId>
<version>10.0.2.1</version>
</dependency>
</dependencies>
</project>
| <project>
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.apache.maven.continuum</groupId>
<artifactId>continuum-parent</artifactId>
<version>1.0-beta-1-SNAPSHOT</version>
</parent>
<artifactId>continuum-core-it</artifactId>
<version>1.0-beta-1-SNAPSHOT</version>
<name>Continuum Core Integration Test</name>
<dependencies>
<dependency>
<groupId>org.apache.maven.continuum</groupId>
<artifactId>continuum-plexus-application</artifactId>
</dependency>
<dependency>
<groupId>org.apache.maven.continuum</groupId>
<artifactId>continuum-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.maven.continuum</groupId>
<artifactId>continuum-xmlrpc</artifactId>
</dependency>
<dependency>
<groupId>plexus</groupId>
<artifactId>plexus-utils</artifactId>
</dependency>
<dependency>
<groupId>plexus</groupId>
<artifactId>plexus-log4j-logging</artifactId>
<version>1.0</version>
</dependency>
<dependency>
<groupId>xmlrpc</groupId>
<artifactId>xmlrpc</artifactId>
<version>1.2</version>
</dependency>
<dependency>
<groupId>incubator-derby</groupId>
<artifactId>derby</artifactId>
<version>10.0.2.1</version>
</dependency>
</dependencies>
</project>
| Use the correct version of plexus-utils | Use the correct version of plexus-utils
git-svn-id: 1d22bf2b43db35b985fe5d7437c243537c14eeaa@280579 13f79535-47bb-0310-9956-ffa450edef68
| XML | apache-2.0 | apache/continuum,apache/continuum,apache/continuum | xml | ## Code Before:
<project>
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.apache.maven.continuum</groupId>
<artifactId>continuum-parent</artifactId>
<version>1.0-beta-1-SNAPSHOT</version>
</parent>
<artifactId>continuum-core-it</artifactId>
<version>1.0-beta-1-SNAPSHOT</version>
<name>Continuum Core Integration Test</name>
<dependencies>
<dependency>
<groupId>org.apache.maven.continuum</groupId>
<artifactId>continuum-plexus-application</artifactId>
</dependency>
<dependency>
<groupId>org.apache.maven.continuum</groupId>
<artifactId>continuum-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.maven.continuum</groupId>
<artifactId>continuum-xmlrpc</artifactId>
</dependency>
<dependency>
<groupId>plexus</groupId>
<artifactId>plexus-log4j-logging</artifactId>
<version>1.0</version>
</dependency>
<dependency>
<groupId>xmlrpc</groupId>
<artifactId>xmlrpc</artifactId>
<version>1.2</version>
</dependency>
<dependency>
<groupId>incubator-derby</groupId>
<artifactId>derby</artifactId>
<version>10.0.2.1</version>
</dependency>
</dependencies>
</project>
## Instruction:
Use the correct version of plexus-utils
git-svn-id: 1d22bf2b43db35b985fe5d7437c243537c14eeaa@280579 13f79535-47bb-0310-9956-ffa450edef68
## Code After:
<project>
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.apache.maven.continuum</groupId>
<artifactId>continuum-parent</artifactId>
<version>1.0-beta-1-SNAPSHOT</version>
</parent>
<artifactId>continuum-core-it</artifactId>
<version>1.0-beta-1-SNAPSHOT</version>
<name>Continuum Core Integration Test</name>
<dependencies>
<dependency>
<groupId>org.apache.maven.continuum</groupId>
<artifactId>continuum-plexus-application</artifactId>
</dependency>
<dependency>
<groupId>org.apache.maven.continuum</groupId>
<artifactId>continuum-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.maven.continuum</groupId>
<artifactId>continuum-xmlrpc</artifactId>
</dependency>
<dependency>
<groupId>plexus</groupId>
<artifactId>plexus-utils</artifactId>
</dependency>
<dependency>
<groupId>plexus</groupId>
<artifactId>plexus-log4j-logging</artifactId>
<version>1.0</version>
</dependency>
<dependency>
<groupId>xmlrpc</groupId>
<artifactId>xmlrpc</artifactId>
<version>1.2</version>
</dependency>
<dependency>
<groupId>incubator-derby</groupId>
<artifactId>derby</artifactId>
<version>10.0.2.1</version>
</dependency>
</dependencies>
</project>
| <project>
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.apache.maven.continuum</groupId>
<artifactId>continuum-parent</artifactId>
<version>1.0-beta-1-SNAPSHOT</version>
</parent>
<artifactId>continuum-core-it</artifactId>
<version>1.0-beta-1-SNAPSHOT</version>
<name>Continuum Core Integration Test</name>
<dependencies>
<dependency>
<groupId>org.apache.maven.continuum</groupId>
<artifactId>continuum-plexus-application</artifactId>
</dependency>
<dependency>
<groupId>org.apache.maven.continuum</groupId>
<artifactId>continuum-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.maven.continuum</groupId>
<artifactId>continuum-xmlrpc</artifactId>
</dependency>
<dependency>
<groupId>plexus</groupId>
+ <artifactId>plexus-utils</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>plexus</groupId>
<artifactId>plexus-log4j-logging</artifactId>
<version>1.0</version>
</dependency>
<dependency>
<groupId>xmlrpc</groupId>
<artifactId>xmlrpc</artifactId>
<version>1.2</version>
</dependency>
<dependency>
<groupId>incubator-derby</groupId>
<artifactId>derby</artifactId>
<version>10.0.2.1</version>
</dependency>
</dependencies>
</project> | 4 | 0.097561 | 4 | 0 |
c5f0b644eb3cbc4c321d3ddf5b02abef45547130 | app/views/classifications/_document_list.html.erb | app/views/classifications/_document_list.html.erb | <% heading ||= type.to_s.humanize %>
<section id="<%= heading.downcase %>" class="document-block documents-<%= document_block_counter %>">
<h1 class="label"><%= heading %></h1>
<div class="content">
<%= render partial: "shared/list_description", locals: { editions: documents } %>
<p class="see-all">
<%= link_to "See all #{heading.downcase}", public_send("#{type}_filter_path", @classification, publication_filter_option: heading.downcase) %>
</p>
</div>
</section>
| <%
heading ||= type.to_s.humanize
filter_option = (heading == "Publications") ? "all" : heading.downcase
%>
<section id="<%= heading.downcase %>" class="document-block documents-<%= document_block_counter %>">
<h1 class="label"><%= heading %></h1>
<div class="content">
<%= render partial: "shared/list_description", locals: { editions: documents } %>
<p class="see-all">
<%= link_to "See all #{heading.downcase}", public_send("#{type}_filter_path", @classification, publication_filter_option: filter_option) %>
</p>
</div>
</section>
| Fix "See all publications" link filtering | Fix "See all publications" link filtering
| HTML+ERB | mit | YOTOV-LIMITED/whitehall,hotvulcan/whitehall,hotvulcan/whitehall,YOTOV-LIMITED/whitehall,robinwhittleton/whitehall,askl56/whitehall,alphagov/whitehall,hotvulcan/whitehall,ggoral/whitehall,askl56/whitehall,askl56/whitehall,alphagov/whitehall,YOTOV-LIMITED/whitehall,alphagov/whitehall,robinwhittleton/whitehall,YOTOV-LIMITED/whitehall,askl56/whitehall,robinwhittleton/whitehall,ggoral/whitehall,alphagov/whitehall,robinwhittleton/whitehall,ggoral/whitehall,hotvulcan/whitehall,ggoral/whitehall | html+erb | ## Code Before:
<% heading ||= type.to_s.humanize %>
<section id="<%= heading.downcase %>" class="document-block documents-<%= document_block_counter %>">
<h1 class="label"><%= heading %></h1>
<div class="content">
<%= render partial: "shared/list_description", locals: { editions: documents } %>
<p class="see-all">
<%= link_to "See all #{heading.downcase}", public_send("#{type}_filter_path", @classification, publication_filter_option: heading.downcase) %>
</p>
</div>
</section>
## Instruction:
Fix "See all publications" link filtering
## Code After:
<%
heading ||= type.to_s.humanize
filter_option = (heading == "Publications") ? "all" : heading.downcase
%>
<section id="<%= heading.downcase %>" class="document-block documents-<%= document_block_counter %>">
<h1 class="label"><%= heading %></h1>
<div class="content">
<%= render partial: "shared/list_description", locals: { editions: documents } %>
<p class="see-all">
<%= link_to "See all #{heading.downcase}", public_send("#{type}_filter_path", @classification, publication_filter_option: filter_option) %>
</p>
</div>
</section>
| + <%
- <% heading ||= type.to_s.humanize %>
? ^^ ---
+ heading ||= type.to_s.humanize
? ^^
+ filter_option = (heading == "Publications") ? "all" : heading.downcase
+ %>
<section id="<%= heading.downcase %>" class="document-block documents-<%= document_block_counter %>">
<h1 class="label"><%= heading %></h1>
<div class="content">
<%= render partial: "shared/list_description", locals: { editions: documents } %>
<p class="see-all">
- <%= link_to "See all #{heading.downcase}", public_send("#{type}_filter_path", @classification, publication_filter_option: heading.downcase) %>
? ^ ^^ ----------
+ <%= link_to "See all #{heading.downcase}", public_send("#{type}_filter_path", @classification, publication_filter_option: filter_option) %>
? ^^^^ ^^^^^ +
</p>
</div>
</section> | 7 | 0.7 | 5 | 2 |
dfa3930196159638c475d37a89a7e0e5b395d92a | include/mgmt/mcumgr/zephyr_groups.h | include/mgmt/mcumgr/zephyr_groups.h | /*
* Copyright (c) 2021 Nordic Semiconductor ASA
*
* SPDX-License-Identifier: Apache-2.0
*/
#ifndef ZEPHYR_INCLUDE_ZEPHYR_MCUMGR_GRP_H_
#define ZEPHYR_INCLUDE_ZEPHYR_MCUMGR_GRP_H_
#include <kernel.h>
#ifdef __cplusplus
extern "C" {
#endif
/* The file contains definitions of Zephyr specific mgmt commands */
#define ZEPHYR_MGMT_GRP_BASE MGMT_GROUP_ID_PERUSER
/* Basic group */
#define ZEPHYR_MGMT_GRP_BASIC ZEPHYR_MGMT_GRP_BASE
#define ZEPHYR_MGMT_GRP_BASIC_CMD_ERASE_STORAGE 0 /* Command to erase storage partition */
#ifdef __cplusplus
}
#endif
#endif /* ZEPHYR_INCLUDE_ZEPHYR_MCUMGR_GRP_H_ */
| /*
* Copyright (c) 2021 Nordic Semiconductor ASA
*
* SPDX-License-Identifier: Apache-2.0
*/
#ifndef ZEPHYR_INCLUDE_ZEPHYR_MCUMGR_GRP_H_
#define ZEPHYR_INCLUDE_ZEPHYR_MCUMGR_GRP_H_
#include <kernel.h>
#ifdef __cplusplus
extern "C" {
#endif
/* The file contains definitions of Zephyr specific mgmt commands. The group numbers decrease
* from PERUSER to avoid collision with user defined groups.
*/
#define ZEPHYR_MGMT_GRP_BASE (MGMT_GROUP_ID_PERUSER - 1)
/* Basic group */
#define ZEPHYR_MGMT_GRP_BASIC ZEPHYR_MGMT_GRP_BASE
#define ZEPHYR_MGMT_GRP_BASIC_CMD_ERASE_STORAGE 0 /* Command to erase storage partition */
#ifdef __cplusplus
}
#endif
#endif /* ZEPHYR_INCLUDE_ZEPHYR_MCUMGR_GRP_H_ */
| Fix collision with user defined groups | subsys/mgmt/mcumgr: Fix collision with user defined groups
The commit moves definition of Zephyr specific mcumgr basic group to
PERUSER - 1. This has been done to avoid collision with application
specific groups, defined by users.
Signed-off-by: Dominik Ermel <1a1d45a9cc0c98a37f8d0a0d2dbe3cacc0b2344f@nordicsemi.no>
| C | apache-2.0 | galak/zephyr,finikorg/zephyr,finikorg/zephyr,zephyrproject-rtos/zephyr,zephyrproject-rtos/zephyr,galak/zephyr,finikorg/zephyr,finikorg/zephyr,zephyrproject-rtos/zephyr,zephyrproject-rtos/zephyr,zephyrproject-rtos/zephyr,finikorg/zephyr,galak/zephyr,galak/zephyr,galak/zephyr | c | ## Code Before:
/*
* Copyright (c) 2021 Nordic Semiconductor ASA
*
* SPDX-License-Identifier: Apache-2.0
*/
#ifndef ZEPHYR_INCLUDE_ZEPHYR_MCUMGR_GRP_H_
#define ZEPHYR_INCLUDE_ZEPHYR_MCUMGR_GRP_H_
#include <kernel.h>
#ifdef __cplusplus
extern "C" {
#endif
/* The file contains definitions of Zephyr specific mgmt commands */
#define ZEPHYR_MGMT_GRP_BASE MGMT_GROUP_ID_PERUSER
/* Basic group */
#define ZEPHYR_MGMT_GRP_BASIC ZEPHYR_MGMT_GRP_BASE
#define ZEPHYR_MGMT_GRP_BASIC_CMD_ERASE_STORAGE 0 /* Command to erase storage partition */
#ifdef __cplusplus
}
#endif
#endif /* ZEPHYR_INCLUDE_ZEPHYR_MCUMGR_GRP_H_ */
## Instruction:
subsys/mgmt/mcumgr: Fix collision with user defined groups
The commit moves definition of Zephyr specific mcumgr basic group to
PERUSER - 1. This has been done to avoid collision with application
specific groups, defined by users.
Signed-off-by: Dominik Ermel <1a1d45a9cc0c98a37f8d0a0d2dbe3cacc0b2344f@nordicsemi.no>
## Code After:
/*
* Copyright (c) 2021 Nordic Semiconductor ASA
*
* SPDX-License-Identifier: Apache-2.0
*/
#ifndef ZEPHYR_INCLUDE_ZEPHYR_MCUMGR_GRP_H_
#define ZEPHYR_INCLUDE_ZEPHYR_MCUMGR_GRP_H_
#include <kernel.h>
#ifdef __cplusplus
extern "C" {
#endif
/* The file contains definitions of Zephyr specific mgmt commands. The group numbers decrease
* from PERUSER to avoid collision with user defined groups.
*/
#define ZEPHYR_MGMT_GRP_BASE (MGMT_GROUP_ID_PERUSER - 1)
/* Basic group */
#define ZEPHYR_MGMT_GRP_BASIC ZEPHYR_MGMT_GRP_BASE
#define ZEPHYR_MGMT_GRP_BASIC_CMD_ERASE_STORAGE 0 /* Command to erase storage partition */
#ifdef __cplusplus
}
#endif
#endif /* ZEPHYR_INCLUDE_ZEPHYR_MCUMGR_GRP_H_ */
| /*
* Copyright (c) 2021 Nordic Semiconductor ASA
*
* SPDX-License-Identifier: Apache-2.0
*/
#ifndef ZEPHYR_INCLUDE_ZEPHYR_MCUMGR_GRP_H_
#define ZEPHYR_INCLUDE_ZEPHYR_MCUMGR_GRP_H_
#include <kernel.h>
#ifdef __cplusplus
extern "C" {
#endif
- /* The file contains definitions of Zephyr specific mgmt commands */
? ^^
+ /* The file contains definitions of Zephyr specific mgmt commands. The group numbers decrease
? + ^^^^^^^^^^^^^^^^^^^^^^^^^^
-
+ * from PERUSER to avoid collision with user defined groups.
+ */
- #define ZEPHYR_MGMT_GRP_BASE MGMT_GROUP_ID_PERUSER
+ #define ZEPHYR_MGMT_GRP_BASE (MGMT_GROUP_ID_PERUSER - 1)
? + +++++
/* Basic group */
#define ZEPHYR_MGMT_GRP_BASIC ZEPHYR_MGMT_GRP_BASE
#define ZEPHYR_MGMT_GRP_BASIC_CMD_ERASE_STORAGE 0 /* Command to erase storage partition */
#ifdef __cplusplus
}
#endif
#endif /* ZEPHYR_INCLUDE_ZEPHYR_MCUMGR_GRP_H_ */ | 7 | 0.259259 | 4 | 3 |
a381f9d3121b52b4f13b7fba34eb71a26fa7b931 | src/main.cpp | src/main.cpp |
int main(const int argc, char* argv[]) {
Emulator emulator;
emulator.run();
} |
void printHelpMessage() {
std::cout
<< "A NES emulator. Takes .nes files.\n\n"
<< "Usage: turbones [options] <path-to-rom-file>\n\n"
<< "Options:\n"
<< "\t-h --help\n"
<< "\t\tPrint this help text and exit."
<< std::endl;
}
void handleArguments(const int& argc, char* argv[], Emulator& emulator) {
for (int i = 1; i < argc; ++i) {
std::string arg = argv[i];
if (arg == "-h"
|| arg == "--help") {
printHelpMessage();
exit(EXIT_SUCCESS);
}
else if (i == argc - 1) {
emulator.rom_path = arg;
}
else {
std::cerr << "Unrecognized argument: " << arg << std::endl; }
}
}
int main(const int argc, char* argv[]) {
Emulator emulator;
handleArguments(argc, argv, emulator);
try {
emulator.run();
}
catch (const std::runtime_error& e) {
std::cerr << "\nFailed to run (" << e.what() << "). Shutting down." << std::endl;
// The pause here is to make sure the error can be read.
std::cout << "Press Enter to exit . . . ";
// Waits until Enter ('\n') is pressed. It turns out to be simpler
// to write this portably, if we wait for Enter, rather than "any key".
std::cin.ignore(std::numeric_limits<std::streamsize>::max(), '\n');
return EXIT_FAILURE;
}
} | Add basic command line argument parsing. | Add basic command line argument parsing.
| C++ | mit | TaylorLewis/turbones | c++ | ## Code Before:
int main(const int argc, char* argv[]) {
Emulator emulator;
emulator.run();
}
## Instruction:
Add basic command line argument parsing.
## Code After:
void printHelpMessage() {
std::cout
<< "A NES emulator. Takes .nes files.\n\n"
<< "Usage: turbones [options] <path-to-rom-file>\n\n"
<< "Options:\n"
<< "\t-h --help\n"
<< "\t\tPrint this help text and exit."
<< std::endl;
}
void handleArguments(const int& argc, char* argv[], Emulator& emulator) {
for (int i = 1; i < argc; ++i) {
std::string arg = argv[i];
if (arg == "-h"
|| arg == "--help") {
printHelpMessage();
exit(EXIT_SUCCESS);
}
else if (i == argc - 1) {
emulator.rom_path = arg;
}
else {
std::cerr << "Unrecognized argument: " << arg << std::endl; }
}
}
int main(const int argc, char* argv[]) {
Emulator emulator;
handleArguments(argc, argv, emulator);
try {
emulator.run();
}
catch (const std::runtime_error& e) {
std::cerr << "\nFailed to run (" << e.what() << "). Shutting down." << std::endl;
// The pause here is to make sure the error can be read.
std::cout << "Press Enter to exit . . . ";
// Waits until Enter ('\n') is pressed. It turns out to be simpler
// to write this portably, if we wait for Enter, rather than "any key".
std::cin.ignore(std::numeric_limits<std::streamsize>::max(), '\n');
return EXIT_FAILURE;
}
} | +
+ void printHelpMessage() {
+ std::cout
+ << "A NES emulator. Takes .nes files.\n\n"
+ << "Usage: turbones [options] <path-to-rom-file>\n\n"
+ << "Options:\n"
+ << "\t-h --help\n"
+ << "\t\tPrint this help text and exit."
+ << std::endl;
+ }
+
+ void handleArguments(const int& argc, char* argv[], Emulator& emulator) {
+ for (int i = 1; i < argc; ++i) {
+ std::string arg = argv[i];
+
+ if (arg == "-h"
+ || arg == "--help") {
+ printHelpMessage();
+ exit(EXIT_SUCCESS);
+ }
+ else if (i == argc - 1) {
+ emulator.rom_path = arg;
+ }
+ else {
+ std::cerr << "Unrecognized argument: " << arg << std::endl; }
+ }
+ }
int main(const int argc, char* argv[]) {
Emulator emulator;
+ handleArguments(argc, argv, emulator);
+ try {
- emulator.run();
+ emulator.run();
? ++++
+ }
+ catch (const std::runtime_error& e) {
+ std::cerr << "\nFailed to run (" << e.what() << "). Shutting down." << std::endl;
+ // The pause here is to make sure the error can be read.
+ std::cout << "Press Enter to exit . . . ";
+ // Waits until Enter ('\n') is pressed. It turns out to be simpler
+ // to write this portably, if we wait for Enter, rather than "any key".
+ std::cin.ignore(std::numeric_limits<std::streamsize>::max(), '\n');
+ return EXIT_FAILURE;
+ }
} | 41 | 6.833333 | 40 | 1 |
596b44db3cfe8d151a41dd381399e41b98345224 | templates/photologue/gallery_archive.html | templates/photologue/gallery_archive.html | {% extends "photologue/root.html" %}
{% load url from future %}
{% block title %}Latest Photo Galleries{% endblock %}
{% block content %}
<h1>Latest Photo Galleries</h1>
{% if latest %}
{% for gallery in latest %}
<div class="photo-gallery">
<h2><a href="{{ gallery.get_absolute_url }}">{{ gallery.title }}</a></h2>
{% for photo in gallery.sample %}
<div class="gallery-photo">
<a href="{{ photo.get_absolute_url }}"><img src="{{ photo.get_thumbnail_url }}" class="{% block gallery-photo-class %}{% endblock %}" alt="{{ photo.title }}"/></a>
</div>
{% endfor %}
</div>
{% endfor %}
{% else %}
<p>No galleries were found.</p>
{% endif %}
<p><a href="{% url 'pl-gallery-list' 1 %}">View all galleries.</a></p>
{% endblock %}
| {% extends "photologue/root.html" %}
{% load url from future %}
{% block title %}Latest Photo Galleries{% endblock %}
{% block content %}
<h1>Latest Photo Galleries</h1>
{% if latest %}
{% for gallery in latest %}
<div class="photo-gallery">
<h2><a href="{{ gallery.get_absolute_url }}">{{ gallery.title }}</a></h2>
{% for photo in gallery.sample %}
<div class="gallery-photo">
<a href="{{ photo.image.url }}" data-lightbox="{{ gallery.title }}" title="{{ photo.title }}"><img src="{{ photo.get_thumbnail_url }}" class="{% block gallery-photo-class %}{% endblock %}" alt="{{ photo.title }}"/></a>
</div>
{% endfor %}
</div>
{% endfor %}
{% else %}
<p>No galleries were found.</p>
{% endif %}
<p><a href="{% url 'pl-gallery-list' 1 %}">View all galleries.</a></p>
{% endblock %}
| Change gallery archive to use lightbox | photologue: Change gallery archive to use lightbox
| HTML | mit | tbabej/roots,matus-stehlik/glowing-batman,tbabej/roots,matus-stehlik/glowing-batman,rtrembecky/roots,tbabej/roots,matus-stehlik/roots,rtrembecky/roots,matus-stehlik/roots,rtrembecky/roots,matus-stehlik/roots | html | ## Code Before:
{% extends "photologue/root.html" %}
{% load url from future %}
{% block title %}Latest Photo Galleries{% endblock %}
{% block content %}
<h1>Latest Photo Galleries</h1>
{% if latest %}
{% for gallery in latest %}
<div class="photo-gallery">
<h2><a href="{{ gallery.get_absolute_url }}">{{ gallery.title }}</a></h2>
{% for photo in gallery.sample %}
<div class="gallery-photo">
<a href="{{ photo.get_absolute_url }}"><img src="{{ photo.get_thumbnail_url }}" class="{% block gallery-photo-class %}{% endblock %}" alt="{{ photo.title }}"/></a>
</div>
{% endfor %}
</div>
{% endfor %}
{% else %}
<p>No galleries were found.</p>
{% endif %}
<p><a href="{% url 'pl-gallery-list' 1 %}">View all galleries.</a></p>
{% endblock %}
## Instruction:
photologue: Change gallery archive to use lightbox
## Code After:
{% extends "photologue/root.html" %}
{% load url from future %}
{% block title %}Latest Photo Galleries{% endblock %}
{% block content %}
<h1>Latest Photo Galleries</h1>
{% if latest %}
{% for gallery in latest %}
<div class="photo-gallery">
<h2><a href="{{ gallery.get_absolute_url }}">{{ gallery.title }}</a></h2>
{% for photo in gallery.sample %}
<div class="gallery-photo">
<a href="{{ photo.image.url }}" data-lightbox="{{ gallery.title }}" title="{{ photo.title }}"><img src="{{ photo.get_thumbnail_url }}" class="{% block gallery-photo-class %}{% endblock %}" alt="{{ photo.title }}"/></a>
</div>
{% endfor %}
</div>
{% endfor %}
{% else %}
<p>No galleries were found.</p>
{% endif %}
<p><a href="{% url 'pl-gallery-list' 1 %}">View all galleries.</a></p>
{% endblock %}
| {% extends "photologue/root.html" %}
{% load url from future %}
{% block title %}Latest Photo Galleries{% endblock %}
{% block content %}
<h1>Latest Photo Galleries</h1>
{% if latest %}
{% for gallery in latest %}
<div class="photo-gallery">
<h2><a href="{{ gallery.get_absolute_url }}">{{ gallery.title }}</a></h2>
{% for photo in gallery.sample %}
<div class="gallery-photo">
- <a href="{{ photo.get_absolute_url }}"><img src="{{ photo.get_thumbnail_url }}" class="{% block gallery-photo-class %}{% endblock %}" alt="{{ photo.title }}"/></a>
? ^^^^^^^^^ ^^^^^^
+ <a href="{{ photo.image.url }}" data-lightbox="{{ gallery.title }}" title="{{ photo.title }}"><img src="{{ photo.get_thumbnail_url }}" class="{% block gallery-photo-class %}{% endblock %}" alt="{{ photo.title }}"/></a>
? ^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
</div>
{% endfor %}
</div>
{% endfor %}
{% else %}
<p>No galleries were found.</p>
{% endif %}
<p><a href="{% url 'pl-gallery-list' 1 %}">View all galleries.</a></p>
{% endblock %} | 2 | 0.074074 | 1 | 1 |
737c30fedcb64adc0726afcf67fec40791f99e81 | examples/vector-wfs.html | examples/vector-wfs.html | ---
layout: example.html
title: WFS
shortdesc: Example of using WFS with a BBOX strategy.
docs: >
This example loads new features from GeoServer WFS when the view extent changes.
tags: "vector, WFS, bbox, loading, server"
cloak:
- key: As1HiMj1PvLPlqc_gtM7AqZfBL8ZL3VrjaS3zIb22Uvb9WKhuJObROC-qUpa81U5
value: Your Bing Maps Key from http://www.bingmapsportal.com/ here
---
<div id="map" class="map"></div>
| ---
layout: example.html
title: WFS
shortdesc: Example of using WFS with a BBOX strategy.
docs: >
This example loads new features from GeoServer WFS when the view extent changes.
tags: "vector, WFS, bbox, loading, server, maptiler"
cloak:
- key: get_your_own_D6rA4zTHduk6KOKTXzGB
value: Get your own API key at https://www.maptiler.com/cloud/
---
<div id="map" class="map"></div>
| Replace Bing layer with MapTiler | Replace Bing layer with MapTiler | HTML | bsd-2-clause | adube/ol3,ahocevar/ol3,geekdenz/ol3,stweil/ol3,bjornharrtell/ol3,bjornharrtell/ol3,oterral/ol3,stweil/openlayers,ahocevar/openlayers,stweil/openlayers,adube/ol3,bjornharrtell/ol3,stweil/ol3,stweil/ol3,openlayers/openlayers,stweil/ol3,geekdenz/ol3,ahocevar/openlayers,ahocevar/ol3,adube/ol3,ahocevar/ol3,oterral/ol3,geekdenz/openlayers,openlayers/openlayers,stweil/openlayers,geekdenz/ol3,geekdenz/openlayers,geekdenz/ol3,ahocevar/ol3,oterral/ol3,geekdenz/openlayers,openlayers/openlayers,ahocevar/openlayers | html | ## Code Before:
---
layout: example.html
title: WFS
shortdesc: Example of using WFS with a BBOX strategy.
docs: >
This example loads new features from GeoServer WFS when the view extent changes.
tags: "vector, WFS, bbox, loading, server"
cloak:
- key: As1HiMj1PvLPlqc_gtM7AqZfBL8ZL3VrjaS3zIb22Uvb9WKhuJObROC-qUpa81U5
value: Your Bing Maps Key from http://www.bingmapsportal.com/ here
---
<div id="map" class="map"></div>
## Instruction:
Replace Bing layer with MapTiler
## Code After:
---
layout: example.html
title: WFS
shortdesc: Example of using WFS with a BBOX strategy.
docs: >
This example loads new features from GeoServer WFS when the view extent changes.
tags: "vector, WFS, bbox, loading, server, maptiler"
cloak:
- key: get_your_own_D6rA4zTHduk6KOKTXzGB
value: Get your own API key at https://www.maptiler.com/cloud/
---
<div id="map" class="map"></div>
| ---
layout: example.html
title: WFS
shortdesc: Example of using WFS with a BBOX strategy.
docs: >
This example loads new features from GeoServer WFS when the view extent changes.
- tags: "vector, WFS, bbox, loading, server"
+ tags: "vector, WFS, bbox, loading, server, maptiler"
? ++++++++++
cloak:
- - key: As1HiMj1PvLPlqc_gtM7AqZfBL8ZL3VrjaS3zIb22Uvb9WKhuJObROC-qUpa81U5
- value: Your Bing Maps Key from http://www.bingmapsportal.com/ here
+ - key: get_your_own_D6rA4zTHduk6KOKTXzGB
+ value: Get your own API key at https://www.maptiler.com/cloud/
---
<div id="map" class="map"></div> | 6 | 0.5 | 3 | 3 |
0de0aead3a6099114a1a4304fe450c802cf891fb | lib/gym_tcp_api.ex | lib/gym_tcp_api.ex |
defmodule GymTcpApi do
use Application
def start(_type, _args) do
import Supervisor.Spec
poolboy_config = [
{:name, {:local, pool_name()}},
{:worker_module, GymTcpApi.Worker},
{:size, Application.get_env(:gym_tcp_api, :worker)},
{:max_overflow, 0}
]
children = [
:poolboy.child_spec(pool_name(), poolboy_config, []),
supervisor(Task.Supervisor, [[name: GymTcpApi.TaskSupervisor]]),
worker(Task, [GymTcpApi.Server, :accept,
[Application.get_env(:gym_tcp_api, :port)]])
]
options = [
strategy: :one_for_one,
name: GymTcpApi.Supervisor
]
Supervisor.start_link(children, options)
end
def pool_name() do
:gym_pool
end
end
|
defmodule GymTcpApi do
use Application
def start(_type, _args) do
import Supervisor.Spec
poolboy_config = [
{:name, {:local, pool_name()}},
{:worker_module, GymTcpApi.Worker},
{:size, Application.get_env(:gym_tcp_api, :worker)},
{:max_overflow, 0},
{:strategy, :fifo}
]
children = [
:poolboy.child_spec(pool_name(), poolboy_config, []),
supervisor(Task.Supervisor, [[name: GymTcpApi.TaskSupervisor]]),
worker(Task, [GymTcpApi.Server, :accept,
[Application.get_env(:gym_tcp_api, :port)]])
]
options = [
strategy: :one_for_one,
name: GymTcpApi.Supervisor
]
Supervisor.start_link(children, options)
end
def pool_name() do
:gym_pool
end
end
| Use fifo strategy for the worker. | Use fifo strategy for the worker.
| Elixir | bsd-3-clause | zoq/gym_tcp_api,zoq/gym_tcp_api | elixir | ## Code Before:
defmodule GymTcpApi do
use Application
def start(_type, _args) do
import Supervisor.Spec
poolboy_config = [
{:name, {:local, pool_name()}},
{:worker_module, GymTcpApi.Worker},
{:size, Application.get_env(:gym_tcp_api, :worker)},
{:max_overflow, 0}
]
children = [
:poolboy.child_spec(pool_name(), poolboy_config, []),
supervisor(Task.Supervisor, [[name: GymTcpApi.TaskSupervisor]]),
worker(Task, [GymTcpApi.Server, :accept,
[Application.get_env(:gym_tcp_api, :port)]])
]
options = [
strategy: :one_for_one,
name: GymTcpApi.Supervisor
]
Supervisor.start_link(children, options)
end
def pool_name() do
:gym_pool
end
end
## Instruction:
Use fifo strategy for the worker.
## Code After:
defmodule GymTcpApi do
use Application
def start(_type, _args) do
import Supervisor.Spec
poolboy_config = [
{:name, {:local, pool_name()}},
{:worker_module, GymTcpApi.Worker},
{:size, Application.get_env(:gym_tcp_api, :worker)},
{:max_overflow, 0},
{:strategy, :fifo}
]
children = [
:poolboy.child_spec(pool_name(), poolboy_config, []),
supervisor(Task.Supervisor, [[name: GymTcpApi.TaskSupervisor]]),
worker(Task, [GymTcpApi.Server, :accept,
[Application.get_env(:gym_tcp_api, :port)]])
]
options = [
strategy: :one_for_one,
name: GymTcpApi.Supervisor
]
Supervisor.start_link(children, options)
end
def pool_name() do
:gym_pool
end
end
|
defmodule GymTcpApi do
use Application
def start(_type, _args) do
import Supervisor.Spec
poolboy_config = [
{:name, {:local, pool_name()}},
{:worker_module, GymTcpApi.Worker},
{:size, Application.get_env(:gym_tcp_api, :worker)},
- {:max_overflow, 0}
+ {:max_overflow, 0},
? +
+ {:strategy, :fifo}
]
children = [
:poolboy.child_spec(pool_name(), poolboy_config, []),
supervisor(Task.Supervisor, [[name: GymTcpApi.TaskSupervisor]]),
worker(Task, [GymTcpApi.Server, :accept,
[Application.get_env(:gym_tcp_api, :port)]])
]
options = [
strategy: :one_for_one,
name: GymTcpApi.Supervisor
]
Supervisor.start_link(children, options)
end
def pool_name() do
:gym_pool
end
end | 3 | 0.090909 | 2 | 1 |
f024f523b25d74c1cefbf4b019333c93b7d46af6 | app/javascript/flavours/glitch/reducers/picture_in_picture.js | app/javascript/flavours/glitch/reducers/picture_in_picture.js | import { PICTURE_IN_PICTURE_DEPLOY, PICTURE_IN_PICTURE_REMOVE } from 'flavours/glitch/actions/picture_in_picture';
const initialState = {
statusId: null,
accountId: null,
type: null,
src: null,
muted: false,
volume: 0,
currentTime: 0,
};
export default function pictureInPicture(state = initialState, action) {
switch(action.type) {
case PICTURE_IN_PICTURE_DEPLOY:
return { statusId: action.statusId, accountId: action.accountId, type: action.playerType, ...action.props };
case PICTURE_IN_PICTURE_REMOVE:
return { ...initialState };
default:
return state;
}
};
| import { PICTURE_IN_PICTURE_DEPLOY, PICTURE_IN_PICTURE_REMOVE } from 'flavours/glitch/actions/picture_in_picture';
import { TIMELINE_DELETE } from 'flavours/glitch/actions/timelines';
const initialState = {
statusId: null,
accountId: null,
type: null,
src: null,
muted: false,
volume: 0,
currentTime: 0,
};
export default function pictureInPicture(state = initialState, action) {
switch(action.type) {
case PICTURE_IN_PICTURE_DEPLOY:
return { statusId: action.statusId, accountId: action.accountId, type: action.playerType, ...action.props };
case PICTURE_IN_PICTURE_REMOVE:
return { ...initialState };
case TIMELINE_DELETE:
return (state.statusId === action.id) ? { ...initialState } : state;
default:
return state;
}
};
| Fix pop-up player not closing the moment a status is deleted | Fix pop-up player not closing the moment a status is deleted
Signed-off-by: Claire <82b964c50e9d1d222e48cf5046e6484a966a7b07@sitedethib.com>
| JavaScript | agpl-3.0 | im-in-space/mastodon,Kirishima21/mastodon,im-in-space/mastodon,glitch-soc/mastodon,Kirishima21/mastodon,glitch-soc/mastodon,glitch-soc/mastodon,im-in-space/mastodon,im-in-space/mastodon,Kirishima21/mastodon,glitch-soc/mastodon,Kirishima21/mastodon | javascript | ## Code Before:
import { PICTURE_IN_PICTURE_DEPLOY, PICTURE_IN_PICTURE_REMOVE } from 'flavours/glitch/actions/picture_in_picture';
const initialState = {
statusId: null,
accountId: null,
type: null,
src: null,
muted: false,
volume: 0,
currentTime: 0,
};
export default function pictureInPicture(state = initialState, action) {
switch(action.type) {
case PICTURE_IN_PICTURE_DEPLOY:
return { statusId: action.statusId, accountId: action.accountId, type: action.playerType, ...action.props };
case PICTURE_IN_PICTURE_REMOVE:
return { ...initialState };
default:
return state;
}
};
## Instruction:
Fix pop-up player not closing the moment a status is deleted
Signed-off-by: Claire <82b964c50e9d1d222e48cf5046e6484a966a7b07@sitedethib.com>
## Code After:
import { PICTURE_IN_PICTURE_DEPLOY, PICTURE_IN_PICTURE_REMOVE } from 'flavours/glitch/actions/picture_in_picture';
import { TIMELINE_DELETE } from 'flavours/glitch/actions/timelines';
const initialState = {
statusId: null,
accountId: null,
type: null,
src: null,
muted: false,
volume: 0,
currentTime: 0,
};
export default function pictureInPicture(state = initialState, action) {
switch(action.type) {
case PICTURE_IN_PICTURE_DEPLOY:
return { statusId: action.statusId, accountId: action.accountId, type: action.playerType, ...action.props };
case PICTURE_IN_PICTURE_REMOVE:
return { ...initialState };
case TIMELINE_DELETE:
return (state.statusId === action.id) ? { ...initialState } : state;
default:
return state;
}
};
| import { PICTURE_IN_PICTURE_DEPLOY, PICTURE_IN_PICTURE_REMOVE } from 'flavours/glitch/actions/picture_in_picture';
+ import { TIMELINE_DELETE } from 'flavours/glitch/actions/timelines';
const initialState = {
statusId: null,
accountId: null,
type: null,
src: null,
muted: false,
volume: 0,
currentTime: 0,
};
export default function pictureInPicture(state = initialState, action) {
switch(action.type) {
case PICTURE_IN_PICTURE_DEPLOY:
return { statusId: action.statusId, accountId: action.accountId, type: action.playerType, ...action.props };
case PICTURE_IN_PICTURE_REMOVE:
return { ...initialState };
+ case TIMELINE_DELETE:
+ return (state.statusId === action.id) ? { ...initialState } : state;
default:
return state;
}
}; | 3 | 0.136364 | 3 | 0 |
f6cbf70c8f9289a14136611662ffaf13ad984156 | unittests/.test_and_clean.sh | unittests/.test_and_clean.sh | the_terminal_is_very_narrow() {
[ `tput cols` -lt 80 ]
}
echo_wide_success() {
echo -n "[1;37;42m Success."
echo " [0m"
}
echo_wide_failure() {
echo -n "[1;37;41m Failure."
echo " [0m"
}
echo_narrow_success() {
echo "[32mSuccess.[0m"
}
echo_narrow_failure() {
echo "[31mFailure.[0m"
}
echo_success() {
if the_terminal_is_very_narrow; then
echo_narrow_success
else
echo_wide_success
fi
}
echo_failure() {
if the_terminal_is_very_narrow; then
echo_narrow_failure
else
echo_wide_failure
fi
}
echo ""
if bash unittests/.quick_test.sh; then
echo ""
make clean
echo_success
git add .
git commit -v || git status
else
echo ""
echo_failure
fi
| the_terminal_is_very_narrow() {
[ `tput cols` -lt 80 ]
}
echo_wide_success() {
echo -n "[1;37;42m Success."
echo " [0m"
}
echo_wide_failure() {
echo -n "[1;37;41m Failure."
echo " [0m"
}
echo_narrow_success() {
echo "[32mSuccess.[0m"
}
echo_narrow_failure() {
echo "[31mFailure.[0m"
}
echo_success() {
if the_terminal_is_very_narrow; then
echo_narrow_success
else
echo_wide_success
fi
}
echo_failure() {
if the_terminal_is_very_narrow; then
echo_narrow_failure
else
echo_wide_failure
fi
}
changes_have_been_made() {
[[ `git status --porcelain` ]]
}
echo ""
if bash unittests/.quick_test.sh; then
echo ""
make clean
echo_success
if changes_have_been_made; then
git add .
git commit -v || git status
else
git status
fi
else
echo ""
echo_failure
fi
| Make test checks for changes before committing | Make test checks for changes before committing
| Shell | bsd-3-clause | daaang/blister | shell | ## Code Before:
the_terminal_is_very_narrow() {
[ `tput cols` -lt 80 ]
}
echo_wide_success() {
echo -n "[1;37;42m Success."
echo " [0m"
}
echo_wide_failure() {
echo -n "[1;37;41m Failure."
echo " [0m"
}
echo_narrow_success() {
echo "[32mSuccess.[0m"
}
echo_narrow_failure() {
echo "[31mFailure.[0m"
}
echo_success() {
if the_terminal_is_very_narrow; then
echo_narrow_success
else
echo_wide_success
fi
}
echo_failure() {
if the_terminal_is_very_narrow; then
echo_narrow_failure
else
echo_wide_failure
fi
}
echo ""
if bash unittests/.quick_test.sh; then
echo ""
make clean
echo_success
git add .
git commit -v || git status
else
echo ""
echo_failure
fi
## Instruction:
Make test checks for changes before committing
## Code After:
the_terminal_is_very_narrow() {
[ `tput cols` -lt 80 ]
}
echo_wide_success() {
echo -n "[1;37;42m Success."
echo " [0m"
}
echo_wide_failure() {
echo -n "[1;37;41m Failure."
echo " [0m"
}
echo_narrow_success() {
echo "[32mSuccess.[0m"
}
echo_narrow_failure() {
echo "[31mFailure.[0m"
}
echo_success() {
if the_terminal_is_very_narrow; then
echo_narrow_success
else
echo_wide_success
fi
}
echo_failure() {
if the_terminal_is_very_narrow; then
echo_narrow_failure
else
echo_wide_failure
fi
}
changes_have_been_made() {
[[ `git status --porcelain` ]]
}
echo ""
if bash unittests/.quick_test.sh; then
echo ""
make clean
echo_success
if changes_have_been_made; then
git add .
git commit -v || git status
else
git status
fi
else
echo ""
echo_failure
fi
| the_terminal_is_very_narrow() {
[ `tput cols` -lt 80 ]
}
echo_wide_success() {
echo -n "[1;37;42m Success."
echo " [0m"
}
echo_wide_failure() {
echo -n "[1;37;41m Failure."
echo " [0m"
}
echo_narrow_success() {
echo "[32mSuccess.[0m"
}
echo_narrow_failure() {
echo "[31mFailure.[0m"
}
echo_success() {
if the_terminal_is_very_narrow; then
echo_narrow_success
else
echo_wide_success
fi
}
echo_failure() {
if the_terminal_is_very_narrow; then
echo_narrow_failure
else
echo_wide_failure
fi
}
+ changes_have_been_made() {
+ [[ `git status --porcelain` ]]
+ }
+
echo ""
if bash unittests/.quick_test.sh; then
echo ""
make clean
echo_success
+ if changes_have_been_made; then
- git add .
+ git add .
? ++
- git commit -v || git status
+ git commit -v || git status
? ++
+
+ else
+ git status
+ fi
else
echo ""
echo_failure
fi | 13 | 0.25 | 11 | 2 |
c1bff90149e9d35329ad5c661a92d12a7c9a571a | .xmonad/xmonad.hs | .xmonad/xmonad.hs | import System.IO
import System.Exit
import XMonad
import XMonad.Hooks.DynamicLog
import XMonad.Hooks.ManageDocks
import XMonad.Layout.Fullscreen
import XMonad.Layout.NoBorders
import XMonad.Layout.Spiral
import XMonad.Layout.ThreeColumns
import XMonad.Layout.SimpleFloat
import XMonad.Util.EZConfig(additionalKeys)
myLayout = avoidStruts (
Tall 1 (3/100) (1/2) |||
Mirror (Tall 1 (3/100) (1/2)) |||
Full |||
spiral (6/7)
) |||
noBorders (fullscreenFull Full) |||
simpleFloat
-- Toggle xmobar visibility with mod+b.
toggleXMobarKey XConfig { XMonad.modMask = modMask } = (modMask, xK_b)
_mod = mod4Mask
_config = defaultConfig {
terminal = "/usr/bin/urxvt",
modMask = _mod,
normalBorderColor = "#333333",
focusedBorderColor = "#5882FA",
layoutHook = smartBorders $ myLayout
} `additionalKeys`
[ ((_mod, xK_j), spawn "chromium")]
main = do
config <- statusBar "xmobar ~/.xmonad/xmobar.hs" xmobarPP toggleXMobarKey _config
xmonad config
| import System.IO
import System.Exit
import XMonad
import XMonad.Hooks.DynamicLog
import XMonad.Hooks.ManageDocks
import XMonad.Layout.Fullscreen
import XMonad.Layout.NoBorders
import XMonad.Layout.Spiral
import XMonad.Layout.ThreeColumns
import XMonad.Layout.SimpleFloat
import XMonad.Util.EZConfig(additionalKeys)
myLayout = avoidStruts (
Tall 1 (3/100) (1/2) |||
Mirror (Tall 1 (3/100) (1/2)) |||
Full |||
spiral (6/7)
) |||
noBorders (fullscreenFull Full) |||
simpleFloat
_mod = mod4Mask
toggleXMobarKey XConfig { XMonad.modMask = modMask } = (modMask, xK_b)
_config = defaultConfig {
terminal = "/usr/bin/urxvt",
modMask = _mod,
normalBorderColor = "#333333",
focusedBorderColor = "#5882FA",
layoutHook = smartBorders $ myLayout
} `additionalKeys`
[ ((_mod, xK_o), spawn "chromium")
, ((_mod .|. shiftMask, xK_apostrophe), kill)]
main = do
config <- statusBar "xmobar ~/.xmonad/xmobar.hs" xmobarPP toggleXMobarKey _config
xmonad config
| Update kill and chromium hotkeys. | Update kill and chromium hotkeys.
| Haskell | mit | bamos/dotfiles,bamos/dotfiles,bamos/dotfiles | haskell | ## Code Before:
import System.IO
import System.Exit
import XMonad
import XMonad.Hooks.DynamicLog
import XMonad.Hooks.ManageDocks
import XMonad.Layout.Fullscreen
import XMonad.Layout.NoBorders
import XMonad.Layout.Spiral
import XMonad.Layout.ThreeColumns
import XMonad.Layout.SimpleFloat
import XMonad.Util.EZConfig(additionalKeys)
myLayout = avoidStruts (
Tall 1 (3/100) (1/2) |||
Mirror (Tall 1 (3/100) (1/2)) |||
Full |||
spiral (6/7)
) |||
noBorders (fullscreenFull Full) |||
simpleFloat
-- Toggle xmobar visibility with mod+b.
toggleXMobarKey XConfig { XMonad.modMask = modMask } = (modMask, xK_b)
_mod = mod4Mask
_config = defaultConfig {
terminal = "/usr/bin/urxvt",
modMask = _mod,
normalBorderColor = "#333333",
focusedBorderColor = "#5882FA",
layoutHook = smartBorders $ myLayout
} `additionalKeys`
[ ((_mod, xK_j), spawn "chromium")]
main = do
config <- statusBar "xmobar ~/.xmonad/xmobar.hs" xmobarPP toggleXMobarKey _config
xmonad config
## Instruction:
Update kill and chromium hotkeys.
## Code After:
import System.IO
import System.Exit
import XMonad
import XMonad.Hooks.DynamicLog
import XMonad.Hooks.ManageDocks
import XMonad.Layout.Fullscreen
import XMonad.Layout.NoBorders
import XMonad.Layout.Spiral
import XMonad.Layout.ThreeColumns
import XMonad.Layout.SimpleFloat
import XMonad.Util.EZConfig(additionalKeys)
myLayout = avoidStruts (
Tall 1 (3/100) (1/2) |||
Mirror (Tall 1 (3/100) (1/2)) |||
Full |||
spiral (6/7)
) |||
noBorders (fullscreenFull Full) |||
simpleFloat
_mod = mod4Mask
toggleXMobarKey XConfig { XMonad.modMask = modMask } = (modMask, xK_b)
_config = defaultConfig {
terminal = "/usr/bin/urxvt",
modMask = _mod,
normalBorderColor = "#333333",
focusedBorderColor = "#5882FA",
layoutHook = smartBorders $ myLayout
} `additionalKeys`
[ ((_mod, xK_o), spawn "chromium")
, ((_mod .|. shiftMask, xK_apostrophe), kill)]
main = do
config <- statusBar "xmobar ~/.xmonad/xmobar.hs" xmobarPP toggleXMobarKey _config
xmonad config
| import System.IO
import System.Exit
import XMonad
import XMonad.Hooks.DynamicLog
import XMonad.Hooks.ManageDocks
import XMonad.Layout.Fullscreen
import XMonad.Layout.NoBorders
import XMonad.Layout.Spiral
import XMonad.Layout.ThreeColumns
import XMonad.Layout.SimpleFloat
import XMonad.Util.EZConfig(additionalKeys)
myLayout = avoidStruts (
Tall 1 (3/100) (1/2) |||
Mirror (Tall 1 (3/100) (1/2)) |||
Full |||
spiral (6/7)
) |||
noBorders (fullscreenFull Full) |||
simpleFloat
- -- Toggle xmobar visibility with mod+b.
+ _mod = mod4Mask
toggleXMobarKey XConfig { XMonad.modMask = modMask } = (modMask, xK_b)
-
- _mod = mod4Mask
_config = defaultConfig {
terminal = "/usr/bin/urxvt",
modMask = _mod,
normalBorderColor = "#333333",
focusedBorderColor = "#5882FA",
layoutHook = smartBorders $ myLayout
} `additionalKeys`
- [ ((_mod, xK_j), spawn "chromium")]
? ^ -
+ [ ((_mod, xK_o), spawn "chromium")
? ^
+ , ((_mod .|. shiftMask, xK_apostrophe), kill)]
main = do
config <- statusBar "xmobar ~/.xmonad/xmobar.hs" xmobarPP toggleXMobarKey _config
xmonad config | 7 | 0.189189 | 3 | 4 |
9a1b1880c079bc7deed0723e060856f24e04cdee | app/displayobjects/CraftyBlock/CraftyBlockSpec.js | app/displayobjects/CraftyBlock/CraftyBlockSpec.js | import * as PASTEL_FUNC from '../../functions/functions.js';
import CraftyBlock from './CraftyBlock.js';
export default class CraftyBlockSpec {
constructor(name, type, parameters = [], library="", docstring="") {
this.name = name;
this.type = type;
this.parameters = parameters;
this.docstring = docstring;
this.library = library;
}
static functionWithName(name) {
let info = [ ...PASTEL_FUNC.STANDARD, ...PASTEL_FUNC.MATH].find( functionInfo => {
return functionInfo.name === name;
});
return new CraftyBlockSpec(info.name, CraftyBlock.FUNCTION, info.parameters, "", info.docstring);
}
}
| import * as PASTEL_FUNC from '../../functions/functions.js';
import CraftyBlock from './CraftyBlock.js';
export default class CraftyBlockSpec {
constructor(name, type, parameters = [], library="", docstring="") {
this.name = name;
this.type = type;
this.parameters = parameters;
this.docstring = docstring;
this.library = library;
}
static functionWithName(name) {
let info = [ ...PASTEL_FUNC.STANDARD, ...PASTEL_FUNC.MATH].find( functionInfo => {
return functionInfo.name === name;
});
if (!info) {
throw new Error("Not able to find function with name: " + name);
}
return new CraftyBlockSpec(info.name, CraftyBlock.FUNCTION, info.parameters, "", info.docstring);
}
}
| Implement throw error when no function found | Implement throw error when no function found
| JavaScript | mit | PJunhyuk/crafty,PJunhyuk/crafty | javascript | ## Code Before:
import * as PASTEL_FUNC from '../../functions/functions.js';
import CraftyBlock from './CraftyBlock.js';
export default class CraftyBlockSpec {
constructor(name, type, parameters = [], library="", docstring="") {
this.name = name;
this.type = type;
this.parameters = parameters;
this.docstring = docstring;
this.library = library;
}
static functionWithName(name) {
let info = [ ...PASTEL_FUNC.STANDARD, ...PASTEL_FUNC.MATH].find( functionInfo => {
return functionInfo.name === name;
});
return new CraftyBlockSpec(info.name, CraftyBlock.FUNCTION, info.parameters, "", info.docstring);
}
}
## Instruction:
Implement throw error when no function found
## Code After:
import * as PASTEL_FUNC from '../../functions/functions.js';
import CraftyBlock from './CraftyBlock.js';
export default class CraftyBlockSpec {
constructor(name, type, parameters = [], library="", docstring="") {
this.name = name;
this.type = type;
this.parameters = parameters;
this.docstring = docstring;
this.library = library;
}
static functionWithName(name) {
let info = [ ...PASTEL_FUNC.STANDARD, ...PASTEL_FUNC.MATH].find( functionInfo => {
return functionInfo.name === name;
});
if (!info) {
throw new Error("Not able to find function with name: " + name);
}
return new CraftyBlockSpec(info.name, CraftyBlock.FUNCTION, info.parameters, "", info.docstring);
}
}
| import * as PASTEL_FUNC from '../../functions/functions.js';
import CraftyBlock from './CraftyBlock.js';
export default class CraftyBlockSpec {
constructor(name, type, parameters = [], library="", docstring="") {
this.name = name;
this.type = type;
this.parameters = parameters;
this.docstring = docstring;
this.library = library;
}
static functionWithName(name) {
let info = [ ...PASTEL_FUNC.STANDARD, ...PASTEL_FUNC.MATH].find( functionInfo => {
return functionInfo.name === name;
});
+ if (!info) {
+ throw new Error("Not able to find function with name: " + name);
+ }
+
return new CraftyBlockSpec(info.name, CraftyBlock.FUNCTION, info.parameters, "", info.docstring);
}
} | 4 | 0.2 | 4 | 0 |
85005ca5c8a7ba6434263c33f17e937ba17b60bc | roles/knowhow/tasks/main.yml | roles/knowhow/tasks/main.yml | ---
- name: Install Node.js packages
action: npm name={{ item }} state=latest global=yes
with_items:
- gulp
- ember-cli
- name: Create app directories
action: file path={{ item }} state=directory
with_items:
- /u/apps/knowhow/frontend
- /u/apps/knowhow/backend
| ---
- name: Install Node.js packages
action: npm name={{ item }} state=latest global=yes
with_items:
- gulp
- ember-cli
- name: Create app directories
action: file path={{ item }} state=directory
with_items:
- /u/apps/knowhow/frontend
- /u/apps/knowhow/backend
- name: Check out app repositories
action: git repo={{ item.repo }} dest={{ item.dest }} update=no
with_items:
- repo: git@github.com:Pitt-CSC/knowhow-frontend.git
dest: /u/apps/knowhow/frontend
- repo: git@github.com:Pitt-CSC/knowhow-backend.git
dest: /u/apps/knowhow/backend
| Check out repositories for Knowhow | Check out repositories for Knowhow
| YAML | mit | RitwikGupta/ansible,RitwikGupta/ansible,Pitt-CSC/ansible,Pitt-CSC/ansible,Pitt-CSC/ansible,RitwikGupta/ansible | yaml | ## Code Before:
---
- name: Install Node.js packages
action: npm name={{ item }} state=latest global=yes
with_items:
- gulp
- ember-cli
- name: Create app directories
action: file path={{ item }} state=directory
with_items:
- /u/apps/knowhow/frontend
- /u/apps/knowhow/backend
## Instruction:
Check out repositories for Knowhow
## Code After:
---
- name: Install Node.js packages
action: npm name={{ item }} state=latest global=yes
with_items:
- gulp
- ember-cli
- name: Create app directories
action: file path={{ item }} state=directory
with_items:
- /u/apps/knowhow/frontend
- /u/apps/knowhow/backend
- name: Check out app repositories
action: git repo={{ item.repo }} dest={{ item.dest }} update=no
with_items:
- repo: git@github.com:Pitt-CSC/knowhow-frontend.git
dest: /u/apps/knowhow/frontend
- repo: git@github.com:Pitt-CSC/knowhow-backend.git
dest: /u/apps/knowhow/backend
| ---
- name: Install Node.js packages
action: npm name={{ item }} state=latest global=yes
with_items:
- gulp
- ember-cli
- name: Create app directories
action: file path={{ item }} state=directory
with_items:
- /u/apps/knowhow/frontend
- /u/apps/knowhow/backend
+
+ - name: Check out app repositories
+ action: git repo={{ item.repo }} dest={{ item.dest }} update=no
+ with_items:
+ - repo: git@github.com:Pitt-CSC/knowhow-frontend.git
+ dest: /u/apps/knowhow/frontend
+ - repo: git@github.com:Pitt-CSC/knowhow-backend.git
+ dest: /u/apps/knowhow/backend | 8 | 0.666667 | 8 | 0 |
d1375e032ac0b4cf0fb56501dc0e79c20d6e0d29 | app/static/js/init.js | app/static/js/init.js | $(document).ready(function(){
$('#title_inc').tagsInput({'defaultText': '…'});
$('#title_exc').tagsInput({'defaultText': '…'});
$('#link_inc').tagsInput({'defaultText': '…'});
$('#link_exc').tagsInput({'defaultText': '…'});
set_submit(false)
$('#rss_url').blur(function(){
url = $(this).val()
$.get( "/check_url?&url=" + escape(url), function( data ) {
if (data == 'False') {
set_feedback(false)
} else {
set_feedback(true)
if (data != 'True') {
$('#rss_url').val(data)
}
}
});
})
})
set_feedback = function (value) {
feedback = $('#url_feedback')
fieldset = $('#rss_url_fieldset')
if ( value ) {
fieldset.addClass('has-success').removeClass('has-error')
feedback.show().addClass('glyphicon-ok').removeClass('glyphicon-remove')
set_submit(true)
} else {
fieldset.addClass('has-error').removeClass('has-success')
feedback.show().addClass('glyphicon-remove').removeClass('glyphicon-ok')
set_submit(false)
}
}
set_submit = function (value) {
btn = $('#submit_btn')
if ( value ) {
btn.removeAttr('disabled')
} else {
btn.attr('disabled', 'disabled')
}
} | $(document).ready(function(){
$('#title_inc').tagsInput({'defaultText': '…'});
$('#title_exc').tagsInput({'defaultText': '…'});
$('#link_inc').tagsInput({'defaultText': '…'});
$('#link_exc').tagsInput({'defaultText': '…'});
set_submit(false)
$('#rss_url').blur(check_url)
check_url()
})
set_feedback = function (value) {
feedback = $('#url_feedback')
fieldset = $('#rss_url_fieldset')
if ( value ) {
fieldset.addClass('has-success').removeClass('has-error')
feedback.show().addClass('glyphicon-ok').removeClass('glyphicon-remove')
set_submit(true)
} else {
fieldset.addClass('has-error').removeClass('has-success')
feedback.show().addClass('glyphicon-remove').removeClass('glyphicon-ok')
set_submit(false)
}
}
set_submit = function (value) {
btn = $('#submit_btn')
if ( value ) {
btn.removeAttr('disabled')
} else {
btn.attr('disabled', 'disabled')
}
}
check_url = function () {
url = $('#rss_url').val()
$.get( "/check_url?&url=" + escape(url), function( data ) {
if (data == 'False') {
set_feedback(false)
} else {
set_feedback(true)
if (data != 'True') {
$('#rss_url').val(data)
}
}
});
} | Fix ajax URL check to run on page load | Fix ajax URL check to run on page load
| JavaScript | mit | cuducos/filterss,cuducos/filterss,cuducos/filterss | javascript | ## Code Before:
$(document).ready(function(){
$('#title_inc').tagsInput({'defaultText': '…'});
$('#title_exc').tagsInput({'defaultText': '…'});
$('#link_inc').tagsInput({'defaultText': '…'});
$('#link_exc').tagsInput({'defaultText': '…'});
set_submit(false)
$('#rss_url').blur(function(){
url = $(this).val()
$.get( "/check_url?&url=" + escape(url), function( data ) {
if (data == 'False') {
set_feedback(false)
} else {
set_feedback(true)
if (data != 'True') {
$('#rss_url').val(data)
}
}
});
})
})
set_feedback = function (value) {
feedback = $('#url_feedback')
fieldset = $('#rss_url_fieldset')
if ( value ) {
fieldset.addClass('has-success').removeClass('has-error')
feedback.show().addClass('glyphicon-ok').removeClass('glyphicon-remove')
set_submit(true)
} else {
fieldset.addClass('has-error').removeClass('has-success')
feedback.show().addClass('glyphicon-remove').removeClass('glyphicon-ok')
set_submit(false)
}
}
set_submit = function (value) {
btn = $('#submit_btn')
if ( value ) {
btn.removeAttr('disabled')
} else {
btn.attr('disabled', 'disabled')
}
}
## Instruction:
Fix ajax URL check to run on page load
## Code After:
$(document).ready(function(){
$('#title_inc').tagsInput({'defaultText': '…'});
$('#title_exc').tagsInput({'defaultText': '…'});
$('#link_inc').tagsInput({'defaultText': '…'});
$('#link_exc').tagsInput({'defaultText': '…'});
set_submit(false)
$('#rss_url').blur(check_url)
check_url()
})
set_feedback = function (value) {
feedback = $('#url_feedback')
fieldset = $('#rss_url_fieldset')
if ( value ) {
fieldset.addClass('has-success').removeClass('has-error')
feedback.show().addClass('glyphicon-ok').removeClass('glyphicon-remove')
set_submit(true)
} else {
fieldset.addClass('has-error').removeClass('has-success')
feedback.show().addClass('glyphicon-remove').removeClass('glyphicon-ok')
set_submit(false)
}
}
set_submit = function (value) {
btn = $('#submit_btn')
if ( value ) {
btn.removeAttr('disabled')
} else {
btn.attr('disabled', 'disabled')
}
}
check_url = function () {
url = $('#rss_url').val()
$.get( "/check_url?&url=" + escape(url), function( data ) {
if (data == 'False') {
set_feedback(false)
} else {
set_feedback(true)
if (data != 'True') {
$('#rss_url').val(data)
}
}
});
} | $(document).ready(function(){
$('#title_inc').tagsInput({'defaultText': '…'});
$('#title_exc').tagsInput({'defaultText': '…'});
$('#link_inc').tagsInput({'defaultText': '…'});
$('#link_exc').tagsInput({'defaultText': '…'});
set_submit(false)
+ $('#rss_url').blur(check_url)
+ check_url()
- $('#rss_url').blur(function(){
- url = $(this).val()
- $.get( "/check_url?&url=" + escape(url), function( data ) {
- if (data == 'False') {
- set_feedback(false)
- } else {
- set_feedback(true)
- if (data != 'True') {
- $('#rss_url').val(data)
- }
- }
- });
- })
})
set_feedback = function (value) {
feedback = $('#url_feedback')
fieldset = $('#rss_url_fieldset')
if ( value ) {
fieldset.addClass('has-success').removeClass('has-error')
feedback.show().addClass('glyphicon-ok').removeClass('glyphicon-remove')
set_submit(true)
} else {
fieldset.addClass('has-error').removeClass('has-success')
feedback.show().addClass('glyphicon-remove').removeClass('glyphicon-ok')
set_submit(false)
-
+
}
}
set_submit = function (value) {
btn = $('#submit_btn')
if ( value ) {
btn.removeAttr('disabled')
} else {
btn.attr('disabled', 'disabled')
}
}
+
+ check_url = function () {
+ url = $('#rss_url').val()
+ $.get( "/check_url?&url=" + escape(url), function( data ) {
+ if (data == 'False') {
+ set_feedback(false)
+ } else {
+ set_feedback(true)
+ if (data != 'True') {
+ $('#rss_url').val(data)
+ }
+ }
+ });
+ } | 31 | 0.632653 | 17 | 14 |
bf11e0213519f8f93baf9b11829e94a02ca12fba | views/collection_view.js | views/collection_view.js | Flame.CollectionView = Ember.CollectionView.extend(Flame.LayoutSupport, Flame.EventManager, {
classNames: ['flame-list-view'],
init: function() {
this._super();
var emptyViewClass = this.get('emptyView');
if (emptyViewClass) {
emptyViewClass.reopen({
// Ensures removal if orphaned, circumventing the emptyView issue
// (https://github.com/emberjs/ember.js/issues/233)
ensureEmptyViewRemoval: function() {
if (!this.get('parentView')) {
Ember.run.next(this, 'remove');
}
}.observes('parentView')
});
}
}
});
| Flame.CollectionView = Ember.CollectionView.extend(Flame.LayoutSupport, Flame.EventManager, {
classNames: ['flame-list-view'],
init: function() {
this._super();
var emptyViewClass = this.get('emptyView');
if (emptyViewClass) {
emptyViewClass.reopen({
// Ensures removal if orphaned, circumventing the emptyView issue
// (https://github.com/emberjs/ember.js/issues/233)
ensureEmptyViewRemoval: function() {
if (!this.get('parentView')) {
Ember.run.next(this, function() {
if (!this.get('isDestroyed')) this.remove();
});
}
}.observes('parentView')
});
}
}
});
| Call remove() only for non-destroyed emptyViews in ensureEmptyViewRemoval | Call remove() only for non-destroyed emptyViews in ensureEmptyViewRemoval
| JavaScript | mit | massive/flame.js,massive/flame.js,renotoaster/flame.js,mattijauhiainen/flame.js,lalnuo/flame.js,lalnuo/flame.js,mattijauhiainen/flame.js,renotoaster/flame.js,flamejs/flame.js,lalnuo/flame.js | javascript | ## Code Before:
Flame.CollectionView = Ember.CollectionView.extend(Flame.LayoutSupport, Flame.EventManager, {
classNames: ['flame-list-view'],
init: function() {
this._super();
var emptyViewClass = this.get('emptyView');
if (emptyViewClass) {
emptyViewClass.reopen({
// Ensures removal if orphaned, circumventing the emptyView issue
// (https://github.com/emberjs/ember.js/issues/233)
ensureEmptyViewRemoval: function() {
if (!this.get('parentView')) {
Ember.run.next(this, 'remove');
}
}.observes('parentView')
});
}
}
});
## Instruction:
Call remove() only for non-destroyed emptyViews in ensureEmptyViewRemoval
## Code After:
Flame.CollectionView = Ember.CollectionView.extend(Flame.LayoutSupport, Flame.EventManager, {
classNames: ['flame-list-view'],
init: function() {
this._super();
var emptyViewClass = this.get('emptyView');
if (emptyViewClass) {
emptyViewClass.reopen({
// Ensures removal if orphaned, circumventing the emptyView issue
// (https://github.com/emberjs/ember.js/issues/233)
ensureEmptyViewRemoval: function() {
if (!this.get('parentView')) {
Ember.run.next(this, function() {
if (!this.get('isDestroyed')) this.remove();
});
}
}.observes('parentView')
});
}
}
});
| Flame.CollectionView = Ember.CollectionView.extend(Flame.LayoutSupport, Flame.EventManager, {
classNames: ['flame-list-view'],
init: function() {
this._super();
var emptyViewClass = this.get('emptyView');
if (emptyViewClass) {
emptyViewClass.reopen({
// Ensures removal if orphaned, circumventing the emptyView issue
// (https://github.com/emberjs/ember.js/issues/233)
ensureEmptyViewRemoval: function() {
if (!this.get('parentView')) {
- Ember.run.next(this, 'remove');
? ^^^^ ^^^ ^
+ Ember.run.next(this, function() {
? ^^^^^^ ^^ ^^
+ if (!this.get('isDestroyed')) this.remove();
+ });
}
}.observes('parentView')
});
}
}
}); | 4 | 0.190476 | 3 | 1 |
2add28d783786cbc5bf46c275afbdf40d3f4f97d | lib/tasks/report/notification_day_hour.rake | lib/tasks/report/notification_day_hour.rake | require 'csv'
namespace :report do
desc "deliveries by day of week, and time of day"
task :notification_day_hour => :environment do
daynames = ['day/hour','Sunday', 'Monday','Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday' ]
puts CSV.generate_line( daynames )
delivery_day_hour = Hash.new(0)
(0..6).each { |n| delivery_day_hour[n] = Hash.new(0) }
Notification.where("notifications.delivered_at is not null").find_each {
|n| dtime = n.delivered_at.in_time_zone("Africa/Johannesburg")
delivery_day_hour[ dtime.wday ][ dtime.hour] += 1 }
#puts delivery_day_hour.sort
(0..23).each { |hour| row = Array.new()
row += [hour]
(0..6).each { |day| row += [delivery_day_hour[day][hour]] }
puts CSV.generate_line(row)
}
end
end
| require 'csv'
namespace :report do
desc "deliveries by day of week, and time of day"
task :notification_day_hour => :environment do
delivered_table('SMS')
delivered_table('IVR')
end
def delivered_table(message_type)
puts "delivery method: #{message_type}"
daynames = ['day/hour','Sunday', 'Monday','Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday' ]
puts CSV.generate_line( daynames )
delivery_day_hour = Hash.new(0)
(0..6).each { |n| delivery_day_hour[n] = Hash.new(0) }
Notification.where("notifications.delivered_at is not null and delivery_method = ?", message_type).find_each {
|n| dtime = n.delivered_at.in_time_zone("Africa/Johannesburg")
delivery_day_hour[ dtime.wday ][ dtime.hour] += 1 }
#puts delivery_day_hour.sort
(0..23).each { |hour| row = Array.new()
row += [hour]
(0..6).each { |day| row += [delivery_day_hour[day][hour]] }
puts CSV.generate_line(row)
}
end
end
| Split report into SMS, and IVR reports | Split report into SMS, and IVR reports
| Ruby | epl-1.0 | dhedlund/hms-hub,dhedlund/hms-hub | ruby | ## Code Before:
require 'csv'
namespace :report do
desc "deliveries by day of week, and time of day"
task :notification_day_hour => :environment do
daynames = ['day/hour','Sunday', 'Monday','Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday' ]
puts CSV.generate_line( daynames )
delivery_day_hour = Hash.new(0)
(0..6).each { |n| delivery_day_hour[n] = Hash.new(0) }
Notification.where("notifications.delivered_at is not null").find_each {
|n| dtime = n.delivered_at.in_time_zone("Africa/Johannesburg")
delivery_day_hour[ dtime.wday ][ dtime.hour] += 1 }
#puts delivery_day_hour.sort
(0..23).each { |hour| row = Array.new()
row += [hour]
(0..6).each { |day| row += [delivery_day_hour[day][hour]] }
puts CSV.generate_line(row)
}
end
end
## Instruction:
Split report into SMS, and IVR reports
## Code After:
require 'csv'
namespace :report do
desc "deliveries by day of week, and time of day"
task :notification_day_hour => :environment do
delivered_table('SMS')
delivered_table('IVR')
end
def delivered_table(message_type)
puts "delivery method: #{message_type}"
daynames = ['day/hour','Sunday', 'Monday','Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday' ]
puts CSV.generate_line( daynames )
delivery_day_hour = Hash.new(0)
(0..6).each { |n| delivery_day_hour[n] = Hash.new(0) }
Notification.where("notifications.delivered_at is not null and delivery_method = ?", message_type).find_each {
|n| dtime = n.delivered_at.in_time_zone("Africa/Johannesburg")
delivery_day_hour[ dtime.wday ][ dtime.hour] += 1 }
#puts delivery_day_hour.sort
(0..23).each { |hour| row = Array.new()
row += [hour]
(0..6).each { |day| row += [delivery_day_hour[day][hour]] }
puts CSV.generate_line(row)
}
end
end
| require 'csv'
namespace :report do
desc "deliveries by day of week, and time of day"
task :notification_day_hour => :environment do
+ delivered_table('SMS')
+ delivered_table('IVR')
+ end
+ def delivered_table(message_type)
+ puts "delivery method: #{message_type}"
daynames = ['day/hour','Sunday', 'Monday','Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday' ]
puts CSV.generate_line( daynames )
delivery_day_hour = Hash.new(0)
(0..6).each { |n| delivery_day_hour[n] = Hash.new(0) }
- Notification.where("notifications.delivered_at is not null").find_each {
+ Notification.where("notifications.delivered_at is not null and delivery_method = ?", message_type).find_each {
? ++++++++++++++++++++++++ ++++++++++++++
|n| dtime = n.delivered_at.in_time_zone("Africa/Johannesburg")
delivery_day_hour[ dtime.wday ][ dtime.hour] += 1 }
#puts delivery_day_hour.sort
(0..23).each { |hour| row = Array.new()
row += [hour]
(0..6).each { |day| row += [delivery_day_hour[day][hour]] }
puts CSV.generate_line(row)
}
end
end | 7 | 0.35 | 6 | 1 |
6c1d91f66d848ef99a19ba4d53162d5f3b58c0c1 | modules/vim/installed-config/plugin/fzf-lua.lua | modules/vim/installed-config/plugin/fzf-lua.lua | local fzf_lua = require('fzf-lua')
fzf_lua.setup({
fzf_bin = 'sk',
fzf_opts = {
['--layout'] = 'default',
},
files = {
fd_opts = "--color=never --type f --hidden --no-ignore --exclude .git"
},
lsp = {
jump_to_single_result = true
}
})
vim.cmd("FzfLua register_ui_select")
| local fzf_lua = require('fzf-lua')
fzf_lua.setup({
fzf_bin = 'sk',
fzf_opts = {
['--layout'] = 'default',
},
files = {
fd_opts = "--color=never --type f --hidden --no-ignore --exclude .git"
},
git = {
files = {
cmd = 'git ls-files --exclude-standard --others --cached'
}
},
lsp = {
jump_to_single_result = true
}
})
vim.cmd("FzfLua register_ui_select")
| Fix vim GitFiles to include unstaged files | Fix vim GitFiles to include unstaged files
| Lua | mit | justinhoward/dotfiles,justinhoward/dotfiles | lua | ## Code Before:
local fzf_lua = require('fzf-lua')
fzf_lua.setup({
fzf_bin = 'sk',
fzf_opts = {
['--layout'] = 'default',
},
files = {
fd_opts = "--color=never --type f --hidden --no-ignore --exclude .git"
},
lsp = {
jump_to_single_result = true
}
})
vim.cmd("FzfLua register_ui_select")
## Instruction:
Fix vim GitFiles to include unstaged files
## Code After:
local fzf_lua = require('fzf-lua')
fzf_lua.setup({
fzf_bin = 'sk',
fzf_opts = {
['--layout'] = 'default',
},
files = {
fd_opts = "--color=never --type f --hidden --no-ignore --exclude .git"
},
git = {
files = {
cmd = 'git ls-files --exclude-standard --others --cached'
}
},
lsp = {
jump_to_single_result = true
}
})
vim.cmd("FzfLua register_ui_select")
| local fzf_lua = require('fzf-lua')
fzf_lua.setup({
fzf_bin = 'sk',
fzf_opts = {
['--layout'] = 'default',
},
files = {
fd_opts = "--color=never --type f --hidden --no-ignore --exclude .git"
},
+ git = {
+ files = {
+ cmd = 'git ls-files --exclude-standard --others --cached'
+ }
+ },
lsp = {
jump_to_single_result = true
}
})
vim.cmd("FzfLua register_ui_select") | 5 | 0.333333 | 5 | 0 |
5ca7960333491e174d067b053502ccc0c937a54c | scripts/create-demo-data.js | scripts/create-demo-data.js | var async = require('async')
var mongoose = require('mongoose')
var schema = require('../server/schema')
var jobs = process.argv.slice(2)
var fixtureData = readFixtureData()
mongoose.connect('mongodb://localhost/meku')
async.series([demoUsers, demoAccounts], function(err) {
mongoose.disconnect(function() {
console.log('> All done: ', err ? err : 'OK')
})
})
function readFixtureData() {
var env = process.env.NODE_ENV || 'development'
return require('./data.' + env)
}
function demoUsers(callback) {
async.forEach(fixtureData.users, function(u, callback) {
schema.User.update({username: u.username}, u, {upsert: true}, callback)
}, callback)
}
function demoAccounts(callback) {
async.each(fixtureData.accounts, function(a, callback) {
async.map(a.users, function(username, callback) {
schema.User.findOne({ username: username }, null, function(err, user) {
if (err) return callback(err)
return callback(null, {_id: user._id, name: user.username})
})
}, function(err, users) {
if (err) return callback(err)
a.users = users
new schema.Account(a).save(callback)
})
}, callback)
}
| var async = require('async')
var mongoose = require('mongoose')
var schema = require('../server/schema')
var jobs = process.argv.slice(2)
var fixtureData = readFixtureData()
mongoose.connect('mongodb://localhost/meku')
async.series([demoUsers, demoAccounts], function(err) {
mongoose.disconnect(function() {
console.log('> All done: ', err ? err : 'OK')
})
})
function readFixtureData() {
var env = process.env.NODE_ENV || 'development'
return require('./data.' + env)
}
function demoUsers(callback) {
async.forEach(fixtureData.users, function(u, callback) {
new schema.User(u).save(callback)
}, callback)
}
function demoAccounts(callback) {
async.each(fixtureData.accounts, function(a, callback) {
async.map(a.users, function(username, callback) {
schema.User.findOne({ username: username }, null, function(err, user) {
if (err) return callback(err)
return callback(null, {_id: user._id, name: user.username})
})
}, function(err, users) {
if (err) return callback(err)
a.users = users
new schema.Account(a).save(callback)
})
}, callback)
}
| Use insert for now to salt the passwords | Use insert for now to salt the passwords
| JavaScript | mit | kavi-fi/meku,kavi-fi/meku,kavi-fi/meku | javascript | ## Code Before:
var async = require('async')
var mongoose = require('mongoose')
var schema = require('../server/schema')
var jobs = process.argv.slice(2)
var fixtureData = readFixtureData()
mongoose.connect('mongodb://localhost/meku')
async.series([demoUsers, demoAccounts], function(err) {
mongoose.disconnect(function() {
console.log('> All done: ', err ? err : 'OK')
})
})
function readFixtureData() {
var env = process.env.NODE_ENV || 'development'
return require('./data.' + env)
}
function demoUsers(callback) {
async.forEach(fixtureData.users, function(u, callback) {
schema.User.update({username: u.username}, u, {upsert: true}, callback)
}, callback)
}
function demoAccounts(callback) {
async.each(fixtureData.accounts, function(a, callback) {
async.map(a.users, function(username, callback) {
schema.User.findOne({ username: username }, null, function(err, user) {
if (err) return callback(err)
return callback(null, {_id: user._id, name: user.username})
})
}, function(err, users) {
if (err) return callback(err)
a.users = users
new schema.Account(a).save(callback)
})
}, callback)
}
## Instruction:
Use insert for now to salt the passwords
## Code After:
var async = require('async')
var mongoose = require('mongoose')
var schema = require('../server/schema')
var jobs = process.argv.slice(2)
var fixtureData = readFixtureData()
mongoose.connect('mongodb://localhost/meku')
async.series([demoUsers, demoAccounts], function(err) {
mongoose.disconnect(function() {
console.log('> All done: ', err ? err : 'OK')
})
})
function readFixtureData() {
var env = process.env.NODE_ENV || 'development'
return require('./data.' + env)
}
function demoUsers(callback) {
async.forEach(fixtureData.users, function(u, callback) {
new schema.User(u).save(callback)
}, callback)
}
function demoAccounts(callback) {
async.each(fixtureData.accounts, function(a, callback) {
async.map(a.users, function(username, callback) {
schema.User.findOne({ username: username }, null, function(err, user) {
if (err) return callback(err)
return callback(null, {_id: user._id, name: user.username})
})
}, function(err, users) {
if (err) return callback(err)
a.users = users
new schema.Account(a).save(callback)
})
}, callback)
}
| var async = require('async')
var mongoose = require('mongoose')
var schema = require('../server/schema')
var jobs = process.argv.slice(2)
var fixtureData = readFixtureData()
mongoose.connect('mongodb://localhost/meku')
async.series([demoUsers, demoAccounts], function(err) {
mongoose.disconnect(function() {
console.log('> All done: ', err ? err : 'OK')
})
})
function readFixtureData() {
var env = process.env.NODE_ENV || 'development'
return require('./data.' + env)
}
function demoUsers(callback) {
async.forEach(fixtureData.users, function(u, callback) {
- schema.User.update({username: u.username}, u, {upsert: true}, callback)
+ new schema.User(u).save(callback)
}, callback)
}
function demoAccounts(callback) {
async.each(fixtureData.accounts, function(a, callback) {
async.map(a.users, function(username, callback) {
schema.User.findOne({ username: username }, null, function(err, user) {
if (err) return callback(err)
return callback(null, {_id: user._id, name: user.username})
})
}, function(err, users) {
if (err) return callback(err)
a.users = users
new schema.Account(a).save(callback)
})
}, callback)
}
| 2 | 0.04878 | 1 | 1 |
3185111d35fb5269e8da07b05df191d0b94811f8 | install_systemd.sh | install_systemd.sh | USER=`whoami`
PWD=`pwd`
FRIEND_RUN_DIRECTORY=$PWD/build
TMP=/tmp/friendcore.service
echo "Writing systemd script to temporary file $TMP"
echo '[Unit]' > $TMP
echo 'Description=Friend Core' >> $TMP
echo 'After=network.target' >> $TMP
echo '[Service]' >> $TMP
echo 'Type=simple' >> $TMP
echo "User=$USER" >> $TMP
echo "WorkingDirectory=$FRIEND_RUN_DIRECTORY" >> $TMP
echo "ExecStart=$FRIEND_RUN_DIRECTORY/FriendCore" >> $TMP
echo 'Restart=always' >> $TMP
echo 'RestartSec=3' >> $TMP
echo '[Install]' >> $TMP
echo 'WantedBy=multi-user.target' >> $TMP
echo "Copying temporary file $TMP to /etc/systemd/system"
sudo cp $TMP /etc/systemd/system/
echo ''
echo "Use standard systemd commands to control Friend Core:"
echo "systemctl start friendcore"
echo "systemctl stop friendcore"
echo "systemctl restart friendcore"
| USER=`whoami`
PWD=`pwd`
FRIEND_RUN_DIRECTORY=$PWD/build
TMP=/tmp/friendcore.service
echo "Writing systemd script to temporary file $TMP"
echo '[Unit]' > $TMP
echo 'Description=Friend Core' >> $TMP
echo 'After=network.target' >> $TMP
echo '[Service]' >> $TMP
echo 'Type=simple' >> $TMP
echo "User=$USER" >> $TMP
echo "WorkingDirectory=$FRIEND_RUN_DIRECTORY" >> $TMP
echo "ExecStart=$FRIEND_RUN_DIRECTORY/FriendCore" >> $TMP
echo 'Restart=always' >> $TMP
echo 'RestartSec=3' >> $TMP
echo 'StandardOutput=null' >> $TMP
echo '[Install]' >> $TMP
echo 'WantedBy=multi-user.target' >> $TMP
echo "Copying temporary file $TMP to /etc/systemd/system"
sudo cp $TMP /etc/systemd/system/
echo ''
echo "Use standard systemd commands to control Friend Core:"
echo "systemctl start friendcore"
echo "systemctl stop friendcore"
echo "systemctl restart friendcore"
| Remove console log output for service | Remove console log output for service
| Shell | agpl-3.0 | FriendSoftwareLabs/friendup,FriendSoftwareLabs/friendup,FriendSoftwareLabs/friendup,FriendSoftwareLabs/friendup,FriendSoftwareLabs/friendup,FriendSoftwareLabs/friendup,FriendSoftwareLabs/friendup,FriendSoftwareLabs/friendup | shell | ## Code Before:
USER=`whoami`
PWD=`pwd`
FRIEND_RUN_DIRECTORY=$PWD/build
TMP=/tmp/friendcore.service
echo "Writing systemd script to temporary file $TMP"
echo '[Unit]' > $TMP
echo 'Description=Friend Core' >> $TMP
echo 'After=network.target' >> $TMP
echo '[Service]' >> $TMP
echo 'Type=simple' >> $TMP
echo "User=$USER" >> $TMP
echo "WorkingDirectory=$FRIEND_RUN_DIRECTORY" >> $TMP
echo "ExecStart=$FRIEND_RUN_DIRECTORY/FriendCore" >> $TMP
echo 'Restart=always' >> $TMP
echo 'RestartSec=3' >> $TMP
echo '[Install]' >> $TMP
echo 'WantedBy=multi-user.target' >> $TMP
echo "Copying temporary file $TMP to /etc/systemd/system"
sudo cp $TMP /etc/systemd/system/
echo ''
echo "Use standard systemd commands to control Friend Core:"
echo "systemctl start friendcore"
echo "systemctl stop friendcore"
echo "systemctl restart friendcore"
## Instruction:
Remove console log output for service
## Code After:
USER=`whoami`
PWD=`pwd`
FRIEND_RUN_DIRECTORY=$PWD/build
TMP=/tmp/friendcore.service
echo "Writing systemd script to temporary file $TMP"
echo '[Unit]' > $TMP
echo 'Description=Friend Core' >> $TMP
echo 'After=network.target' >> $TMP
echo '[Service]' >> $TMP
echo 'Type=simple' >> $TMP
echo "User=$USER" >> $TMP
echo "WorkingDirectory=$FRIEND_RUN_DIRECTORY" >> $TMP
echo "ExecStart=$FRIEND_RUN_DIRECTORY/FriendCore" >> $TMP
echo 'Restart=always' >> $TMP
echo 'RestartSec=3' >> $TMP
echo 'StandardOutput=null' >> $TMP
echo '[Install]' >> $TMP
echo 'WantedBy=multi-user.target' >> $TMP
echo "Copying temporary file $TMP to /etc/systemd/system"
sudo cp $TMP /etc/systemd/system/
echo ''
echo "Use standard systemd commands to control Friend Core:"
echo "systemctl start friendcore"
echo "systemctl stop friendcore"
echo "systemctl restart friendcore"
| USER=`whoami`
PWD=`pwd`
FRIEND_RUN_DIRECTORY=$PWD/build
TMP=/tmp/friendcore.service
echo "Writing systemd script to temporary file $TMP"
echo '[Unit]' > $TMP
echo 'Description=Friend Core' >> $TMP
echo 'After=network.target' >> $TMP
echo '[Service]' >> $TMP
echo 'Type=simple' >> $TMP
echo "User=$USER" >> $TMP
echo "WorkingDirectory=$FRIEND_RUN_DIRECTORY" >> $TMP
echo "ExecStart=$FRIEND_RUN_DIRECTORY/FriendCore" >> $TMP
echo 'Restart=always' >> $TMP
echo 'RestartSec=3' >> $TMP
+ echo 'StandardOutput=null' >> $TMP
echo '[Install]' >> $TMP
echo 'WantedBy=multi-user.target' >> $TMP
echo "Copying temporary file $TMP to /etc/systemd/system"
sudo cp $TMP /etc/systemd/system/
echo ''
echo "Use standard systemd commands to control Friend Core:"
echo "systemctl start friendcore"
echo "systemctl stop friendcore"
echo "systemctl restart friendcore" | 1 | 0.033333 | 1 | 0 |
9c65c5b741b341fa0a689e91a0cc4ff15d8e53a6 | scripts/marksession.awk | scripts/marksession.awk | BEGIN {
session_count = 0;
FS="|"
OFS="|"
}
{
if ($3 ~ "[0-9]+") {
# See if the current line is already in the table
frame_file = destDir "/frames/Frame"$3".html"
session_line = ""
"grep -i \"" session_token "\" " frame_file | getline session_line
if (session_line == "" ) {
$6 = "{0}"
print $0
} else {
found = 0;
split(session_line, array, " ")
session = array[2]
for (i=0; i < session_count; i++) {
if (sessions[i] == session) {
found = 1
$6 = "{" i+1 "}"
print $0
break
}
}
if (found == 0) {
$6 = "{" session_count+1 "}"
sessions[session_count++] = session
print $0
s = sprintf("echo '%2d: new session in frame %4s: %s' >&2", session_count, $3, session)
system(s)
}
}
} else {
# Comment line, line starting with "#".
# Requires no processing, just print it
print $0
}
}
| BEGIN {
session_count = 0;
FS="|"
OFS="|"
}
{
if ($3 ~ "[0-9]+") {
# See if the current line is already in the table
frame_file = destDir "/frames/Frame"$3".html"
session_line = ""
"grep -i \"" session_token "\" " frame_file | getline session_line
close(grep)
if (session_line == "" ) {
$6 = "{0}"
print $0
} else {
found = 0;
split(session_line, array, " ")
session = array[2]
for (i=0; i < session_count; i++) {
if (sessions[i] == session) {
found = 1
$6 = "{" i+1 "}"
print $0
break
}
}
if (found == 0) {
$6 = "{" session_count+1 "}"
sessions[session_count++] = session
print $0
s = sprintf("echo '%2d: new session in frame %4s: %s' >&2", session_count, $3, session)
system(s)
}
}
} else {
# Comment line, line starting with "#".
# Requires no processing, just print it
print $0
}
}
| Add a close command to avoid too many files opened problems (encountered with large libpcap file) | Add a close command to avoid too many files opened problems (encountered with large libpcap file)
git-svn-id: 392d0e5ce652024192c571322d40dcc23d6d83b0@118 8a65f31f-a56f-4bd6-98e8-2755f64920ec
| Awk | bsd-3-clause | pol51/callflow,pol51/callflow | awk | ## Code Before:
BEGIN {
session_count = 0;
FS="|"
OFS="|"
}
{
if ($3 ~ "[0-9]+") {
# See if the current line is already in the table
frame_file = destDir "/frames/Frame"$3".html"
session_line = ""
"grep -i \"" session_token "\" " frame_file | getline session_line
if (session_line == "" ) {
$6 = "{0}"
print $0
} else {
found = 0;
split(session_line, array, " ")
session = array[2]
for (i=0; i < session_count; i++) {
if (sessions[i] == session) {
found = 1
$6 = "{" i+1 "}"
print $0
break
}
}
if (found == 0) {
$6 = "{" session_count+1 "}"
sessions[session_count++] = session
print $0
s = sprintf("echo '%2d: new session in frame %4s: %s' >&2", session_count, $3, session)
system(s)
}
}
} else {
# Comment line, line starting with "#".
# Requires no processing, just print it
print $0
}
}
## Instruction:
Add a close command to avoid too many files opened problems (encountered with large libpcap file)
git-svn-id: 392d0e5ce652024192c571322d40dcc23d6d83b0@118 8a65f31f-a56f-4bd6-98e8-2755f64920ec
## Code After:
BEGIN {
session_count = 0;
FS="|"
OFS="|"
}
{
if ($3 ~ "[0-9]+") {
# See if the current line is already in the table
frame_file = destDir "/frames/Frame"$3".html"
session_line = ""
"grep -i \"" session_token "\" " frame_file | getline session_line
close(grep)
if (session_line == "" ) {
$6 = "{0}"
print $0
} else {
found = 0;
split(session_line, array, " ")
session = array[2]
for (i=0; i < session_count; i++) {
if (sessions[i] == session) {
found = 1
$6 = "{" i+1 "}"
print $0
break
}
}
if (found == 0) {
$6 = "{" session_count+1 "}"
sessions[session_count++] = session
print $0
s = sprintf("echo '%2d: new session in frame %4s: %s' >&2", session_count, $3, session)
system(s)
}
}
} else {
# Comment line, line starting with "#".
# Requires no processing, just print it
print $0
}
}
| BEGIN {
session_count = 0;
FS="|"
OFS="|"
}
{
if ($3 ~ "[0-9]+") {
# See if the current line is already in the table
frame_file = destDir "/frames/Frame"$3".html"
session_line = ""
"grep -i \"" session_token "\" " frame_file | getline session_line
+ close(grep)
if (session_line == "" ) {
$6 = "{0}"
print $0
} else {
found = 0;
split(session_line, array, " ")
session = array[2]
for (i=0; i < session_count; i++) {
if (sessions[i] == session) {
found = 1
$6 = "{" i+1 "}"
print $0
break
}
}
if (found == 0) {
$6 = "{" session_count+1 "}"
sessions[session_count++] = session
print $0
s = sprintf("echo '%2d: new session in frame %4s: %s' >&2", session_count, $3, session)
system(s)
}
}
} else {
# Comment line, line starting with "#".
# Requires no processing, just print it
print $0
}
}
| 1 | 0.021739 | 1 | 0 |
5228f6405c60acd865927241f138f1ecb16a60b4 | support/bees-ci-build.sh | support/bees-ci-build.sh |
set -e
DIR=$( cd "$( dirname "$0" )" && pwd )
function mark {
echo
echo "=============================================="
echo $1
date
echo "=============================================="
echo
}
mark "Starting build script"
java -version
mvn -version
git clean -fd
mark "Cleaning"
mvn -B clean
mark "Reversioning"
mvn -B versions:set -DnewVersion=1.x.incremental.${BUILD_NUMBER}
mark "Building"
mvn -B -s ${SETTINGS_FILE} -Pbees install deploy
|
set -e
DIR=$( cd "$( dirname "$0" )" && pwd )
function mark {
echo
echo "=============================================="
echo $1
date
echo "=============================================="
echo
}
export MAVEN_OPTS="-Xmx1024m -XX:MaxPermSize=256m"
mark "Starting build script"
java -version
mvn -version
git clean -fd
mark "Cleaning"
mvn -B clean
mark "Reversioning"
mvn -B versions:set -DnewVersion=1.x.incremental.${BUILD_NUMBER}
mark "Building"
mvn -B -s ${SETTINGS_FILE} -Pbees install deploy
| Increase permgen for maven in ci build. | Increase permgen for maven in ci build.
| Shell | apache-2.0 | projectodd/wunderboss-release,projectodd/wunderboss,projectodd/wunderboss,projectodd/wunderboss-release,projectodd/wunderboss,projectodd/wunderboss-release | shell | ## Code Before:
set -e
DIR=$( cd "$( dirname "$0" )" && pwd )
function mark {
echo
echo "=============================================="
echo $1
date
echo "=============================================="
echo
}
mark "Starting build script"
java -version
mvn -version
git clean -fd
mark "Cleaning"
mvn -B clean
mark "Reversioning"
mvn -B versions:set -DnewVersion=1.x.incremental.${BUILD_NUMBER}
mark "Building"
mvn -B -s ${SETTINGS_FILE} -Pbees install deploy
## Instruction:
Increase permgen for maven in ci build.
## Code After:
set -e
DIR=$( cd "$( dirname "$0" )" && pwd )
function mark {
echo
echo "=============================================="
echo $1
date
echo "=============================================="
echo
}
export MAVEN_OPTS="-Xmx1024m -XX:MaxPermSize=256m"
mark "Starting build script"
java -version
mvn -version
git clean -fd
mark "Cleaning"
mvn -B clean
mark "Reversioning"
mvn -B versions:set -DnewVersion=1.x.incremental.${BUILD_NUMBER}
mark "Building"
mvn -B -s ${SETTINGS_FILE} -Pbees install deploy
|
set -e
DIR=$( cd "$( dirname "$0" )" && pwd )
function mark {
echo
echo "=============================================="
echo $1
date
echo "=============================================="
echo
}
+ export MAVEN_OPTS="-Xmx1024m -XX:MaxPermSize=256m"
+
mark "Starting build script"
java -version
mvn -version
git clean -fd
mark "Cleaning"
mvn -B clean
mark "Reversioning"
mvn -B versions:set -DnewVersion=1.x.incremental.${BUILD_NUMBER}
mark "Building"
mvn -B -s ${SETTINGS_FILE} -Pbees install deploy | 2 | 0.074074 | 2 | 0 |
b6d99b690012c66698e0e5c3228ac6725b97d61f | scripts/install_golang_and_deps_in_ubuntu.bash | scripts/install_golang_and_deps_in_ubuntu.bash |
GOVER=1.12
GOFN=go$GOVER.linux-amd64
# deps
echo "... installing deps ..."
sudo apt-get -y install wget git gcc \
libopenmpi-dev libhwloc-dev libsuitesparse-dev libmumps-dev \
gfortran python-scipy python-matplotlib dvipng \
libfftw3-dev libfftw3-mpi-dev libmetis-dev \
liblapacke-dev libopenblas-dev libhdf5-dev
# vtk
if [[ ! -z "$USE_VTK" ]]; then
echo "... installing VTK ..."
sudo apt-get -y install libvtk7-dev
fi
# go
mkdir -p ~/xpkg
cd ~/xpkg
rm -rf go
wget https://dl.google.com/go/$GOFN.tar.gz -O ~/xpkg/$GOFN.tar.gz
tar xf $GOFN.tar.gz
go get -u all
# output
echo
echo "go version"
go version
|
GOVER=1.12.7
GOFN=go$GOVER.linux-amd64
USE_VTK=1
# deps
echo "... installing deps ..."
sudo apt-get -y install wget git gcc \
libopenmpi-dev libhwloc-dev libsuitesparse-dev libmumps-dev \
gfortran python-scipy python-matplotlib dvipng \
libfftw3-dev libfftw3-mpi-dev libmetis-dev \
liblapacke-dev libopenblas-dev libhdf5-dev
# vtk
if [[ ! -z "$USE_VTK" ]]; then
echo "... installing VTK ..."
sudo apt-get -y install libvtk7-dev
fi
# go
mkdir -p ~/xpkg
cd ~/xpkg
rm -rf go
wget https://dl.google.com/go/$GOFN.tar.gz -O ~/xpkg/$GOFN.tar.gz
tar xf $GOFN.tar.gz
go get -u all
# output
echo
echo "go version"
go version
| Update script to install deps on Ubuntu | Update script to install deps on Ubuntu
| Shell | bsd-3-clause | cpmech/gosl,cpmech/gosl,cpmech/gosl,cpmech/gosl,cpmech/gosl | shell | ## Code Before:
GOVER=1.12
GOFN=go$GOVER.linux-amd64
# deps
echo "... installing deps ..."
sudo apt-get -y install wget git gcc \
libopenmpi-dev libhwloc-dev libsuitesparse-dev libmumps-dev \
gfortran python-scipy python-matplotlib dvipng \
libfftw3-dev libfftw3-mpi-dev libmetis-dev \
liblapacke-dev libopenblas-dev libhdf5-dev
# vtk
if [[ ! -z "$USE_VTK" ]]; then
echo "... installing VTK ..."
sudo apt-get -y install libvtk7-dev
fi
# go
mkdir -p ~/xpkg
cd ~/xpkg
rm -rf go
wget https://dl.google.com/go/$GOFN.tar.gz -O ~/xpkg/$GOFN.tar.gz
tar xf $GOFN.tar.gz
go get -u all
# output
echo
echo "go version"
go version
## Instruction:
Update script to install deps on Ubuntu
## Code After:
GOVER=1.12.7
GOFN=go$GOVER.linux-amd64
USE_VTK=1
# deps
echo "... installing deps ..."
sudo apt-get -y install wget git gcc \
libopenmpi-dev libhwloc-dev libsuitesparse-dev libmumps-dev \
gfortran python-scipy python-matplotlib dvipng \
libfftw3-dev libfftw3-mpi-dev libmetis-dev \
liblapacke-dev libopenblas-dev libhdf5-dev
# vtk
if [[ ! -z "$USE_VTK" ]]; then
echo "... installing VTK ..."
sudo apt-get -y install libvtk7-dev
fi
# go
mkdir -p ~/xpkg
cd ~/xpkg
rm -rf go
wget https://dl.google.com/go/$GOFN.tar.gz -O ~/xpkg/$GOFN.tar.gz
tar xf $GOFN.tar.gz
go get -u all
# output
echo
echo "go version"
go version
|
- GOVER=1.12
+ GOVER=1.12.7
? ++
GOFN=go$GOVER.linux-amd64
+ USE_VTK=1
# deps
echo "... installing deps ..."
sudo apt-get -y install wget git gcc \
libopenmpi-dev libhwloc-dev libsuitesparse-dev libmumps-dev \
gfortran python-scipy python-matplotlib dvipng \
libfftw3-dev libfftw3-mpi-dev libmetis-dev \
liblapacke-dev libopenblas-dev libhdf5-dev
# vtk
if [[ ! -z "$USE_VTK" ]]; then
echo "... installing VTK ..."
sudo apt-get -y install libvtk7-dev
fi
# go
mkdir -p ~/xpkg
cd ~/xpkg
rm -rf go
wget https://dl.google.com/go/$GOFN.tar.gz -O ~/xpkg/$GOFN.tar.gz
tar xf $GOFN.tar.gz
go get -u all
# output
echo
echo "go version"
go version | 3 | 0.1 | 2 | 1 |
bc411a7069386196abc6de6ae2314182efbda048 | avalonstar/apps/subscribers/admin.py | avalonstar/apps/subscribers/admin.py | from django.contrib import admin
from .models import Ticket
class TicketAdmin(admin.ModelAdmin):
list_display = ['name', 'display_name', 'created', 'updated', 'is_active', 'is_paid', 'twid']
list_editable = ['created', 'updated', 'is_active', 'is_paid']
ordering = ['-updated']
admin.site.register(Ticket, TicketAdmin)
| from django.contrib import admin
from .models import Ticket
class TicketAdmin(admin.ModelAdmin):
list_display = ['name', 'display_name', 'created', 'updated', 'streak', 'is_active', 'is_paid', 'twid']
list_editable = ['is_active', 'is_paid']
ordering = ['-updated']
admin.site.register(Ticket, TicketAdmin)
| Add streak to list_display, remove created and updated from list_editable. | Add streak to list_display, remove created and updated from list_editable.
| Python | apache-2.0 | bryanveloso/avalonstar-tv,bryanveloso/avalonstar-tv,bryanveloso/avalonstar-tv | python | ## Code Before:
from django.contrib import admin
from .models import Ticket
class TicketAdmin(admin.ModelAdmin):
list_display = ['name', 'display_name', 'created', 'updated', 'is_active', 'is_paid', 'twid']
list_editable = ['created', 'updated', 'is_active', 'is_paid']
ordering = ['-updated']
admin.site.register(Ticket, TicketAdmin)
## Instruction:
Add streak to list_display, remove created and updated from list_editable.
## Code After:
from django.contrib import admin
from .models import Ticket
class TicketAdmin(admin.ModelAdmin):
list_display = ['name', 'display_name', 'created', 'updated', 'streak', 'is_active', 'is_paid', 'twid']
list_editable = ['is_active', 'is_paid']
ordering = ['-updated']
admin.site.register(Ticket, TicketAdmin)
| from django.contrib import admin
from .models import Ticket
class TicketAdmin(admin.ModelAdmin):
- list_display = ['name', 'display_name', 'created', 'updated', 'is_active', 'is_paid', 'twid']
+ list_display = ['name', 'display_name', 'created', 'updated', 'streak', 'is_active', 'is_paid', 'twid']
? ++++++++++
- list_editable = ['created', 'updated', 'is_active', 'is_paid']
? ----------------------
+ list_editable = ['is_active', 'is_paid']
ordering = ['-updated']
admin.site.register(Ticket, TicketAdmin) | 4 | 0.4 | 2 | 2 |
bb0c0b8857923370e28146c619fcf3a81d7688cb | project-templates/ActivityPanels/ActivityPanels.json | project-templates/ActivityPanels/ActivityPanels.json | {
"source": [
{
"id": "bootplate-moonstone-ActivityPanels",
"files": [
{
"url": "templates/bootplate-moonstone.zip",
"alternateUrl": "http://nebula.lgsvl.com/templates/bootplate-moonstone.zip",
"prefixToRemove": "bootplate"
},
{
"url": "webos-app-config.zip",
"alternateUrl": "http://enyojs.com/webos/webos-app-config.zip"
},
{
"url": "templates/template-ActivityPanels.zip",
"alternateUrl": "http://nebula.lgsvl.com/templates/template-ActivityPanels.zip"
}
],
"description": "Moonstone ActivityPanels"
}
]
}
| {
"source": [
{
"id": "bootplate-moonstone-ActivityPanels",
"files": [
{
"url": "templates/bootplate-moonstone.zip",
"alternateUrl": "http://nebula.lgsvl.com/enyojs/templates/bootplate-moonstone.zip",
"prefixToRemove": "bootplate"
},
{
"url": "webos-app-config.zip",
"alternateUrl": "http://enyojs.com/webos/webos-app-config.zip"
},
{
"url": "templates/template-ActivityPanels.zip",
"alternateUrl": "http://nebula.lgsvl.com/enyojs/templates/template-ActivityPanels.zip"
}
],
"description": "Moonstone ActivityPanels"
}
]
}
| Fix template URLs on Nebula | Fix template URLs on Nebula
alternateURL entries were missing part of the path (specifically the "enyojs/" part). | JSON | apache-2.0 | mcanthony/moonstone,mcanthony/moonstone,mcanthony/moonstone,enyojs/moonstone | json | ## Code Before:
{
"source": [
{
"id": "bootplate-moonstone-ActivityPanels",
"files": [
{
"url": "templates/bootplate-moonstone.zip",
"alternateUrl": "http://nebula.lgsvl.com/templates/bootplate-moonstone.zip",
"prefixToRemove": "bootplate"
},
{
"url": "webos-app-config.zip",
"alternateUrl": "http://enyojs.com/webos/webos-app-config.zip"
},
{
"url": "templates/template-ActivityPanels.zip",
"alternateUrl": "http://nebula.lgsvl.com/templates/template-ActivityPanels.zip"
}
],
"description": "Moonstone ActivityPanels"
}
]
}
## Instruction:
Fix template URLs on Nebula
alternateURL entries were missing part of the path (specifically the "enyojs/" part).
## Code After:
{
"source": [
{
"id": "bootplate-moonstone-ActivityPanels",
"files": [
{
"url": "templates/bootplate-moonstone.zip",
"alternateUrl": "http://nebula.lgsvl.com/enyojs/templates/bootplate-moonstone.zip",
"prefixToRemove": "bootplate"
},
{
"url": "webos-app-config.zip",
"alternateUrl": "http://enyojs.com/webos/webos-app-config.zip"
},
{
"url": "templates/template-ActivityPanels.zip",
"alternateUrl": "http://nebula.lgsvl.com/enyojs/templates/template-ActivityPanels.zip"
}
],
"description": "Moonstone ActivityPanels"
}
]
}
| {
"source": [
{
"id": "bootplate-moonstone-ActivityPanels",
"files": [
{
"url": "templates/bootplate-moonstone.zip",
- "alternateUrl": "http://nebula.lgsvl.com/templates/bootplate-moonstone.zip",
+ "alternateUrl": "http://nebula.lgsvl.com/enyojs/templates/bootplate-moonstone.zip",
? +++++++
"prefixToRemove": "bootplate"
},
{
"url": "webos-app-config.zip",
"alternateUrl": "http://enyojs.com/webos/webos-app-config.zip"
},
{
"url": "templates/template-ActivityPanels.zip",
- "alternateUrl": "http://nebula.lgsvl.com/templates/template-ActivityPanels.zip"
+ "alternateUrl": "http://nebula.lgsvl.com/enyojs/templates/template-ActivityPanels.zip"
? +++++++
}
],
"description": "Moonstone ActivityPanels"
}
]
} | 4 | 0.173913 | 2 | 2 |
5d0c47b592ae4794f8be5bba21deb60d2294c62f | README.md | README.md | Karibu
===============
*Welcoming any data, in any format, in any version, at any time...*
Karibu is a high quality data collection framework aiming at data
integrity, flexibility, and scalability. It is developed for
environmental data collection from smartphone apps as well as
stationary sensors, and presently used as the backbone for several
research projects on-going at Computer Science, University of Aarhus.
Karibu consists of a client library that can be deployed on a Java
enabled device (Android phones for instance), and a server side daemon
responsible for storing incoming data. In addition, a Karibu system
must have a messaging system (RabbitMQ) and a database (MongoDB)
deployed.
Getting Started
----
To get started on the tutorials, you will need Java 1.7+, Ant 1.8+,
Ivy 2.4+, and to simulate the distributed environment using the
provided virtual machines you will need VMWare Player or similar.
Learning to use Karibu
---
The [Hello World](helloworld.md) tutorial takes you through the steps
of adapting Karibu for your particular domain and type of data
collection.
The [Quick Start](quickstart.md) tutorial focuses on setting up a
simulated environment that contains the core aspects of a full
production systems.
| Karibu
===============
*Welcoming any data, in any format, in any version, at any time...*
Karibu is a high quality data collection framework aiming at data
integrity, flexibility, and scalability. It is developed for
environmental data collection from smartphone apps as well as
stationary sensors, and presently used as the backbone for several
research projects on-going at Computer Science, University of Aarhus.
Karibu consists of a client library that can be deployed on a Java
enabled device (Android phones for instance), and a server side daemon
responsible for storing incoming data. In addition, a Karibu system
must have a messaging system (RabbitMQ) and a database (MongoDB)
deployed.
Getting Started
----
To get started on the tutorials, you will need Java 1.7+, Ant 1.8+,
Ivy 2.4+, and to simulate the distributed environment using the
provided virtual machines you will need a way to run VMWare virtual
machines, such as
[VMWare Player](http://www.vmware.com/go/downloadplayer/) for Windows
and Linux, or
[VMWare Fusion](http://www.vmware.com/products/fusion/) for OS X.
Learning to use Karibu
---
The [Hello World](helloworld.md) tutorial takes you through the steps
of adapting Karibu for your particular domain and type of data
collection.
The [Quick Start](quickstart.md) tutorial focuses on setting up a
simulated environment that contains the core aspects of a full
production systems.
| Add links to VMWare players | Add links to VMWare players
| Markdown | apache-2.0 | ecosense-au-dk/karibu-tutorial | markdown | ## Code Before:
Karibu
===============
*Welcoming any data, in any format, in any version, at any time...*
Karibu is a high quality data collection framework aiming at data
integrity, flexibility, and scalability. It is developed for
environmental data collection from smartphone apps as well as
stationary sensors, and presently used as the backbone for several
research projects on-going at Computer Science, University of Aarhus.
Karibu consists of a client library that can be deployed on a Java
enabled device (Android phones for instance), and a server side daemon
responsible for storing incoming data. In addition, a Karibu system
must have a messaging system (RabbitMQ) and a database (MongoDB)
deployed.
Getting Started
----
To get started on the tutorials, you will need Java 1.7+, Ant 1.8+,
Ivy 2.4+, and to simulate the distributed environment using the
provided virtual machines you will need VMWare Player or similar.
Learning to use Karibu
---
The [Hello World](helloworld.md) tutorial takes you through the steps
of adapting Karibu for your particular domain and type of data
collection.
The [Quick Start](quickstart.md) tutorial focuses on setting up a
simulated environment that contains the core aspects of a full
production systems.
## Instruction:
Add links to VMWare players
## Code After:
Karibu
===============
*Welcoming any data, in any format, in any version, at any time...*
Karibu is a high quality data collection framework aiming at data
integrity, flexibility, and scalability. It is developed for
environmental data collection from smartphone apps as well as
stationary sensors, and presently used as the backbone for several
research projects on-going at Computer Science, University of Aarhus.
Karibu consists of a client library that can be deployed on a Java
enabled device (Android phones for instance), and a server side daemon
responsible for storing incoming data. In addition, a Karibu system
must have a messaging system (RabbitMQ) and a database (MongoDB)
deployed.
Getting Started
----
To get started on the tutorials, you will need Java 1.7+, Ant 1.8+,
Ivy 2.4+, and to simulate the distributed environment using the
provided virtual machines you will need a way to run VMWare virtual
machines, such as
[VMWare Player](http://www.vmware.com/go/downloadplayer/) for Windows
and Linux, or
[VMWare Fusion](http://www.vmware.com/products/fusion/) for OS X.
Learning to use Karibu
---
The [Hello World](helloworld.md) tutorial takes you through the steps
of adapting Karibu for your particular domain and type of data
collection.
The [Quick Start](quickstart.md) tutorial focuses on setting up a
simulated environment that contains the core aspects of a full
production systems.
| Karibu
===============
*Welcoming any data, in any format, in any version, at any time...*
Karibu is a high quality data collection framework aiming at data
integrity, flexibility, and scalability. It is developed for
environmental data collection from smartphone apps as well as
stationary sensors, and presently used as the backbone for several
research projects on-going at Computer Science, University of Aarhus.
Karibu consists of a client library that can be deployed on a Java
enabled device (Android phones for instance), and a server side daemon
responsible for storing incoming data. In addition, a Karibu system
must have a messaging system (RabbitMQ) and a database (MongoDB)
deployed.
Getting Started
----
To get started on the tutorials, you will need Java 1.7+, Ant 1.8+,
Ivy 2.4+, and to simulate the distributed environment using the
- provided virtual machines you will need VMWare Player or similar.
+ provided virtual machines you will need a way to run VMWare virtual
+ machines, such as
+ [VMWare Player](http://www.vmware.com/go/downloadplayer/) for Windows
+ and Linux, or
+ [VMWare Fusion](http://www.vmware.com/products/fusion/) for OS X.
Learning to use Karibu
---
The [Hello World](helloworld.md) tutorial takes you through the steps
of adapting Karibu for your particular domain and type of data
collection.
The [Quick Start](quickstart.md) tutorial focuses on setting up a
simulated environment that contains the core aspects of a full
production systems.
| 6 | 0.166667 | 5 | 1 |
f2dbe673756302d5f5824fd8d0e6e3b3eb45a57b | test/files/run/t3613.scala | test/files/run/t3613.scala | class Boopy {
private val s = new Schnuck
def observer : PartialFunction[ Any, Unit ] = s.observer
private class Schnuck extends javax.swing.AbstractListModel {
model =>
val observer : PartialFunction[ Any, Unit ] = {
case "Boopy" => fireIntervalAdded( model, 0, 1 )
}
def getSize = 0
def getElementAt( idx: Int ) : AnyRef = "egal"
}
}
object Test {
def main(args: Array[String]): Unit = {
val x = new Boopy
val o = x.observer
o( "Boopy" ) // --> throws runtime error
}
}
| class Boopy {
private val s = new Schnuck
def observer : PartialFunction[ Any, Unit ] = s.observer
private class Schnuck extends javax.swing.AbstractListModel {
model =>
val observer : PartialFunction[ Any, Unit ] = {
case "Boopy" => fireIntervalAdded( model, 0, 1 )
}
def getSize = 0
def getElementAt( idx: Int ) = ???
}
}
object Test {
def main(args: Array[String]): Unit = {
val x = new Boopy
val o = x.observer
o( "Boopy" ) // --> throws runtime error
}
}
| Tweak test to pass under java 7. | Tweak test to pass under java 7.
| Scala | apache-2.0 | martijnhoekstra/scala,jvican/scala,lrytz/scala,felixmulder/scala,slothspot/scala,slothspot/scala,lrytz/scala,jvican/scala,slothspot/scala,martijnhoekstra/scala,jvican/scala,shimib/scala,martijnhoekstra/scala,lrytz/scala,jvican/scala,shimib/scala,shimib/scala,scala/scala,lrytz/scala,jvican/scala,scala/scala,felixmulder/scala,shimib/scala,jvican/scala,scala/scala,slothspot/scala,shimib/scala,martijnhoekstra/scala,felixmulder/scala,felixmulder/scala,shimib/scala,felixmulder/scala,felixmulder/scala,scala/scala,felixmulder/scala,scala/scala,scala/scala,lrytz/scala,martijnhoekstra/scala,jvican/scala,lrytz/scala,martijnhoekstra/scala,slothspot/scala,slothspot/scala,slothspot/scala | scala | ## Code Before:
class Boopy {
private val s = new Schnuck
def observer : PartialFunction[ Any, Unit ] = s.observer
private class Schnuck extends javax.swing.AbstractListModel {
model =>
val observer : PartialFunction[ Any, Unit ] = {
case "Boopy" => fireIntervalAdded( model, 0, 1 )
}
def getSize = 0
def getElementAt( idx: Int ) : AnyRef = "egal"
}
}
object Test {
def main(args: Array[String]): Unit = {
val x = new Boopy
val o = x.observer
o( "Boopy" ) // --> throws runtime error
}
}
## Instruction:
Tweak test to pass under java 7.
## Code After:
class Boopy {
private val s = new Schnuck
def observer : PartialFunction[ Any, Unit ] = s.observer
private class Schnuck extends javax.swing.AbstractListModel {
model =>
val observer : PartialFunction[ Any, Unit ] = {
case "Boopy" => fireIntervalAdded( model, 0, 1 )
}
def getSize = 0
def getElementAt( idx: Int ) = ???
}
}
object Test {
def main(args: Array[String]): Unit = {
val x = new Boopy
val o = x.observer
o( "Boopy" ) // --> throws runtime error
}
}
| class Boopy {
private val s = new Schnuck
def observer : PartialFunction[ Any, Unit ] = s.observer
private class Schnuck extends javax.swing.AbstractListModel {
model =>
val observer : PartialFunction[ Any, Unit ] = {
case "Boopy" => fireIntervalAdded( model, 0, 1 )
}
def getSize = 0
- def getElementAt( idx: Int ) : AnyRef = "egal"
? --------- ^^^^^^
+ def getElementAt( idx: Int ) = ???
? ^^^
}
}
object Test {
def main(args: Array[String]): Unit = {
val x = new Boopy
val o = x.observer
o( "Boopy" ) // --> throws runtime error
}
} | 2 | 0.090909 | 1 | 1 |
e29b082d9f32046adf3e2dd3260a37659ed27c15 | phpunit.xml.dist | phpunit.xml.dist | <phpunit
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/4.3/phpunit.xsd"
backupGlobals="true"
backupStaticAttributes="false"
bootstrap="tests/bootstrap.php"
colors="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
forceCoversAnnotation="true"
beStrictAboutTestsThatDoNotTestAnything="true"
beStrictAboutOutputDuringTests="true"
beStrictAboutTestSize="true"
timeoutForSmallTests="1"
timeoutForMediumTests="10"
timeoutForLargeTests="60"
strict="false"
verbose="false">
<testsuites>
<testsuite name="EstatyTestSuite">
<directory>tests</directory>
</testsuite>
</testsuites>
<filter>
<whitelist processUncoveredFilesFromWhitelist="true">
<directory suffix=".php">src</directory>
</whitelist>
</filter>
</phpunit>
| <phpunit
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/4.3/phpunit.xsd"
backupGlobals="true"
backupStaticAttributes="false"
bootstrap="tests/bootstrap.php"
colors="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
forceCoversAnnotation="true"
beStrictAboutTestsThatDoNotTestAnything="true"
beStrictAboutOutputDuringTests="true"
beStrictAboutTestSize="true"
timeoutForSmallTests="1"
timeoutForMediumTests="10"
timeoutForLargeTests="60"
strict="false"
verbose="false">
<testsuites>
<testsuite name="EstatyTestSuite">
<directory>tests</directory>
</testsuite>
</testsuites>
<filter>
<whitelist processUncoveredFilesFromWhitelist="true">
<directory suffix=".php">src</directory>
<exclude>
<file>src/app.php</file>
<file>src/controllers.php</file>
</exclude>
</whitelist>
</filter>
</phpunit>
| Exclude app.php and controllers.php from code coverage | Exclude app.php and controllers.php from code coverage
| unknown | mit | estaty/estaty,estaty/estaty | unknown | ## Code Before:
<phpunit
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/4.3/phpunit.xsd"
backupGlobals="true"
backupStaticAttributes="false"
bootstrap="tests/bootstrap.php"
colors="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
forceCoversAnnotation="true"
beStrictAboutTestsThatDoNotTestAnything="true"
beStrictAboutOutputDuringTests="true"
beStrictAboutTestSize="true"
timeoutForSmallTests="1"
timeoutForMediumTests="10"
timeoutForLargeTests="60"
strict="false"
verbose="false">
<testsuites>
<testsuite name="EstatyTestSuite">
<directory>tests</directory>
</testsuite>
</testsuites>
<filter>
<whitelist processUncoveredFilesFromWhitelist="true">
<directory suffix=".php">src</directory>
</whitelist>
</filter>
</phpunit>
## Instruction:
Exclude app.php and controllers.php from code coverage
## Code After:
<phpunit
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/4.3/phpunit.xsd"
backupGlobals="true"
backupStaticAttributes="false"
bootstrap="tests/bootstrap.php"
colors="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
forceCoversAnnotation="true"
beStrictAboutTestsThatDoNotTestAnything="true"
beStrictAboutOutputDuringTests="true"
beStrictAboutTestSize="true"
timeoutForSmallTests="1"
timeoutForMediumTests="10"
timeoutForLargeTests="60"
strict="false"
verbose="false">
<testsuites>
<testsuite name="EstatyTestSuite">
<directory>tests</directory>
</testsuite>
</testsuites>
<filter>
<whitelist processUncoveredFilesFromWhitelist="true">
<directory suffix=".php">src</directory>
<exclude>
<file>src/app.php</file>
<file>src/controllers.php</file>
</exclude>
</whitelist>
</filter>
</phpunit>
| <phpunit
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/4.3/phpunit.xsd"
backupGlobals="true"
backupStaticAttributes="false"
bootstrap="tests/bootstrap.php"
colors="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
forceCoversAnnotation="true"
beStrictAboutTestsThatDoNotTestAnything="true"
beStrictAboutOutputDuringTests="true"
beStrictAboutTestSize="true"
timeoutForSmallTests="1"
timeoutForMediumTests="10"
timeoutForLargeTests="60"
strict="false"
verbose="false">
<testsuites>
<testsuite name="EstatyTestSuite">
<directory>tests</directory>
</testsuite>
</testsuites>
<filter>
<whitelist processUncoveredFilesFromWhitelist="true">
<directory suffix=".php">src</directory>
+ <exclude>
+ <file>src/app.php</file>
+ <file>src/controllers.php</file>
+ </exclude>
</whitelist>
</filter>
</phpunit> | 4 | 0.133333 | 4 | 0 |
8ea3350c6944946b60732308c912dc240952237c | project/settings_production.py | project/settings_production.py | from .settings import *
# Update SITE infos to use the common port 80 to publish the webapp
SITE_FIXED = {
'name': "Recalbox Manager",
'ip': None, # If 'None' find the ip automatically. Use a string to define another ip/hostname
'port': None, # If 'None' no port is added to hostname, so the server have to be reachable from port 80
}
# Production path to the Recalbox logs file
RECALBOX_LOGFILE_PATH = "/recalbox/share/system/logs"
# Use packaged assets
ASSETS_PACKAGED = True
| from .settings import *
# Update SITE infos to use the common port 80 to publish the webapp
SITE_FIXED = {
'name': "Recalbox Manager",
'ip': None, # If 'None' find the ip automatically. Use a string to define another ip/hostname
'port': None, # If 'None' no port is added to hostname, so the server have to be reachable from port 80
}
# Production path to the Recalbox logs file
RECALBOX_LOGFILE_PATH = "/root/recalbox.log"
# Use packaged assets
ASSETS_PACKAGED = True
| Revert "Set the right recalbox.log path" | Revert "Set the right recalbox.log path"
| Python | mit | recalbox/recalbox-manager,recalbox/recalbox-manager,recalbox/recalbox-manager,sveetch/recalbox-manager,sveetch/recalbox-manager,sveetch/recalbox-manager,sveetch/recalbox-manager,recalbox/recalbox-manager,sveetch/recalbox-manager,recalbox/recalbox-manager | python | ## Code Before:
from .settings import *
# Update SITE infos to use the common port 80 to publish the webapp
SITE_FIXED = {
'name': "Recalbox Manager",
'ip': None, # If 'None' find the ip automatically. Use a string to define another ip/hostname
'port': None, # If 'None' no port is added to hostname, so the server have to be reachable from port 80
}
# Production path to the Recalbox logs file
RECALBOX_LOGFILE_PATH = "/recalbox/share/system/logs"
# Use packaged assets
ASSETS_PACKAGED = True
## Instruction:
Revert "Set the right recalbox.log path"
## Code After:
from .settings import *
# Update SITE infos to use the common port 80 to publish the webapp
SITE_FIXED = {
'name': "Recalbox Manager",
'ip': None, # If 'None' find the ip automatically. Use a string to define another ip/hostname
'port': None, # If 'None' no port is added to hostname, so the server have to be reachable from port 80
}
# Production path to the Recalbox logs file
RECALBOX_LOGFILE_PATH = "/root/recalbox.log"
# Use packaged assets
ASSETS_PACKAGED = True
| from .settings import *
# Update SITE infos to use the common port 80 to publish the webapp
SITE_FIXED = {
'name': "Recalbox Manager",
'ip': None, # If 'None' find the ip automatically. Use a string to define another ip/hostname
'port': None, # If 'None' no port is added to hostname, so the server have to be reachable from port 80
}
# Production path to the Recalbox logs file
- RECALBOX_LOGFILE_PATH = "/recalbox/share/system/logs"
? ^^^^^^^^^^^^^^ -
+ RECALBOX_LOGFILE_PATH = "/root/recalbox.log"
? +++++ ^
# Use packaged assets
ASSETS_PACKAGED = True | 2 | 0.142857 | 1 | 1 |
ea3c70cbf7f411d1cd923b1b238f293c62cd204d | README.md | README.md | Filendir
========
A nodejs module: Write a file and create the directories found in its path if needed.
| Filendir
========
Write a file given a full path. Create the directories if necessary.
It is based on mkdirp. (https://www.npmjs.org/package/mkdirp)
API
----
Filendir exposes an asynchronous and a synchronous write method. It also exposes mkdirp if you need it.
### filendir.ws
### filendir.writeFileSynch
**Synchronous write **
@return: true or false depending on success.
**Example**
```javascript
var path = require('path')
var filendir = require('filendir')
var filename = path.join('let','s', 'nest','some','directories','myfile.txt')
var content = 'Hello World'
if (filendir.ws(filename, content)) {
console.log('File written!')
}
```
### filendir.wa
### filendir.writeFileAsynch
**Asynchronous write **
**Example**
```javascript
var path = require('path')
var filendir = require('filendir')
var filename = path.join('let','s', 'nest','some','directories','myfile.txt')
var content = 'Hello World'
filendir.wa(filename, content, function (err) {
if (!err) {
console.log('File written!')
}
})
```
###filendir.mkdirp
Would have been harder to do this without it.
See https://www.npmjs.org/package/mkdirp
| Add description of the module | Add description of the module | Markdown | mit | AoDev/Filendir,douglas-treadwell/Filendir | markdown | ## Code Before:
Filendir
========
A nodejs module: Write a file and create the directories found in its path if needed.
## Instruction:
Add description of the module
## Code After:
Filendir
========
Write a file given a full path. Create the directories if necessary.
It is based on mkdirp. (https://www.npmjs.org/package/mkdirp)
API
----
Filendir exposes an asynchronous and a synchronous write method. It also exposes mkdirp if you need it.
### filendir.ws
### filendir.writeFileSynch
**Synchronous write **
@return: true or false depending on success.
**Example**
```javascript
var path = require('path')
var filendir = require('filendir')
var filename = path.join('let','s', 'nest','some','directories','myfile.txt')
var content = 'Hello World'
if (filendir.ws(filename, content)) {
console.log('File written!')
}
```
### filendir.wa
### filendir.writeFileAsynch
**Asynchronous write **
**Example**
```javascript
var path = require('path')
var filendir = require('filendir')
var filename = path.join('let','s', 'nest','some','directories','myfile.txt')
var content = 'Hello World'
filendir.wa(filename, content, function (err) {
if (!err) {
console.log('File written!')
}
})
```
###filendir.mkdirp
Would have been harder to do this without it.
See https://www.npmjs.org/package/mkdirp
| Filendir
========
+ Write a file given a full path. Create the directories if necessary.
- A nodejs module: Write a file and create the directories found in its path if needed.
+ It is based on mkdirp. (https://www.npmjs.org/package/mkdirp)
+
+
+ API
+ ----
+ Filendir exposes an asynchronous and a synchronous write method. It also exposes mkdirp if you need it.
+
+
+ ### filendir.ws
+ ### filendir.writeFileSynch
+
+ **Synchronous write **
+
+ @return: true or false depending on success.
+
+ **Example**
+
+ ```javascript
+ var path = require('path')
+ var filendir = require('filendir')
+ var filename = path.join('let','s', 'nest','some','directories','myfile.txt')
+ var content = 'Hello World'
+
+ if (filendir.ws(filename, content)) {
+ console.log('File written!')
+ }
+ ```
+
+
+ ### filendir.wa
+ ### filendir.writeFileAsynch
+
+ **Asynchronous write **
+
+ **Example**
+
+ ```javascript
+ var path = require('path')
+ var filendir = require('filendir')
+ var filename = path.join('let','s', 'nest','some','directories','myfile.txt')
+ var content = 'Hello World'
+
+ filendir.wa(filename, content, function (err) {
+ if (!err) {
+ console.log('File written!')
+ }
+ })
+ ```
+
+ ###filendir.mkdirp
+ Would have been harder to do this without it.
+
+ See https://www.npmjs.org/package/mkdirp | 55 | 13.75 | 54 | 1 |
b06b05dd43fb8d243f20c715c786ba15d098cf20 | src/prompt.ls | src/prompt.ls | require! {
promptly
async: './import'.async
}
module.exports = (message, callback, list, type, options) ->
# simple input arguments normalizer based on its type
args = Array::slice.call &
{ type, fnArgs } = do ->
temp = {}
fnArgs = []
args.forEach (value, i) ->
switch get-type value
when 'string'
if i is 0
temp.message = value
else
temp.type = value
when 'function' then temp.callback = value
when 'array' then temp.list = value
when 'object' then temp.options = value
temp.type ?= 'prompt'
for own param, value of temp when param isnt 'type'
fnArgs.push value
{ type: temp.type, fnArgs: fnArgs }
promptly[type].apply null, fnArgs
get-type = ->
type = typeof it
if type is 'object'
type = 'array' if Object::toString.call it is '[object Array]'
type
| require! promptly
module.exports = (message, callback, list, type, options) ->
# simple input arguments normalizer based on its type
args = Array::slice.call &
{ type, fnArgs } = do ->
temp = {}
fnArgs = []
args.forEach (value, i) ->
switch get-type value
when 'string'
if i is 0
temp.message = value
else
temp.type = value
when 'function' then temp.callback = value
when 'array' then temp.list = value
when 'object' then temp.options = value
temp.type ?= 'prompt'
for own param, value of temp when param isnt 'type'
fnArgs.push value
{ type: temp.type, fnArgs: fnArgs }
promptly[type].apply null, fnArgs
get-type = ->
type = typeof it
if type is 'object'
type = 'array' if Object::toString.call it is '[object Array]'
type
| Support for multple environment variables on Windows | Support for multple environment variables on Windows
| LiveScript | mit | AdesisNetlife/croak,AdesisNetlife/croak,AdesisNetlife/croak | livescript | ## Code Before:
require! {
promptly
async: './import'.async
}
module.exports = (message, callback, list, type, options) ->
# simple input arguments normalizer based on its type
args = Array::slice.call &
{ type, fnArgs } = do ->
temp = {}
fnArgs = []
args.forEach (value, i) ->
switch get-type value
when 'string'
if i is 0
temp.message = value
else
temp.type = value
when 'function' then temp.callback = value
when 'array' then temp.list = value
when 'object' then temp.options = value
temp.type ?= 'prompt'
for own param, value of temp when param isnt 'type'
fnArgs.push value
{ type: temp.type, fnArgs: fnArgs }
promptly[type].apply null, fnArgs
get-type = ->
type = typeof it
if type is 'object'
type = 'array' if Object::toString.call it is '[object Array]'
type
## Instruction:
Support for multple environment variables on Windows
## Code After:
require! promptly
module.exports = (message, callback, list, type, options) ->
# simple input arguments normalizer based on its type
args = Array::slice.call &
{ type, fnArgs } = do ->
temp = {}
fnArgs = []
args.forEach (value, i) ->
switch get-type value
when 'string'
if i is 0
temp.message = value
else
temp.type = value
when 'function' then temp.callback = value
when 'array' then temp.list = value
when 'object' then temp.options = value
temp.type ?= 'prompt'
for own param, value of temp when param isnt 'type'
fnArgs.push value
{ type: temp.type, fnArgs: fnArgs }
promptly[type].apply null, fnArgs
get-type = ->
type = typeof it
if type is 'object'
type = 'array' if Object::toString.call it is '[object Array]'
type
| + require! promptly
- require! {
- promptly
- async: './import'.async
- }
module.exports = (message, callback, list, type, options) ->
# simple input arguments normalizer based on its type
args = Array::slice.call &
{ type, fnArgs } = do ->
temp = {}
fnArgs = []
args.forEach (value, i) ->
switch get-type value
when 'string'
if i is 0
temp.message = value
else
temp.type = value
when 'function' then temp.callback = value
when 'array' then temp.list = value
when 'object' then temp.options = value
temp.type ?= 'prompt'
for own param, value of temp when param isnt 'type'
fnArgs.push value
{ type: temp.type, fnArgs: fnArgs }
promptly[type].apply null, fnArgs
get-type = ->
type = typeof it
if type is 'object'
type = 'array' if Object::toString.call it is '[object Array]'
type | 5 | 0.135135 | 1 | 4 |
6b166cf9e4db50e47cc88ed212d4697d524b9d4e | helpers/environment.rb | helpers/environment.rb | require 'yaml'
require_relative File.join(File.dirname(__FILE__)) + '/../lib/funky_world_cup'
module FunkyWorldCup
ALLOWED_LOCALES = [:en, :es]
DEFAULT_LOCALE = :en
module Helpers
def self.init_environment(env)
settings_file = File.join(File.dirname(__FILE__), "/../config/settings.yml")
FunkyWorldCupApp::Settings.load(settings_file, env)
@@DB = FunkyWorldCupApp::Database.connect FunkyWorldCupApp::Settings.get('db')
I18n.enforce_available_locales = false
self.set_env(env)
end
def self.database
@@DB
end
def self.set_env(env)
filename = env.to_s + ".env.sh"
env_vars = File.read(filename)
env_vars.each_line do |var|
name, value = var.split("=")
ENV[name.strip] = value.strip
end
end
def init_locale(env)
if !session[:locale] && (env.has_key?("HTTP_ACCEPT_LANGUAGE") || current_user)
if current_user.locale
locale = current_user.locale
else
locale = env["HTTP_ACCEPT_LANGUAGE"][0,2].to_sym #take first accepted language
end
locale = DEFAULT_LOCALE unless ALLOWED_LOCALES.include?(locale)
session[:locale] = locale
end
I18n.locale = session[:locale]
end
end
end
| require 'yaml'
require_relative File.join(File.dirname(__FILE__)) + '/../lib/funky_world_cup'
module FunkyWorldCup
ALLOWED_LOCALES = [:en, :es]
DEFAULT_LOCALE = :en
module Helpers
def self.init_environment(env)
settings_file = File.join(File.dirname(__FILE__), "/../config/settings.yml")
FunkyWorldCupApp::Settings.load(settings_file, env)
@@DB = FunkyWorldCupApp::Database.connect FunkyWorldCupApp::Settings.get('db')
I18n.enforce_available_locales = false
self.set_env(env)
end
def self.database
@@DB
end
def self.set_env(env)
filename = env.to_s + ".env.sh"
env_vars = File.read(filename)
env_vars.each_line do |var|
name, value = var.split("=")
ENV[name.strip] = value.strip
end
end
def init_locale(env)
if !session[:locale] && (env.has_key?("HTTP_ACCEPT_LANGUAGE") || current_user)
if current_user && current_user.locale
locale = current_user.locale
else
locale = env["HTTP_ACCEPT_LANGUAGE"][0,2].to_sym #take first accepted language
end
locale = DEFAULT_LOCALE unless ALLOWED_LOCALES.include?(locale)
session[:locale] = locale
end
I18n.locale = session[:locale]
end
end
end
| Fix edge case for language | Fix edge case for language
| Ruby | mit | threefunkymonkeys/funky-world-cup,threefunkymonkeys/funky-world-cup,threefunkymonkeys/funky-world-cup,threefunkymonkeys/funky-world-cup | ruby | ## Code Before:
require 'yaml'
require_relative File.join(File.dirname(__FILE__)) + '/../lib/funky_world_cup'
module FunkyWorldCup
ALLOWED_LOCALES = [:en, :es]
DEFAULT_LOCALE = :en
module Helpers
def self.init_environment(env)
settings_file = File.join(File.dirname(__FILE__), "/../config/settings.yml")
FunkyWorldCupApp::Settings.load(settings_file, env)
@@DB = FunkyWorldCupApp::Database.connect FunkyWorldCupApp::Settings.get('db')
I18n.enforce_available_locales = false
self.set_env(env)
end
def self.database
@@DB
end
def self.set_env(env)
filename = env.to_s + ".env.sh"
env_vars = File.read(filename)
env_vars.each_line do |var|
name, value = var.split("=")
ENV[name.strip] = value.strip
end
end
def init_locale(env)
if !session[:locale] && (env.has_key?("HTTP_ACCEPT_LANGUAGE") || current_user)
if current_user.locale
locale = current_user.locale
else
locale = env["HTTP_ACCEPT_LANGUAGE"][0,2].to_sym #take first accepted language
end
locale = DEFAULT_LOCALE unless ALLOWED_LOCALES.include?(locale)
session[:locale] = locale
end
I18n.locale = session[:locale]
end
end
end
## Instruction:
Fix edge case for language
## Code After:
require 'yaml'
require_relative File.join(File.dirname(__FILE__)) + '/../lib/funky_world_cup'
module FunkyWorldCup
ALLOWED_LOCALES = [:en, :es]
DEFAULT_LOCALE = :en
module Helpers
def self.init_environment(env)
settings_file = File.join(File.dirname(__FILE__), "/../config/settings.yml")
FunkyWorldCupApp::Settings.load(settings_file, env)
@@DB = FunkyWorldCupApp::Database.connect FunkyWorldCupApp::Settings.get('db')
I18n.enforce_available_locales = false
self.set_env(env)
end
def self.database
@@DB
end
def self.set_env(env)
filename = env.to_s + ".env.sh"
env_vars = File.read(filename)
env_vars.each_line do |var|
name, value = var.split("=")
ENV[name.strip] = value.strip
end
end
def init_locale(env)
if !session[:locale] && (env.has_key?("HTTP_ACCEPT_LANGUAGE") || current_user)
if current_user && current_user.locale
locale = current_user.locale
else
locale = env["HTTP_ACCEPT_LANGUAGE"][0,2].to_sym #take first accepted language
end
locale = DEFAULT_LOCALE unless ALLOWED_LOCALES.include?(locale)
session[:locale] = locale
end
I18n.locale = session[:locale]
end
end
end
| require 'yaml'
require_relative File.join(File.dirname(__FILE__)) + '/../lib/funky_world_cup'
module FunkyWorldCup
ALLOWED_LOCALES = [:en, :es]
DEFAULT_LOCALE = :en
module Helpers
def self.init_environment(env)
settings_file = File.join(File.dirname(__FILE__), "/../config/settings.yml")
FunkyWorldCupApp::Settings.load(settings_file, env)
@@DB = FunkyWorldCupApp::Database.connect FunkyWorldCupApp::Settings.get('db')
I18n.enforce_available_locales = false
self.set_env(env)
end
def self.database
@@DB
end
def self.set_env(env)
filename = env.to_s + ".env.sh"
env_vars = File.read(filename)
env_vars.each_line do |var|
name, value = var.split("=")
ENV[name.strip] = value.strip
end
end
def init_locale(env)
if !session[:locale] && (env.has_key?("HTTP_ACCEPT_LANGUAGE") || current_user)
- if current_user.locale
+ if current_user && current_user.locale
? ++++++++++++++++
locale = current_user.locale
else
locale = env["HTTP_ACCEPT_LANGUAGE"][0,2].to_sym #take first accepted language
end
locale = DEFAULT_LOCALE unless ALLOWED_LOCALES.include?(locale)
session[:locale] = locale
end
I18n.locale = session[:locale]
end
end
end | 2 | 0.042553 | 1 | 1 |
a514335fa9dbf029f1e2d6a8033740c67e1c17ae | spec/controllers/assets_controller_spec.rb | spec/controllers/assets_controller_spec.rb | require 'spec_helper'
describe AssetsController do
render_views # for json responses
describe "POST create" do
context "a valid asset" do
before do
@atts = { :file => load_fixture_file("asset.png") }
end
it "is uploaded" do
post :create, asset: @atts
assigns(:asset).should be_persisted
assigns(:asset).file.current_path.should =~ /asset\.png$/
end
it "returns a created status" do
post :create, asset: @atts
response.status.should == 201
end
it "returns the location of the new asset" do
post :create, asset: @atts
asset = assigns(:asset)
body = JSON.parse(response.body)
body['asset']['id'].should == "http://test.host/assets/#{asset.id}"
end
end
context "an invalid asset" do
it "is not uploaded"
it "returns an unprocessable status"
end
end
end
| require 'spec_helper'
describe AssetsController do
render_views # for json responses
describe "POST create" do
context "a valid asset" do
before do
@atts = { :file => load_fixture_file("asset.png") }
end
it "is persisted" do
post :create, asset: @atts
assigns(:asset).should be_persisted
assigns(:asset).file.current_path.should =~ /asset\.png$/
end
it "returns a created status" do
post :create, asset: @atts
response.status.should == 201
end
it "returns the location of the new asset" do
post :create, asset: @atts
asset = assigns(:asset)
body = JSON.parse(response.body)
body['asset']['id'].should == "http://test.host/assets/#{asset.id}"
end
end
context "an invalid asset" do
before do
@atts = { :file => nil }
end
it "is not persisted" do
post :create, asset: @atts
assigns(:asset).should_not be_persisted
assigns(:asset).file.current_path.should be_nil
end
it "returns an unprocessable status" do
post :create, asset: @atts
response.status.should == 422
end
end
end
end
| Add specs for creating an invalid asset | Add specs for creating an invalid asset | Ruby | mit | alphagov/asset-manager,alphagov/asset-manager,alphagov/asset-manager | ruby | ## Code Before:
require 'spec_helper'
describe AssetsController do
render_views # for json responses
describe "POST create" do
context "a valid asset" do
before do
@atts = { :file => load_fixture_file("asset.png") }
end
it "is uploaded" do
post :create, asset: @atts
assigns(:asset).should be_persisted
assigns(:asset).file.current_path.should =~ /asset\.png$/
end
it "returns a created status" do
post :create, asset: @atts
response.status.should == 201
end
it "returns the location of the new asset" do
post :create, asset: @atts
asset = assigns(:asset)
body = JSON.parse(response.body)
body['asset']['id'].should == "http://test.host/assets/#{asset.id}"
end
end
context "an invalid asset" do
it "is not uploaded"
it "returns an unprocessable status"
end
end
end
## Instruction:
Add specs for creating an invalid asset
## Code After:
require 'spec_helper'
describe AssetsController do
render_views # for json responses
describe "POST create" do
context "a valid asset" do
before do
@atts = { :file => load_fixture_file("asset.png") }
end
it "is persisted" do
post :create, asset: @atts
assigns(:asset).should be_persisted
assigns(:asset).file.current_path.should =~ /asset\.png$/
end
it "returns a created status" do
post :create, asset: @atts
response.status.should == 201
end
it "returns the location of the new asset" do
post :create, asset: @atts
asset = assigns(:asset)
body = JSON.parse(response.body)
body['asset']['id'].should == "http://test.host/assets/#{asset.id}"
end
end
context "an invalid asset" do
before do
@atts = { :file => nil }
end
it "is not persisted" do
post :create, asset: @atts
assigns(:asset).should_not be_persisted
assigns(:asset).file.current_path.should be_nil
end
it "returns an unprocessable status" do
post :create, asset: @atts
response.status.should == 422
end
end
end
end
| require 'spec_helper'
describe AssetsController do
render_views # for json responses
describe "POST create" do
context "a valid asset" do
before do
@atts = { :file => load_fixture_file("asset.png") }
end
- it "is uploaded" do
? - ^^^^
+ it "is persisted" do
? ^^^^^^
post :create, asset: @atts
assigns(:asset).should be_persisted
assigns(:asset).file.current_path.should =~ /asset\.png$/
end
it "returns a created status" do
post :create, asset: @atts
response.status.should == 201
end
it "returns the location of the new asset" do
post :create, asset: @atts
asset = assigns(:asset)
body = JSON.parse(response.body)
body['asset']['id'].should == "http://test.host/assets/#{asset.id}"
end
end
context "an invalid asset" do
+ before do
+ @atts = { :file => nil }
+ end
+
- it "is not uploaded"
? - ^^^^
+ it "is not persisted" do
? ^^^^^^ +++
+ post :create, asset: @atts
+
+ assigns(:asset).should_not be_persisted
+ assigns(:asset).file.current_path.should be_nil
+ end
+
- it "returns an unprocessable status"
+ it "returns an unprocessable status" do
? +++
+ post :create, asset: @atts
+
+ response.status.should == 422
+ end
end
end
end | 20 | 0.5 | 17 | 3 |
6dc8c9420fc60a539973b6f8a3ddb6b41494987f | .travis.yml | .travis.yml | language: python
python:
- 2.6
- 2.7
- 3.2
- 3.3
env:
- DJANGO=Django==1.4.5 SOUTH=1
- DJANGO=Django==1.5.1 SOUTH=1
- DJANGO=https://github.com/django/django/tarball/stable/1.6.x SOUTH=1
- DJANGO=https://github.com/django/django/tarball/master SOUTH=1
install:
- pip install $DJANGO
- pip install coverage coveralls
- sh -c "if [ '$SOUTH' = '1' ]; then pip install South==0.8.1; fi"
script:
- coverage run -a setup.py test
- coverage report
matrix:
exclude:
- python: 2.6
env: DJANGO=https://github.com/django/django/tarball/master SOUTH=1
- python: 3.2
env: DJANGO=Django==1.4.5 SOUTH=1
- python: 3.3
env: DJANGO=Django==1.4.5 SOUTH=1
include:
- python: 2.7
env: DJANGO=Django==1.5.1 SOUTH=0
after_success: coveralls
| language: python
python:
- 2.6
- 2.7
- 3.2
- 3.3
env:
- DJANGO=Django==1.4.10 SOUTH=1
- DJANGO=Django==1.5.5 SOUTH=1
- DJANGO=Django==1.6.1 SOUTH=1
- DJANGO=https://github.com/django/django/tarball/master SOUTH=1
install:
- pip install $DJANGO
- pip install coverage coveralls
- sh -c "if [ '$SOUTH' = '1' ]; then pip install South==0.8.1; fi"
script:
- coverage run -a setup.py test
- coverage report
matrix:
exclude:
- python: 2.6
env: DJANGO=https://github.com/django/django/tarball/master SOUTH=1
- python: 3.2
env: DJANGO=Django==1.4.10 SOUTH=1
- python: 3.3
env: DJANGO=Django==1.4.10 SOUTH=1
include:
- python: 2.7
env: DJANGO=Django==1.5.5 SOUTH=0
after_success: coveralls
| Update Travis config to match updated tox.ini. | Update Travis config to match updated tox.ini.
| YAML | bsd-3-clause | patrys/django-model-utils,patrys/django-model-utils,timmygee/django-model-utils,timmygee/django-model-utils,nemesisdesign/django-model-utils,nemesisdesign/django-model-utils,carljm/django-model-utils,yeago/django-model-utils,yeago/django-model-utils,carljm/django-model-utils | yaml | ## Code Before:
language: python
python:
- 2.6
- 2.7
- 3.2
- 3.3
env:
- DJANGO=Django==1.4.5 SOUTH=1
- DJANGO=Django==1.5.1 SOUTH=1
- DJANGO=https://github.com/django/django/tarball/stable/1.6.x SOUTH=1
- DJANGO=https://github.com/django/django/tarball/master SOUTH=1
install:
- pip install $DJANGO
- pip install coverage coveralls
- sh -c "if [ '$SOUTH' = '1' ]; then pip install South==0.8.1; fi"
script:
- coverage run -a setup.py test
- coverage report
matrix:
exclude:
- python: 2.6
env: DJANGO=https://github.com/django/django/tarball/master SOUTH=1
- python: 3.2
env: DJANGO=Django==1.4.5 SOUTH=1
- python: 3.3
env: DJANGO=Django==1.4.5 SOUTH=1
include:
- python: 2.7
env: DJANGO=Django==1.5.1 SOUTH=0
after_success: coveralls
## Instruction:
Update Travis config to match updated tox.ini.
## Code After:
language: python
python:
- 2.6
- 2.7
- 3.2
- 3.3
env:
- DJANGO=Django==1.4.10 SOUTH=1
- DJANGO=Django==1.5.5 SOUTH=1
- DJANGO=Django==1.6.1 SOUTH=1
- DJANGO=https://github.com/django/django/tarball/master SOUTH=1
install:
- pip install $DJANGO
- pip install coverage coveralls
- sh -c "if [ '$SOUTH' = '1' ]; then pip install South==0.8.1; fi"
script:
- coverage run -a setup.py test
- coverage report
matrix:
exclude:
- python: 2.6
env: DJANGO=https://github.com/django/django/tarball/master SOUTH=1
- python: 3.2
env: DJANGO=Django==1.4.10 SOUTH=1
- python: 3.3
env: DJANGO=Django==1.4.10 SOUTH=1
include:
- python: 2.7
env: DJANGO=Django==1.5.5 SOUTH=0
after_success: coveralls
| language: python
python:
- 2.6
- 2.7
- 3.2
- 3.3
env:
+ - DJANGO=Django==1.4.10 SOUTH=1
- - DJANGO=Django==1.4.5 SOUTH=1
? ^
+ - DJANGO=Django==1.5.5 SOUTH=1
? ^
- - DJANGO=Django==1.5.1 SOUTH=1
? ^
+ - DJANGO=Django==1.6.1 SOUTH=1
? ^
- - DJANGO=https://github.com/django/django/tarball/stable/1.6.x SOUTH=1
- DJANGO=https://github.com/django/django/tarball/master SOUTH=1
install:
- pip install $DJANGO
- pip install coverage coveralls
- sh -c "if [ '$SOUTH' = '1' ]; then pip install South==0.8.1; fi"
script:
- coverage run -a setup.py test
- coverage report
matrix:
exclude:
- python: 2.6
env: DJANGO=https://github.com/django/django/tarball/master SOUTH=1
- python: 3.2
- env: DJANGO=Django==1.4.5 SOUTH=1
? ^
+ env: DJANGO=Django==1.4.10 SOUTH=1
? ^^
- python: 3.3
- env: DJANGO=Django==1.4.5 SOUTH=1
? ^
+ env: DJANGO=Django==1.4.10 SOUTH=1
? ^^
include:
- python: 2.7
- env: DJANGO=Django==1.5.1 SOUTH=0
? ^
+ env: DJANGO=Django==1.5.5 SOUTH=0
? ^
after_success: coveralls | 12 | 0.333333 | 6 | 6 |
18baabe81e1c0fac45ed923df3cf2a22da89f382 | README.md | README.md | iup-practices
=============
Personal playground with IUP toolkits(a lightweight cross-platform UI framework) in Windows
| iup-practices
=============
Personal playground with the [IUP toolkits][iup](a lightweight cross-platform UI framework) in Windows
---
[iup]: http://www.tecgraf.puc-rio.br/iup/
| Add link for the IUP toolkits | Add link for the IUP toolkits
| Markdown | mit | uwydoc/iup-practices | markdown | ## Code Before:
iup-practices
=============
Personal playground with IUP toolkits(a lightweight cross-platform UI framework) in Windows
## Instruction:
Add link for the IUP toolkits
## Code After:
iup-practices
=============
Personal playground with the [IUP toolkits][iup](a lightweight cross-platform UI framework) in Windows
---
[iup]: http://www.tecgraf.puc-rio.br/iup/
| iup-practices
=============
- Personal playground with IUP toolkits(a lightweight cross-platform UI framework) in Windows
+ Personal playground with the [IUP toolkits][iup](a lightweight cross-platform UI framework) in Windows
? +++++ ++++++
+
+
+ ---
+ [iup]: http://www.tecgraf.puc-rio.br/iup/ | 6 | 1.5 | 5 | 1 |
fea80e79cdeaa33d01895c9515c97ad6ad80f26f | lib/maybee/authorization_subject.rb | lib/maybee/authorization_subject.rb | module Maybee
module AuthorizationSubject
def may?(access, object)
end
end
end
| module Maybee
module AuthorizationSubject
def may?(access, object)
object.allow?(access, self)
end
def authorized_to?(access, object)
object.authorize?(access, self)
end
end
end
| Add methods for authorization objects | Add methods for authorization objects | Ruby | mit | mtgrosser/maybee | ruby | ## Code Before:
module Maybee
module AuthorizationSubject
def may?(access, object)
end
end
end
## Instruction:
Add methods for authorization objects
## Code After:
module Maybee
module AuthorizationSubject
def may?(access, object)
object.allow?(access, self)
end
def authorized_to?(access, object)
object.authorize?(access, self)
end
end
end
| module Maybee
module AuthorizationSubject
def may?(access, object)
+ object.allow?(access, self)
+ end
+ def authorized_to?(access, object)
+ object.authorize?(access, self)
end
end
end | 4 | 0.363636 | 4 | 0 |
f0ca34c4365e54e8074f1c208bc5249563c95f21 | topics/about_equality.js | topics/about_equality.js |
module("About Equality (topics/about_equality.js)");
test("numeric equality", function() {
equal(3 + __, 7, "");
});
test("string equality", function() {
equal("3" + __, "37", "concatenate the strings");
});
test("equality without type coercion", function() {
ok(3 === __, 'what is exactly equal to 3?');
});
test("equality with type coercion", function() {
ok(3 == "__", 'what string is equal to 3, with type coercion?');
});
test("string literals", function() {
equal(__, "frankenstein", "quote types are interchangable, but must match.");
equal(__, 'frankenstein', "quote types can use both single and double quotes.");
});
|
module("About Equality (topics/about_equality.js)");
test("numeric equality", function() {
equal(3 + 4, 7, "");
});
test("string equality", function() {
equal("3" + "7", "37", "concatenate the strings");
});
test("equality without type coercion", function() {
ok(3 === 3, 'what is exactly equal to 3?');
});
test("equality with type coercion", function() {
ok(3 == "3", 'what string is equal to 3, with type coercion?');
});
test("string literals", function() {
equal('frankenstein', "frankenstein", "quote types are interchangable, but must match.");
equal("frankenstein", 'frankenstein', "quote types can use both single and double quotes.");
});
| Complete equality tests to pass | Complete equality tests to pass
| JavaScript | mit | supportbeam/javascript_koans,supportbeam/javascript_koans | javascript | ## Code Before:
module("About Equality (topics/about_equality.js)");
test("numeric equality", function() {
equal(3 + __, 7, "");
});
test("string equality", function() {
equal("3" + __, "37", "concatenate the strings");
});
test("equality without type coercion", function() {
ok(3 === __, 'what is exactly equal to 3?');
});
test("equality with type coercion", function() {
ok(3 == "__", 'what string is equal to 3, with type coercion?');
});
test("string literals", function() {
equal(__, "frankenstein", "quote types are interchangable, but must match.");
equal(__, 'frankenstein', "quote types can use both single and double quotes.");
});
## Instruction:
Complete equality tests to pass
## Code After:
module("About Equality (topics/about_equality.js)");
test("numeric equality", function() {
equal(3 + 4, 7, "");
});
test("string equality", function() {
equal("3" + "7", "37", "concatenate the strings");
});
test("equality without type coercion", function() {
ok(3 === 3, 'what is exactly equal to 3?');
});
test("equality with type coercion", function() {
ok(3 == "3", 'what string is equal to 3, with type coercion?');
});
test("string literals", function() {
equal('frankenstein', "frankenstein", "quote types are interchangable, but must match.");
equal("frankenstein", 'frankenstein', "quote types can use both single and double quotes.");
});
|
module("About Equality (topics/about_equality.js)");
test("numeric equality", function() {
- equal(3 + __, 7, "");
? ^^
+ equal(3 + 4, 7, "");
? ^
});
test("string equality", function() {
- equal("3" + __, "37", "concatenate the strings");
? ^^
+ equal("3" + "7", "37", "concatenate the strings");
? ^^^
});
test("equality without type coercion", function() {
- ok(3 === __, 'what is exactly equal to 3?');
? ^^
+ ok(3 === 3, 'what is exactly equal to 3?');
? ^
});
test("equality with type coercion", function() {
- ok(3 == "__", 'what string is equal to 3, with type coercion?');
? ^^
+ ok(3 == "3", 'what string is equal to 3, with type coercion?');
? ^
});
test("string literals", function() {
- equal(__, "frankenstein", "quote types are interchangable, but must match.");
? ^^
+ equal('frankenstein', "frankenstein", "quote types are interchangable, but must match.");
? ^^^^^^^^^^^^^^
- equal(__, 'frankenstein', "quote types can use both single and double quotes.");
? ^^
+ equal("frankenstein", 'frankenstein', "quote types can use both single and double quotes.");
? ^^^^^^^^^^^^^^
}); | 12 | 0.521739 | 6 | 6 |
5069787060f4119a85a4cbc8bb3860e7208e3663 | blueprints/pouch-model/index.js | blueprints/pouch-model/index.js | var EmberCliModelBlueprint = require('ember-cli/blueprints/model');
module.exports = EmberCliModelBlueprint;
| var ModelBlueprint;
try {
ModelBlueprint = require('ember-data/blueprints/model');
} catch (e) {
ModelBlueprint = require('ember-cli/blueprints/model');
}
module.exports = ModelBlueprint;
| Correct import of Ember Data model blueprint | Correct import of Ember Data model blueprint
As suggested by @fsmanuel in #128 and #131.
| JavaScript | apache-2.0 | nolanlawson/ember-pouch,pouchdb-community/ember-pouch,nolanlawson/ember-pouch,pouchdb-community/ember-pouch | javascript | ## Code Before:
var EmberCliModelBlueprint = require('ember-cli/blueprints/model');
module.exports = EmberCliModelBlueprint;
## Instruction:
Correct import of Ember Data model blueprint
As suggested by @fsmanuel in #128 and #131.
## Code After:
var ModelBlueprint;
try {
ModelBlueprint = require('ember-data/blueprints/model');
} catch (e) {
ModelBlueprint = require('ember-cli/blueprints/model');
}
module.exports = ModelBlueprint;
| - var EmberCliModelBlueprint = require('ember-cli/blueprints/model');
+ var ModelBlueprint;
+ try {
+ ModelBlueprint = require('ember-data/blueprints/model');
+ } catch (e) {
+ ModelBlueprint = require('ember-cli/blueprints/model');
+ }
+
- module.exports = EmberCliModelBlueprint;
? --------
+ module.exports = ModelBlueprint; | 10 | 3.333333 | 8 | 2 |
37714a0c156ab119269a55b336c4306924caad18 | README.md | README.md |
Crying Obsidian was a texture in Minecraft for a project to implement a spawn-point changing block. It was abandoned after the introduction of beds. This mod implements this block.
## Download
The mod can be downloaded [here](https://github.com/ErrorCraftLP/Crying-Obsidian-Mod/releases).
## Important Information
* Please only report bugs that exist in the newest mod version (currently: v2.2.0).
| Crying Obsidian was a texture in Minecraft for a project to implement a spawn-point changing block. It was abandoned after the introduction of beds. This mod implements this block.
## Download
The mod can be downloaded [here](https://github.com/ErrorCraftLP/Crying-Obsidian-Mod/releases).
| Remove things that were moved to CONTRIBUTING.md | Remove things that were moved to CONTRIBUTING.md | Markdown | mit | ErrorCraftLP/Crying-Obsidian-Mod,ErrorCraftLP/Crying-Obsidian | markdown | ## Code Before:
Crying Obsidian was a texture in Minecraft for a project to implement a spawn-point changing block. It was abandoned after the introduction of beds. This mod implements this block.
## Download
The mod can be downloaded [here](https://github.com/ErrorCraftLP/Crying-Obsidian-Mod/releases).
## Important Information
* Please only report bugs that exist in the newest mod version (currently: v2.2.0).
## Instruction:
Remove things that were moved to CONTRIBUTING.md
## Code After:
Crying Obsidian was a texture in Minecraft for a project to implement a spawn-point changing block. It was abandoned after the introduction of beds. This mod implements this block.
## Download
The mod can be downloaded [here](https://github.com/ErrorCraftLP/Crying-Obsidian-Mod/releases).
| -
Crying Obsidian was a texture in Minecraft for a project to implement a spawn-point changing block. It was abandoned after the introduction of beds. This mod implements this block.
## Download
-
The mod can be downloaded [here](https://github.com/ErrorCraftLP/Crying-Obsidian-Mod/releases).
-
- ## Important Information
-
- * Please only report bugs that exist in the newest mod version (currently: v2.2.0). | 6 | 0.6 | 0 | 6 |
fdce895bbaa4c08431d173edd286cb9b6670f2c2 | tools/cli/dev-bundle-bin-helpers.js | tools/cli/dev-bundle-bin-helpers.js | var path = require("path");
var devBundleDir = path.resolve(__dirname, "..", "..", "dev_bundle");
var binDir = path.join(devBundleDir, "bin");
exports.getCommandPath = function (command) {
return path.join(binDir, command);
};
exports.getEnv = function () {
var env = Object.create(process.env);
env.PATH = [
// When npm looks for node, it must find dev_bundle/bin/node.
binDir,
// Also make available any scripts installed by packages in
// dev_bundle/lib/node_modules, such as node-gyp.
path.join(devBundleDir, "lib", "node_modules", ".bin"),
env.PATH
].join(path.delimiter);
if (process.platform === "win32") {
// On Windows we provide a reliable version of python.exe for use by
// node-gyp (the tool that rebuilds binary node modules). #WinPy
env.PYTHON = env.PYTHON || path.join(
devBundleDir, "python", "python.exe");
// We don't try to install a compiler toolchain on the developer's
// behalf, but setting GYP_MSVS_VERSION helps select the right one.
env.GYP_MSVS_VERSION = env.GYP_MSVS_VERSION || "2015";
}
return env;
};
| var path = require("path");
var devBundleDir = path.resolve(__dirname, "..", "..", "dev_bundle");
var binDir = path.join(devBundleDir, "bin");
exports.getCommandPath = function (command) {
return path.join(binDir, command);
};
exports.getEnv = function () {
var env = Object.create(process.env);
var paths = [
// When npm looks for node, it must find dev_bundle/bin/node.
binDir,
// Also make available any scripts installed by packages in
// dev_bundle/lib/node_modules, such as node-gyp.
path.join(devBundleDir, "lib", "node_modules", ".bin"),
];
var PATH = env.PATH || env.Path;
if (PATH) {
paths.push(PATH);
}
env.PATH = paths.join(path.delimiter);
if (process.platform === "win32") {
// On Windows we provide a reliable version of python.exe for use by
// node-gyp (the tool that rebuilds binary node modules). #WinPy
env.PYTHON = env.PYTHON || path.join(
devBundleDir, "python", "python.exe");
// We don't try to install a compiler toolchain on the developer's
// behalf, but setting GYP_MSVS_VERSION helps select the right one.
env.GYP_MSVS_VERSION = env.GYP_MSVS_VERSION || "2015";
// While the original process.env object allows for case insensitive
// access on Windows, Object.create interferes with that behavior, so
// here we ensure env.PATH === env.Path on Windows.
env.Path = env.PATH;
}
return env;
};
| Make sure env.Path === env.PATH on Windows. | Make sure env.Path === env.PATH on Windows.
| JavaScript | mit | Hansoft/meteor,Hansoft/meteor,4commerce-technologies-AG/meteor,jdivy/meteor,mjmasn/meteor,Hansoft/meteor,4commerce-technologies-AG/meteor,chasertech/meteor,chasertech/meteor,4commerce-technologies-AG/meteor,chasertech/meteor,chasertech/meteor,4commerce-technologies-AG/meteor,Hansoft/meteor,4commerce-technologies-AG/meteor,jdivy/meteor,mjmasn/meteor,4commerce-technologies-AG/meteor,mjmasn/meteor,Hansoft/meteor,chasertech/meteor,mjmasn/meteor,chasertech/meteor,jdivy/meteor,mjmasn/meteor,Hansoft/meteor,mjmasn/meteor,4commerce-technologies-AG/meteor,chasertech/meteor,Hansoft/meteor,jdivy/meteor,jdivy/meteor,jdivy/meteor,mjmasn/meteor,jdivy/meteor | javascript | ## Code Before:
var path = require("path");
var devBundleDir = path.resolve(__dirname, "..", "..", "dev_bundle");
var binDir = path.join(devBundleDir, "bin");
exports.getCommandPath = function (command) {
return path.join(binDir, command);
};
exports.getEnv = function () {
var env = Object.create(process.env);
env.PATH = [
// When npm looks for node, it must find dev_bundle/bin/node.
binDir,
// Also make available any scripts installed by packages in
// dev_bundle/lib/node_modules, such as node-gyp.
path.join(devBundleDir, "lib", "node_modules", ".bin"),
env.PATH
].join(path.delimiter);
if (process.platform === "win32") {
// On Windows we provide a reliable version of python.exe for use by
// node-gyp (the tool that rebuilds binary node modules). #WinPy
env.PYTHON = env.PYTHON || path.join(
devBundleDir, "python", "python.exe");
// We don't try to install a compiler toolchain on the developer's
// behalf, but setting GYP_MSVS_VERSION helps select the right one.
env.GYP_MSVS_VERSION = env.GYP_MSVS_VERSION || "2015";
}
return env;
};
## Instruction:
Make sure env.Path === env.PATH on Windows.
## Code After:
var path = require("path");
var devBundleDir = path.resolve(__dirname, "..", "..", "dev_bundle");
var binDir = path.join(devBundleDir, "bin");
exports.getCommandPath = function (command) {
return path.join(binDir, command);
};
exports.getEnv = function () {
var env = Object.create(process.env);
var paths = [
// When npm looks for node, it must find dev_bundle/bin/node.
binDir,
// Also make available any scripts installed by packages in
// dev_bundle/lib/node_modules, such as node-gyp.
path.join(devBundleDir, "lib", "node_modules", ".bin"),
];
var PATH = env.PATH || env.Path;
if (PATH) {
paths.push(PATH);
}
env.PATH = paths.join(path.delimiter);
if (process.platform === "win32") {
// On Windows we provide a reliable version of python.exe for use by
// node-gyp (the tool that rebuilds binary node modules). #WinPy
env.PYTHON = env.PYTHON || path.join(
devBundleDir, "python", "python.exe");
// We don't try to install a compiler toolchain on the developer's
// behalf, but setting GYP_MSVS_VERSION helps select the right one.
env.GYP_MSVS_VERSION = env.GYP_MSVS_VERSION || "2015";
// While the original process.env object allows for case insensitive
// access on Windows, Object.create interferes with that behavior, so
// here we ensure env.PATH === env.Path on Windows.
env.Path = env.PATH;
}
return env;
};
| var path = require("path");
var devBundleDir = path.resolve(__dirname, "..", "..", "dev_bundle");
var binDir = path.join(devBundleDir, "bin");
exports.getCommandPath = function (command) {
return path.join(binDir, command);
};
exports.getEnv = function () {
var env = Object.create(process.env);
+ var paths = [
-
- env.PATH = [
// When npm looks for node, it must find dev_bundle/bin/node.
binDir,
// Also make available any scripts installed by packages in
// dev_bundle/lib/node_modules, such as node-gyp.
path.join(devBundleDir, "lib", "node_modules", ".bin"),
- env.PATH
- ].join(path.delimiter);
+ ];
+
+ var PATH = env.PATH || env.Path;
+ if (PATH) {
+ paths.push(PATH);
+ }
+
+ env.PATH = paths.join(path.delimiter);
if (process.platform === "win32") {
// On Windows we provide a reliable version of python.exe for use by
// node-gyp (the tool that rebuilds binary node modules). #WinPy
env.PYTHON = env.PYTHON || path.join(
devBundleDir, "python", "python.exe");
// We don't try to install a compiler toolchain on the developer's
// behalf, but setting GYP_MSVS_VERSION helps select the right one.
env.GYP_MSVS_VERSION = env.GYP_MSVS_VERSION || "2015";
+
+ // While the original process.env object allows for case insensitive
+ // access on Windows, Object.create interferes with that behavior, so
+ // here we ensure env.PATH === env.Path on Windows.
+ env.Path = env.PATH;
}
return env;
}; | 18 | 0.545455 | 14 | 4 |
73c84754699a6f0803d0ceb3081988b45c9c76e7 | contours/__init__.py | contours/__init__.py | """Contour calculations."""
# Python 2 support
# pylint: disable=redefined-builtin,unused-wildcard-import,wildcard-import
from __future__ import (absolute_import, division,
print_function, unicode_literals)
from builtins import *
from .core import numpy_formatter, matlab_formatter, shapely_formatter
from .quad import QuadContourGenerator
__version__ = '0.0.2.dev0'
| """Contour calculations."""
# Python 2 support
from __future__ import absolute_import
from .core import numpy_formatter, matlab_formatter, shapely_formatter
from .quad import QuadContourGenerator
__version__ = '0.0.2.dev0'
| Remove unneeded Python 2.7 compatibility imports. | Remove unneeded Python 2.7 compatibility imports.
| Python | mit | ccarocean/python-contours | python | ## Code Before:
"""Contour calculations."""
# Python 2 support
# pylint: disable=redefined-builtin,unused-wildcard-import,wildcard-import
from __future__ import (absolute_import, division,
print_function, unicode_literals)
from builtins import *
from .core import numpy_formatter, matlab_formatter, shapely_formatter
from .quad import QuadContourGenerator
__version__ = '0.0.2.dev0'
## Instruction:
Remove unneeded Python 2.7 compatibility imports.
## Code After:
"""Contour calculations."""
# Python 2 support
from __future__ import absolute_import
from .core import numpy_formatter, matlab_formatter, shapely_formatter
from .quad import QuadContourGenerator
__version__ = '0.0.2.dev0'
| """Contour calculations."""
# Python 2 support
- # pylint: disable=redefined-builtin,unused-wildcard-import,wildcard-import
- from __future__ import (absolute_import, division,
? - -----------
+ from __future__ import absolute_import
- print_function, unicode_literals)
- from builtins import *
from .core import numpy_formatter, matlab_formatter, shapely_formatter
from .quad import QuadContourGenerator
__version__ = '0.0.2.dev0' | 5 | 0.416667 | 1 | 4 |
0f5cc5e0e608d2200cee4ac8223d31c8b73d802d | lib/farmbot/celery_script/ast/node/factory_reset.ex | lib/farmbot/celery_script/ast/node/factory_reset.ex | defmodule Farmbot.CeleryScript.AST.Node.FactoryReset do
@moduledoc false
use Farmbot.CeleryScript.AST.Node
allow_args [:package]
use Farmbot.Logger
def execute(%{package: :farmbot_os}, _, env) do
env = mutate_env(env)
Farmbot.BotState.set_sync_status(:maintenance)
Farmbot.BotState.force_state_push()
Farmbot.System.ConfigStorage.update_config_value(:bool, "settings", "disable_factory_reset", false)
Farmbot.HTTP.delete("/api/fbos_config")
Logger.warn 1, "Farmbot OS going down for factory reset!"
Farmbot.System.factory_reset "CeleryScript request."
{:ok, env}
end
def execute(%{package: :arduino_firmware}, _, env) do
env = mutate_env(env)
Farmbot.BotState.set_sync_status(:maintenance)
Logger.warn 1, "Arduino Firmware going down for factory reset!"
params = Farmbot.System.ConfigStorage.get_config_as_map["hardware_params"]
for {param, _val} <- params do
Farmbot.Firmware.update_param(:"#{param}", -1)
end
Farmbot.BotState.force_state_push()
Farmbot.Firmware.read_all_params()
Farmbot.System.reboot("Arduino factory reset.")
{:ok, env}
end
end
| defmodule Farmbot.CeleryScript.AST.Node.FactoryReset do
@moduledoc false
use Farmbot.CeleryScript.AST.Node
allow_args [:package]
use Farmbot.Logger
def execute(%{package: :farmbot_os}, _, env) do
env = mutate_env(env)
Farmbot.BotState.set_sync_status(:maintenance)
Farmbot.BotState.force_state_push()
Farmbot.System.ConfigStorage.update_config_value(:bool, "settings", "disable_factory_reset", false)
Farmbot.HTTP.delete("/api/fbos_config")
Logger.warn 1, "Farmbot OS going down for factory reset!"
Farmbot.System.factory_reset "CeleryScript request."
{:ok, env}
end
def execute(%{package: :arduino_firmware}, _, env) do
env = mutate_env(env)
Farmbot.BotState.set_sync_status(:maintenance)
Logger.warn 1, "Arduino Firmware going down for factory reset!"
Farmbot.HTTP.delete!("/api/firmware_config")
pl = Poison.encode!(%{"api_migrated" => true})
Farmbot.HTTP.put!("/api/firmware_config", pl)
Farmbot.Bootstrap.SettingsSync.do_sync_fw_configs()
Farmbot.BotState.reset_sync_status()
{:ok, env}
end
end
| Speed up factory resetting of fw params | Speed up factory resetting of fw params
| Elixir | mit | FarmBot/farmbot_os,FarmBot/farmbot_os,FarmBot/farmbot_os,FarmBot/farmbot_os | elixir | ## Code Before:
defmodule Farmbot.CeleryScript.AST.Node.FactoryReset do
@moduledoc false
use Farmbot.CeleryScript.AST.Node
allow_args [:package]
use Farmbot.Logger
def execute(%{package: :farmbot_os}, _, env) do
env = mutate_env(env)
Farmbot.BotState.set_sync_status(:maintenance)
Farmbot.BotState.force_state_push()
Farmbot.System.ConfigStorage.update_config_value(:bool, "settings", "disable_factory_reset", false)
Farmbot.HTTP.delete("/api/fbos_config")
Logger.warn 1, "Farmbot OS going down for factory reset!"
Farmbot.System.factory_reset "CeleryScript request."
{:ok, env}
end
def execute(%{package: :arduino_firmware}, _, env) do
env = mutate_env(env)
Farmbot.BotState.set_sync_status(:maintenance)
Logger.warn 1, "Arduino Firmware going down for factory reset!"
params = Farmbot.System.ConfigStorage.get_config_as_map["hardware_params"]
for {param, _val} <- params do
Farmbot.Firmware.update_param(:"#{param}", -1)
end
Farmbot.BotState.force_state_push()
Farmbot.Firmware.read_all_params()
Farmbot.System.reboot("Arduino factory reset.")
{:ok, env}
end
end
## Instruction:
Speed up factory resetting of fw params
## Code After:
defmodule Farmbot.CeleryScript.AST.Node.FactoryReset do
@moduledoc false
use Farmbot.CeleryScript.AST.Node
allow_args [:package]
use Farmbot.Logger
def execute(%{package: :farmbot_os}, _, env) do
env = mutate_env(env)
Farmbot.BotState.set_sync_status(:maintenance)
Farmbot.BotState.force_state_push()
Farmbot.System.ConfigStorage.update_config_value(:bool, "settings", "disable_factory_reset", false)
Farmbot.HTTP.delete("/api/fbos_config")
Logger.warn 1, "Farmbot OS going down for factory reset!"
Farmbot.System.factory_reset "CeleryScript request."
{:ok, env}
end
def execute(%{package: :arduino_firmware}, _, env) do
env = mutate_env(env)
Farmbot.BotState.set_sync_status(:maintenance)
Logger.warn 1, "Arduino Firmware going down for factory reset!"
Farmbot.HTTP.delete!("/api/firmware_config")
pl = Poison.encode!(%{"api_migrated" => true})
Farmbot.HTTP.put!("/api/firmware_config", pl)
Farmbot.Bootstrap.SettingsSync.do_sync_fw_configs()
Farmbot.BotState.reset_sync_status()
{:ok, env}
end
end
| defmodule Farmbot.CeleryScript.AST.Node.FactoryReset do
@moduledoc false
use Farmbot.CeleryScript.AST.Node
allow_args [:package]
use Farmbot.Logger
def execute(%{package: :farmbot_os}, _, env) do
env = mutate_env(env)
Farmbot.BotState.set_sync_status(:maintenance)
Farmbot.BotState.force_state_push()
Farmbot.System.ConfigStorage.update_config_value(:bool, "settings", "disable_factory_reset", false)
Farmbot.HTTP.delete("/api/fbos_config")
Logger.warn 1, "Farmbot OS going down for factory reset!"
Farmbot.System.factory_reset "CeleryScript request."
{:ok, env}
end
def execute(%{package: :arduino_firmware}, _, env) do
env = mutate_env(env)
Farmbot.BotState.set_sync_status(:maintenance)
Logger.warn 1, "Arduino Firmware going down for factory reset!"
+ Farmbot.HTTP.delete!("/api/firmware_config")
+ pl = Poison.encode!(%{"api_migrated" => true})
+ Farmbot.HTTP.put!("/api/firmware_config", pl)
+ Farmbot.Bootstrap.SettingsSync.do_sync_fw_configs()
- params = Farmbot.System.ConfigStorage.get_config_as_map["hardware_params"]
- for {param, _val} <- params do
- Farmbot.Firmware.update_param(:"#{param}", -1)
- end
-
- Farmbot.BotState.force_state_push()
? -- - --- -
+ Farmbot.BotState.reset_sync_status()
? ++++++++
- Farmbot.Firmware.read_all_params()
- Farmbot.System.reboot("Arduino factory reset.")
{:ok, env}
end
end | 13 | 0.40625 | 5 | 8 |
20747931e9bf06bd418d1bf5efb0ba29d70775d0 | README.md | README.md | a real time messaging system
| **quantum tunnel** is an open source real time messaging system.
## Key Features
* Supports multi-connected systems.
* Supports WebSockets, forever frames and long polling.
* Supports .Net and NodeJs backends.
* Supports one-to-one, one-to-many, and many-to-many scenarios.
## How to use
* Check the samples project
| Update readme.md, Added more clarifications | Update readme.md, Added more clarifications
| Markdown | mit | sharpcodex/quantum-tunnel,sharpcodex/quantum-tunnel,sharpcodex/quantum-tunnel | markdown | ## Code Before:
a real time messaging system
## Instruction:
Update readme.md, Added more clarifications
## Code After:
**quantum tunnel** is an open source real time messaging system.
## Key Features
* Supports multi-connected systems.
* Supports WebSockets, forever frames and long polling.
* Supports .Net and NodeJs backends.
* Supports one-to-one, one-to-many, and many-to-many scenarios.
## How to use
* Check the samples project
| - a real time messaging system
+ **quantum tunnel** is an open source real time messaging system.
+
+ ## Key Features
+ * Supports multi-connected systems.
+ * Supports WebSockets, forever frames and long polling.
+ * Supports .Net and NodeJs backends.
+ * Supports one-to-one, one-to-many, and many-to-many scenarios.
+
+ ## How to use
+ * Check the samples project | 11 | 11 | 10 | 1 |
2936fb3cbbd3d6fc2332fcaca6306a77fa743065 | config/genomes/TAIR10-resources.yaml | config/genomes/TAIR10-resources.yaml | version: 4
aliases:
snpeff: athaliana130
srnaseq:
srna-transcripts: ../srnaseq/srna-transcripts.gtf
mirbase-hairpin: ../srnaseq/hairpin.fa
mirbase-mature: ../srnaseq/mature.fa
mirdeep2-fasta: ../srnaseq/Rfam_for_miRDeep.fa
| version: 5
aliases:
snpeff: athaliana130
srnaseq:
srna-transcripts: ../srnaseq/srna-transcripts.gtf
mirbase-hairpin: ../srnaseq/hairpin.fa
mirbase-mature: ../srnaseq/mature.fa
| Update TAIR10 genome to avoid mirdeep2 | Update TAIR10 genome to avoid mirdeep2
Skip this until clear idea what is going on.
https://github.com/chapmanb/bcbio-nextgen/issues/1421
Fix version
| YAML | mit | biocyberman/bcbio-nextgen,vladsaveliev/bcbio-nextgen,mjafin/bcbio-nextgen,a113n/bcbio-nextgen,vladsaveliev/bcbio-nextgen,chapmanb/bcbio-nextgen,lbeltrame/bcbio-nextgen,chapmanb/bcbio-nextgen,a113n/bcbio-nextgen,biocyberman/bcbio-nextgen,brainstorm/bcbio-nextgen,lbeltrame/bcbio-nextgen,biocyberman/bcbio-nextgen,mjafin/bcbio-nextgen,brainstorm/bcbio-nextgen,vladsaveliev/bcbio-nextgen,chapmanb/bcbio-nextgen,lbeltrame/bcbio-nextgen,brainstorm/bcbio-nextgen,mjafin/bcbio-nextgen,a113n/bcbio-nextgen | yaml | ## Code Before:
version: 4
aliases:
snpeff: athaliana130
srnaseq:
srna-transcripts: ../srnaseq/srna-transcripts.gtf
mirbase-hairpin: ../srnaseq/hairpin.fa
mirbase-mature: ../srnaseq/mature.fa
mirdeep2-fasta: ../srnaseq/Rfam_for_miRDeep.fa
## Instruction:
Update TAIR10 genome to avoid mirdeep2
Skip this until clear idea what is going on.
https://github.com/chapmanb/bcbio-nextgen/issues/1421
Fix version
## Code After:
version: 5
aliases:
snpeff: athaliana130
srnaseq:
srna-transcripts: ../srnaseq/srna-transcripts.gtf
mirbase-hairpin: ../srnaseq/hairpin.fa
mirbase-mature: ../srnaseq/mature.fa
| - version: 4
? ^
+ version: 5
? ^
aliases:
snpeff: athaliana130
srnaseq:
srna-transcripts: ../srnaseq/srna-transcripts.gtf
mirbase-hairpin: ../srnaseq/hairpin.fa
mirbase-mature: ../srnaseq/mature.fa
- mirdeep2-fasta: ../srnaseq/Rfam_for_miRDeep.fa
| 3 | 0.272727 | 1 | 2 |
61ac87be10d3de5b93d84b3ec785263f1fb324af | Website/Views/starter.html | Website/Views/starter.html | @Master['master.html']
@Section['MainContent']
<section class="content-header">
<h1>
Page Header
<small>Optional description</small>
</h1>
<ol class="breadcrumb">
<li><a href="#"><i class="fa fa-dashboard"></i> Level</a></li>
<li class="active">Here</li>
</ol>
</section>
<!-- Main content -->
<section class="content">
something here
<!-- Your Page Content Here -->
</section>
@EndSection
| @Master['master.html']
@Section['MainContent']
<section class="content-header">
<h1>
Latest test results
<small>2/26/2017 9:00:03 PM</small>
</h1>
</section>
<section class="content">
<div class="box">
<div class="overlay">
<i class="fa fa-refresh fa-spin"></i>
</div>
<div class="box-body table-responsive no-padding">
<table class="table table-hover">
<tr><td>
Ping
</td><td>
32 ms
</td></tr>
<tr><td>
Download speed
</td><td>
55 Mbit/s
</td></tr>
<tr><td>
Upload speed
</td><td>
4.9 Mbit/s
</td></tr>
</table>
</div>
</div>
<div class="box">
<div class="overlay">
<i class="fa fa-refresh fa-spin"></i>
</div>
<div class="box-header">
Download speed
</div>
<div class="box-body">
chart
</div>
</div>
<div class="box">
<div class="overlay">
<i class="fa fa-refresh fa-spin"></i>
</div>
<div class="box-header">
Upload speed
</div>
<div class="box-body">
chart
</div>
</div>
</section>
@EndSection
| Add in the placeholders for the last test result | Add in the placeholders for the last test result
| HTML | mit | adrianbanks/BroadbandSpeedStats,adrianbanks/BroadbandSpeedStats,adrianbanks/BroadbandSpeedStats,adrianbanks/BroadbandSpeedStats | html | ## Code Before:
@Master['master.html']
@Section['MainContent']
<section class="content-header">
<h1>
Page Header
<small>Optional description</small>
</h1>
<ol class="breadcrumb">
<li><a href="#"><i class="fa fa-dashboard"></i> Level</a></li>
<li class="active">Here</li>
</ol>
</section>
<!-- Main content -->
<section class="content">
something here
<!-- Your Page Content Here -->
</section>
@EndSection
## Instruction:
Add in the placeholders for the last test result
## Code After:
@Master['master.html']
@Section['MainContent']
<section class="content-header">
<h1>
Latest test results
<small>2/26/2017 9:00:03 PM</small>
</h1>
</section>
<section class="content">
<div class="box">
<div class="overlay">
<i class="fa fa-refresh fa-spin"></i>
</div>
<div class="box-body table-responsive no-padding">
<table class="table table-hover">
<tr><td>
Ping
</td><td>
32 ms
</td></tr>
<tr><td>
Download speed
</td><td>
55 Mbit/s
</td></tr>
<tr><td>
Upload speed
</td><td>
4.9 Mbit/s
</td></tr>
</table>
</div>
</div>
<div class="box">
<div class="overlay">
<i class="fa fa-refresh fa-spin"></i>
</div>
<div class="box-header">
Download speed
</div>
<div class="box-body">
chart
</div>
</div>
<div class="box">
<div class="overlay">
<i class="fa fa-refresh fa-spin"></i>
</div>
<div class="box-header">
Upload speed
</div>
<div class="box-body">
chart
</div>
</div>
</section>
@EndSection
| @Master['master.html']
@Section['MainContent']
<section class="content-header">
<h1>
- Page Header
- <small>Optional description</small>
+ Latest test results
+ <small>2/26/2017 9:00:03 PM</small>
</h1>
- <ol class="breadcrumb">
- <li><a href="#"><i class="fa fa-dashboard"></i> Level</a></li>
- <li class="active">Here</li>
- </ol>
</section>
- <!-- Main content -->
<section class="content">
- something here
- <!-- Your Page Content Here -->
+ <div class="box">
+ <div class="overlay">
+ <i class="fa fa-refresh fa-spin"></i>
+ </div>
+ <div class="box-body table-responsive no-padding">
+ <table class="table table-hover">
+ <tr><td>
+ Ping
+ </td><td>
+ 32 ms
+ </td></tr>
+
+ <tr><td>
+ Download speed
+ </td><td>
+ 55 Mbit/s
+ </td></tr>
+
+ <tr><td>
+ Upload speed
+ </td><td>
+ 4.9 Mbit/s
+ </td></tr>
+ </table>
+ </div>
+ </div>
+
+ <div class="box">
+ <div class="overlay">
+ <i class="fa fa-refresh fa-spin"></i>
+ </div>
+
+ <div class="box-header">
+ Download speed
+ </div>
+
+ <div class="box-body">
+ chart
+ </div>
+ </div>
+
+ <div class="box">
+ <div class="overlay">
+ <i class="fa fa-refresh fa-spin"></i>
+ </div>
+
+ <div class="box-header">
+ Upload speed
+ </div>
+
+ <div class="box-body">
+ chart
+ </div>
+ </div>
</section>
@EndSection | 65 | 3.095238 | 56 | 9 |
a139b760243fad68c9bb3c9b770d2f69928ebaa4 | tasks/security/root_auth_plugin.yml | tasks/security/root_auth_plugin.yml | ---
# On some installations the MySQL root user has the auth plugin check_token configured.
# To change the root password we have to first change the auth plugin to mysql_native_password here.
# We need to adjust .my.cnf here so that the other tasks will work as expected.
- name: check auth system capabilities
command: mysql -NBe "DESCRIBE mysql.user plugin"
register: mysql_check_new_auth
changed_when: false
check_mode: no
when: "mysql_root_password|default('') != ''"
- name: check auth plugin of root user
command: mysql -NBe "SELECT plugin FROM mysql.user WHERE User = 'root' AND plugin != 'mysql_native_password'"
register: mysql_check_root_auth_plugin
changed_when: false
check_mode: no
when: "mysql_root_password|default('') != '' and mysql_check_new_auth.stdout != ''"
- name: ensure root user has password set using mysql_native_password
command: "mysql -NBe \"UPDATE mysql.user SET password = PASSWORD('{{ mysql_root_password }}'), plugin = '' WHERE user = 'root'\""
when: "mysql_root_password|default('') != '' and mysql_check_root_auth_plugin.stdout != ''"
- include: my_cnf.yml
when: "mysql_root_password|default('') != '' and mysql_check_root_auth_plugin.stdout != ''"
| ---
# On some installations the MySQL root user has the auth plugin check_token configured.
# To change the root password we have to first change the auth plugin to mysql_native_password here.
- name: check auth system capabilities
command: mysql -NBe "DESCRIBE mysql.user plugin"
register: mysql_check_new_auth
changed_when: false
check_mode: no
when: "mysql_root_password|default('') != ''"
- name: check auth plugin of root user
command: mysql -NBe "SELECT plugin FROM mysql.user WHERE User = 'root' AND plugin != 'mysql_native_password'"
register: mysql_check_root_auth_plugin
changed_when: false
check_mode: no
when: "mysql_root_password|default('') != '' and mysql_check_new_auth.stdout != ''"
- name: ensure root user uses mysql_native_password
command: "mysql -NBe \"UPDATE mysql.user SET plugin = 'mysql_native_password' WHERE user = 'root'\""
when: "mysql_root_password|default('') != '' and mysql_check_root_auth_plugin.stdout != ''"
| Fix changing of auth plugin for root user | Fix changing of auth plugin for root user
| YAML | mit | mjanser/ansible-role-mysql | yaml | ## Code Before:
---
# On some installations the MySQL root user has the auth plugin check_token configured.
# To change the root password we have to first change the auth plugin to mysql_native_password here.
# We need to adjust .my.cnf here so that the other tasks will work as expected.
- name: check auth system capabilities
command: mysql -NBe "DESCRIBE mysql.user plugin"
register: mysql_check_new_auth
changed_when: false
check_mode: no
when: "mysql_root_password|default('') != ''"
- name: check auth plugin of root user
command: mysql -NBe "SELECT plugin FROM mysql.user WHERE User = 'root' AND plugin != 'mysql_native_password'"
register: mysql_check_root_auth_plugin
changed_when: false
check_mode: no
when: "mysql_root_password|default('') != '' and mysql_check_new_auth.stdout != ''"
- name: ensure root user has password set using mysql_native_password
command: "mysql -NBe \"UPDATE mysql.user SET password = PASSWORD('{{ mysql_root_password }}'), plugin = '' WHERE user = 'root'\""
when: "mysql_root_password|default('') != '' and mysql_check_root_auth_plugin.stdout != ''"
- include: my_cnf.yml
when: "mysql_root_password|default('') != '' and mysql_check_root_auth_plugin.stdout != ''"
## Instruction:
Fix changing of auth plugin for root user
## Code After:
---
# On some installations the MySQL root user has the auth plugin check_token configured.
# To change the root password we have to first change the auth plugin to mysql_native_password here.
- name: check auth system capabilities
command: mysql -NBe "DESCRIBE mysql.user plugin"
register: mysql_check_new_auth
changed_when: false
check_mode: no
when: "mysql_root_password|default('') != ''"
- name: check auth plugin of root user
command: mysql -NBe "SELECT plugin FROM mysql.user WHERE User = 'root' AND plugin != 'mysql_native_password'"
register: mysql_check_root_auth_plugin
changed_when: false
check_mode: no
when: "mysql_root_password|default('') != '' and mysql_check_new_auth.stdout != ''"
- name: ensure root user uses mysql_native_password
command: "mysql -NBe \"UPDATE mysql.user SET plugin = 'mysql_native_password' WHERE user = 'root'\""
when: "mysql_root_password|default('') != '' and mysql_check_root_auth_plugin.stdout != ''"
| ---
# On some installations the MySQL root user has the auth plugin check_token configured.
# To change the root password we have to first change the auth plugin to mysql_native_password here.
- # We need to adjust .my.cnf here so that the other tasks will work as expected.
- name: check auth system capabilities
command: mysql -NBe "DESCRIBE mysql.user plugin"
register: mysql_check_new_auth
changed_when: false
check_mode: no
when: "mysql_root_password|default('') != ''"
- name: check auth plugin of root user
command: mysql -NBe "SELECT plugin FROM mysql.user WHERE User = 'root' AND plugin != 'mysql_native_password'"
register: mysql_check_root_auth_plugin
changed_when: false
check_mode: no
when: "mysql_root_password|default('') != '' and mysql_check_new_auth.stdout != ''"
- - name: ensure root user has password set using mysql_native_password
? ^^^^^^^^^^^^^ --- ---
+ - name: ensure root user uses mysql_native_password
? ^
- command: "mysql -NBe \"UPDATE mysql.user SET password = PASSWORD('{{ mysql_root_password }}'), plugin = '' WHERE user = 'root'\""
? ^^^^^^^ --------- --- ^^^ -----------------
+ command: "mysql -NBe \"UPDATE mysql.user SET plugin = 'mysql_native_password' WHERE user = 'root'\""
? ^^^^^ ^^ +++
when: "mysql_root_password|default('') != '' and mysql_check_root_auth_plugin.stdout != ''"
-
- - include: my_cnf.yml
- when: "mysql_root_password|default('') != '' and mysql_check_root_auth_plugin.stdout != ''" | 8 | 0.32 | 2 | 6 |
e36268f3a20ea2f4881d850f3f1ee0f7908d5f64 | spec/unit/collection_spec.rb | spec/unit/collection_spec.rb |
require 'spec_helper'
require 'guacamole/collection'
class TestCollection
include Guacamole::Collection
end
describe Guacamole::Collection do
class FakeMapper
def document_to_model(document)
document
end
end
subject { TestCollection }
describe 'Configuration' do
it 'should set the connection to ArangoDB' do
mock_db_connection = double('ConnectionToCollection')
subject.connection = mock_db_connection
expect(subject.connection).to eq mock_db_connection
end
it 'should set the Mapper instance to map documents to models and vice versa' do
mock_mapper = double('Mapper')
subject.mapper = mock_mapper
expect(subject.mapper).to eq mock_mapper
end
end
let(:connection) { double('Connection') }
let(:mapper) { FakeMapper.new }
it 'should provide a method to get mapped documents by key from the database' do
subject.connection = connection
subject.mapper = mapper
document = { data: 'foo' }
expect(connection).to receive(:fetch).with('some_key').and_return(document)
expect(mapper).to receive(:document_to_model).with(document).and_call_original
model = subject.by_key 'some_key'
expect(model[:data]).to eq 'foo'
end
end
|
require 'spec_helper'
require 'guacamole/collection'
class TestCollection
include Guacamole::Collection
end
describe Guacamole::Collection do
subject { TestCollection }
describe 'Configuration' do
it 'should set the connection to ArangoDB' do
mock_db_connection = double('ConnectionToCollection')
subject.connection = mock_db_connection
expect(subject.connection).to eq mock_db_connection
end
it 'should set the Mapper instance to map documents to models and vice versa' do
mock_mapper = double('Mapper')
subject.mapper = mock_mapper
expect(subject.mapper).to eq mock_mapper
end
end
let(:connection) { double('Connection') }
let(:mapper) { double('Mapper') }
it 'should provide a method to get mapped documents by key from the database' do
subject.connection = connection
subject.mapper = mapper
document = { data: 'foo' }
model = double('Model')
expect(connection).to receive(:fetch).with('some_key').and_return(document)
expect(mapper).to receive(:document_to_model).with(document).and_return(model)
expect(subject.by_key('some_key')).to eq model
end
end
| Use a double instead of a fake implemenation | Use a double instead of a fake implemenation
| Ruby | apache-2.0 | jabbrwcky/guacamole,triAGENS/guacamole,jabbrwcky/guacamole,triAGENS/guacamole,triAGENS/guacamole,triAGENS/guacamole,jabbrwcky/guacamole,jabbrwcky/guacamole | ruby | ## Code Before:
require 'spec_helper'
require 'guacamole/collection'
class TestCollection
include Guacamole::Collection
end
describe Guacamole::Collection do
class FakeMapper
def document_to_model(document)
document
end
end
subject { TestCollection }
describe 'Configuration' do
it 'should set the connection to ArangoDB' do
mock_db_connection = double('ConnectionToCollection')
subject.connection = mock_db_connection
expect(subject.connection).to eq mock_db_connection
end
it 'should set the Mapper instance to map documents to models and vice versa' do
mock_mapper = double('Mapper')
subject.mapper = mock_mapper
expect(subject.mapper).to eq mock_mapper
end
end
let(:connection) { double('Connection') }
let(:mapper) { FakeMapper.new }
it 'should provide a method to get mapped documents by key from the database' do
subject.connection = connection
subject.mapper = mapper
document = { data: 'foo' }
expect(connection).to receive(:fetch).with('some_key').and_return(document)
expect(mapper).to receive(:document_to_model).with(document).and_call_original
model = subject.by_key 'some_key'
expect(model[:data]).to eq 'foo'
end
end
## Instruction:
Use a double instead of a fake implemenation
## Code After:
require 'spec_helper'
require 'guacamole/collection'
class TestCollection
include Guacamole::Collection
end
describe Guacamole::Collection do
subject { TestCollection }
describe 'Configuration' do
it 'should set the connection to ArangoDB' do
mock_db_connection = double('ConnectionToCollection')
subject.connection = mock_db_connection
expect(subject.connection).to eq mock_db_connection
end
it 'should set the Mapper instance to map documents to models and vice versa' do
mock_mapper = double('Mapper')
subject.mapper = mock_mapper
expect(subject.mapper).to eq mock_mapper
end
end
let(:connection) { double('Connection') }
let(:mapper) { double('Mapper') }
it 'should provide a method to get mapped documents by key from the database' do
subject.connection = connection
subject.mapper = mapper
document = { data: 'foo' }
model = double('Model')
expect(connection).to receive(:fetch).with('some_key').and_return(document)
expect(mapper).to receive(:document_to_model).with(document).and_return(model)
expect(subject.by_key('some_key')).to eq model
end
end
|
require 'spec_helper'
require 'guacamole/collection'
class TestCollection
include Guacamole::Collection
end
describe Guacamole::Collection do
-
- class FakeMapper
- def document_to_model(document)
- document
- end
- end
subject { TestCollection }
describe 'Configuration' do
it 'should set the connection to ArangoDB' do
mock_db_connection = double('ConnectionToCollection')
subject.connection = mock_db_connection
expect(subject.connection).to eq mock_db_connection
end
it 'should set the Mapper instance to map documents to models and vice versa' do
mock_mapper = double('Mapper')
subject.mapper = mock_mapper
expect(subject.mapper).to eq mock_mapper
end
end
let(:connection) { double('Connection') }
- let(:mapper) { FakeMapper.new }
? ^^^ ^^^^
+ let(:mapper) { double('Mapper') }
? ^^^^^ ++ ^^
it 'should provide a method to get mapped documents by key from the database' do
subject.connection = connection
subject.mapper = mapper
document = { data: 'foo' }
+ model = double('Model')
expect(connection).to receive(:fetch).with('some_key').and_return(document)
- expect(mapper).to receive(:document_to_model).with(document).and_call_original
? ^^ ^^^^^^^^^^
+ expect(mapper).to receive(:document_to_model).with(document).and_return(model)
? ^^^^^^^^^^^ ^
+ expect(subject.by_key('some_key')).to eq model
- model = subject.by_key 'some_key'
- expect(model[:data]).to eq 'foo'
end
end | 14 | 0.28 | 4 | 10 |
ab1b9798a03880cc36e49de32d2e4f6bfb55e104 | normandy/control/static/control/js/components/ActionForm.jsx | normandy/control/static/control/js/components/ActionForm.jsx | import React from 'react'
import { reduxForm } from 'redux-form'
import { _ } from 'underscore'
import HeartbeatForm from './action_forms/HeartbeatForm.jsx'
import ConsoleLogForm from './action_forms/ConsoleLogForm.jsx'
export class ActionForm extends React.Component {
render() {
const { fields, arguments_schema, name } = this.props;
let childForm = 'No action form available';
switch(name) {
case 'show-heartbeat':
childForm = (<HeartbeatForm fields={fields} />);
break;
case 'console-log':
childForm = (<ConsoleLogForm fields={fields} />);
break;
default:
childForm = childForm;
}
return (
<div id="action-configuration">
<i className="fa fa-caret-up fa-lg"></i>
<div className="row">
<p className="help fluid-4">{arguments_schema.description || arguments_schema.title }</p>
</div>
{childForm}
</div>
)
}
}
export default reduxForm({
form: 'action',
}, (state, props) => {
let initialValues = {};
if (props.recipe && props.recipe.action_name === props.name) {
initialValues = props.recipe['arguments'];
}
return {
initialValues
}
})(ActionForm)
| import React from 'react'
import { reduxForm } from 'redux-form'
import { _ } from 'underscore'
import HeartbeatForm from './action_forms/HeartbeatForm.jsx'
import ConsoleLogForm from './action_forms/ConsoleLogForm.jsx'
export class ActionForm extends React.Component {
render() {
const { fields, arguments_schema, name } = this.props;
let childForm = 'No action form available';
switch(name) {
case 'show-heartbeat':
childForm = (<HeartbeatForm fields={fields} />);
break;
case 'console-log':
childForm = (<ConsoleLogForm fields={fields} />);
break;
}
return (
<div id="action-configuration">
<i className="fa fa-caret-up fa-lg"></i>
<div className="row">
<p className="help fluid-4">{arguments_schema.description || arguments_schema.title }</p>
</div>
{childForm}
</div>
)
}
}
export default reduxForm({
form: 'action',
}, (state, props) => {
let initialValues = {};
if (props.recipe && props.recipe.action_name === props.name) {
initialValues = props.recipe['arguments'];
}
return {
initialValues
}
})(ActionForm)
| Remove default action form clause | Remove default action form clause
| JSX | mpl-2.0 | Osmose/normandy,Osmose/normandy,mozilla/normandy,mozilla/normandy,mozilla/normandy,Osmose/normandy,mozilla/normandy,Osmose/normandy | jsx | ## Code Before:
import React from 'react'
import { reduxForm } from 'redux-form'
import { _ } from 'underscore'
import HeartbeatForm from './action_forms/HeartbeatForm.jsx'
import ConsoleLogForm from './action_forms/ConsoleLogForm.jsx'
export class ActionForm extends React.Component {
render() {
const { fields, arguments_schema, name } = this.props;
let childForm = 'No action form available';
switch(name) {
case 'show-heartbeat':
childForm = (<HeartbeatForm fields={fields} />);
break;
case 'console-log':
childForm = (<ConsoleLogForm fields={fields} />);
break;
default:
childForm = childForm;
}
return (
<div id="action-configuration">
<i className="fa fa-caret-up fa-lg"></i>
<div className="row">
<p className="help fluid-4">{arguments_schema.description || arguments_schema.title }</p>
</div>
{childForm}
</div>
)
}
}
export default reduxForm({
form: 'action',
}, (state, props) => {
let initialValues = {};
if (props.recipe && props.recipe.action_name === props.name) {
initialValues = props.recipe['arguments'];
}
return {
initialValues
}
})(ActionForm)
## Instruction:
Remove default action form clause
## Code After:
import React from 'react'
import { reduxForm } from 'redux-form'
import { _ } from 'underscore'
import HeartbeatForm from './action_forms/HeartbeatForm.jsx'
import ConsoleLogForm from './action_forms/ConsoleLogForm.jsx'
export class ActionForm extends React.Component {
render() {
const { fields, arguments_schema, name } = this.props;
let childForm = 'No action form available';
switch(name) {
case 'show-heartbeat':
childForm = (<HeartbeatForm fields={fields} />);
break;
case 'console-log':
childForm = (<ConsoleLogForm fields={fields} />);
break;
}
return (
<div id="action-configuration">
<i className="fa fa-caret-up fa-lg"></i>
<div className="row">
<p className="help fluid-4">{arguments_schema.description || arguments_schema.title }</p>
</div>
{childForm}
</div>
)
}
}
export default reduxForm({
form: 'action',
}, (state, props) => {
let initialValues = {};
if (props.recipe && props.recipe.action_name === props.name) {
initialValues = props.recipe['arguments'];
}
return {
initialValues
}
})(ActionForm)
| import React from 'react'
import { reduxForm } from 'redux-form'
import { _ } from 'underscore'
import HeartbeatForm from './action_forms/HeartbeatForm.jsx'
import ConsoleLogForm from './action_forms/ConsoleLogForm.jsx'
export class ActionForm extends React.Component {
render() {
const { fields, arguments_schema, name } = this.props;
let childForm = 'No action form available';
switch(name) {
case 'show-heartbeat':
childForm = (<HeartbeatForm fields={fields} />);
break;
case 'console-log':
childForm = (<ConsoleLogForm fields={fields} />);
break;
- default:
- childForm = childForm;
}
return (
<div id="action-configuration">
<i className="fa fa-caret-up fa-lg"></i>
<div className="row">
<p className="help fluid-4">{arguments_schema.description || arguments_schema.title }</p>
</div>
{childForm}
</div>
)
}
}
export default reduxForm({
form: 'action',
}, (state, props) => {
let initialValues = {};
if (props.recipe && props.recipe.action_name === props.name) {
initialValues = props.recipe['arguments'];
}
return {
initialValues
}
})(ActionForm) | 2 | 0.042553 | 0 | 2 |
c085cbcb52040417379d24859e3c25a3ff0f2b29 | docs/index.rst | docs/index.rst | .. iTerm2 Tools documentation master file, created by
sphinx-quickstart on Mon Aug 24 23:12:15 2015.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
Welcome to iTerm2 Tools's documentation!
========================================
Contents:
.. toctree::
:maxdepth: 2
images
shell_integration
ipython
Indices and tables
==================
* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`
| .. iTerm2 Tools documentation master file, created by
sphinx-quickstart on Mon Aug 24 23:12:15 2015.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
==============
iTerm2 Tools
==============
iTerm2 tools for Python
Some tools for working with iTerm2's proprietary escape codes in Python.
Supports Python 2.7, 3.3, and 3.4.
The source code is on `GitHub <https://github.com/asmeurer/iterm2-tools>`_.
Installation
------------
.. code::
pip install iterm2_tools
or
.. code::
conda install -c asmeurer iterm2_tools
Documentation
-------------
Contents:
.. toctree::
:maxdepth: 2
images
shell_integration
ipython
Indices and tables
==================
* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`
License
~~~~~~~
`MIT <https://github.com/asmeurer/iterm2-tools/blob/master/LICENSE>`_
| Add some information to the front page of the docs | Add some information to the front page of the docs
| reStructuredText | mit | asmeurer/iterm2-tools | restructuredtext | ## Code Before:
.. iTerm2 Tools documentation master file, created by
sphinx-quickstart on Mon Aug 24 23:12:15 2015.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
Welcome to iTerm2 Tools's documentation!
========================================
Contents:
.. toctree::
:maxdepth: 2
images
shell_integration
ipython
Indices and tables
==================
* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`
## Instruction:
Add some information to the front page of the docs
## Code After:
.. iTerm2 Tools documentation master file, created by
sphinx-quickstart on Mon Aug 24 23:12:15 2015.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
==============
iTerm2 Tools
==============
iTerm2 tools for Python
Some tools for working with iTerm2's proprietary escape codes in Python.
Supports Python 2.7, 3.3, and 3.4.
The source code is on `GitHub <https://github.com/asmeurer/iterm2-tools>`_.
Installation
------------
.. code::
pip install iterm2_tools
or
.. code::
conda install -c asmeurer iterm2_tools
Documentation
-------------
Contents:
.. toctree::
:maxdepth: 2
images
shell_integration
ipython
Indices and tables
==================
* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`
License
~~~~~~~
`MIT <https://github.com/asmeurer/iterm2-tools/blob/master/LICENSE>`_
| .. iTerm2 Tools documentation master file, created by
sphinx-quickstart on Mon Aug 24 23:12:15 2015.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
- Welcome to iTerm2 Tools's documentation!
- ========================================
+ ==============
+ iTerm2 Tools
+ ==============
+
+ iTerm2 tools for Python
+
+ Some tools for working with iTerm2's proprietary escape codes in Python.
+
+ Supports Python 2.7, 3.3, and 3.4.
+
+ The source code is on `GitHub <https://github.com/asmeurer/iterm2-tools>`_.
+
+ Installation
+ ------------
+
+ .. code::
+
+ pip install iterm2_tools
+
+ or
+
+ .. code::
+
+ conda install -c asmeurer iterm2_tools
+
+
+
+ Documentation
+ -------------
Contents:
.. toctree::
:maxdepth: 2
images
shell_integration
ipython
Indices and tables
==================
* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`
+
+ License
+ ~~~~~~~
+
+ `MIT <https://github.com/asmeurer/iterm2-tools/blob/master/LICENSE>`_ | 36 | 1.565217 | 34 | 2 |
702db435c5f3e6bc785c20eaf3c65b72df5c83ac | assets/scss/modules/_main.scss | assets/scss/modules/_main.scss | .main-content {
min-height: 100%;
padding: $alpha_body_vertical_spacing 1em $footer_height $alpha_body_vertical_spacing;
} | .main-content {
min-height: 100%;
padding: $alpha_body_vertical_spacing 1em #{$footer_height + 16px} 1em;
@include mq(640) {
padding-bottom: $footer_height + 136;
}
} | Increase main content spacing to footer | Increase main content spacing to footer
| SCSS | mit | ThoughtWorksInc/objective8,d-cent/objective8,d-cent/objective8,prisamuel/objective8,d-cent/objective8,ThoughtWorksInc/objective8,ThoughtWorksInc/objective8,prisamuel/objective8,d-cent/objective8,ThoughtWorksInc/objective8,prisamuel/objective8,prisamuel/objective8 | scss | ## Code Before:
.main-content {
min-height: 100%;
padding: $alpha_body_vertical_spacing 1em $footer_height $alpha_body_vertical_spacing;
}
## Instruction:
Increase main content spacing to footer
## Code After:
.main-content {
min-height: 100%;
padding: $alpha_body_vertical_spacing 1em #{$footer_height + 16px} 1em;
@include mq(640) {
padding-bottom: $footer_height + 136;
}
} | .main-content {
min-height: 100%;
- padding: $alpha_body_vertical_spacing 1em $footer_height $alpha_body_vertical_spacing;
? ^^^ ^^^^^^^^^ ^^^^^^^^^^^^^^
+ padding: $alpha_body_vertical_spacing 1em #{$footer_height + 16px} 1em;
? ++ ^^^^ ^^^^ ^
+ @include mq(640) {
+ padding-bottom: $footer_height + 136;
+ }
} | 5 | 1.25 | 4 | 1 |
f4f93136aa8a6753ddbf65321eac4786983ff9c9 | README.md | README.md |
Add support for pictures
A ultility that transforms markdown files to json
```json
{
content : [
{
title: "",
description: "",
link: "http://codepen.io/simurai/pen/Atnmy"
img: "carve-me.jpg"
tags: [css]
category: []
layout: post
bodyModel: {
paragraphs: [
]
}
}
]
}
``` |
Add support for pictures
A ultility that transforms markdown files to json | Remove invalid json from ReadMe | Remove invalid json from ReadMe
| Markdown | mit | ArielSaldana/sunset,ArielSaldana/sunset,ArielSaldana/sunset,ArielSaldana/sunset | markdown | ## Code Before:
Add support for pictures
A ultility that transforms markdown files to json
```json
{
content : [
{
title: "",
description: "",
link: "http://codepen.io/simurai/pen/Atnmy"
img: "carve-me.jpg"
tags: [css]
category: []
layout: post
bodyModel: {
paragraphs: [
]
}
}
]
}
```
## Instruction:
Remove invalid json from ReadMe
## Code After:
Add support for pictures
A ultility that transforms markdown files to json |
Add support for pictures
A ultility that transforms markdown files to json
-
- ```json
- {
- content : [
- {
- title: "",
- description: "",
- link: "http://codepen.io/simurai/pen/Atnmy"
- img: "carve-me.jpg"
- tags: [css]
- category: []
- layout: post
- bodyModel: {
- paragraphs: [
-
- ]
- }
- }
- ]
- }
- ``` | 21 | 0.84 | 0 | 21 |
e28021852e496cbe943f5b2b3bee1fb6353a629d | src/js/factories/chat.js | src/js/factories/chat.js | (function() {
'use strict';
// This is my local Docker IRC server
var defaultHost = '192.168.99.100:6667';
angular.module('app.factories.chat', []).
factory('chat', Chat);
Chat.$inject = ['$websocket', '$rootScope'];
function Chat($websocket, $rootScope) {
var ws = $websocket('ws://localhost:6060?server=' + defaultHost);
$rootScope.logs = [];
ws.onMessage(function(message) {
console.log(message);
var d = JSON.parse(message.data);
$rootScope.logs.push(d);
});
ws.onOpen(function() {
console.log('WebSocket opened!');
ws.send({
name: 'SET',
message: defaultHost + '/#roomtest'
});
methods.setNick('paked');
});
var methods = {
sendMessage: function(message) {
ws.send({
name: 'SEND',
message: message,
channel: defaultHost + '/#roomtest'
});
},
setNick: function(nick) {
ws.send({
name: 'NICK',
message: nick
});
}
};
return methods;
}
})();
| (function() {
'use strict';
// This is my local Docker IRC server
var defaultHost = '192.168.99.100:6667';
angular.module('app.factories.chat', []).
factory('chat', Chat);
Chat.$inject = ['$websocket', '$rootScope'];
function Chat($websocket, $rootScope) {
var ws = $websocket('ws://localhost:6060?server=' + defaultHost);
$rootScope.logs = [];
ws.onMessage(function(message) {
console.log(message);
var d = JSON.parse(message.data);
$rootScope.logs.push(d);
});
ws.onOpen(function() {
console.log('WebSocket opened!');
ws.send({
name: 'SET',
message: defaultHost + '/#roomtest'
});
methods.setNick('paked');
});
var methods = {
sendMessage: function(message) {
ws.send({
name: 'SEND',
message: message,
channel: defaultHost + '/#roomtest'
});
},
setNick: function(nick) {
ws.send({
name: 'NICK',
message: nick
});
},
_send: function(obj) {
ws.send(obj);
}
};
return methods;
}
})();
| Add _send function for hacky-ness | Add _send function for hacky-ness
| JavaScript | mit | BigRoom/mystique,BigRoom/mystique | javascript | ## Code Before:
(function() {
'use strict';
// This is my local Docker IRC server
var defaultHost = '192.168.99.100:6667';
angular.module('app.factories.chat', []).
factory('chat', Chat);
Chat.$inject = ['$websocket', '$rootScope'];
function Chat($websocket, $rootScope) {
var ws = $websocket('ws://localhost:6060?server=' + defaultHost);
$rootScope.logs = [];
ws.onMessage(function(message) {
console.log(message);
var d = JSON.parse(message.data);
$rootScope.logs.push(d);
});
ws.onOpen(function() {
console.log('WebSocket opened!');
ws.send({
name: 'SET',
message: defaultHost + '/#roomtest'
});
methods.setNick('paked');
});
var methods = {
sendMessage: function(message) {
ws.send({
name: 'SEND',
message: message,
channel: defaultHost + '/#roomtest'
});
},
setNick: function(nick) {
ws.send({
name: 'NICK',
message: nick
});
}
};
return methods;
}
})();
## Instruction:
Add _send function for hacky-ness
## Code After:
(function() {
'use strict';
// This is my local Docker IRC server
var defaultHost = '192.168.99.100:6667';
angular.module('app.factories.chat', []).
factory('chat', Chat);
Chat.$inject = ['$websocket', '$rootScope'];
function Chat($websocket, $rootScope) {
var ws = $websocket('ws://localhost:6060?server=' + defaultHost);
$rootScope.logs = [];
ws.onMessage(function(message) {
console.log(message);
var d = JSON.parse(message.data);
$rootScope.logs.push(d);
});
ws.onOpen(function() {
console.log('WebSocket opened!');
ws.send({
name: 'SET',
message: defaultHost + '/#roomtest'
});
methods.setNick('paked');
});
var methods = {
sendMessage: function(message) {
ws.send({
name: 'SEND',
message: message,
channel: defaultHost + '/#roomtest'
});
},
setNick: function(nick) {
ws.send({
name: 'NICK',
message: nick
});
},
_send: function(obj) {
ws.send(obj);
}
};
return methods;
}
})();
| (function() {
'use strict';
// This is my local Docker IRC server
var defaultHost = '192.168.99.100:6667';
angular.module('app.factories.chat', []).
factory('chat', Chat);
Chat.$inject = ['$websocket', '$rootScope'];
function Chat($websocket, $rootScope) {
var ws = $websocket('ws://localhost:6060?server=' + defaultHost);
$rootScope.logs = [];
ws.onMessage(function(message) {
console.log(message);
var d = JSON.parse(message.data);
$rootScope.logs.push(d);
});
ws.onOpen(function() {
console.log('WebSocket opened!');
ws.send({
name: 'SET',
message: defaultHost + '/#roomtest'
});
methods.setNick('paked');
});
var methods = {
sendMessage: function(message) {
ws.send({
name: 'SEND',
message: message,
channel: defaultHost + '/#roomtest'
});
},
setNick: function(nick) {
ws.send({
name: 'NICK',
message: nick
});
+ },
+ _send: function(obj) {
+ ws.send(obj);
}
};
return methods;
}
})(); | 3 | 0.058824 | 3 | 0 |
8d778a0eea84f06fdf832de0f458bceaabd1b644 | jacquard/cli.py | jacquard/cli.py | import sys
import pathlib
import argparse
import pkg_resources
from jacquard.config import load_config
def argument_parser():
parser = argparse.ArgumentParser(description="Split testing server")
parser.add_argument(
'-v',
'--verbose',
help="enable verbose output",
action='store_true',
)
parser.add_argument(
'-c',
'--config',
help="config file",
type=pathlib.Path,
default=pathlib.Path('config.cfg'),
)
parser.set_defaults(func=None)
subparsers = parser.add_subparsers(metavar='subcommand')
for entry_point in pkg_resources.iter_entry_points('jacquard.commands'):
command = entry_point.load()()
command_help = getattr(entry_point, 'help', entry_point.name)
subparser = subparsers.add_parser(
entry_point.name,
help=command_help,
description=command_help,
)
subparser.set_defaults(func=command.handle)
command.add_arguments(subparser)
return parser
def main(args=sys.argv[1:]):
parser = argument_parser()
options = parser.parse_args(args)
if options.func is None:
parser.print_usage()
return
# Parse options
config = load_config(options.config)
# Run subcommand
options.func(config, options)
if '__name__' == '__main__':
main()
| import sys
import pathlib
import argparse
import pkg_resources
from jacquard.config import load_config
def argument_parser():
parser = argparse.ArgumentParser(description="Split testing server")
parser.add_argument(
'-v',
'--verbose',
help="enable verbose output",
action='store_true',
)
parser.add_argument(
'-c',
'--config',
help="config file",
type=pathlib.Path,
default=pathlib.Path('config.cfg'),
)
parser.set_defaults(func=None)
subparsers = parser.add_subparsers(metavar='subcommand')
for entry_point in pkg_resources.iter_entry_points('jacquard.commands'):
command = entry_point.load()()
command_help = getattr(command, 'help', entry_point.name)
subparser = subparsers.add_parser(
entry_point.name,
help=command_help,
description=command_help,
)
subparser.set_defaults(func=command.handle)
command.add_arguments(subparser)
return parser
def main(args=sys.argv[1:]):
parser = argument_parser()
options = parser.parse_args(args)
if options.func is None:
parser.print_usage()
return
# Parse options
config = load_config(options.config)
# Run subcommand
options.func(config, options)
if '__name__' == '__main__':
main()
| Fix help messages for commands | Fix help messages for commands
| Python | mit | prophile/jacquard,prophile/jacquard | python | ## Code Before:
import sys
import pathlib
import argparse
import pkg_resources
from jacquard.config import load_config
def argument_parser():
parser = argparse.ArgumentParser(description="Split testing server")
parser.add_argument(
'-v',
'--verbose',
help="enable verbose output",
action='store_true',
)
parser.add_argument(
'-c',
'--config',
help="config file",
type=pathlib.Path,
default=pathlib.Path('config.cfg'),
)
parser.set_defaults(func=None)
subparsers = parser.add_subparsers(metavar='subcommand')
for entry_point in pkg_resources.iter_entry_points('jacquard.commands'):
command = entry_point.load()()
command_help = getattr(entry_point, 'help', entry_point.name)
subparser = subparsers.add_parser(
entry_point.name,
help=command_help,
description=command_help,
)
subparser.set_defaults(func=command.handle)
command.add_arguments(subparser)
return parser
def main(args=sys.argv[1:]):
parser = argument_parser()
options = parser.parse_args(args)
if options.func is None:
parser.print_usage()
return
# Parse options
config = load_config(options.config)
# Run subcommand
options.func(config, options)
if '__name__' == '__main__':
main()
## Instruction:
Fix help messages for commands
## Code After:
import sys
import pathlib
import argparse
import pkg_resources
from jacquard.config import load_config
def argument_parser():
parser = argparse.ArgumentParser(description="Split testing server")
parser.add_argument(
'-v',
'--verbose',
help="enable verbose output",
action='store_true',
)
parser.add_argument(
'-c',
'--config',
help="config file",
type=pathlib.Path,
default=pathlib.Path('config.cfg'),
)
parser.set_defaults(func=None)
subparsers = parser.add_subparsers(metavar='subcommand')
for entry_point in pkg_resources.iter_entry_points('jacquard.commands'):
command = entry_point.load()()
command_help = getattr(command, 'help', entry_point.name)
subparser = subparsers.add_parser(
entry_point.name,
help=command_help,
description=command_help,
)
subparser.set_defaults(func=command.handle)
command.add_arguments(subparser)
return parser
def main(args=sys.argv[1:]):
parser = argument_parser()
options = parser.parse_args(args)
if options.func is None:
parser.print_usage()
return
# Parse options
config = load_config(options.config)
# Run subcommand
options.func(config, options)
if '__name__' == '__main__':
main()
| import sys
import pathlib
import argparse
import pkg_resources
from jacquard.config import load_config
def argument_parser():
parser = argparse.ArgumentParser(description="Split testing server")
parser.add_argument(
'-v',
'--verbose',
help="enable verbose output",
action='store_true',
)
parser.add_argument(
'-c',
'--config',
help="config file",
type=pathlib.Path,
default=pathlib.Path('config.cfg'),
)
parser.set_defaults(func=None)
subparsers = parser.add_subparsers(metavar='subcommand')
for entry_point in pkg_resources.iter_entry_points('jacquard.commands'):
command = entry_point.load()()
- command_help = getattr(entry_point, 'help', entry_point.name)
? ^ ^^^^^^^^^
+ command_help = getattr(command, 'help', entry_point.name)
? ^^^^^ ^
subparser = subparsers.add_parser(
entry_point.name,
help=command_help,
description=command_help,
)
subparser.set_defaults(func=command.handle)
command.add_arguments(subparser)
return parser
def main(args=sys.argv[1:]):
parser = argument_parser()
options = parser.parse_args(args)
if options.func is None:
parser.print_usage()
return
# Parse options
config = load_config(options.config)
# Run subcommand
options.func(config, options)
if '__name__' == '__main__':
main() | 2 | 0.032258 | 1 | 1 |
4ddb1162ef8db8b3f03bf3aad98fa302e48c51b6 | src/UI/index.html | src/UI/index.html | <!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>Hermes UI - using React</title>
<script src="https://fb.me/react-15.2.1.min.js"></script>
<script src="https://fb.me/react-dom-15.2.1.min.js"></script>
</head>
<body>
<div>cucu</div>
</body>
</html>
| <!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>Hermes UI - using React</title>
<script src="https://fb.me/react-15.2.1.min.js"></script>
<script src="https://fb.me/react-dom-15.2.1.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/babel-core/5.8.34/browser.min.js"></script>
</head>
<body>
<div id="content"></div>
<script type="text/babel">
var LocationList = React.createClass({
render: function() {
return (
<div className="locationList">
Aici e o listă de angajați
</div>
);
}
});
ReactDOM.render(
<LocationList />,
document.getElementById('content')
);
</script>
</body>
</html>
| Add a very simple react component | Add a very simple react component
| HTML | mit | vgrigoriu/ZeroToHeroHR,vgrigoriu/ZeroToHeroHR | html | ## Code Before:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>Hermes UI - using React</title>
<script src="https://fb.me/react-15.2.1.min.js"></script>
<script src="https://fb.me/react-dom-15.2.1.min.js"></script>
</head>
<body>
<div>cucu</div>
</body>
</html>
## Instruction:
Add a very simple react component
## Code After:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>Hermes UI - using React</title>
<script src="https://fb.me/react-15.2.1.min.js"></script>
<script src="https://fb.me/react-dom-15.2.1.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/babel-core/5.8.34/browser.min.js"></script>
</head>
<body>
<div id="content"></div>
<script type="text/babel">
var LocationList = React.createClass({
render: function() {
return (
<div className="locationList">
Aici e o listă de angajați
</div>
);
}
});
ReactDOM.render(
<LocationList />,
document.getElementById('content')
);
</script>
</body>
</html>
| <!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>Hermes UI - using React</title>
<script src="https://fb.me/react-15.2.1.min.js"></script>
<script src="https://fb.me/react-dom-15.2.1.min.js"></script>
+ <script src="https://cdnjs.cloudflare.com/ajax/libs/babel-core/5.8.34/browser.min.js"></script>
</head>
<body>
- <div>cucu</div>
+ <div id="content"></div>
+ <script type="text/babel">
+ var LocationList = React.createClass({
+ render: function() {
+ return (
+ <div className="locationList">
+ Aici e o listă de angajați
+ </div>
+ );
+ }
+ });
+
+ ReactDOM.render(
+ <LocationList />,
+ document.getElementById('content')
+ );
+ </script>
</body>
</html> | 19 | 1.583333 | 18 | 1 |
55046b33615a338f88c5a2b96a67941716f5f0f0 | app/views/shared/_reqpu.html.haml | app/views/shared/_reqpu.html.haml | .control-group
%label.control-label{:for => "pickup-locations"} Pick up at:
.controls
%select#pickup-locations{:name => 'library_id'}
%option(value='') -- Select a location --
%option(value="149") Africana Circulation
%option(value="249") Cornell in Washington
%option(value="224") Faculty Department Office
%option(value="160") Fine Arts Circulation
%option(value="162") Geneva Circulation
%option(value="167") ILR Circulation
%option(value="171") Law Circulation
%option(value="241") Management Circulation
%option(value="172") Mann Circulation
%option(value="176") Math Circulation
%option(value="179") Music Circulation
%option(value="228") NYC-AAP Remote Program
%option(value="248") NYC-Tech Campus
%option(value="181") Olin Circulation
%option(value="219") Ornithology Circulation
%option(value="188") Uris Circulation
%option(value="189") Vet Circulation
%option(value="151") Annex Circulation
| .control-group
%label.control-label{:for => "pickup-locations"} Pick up at:
.controls
%select#pickup-locations{:name => 'library_id'}
%option(value='') -- Select a location --
%option(value="149") Africana Circulation
%option(value="249") Cornell in Washington
%option(value="224") Faculty Department Office
%option(value="160") Fine Arts Circulation
%option(value="162") Geneva Circulation
%option(value="167") ILR Circulation
%option(value="171") Law Circulation
%option(value="241") Management Circulation
%option(value="172") Mann Circulation
%option(value="176") Math Circulation
%option(value="179") Music Circulation
%option(value="228") NYC-AAP Remote Program
%option(value="250") NYC-CFEM Remote Program
%option(value="248") NYC-Tech Campus
%option(value="181") Olin Circulation
%option(value="219") Ornithology Circulation
%option(value="188") Uris Circulation
%option(value="189") Vet Circulation
%option(value="151") Annex Circulation
| Add new delivery location NYC-CFEM | Add new delivery location NYC-CFEM
| Haml | mit | cul-it/blacklight-cornell-requests,cul-it/blacklight-cornell-requests,cul-it/blacklight-cornell-requests | haml | ## Code Before:
.control-group
%label.control-label{:for => "pickup-locations"} Pick up at:
.controls
%select#pickup-locations{:name => 'library_id'}
%option(value='') -- Select a location --
%option(value="149") Africana Circulation
%option(value="249") Cornell in Washington
%option(value="224") Faculty Department Office
%option(value="160") Fine Arts Circulation
%option(value="162") Geneva Circulation
%option(value="167") ILR Circulation
%option(value="171") Law Circulation
%option(value="241") Management Circulation
%option(value="172") Mann Circulation
%option(value="176") Math Circulation
%option(value="179") Music Circulation
%option(value="228") NYC-AAP Remote Program
%option(value="248") NYC-Tech Campus
%option(value="181") Olin Circulation
%option(value="219") Ornithology Circulation
%option(value="188") Uris Circulation
%option(value="189") Vet Circulation
%option(value="151") Annex Circulation
## Instruction:
Add new delivery location NYC-CFEM
## Code After:
.control-group
%label.control-label{:for => "pickup-locations"} Pick up at:
.controls
%select#pickup-locations{:name => 'library_id'}
%option(value='') -- Select a location --
%option(value="149") Africana Circulation
%option(value="249") Cornell in Washington
%option(value="224") Faculty Department Office
%option(value="160") Fine Arts Circulation
%option(value="162") Geneva Circulation
%option(value="167") ILR Circulation
%option(value="171") Law Circulation
%option(value="241") Management Circulation
%option(value="172") Mann Circulation
%option(value="176") Math Circulation
%option(value="179") Music Circulation
%option(value="228") NYC-AAP Remote Program
%option(value="250") NYC-CFEM Remote Program
%option(value="248") NYC-Tech Campus
%option(value="181") Olin Circulation
%option(value="219") Ornithology Circulation
%option(value="188") Uris Circulation
%option(value="189") Vet Circulation
%option(value="151") Annex Circulation
| .control-group
%label.control-label{:for => "pickup-locations"} Pick up at:
.controls
%select#pickup-locations{:name => 'library_id'}
%option(value='') -- Select a location --
%option(value="149") Africana Circulation
%option(value="249") Cornell in Washington
%option(value="224") Faculty Department Office
%option(value="160") Fine Arts Circulation
%option(value="162") Geneva Circulation
%option(value="167") ILR Circulation
%option(value="171") Law Circulation
%option(value="241") Management Circulation
%option(value="172") Mann Circulation
%option(value="176") Math Circulation
%option(value="179") Music Circulation
%option(value="228") NYC-AAP Remote Program
+ %option(value="250") NYC-CFEM Remote Program
%option(value="248") NYC-Tech Campus
%option(value="181") Olin Circulation
%option(value="219") Ornithology Circulation
%option(value="188") Uris Circulation
%option(value="189") Vet Circulation
%option(value="151") Annex Circulation | 1 | 0.043478 | 1 | 0 |
017739ecfba6745f740049b30d9ae15874772a24 | app/controllers/expenses_controller.rb | app/controllers/expenses_controller.rb | class ExpensesController < ApplicationController
def index
@expenses = Expense.all
end
def new
@expense = Expense.new
end
def create
@expense = Expense.new(expense_params)
@expense.date = Time.zone.now
if @expense.save
redirect_to @expense
else
render 'new'
end
end
def show
@expense = Expense.find(params[:id])
end
def edit
@expense = Expense.find(params[:id])
end
private
def expense_params
params.require(:expense).permit(:name, :price_cents, :category_id)
end
end
| class ExpensesController < ApplicationController
def index
@expenses = Expense.all
end
def new
@expense = Expense.new
end
def create
@expense = Expense.new(expense_params)
@expense.date = Time.zone.now
if @expense.save
redirect_to @expense
else
render 'new'
end
end
def show
@expense = Expense.find(params[:id])
end
def edit
@expense = Expense.find(params[:id])
end
def update
@expense = Expense.find(params[:id])
if @expense.update_attributes(expense_params)
redirect_to expenses_path
else
render 'edit'
end
end
def destroy
Expense.find(params[:id]).destroy
redirect_to expenses_path
end
private
def expense_params
params.require(:expense).permit(:name, :price_cents, :category_id)
end
end
| Add missing update and destroy actions to expense controller | Add missing update and destroy actions to expense controller
| Ruby | mit | pefi-project/pefi,pefi-project/pefi,pefi-project/pefi | ruby | ## Code Before:
class ExpensesController < ApplicationController
def index
@expenses = Expense.all
end
def new
@expense = Expense.new
end
def create
@expense = Expense.new(expense_params)
@expense.date = Time.zone.now
if @expense.save
redirect_to @expense
else
render 'new'
end
end
def show
@expense = Expense.find(params[:id])
end
def edit
@expense = Expense.find(params[:id])
end
private
def expense_params
params.require(:expense).permit(:name, :price_cents, :category_id)
end
end
## Instruction:
Add missing update and destroy actions to expense controller
## Code After:
class ExpensesController < ApplicationController
def index
@expenses = Expense.all
end
def new
@expense = Expense.new
end
def create
@expense = Expense.new(expense_params)
@expense.date = Time.zone.now
if @expense.save
redirect_to @expense
else
render 'new'
end
end
def show
@expense = Expense.find(params[:id])
end
def edit
@expense = Expense.find(params[:id])
end
def update
@expense = Expense.find(params[:id])
if @expense.update_attributes(expense_params)
redirect_to expenses_path
else
render 'edit'
end
end
def destroy
Expense.find(params[:id]).destroy
redirect_to expenses_path
end
private
def expense_params
params.require(:expense).permit(:name, :price_cents, :category_id)
end
end
| class ExpensesController < ApplicationController
-
def index
@expenses = Expense.all
end
def new
@expense = Expense.new
end
def create
@expense = Expense.new(expense_params)
@expense.date = Time.zone.now
if @expense.save
redirect_to @expense
else
render 'new'
end
end
def show
@expense = Expense.find(params[:id])
end
def edit
@expense = Expense.find(params[:id])
end
+ def update
+ @expense = Expense.find(params[:id])
+ if @expense.update_attributes(expense_params)
+ redirect_to expenses_path
+ else
+ render 'edit'
+ end
+ end
+
+ def destroy
+ Expense.find(params[:id]).destroy
+ redirect_to expenses_path
+ end
+
private
def expense_params
params.require(:expense).permit(:name, :price_cents, :category_id)
end
end | 15 | 0.441176 | 14 | 1 |
072ac067db2c2f3ca0c79c979f39dfb947dc1d8b | spec/lib/sequent/core/serializes_command_spec.rb | spec/lib/sequent/core/serializes_command_spec.rb | require 'spec_helper'
describe Sequent::Core::SerializesCommand do
class RecordMock
include Sequent::Core::SerializesCommand
attr_accessor :aggregate_id,
:created_at,
:user_id,
:command_type,
:command_json
end
class RecordValueObject < Sequent::Core::ValueObject
attrs value: String
end
class RecordCommand < Sequent::Core::Command
attrs value: RecordValueObject
end
let(:value_object) { RecordValueObject.new }
let(:command) { RecordCommand.new(aggregate_id: "1",
user_id: "ben en kim",
value: value_object) }
describe ".command" do
it 'only serializes declared attrs' do
# call valid to let AM generate @errors and @validation_context
command.valid?
record = RecordMock.new
record.command = command
payload = Sequent::Core::Oj.strict_load(record.command_json)
expect(payload).to have_key("aggregate_id")
expect(payload).to have_key("value")
expect(payload["value"]).to_not have_key("errors")
expect(payload["value"]).to have_key("value")
end
end
end
| require 'spec_helper'
describe Sequent::Core::SerializesCommand do
class RecordMock
include Sequent::Core::SerializesCommand
attr_accessor :aggregate_id,
:created_at,
:user_id,
:command_type,
:command_json,
:event_aggregate_id,
:event_sequence_number
end
class RecordValueObject < Sequent::Core::ValueObject
attrs value: String
end
class RecordCommand < Sequent::Core::Command
attrs value: RecordValueObject
end
let(:value_object) { RecordValueObject.new }
let(:command) { RecordCommand.new(aggregate_id: "1",
user_id: "ben en kim",
value: value_object) }
describe ".command" do
it 'only serializes declared attrs' do
# call valid to let AM generate @errors and @validation_context
command.valid?
record = RecordMock.new
record.command = command
payload = Sequent::Core::Oj.strict_load(record.command_json)
expect(payload).to have_key("aggregate_id")
expect(payload).to have_key("value")
expect(payload["value"]).to_not have_key("errors")
expect(payload["value"]).to have_key("value")
end
end
end
| Add event aggregate_id and sequence_number to spec | Add event aggregate_id and sequence_number to spec | Ruby | mit | zilverline/sequent,zilverline/sequent | ruby | ## Code Before:
require 'spec_helper'
describe Sequent::Core::SerializesCommand do
class RecordMock
include Sequent::Core::SerializesCommand
attr_accessor :aggregate_id,
:created_at,
:user_id,
:command_type,
:command_json
end
class RecordValueObject < Sequent::Core::ValueObject
attrs value: String
end
class RecordCommand < Sequent::Core::Command
attrs value: RecordValueObject
end
let(:value_object) { RecordValueObject.new }
let(:command) { RecordCommand.new(aggregate_id: "1",
user_id: "ben en kim",
value: value_object) }
describe ".command" do
it 'only serializes declared attrs' do
# call valid to let AM generate @errors and @validation_context
command.valid?
record = RecordMock.new
record.command = command
payload = Sequent::Core::Oj.strict_load(record.command_json)
expect(payload).to have_key("aggregate_id")
expect(payload).to have_key("value")
expect(payload["value"]).to_not have_key("errors")
expect(payload["value"]).to have_key("value")
end
end
end
## Instruction:
Add event aggregate_id and sequence_number to spec
## Code After:
require 'spec_helper'
describe Sequent::Core::SerializesCommand do
class RecordMock
include Sequent::Core::SerializesCommand
attr_accessor :aggregate_id,
:created_at,
:user_id,
:command_type,
:command_json,
:event_aggregate_id,
:event_sequence_number
end
class RecordValueObject < Sequent::Core::ValueObject
attrs value: String
end
class RecordCommand < Sequent::Core::Command
attrs value: RecordValueObject
end
let(:value_object) { RecordValueObject.new }
let(:command) { RecordCommand.new(aggregate_id: "1",
user_id: "ben en kim",
value: value_object) }
describe ".command" do
it 'only serializes declared attrs' do
# call valid to let AM generate @errors and @validation_context
command.valid?
record = RecordMock.new
record.command = command
payload = Sequent::Core::Oj.strict_load(record.command_json)
expect(payload).to have_key("aggregate_id")
expect(payload).to have_key("value")
expect(payload["value"]).to_not have_key("errors")
expect(payload["value"]).to have_key("value")
end
end
end
| require 'spec_helper'
describe Sequent::Core::SerializesCommand do
class RecordMock
include Sequent::Core::SerializesCommand
attr_accessor :aggregate_id,
:created_at,
:user_id,
:command_type,
- :command_json
+ :command_json,
? +
+ :event_aggregate_id,
+ :event_sequence_number
end
class RecordValueObject < Sequent::Core::ValueObject
attrs value: String
end
class RecordCommand < Sequent::Core::Command
attrs value: RecordValueObject
end
let(:value_object) { RecordValueObject.new }
let(:command) { RecordCommand.new(aggregate_id: "1",
user_id: "ben en kim",
value: value_object) }
describe ".command" do
it 'only serializes declared attrs' do
# call valid to let AM generate @errors and @validation_context
command.valid?
record = RecordMock.new
record.command = command
payload = Sequent::Core::Oj.strict_load(record.command_json)
expect(payload).to have_key("aggregate_id")
expect(payload).to have_key("value")
expect(payload["value"]).to_not have_key("errors")
expect(payload["value"]).to have_key("value")
end
end
end | 4 | 0.097561 | 3 | 1 |
77344c52bdf0e549ac0d11823ed4cf60e15f37ee | app/src/ui/lib/avatar.tsx | app/src/ui/lib/avatar.tsx | import * as React from 'react'
import { IGitHubUser } from '../../lib/dispatcher'
interface IAvatarProps {
readonly gitHubUser: IGitHubUser | null
readonly title: string | null
}
export class Avatar extends React.Component<IAvatarProps, void> {
public render() {
const DefaultAvatarURL = 'https://github.com/hubot.png'
const gitHubUser = this.props.gitHubUser
const avatarURL = (gitHubUser ? gitHubUser.avatarURL : null) || DefaultAvatarURL
const avatarTitle = this.props.title || undefined
return (
<div className='avatar' title={avatarTitle}>
<img src={avatarURL} alt={avatarTitle}/>
</div>
)
}
}
| import * as React from 'react'
import { IGitHubUser } from '../../lib/dispatcher'
interface IAvatarProps {
readonly gitHubUser: IGitHubUser | null
readonly title: string | null
}
const DefaultAvatarURL = 'https://github.com/hubot.png'
export class Avatar extends React.Component<IAvatarProps, void> {
private getTitle(user: IGitHubUser | null): string {
if (user === null) {
return this.props.title || 'Unkown User'
}
return this.props.title || user.email
}
public render() {
const gitHubUser = this.props.gitHubUser
const avatarURL = (gitHubUser ? gitHubUser.avatarURL : null) || DefaultAvatarURL
const avatarTitle = this.getTitle(gitHubUser)
return (
<div className='avatar' title={avatarTitle}>
<img src={avatarURL} alt={avatarTitle}/>
</div>
)
}
}
| Add function to ensure the component always has a valid title | Add function to ensure the component always has a valid title
| TypeScript | mit | artivilla/desktop,j-f1/forked-desktop,hjobrien/desktop,gengjiawen/desktop,j-f1/forked-desktop,kactus-io/kactus,artivilla/desktop,shiftkey/desktop,gengjiawen/desktop,gengjiawen/desktop,BugTesterTest/desktops,gengjiawen/desktop,j-f1/forked-desktop,artivilla/desktop,hjobrien/desktop,artivilla/desktop,say25/desktop,shiftkey/desktop,j-f1/forked-desktop,kactus-io/kactus,hjobrien/desktop,say25/desktop,BugTesterTest/desktops,desktop/desktop,desktop/desktop,desktop/desktop,hjobrien/desktop,shiftkey/desktop,shiftkey/desktop,BugTesterTest/desktops,say25/desktop,kactus-io/kactus,say25/desktop,kactus-io/kactus,desktop/desktop,BugTesterTest/desktops | typescript | ## Code Before:
import * as React from 'react'
import { IGitHubUser } from '../../lib/dispatcher'
interface IAvatarProps {
readonly gitHubUser: IGitHubUser | null
readonly title: string | null
}
export class Avatar extends React.Component<IAvatarProps, void> {
public render() {
const DefaultAvatarURL = 'https://github.com/hubot.png'
const gitHubUser = this.props.gitHubUser
const avatarURL = (gitHubUser ? gitHubUser.avatarURL : null) || DefaultAvatarURL
const avatarTitle = this.props.title || undefined
return (
<div className='avatar' title={avatarTitle}>
<img src={avatarURL} alt={avatarTitle}/>
</div>
)
}
}
## Instruction:
Add function to ensure the component always has a valid title
## Code After:
import * as React from 'react'
import { IGitHubUser } from '../../lib/dispatcher'
interface IAvatarProps {
readonly gitHubUser: IGitHubUser | null
readonly title: string | null
}
const DefaultAvatarURL = 'https://github.com/hubot.png'
export class Avatar extends React.Component<IAvatarProps, void> {
private getTitle(user: IGitHubUser | null): string {
if (user === null) {
return this.props.title || 'Unkown User'
}
return this.props.title || user.email
}
public render() {
const gitHubUser = this.props.gitHubUser
const avatarURL = (gitHubUser ? gitHubUser.avatarURL : null) || DefaultAvatarURL
const avatarTitle = this.getTitle(gitHubUser)
return (
<div className='avatar' title={avatarTitle}>
<img src={avatarURL} alt={avatarTitle}/>
</div>
)
}
}
| import * as React from 'react'
import { IGitHubUser } from '../../lib/dispatcher'
interface IAvatarProps {
readonly gitHubUser: IGitHubUser | null
readonly title: string | null
}
+ const DefaultAvatarURL = 'https://github.com/hubot.png'
+
export class Avatar extends React.Component<IAvatarProps, void> {
+ private getTitle(user: IGitHubUser | null): string {
+ if (user === null) {
+ return this.props.title || 'Unkown User'
+ }
+
+ return this.props.title || user.email
+ }
+
public render() {
- const DefaultAvatarURL = 'https://github.com/hubot.png'
const gitHubUser = this.props.gitHubUser
const avatarURL = (gitHubUser ? gitHubUser.avatarURL : null) || DefaultAvatarURL
- const avatarTitle = this.props.title || undefined
+ const avatarTitle = this.getTitle(gitHubUser)
+
return (
<div className='avatar' title={avatarTitle}>
<img src={avatarURL} alt={avatarTitle}/>
</div>
)
}
} | 14 | 0.666667 | 12 | 2 |
136afc8f8a82e7af392e0dc0a279a119657b48b6 | mongoid-undo.gemspec | mongoid-undo.gemspec | $: << File.expand_path('../lib', __FILE__)
require 'mongoid/undo/version'
Gem::Specification.new do |gem|
gem.name = 'mongoid-undo'
gem.version = Mongoid::Undo::VERSION
gem.authors = 'Mario Uher'
gem.email = 'uher.mario@gmail.com'
gem.homepage = 'https://github.com/haihappen/mongoid-undo'
gem.summary = 'Super simple undo for your Mongoid app.'
gem.description = 'mongoid-undo provides a super simple and easy to use undo system for Mongoid apps.'
gem.files = `git ls-files`.split("\n")
gem.require_path = 'lib'
gem.add_dependency 'activesupport'
gem.add_dependency 'mongoid', '~> 4.0.0'
gem.add_dependency 'mongoid-paranoia', '~> 1.0.0'
gem.add_dependency 'mongoid-versioning', '~> 1.0.0'
end
| $: << File.expand_path('../lib', __FILE__)
require 'mongoid/undo/version'
Gem::Specification.new do |gem|
gem.name = 'mongoid-undo'
gem.version = Mongoid::Undo::VERSION
gem.authors = 'Mario Uher'
gem.email = 'uher.mario@gmail.com'
gem.homepage = 'https://github.com/haihappen/mongoid-undo'
gem.summary = 'Super simple undo for your Mongoid app.'
gem.description = 'mongoid-undo provides a super simple and easy to use undo system for Mongoid apps.'
gem.files = `git ls-files`.split("\n")
gem.require_path = 'lib'
gem.add_dependency 'activesupport', '~> 4.2.0'
gem.add_dependency 'mongoid', '~> 4.0.0'
gem.add_dependency 'mongoid-paranoia', '~> 1.0.0'
gem.add_dependency 'mongoid-versioning', '~> 1.0.0'
end
| Set explicit activesupport dependency to 4.2 | Set explicit activesupport dependency to 4.2
| Ruby | mit | haihappen/mongoid-undo | ruby | ## Code Before:
$: << File.expand_path('../lib', __FILE__)
require 'mongoid/undo/version'
Gem::Specification.new do |gem|
gem.name = 'mongoid-undo'
gem.version = Mongoid::Undo::VERSION
gem.authors = 'Mario Uher'
gem.email = 'uher.mario@gmail.com'
gem.homepage = 'https://github.com/haihappen/mongoid-undo'
gem.summary = 'Super simple undo for your Mongoid app.'
gem.description = 'mongoid-undo provides a super simple and easy to use undo system for Mongoid apps.'
gem.files = `git ls-files`.split("\n")
gem.require_path = 'lib'
gem.add_dependency 'activesupport'
gem.add_dependency 'mongoid', '~> 4.0.0'
gem.add_dependency 'mongoid-paranoia', '~> 1.0.0'
gem.add_dependency 'mongoid-versioning', '~> 1.0.0'
end
## Instruction:
Set explicit activesupport dependency to 4.2
## Code After:
$: << File.expand_path('../lib', __FILE__)
require 'mongoid/undo/version'
Gem::Specification.new do |gem|
gem.name = 'mongoid-undo'
gem.version = Mongoid::Undo::VERSION
gem.authors = 'Mario Uher'
gem.email = 'uher.mario@gmail.com'
gem.homepage = 'https://github.com/haihappen/mongoid-undo'
gem.summary = 'Super simple undo for your Mongoid app.'
gem.description = 'mongoid-undo provides a super simple and easy to use undo system for Mongoid apps.'
gem.files = `git ls-files`.split("\n")
gem.require_path = 'lib'
gem.add_dependency 'activesupport', '~> 4.2.0'
gem.add_dependency 'mongoid', '~> 4.0.0'
gem.add_dependency 'mongoid-paranoia', '~> 1.0.0'
gem.add_dependency 'mongoid-versioning', '~> 1.0.0'
end
| $: << File.expand_path('../lib', __FILE__)
require 'mongoid/undo/version'
Gem::Specification.new do |gem|
gem.name = 'mongoid-undo'
gem.version = Mongoid::Undo::VERSION
gem.authors = 'Mario Uher'
gem.email = 'uher.mario@gmail.com'
gem.homepage = 'https://github.com/haihappen/mongoid-undo'
gem.summary = 'Super simple undo for your Mongoid app.'
gem.description = 'mongoid-undo provides a super simple and easy to use undo system for Mongoid apps.'
gem.files = `git ls-files`.split("\n")
gem.require_path = 'lib'
- gem.add_dependency 'activesupport'
+ gem.add_dependency 'activesupport', '~> 4.2.0'
? ++++++++++++
gem.add_dependency 'mongoid', '~> 4.0.0'
gem.add_dependency 'mongoid-paranoia', '~> 1.0.0'
gem.add_dependency 'mongoid-versioning', '~> 1.0.0'
end | 2 | 0.1 | 1 | 1 |
c14d2c66f921ada805720bb95272fa59f06b4149 | CHANGELOG.md | CHANGELOG.md | 0.3
===
* Add GenericExpander
0.2.10
======
0.2.8
=====
* Remove Dot.tk API
* Add Senta.la API
* Add qr_code methor on Shortener class
* add shorten and expanded properties on Shortener class
0.2.7
=====
* Add custom exceptions
* Add Is.gd API (Issue #7)
* Fix import Shortener on __init__.py
* add show_current_apis function
0.2.6
=====
* Add Dot.Tk shortener API support
0.2.5
=====
* Python 3 support
0.2.4
0.2.3
=====
* Add kwargs on short, expand functions, fixing the credentials params
* Add Adfly shortener
| 0.4
===
* Ow.ly shortener added
* Readability shortener added
0.3
===
* Add GenericExpander
0.2.10
======
0.2.8
=====
* Remove Dot.tk API
* Add Senta.la API
* Add qr_code methor on Shortener class
* add shorten and expanded properties on Shortener class
0.2.7
=====
* Add custom exceptions
* Add Is.gd API (Issue #7)
* Fix import Shortener on __init__.py
* add show_current_apis function
0.2.6
=====
* Add Dot.Tk shortener API support
0.2.5
=====
* Python 3 support
0.2.4
0.2.3
=====
* Add kwargs on short, expand functions, fixing the credentials params
* Add Adfly shortener
| Add initial 0.4 version changelog | Add initial 0.4 version changelog
| Markdown | mit | YarnSeemannsgarn/pyshorteners | markdown | ## Code Before:
0.3
===
* Add GenericExpander
0.2.10
======
0.2.8
=====
* Remove Dot.tk API
* Add Senta.la API
* Add qr_code methor on Shortener class
* add shorten and expanded properties on Shortener class
0.2.7
=====
* Add custom exceptions
* Add Is.gd API (Issue #7)
* Fix import Shortener on __init__.py
* add show_current_apis function
0.2.6
=====
* Add Dot.Tk shortener API support
0.2.5
=====
* Python 3 support
0.2.4
0.2.3
=====
* Add kwargs on short, expand functions, fixing the credentials params
* Add Adfly shortener
## Instruction:
Add initial 0.4 version changelog
## Code After:
0.4
===
* Ow.ly shortener added
* Readability shortener added
0.3
===
* Add GenericExpander
0.2.10
======
0.2.8
=====
* Remove Dot.tk API
* Add Senta.la API
* Add qr_code methor on Shortener class
* add shorten and expanded properties on Shortener class
0.2.7
=====
* Add custom exceptions
* Add Is.gd API (Issue #7)
* Fix import Shortener on __init__.py
* add show_current_apis function
0.2.6
=====
* Add Dot.Tk shortener API support
0.2.5
=====
* Python 3 support
0.2.4
0.2.3
=====
* Add kwargs on short, expand functions, fixing the credentials params
* Add Adfly shortener
| + 0.4
+ ===
+ * Ow.ly shortener added
+ * Readability shortener added
+
0.3
===
* Add GenericExpander
0.2.10
======
0.2.8
=====
* Remove Dot.tk API
* Add Senta.la API
* Add qr_code methor on Shortener class
* add shorten and expanded properties on Shortener class
0.2.7
=====
* Add custom exceptions
* Add Is.gd API (Issue #7)
* Fix import Shortener on __init__.py
* add show_current_apis function
0.2.6
=====
* Add Dot.Tk shortener API support
0.2.5
=====
* Python 3 support
0.2.4
0.2.3
=====
* Add kwargs on short, expand functions, fixing the credentials params
* Add Adfly shortener | 5 | 0.131579 | 5 | 0 |
f6c4ed2242511fe08a119221227b30b7a4ecc6fc | features/support/env.rb | features/support/env.rb | require 'tempfile'
class ChatterboxWorld
def working_dir
Pathname(__FILE__).join(*%w[.. .. .. tmp cuke_generated]).expand_path
end
def create_file(file_name, contents)
file_path = File.join(working_dir, file_name)
File.open(file_path, "w") { |f| f << contents }
end
def stderr_file
return @stderr_file if @stderr_file
@stderr_file = Tempfile.new('chatterbox_stderr')
@stderr_file.close
@stderr_file
end
def last_stderr
@stderr
end
def last_exit_code
@exit_code
end
def ruby(args)
Dir.chdir(working_dir) do
cmd = %[ruby -rrubygems #{args} 2> #{stderr_file.path}]
@stdout = `#{cmd}`
end
@stderr = IO.read(stderr_file.path)
@exit_code = $?.to_i
end
end
World do
ChatterboxWorld.new
end
| require 'tempfile'
class ChatterboxWorld
def working_dir
@working_dir ||= Pathname(__FILE__).join(*%w[.. .. .. tmp cuke_generated]).expand_path
@working_dir.mkpath
@working_dir
end
def create_file(file_name, contents)
file_path = File.join(working_dir, file_name)
File.open(file_path, "w") { |f| f << contents }
end
def stderr_file
return @stderr_file if @stderr_file
@stderr_file = Tempfile.new('chatterbox_stderr')
@stderr_file.close
@stderr_file
end
def last_stderr
@stderr
end
def last_exit_code
@exit_code
end
def ruby(args)
Dir.chdir(working_dir) do
cmd = %[ruby -rrubygems #{args} 2> #{stderr_file.path}]
@stdout = `#{cmd}`
end
@stderr = IO.read(stderr_file.path)
@exit_code = $?.to_i
end
end
World do
ChatterboxWorld.new
end
| Make tmp path if necessary | Make tmp path if necessary
| Ruby | mit | rsanheim/chatterbox | ruby | ## Code Before:
require 'tempfile'
class ChatterboxWorld
def working_dir
Pathname(__FILE__).join(*%w[.. .. .. tmp cuke_generated]).expand_path
end
def create_file(file_name, contents)
file_path = File.join(working_dir, file_name)
File.open(file_path, "w") { |f| f << contents }
end
def stderr_file
return @stderr_file if @stderr_file
@stderr_file = Tempfile.new('chatterbox_stderr')
@stderr_file.close
@stderr_file
end
def last_stderr
@stderr
end
def last_exit_code
@exit_code
end
def ruby(args)
Dir.chdir(working_dir) do
cmd = %[ruby -rrubygems #{args} 2> #{stderr_file.path}]
@stdout = `#{cmd}`
end
@stderr = IO.read(stderr_file.path)
@exit_code = $?.to_i
end
end
World do
ChatterboxWorld.new
end
## Instruction:
Make tmp path if necessary
## Code After:
require 'tempfile'
class ChatterboxWorld
def working_dir
@working_dir ||= Pathname(__FILE__).join(*%w[.. .. .. tmp cuke_generated]).expand_path
@working_dir.mkpath
@working_dir
end
def create_file(file_name, contents)
file_path = File.join(working_dir, file_name)
File.open(file_path, "w") { |f| f << contents }
end
def stderr_file
return @stderr_file if @stderr_file
@stderr_file = Tempfile.new('chatterbox_stderr')
@stderr_file.close
@stderr_file
end
def last_stderr
@stderr
end
def last_exit_code
@exit_code
end
def ruby(args)
Dir.chdir(working_dir) do
cmd = %[ruby -rrubygems #{args} 2> #{stderr_file.path}]
@stdout = `#{cmd}`
end
@stderr = IO.read(stderr_file.path)
@exit_code = $?.to_i
end
end
World do
ChatterboxWorld.new
end
| require 'tempfile'
class ChatterboxWorld
def working_dir
- Pathname(__FILE__).join(*%w[.. .. .. tmp cuke_generated]).expand_path
+ @working_dir ||= Pathname(__FILE__).join(*%w[.. .. .. tmp cuke_generated]).expand_path
? +++++++++++++++++
+ @working_dir.mkpath
+ @working_dir
end
def create_file(file_name, contents)
file_path = File.join(working_dir, file_name)
File.open(file_path, "w") { |f| f << contents }
end
def stderr_file
return @stderr_file if @stderr_file
@stderr_file = Tempfile.new('chatterbox_stderr')
@stderr_file.close
@stderr_file
end
def last_stderr
@stderr
end
def last_exit_code
@exit_code
end
def ruby(args)
Dir.chdir(working_dir) do
cmd = %[ruby -rrubygems #{args} 2> #{stderr_file.path}]
@stdout = `#{cmd}`
end
@stderr = IO.read(stderr_file.path)
@exit_code = $?.to_i
end
end
World do
ChatterboxWorld.new
end | 4 | 0.1 | 3 | 1 |
6c94975cd3f560e1a2dbd8ee1d0b4180964852f9 | test/utils/test_db.go | test/utils/test_db.go | package utils
import (
"fmt"
"os"
_ "github.com/go-sql-driver/mysql"
"github.com/jinzhu/gorm"
_ "github.com/lib/pq"
)
func TestDB() *gorm.DB {
dbuser, dbpwd, dbname := "qor", "qor", "qor_test"
if os.Getenv("TEST_ENV") == "CI" {
dbuser, dbpwd = os.Getenv("DB_USER"), os.Getenv("DB_PWD")
}
var db gorm.DB
var err error
if os.Getenv("TEST_DB") == "postgres" {
db, err = gorm.Open("postgres", fmt.Sprintf("postgres://%s:%s@localhost/%s?sslmode=disable", dbuser, dbpwd, dbname))
} else {
db, err = gorm.Open("mysql", fmt.Sprintf("%s:%s@/%s?charset=utf8&parseTime=True&loc=Local", dbuser, dbpwd, dbname))
}
if err != nil {
panic(err)
}
return &db
}
| package utils
import (
"fmt"
"os"
_ "github.com/go-sql-driver/mysql"
"github.com/jinzhu/gorm"
_ "github.com/lib/pq"
)
func TestDB() *gorm.DB {
dbuser, dbpwd, dbname := "qor", "qor", "qor_test"
if os.Getenv("TEST_ENV") == "CI" {
dbuser, dbpwd = os.Getenv("DB_USER"), os.Getenv("DB_PWD")
}
var db gorm.DB
var err error
if os.Getenv("TEST_DB") == "postgres" {
db, err = gorm.Open("postgres", fmt.Sprintf("postgres://%s:%s@localhost/%s?sslmode=disable", dbuser, dbpwd, dbname))
} else {
// CREATE USER 'qor'@'localhost' IDENTIFIED BY 'qor';
// CREATE DATABASE qor_test;
// GRANT ALL ON qor_test.* TO 'qor'@'localhost';
db, err = gorm.Open("mysql", fmt.Sprintf("%s:%s@/%s?charset=utf8&parseTime=True&loc=Local", dbuser, dbpwd, dbname))
}
if err != nil {
panic(err)
}
return &db
}
| Add guide for how to create test db for mysql | Add guide for how to create test db for mysql
| Go | mit | qor/qor,qor/qor,qor/qor | go | ## Code Before:
package utils
import (
"fmt"
"os"
_ "github.com/go-sql-driver/mysql"
"github.com/jinzhu/gorm"
_ "github.com/lib/pq"
)
func TestDB() *gorm.DB {
dbuser, dbpwd, dbname := "qor", "qor", "qor_test"
if os.Getenv("TEST_ENV") == "CI" {
dbuser, dbpwd = os.Getenv("DB_USER"), os.Getenv("DB_PWD")
}
var db gorm.DB
var err error
if os.Getenv("TEST_DB") == "postgres" {
db, err = gorm.Open("postgres", fmt.Sprintf("postgres://%s:%s@localhost/%s?sslmode=disable", dbuser, dbpwd, dbname))
} else {
db, err = gorm.Open("mysql", fmt.Sprintf("%s:%s@/%s?charset=utf8&parseTime=True&loc=Local", dbuser, dbpwd, dbname))
}
if err != nil {
panic(err)
}
return &db
}
## Instruction:
Add guide for how to create test db for mysql
## Code After:
package utils
import (
"fmt"
"os"
_ "github.com/go-sql-driver/mysql"
"github.com/jinzhu/gorm"
_ "github.com/lib/pq"
)
func TestDB() *gorm.DB {
dbuser, dbpwd, dbname := "qor", "qor", "qor_test"
if os.Getenv("TEST_ENV") == "CI" {
dbuser, dbpwd = os.Getenv("DB_USER"), os.Getenv("DB_PWD")
}
var db gorm.DB
var err error
if os.Getenv("TEST_DB") == "postgres" {
db, err = gorm.Open("postgres", fmt.Sprintf("postgres://%s:%s@localhost/%s?sslmode=disable", dbuser, dbpwd, dbname))
} else {
// CREATE USER 'qor'@'localhost' IDENTIFIED BY 'qor';
// CREATE DATABASE qor_test;
// GRANT ALL ON qor_test.* TO 'qor'@'localhost';
db, err = gorm.Open("mysql", fmt.Sprintf("%s:%s@/%s?charset=utf8&parseTime=True&loc=Local", dbuser, dbpwd, dbname))
}
if err != nil {
panic(err)
}
return &db
}
| package utils
import (
"fmt"
"os"
_ "github.com/go-sql-driver/mysql"
"github.com/jinzhu/gorm"
_ "github.com/lib/pq"
)
func TestDB() *gorm.DB {
dbuser, dbpwd, dbname := "qor", "qor", "qor_test"
if os.Getenv("TEST_ENV") == "CI" {
dbuser, dbpwd = os.Getenv("DB_USER"), os.Getenv("DB_PWD")
}
var db gorm.DB
var err error
if os.Getenv("TEST_DB") == "postgres" {
db, err = gorm.Open("postgres", fmt.Sprintf("postgres://%s:%s@localhost/%s?sslmode=disable", dbuser, dbpwd, dbname))
} else {
+ // CREATE USER 'qor'@'localhost' IDENTIFIED BY 'qor';
+ // CREATE DATABASE qor_test;
+ // GRANT ALL ON qor_test.* TO 'qor'@'localhost';
db, err = gorm.Open("mysql", fmt.Sprintf("%s:%s@/%s?charset=utf8&parseTime=True&loc=Local", dbuser, dbpwd, dbname))
}
if err != nil {
panic(err)
}
return &db
} | 3 | 0.090909 | 3 | 0 |
31c7be100ed36a39231b302d6306df51375384d1 | setup.py | setup.py | from setuptools import setup
setup(
name='braubuddy',
version='0.2.0',
author='James Stewart',
author_email='jstewart101@gmail.com',
packages=['braubuddy'],
scripts=[],
url='http://pypi.python.org/pypi/Braubuddy/',
license='LICENSE.txt',
description='An extensile thermostat framework',
long_description=open('README.rst').read(),
entry_points={
'console_scripts': [
'braubuddy = braubuddy.runserver:main',
]
},
install_requires=[
'pyserial>=2.0',
'tosr0x>=0.2.0',
'temperusb>=1.2.0',
'ds18b20>=0.01.03',
'cherrypy>=3.2.2',
'pyxdg>=0.25',
'jinja2>=2.7.0',
'alabaster>=0.6.0',
],
)
| from setuptools import setup, find_packages
setup(
name='braubuddy',
version='0.2.0',
author='James Stewart',
author_email='jstewart101@gmail.com',
description='An extensile thermostat framework',
long_description=open('README.rst').read(),
license='LICENSE.txt',
packages=find_packages(),
scripts=[],
tests='braubuddy.tests',
url='http://braubudy.org/',
entry_points={
'console_scripts': [
'braubuddy = braubuddy.runserver:main',
]
},
install_requires=[
'pyserial>=2.0',
'tosr0x>=0.2.0',
'temperusb>=1.2.0',
'ds18b20>=0.01.03',
'cherrypy>=3.2.2',
'pyxdg>=0.25',
'jinja2>=2.7.0',
'alabaster>=0.6.0',
],
classifiers=[
'Development Status :: 4 - Beta',
'Environment :: Web Environment',
'Intended Audience :: Developers',
'Intended Audience :: End Users/Desktop',
'License :: OSI Approved :: BSD License',
'Operating System :: POSIX :: Linux',
'Programming Language :: Python',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
],
)
| Add automagic package finding and classifiers. | Add automagic package finding and classifiers.
| Python | bsd-3-clause | amorphic/braubuddy,amorphic/braubuddy,amorphic/braubuddy | python | ## Code Before:
from setuptools import setup
setup(
name='braubuddy',
version='0.2.0',
author='James Stewart',
author_email='jstewart101@gmail.com',
packages=['braubuddy'],
scripts=[],
url='http://pypi.python.org/pypi/Braubuddy/',
license='LICENSE.txt',
description='An extensile thermostat framework',
long_description=open('README.rst').read(),
entry_points={
'console_scripts': [
'braubuddy = braubuddy.runserver:main',
]
},
install_requires=[
'pyserial>=2.0',
'tosr0x>=0.2.0',
'temperusb>=1.2.0',
'ds18b20>=0.01.03',
'cherrypy>=3.2.2',
'pyxdg>=0.25',
'jinja2>=2.7.0',
'alabaster>=0.6.0',
],
)
## Instruction:
Add automagic package finding and classifiers.
## Code After:
from setuptools import setup, find_packages
setup(
name='braubuddy',
version='0.2.0',
author='James Stewart',
author_email='jstewart101@gmail.com',
description='An extensile thermostat framework',
long_description=open('README.rst').read(),
license='LICENSE.txt',
packages=find_packages(),
scripts=[],
tests='braubuddy.tests',
url='http://braubudy.org/',
entry_points={
'console_scripts': [
'braubuddy = braubuddy.runserver:main',
]
},
install_requires=[
'pyserial>=2.0',
'tosr0x>=0.2.0',
'temperusb>=1.2.0',
'ds18b20>=0.01.03',
'cherrypy>=3.2.2',
'pyxdg>=0.25',
'jinja2>=2.7.0',
'alabaster>=0.6.0',
],
classifiers=[
'Development Status :: 4 - Beta',
'Environment :: Web Environment',
'Intended Audience :: Developers',
'Intended Audience :: End Users/Desktop',
'License :: OSI Approved :: BSD License',
'Operating System :: POSIX :: Linux',
'Programming Language :: Python',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
],
)
| - from setuptools import setup
+ from setuptools import setup, find_packages
? +++++++++++++++
setup(
name='braubuddy',
version='0.2.0',
author='James Stewart',
author_email='jstewart101@gmail.com',
- packages=['braubuddy'],
- scripts=[],
- url='http://pypi.python.org/pypi/Braubuddy/',
- license='LICENSE.txt',
description='An extensile thermostat framework',
long_description=open('README.rst').read(),
+ license='LICENSE.txt',
+ packages=find_packages(),
+ scripts=[],
+ tests='braubuddy.tests',
+ url='http://braubudy.org/',
entry_points={
'console_scripts': [
'braubuddy = braubuddy.runserver:main',
]
},
install_requires=[
'pyserial>=2.0',
'tosr0x>=0.2.0',
'temperusb>=1.2.0',
'ds18b20>=0.01.03',
'cherrypy>=3.2.2',
'pyxdg>=0.25',
'jinja2>=2.7.0',
'alabaster>=0.6.0',
],
+ classifiers=[
+ 'Development Status :: 4 - Beta',
+ 'Environment :: Web Environment',
+ 'Intended Audience :: Developers',
+ 'Intended Audience :: End Users/Desktop',
+ 'License :: OSI Approved :: BSD License',
+ 'Operating System :: POSIX :: Linux',
+ 'Programming Language :: Python',
+ 'Programming Language :: Python :: 2',
+ 'Programming Language :: Python :: 2.6',
+ 'Programming Language :: Python :: 2.7',
+ ],
) | 23 | 0.793103 | 18 | 5 |
139d8f2cb1b758c86502acd10995b25038f9ed5a | css/base/_typography.css | css/base/_typography.css | /**
* Basic typography style for copy text
*/
body {
color: $text-color;
font-family: $text-font-stack;
font-kerning: normal;
font-variant-ligatures: common-ligatures, contextual;
font-feature-settings: "kern", "liga", "clig", "calt";
}
p {
font-family: Georgia, sans-serif;
line-height: 1.5em;
}
ul {
padding-left: 1.75em;
}
a {
text-decoration: none;
color: $dark-brand-color;
}
a:hover {
color: $brand-color;
}
| /**
* Basic typography style for copy text
*/
body {
color: $text-color;
font-family: $text-font-stack;
font-kerning: normal;
font-variant-ligatures: common-ligatures, contextual;
font-feature-settings: "kern", "liga", "clig", "calt";
}
p {
font-family: Georgia, sans-serif;
line-height: 1.5em;
}
ul {
padding-left: 1.75em;
}
a {
text-decoration: none;
color: $dark-brand-color;
}
a:hover {
color: $brand-color;
}
code {
font-size: 0.75em;
background-color: $very-light-grey;
padding: 0.125em 0.5em;
border-radius: 1px;
}
| Add stlying for inline code blocks | Add stlying for inline code blocks
| CSS | mit | mxstbr/login-flow,mxstbr/login-flow,OktavianRS/react-boilerplate,beiciye/login-flow,OktavianRS/react-boilerplate,beiciye/login-flow | css | ## Code Before:
/**
* Basic typography style for copy text
*/
body {
color: $text-color;
font-family: $text-font-stack;
font-kerning: normal;
font-variant-ligatures: common-ligatures, contextual;
font-feature-settings: "kern", "liga", "clig", "calt";
}
p {
font-family: Georgia, sans-serif;
line-height: 1.5em;
}
ul {
padding-left: 1.75em;
}
a {
text-decoration: none;
color: $dark-brand-color;
}
a:hover {
color: $brand-color;
}
## Instruction:
Add stlying for inline code blocks
## Code After:
/**
* Basic typography style for copy text
*/
body {
color: $text-color;
font-family: $text-font-stack;
font-kerning: normal;
font-variant-ligatures: common-ligatures, contextual;
font-feature-settings: "kern", "liga", "clig", "calt";
}
p {
font-family: Georgia, sans-serif;
line-height: 1.5em;
}
ul {
padding-left: 1.75em;
}
a {
text-decoration: none;
color: $dark-brand-color;
}
a:hover {
color: $brand-color;
}
code {
font-size: 0.75em;
background-color: $very-light-grey;
padding: 0.125em 0.5em;
border-radius: 1px;
}
| /**
* Basic typography style for copy text
*/
body {
color: $text-color;
font-family: $text-font-stack;
font-kerning: normal;
font-variant-ligatures: common-ligatures, contextual;
font-feature-settings: "kern", "liga", "clig", "calt";
}
p {
font-family: Georgia, sans-serif;
line-height: 1.5em;
}
ul {
padding-left: 1.75em;
}
a {
text-decoration: none;
color: $dark-brand-color;
}
a:hover {
color: $brand-color;
}
+
+ code {
+ font-size: 0.75em;
+ background-color: $very-light-grey;
+ padding: 0.125em 0.5em;
+ border-radius: 1px;
+ } | 7 | 0.25 | 7 | 0 |
e466aaf9a5c84cec46cdd4ebb09d79b7b4c16ccd | src/main/java/com/cc4102/stringDict/PatriciaTree.java | src/main/java/com/cc4102/stringDict/PatriciaTree.java | package com.cc4102.stringDict;
import java.util.ArrayList;
/**
* @author Lucas Puebla Silva
*
*/
public class PatriciaTree implements StringDictionary {
private PatriciaNode root;
public PatriciaTree() {
this.root = new PatriciaNode("", true, null, new ArrayList<>());
}
@Override
public int getLength() {
return 0;
}
@Override
public int getSize() {
return 0;
}
@Override
public Object getRoot() {
return root;
}
@Override
public ArrayList<Integer> search(String key) {
return root.search(key);
}
@Override
public void insert(String word, int pos) {
root.insert(word, pos);
}
}
| package com.cc4102.stringDict;
import java.util.ArrayList;
/**
* @author Lucas Puebla Silva
*
*/
public class PatriciaTree implements StringDictionary {
private PatriciaNode root;
public PatriciaTree() {
this.root = new PatriciaNode("", true, null, new ArrayList<>());
}
public int getLength() {
return 0;
}
public int getSize() {
return 0;
}
public Object getRoot() {
return root;
}
public ArrayList<Integer> search(String key) {
return root.search(key);
}
public void insert(String word, int pos) {
root.insert(word, pos);
}
public String[] getKeys() {
return new String[0];
}
public int count(String key) {
return root.search(key).size();
}
}
| Add getKeys and count to Patricia Tree | Add getKeys and count to Patricia Tree
| Java | mit | lucas-puebla/CC4102-tarea2,lucas-puebla/CC4102-tarea2 | java | ## Code Before:
package com.cc4102.stringDict;
import java.util.ArrayList;
/**
* @author Lucas Puebla Silva
*
*/
public class PatriciaTree implements StringDictionary {
private PatriciaNode root;
public PatriciaTree() {
this.root = new PatriciaNode("", true, null, new ArrayList<>());
}
@Override
public int getLength() {
return 0;
}
@Override
public int getSize() {
return 0;
}
@Override
public Object getRoot() {
return root;
}
@Override
public ArrayList<Integer> search(String key) {
return root.search(key);
}
@Override
public void insert(String word, int pos) {
root.insert(word, pos);
}
}
## Instruction:
Add getKeys and count to Patricia Tree
## Code After:
package com.cc4102.stringDict;
import java.util.ArrayList;
/**
* @author Lucas Puebla Silva
*
*/
public class PatriciaTree implements StringDictionary {
private PatriciaNode root;
public PatriciaTree() {
this.root = new PatriciaNode("", true, null, new ArrayList<>());
}
public int getLength() {
return 0;
}
public int getSize() {
return 0;
}
public Object getRoot() {
return root;
}
public ArrayList<Integer> search(String key) {
return root.search(key);
}
public void insert(String word, int pos) {
root.insert(word, pos);
}
public String[] getKeys() {
return new String[0];
}
public int count(String key) {
return root.search(key).size();
}
}
| package com.cc4102.stringDict;
import java.util.ArrayList;
/**
* @author Lucas Puebla Silva
*
*/
public class PatriciaTree implements StringDictionary {
private PatriciaNode root;
public PatriciaTree() {
this.root = new PatriciaNode("", true, null, new ArrayList<>());
}
- @Override
public int getLength() {
return 0;
}
- @Override
public int getSize() {
return 0;
}
- @Override
public Object getRoot() {
return root;
}
- @Override
public ArrayList<Integer> search(String key) {
return root.search(key);
}
- @Override
public void insert(String word, int pos) {
root.insert(word, pos);
}
+
+ public String[] getKeys() {
+ return new String[0];
+ }
+
+ public int count(String key) {
+ return root.search(key).size();
+ }
} | 13 | 0.317073 | 8 | 5 |
a324ffed41ec3ec629e80e75886534cc50b1191e | circle.yml | circle.yml | dependencies:
override:
- pip install -r requirements.txt
- pip install pycrypto
test:
override:
- coverage run manage.py test
general:
artifacts:
- 'coverage'
deployment:
# production:
# branch: master
# commands:
# - fab deploy
production:
branch: master
commands:
- |
cat >~/.netrc <<EOF
machine api.heroku.com
login $HEROKU_EMAIL
password $HEROKU_TOKEN
machine git.heroku.com
login $HEROKU_EMAIL
password $HEROKU_TOKEN
EOF
- chmod 600 ~/.netrc # Heroku cli complains about permissions without this
- "[[ ! -s \"$(git rev-parse --git-dir)/shallow\" ]] || git fetch --unshallow"
- heroku maintenance:on --app staging-speakerfight
- heroku scale web=0 --app staging-speakerfight
- git push git@heroku.com:staging-speakerfight.git $CIRCLE_SHA1:refs/heads/master
- heroku run python manage.py migrate --app staging-speakerfight
- heroku run python manage.py compilemessages --app staging-speakerfight
- heroku scale web=1 --app staging-speakerfight
- heroku maintenance:off --app staging-speakerfight
| dependencies:
override:
- pip install -r requirements.txt
- pip install pycrypto
test:
override:
- coverage run manage.py test
general:
artifacts:
- 'coverage'
# deployment:
# production:
# branch: master
# commands:
# - fab deploy | Stop deploying on heroku due to installation issues. | Stop deploying on heroku due to installation issues.
| YAML | mit | luanfonceca/speakerfight,luanfonceca/speakerfight,luanfonceca/speakerfight | yaml | ## Code Before:
dependencies:
override:
- pip install -r requirements.txt
- pip install pycrypto
test:
override:
- coverage run manage.py test
general:
artifacts:
- 'coverage'
deployment:
# production:
# branch: master
# commands:
# - fab deploy
production:
branch: master
commands:
- |
cat >~/.netrc <<EOF
machine api.heroku.com
login $HEROKU_EMAIL
password $HEROKU_TOKEN
machine git.heroku.com
login $HEROKU_EMAIL
password $HEROKU_TOKEN
EOF
- chmod 600 ~/.netrc # Heroku cli complains about permissions without this
- "[[ ! -s \"$(git rev-parse --git-dir)/shallow\" ]] || git fetch --unshallow"
- heroku maintenance:on --app staging-speakerfight
- heroku scale web=0 --app staging-speakerfight
- git push git@heroku.com:staging-speakerfight.git $CIRCLE_SHA1:refs/heads/master
- heroku run python manage.py migrate --app staging-speakerfight
- heroku run python manage.py compilemessages --app staging-speakerfight
- heroku scale web=1 --app staging-speakerfight
- heroku maintenance:off --app staging-speakerfight
## Instruction:
Stop deploying on heroku due to installation issues.
## Code After:
dependencies:
override:
- pip install -r requirements.txt
- pip install pycrypto
test:
override:
- coverage run manage.py test
general:
artifacts:
- 'coverage'
# deployment:
# production:
# branch: master
# commands:
# - fab deploy | dependencies:
override:
- pip install -r requirements.txt
- pip install pycrypto
test:
override:
- coverage run manage.py test
general:
artifacts:
- 'coverage'
- deployment:
+ # deployment:
? ++
# production:
# branch: master
# commands:
# - fab deploy
- production:
- branch: master
- commands:
- - |
- cat >~/.netrc <<EOF
- machine api.heroku.com
- login $HEROKU_EMAIL
- password $HEROKU_TOKEN
- machine git.heroku.com
- login $HEROKU_EMAIL
- password $HEROKU_TOKEN
- EOF
- - chmod 600 ~/.netrc # Heroku cli complains about permissions without this
- - "[[ ! -s \"$(git rev-parse --git-dir)/shallow\" ]] || git fetch --unshallow"
- - heroku maintenance:on --app staging-speakerfight
- - heroku scale web=0 --app staging-speakerfight
- - git push git@heroku.com:staging-speakerfight.git $CIRCLE_SHA1:refs/heads/master
- - heroku run python manage.py migrate --app staging-speakerfight
- - heroku run python manage.py compilemessages --app staging-speakerfight
- - heroku scale web=1 --app staging-speakerfight
- - heroku maintenance:off --app staging-speakerfight | 23 | 0.638889 | 1 | 22 |
42e2438a5c3423b948d828ca0bbbb04855d3a35f | accounts/tasks/main.yml | accounts/tasks/main.yml | ---
# tasks file for accounts
- include: create.yml
tags: create
- include: delete.yml
tags: delete
- name: Update login.defs
template: src=login.defs.j2 dest=/etc/login.defs owner=root group=root mode=0644
tags: config
| ---
# tasks file for accounts
- name: Update login.defs
template: src=login.defs.j2 dest=/etc/login.defs owner=root group=root mode=0644
tags: config
- include: create.yml
tags: create
- include: delete.yml
tags: delete
| Set login.defs prior to creating users, so that the settings are used for new users | Set login.defs prior to creating users, so that the settings are used for new users
| YAML | mit | Asymmetrik/ansible-roles | yaml | ## Code Before:
---
# tasks file for accounts
- include: create.yml
tags: create
- include: delete.yml
tags: delete
- name: Update login.defs
template: src=login.defs.j2 dest=/etc/login.defs owner=root group=root mode=0644
tags: config
## Instruction:
Set login.defs prior to creating users, so that the settings are used for new users
## Code After:
---
# tasks file for accounts
- name: Update login.defs
template: src=login.defs.j2 dest=/etc/login.defs owner=root group=root mode=0644
tags: config
- include: create.yml
tags: create
- include: delete.yml
tags: delete
| ---
# tasks file for accounts
+
+ - name: Update login.defs
+ template: src=login.defs.j2 dest=/etc/login.defs owner=root group=root mode=0644
+ tags: config
- include: create.yml
tags: create
- include: delete.yml
tags: delete
-
- - name: Update login.defs
- template: src=login.defs.j2 dest=/etc/login.defs owner=root group=root mode=0644
- tags: config
- | 9 | 0.75 | 4 | 5 |
a331e6bc884fd3b6a88eab722e812a345808dfa2 | test-requirements.txt | test-requirements.txt | pep8==1.5.7 # MIT
pyflakes==0.8.1 # MIT
flake8<2.6.0,>=2.5.4 # MIT
coverage!=4.4,>=4.0 # Apache-2.0
python-subunit>=0.0.18 # Apache-2.0/BSD
testrepository>=0.0.18 # Apache-2.0/BSD
testtools>=1.4.0 # MIT
six>=1.9.0 # MIT
# this is required for the docs build jobs
sphinx>=1.6.2 # BSD
openstackdocstheme>=1.17.0 # Apache-2.0
| flake8<2.6.0,>=2.5.4 # MIT
coverage!=4.4,>=4.0 # Apache-2.0
python-subunit>=0.0.18 # Apache-2.0/BSD
testrepository>=0.0.18 # Apache-2.0/BSD
testtools>=1.4.0 # MIT
six>=1.9.0 # MIT
# this is required for the docs build jobs
sphinx>=1.6.2 # BSD
openstackdocstheme>=1.17.0 # Apache-2.0
| Remove explicit dependency on pep8/pyflakes | Remove explicit dependency on pep8/pyflakes
flake8 already pulls in the new dependency (pycodestyle and pyflakes)
in the right versions, so listing it explicitely is wrong and
unnecessary. flake8 2.5.5 depends on:
'pep8 (>=1.5.7,!=1.6.0,!=1.6.1,!=1.6.2)',
'pyflakes (<1.1,>=0.8.1)']
This seems to be from times where flake8 wasn't doing that before.
Change-Id: Ib145e2afa97f441c07fada9c30f0f0e2410870ae
| Text | apache-2.0 | openstack/mox3 | text | ## Code Before:
pep8==1.5.7 # MIT
pyflakes==0.8.1 # MIT
flake8<2.6.0,>=2.5.4 # MIT
coverage!=4.4,>=4.0 # Apache-2.0
python-subunit>=0.0.18 # Apache-2.0/BSD
testrepository>=0.0.18 # Apache-2.0/BSD
testtools>=1.4.0 # MIT
six>=1.9.0 # MIT
# this is required for the docs build jobs
sphinx>=1.6.2 # BSD
openstackdocstheme>=1.17.0 # Apache-2.0
## Instruction:
Remove explicit dependency on pep8/pyflakes
flake8 already pulls in the new dependency (pycodestyle and pyflakes)
in the right versions, so listing it explicitely is wrong and
unnecessary. flake8 2.5.5 depends on:
'pep8 (>=1.5.7,!=1.6.0,!=1.6.1,!=1.6.2)',
'pyflakes (<1.1,>=0.8.1)']
This seems to be from times where flake8 wasn't doing that before.
Change-Id: Ib145e2afa97f441c07fada9c30f0f0e2410870ae
## Code After:
flake8<2.6.0,>=2.5.4 # MIT
coverage!=4.4,>=4.0 # Apache-2.0
python-subunit>=0.0.18 # Apache-2.0/BSD
testrepository>=0.0.18 # Apache-2.0/BSD
testtools>=1.4.0 # MIT
six>=1.9.0 # MIT
# this is required for the docs build jobs
sphinx>=1.6.2 # BSD
openstackdocstheme>=1.17.0 # Apache-2.0
| - pep8==1.5.7 # MIT
- pyflakes==0.8.1 # MIT
flake8<2.6.0,>=2.5.4 # MIT
coverage!=4.4,>=4.0 # Apache-2.0
python-subunit>=0.0.18 # Apache-2.0/BSD
testrepository>=0.0.18 # Apache-2.0/BSD
testtools>=1.4.0 # MIT
six>=1.9.0 # MIT
# this is required for the docs build jobs
sphinx>=1.6.2 # BSD
openstackdocstheme>=1.17.0 # Apache-2.0
| 2 | 0.133333 | 0 | 2 |
30b7fda252e8df86bdf839f87eaec541e0e7070f | app/views/orders/index.html.erb | app/views/orders/index.html.erb | <p id="notice"><%= notice %></p>
<h1>Listing Orders</h1>
<table>
<thead>
<tr>
<th>Name</th>
<th>Address</th>
<th>Email</th>
<th>Pay type</th>
<th colspan="3"></th>
</tr>
</thead>
<tbody>
<% @orders.each do |order| %>
<tr>
<td><%= order.name %></td>
<td><%= order.address %></td>
<td><%= order.email %></td>
<td><%= order.pay_type %></td>
<td><%= link_to 'Show', order %></td>
<td><%= link_to 'Edit', edit_order_path(order) %></td>
<td><%= link_to 'Destroy', order, method: :delete, data: { confirm: 'Are you sure?' } %></td>
</tr>
<% end %>
</tbody>
</table>
<br>
<%= link_to 'New Order', new_order_path %>
| <% if notice %>
<p id="notice"><%= notice %></p>
<% end %>
<h1>Listing Orders</h1>
<table>
<thead>
<tr>
<th>Name</th>
<th>Address</th>
<th>Email</th>
<th>Pay type</th>
<th colspan="3"></th>
</tr>
</thead>
<tbody>
<% @orders.each do |order| %>
<tr>
<td><%= order.name %></td>
<td><%= order.address %></td>
<td><%= order.email %></td>
<td><%= order.pay_type %></td>
<td><%= link_to 'Show', order %></td>
<td><%= link_to 'Edit', edit_order_path(order) %></td>
<td><%= link_to 'Destroy', order, method: :delete, data: { confirm: 'Are you sure?' } %></td>
</tr>
<% end %>
</tbody>
</table>
<br>
<%= link_to 'New Order', new_order_path %>
| Fix displaying empty notice on orders index view | Fix displaying empty notice on orders index view
| HTML+ERB | mit | Kraykin/internet-shop-beta,Kraykin/internet-shop-beta,Kraykin/internet-shop-beta | html+erb | ## Code Before:
<p id="notice"><%= notice %></p>
<h1>Listing Orders</h1>
<table>
<thead>
<tr>
<th>Name</th>
<th>Address</th>
<th>Email</th>
<th>Pay type</th>
<th colspan="3"></th>
</tr>
</thead>
<tbody>
<% @orders.each do |order| %>
<tr>
<td><%= order.name %></td>
<td><%= order.address %></td>
<td><%= order.email %></td>
<td><%= order.pay_type %></td>
<td><%= link_to 'Show', order %></td>
<td><%= link_to 'Edit', edit_order_path(order) %></td>
<td><%= link_to 'Destroy', order, method: :delete, data: { confirm: 'Are you sure?' } %></td>
</tr>
<% end %>
</tbody>
</table>
<br>
<%= link_to 'New Order', new_order_path %>
## Instruction:
Fix displaying empty notice on orders index view
## Code After:
<% if notice %>
<p id="notice"><%= notice %></p>
<% end %>
<h1>Listing Orders</h1>
<table>
<thead>
<tr>
<th>Name</th>
<th>Address</th>
<th>Email</th>
<th>Pay type</th>
<th colspan="3"></th>
</tr>
</thead>
<tbody>
<% @orders.each do |order| %>
<tr>
<td><%= order.name %></td>
<td><%= order.address %></td>
<td><%= order.email %></td>
<td><%= order.pay_type %></td>
<td><%= link_to 'Show', order %></td>
<td><%= link_to 'Edit', edit_order_path(order) %></td>
<td><%= link_to 'Destroy', order, method: :delete, data: { confirm: 'Are you sure?' } %></td>
</tr>
<% end %>
</tbody>
</table>
<br>
<%= link_to 'New Order', new_order_path %>
| + <% if notice %>
- <p id="notice"><%= notice %></p>
+ <p id="notice"><%= notice %></p>
? ++
-
+ <% end %>
<h1>Listing Orders</h1>
<table>
<thead>
<tr>
<th>Name</th>
<th>Address</th>
<th>Email</th>
<th>Pay type</th>
<th colspan="3"></th>
</tr>
</thead>
<tbody>
<% @orders.each do |order| %>
<tr>
<td><%= order.name %></td>
<td><%= order.address %></td>
<td><%= order.email %></td>
<td><%= order.pay_type %></td>
<td><%= link_to 'Show', order %></td>
<td><%= link_to 'Edit', edit_order_path(order) %></td>
<td><%= link_to 'Destroy', order, method: :delete, data: { confirm: 'Are you sure?' } %></td>
</tr>
<% end %>
</tbody>
</table>
<br>
<%= link_to 'New Order', new_order_path %> | 5 | 0.151515 | 3 | 2 |
07a6be3202a9a878f9334821e609d0a4c97c4bfe | migrations/2015_02_24_000000_create_posts_table.php | migrations/2015_02_24_000000_create_posts_table.php | <?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
use DB;
class CreatePostsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('posts', function (Blueprint $table) {
$table->increments('id');
$table->integer('discussion_id')->unsigned();
$table->integer('number')->unsigned()->nullable();
$table->dateTime('time');
$table->integer('user_id')->unsigned()->nullable();
$table->string('type', 100)->nullable();
$table->text('content')->nullable();
$table->text('content_html')->nullable();
$table->dateTime('edit_time')->nullable();
$table->integer('edit_user_id')->unsigned()->nullable();
$table->dateTime('hide_time')->nullable();
$table->integer('hide_user_id')->unsigned()->nullable();
$table->unique(['discussion_id', 'number']);
});
DB::statement('ALTER TABLE posts ADD FULLTEXT content (content)');
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('posts');
}
}
| <?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreatePostsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('posts', function (Blueprint $table) {
$table->increments('id');
$table->integer('discussion_id')->unsigned();
$table->integer('number')->unsigned()->nullable();
$table->dateTime('time');
$table->integer('user_id')->unsigned()->nullable();
$table->string('type', 100)->nullable();
$table->text('content')->nullable();
$table->text('content_html')->nullable();
$table->dateTime('edit_time')->nullable();
$table->integer('edit_user_id')->unsigned()->nullable();
$table->dateTime('hide_time')->nullable();
$table->integer('hide_user_id')->unsigned()->nullable();
$table->unique(['discussion_id', 'number']);
$table->engine = 'MyISAM';
});
DB::statement('ALTER TABLE posts ADD FULLTEXT content (content)');
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('posts');
}
}
| Set table engine to MyISAM explicitly (for fulltext support) | Set table engine to MyISAM explicitly (for fulltext support)
| PHP | mit | falconchen/core,Luceos/core,falconchen/core,renyuneyun/core,Albert221/core,datitisev/core,Luceos/core,billmn/core,jubianchi/core,liukaijv/core,dungphanxuan/core,billmn/core,huytd/core,kirkbushell/core,renyuneyun/core,vuthaihoc/core,utkarshx/core,datitisev/core,Luceos/core,vuthaihoc/core,kidaa/core,malayladu/core,utkarshx/core,datitisev/core,falconchen/core,kirkbushell/core,kidaa/core,zaksoup/core,vuthaihoc/core,huytd/core,flarum/core,flarum/core,Albert221/core,liukaijv/core,zaksoup/core,datitisev/core,jubianchi/core,malayladu/core,kidaa/core,Albert221/core,Onyx47/core,renyuneyun/core,malayladu/core,Onyx47/core,dungphanxuan/core,renyuneyun/core,kirkbushell/core,Onyx47/core,kirkbushell/core,malayladu/core,flarum/core,Luceos/core,billmn/core,zaksoup/core,Albert221/core,dungphanxuan/core | php | ## Code Before:
<?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
use DB;
class CreatePostsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('posts', function (Blueprint $table) {
$table->increments('id');
$table->integer('discussion_id')->unsigned();
$table->integer('number')->unsigned()->nullable();
$table->dateTime('time');
$table->integer('user_id')->unsigned()->nullable();
$table->string('type', 100)->nullable();
$table->text('content')->nullable();
$table->text('content_html')->nullable();
$table->dateTime('edit_time')->nullable();
$table->integer('edit_user_id')->unsigned()->nullable();
$table->dateTime('hide_time')->nullable();
$table->integer('hide_user_id')->unsigned()->nullable();
$table->unique(['discussion_id', 'number']);
});
DB::statement('ALTER TABLE posts ADD FULLTEXT content (content)');
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('posts');
}
}
## Instruction:
Set table engine to MyISAM explicitly (for fulltext support)
## Code After:
<?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreatePostsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('posts', function (Blueprint $table) {
$table->increments('id');
$table->integer('discussion_id')->unsigned();
$table->integer('number')->unsigned()->nullable();
$table->dateTime('time');
$table->integer('user_id')->unsigned()->nullable();
$table->string('type', 100)->nullable();
$table->text('content')->nullable();
$table->text('content_html')->nullable();
$table->dateTime('edit_time')->nullable();
$table->integer('edit_user_id')->unsigned()->nullable();
$table->dateTime('hide_time')->nullable();
$table->integer('hide_user_id')->unsigned()->nullable();
$table->unique(['discussion_id', 'number']);
$table->engine = 'MyISAM';
});
DB::statement('ALTER TABLE posts ADD FULLTEXT content (content)');
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('posts');
}
}
| <?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
- use DB;
class CreatePostsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('posts', function (Blueprint $table) {
$table->increments('id');
$table->integer('discussion_id')->unsigned();
$table->integer('number')->unsigned()->nullable();
$table->dateTime('time');
$table->integer('user_id')->unsigned()->nullable();
$table->string('type', 100)->nullable();
$table->text('content')->nullable();
$table->text('content_html')->nullable();
$table->dateTime('edit_time')->nullable();
$table->integer('edit_user_id')->unsigned()->nullable();
$table->dateTime('hide_time')->nullable();
$table->integer('hide_user_id')->unsigned()->nullable();
$table->unique(['discussion_id', 'number']);
+
+ $table->engine = 'MyISAM';
});
DB::statement('ALTER TABLE posts ADD FULLTEXT content (content)');
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('posts');
}
} | 3 | 0.0625 | 2 | 1 |
ba0cac1dc9d3afca47c45acb31a0fcf626db543c | account_cutoff_accrual_base/company_view.xml | account_cutoff_accrual_base/company_view.xml | <?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2013 Akretion (http://www.akretion.com/)
@author Alexis de Lattre <alexis.delattre@akretion.com>
The licence is in the file __openerp__.py
-->
<openerp>
<data>
<record id="view_company_form" model="ir.ui.view">
<field name="name">accrual.base.company.form</field>
<field name="model">res.company</field>
<field name="inherit_id" ref="account_cutoff_base.view_company_form" />
<field name="arch" type="xml">
<field name="default_cutoff_journal_id" position="after">
<field name="default_accrual_revenue_journal_id" />
<field name="default_accrual_expense_journal_id" />
<field name="default_accrued_revenue_account_id" />
<field name="default_accrued_expense_account_id" />
</field>
</field>
</record>
</data>
</openerp>
| <?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2013 Akretion (http://www.akretion.com/)
@author Alexis de Lattre <alexis.delattre@akretion.com>
The licence is in the file __openerp__.py
-->
<openerp>
<data>
<record id="view_company_form" model="ir.ui.view">
<field name="name">accrual.base.company.form</field>
<field name="model">res.company</field>
<field name="inherit_id" ref="account_cutoff_base.view_company_form" />
<field name="arch" type="xml">
<xpath expr="//group[@name='cutoff_journal']" positon="inside">
<field name="default_accrual_revenue_journal_id" />
<field name="default_accrual_expense_journal_id" />
</xpath>
<xpath expr="//group[@name='cutoff_account']" positon="after">
<field name="default_accrued_revenue_account_id" />
<field name="default_accrued_expense_account_id" />
</xpath>
</field>
</record>
</data>
</openerp>
| Improve display of journals and accounts on the company's view | Improve display of journals and accounts on the company's view
| XML | agpl-3.0 | OCA/account-closing,OCA/account-closing | xml | ## Code Before:
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2013 Akretion (http://www.akretion.com/)
@author Alexis de Lattre <alexis.delattre@akretion.com>
The licence is in the file __openerp__.py
-->
<openerp>
<data>
<record id="view_company_form" model="ir.ui.view">
<field name="name">accrual.base.company.form</field>
<field name="model">res.company</field>
<field name="inherit_id" ref="account_cutoff_base.view_company_form" />
<field name="arch" type="xml">
<field name="default_cutoff_journal_id" position="after">
<field name="default_accrual_revenue_journal_id" />
<field name="default_accrual_expense_journal_id" />
<field name="default_accrued_revenue_account_id" />
<field name="default_accrued_expense_account_id" />
</field>
</field>
</record>
</data>
</openerp>
## Instruction:
Improve display of journals and accounts on the company's view
## Code After:
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2013 Akretion (http://www.akretion.com/)
@author Alexis de Lattre <alexis.delattre@akretion.com>
The licence is in the file __openerp__.py
-->
<openerp>
<data>
<record id="view_company_form" model="ir.ui.view">
<field name="name">accrual.base.company.form</field>
<field name="model">res.company</field>
<field name="inherit_id" ref="account_cutoff_base.view_company_form" />
<field name="arch" type="xml">
<xpath expr="//group[@name='cutoff_journal']" positon="inside">
<field name="default_accrual_revenue_journal_id" />
<field name="default_accrual_expense_journal_id" />
</xpath>
<xpath expr="//group[@name='cutoff_account']" positon="after">
<field name="default_accrued_revenue_account_id" />
<field name="default_accrued_expense_account_id" />
</xpath>
</field>
</record>
</data>
</openerp>
| <?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2013 Akretion (http://www.akretion.com/)
@author Alexis de Lattre <alexis.delattre@akretion.com>
The licence is in the file __openerp__.py
-->
<openerp>
<data>
<record id="view_company_form" model="ir.ui.view">
<field name="name">accrual.base.company.form</field>
<field name="model">res.company</field>
<field name="inherit_id" ref="account_cutoff_base.view_company_form" />
<field name="arch" type="xml">
- <field name="default_cutoff_journal_id" position="after">
+ <xpath expr="//group[@name='cutoff_journal']" positon="inside">
<field name="default_accrual_revenue_journal_id" />
<field name="default_accrual_expense_journal_id" />
+ </xpath>
+ <xpath expr="//group[@name='cutoff_account']" positon="after">
<field name="default_accrued_revenue_account_id" />
<field name="default_accrued_expense_account_id" />
- </field>
+ </xpath>
</field>
</record>
</data>
</openerp> | 6 | 0.214286 | 4 | 2 |
c119b5dcfeb4360c811e4fb9980fd5edac98c0e7 | app/views/courses/master.html.erb | app/views/courses/master.html.erb | <div class="container-fluid">
<div class="col-md-10 master-box">
<% @courses.each do |course| %>
<div class="row master-course">
<div>COURSE: <%= course.name %></div>
</div>
<% course.sections.each do |section| %>
<div class="row">
<div class="col-md-8">SECTION: <%= section.code %> | <%= section.name %></div>
<div class="col-md-4">ENROLLED: <%= section.students.count %>/<%= possible_seats(section) %></div>
</div>
<% section.students.each do |student| %>
<div class="row">
<div class="col-md-offset-1 col-md-2"><%= student.last_name %>, <%= student.first_name %></div>
<div class="col-md-2"><%= student.email %></div>
<div class="col-md-1"><%= student.id_number %></div>
<div class="col-md-2"><%= student.current_homeroom %></div>
<div class="col-md-2"><%= student.grade_level %></div>
</div>
<% end %>
<% end %>
<% end %>
</div>
</div> | <div class="container-fluid">
<div class="col-md-10 master-box">
<% @courses.each do |course| %>
<div class="row master-course">
<div>COURSE: <%= course.name %></div>
</div>
<% course.sections.each do |section| %>
<div class="row">
<div class="col-md-8">SECTION: <%= section.name %> | Period <%= section.period_id %> </div>
<div class="col-md-4">ENROLLED: <%= section.students.count %>/<%= possible_seats(section) %></div>
</div>
<% section.students.each do |student| %>
<div class="row">
<div class="col-md-offset-1 col-md-2"><%= student.last_name %>, <%= student.first_name %></div>
<div class="col-md-2"><%= student.email %></div>
<div class="col-md-1"><%= student.id_number %></div>
<div class="col-md-2"><%= student.current_homeroom %></div>
<div class="col-md-2"><%= student.grade_level %></div>
</div>
<% end %>
<% end %>
<% end %>
</div>
</div> | Add period display to section on 'course enrollments' | Add period display to section on 'course enrollments'
| HTML+ERB | mit | gptasinski/registraide,gptasinski/registraide,gptasinski/registraide | html+erb | ## Code Before:
<div class="container-fluid">
<div class="col-md-10 master-box">
<% @courses.each do |course| %>
<div class="row master-course">
<div>COURSE: <%= course.name %></div>
</div>
<% course.sections.each do |section| %>
<div class="row">
<div class="col-md-8">SECTION: <%= section.code %> | <%= section.name %></div>
<div class="col-md-4">ENROLLED: <%= section.students.count %>/<%= possible_seats(section) %></div>
</div>
<% section.students.each do |student| %>
<div class="row">
<div class="col-md-offset-1 col-md-2"><%= student.last_name %>, <%= student.first_name %></div>
<div class="col-md-2"><%= student.email %></div>
<div class="col-md-1"><%= student.id_number %></div>
<div class="col-md-2"><%= student.current_homeroom %></div>
<div class="col-md-2"><%= student.grade_level %></div>
</div>
<% end %>
<% end %>
<% end %>
</div>
</div>
## Instruction:
Add period display to section on 'course enrollments'
## Code After:
<div class="container-fluid">
<div class="col-md-10 master-box">
<% @courses.each do |course| %>
<div class="row master-course">
<div>COURSE: <%= course.name %></div>
</div>
<% course.sections.each do |section| %>
<div class="row">
<div class="col-md-8">SECTION: <%= section.name %> | Period <%= section.period_id %> </div>
<div class="col-md-4">ENROLLED: <%= section.students.count %>/<%= possible_seats(section) %></div>
</div>
<% section.students.each do |student| %>
<div class="row">
<div class="col-md-offset-1 col-md-2"><%= student.last_name %>, <%= student.first_name %></div>
<div class="col-md-2"><%= student.email %></div>
<div class="col-md-1"><%= student.id_number %></div>
<div class="col-md-2"><%= student.current_homeroom %></div>
<div class="col-md-2"><%= student.grade_level %></div>
</div>
<% end %>
<% end %>
<% end %>
</div>
</div> | <div class="container-fluid">
<div class="col-md-10 master-box">
<% @courses.each do |course| %>
<div class="row master-course">
<div>COURSE: <%= course.name %></div>
</div>
<% course.sections.each do |section| %>
<div class="row">
- <div class="col-md-8">SECTION: <%= section.code %> | <%= section.name %></div>
? ^^^ ^^^
+ <div class="col-md-8">SECTION: <%= section.name %> | Period <%= section.period_id %> </div>
? ^^^ +++++++ ^ +++++++ +
<div class="col-md-4">ENROLLED: <%= section.students.count %>/<%= possible_seats(section) %></div>
</div>
<% section.students.each do |student| %>
<div class="row">
<div class="col-md-offset-1 col-md-2"><%= student.last_name %>, <%= student.first_name %></div>
<div class="col-md-2"><%= student.email %></div>
<div class="col-md-1"><%= student.id_number %></div>
<div class="col-md-2"><%= student.current_homeroom %></div>
<div class="col-md-2"><%= student.grade_level %></div>
</div>
<% end %>
<% end %>
<% end %>
</div>
</div> | 2 | 0.068966 | 1 | 1 |
bbc9ed8bdd4257e382fb3222514c68d1b078881b | test/test_helper.rb | test/test_helper.rb | ENV['RAILS_ENV'] ||= 'test'
require File.expand_path('../../config/environment', __FILE__)
require 'rails/test_help'
require 'minitest/spec'
require 'minitest/reporters'
Minitest::Reporters.use! Minitest::Reporters::SpecReporter.new
class Minitest::Spec
include FactoryGirl::Syntax::Methods
before :each do
DatabaseRewinder.clean_all
end
after :each do
DatabaseRewinder.clean
end
end
class ActionDispatch::IntegrationTest
include FactoryGirl::Syntax::Methods
end
| ENV['RAILS_ENV'] ||= 'test'
require File.expand_path('../../config/environment', __FILE__)
require 'rails/test_help'
require 'minitest/spec'
require 'minitest/reporters'
Minitest::Reporters.use! Minitest::Reporters::SpecReporter.new
class ActiveSupport::TestCase
include FactoryGirl::Syntax::Methods
before :each do
DatabaseRewinder.clean_all
end
after :each do
DatabaseRewinder.clean
end
end
class ActionDispatch::IntegrationTest
include FactoryGirl::Syntax::Methods
end
| Update test helper to better suit rails | Update test helper to better suit rails
| Ruby | mit | tmaesaka/atlas,tmaesaka/atlas | ruby | ## Code Before:
ENV['RAILS_ENV'] ||= 'test'
require File.expand_path('../../config/environment', __FILE__)
require 'rails/test_help'
require 'minitest/spec'
require 'minitest/reporters'
Minitest::Reporters.use! Minitest::Reporters::SpecReporter.new
class Minitest::Spec
include FactoryGirl::Syntax::Methods
before :each do
DatabaseRewinder.clean_all
end
after :each do
DatabaseRewinder.clean
end
end
class ActionDispatch::IntegrationTest
include FactoryGirl::Syntax::Methods
end
## Instruction:
Update test helper to better suit rails
## Code After:
ENV['RAILS_ENV'] ||= 'test'
require File.expand_path('../../config/environment', __FILE__)
require 'rails/test_help'
require 'minitest/spec'
require 'minitest/reporters'
Minitest::Reporters.use! Minitest::Reporters::SpecReporter.new
class ActiveSupport::TestCase
include FactoryGirl::Syntax::Methods
before :each do
DatabaseRewinder.clean_all
end
after :each do
DatabaseRewinder.clean
end
end
class ActionDispatch::IntegrationTest
include FactoryGirl::Syntax::Methods
end
| ENV['RAILS_ENV'] ||= 'test'
require File.expand_path('../../config/environment', __FILE__)
require 'rails/test_help'
require 'minitest/spec'
require 'minitest/reporters'
Minitest::Reporters.use! Minitest::Reporters::SpecReporter.new
- class Minitest::Spec
+ class ActiveSupport::TestCase
include FactoryGirl::Syntax::Methods
before :each do
DatabaseRewinder.clean_all
end
after :each do
DatabaseRewinder.clean
end
end
class ActionDispatch::IntegrationTest
include FactoryGirl::Syntax::Methods
end | 2 | 0.086957 | 1 | 1 |
4a19b428a3de2bf1083c49aec678f51ece8da0ea | src/core/event-core.js | src/core/event-core.js | import _ from 'lodash';
import fs from 'fs';
import path from 'path';
const logger = require('../util/logger')(__filename);
const DATA_DIR = path.join(__dirname, '../../data');
const content = fs.readFileSync(path.join(DATA_DIR, 'events.json'), {encoding: 'utf8'});
let events;
try {
events = JSON.parse(content);
} catch (e) {
logger.error('Error when parsing events.json!');
logger.error(content);
throw e;
}
function getEvents() {
return events;
}
function setAttendingCount(facebookEventId, attendingCount) {
const event = _.find(events, { facebookId: facebookEventId });
if (!event) {
return;
}
event.attendingCount = attendingCount;
}
export {
getEvents,
setAttendingCount
};
| import moment from 'moment';
import _ from 'lodash';
import fs from 'fs';
import path from 'path';
const logger = require('../util/logger')(__filename);
const DATA_DIR = path.join(__dirname, '../../data');
const content = fs.readFileSync(path.join(DATA_DIR, 'events.json'), {encoding: 'utf8'});
let events;
try {
events = JSON.parse(content);
} catch (e) {
logger.error('Error when parsing events.json!');
logger.error(content);
throw e;
}
function getEvents() {
return _.filter(events, event => {
return moment(event.endTime).diff(moment(), 'hours') > -5;
});
}
function setAttendingCount(facebookEventId, attendingCount) {
const event = _.find(events, { facebookId: facebookEventId });
if (!event) {
return;
}
event.attendingCount = attendingCount;
}
export {
getEvents,
setAttendingCount
};
| Return only relevant events from api | Return only relevant events from api
| JavaScript | mit | futurice/wappuapp-backend,kaupunki-apina/prahapp-backend,futurice/wappuapp-backend,kaupunki-apina/prahapp-backend | javascript | ## Code Before:
import _ from 'lodash';
import fs from 'fs';
import path from 'path';
const logger = require('../util/logger')(__filename);
const DATA_DIR = path.join(__dirname, '../../data');
const content = fs.readFileSync(path.join(DATA_DIR, 'events.json'), {encoding: 'utf8'});
let events;
try {
events = JSON.parse(content);
} catch (e) {
logger.error('Error when parsing events.json!');
logger.error(content);
throw e;
}
function getEvents() {
return events;
}
function setAttendingCount(facebookEventId, attendingCount) {
const event = _.find(events, { facebookId: facebookEventId });
if (!event) {
return;
}
event.attendingCount = attendingCount;
}
export {
getEvents,
setAttendingCount
};
## Instruction:
Return only relevant events from api
## Code After:
import moment from 'moment';
import _ from 'lodash';
import fs from 'fs';
import path from 'path';
const logger = require('../util/logger')(__filename);
const DATA_DIR = path.join(__dirname, '../../data');
const content = fs.readFileSync(path.join(DATA_DIR, 'events.json'), {encoding: 'utf8'});
let events;
try {
events = JSON.parse(content);
} catch (e) {
logger.error('Error when parsing events.json!');
logger.error(content);
throw e;
}
function getEvents() {
return _.filter(events, event => {
return moment(event.endTime).diff(moment(), 'hours') > -5;
});
}
function setAttendingCount(facebookEventId, attendingCount) {
const event = _.find(events, { facebookId: facebookEventId });
if (!event) {
return;
}
event.attendingCount = attendingCount;
}
export {
getEvents,
setAttendingCount
};
| + import moment from 'moment';
import _ from 'lodash';
import fs from 'fs';
import path from 'path';
const logger = require('../util/logger')(__filename);
const DATA_DIR = path.join(__dirname, '../../data');
const content = fs.readFileSync(path.join(DATA_DIR, 'events.json'), {encoding: 'utf8'});
let events;
try {
events = JSON.parse(content);
} catch (e) {
logger.error('Error when parsing events.json!');
logger.error(content);
throw e;
}
function getEvents() {
- return events;
+ return _.filter(events, event => {
+ return moment(event.endTime).diff(moment(), 'hours') > -5;
+ });
}
function setAttendingCount(facebookEventId, attendingCount) {
const event = _.find(events, { facebookId: facebookEventId });
if (!event) {
return;
}
event.attendingCount = attendingCount;
}
export {
getEvents,
setAttendingCount
}; | 5 | 0.151515 | 4 | 1 |
54f99c5c62c170b538a7a6ea4bf786c897151e5a | pylcp/url.py | pylcp/url.py | def url_path_join(url, path_part):
"""Join a path part to the end of a URL adding/removing slashes as necessary."""
result = url + '/' if url[-1] != '/' else url
index = 1 if path_part[0] == '/' else 0
return result + path_part[index:]
| def url_path_join(url, path_part):
"""Join a path part to the end of a URL adding/removing slashes as necessary."""
result = url + '/' if not url.endswith('/') else url
index = 1 if path_part.startswith('/') else 0
return result + path_part[index:]
| Use startswith/endswith instead of indices for readability. | Use startswith/endswith instead of indices for readability.
| Python | bsd-3-clause | bradsokol/PyLCP,Points/PyLCP,bradsokol/PyLCP,Points/PyLCP | python | ## Code Before:
def url_path_join(url, path_part):
"""Join a path part to the end of a URL adding/removing slashes as necessary."""
result = url + '/' if url[-1] != '/' else url
index = 1 if path_part[0] == '/' else 0
return result + path_part[index:]
## Instruction:
Use startswith/endswith instead of indices for readability.
## Code After:
def url_path_join(url, path_part):
"""Join a path part to the end of a URL adding/removing slashes as necessary."""
result = url + '/' if not url.endswith('/') else url
index = 1 if path_part.startswith('/') else 0
return result + path_part[index:]
| def url_path_join(url, path_part):
"""Join a path part to the end of a URL adding/removing slashes as necessary."""
- result = url + '/' if url[-1] != '/' else url
? ^^^^^^^^
+ result = url + '/' if not url.endswith('/') else url
? ++++ ^^^^^^^^^^ +
- index = 1 if path_part[0] == '/' else 0
? ^^^^^^^
+ index = 1 if path_part.startswith('/') else 0
? ^^^^^^^^^^^^ +
return result + path_part[index:] | 4 | 0.8 | 2 | 2 |
d15aa0564ebbdcde6cdc052fae25c0401af8a4d3 | package.json | package.json | {
"name": "rdflib",
"description": "an rdf parser for node.js",
"version": "0.0.2",
"private": false,
"author": "J. Presbrey <presbrey@mit.edu>",
"license": "MIT",
"repository": {
"type": "git",
"url": "git://github.com/linkeddata/rdflib.js.git"
},
"homepage": "http://github.com/linkeddata/rdflib.js",
"dependencies": {
"coffee": "*",
"jsdom": "*",
"xmlhttprequest": "*",
"xmldom": "~0.1.19"
},
"devDependencies": {
"nodeunit": "*"
},
"scripts": {
"test": "make test"
},
"files": [
"dist/rdflib.js"
],
"main": "rdflib.js",
"keywords": [
"linkeddata",
"linked data",
"rdf",
"rdfa",
"turtle",
"semantic",
"web"
]
}
| {
"name": "rdflib",
"description": "an rdf parser for node.js",
"version": "0.0.2",
"private": false,
"author": "J. Presbrey <presbrey@mit.edu>",
"license": "MIT",
"repository": {
"type": "git",
"url": "git://github.com/linkeddata/rdflib.js.git"
},
"homepage": "http://github.com/linkeddata/rdflib.js",
"dependencies": {
"coffee": "*",
"jsdom": "*",
"xmlhttprequest": "*",
"xmldom": "~0.1.19"
},
"devDependencies": {
"nodeunit": "*"
},
"scripts": {
"test": "make test",
"postinstall": "make"
},
"files": [
"dist/rdflib.js"
],
"main": "dist/rdflib.js",
"keywords": [
"linkeddata",
"linked data",
"rdf",
"rdfa",
"turtle",
"semantic",
"web"
]
}
| Add postinstall to make dist dir | Add postinstall to make dist dir
| JSON | mit | ariutta/rdflib.js,ariutta/rdflib.js,ariutta/rdflib.js | json | ## Code Before:
{
"name": "rdflib",
"description": "an rdf parser for node.js",
"version": "0.0.2",
"private": false,
"author": "J. Presbrey <presbrey@mit.edu>",
"license": "MIT",
"repository": {
"type": "git",
"url": "git://github.com/linkeddata/rdflib.js.git"
},
"homepage": "http://github.com/linkeddata/rdflib.js",
"dependencies": {
"coffee": "*",
"jsdom": "*",
"xmlhttprequest": "*",
"xmldom": "~0.1.19"
},
"devDependencies": {
"nodeunit": "*"
},
"scripts": {
"test": "make test"
},
"files": [
"dist/rdflib.js"
],
"main": "rdflib.js",
"keywords": [
"linkeddata",
"linked data",
"rdf",
"rdfa",
"turtle",
"semantic",
"web"
]
}
## Instruction:
Add postinstall to make dist dir
## Code After:
{
"name": "rdflib",
"description": "an rdf parser for node.js",
"version": "0.0.2",
"private": false,
"author": "J. Presbrey <presbrey@mit.edu>",
"license": "MIT",
"repository": {
"type": "git",
"url": "git://github.com/linkeddata/rdflib.js.git"
},
"homepage": "http://github.com/linkeddata/rdflib.js",
"dependencies": {
"coffee": "*",
"jsdom": "*",
"xmlhttprequest": "*",
"xmldom": "~0.1.19"
},
"devDependencies": {
"nodeunit": "*"
},
"scripts": {
"test": "make test",
"postinstall": "make"
},
"files": [
"dist/rdflib.js"
],
"main": "dist/rdflib.js",
"keywords": [
"linkeddata",
"linked data",
"rdf",
"rdfa",
"turtle",
"semantic",
"web"
]
}
| {
"name": "rdflib",
"description": "an rdf parser for node.js",
"version": "0.0.2",
"private": false,
"author": "J. Presbrey <presbrey@mit.edu>",
"license": "MIT",
"repository": {
"type": "git",
"url": "git://github.com/linkeddata/rdflib.js.git"
},
"homepage": "http://github.com/linkeddata/rdflib.js",
"dependencies": {
"coffee": "*",
"jsdom": "*",
"xmlhttprequest": "*",
"xmldom": "~0.1.19"
},
"devDependencies": {
"nodeunit": "*"
},
"scripts": {
- "test": "make test"
+ "test": "make test",
? +
+ "postinstall": "make"
},
"files": [
"dist/rdflib.js"
],
- "main": "rdflib.js",
+ "main": "dist/rdflib.js",
? +++++
"keywords": [
"linkeddata",
"linked data",
"rdf",
"rdfa",
"turtle",
"semantic",
"web"
]
} | 5 | 0.131579 | 3 | 2 |
d929ec8a6a4bef9eaa3f16cb5a4b097bb09a3246 | README.md | README.md | chef
====
In-memory Chef API abiding to golang interface convention. Supplies Readers!
[](https://drone.io/github.com/go-chef/chef/latest)
[](https://coveralls.io/r/go-chef/chef?branch=master)
| [](https://circleci.com/gh/go-chef/chef)
[](https://coveralls.io/r/go-chef/chef?branch=master)
Chef Server API Client in Golang
| Update build badge to Circle | Update build badge to Circle
| Markdown | apache-2.0 | go-chef/chef,ncs-msmith/go-chef,go-chef/chef,ncs-msmith/go-chef,go-chef/chef | markdown | ## Code Before:
chef
====
In-memory Chef API abiding to golang interface convention. Supplies Readers!
[](https://drone.io/github.com/go-chef/chef/latest)
[](https://coveralls.io/r/go-chef/chef?branch=master)
## Instruction:
Update build badge to Circle
## Code After:
[](https://circleci.com/gh/go-chef/chef)
[](https://coveralls.io/r/go-chef/chef?branch=master)
Chef Server API Client in Golang
| - chef
- ====
+ [](https://circleci.com/gh/go-chef/chef)
+ [](https://coveralls.io/r/go-chef/chef?branch=master)
+ Chef Server API Client in Golang
- In-memory Chef API abiding to golang interface convention. Supplies Readers!
-
- [](https://drone.io/github.com/go-chef/chef/latest)
- [](https://coveralls.io/r/go-chef/chef?branch=master) | 9 | 1.285714 | 3 | 6 |
f45697922d6dc45338e832f74a1c551ede11a984 | jquery.if-else.js | jquery.if-else.js | /**
* jQuery if-else plugin
*
* Creates if(), else() and fi() methods that can be used in
* a chain of methods on jQuery objects
*
* @author Vegard Løkken <vegard@headspin.no>
* @copyright 2013
* @version 0.2
* @licence MIT
*/
;(function( $ ) {
/* Undef object that all chained jQuery methods work on
* if they should not be executed */
var $undef = $();
/* The original object is stored here so we can restore
* it later */
var orig;
/* We store the condition given in the if() method */
var condition;
$.fn["if"] = function(options) {
orig = this;
condition = !!options;
if (!condition) {
return $undef;
} else {
return this;
}
};
$.fn["else"] = function( options) {
if (orig === undefined)
throw "else() can't be used before if()";
return this === $undef ? orig : $undef;
};
$.fn["fi"] = function(options) {
if (orig === undefined)
throw "fi() can't be used before if()";
return orig;
};
})(jQuery);
| /**
* jQuery if-else plugin
*
* Creates if(), else() and fi() methods that can be used in
* a chain of methods on jQuery objects
*
* @author Vegard Løkken <vegard@headspin.no>
* @copyright 2013
* @version 0.3
* @licence MIT
*/
;(function( $ ) {
/* Undef object that all chained jQuery methods work on
* if they should not be executed */
var $undef = $();
/* The original object is stored here so we can restore
* it later */
var orig;
$.fn["if"] = function(condition) {
if (this === $undef) {
return $();
} else {
orig = this;
return !!condition ? this : $undef;
}
};
$.fn["else"] = function() {
if (orig === undefined)
throw "else() can't be used before if()";
return this === $undef ? orig : $undef;
};
$.fn["fi"] = function() {
if (orig === undefined)
throw "fi() can't be used before if()";
return orig;
};
})(jQuery);
| Remove unused variables. Fix nesting bug. | Remove unused variables. Fix nesting bug. | JavaScript | mit | veloek/jquery.if-else | javascript | ## Code Before:
/**
* jQuery if-else plugin
*
* Creates if(), else() and fi() methods that can be used in
* a chain of methods on jQuery objects
*
* @author Vegard Løkken <vegard@headspin.no>
* @copyright 2013
* @version 0.2
* @licence MIT
*/
;(function( $ ) {
/* Undef object that all chained jQuery methods work on
* if they should not be executed */
var $undef = $();
/* The original object is stored here so we can restore
* it later */
var orig;
/* We store the condition given in the if() method */
var condition;
$.fn["if"] = function(options) {
orig = this;
condition = !!options;
if (!condition) {
return $undef;
} else {
return this;
}
};
$.fn["else"] = function( options) {
if (orig === undefined)
throw "else() can't be used before if()";
return this === $undef ? orig : $undef;
};
$.fn["fi"] = function(options) {
if (orig === undefined)
throw "fi() can't be used before if()";
return orig;
};
})(jQuery);
## Instruction:
Remove unused variables. Fix nesting bug.
## Code After:
/**
* jQuery if-else plugin
*
* Creates if(), else() and fi() methods that can be used in
* a chain of methods on jQuery objects
*
* @author Vegard Løkken <vegard@headspin.no>
* @copyright 2013
* @version 0.3
* @licence MIT
*/
;(function( $ ) {
/* Undef object that all chained jQuery methods work on
* if they should not be executed */
var $undef = $();
/* The original object is stored here so we can restore
* it later */
var orig;
$.fn["if"] = function(condition) {
if (this === $undef) {
return $();
} else {
orig = this;
return !!condition ? this : $undef;
}
};
$.fn["else"] = function() {
if (orig === undefined)
throw "else() can't be used before if()";
return this === $undef ? orig : $undef;
};
$.fn["fi"] = function() {
if (orig === undefined)
throw "fi() can't be used before if()";
return orig;
};
})(jQuery);
| /**
* jQuery if-else plugin
*
* Creates if(), else() and fi() methods that can be used in
* a chain of methods on jQuery objects
*
* @author Vegard Løkken <vegard@headspin.no>
* @copyright 2013
- * @version 0.2
? ^
+ * @version 0.3
? ^
* @licence MIT
*/
;(function( $ ) {
/* Undef object that all chained jQuery methods work on
* if they should not be executed */
var $undef = $();
/* The original object is stored here so we can restore
* it later */
var orig;
- /* We store the condition given in the if() method */
- var condition;
-
- $.fn["if"] = function(options) {
? ^ -
+ $.fn["if"] = function(condition) {
? + ^^^
+ if (this === $undef) {
- orig = this;
- condition = !!options;
-
- if (!condition) {
- return $undef;
? ^^^^^
+ return $();
? ^^
} else {
- return this;
? ^^^^^
+ orig = this;
? + ^^^^
+ return !!condition ? this : $undef;
}
};
- $.fn["else"] = function( options) {
? --------
+ $.fn["else"] = function() {
if (orig === undefined)
throw "else() can't be used before if()";
return this === $undef ? orig : $undef;
};
- $.fn["fi"] = function(options) {
? -------
+ $.fn["fi"] = function() {
if (orig === undefined)
throw "fi() can't be used before if()";
return orig;
};
})(jQuery); | 21 | 0.42 | 8 | 13 |
15c74d998b97f14c6a1817653e8ac48d290b9477 | src/containers/green-flag-overlay.jsx | src/containers/green-flag-overlay.jsx | import bindAll from 'lodash.bindall';
import React from 'react';
import PropTypes from 'prop-types';
import {connect} from 'react-redux';
import VM from 'scratch-vm';
import Box from '../components/box/box.jsx';
import greenFlag from '../components/green-flag/icon--green-flag.svg';
class GreenFlagOverlay extends React.Component {
constructor (props) {
super(props);
bindAll(this, [
'handleClick'
]);
}
handleClick () {
this.props.vm.start();
this.props.vm.greenFlag();
}
render () {
if (this.props.isStarted) return null;
return (
<Box
className={this.props.wrapperClass}
onClick={this.handleClick}
>
<div className={this.props.className}>
<img
draggable={false}
src={greenFlag}
/>
</div>
</Box>
);
}
}
GreenFlagOverlay.propTypes = {
className: PropTypes.string,
isStarted: PropTypes.bool,
vm: PropTypes.instanceOf(VM),
wrapperClass: PropTypes.string
};
const mapStateToProps = state => ({
isStarted: state.scratchGui.vmStatus.started,
vm: state.scratchGui.vm
});
const mapDispatchToProps = () => ({});
export default connect(
mapStateToProps,
mapDispatchToProps
)(GreenFlagOverlay);
| import bindAll from 'lodash.bindall';
import React from 'react';
import PropTypes from 'prop-types';
import {connect} from 'react-redux';
import VM from 'scratch-vm';
import Box from '../components/box/box.jsx';
import greenFlag from '../components/green-flag/icon--green-flag.svg';
class GreenFlagOverlay extends React.Component {
constructor (props) {
super(props);
bindAll(this, [
'handleClick'
]);
}
handleClick () {
this.props.vm.start();
this.props.vm.greenFlag();
}
render () {
return (
<Box
className={this.props.wrapperClass}
onClick={this.handleClick}
>
<div className={this.props.className}>
<img
draggable={false}
src={greenFlag}
/>
</div>
</Box>
);
}
}
GreenFlagOverlay.propTypes = {
className: PropTypes.string,
vm: PropTypes.instanceOf(VM),
wrapperClass: PropTypes.string
};
const mapStateToProps = state => ({
vm: state.scratchGui.vm
});
const mapDispatchToProps = () => ({});
export default connect(
mapStateToProps,
mapDispatchToProps
)(GreenFlagOverlay);
| Remove isStarted prop from GreenFlagOverlay | Remove isStarted prop from GreenFlagOverlay
Since #3885, the GreenFlagOverlay has been hidden by the Stage component
instead of having to hide itself if the project has been started. Thus
there's no need for GreenFlagOverlay to know whether the project has
been started.
| JSX | bsd-3-clause | LLK/scratch-gui,LLK/scratch-gui | jsx | ## Code Before:
import bindAll from 'lodash.bindall';
import React from 'react';
import PropTypes from 'prop-types';
import {connect} from 'react-redux';
import VM from 'scratch-vm';
import Box from '../components/box/box.jsx';
import greenFlag from '../components/green-flag/icon--green-flag.svg';
class GreenFlagOverlay extends React.Component {
constructor (props) {
super(props);
bindAll(this, [
'handleClick'
]);
}
handleClick () {
this.props.vm.start();
this.props.vm.greenFlag();
}
render () {
if (this.props.isStarted) return null;
return (
<Box
className={this.props.wrapperClass}
onClick={this.handleClick}
>
<div className={this.props.className}>
<img
draggable={false}
src={greenFlag}
/>
</div>
</Box>
);
}
}
GreenFlagOverlay.propTypes = {
className: PropTypes.string,
isStarted: PropTypes.bool,
vm: PropTypes.instanceOf(VM),
wrapperClass: PropTypes.string
};
const mapStateToProps = state => ({
isStarted: state.scratchGui.vmStatus.started,
vm: state.scratchGui.vm
});
const mapDispatchToProps = () => ({});
export default connect(
mapStateToProps,
mapDispatchToProps
)(GreenFlagOverlay);
## Instruction:
Remove isStarted prop from GreenFlagOverlay
Since #3885, the GreenFlagOverlay has been hidden by the Stage component
instead of having to hide itself if the project has been started. Thus
there's no need for GreenFlagOverlay to know whether the project has
been started.
## Code After:
import bindAll from 'lodash.bindall';
import React from 'react';
import PropTypes from 'prop-types';
import {connect} from 'react-redux';
import VM from 'scratch-vm';
import Box from '../components/box/box.jsx';
import greenFlag from '../components/green-flag/icon--green-flag.svg';
class GreenFlagOverlay extends React.Component {
constructor (props) {
super(props);
bindAll(this, [
'handleClick'
]);
}
handleClick () {
this.props.vm.start();
this.props.vm.greenFlag();
}
render () {
return (
<Box
className={this.props.wrapperClass}
onClick={this.handleClick}
>
<div className={this.props.className}>
<img
draggable={false}
src={greenFlag}
/>
</div>
</Box>
);
}
}
GreenFlagOverlay.propTypes = {
className: PropTypes.string,
vm: PropTypes.instanceOf(VM),
wrapperClass: PropTypes.string
};
const mapStateToProps = state => ({
vm: state.scratchGui.vm
});
const mapDispatchToProps = () => ({});
export default connect(
mapStateToProps,
mapDispatchToProps
)(GreenFlagOverlay);
| import bindAll from 'lodash.bindall';
import React from 'react';
import PropTypes from 'prop-types';
import {connect} from 'react-redux';
import VM from 'scratch-vm';
import Box from '../components/box/box.jsx';
import greenFlag from '../components/green-flag/icon--green-flag.svg';
class GreenFlagOverlay extends React.Component {
constructor (props) {
super(props);
bindAll(this, [
'handleClick'
]);
}
handleClick () {
this.props.vm.start();
this.props.vm.greenFlag();
}
render () {
- if (this.props.isStarted) return null;
-
return (
<Box
className={this.props.wrapperClass}
onClick={this.handleClick}
>
<div className={this.props.className}>
<img
draggable={false}
src={greenFlag}
/>
</div>
</Box>
);
}
}
GreenFlagOverlay.propTypes = {
className: PropTypes.string,
- isStarted: PropTypes.bool,
vm: PropTypes.instanceOf(VM),
wrapperClass: PropTypes.string
};
const mapStateToProps = state => ({
- isStarted: state.scratchGui.vmStatus.started,
vm: state.scratchGui.vm
});
const mapDispatchToProps = () => ({});
export default connect(
mapStateToProps,
mapDispatchToProps
)(GreenFlagOverlay); | 4 | 0.066667 | 0 | 4 |
ebb1e5aac89f0dd102bc19404dba5b994b2891f1 | config/initializers/ticket_dispenser.rb | config/initializers/ticket_dispenser.rb |
require 'ticket_dispenser'
Rails.application.config.to_prepare do
TicketDispenser::Ticket.class_eval do
def sender
user = messages.first.sender
return {} if user.nil?
{
username: user.username,
real_name: user.real_name,
email: user.email,
role: user.role(project)
}
end
end
end
|
require 'ticket_dispenser'
Rails.application.config.to_prepare do
TicketDispenser::Ticket.class_eval do
def sender
user = messages.first.sender if messages.first
return {} if user.nil?
{
username: user.username,
real_name: user.real_name,
email: user.email,
role: user.role(project)
}
end
end
end
| Update TD initializer to cope with deleting tickets | Update TD initializer to cope with deleting tickets
| Ruby | mit | WikiEducationFoundation/WikiEduDashboard,WikiEducationFoundation/WikiEduDashboard,WikiEducationFoundation/WikiEduDashboard,WikiEducationFoundation/WikiEduDashboard,WikiEducationFoundation/WikiEduDashboard | ruby | ## Code Before:
require 'ticket_dispenser'
Rails.application.config.to_prepare do
TicketDispenser::Ticket.class_eval do
def sender
user = messages.first.sender
return {} if user.nil?
{
username: user.username,
real_name: user.real_name,
email: user.email,
role: user.role(project)
}
end
end
end
## Instruction:
Update TD initializer to cope with deleting tickets
## Code After:
require 'ticket_dispenser'
Rails.application.config.to_prepare do
TicketDispenser::Ticket.class_eval do
def sender
user = messages.first.sender if messages.first
return {} if user.nil?
{
username: user.username,
real_name: user.real_name,
email: user.email,
role: user.role(project)
}
end
end
end
|
require 'ticket_dispenser'
Rails.application.config.to_prepare do
TicketDispenser::Ticket.class_eval do
def sender
- user = messages.first.sender
+ user = messages.first.sender if messages.first
? ++++++++++++++++++
return {} if user.nil?
{
username: user.username,
real_name: user.real_name,
email: user.email,
role: user.role(project)
}
end
end
end | 2 | 0.117647 | 1 | 1 |
bd26afa3fd683af4a44d4b0f3ca4f8d03c51a154 | .buildkite/pipeline.yml | .buildkite/pipeline.yml | plugins: &plugins
stellargraph/github-merged-pr#develop:
mode: checkout
steps:
- label: ":python:"
command:
- pip install -q --no-cache-dir -r requirements.txt -e .
&& py.test -ra --cov=stellargraph tests/ --doctest-modules --doctest-modules --cov-report=term-missing -p no:cacheprovider
&& if [ "$BUILDKITE_PULL_REQUEST" != "false" ] ; then mkdir -p ~/.ssh/ && ssh-keyscan -H github.com > ~/.ssh/known_hosts && git fetch && checkout $BUILDKITE_BRANCH ; fi ; coveralls
plugins:
<<: *plugins
docker#v1.4.0:
image: "python:3.6"
workdir: /app
environment:
- PYTHONDONTWRITEBYTECODE=1
- COVERALLS_REPO_TOKEN=$COVERALLS_REPO_TOKEN
- BUILDKITE_BRANCH=$BUILDKITE_BRANCH
- BUILDKITE_PULL_REQUEST=$BUILDKITE_PULL_REQUEST
- label: "style"
command:
- --check stellargraph tests
plugins:
<<: *plugins
docker#v1.4.0:
image: "stellargraph/black"
workdir: /app
entrypoint: /usr/bin/black
environment:
- PYTHONDONTWRITEBYTECODE=1
- wait: ~
continue_on_failure: true
- label: ":console: push logs"
command: .buildkite/pushlogs.sh "#build-bots"
| steps:
- label: ":python:"
command:
- pip install -q --no-cache-dir -r requirements.txt -e .
&& py.test -ra --cov=stellargraph tests/ --doctest-modules --doctest-modules --cov-report=term-missing -p no:cacheprovider
&& coveralls
plugins:
docker#v1.3.0:
image: "python:3.6"
workdir: /app
environment:
- PYTHONDONTWRITEBYTECODE=1
- COVERALLS_REPO_TOKEN=$COVERALLS_REPO_TOKEN
- label: "style"
command:
- --check stellargraph tests
plugins:
docker#v1.3.0:
image: "stellargraph/black"
workdir: /app
entrypoint: /usr/bin/black
environment:
- PYTHONDONTWRITEBYTECODE=1
- wait: ~
continue_on_failure: true
- label: ":console: push logs"
command: .buildkite/pushlogs.sh "#build-bots"
| Revert "add github merged pr plugin" | Revert "add github merged pr plugin"
| YAML | apache-2.0 | stellargraph/stellargraph,stellargraph/stellargraph | yaml | ## Code Before:
plugins: &plugins
stellargraph/github-merged-pr#develop:
mode: checkout
steps:
- label: ":python:"
command:
- pip install -q --no-cache-dir -r requirements.txt -e .
&& py.test -ra --cov=stellargraph tests/ --doctest-modules --doctest-modules --cov-report=term-missing -p no:cacheprovider
&& if [ "$BUILDKITE_PULL_REQUEST" != "false" ] ; then mkdir -p ~/.ssh/ && ssh-keyscan -H github.com > ~/.ssh/known_hosts && git fetch && checkout $BUILDKITE_BRANCH ; fi ; coveralls
plugins:
<<: *plugins
docker#v1.4.0:
image: "python:3.6"
workdir: /app
environment:
- PYTHONDONTWRITEBYTECODE=1
- COVERALLS_REPO_TOKEN=$COVERALLS_REPO_TOKEN
- BUILDKITE_BRANCH=$BUILDKITE_BRANCH
- BUILDKITE_PULL_REQUEST=$BUILDKITE_PULL_REQUEST
- label: "style"
command:
- --check stellargraph tests
plugins:
<<: *plugins
docker#v1.4.0:
image: "stellargraph/black"
workdir: /app
entrypoint: /usr/bin/black
environment:
- PYTHONDONTWRITEBYTECODE=1
- wait: ~
continue_on_failure: true
- label: ":console: push logs"
command: .buildkite/pushlogs.sh "#build-bots"
## Instruction:
Revert "add github merged pr plugin"
## Code After:
steps:
- label: ":python:"
command:
- pip install -q --no-cache-dir -r requirements.txt -e .
&& py.test -ra --cov=stellargraph tests/ --doctest-modules --doctest-modules --cov-report=term-missing -p no:cacheprovider
&& coveralls
plugins:
docker#v1.3.0:
image: "python:3.6"
workdir: /app
environment:
- PYTHONDONTWRITEBYTECODE=1
- COVERALLS_REPO_TOKEN=$COVERALLS_REPO_TOKEN
- label: "style"
command:
- --check stellargraph tests
plugins:
docker#v1.3.0:
image: "stellargraph/black"
workdir: /app
entrypoint: /usr/bin/black
environment:
- PYTHONDONTWRITEBYTECODE=1
- wait: ~
continue_on_failure: true
- label: ":console: push logs"
command: .buildkite/pushlogs.sh "#build-bots"
| - plugins: &plugins
- stellargraph/github-merged-pr#develop:
- mode: checkout
-
steps:
- label: ":python:"
command:
- pip install -q --no-cache-dir -r requirements.txt -e .
&& py.test -ra --cov=stellargraph tests/ --doctest-modules --doctest-modules --cov-report=term-missing -p no:cacheprovider
- && if [ "$BUILDKITE_PULL_REQUEST" != "false" ] ; then mkdir -p ~/.ssh/ && ssh-keyscan -H github.com > ~/.ssh/known_hosts && git fetch && checkout $BUILDKITE_BRANCH ; fi ; coveralls
+ && coveralls
plugins:
- <<: *plugins
- docker#v1.4.0:
? ^
+ docker#v1.3.0:
? ^
image: "python:3.6"
workdir: /app
environment:
- PYTHONDONTWRITEBYTECODE=1
- COVERALLS_REPO_TOKEN=$COVERALLS_REPO_TOKEN
- - BUILDKITE_BRANCH=$BUILDKITE_BRANCH
- - BUILDKITE_PULL_REQUEST=$BUILDKITE_PULL_REQUEST
- label: "style"
command:
- --check stellargraph tests
plugins:
- <<: *plugins
- docker#v1.4.0:
? ^
+ docker#v1.3.0:
? ^
image: "stellargraph/black"
workdir: /app
entrypoint: /usr/bin/black
environment:
- PYTHONDONTWRITEBYTECODE=1
- wait: ~
continue_on_failure: true
- label: ":console: push logs"
command: .buildkite/pushlogs.sh "#build-bots" | 14 | 0.368421 | 3 | 11 |
edf63b407f056eb35f73e499af0225b5424b8d36 | MMM-Scrobbler.css | MMM-Scrobbler.css | .player{
margin-top:20px;
width:200px;
}
.album-art-container{
}
.album-art{
width:200px;
}
.meta{
text-align: left;
}
.track-name{
font-size:20px;
font-weight: bold;
margin: 0;
}
.artist-name{
font-size:20px;
margin: 0px;}
.album-name{
font-size:16px;
margin: 0px;} | .player{
margin-top:20px;
width:200px;
}
.album-art-container{
}
.album-art{
width:200px;
}
.meta{
}
.track-name{
font-size:20px;
font-weight: bold;
margin: 0;
}
.artist-name{
font-size:20px;
margin: 0px;}
.album-name{
font-size:16px;
margin: 0px;}
| Change text alignment depending on module side | Change text alignment depending on module side
ex. left text alignment on top_left, right text alignment on top_right | CSS | mit | PtrBld/MMM-Scrobbler | css | ## Code Before:
.player{
margin-top:20px;
width:200px;
}
.album-art-container{
}
.album-art{
width:200px;
}
.meta{
text-align: left;
}
.track-name{
font-size:20px;
font-weight: bold;
margin: 0;
}
.artist-name{
font-size:20px;
margin: 0px;}
.album-name{
font-size:16px;
margin: 0px;}
## Instruction:
Change text alignment depending on module side
ex. left text alignment on top_left, right text alignment on top_right
## Code After:
.player{
margin-top:20px;
width:200px;
}
.album-art-container{
}
.album-art{
width:200px;
}
.meta{
}
.track-name{
font-size:20px;
font-weight: bold;
margin: 0;
}
.artist-name{
font-size:20px;
margin: 0px;}
.album-name{
font-size:16px;
margin: 0px;}
| .player{
margin-top:20px;
width:200px;
}
.album-art-container{
}
.album-art{
width:200px;
}
.meta{
- text-align: left;
+
}
.track-name{
font-size:20px;
font-weight: bold;
margin: 0;
}
.artist-name{
font-size:20px;
margin: 0px;}
.album-name{
font-size:16px;
margin: 0px;} | 2 | 0.08 | 1 | 1 |
d0aca36a193c0f74190d41e7fcd13e7113d7ef55 | files/configuration/setup_pki.sh | files/configuration/setup_pki.sh | if [ ! -f "$PKI_DIR/issued/$OVPN_SERVER_CN.crt" ] || [ "$REGENERATE_CERTS" == 'true' ]; then
echo "easyrsa: creating server certs"
dd if=/dev/urandom of=/etc/openvpn/pki/.rnd bs=256 count=1
EASYCMD="/opt/easyrsa/easyrsa --vars=/opt/easyrsa/vars"
$EASYCMD init-pki
$EASYCMD build-ca nopass
$EASYCMD gen-dh
openvpn --genkey --secret $PKI_DIR/ta.key
$EASYCMD build-server-full "$OVPN_SERVER_CN" nopass
if [ "${USE_CLIENT_CERTIFICATE}" == "true" ] ; then
echo "easyrsa: creating client certs"
$EASYCMD build-client-full client nopass
fi
fi
| if [ ! -f "$PKI_DIR/issued/$OVPN_SERVER_CN.crt" ] || [ "$REGENERATE_CERTS" == 'true' ]; then
echo "easyrsa: creating server certs"
sed -i 's/^RANDFILE/#RANDFILE/g' /opt/easyrsa/openssl-1.0.cnf
EASYCMD="/opt/easyrsa/easyrsa --vars=/opt/easyrsa/vars"
$EASYCMD init-pki
$EASYCMD build-ca nopass
$EASYCMD gen-dh
openvpn --genkey --secret $PKI_DIR/ta.key
$EASYCMD build-server-full "$OVPN_SERVER_CN" nopass
if [ "${USE_CLIENT_CERTIFICATE}" == "true" ] ; then
echo "easyrsa: creating client certs"
$EASYCMD build-client-full client nopass
fi
fi
| Fix easyrsa random file error | Fix easyrsa random file error
| Shell | mit | wheelybird/openvpn-server-ldap-otp | shell | ## Code Before:
if [ ! -f "$PKI_DIR/issued/$OVPN_SERVER_CN.crt" ] || [ "$REGENERATE_CERTS" == 'true' ]; then
echo "easyrsa: creating server certs"
dd if=/dev/urandom of=/etc/openvpn/pki/.rnd bs=256 count=1
EASYCMD="/opt/easyrsa/easyrsa --vars=/opt/easyrsa/vars"
$EASYCMD init-pki
$EASYCMD build-ca nopass
$EASYCMD gen-dh
openvpn --genkey --secret $PKI_DIR/ta.key
$EASYCMD build-server-full "$OVPN_SERVER_CN" nopass
if [ "${USE_CLIENT_CERTIFICATE}" == "true" ] ; then
echo "easyrsa: creating client certs"
$EASYCMD build-client-full client nopass
fi
fi
## Instruction:
Fix easyrsa random file error
## Code After:
if [ ! -f "$PKI_DIR/issued/$OVPN_SERVER_CN.crt" ] || [ "$REGENERATE_CERTS" == 'true' ]; then
echo "easyrsa: creating server certs"
sed -i 's/^RANDFILE/#RANDFILE/g' /opt/easyrsa/openssl-1.0.cnf
EASYCMD="/opt/easyrsa/easyrsa --vars=/opt/easyrsa/vars"
$EASYCMD init-pki
$EASYCMD build-ca nopass
$EASYCMD gen-dh
openvpn --genkey --secret $PKI_DIR/ta.key
$EASYCMD build-server-full "$OVPN_SERVER_CN" nopass
if [ "${USE_CLIENT_CERTIFICATE}" == "true" ] ; then
echo "easyrsa: creating client certs"
$EASYCMD build-client-full client nopass
fi
fi
| if [ ! -f "$PKI_DIR/issued/$OVPN_SERVER_CN.crt" ] || [ "$REGENERATE_CERTS" == 'true' ]; then
echo "easyrsa: creating server certs"
- dd if=/dev/urandom of=/etc/openvpn/pki/.rnd bs=256 count=1
+ sed -i 's/^RANDFILE/#RANDFILE/g' /opt/easyrsa/openssl-1.0.cnf
EASYCMD="/opt/easyrsa/easyrsa --vars=/opt/easyrsa/vars"
$EASYCMD init-pki
$EASYCMD build-ca nopass
$EASYCMD gen-dh
openvpn --genkey --secret $PKI_DIR/ta.key
$EASYCMD build-server-full "$OVPN_SERVER_CN" nopass
if [ "${USE_CLIENT_CERTIFICATE}" == "true" ] ; then
echo "easyrsa: creating client certs"
$EASYCMD build-client-full client nopass
fi
fi | 2 | 0.1 | 1 | 1 |
aad5892f716e4880018aaf7dcfc193fae1869c09 | README.md | README.md |
[](https://travis-ci.org/simkimsia/UtilityBehaviors) [](https://coveralls.io/github/willrogers/pml?branch=master) [](https://landscape.io/github/willrogers/pml/) [](http://pml-forked.readthedocs.io/en/latest/?badge=latest)
Python Middlelayer is a Python library intended to make it easy to work with particle accelerators.
## Testing
It is simplest to work with a virtualenv. Then:
* `pip install -r requirements/local.txt`
* `export PYTHONPATH=.`
* `py.test test`
To see a coverage report:
* `py.test --cov=pml test`
|
[](https://travis-ci.org/simkimsia/UtilityBehaviors) [](https://coveralls.io/github/willrogers/pml?branch=master) [](https://landscape.io/github/willrogers/pml/) [](http://pml-forked.readthedocs.io/en/documentation/?badge=documentation)
Python Middlelayer is a Python library intended to make it easy to work with particle accelerators.
## Testing
It is simplest to work with a virtualenv. Then:
* `pip install -r requirements/local.txt`
* `export PYTHONPATH=.`
* `py.test test`
To see a coverage report:
* `py.test --cov=pml test`
| Modify broken link inside badge | Modify broken link inside badge
| Markdown | apache-2.0 | willrogers/pml,willrogers/pml | markdown | ## Code Before:
[](https://travis-ci.org/simkimsia/UtilityBehaviors) [](https://coveralls.io/github/willrogers/pml?branch=master) [](https://landscape.io/github/willrogers/pml/) [](http://pml-forked.readthedocs.io/en/latest/?badge=latest)
Python Middlelayer is a Python library intended to make it easy to work with particle accelerators.
## Testing
It is simplest to work with a virtualenv. Then:
* `pip install -r requirements/local.txt`
* `export PYTHONPATH=.`
* `py.test test`
To see a coverage report:
* `py.test --cov=pml test`
## Instruction:
Modify broken link inside badge
## Code After:
[](https://travis-ci.org/simkimsia/UtilityBehaviors) [](https://coveralls.io/github/willrogers/pml?branch=master) [](https://landscape.io/github/willrogers/pml/) [](http://pml-forked.readthedocs.io/en/documentation/?badge=documentation)
Python Middlelayer is a Python library intended to make it easy to work with particle accelerators.
## Testing
It is simplest to work with a virtualenv. Then:
* `pip install -r requirements/local.txt`
* `export PYTHONPATH=.`
* `py.test test`
To see a coverage report:
* `py.test --cov=pml test`
|
- [](https://travis-ci.org/simkimsia/UtilityBehaviors) [](https://coveralls.io/github/willrogers/pml?branch=master) [](https://landscape.io/github/willrogers/pml/) [](http://pml-forked.readthedocs.io/en/latest/?badge=latest)
? ^^^^^^ ^^^^^^^
+ [](https://travis-ci.org/simkimsia/UtilityBehaviors) [](https://coveralls.io/github/willrogers/pml?branch=master) [](https://landscape.io/github/willrogers/pml/) [](http://pml-forked.readthedocs.io/en/documentation/?badge=documentation)
? ^^^^^^^^^^^^^ ^^^^^^^^^^^^^^
Python Middlelayer is a Python library intended to make it easy to work with particle accelerators.
## Testing
It is simplest to work with a virtualenv. Then:
* `pip install -r requirements/local.txt`
* `export PYTHONPATH=.`
* `py.test test`
To see a coverage report:
* `py.test --cov=pml test` | 2 | 0.125 | 1 | 1 |
f89580810855a8c392afa5200df33bee099afddf | bin/local_deploy.sh | bin/local_deploy.sh | set -e
ROOT=$(dirname "$0")
HELM_DIR="$ROOT/../helm_deploy/cla-public/"
kubectl config use-context docker-for-desktop
helm upgrade cla-public \
$HELM_DIR \
--values ${HELM_DIR}/values-dev.yaml \
--force \
--install
| set -e
ROOT=$(dirname "$0")
HELM_DIR="$ROOT/../helm_deploy/cla-public/"
docker build -t cla_public_local "$ROOT/.."
kubectl config use-context docker-for-desktop
helm upgrade cla-public \
$HELM_DIR \
--values ${HELM_DIR}/values-dev.yaml \
--force \
--install
| Build docker image as part of local deploy | Build docker image as part of local deploy
| Shell | mit | ministryofjustice/cla_public,ministryofjustice/cla_public,ministryofjustice/cla_public,ministryofjustice/cla_public | shell | ## Code Before:
set -e
ROOT=$(dirname "$0")
HELM_DIR="$ROOT/../helm_deploy/cla-public/"
kubectl config use-context docker-for-desktop
helm upgrade cla-public \
$HELM_DIR \
--values ${HELM_DIR}/values-dev.yaml \
--force \
--install
## Instruction:
Build docker image as part of local deploy
## Code After:
set -e
ROOT=$(dirname "$0")
HELM_DIR="$ROOT/../helm_deploy/cla-public/"
docker build -t cla_public_local "$ROOT/.."
kubectl config use-context docker-for-desktop
helm upgrade cla-public \
$HELM_DIR \
--values ${HELM_DIR}/values-dev.yaml \
--force \
--install
| set -e
ROOT=$(dirname "$0")
HELM_DIR="$ROOT/../helm_deploy/cla-public/"
+
+ docker build -t cla_public_local "$ROOT/.."
kubectl config use-context docker-for-desktop
helm upgrade cla-public \
$HELM_DIR \
--values ${HELM_DIR}/values-dev.yaml \
--force \
--install | 2 | 0.166667 | 2 | 0 |
f5a4a82eb69405b6cdd6dfa462dd94079ad918e5 | README.md | README.md | ninepatch-convert
=================
Creating ninepatches by hand can be awful, especially if every developer has to create them himself (e.g. if the base images are exported from vector graphics or similar). This tool is optimized for usage in an automatic export system. In my case, that system is a gradle plugin.
Inside the input directory, there has to be a JSON config file called "ninepatches.json" which defines the ninepatch properties of each input image:
```
{
"ninePatches": {
"testimg1.png": {
"xScalingRange": "16-48",
"yScalingRange": "16-48",
"xPaddingRange": "18-46",
"yPaddingRange": "18-46",
},
"testimg2.png": {
"xScalingRange": "14-50",
"yScalingRange": "14-50",
"xPaddingRange": "16-48",
"yPaddingRange": "16-48",
}
}
}
```
These filepaths are relative to the input directory. A ninepatch for each image will be created in the original file's directory. E.g. ```buttons/image1.png``` -> ```buttons/image1.9.png```.
Detailed usage docs and maven repo will follow.
| ninepatch-convert
=================
[](https://travis-ci.org/andresmanz/ninepatch-convert)
Creating ninepatches by hand can be awful, especially if every developer has to create them himself (e.g. if the base images are exported from vector graphics or similar). This tool is optimized for usage in an automatic export system. In my case, that system is a gradle plugin.
Inside the input directory, there has to be a JSON config file called "ninepatches.json" which defines the ninepatch properties of each input image:
```
{
"ninePatches": {
"testimg1.png": {
"xScalingRange": "16-48",
"yScalingRange": "16-48",
"xPaddingRange": "18-46",
"yPaddingRange": "18-46",
},
"testimg2.png": {
"xScalingRange": "14-50",
"yScalingRange": "14-50",
"xPaddingRange": "16-48",
"yPaddingRange": "16-48",
}
}
}
```
These filepaths are relative to the input directory. A ninepatch for each image will be created in the original file's directory. E.g. ```buttons/image1.png``` -> ```buttons/image1.9.png```.
Detailed usage docs and maven repo will follow.
| Add Travic CI build status image | Add Travic CI build status image | Markdown | apache-2.0 | andresmanz/ninebatch,andresmanz/ninebatch | markdown | ## Code Before:
ninepatch-convert
=================
Creating ninepatches by hand can be awful, especially if every developer has to create them himself (e.g. if the base images are exported from vector graphics or similar). This tool is optimized for usage in an automatic export system. In my case, that system is a gradle plugin.
Inside the input directory, there has to be a JSON config file called "ninepatches.json" which defines the ninepatch properties of each input image:
```
{
"ninePatches": {
"testimg1.png": {
"xScalingRange": "16-48",
"yScalingRange": "16-48",
"xPaddingRange": "18-46",
"yPaddingRange": "18-46",
},
"testimg2.png": {
"xScalingRange": "14-50",
"yScalingRange": "14-50",
"xPaddingRange": "16-48",
"yPaddingRange": "16-48",
}
}
}
```
These filepaths are relative to the input directory. A ninepatch for each image will be created in the original file's directory. E.g. ```buttons/image1.png``` -> ```buttons/image1.9.png```.
Detailed usage docs and maven repo will follow.
## Instruction:
Add Travic CI build status image
## Code After:
ninepatch-convert
=================
[](https://travis-ci.org/andresmanz/ninepatch-convert)
Creating ninepatches by hand can be awful, especially if every developer has to create them himself (e.g. if the base images are exported from vector graphics or similar). This tool is optimized for usage in an automatic export system. In my case, that system is a gradle plugin.
Inside the input directory, there has to be a JSON config file called "ninepatches.json" which defines the ninepatch properties of each input image:
```
{
"ninePatches": {
"testimg1.png": {
"xScalingRange": "16-48",
"yScalingRange": "16-48",
"xPaddingRange": "18-46",
"yPaddingRange": "18-46",
},
"testimg2.png": {
"xScalingRange": "14-50",
"yScalingRange": "14-50",
"xPaddingRange": "16-48",
"yPaddingRange": "16-48",
}
}
}
```
These filepaths are relative to the input directory. A ninepatch for each image will be created in the original file's directory. E.g. ```buttons/image1.png``` -> ```buttons/image1.9.png```.
Detailed usage docs and maven repo will follow.
| ninepatch-convert
=================
+ [](https://travis-ci.org/andresmanz/ninepatch-convert)
+
Creating ninepatches by hand can be awful, especially if every developer has to create them himself (e.g. if the base images are exported from vector graphics or similar). This tool is optimized for usage in an automatic export system. In my case, that system is a gradle plugin.
Inside the input directory, there has to be a JSON config file called "ninepatches.json" which defines the ninepatch properties of each input image:
```
{
"ninePatches": {
"testimg1.png": {
"xScalingRange": "16-48",
"yScalingRange": "16-48",
"xPaddingRange": "18-46",
"yPaddingRange": "18-46",
},
"testimg2.png": {
"xScalingRange": "14-50",
"yScalingRange": "14-50",
"xPaddingRange": "16-48",
"yPaddingRange": "16-48",
}
}
}
```
These filepaths are relative to the input directory. A ninepatch for each image will be created in the original file's directory. E.g. ```buttons/image1.png``` -> ```buttons/image1.9.png```.
Detailed usage docs and maven repo will follow. | 2 | 0.071429 | 2 | 0 |
3d0dd9b2fb7e604ef12b5571585f9181538da30c | README.md | README.md | AssertJ-DB - Assertions for database
==========
Assertions for database
| AssertJ-DB - Assertions for database
==========
AssertJ-DB provides some assertions to test values in a database.
The goal is to be an alternative to DBUnit for people who don't like to write XML.
| Modify the text to see the result on Github | Modify the text to see the result on Github | Markdown | apache-2.0 | otoniel-isidoro/assertj-db,otoniel-isidoro-sofist/assertj-db | markdown | ## Code Before:
AssertJ-DB - Assertions for database
==========
Assertions for database
## Instruction:
Modify the text to see the result on Github
## Code After:
AssertJ-DB - Assertions for database
==========
AssertJ-DB provides some assertions to test values in a database.
The goal is to be an alternative to DBUnit for people who don't like to write XML.
| AssertJ-DB - Assertions for database
==========
- Assertions for database
+ AssertJ-DB provides some assertions to test values in a database.
+
+ The goal is to be an alternative to DBUnit for people who don't like to write XML.
+ | 5 | 1.25 | 4 | 1 |
e762c042cb71a6b4e41fe20fea63fdc38f597aad | microphite.gemspec | microphite.gemspec |
$:.unshift File.expand_path('../lib', __FILE__)
require 'microphite/version'
Gem::Specification.new do |gem|
gem.name = 'microphite'
gem.version = Microphite::VERSION
gem.authors = %w(BZ Technology Services, LLC)
gem.email = %w(support@bz-technology.com)
gem.summary = 'A tiny and fast, asynchronous graphite client'
gem.description = 'A tiny and fast, asynchronous graphite client'
gem.homepage = 'https://github.com/bz-technology/microphite'
gem.add_development_dependency 'rake'
gem.add_development_dependency 'rspec'
gem.add_development_dependency 'coveralls'
gem.files = `git ls-files`.split("\n")
gem.test_files = `git ls-files -- spec/*`.split("\n")
gem.require_paths = %w(lib)
end
|
$:.unshift File.expand_path('../lib', __FILE__)
require 'microphite/version'
Gem::Specification.new do |gem|
gem.name = 'microphite'
gem.version = Microphite::VERSION
gem.authors = %w(BZ Technology Services, LLC)
gem.email = %w(support@bz-technology.com)
gem.summary = 'A tiny and fast, asynchronous graphite client'
gem.description = 'A tiny and fast, asynchronous graphite client'
gem.homepage = 'https://github.com/bz-technology/microphite'
gem.add_development_dependency 'rake', '~> 10.0'
gem.add_development_dependency 'rspec', '~> 2.14.1'
gem.add_development_dependency 'coveralls', '~> 0.7'
gem.files = `git ls-files`.split("\n")
gem.test_files = `git ls-files -- spec/*`.split("\n")
gem.require_paths = %w(lib)
end
| Add gem constraints for development gems | Add gem constraints for development gems
| Ruby | mit | bz-technology/microphite | ruby | ## Code Before:
$:.unshift File.expand_path('../lib', __FILE__)
require 'microphite/version'
Gem::Specification.new do |gem|
gem.name = 'microphite'
gem.version = Microphite::VERSION
gem.authors = %w(BZ Technology Services, LLC)
gem.email = %w(support@bz-technology.com)
gem.summary = 'A tiny and fast, asynchronous graphite client'
gem.description = 'A tiny and fast, asynchronous graphite client'
gem.homepage = 'https://github.com/bz-technology/microphite'
gem.add_development_dependency 'rake'
gem.add_development_dependency 'rspec'
gem.add_development_dependency 'coveralls'
gem.files = `git ls-files`.split("\n")
gem.test_files = `git ls-files -- spec/*`.split("\n")
gem.require_paths = %w(lib)
end
## Instruction:
Add gem constraints for development gems
## Code After:
$:.unshift File.expand_path('../lib', __FILE__)
require 'microphite/version'
Gem::Specification.new do |gem|
gem.name = 'microphite'
gem.version = Microphite::VERSION
gem.authors = %w(BZ Technology Services, LLC)
gem.email = %w(support@bz-technology.com)
gem.summary = 'A tiny and fast, asynchronous graphite client'
gem.description = 'A tiny and fast, asynchronous graphite client'
gem.homepage = 'https://github.com/bz-technology/microphite'
gem.add_development_dependency 'rake', '~> 10.0'
gem.add_development_dependency 'rspec', '~> 2.14.1'
gem.add_development_dependency 'coveralls', '~> 0.7'
gem.files = `git ls-files`.split("\n")
gem.test_files = `git ls-files -- spec/*`.split("\n")
gem.require_paths = %w(lib)
end
|
$:.unshift File.expand_path('../lib', __FILE__)
require 'microphite/version'
Gem::Specification.new do |gem|
gem.name = 'microphite'
gem.version = Microphite::VERSION
gem.authors = %w(BZ Technology Services, LLC)
gem.email = %w(support@bz-technology.com)
gem.summary = 'A tiny and fast, asynchronous graphite client'
gem.description = 'A tiny and fast, asynchronous graphite client'
gem.homepage = 'https://github.com/bz-technology/microphite'
- gem.add_development_dependency 'rake'
+ gem.add_development_dependency 'rake', '~> 10.0'
? +++++++++++
- gem.add_development_dependency 'rspec'
+ gem.add_development_dependency 'rspec', '~> 2.14.1'
? +++++++++++++
- gem.add_development_dependency 'coveralls'
+ gem.add_development_dependency 'coveralls', '~> 0.7'
? ++++++++++
gem.files = `git ls-files`.split("\n")
gem.test_files = `git ls-files -- spec/*`.split("\n")
gem.require_paths = %w(lib)
end | 6 | 0.285714 | 3 | 3 |
c27cfd38e467dd5d52c0e8f5ebb4bf132e5da4a9 | react-native-cli/package.json | react-native-cli/package.json | {
"name": "react-native-cli",
"version": "0.1.7",
"description": "The React Native CLI tools",
"main": "index.js",
"engines": {
"node": ">=4"
},
"scripts": {
"test": "mocha"
},
"bin": {
"react-native": "index.js"
},
"dependencies": {
"chalk": "^1.1.1",
"prompt": "^0.2.14",
"semver": "^5.0.3"
}
}
| {
"name": "react-native-cli",
"version": "0.1.7",
"license" : "BSD-3-Clause",
"description": "The React Native CLI tools",
"main": "index.js",
"engines": {
"node": ">=4"
},
"repository": {
"type": "git",
"url": "https://github.com/facebook/react-native.git"
},
"scripts": {
"test": "mocha"
},
"bin": {
"react-native": "index.js"
},
"dependencies": {
"chalk": "^1.1.1",
"prompt": "^0.2.14",
"semver": "^5.0.3"
}
}
| Add license and source info | Add license and source info
Fixes #4101. | JSON | bsd-3-clause | callstack-io/react-native,a2/react-native,aaron-goshine/react-native,lelandrichardson/react-native,aljs/react-native,frantic/react-native,Ehesp/react-native,zenlambda/react-native,negativetwelve/react-native,hoastoolshop/react-native,lloydho/react-native,mihaigiurgeanu/react-native,formatlos/react-native,Emilios1995/react-native,Maxwell2022/react-native,jeffchienzabinet/react-native,mihaigiurgeanu/react-native,negativetwelve/react-native,pglotov/react-native,satya164/react-native,darkrishabh/react-native,Livyli/react-native,CntChen/react-native,dabit3/react-native,jeffchienzabinet/react-native,rebeccahughes/react-native,clozr/react-native,tszajna0/react-native,orenklein/react-native,myntra/react-native,charlesvinette/react-native,shrutic123/react-native,HealthyWealthy/react-native,jevakallio/react-native,jevakallio/react-native,arbesfeld/react-native,arbesfeld/react-native,ultralame/react-native,Ehesp/react-native,zenlambda/react-native,facebook/react-native,makadaw/react-native,PlexChat/react-native,skatpgusskat/react-native,jeffchienzabinet/react-native,spicyj/react-native,exponent/react-native,esauter5/react-native,xiayz/react-native,cpunion/react-native,chirag04/react-native,martinbigio/react-native,brentvatne/react-native,DanielMSchmidt/react-native,farazs/react-native,bradbumbalough/react-native,quyixia/react-native,CntChen/react-native,imjerrybao/react-native,eduardinni/react-native,dikaiosune/react-native,jasonnoahchoi/react-native,naoufal/react-native,luqin/react-native,javache/react-native,darkrishabh/react-native,gitim/react-native,yamill/react-native,NZAOM/react-native,lprhodes/react-native,programming086/react-native,rebeccahughes/react-native,Bhullnatik/react-native,satya164/react-native,alin23/react-native,dabit3/react-native,aaron-goshine/react-native,CntChen/react-native,machard/react-native,urvashi01/react-native,clozr/react-native,ptmt/react-native-macos,tsjing/react-native,Tredsite/react-native,bradbumbalough/react-native,aaron-goshine/react-native,ultralame/react-native,yamill/react-native,luqin/react-native,mihaigiurgeanu/react-native,HealthyWealthy/react-native,gilesvangruisen/react-native,orenklein/react-native,formatlos/react-native,miracle2k/react-native,wenpkpk/react-native,wenpkpk/react-native,corbt/react-native,salanki/react-native,quyixia/react-native,imjerrybao/react-native,BretJohnson/react-native,satya164/react-native,Purii/react-native,vjeux/react-native,sospartan/react-native,csatf/react-native,shrutic/react-native,hoangpham95/react-native,Swaagie/react-native,jhen0409/react-native,pglotov/react-native,darkrishabh/react-native,vjeux/react-native,aljs/react-native,imjerrybao/react-native,a2/react-native,Swaagie/react-native,Intellicode/react-native,arthuralee/react-native,ankitsinghania94/react-native,exponent/react-native,sghiassy/react-native,Bhullnatik/react-native,hayeah/react-native,hoastoolshop/react-native,sospartan/react-native,adamkrell/react-native,ultralame/react-native,Andreyco/react-native,bradbumbalough/react-native,urvashi01/react-native,hoastoolshop/react-native,apprennet/react-native,foghina/react-native,wesley1001/react-native,MattFoley/react-native,callstack-io/react-native,ptomasroos/react-native,jeffchienzabinet/react-native,Livyli/react-native,sospartan/react-native,pandiaraj44/react-native,ptmt/react-native-macos,DanielMSchmidt/react-native,jeffchienzabinet/react-native,patoroco/react-native,yamill/react-native,eduardinni/react-native,shrutic123/react-native,cdlewis/react-native,iodine/react-native,aljs/react-native,exponentjs/react-native,quyixia/react-native,zenlambda/react-native,dubert/react-native,apprennet/react-native,Swaagie/react-native,htc2u/react-native,negativetwelve/react-native,tgoldenberg/react-native,kesha-antonov/react-native,Guardiannw/react-native,exponent/react-native,charlesvinette/react-native,NZAOM/react-native,frantic/react-native,brentvatne/react-native,gre/react-native,imDangerous/react-native,formatlos/react-native,janicduplessis/react-native,dubert/react-native,almost/react-native,yamill/react-native,adamkrell/react-native,patoroco/react-native,alin23/react-native,htc2u/react-native,MattFoley/react-native,apprennet/react-native,philikon/react-native,pandiaraj44/react-native,peterp/react-native,gitim/react-native,timfpark/react-native,kesha-antonov/react-native,cosmith/react-native,adamkrell/react-native,mironiasty/react-native,nathanajah/react-native,christopherdro/react-native,gitim/react-native,hoangpham95/react-native,naoufal/react-native,CntChen/react-native,xiayz/react-native,javache/react-native,forcedotcom/react-native,skatpgusskat/react-native,xiayz/react-native,jevakallio/react-native,InterfaceInc/react-native,shinate/react-native,imDangerous/react-native,clozr/react-native,peterp/react-native,Intellicode/react-native,skatpgusskat/react-native,chnfeeeeeef/react-native,philikon/react-native,esauter5/react-native,javache/react-native,Bhullnatik/react-native,tadeuzagallo/react-native,tadeuzagallo/react-native,forcedotcom/react-native,htc2u/react-native,browniefed/react-native,miracle2k/react-native,jhen0409/react-native,chirag04/react-native,Tredsite/react-native,Andreyco/react-native,ankitsinghania94/react-native,shinate/react-native,htc2u/react-native,rebeccahughes/react-native,cdlewis/react-native,tszajna0/react-native,hammerandchisel/react-native,darkrishabh/react-native,happypancake/react-native,patoroco/react-native,MattFoley/react-native,Emilios1995/react-native,Ehesp/react-native,Bhullnatik/react-native,javache/react-native,jadbox/react-native,charlesvinette/react-native,gitim/react-native,aljs/react-native,DannyvanderJagt/react-native,charlesvinette/react-native,lelandrichardson/react-native,jeffchienzabinet/react-native,Maxwell2022/react-native,eduardinni/react-native,salanki/react-native,wesley1001/react-native,pglotov/react-native,hoastoolshop/react-native,almost/react-native,shrutic123/react-native,tsjing/react-native,BretJohnson/react-native,exponentjs/react-native,exponent/react-native,jeanblanchard/react-native,martinbigio/react-native,peterp/react-native,DannyvanderJagt/react-native,ptmt/react-native-macos,spicyj/react-native,facebook/react-native,ndejesus1227/react-native,adamkrell/react-native,CntChen/react-native,Livyli/react-native,eduvon0220/react-native,quyixia/react-native,DannyvanderJagt/react-native,formatlos/react-native,cosmith/react-native,zenlambda/react-native,DannyvanderJagt/react-native,CntChen/react-native,rickbeerendonk/react-native,Bhullnatik/react-native,darkrishabh/react-native,Tredsite/react-native,Livyli/react-native,negativetwelve/react-native,jeanblanchard/react-native,christopherdro/react-native,ankitsinghania94/react-native,forcedotcom/react-native,NZAOM/react-native,corbt/react-native,hoangpham95/react-native,udnisap/react-native,pglotov/react-native,dikaiosune/react-native,apprennet/react-native,xiayz/react-native,chirag04/react-native,aaron-goshine/react-native,gre/react-native,skevy/react-native,tgoldenberg/react-native,alin23/react-native,programming086/react-native,cosmith/react-native,hoangpham95/react-native,myntra/react-native,lprhodes/react-native,thotegowda/react-native,machard/react-native,cpunion/react-native,mrspeaker/react-native,MattFoley/react-native,tarkus/react-native-appletv,ehd/react-native,salanki/react-native,farazs/react-native,facebook/react-native,machard/react-native,luqin/react-native,almost/react-native,jaggs6/react-native,foghina/react-native,skatpgusskat/react-native,Maxwell2022/react-native,naoufal/react-native,corbt/react-native,happypancake/react-native,mrspeaker/react-native,timfpark/react-native,MattFoley/react-native,sghiassy/react-native,rickbeerendonk/react-native,hammerandchisel/react-native,skevy/react-native,Tredsite/react-native,esauter5/react-native,jaggs6/react-native,forcedotcom/react-native,mrspeaker/react-native,foghina/react-native,vjeux/react-native,rickbeerendonk/react-native,csatf/react-native,Maxwell2022/react-native,cdlewis/react-native,PlexChat/react-native,hayeah/react-native,InterfaceInc/react-native,xiayz/react-native,Swaagie/react-native,timfpark/react-native,exponentjs/react-native,hayeah/react-native,martinbigio/react-native,makadaw/react-native,skevy/react-native,ProjectSeptemberInc/react-native,Purii/react-native,alin23/react-native,jaggs6/react-native,facebook/react-native,darkrishabh/react-native,DerayGa/react-native,cosmith/react-native,Guardiannw/react-native,eduvon0220/react-native,dubert/react-native,ptomasroos/react-native,Swaagie/react-native,corbt/react-native,yamill/react-native,foghina/react-native,Tredsite/react-native,BretJohnson/react-native,shinate/react-native,DanielMSchmidt/react-native,luqin/react-native,dikaiosune/react-native,jeanblanchard/react-native,jaggs6/react-native,hoastoolshop/react-native,janicduplessis/react-native,lloydho/react-native,a2/react-native,hammerandchisel/react-native,almost/react-native,foghina/react-native,chirag04/react-native,tsjing/react-native,quyixia/react-native,machard/react-native,pandiaraj44/react-native,corbt/react-native,skevy/react-native,pglotov/react-native,ptomasroos/react-native,wenpkpk/react-native,nickhudkins/react-native,InterfaceInc/react-native,gre/react-native,yamill/react-native,ptomasroos/react-native,PlexChat/react-native,htc2u/react-native,kesha-antonov/react-native,salanki/react-native,tadeuzagallo/react-native,wesley1001/react-native,cpunion/react-native,skatpgusskat/react-native,tarkus/react-native-appletv,udnisap/react-native,happypancake/react-native,orenklein/react-native,martinbigio/react-native,CodeLinkIO/react-native,Bhullnatik/react-native,aaron-goshine/react-native,adamjmcgrath/react-native,ehd/react-native,mihaigiurgeanu/react-native,makadaw/react-native,christopherdro/react-native,jadbox/react-native,MattFoley/react-native,a2/react-native,arbesfeld/react-native,Intellicode/react-native,tsjing/react-native,nathanajah/react-native,ankitsinghania94/react-native,Maxwell2022/react-native,mironiasty/react-native,doochik/react-native,makadaw/react-native,jeffchienzabinet/react-native,Livyli/react-native,ProjectSeptemberInc/react-native,ProjectSeptemberInc/react-native,peterp/react-native,mironiasty/react-native,negativetwelve/react-native,naoufal/react-native,doochik/react-native,alin23/react-native,frantic/react-native,formatlos/react-native,iodine/react-native,Ehesp/react-native,InterfaceInc/react-native,DannyvanderJagt/react-native,zenlambda/react-native,kesha-antonov/react-native,cosmith/react-native,chirag04/react-native,aljs/react-native,foghina/react-native,jevakallio/react-native,cpunion/react-native,jasonnoahchoi/react-native,imjerrybao/react-native,foghina/react-native,skevy/react-native,miracle2k/react-native,javache/react-native,htc2u/react-native,Tredsite/react-native,shinate/react-native,corbt/react-native,rickbeerendonk/react-native,jevakallio/react-native,catalinmiron/react-native,ndejesus1227/react-native,philonpang/react-native,tszajna0/react-native,CntChen/react-native,tgoldenberg/react-native,DerayGa/react-native,pglotov/react-native,zenlambda/react-native,myntra/react-native,BretJohnson/react-native,aaron-goshine/react-native,jhen0409/react-native,christopherdro/react-native,catalinmiron/react-native,arbesfeld/react-native,skevy/react-native,InterfaceInc/react-native,ptmt/react-native-macos,gre/react-native,jhen0409/react-native,Purii/react-native,jeanblanchard/react-native,gilesvangruisen/react-native,adamjmcgrath/react-native,martinbigio/react-native,shrutic123/react-native,brentvatne/react-native,imDangerous/react-native,udnisap/react-native,jeanblanchard/react-native,chnfeeeeeef/react-native,ehd/react-native,InterfaceInc/react-native,jhen0409/react-native,shinate/react-native,mironiasty/react-native,frantic/react-native,christopherdro/react-native,peterp/react-native,Swaagie/react-native,patoroco/react-native,wesley1001/react-native,BretJohnson/react-native,programming086/react-native,Intellicode/react-native,zenlambda/react-native,arbesfeld/react-native,skatpgusskat/react-native,wenpkpk/react-native,clozr/react-native,brentvatne/react-native,Bhullnatik/react-native,adamjmcgrath/react-native,adamkrell/react-native,miracle2k/react-native,peterp/react-native,jasonnoahchoi/react-native,chirag04/react-native,satya164/react-native,wenpkpk/react-native,csatf/react-native,skatpgusskat/react-native,philonpang/react-native,jadbox/react-native,farazs/react-native,kesha-antonov/react-native,doochik/react-native,thotegowda/react-native,callstack-io/react-native,dubert/react-native,dubert/react-native,adamkrell/react-native,philonpang/react-native,cpunion/react-native,brentvatne/react-native,CodeLinkIO/react-native,mihaigiurgeanu/react-native,adamjmcgrath/react-native,philikon/react-native,forcedotcom/react-native,dikaiosune/react-native,Swaagie/react-native,tgoldenberg/react-native,HealthyWealthy/react-native,jadbox/react-native,CodeLinkIO/react-native,orenklein/react-native,ankitsinghania94/react-native,timfpark/react-native,dabit3/react-native,hayeah/react-native,tszajna0/react-native,iodine/react-native,adamkrell/react-native,orenklein/react-native,udnisap/react-native,ehd/react-native,ultralame/react-native,udnisap/react-native,formatlos/react-native,gre/react-native,programming086/react-native,thotegowda/react-native,eduardinni/react-native,chnfeeeeeef/react-native,HealthyWealthy/react-native,eduvon0220/react-native,ptomasroos/react-native,Intellicode/react-native,myntra/react-native,nathanajah/react-native,adamkrell/react-native,eduvon0220/react-native,Ehesp/react-native,a2/react-native,DerayGa/react-native,cpunion/react-native,doochik/react-native,chnfeeeeeef/react-native,spicyj/react-native,lloydho/react-native,formatlos/react-native,DerayGa/react-native,tszajna0/react-native,quyixia/react-native,callstack-io/react-native,corbt/react-native,happypancake/react-native,mihaigiurgeanu/react-native,peterp/react-native,HealthyWealthy/react-native,pandiaraj44/react-native,mrspeaker/react-native,sospartan/react-native,wesley1001/react-native,machard/react-native,MattFoley/react-native,arbesfeld/react-native,dubert/react-native,NZAOM/react-native,imDangerous/react-native,apprennet/react-native,happypancake/react-native,Guardiannw/react-native,callstack-io/react-native,compulim/react-native,Tredsite/react-native,negativetwelve/react-native,urvashi01/react-native,orenklein/react-native,HealthyWealthy/react-native,lprhodes/react-native,compulim/react-native,chnfeeeeeef/react-native,imjerrybao/react-native,ehd/react-native,iodine/react-native,exponent/react-native,tarkus/react-native-appletv,thotegowda/react-native,jadbox/react-native,esauter5/react-native,DanielMSchmidt/react-native,imDangerous/react-native,a2/react-native,rickbeerendonk/react-native,tszajna0/react-native,hoangpham95/react-native,Guardiannw/react-native,tarkus/react-native-appletv,ProjectSeptemberInc/react-native,naoufal/react-native,urvashi01/react-native,miracle2k/react-native,hoangpham95/react-native,ultralame/react-native,gre/react-native,ehd/react-native,jeanblanchard/react-native,pandiaraj44/react-native,compulim/react-native,eduvon0220/react-native,spicyj/react-native,satya164/react-native,brentvatne/react-native,almost/react-native,chnfeeeeeef/react-native,wenpkpk/react-native,patoroco/react-native,mrspeaker/react-native,htc2u/react-native,shrutic/react-native,wesley1001/react-native,gilesvangruisen/react-native,iodine/react-native,lprhodes/react-native,arthuralee/react-native,mrspeaker/react-native,exponentjs/react-native,NZAOM/react-native,gilesvangruisen/react-native,eduvon0220/react-native,ankitsinghania94/react-native,iodine/react-native,wenpkpk/react-native,Emilios1995/react-native,Intellicode/react-native,Livyli/react-native,rebeccahughes/react-native,imDangerous/react-native,csatf/react-native,salanki/react-native,cosmith/react-native,Emilios1995/react-native,tszajna0/react-native,naoufal/react-native,DannyvanderJagt/react-native,skevy/react-native,bradbumbalough/react-native,charlesvinette/react-native,eduvon0220/react-native,Andreyco/react-native,forcedotcom/react-native,HealthyWealthy/react-native,skatpgusskat/react-native,sghiassy/react-native,mironiasty/react-native,miracle2k/react-native,nathanajah/react-native,salanki/react-native,PlexChat/react-native,NZAOM/react-native,martinbigio/react-native,nickhudkins/react-native,udnisap/react-native,tadeuzagallo/react-native,ProjectSeptemberInc/react-native,CodeLinkIO/react-native,xiayz/react-native,rickbeerendonk/react-native,browniefed/react-native,myntra/react-native,shrutic123/react-native,ptmt/react-native-macos,mironiasty/react-native,spicyj/react-native,exponent/react-native,charlesvinette/react-native,gitim/react-native,a2/react-native,darkrishabh/react-native,facebook/react-native,timfpark/react-native,charlesvinette/react-native,shrutic123/react-native,farazs/react-native,HealthyWealthy/react-native,philonpang/react-native,tarkus/react-native-appletv,sospartan/react-native,miracle2k/react-native,pandiaraj44/react-native,vjeux/react-native,ptmt/react-native-macos,exponentjs/react-native,tsjing/react-native,chirag04/react-native,rebeccahughes/react-native,cdlewis/react-native,tgoldenberg/react-native,janicduplessis/react-native,timfpark/react-native,Emilios1995/react-native,hammerandchisel/react-native,hoangpham95/react-native,jevakallio/react-native,happypancake/react-native,hoastoolshop/react-native,Livyli/react-native,brentvatne/react-native,doochik/react-native,Maxwell2022/react-native,Andreyco/react-native,lprhodes/react-native,pandiaraj44/react-native,jasonnoahchoi/react-native,Guardiannw/react-native,dikaiosune/react-native,eduvon0220/react-native,darkrishabh/react-native,exponent/react-native,philonpang/react-native,htc2u/react-native,PlexChat/react-native,adamjmcgrath/react-native,dabit3/react-native,jadbox/react-native,janicduplessis/react-native,bradbumbalough/react-native,tadeuzagallo/react-native,shrutic123/react-native,browniefed/react-native,browniefed/react-native,shinate/react-native,Ehesp/react-native,mihaigiurgeanu/react-native,kesha-antonov/react-native,mrspeaker/react-native,clozr/react-native,satya164/react-native,pglotov/react-native,spicyj/react-native,gitim/react-native,ndejesus1227/react-native,dubert/react-native,luqin/react-native,doochik/react-native,hammerandchisel/react-native,imDangerous/react-native,doochik/react-native,jeanblanchard/react-native,philikon/react-native,hoastoolshop/react-native,peterp/react-native,shrutic/react-native,dabit3/react-native,gilesvangruisen/react-native,alin23/react-native,Intellicode/react-native,Emilios1995/react-native,exponentjs/react-native,csatf/react-native,jaggs6/react-native,dikaiosune/react-native,almost/react-native,NZAOM/react-native,sospartan/react-native,jaggs6/react-native,programming086/react-native,clozr/react-native,nickhudkins/react-native,Andreyco/react-native,DanielMSchmidt/react-native,cdlewis/react-native,InterfaceInc/react-native,shrutic/react-native,nickhudkins/react-native,formatlos/react-native,jeffchienzabinet/react-native,cosmith/react-native,ptmt/react-native-macos,ankitsinghania94/react-native,catalinmiron/react-native,browniefed/react-native,quyixia/react-native,spicyj/react-native,arbesfeld/react-native,farazs/react-native,tgoldenberg/react-native,InterfaceInc/react-native,esauter5/react-native,ProjectSeptemberInc/react-native,christopherdro/react-native,spicyj/react-native,BretJohnson/react-native,cdlewis/react-native,gilesvangruisen/react-native,luqin/react-native,wenpkpk/react-native,thotegowda/react-native,DanielMSchmidt/react-native,philonpang/react-native,DanielMSchmidt/react-native,lloydho/react-native,DanielMSchmidt/react-native,hammerandchisel/react-native,shrutic/react-native,tadeuzagallo/react-native,udnisap/react-native,adamjmcgrath/react-native,farazs/react-native,jeanblanchard/react-native,hammerandchisel/react-native,rickbeerendonk/react-native,jasonnoahchoi/react-native,machard/react-native,BretJohnson/react-native,mihaigiurgeanu/react-native,Bhullnatik/react-native,Ehesp/react-native,PlexChat/react-native,doochik/react-native,Maxwell2022/react-native,jevakallio/react-native,naoufal/react-native,corbt/react-native,DerayGa/react-native,a2/react-native,eduardinni/react-native,dikaiosune/react-native,urvashi01/react-native,lelandrichardson/react-native,callstack-io/react-native,mironiasty/react-native,Purii/react-native,browniefed/react-native,patoroco/react-native,philikon/react-native,tgoldenberg/react-native,sospartan/react-native,machard/react-native,Andreyco/react-native,nickhudkins/react-native,cpunion/react-native,nickhudkins/react-native,happypancake/react-native,jevakallio/react-native,apprennet/react-native,philikon/react-native,thotegowda/react-native,facebook/react-native,programming086/react-native,makadaw/react-native,lelandrichardson/react-native,tgoldenberg/react-native,Swaagie/react-native,csatf/react-native,frantic/react-native,jevakallio/react-native,makadaw/react-native,catalinmiron/react-native,martinbigio/react-native,PlexChat/react-native,gitim/react-native,eduardinni/react-native,sghiassy/react-native,browniefed/react-native,gilesvangruisen/react-native,esauter5/react-native,janicduplessis/react-native,urvashi01/react-native,CodeLinkIO/react-native,sghiassy/react-native,tarkus/react-native-appletv,Purii/react-native,myntra/react-native,compulim/react-native,shrutic/react-native,Tredsite/react-native,dabit3/react-native,catalinmiron/react-native,Emilios1995/react-native,foghina/react-native,negativetwelve/react-native,ehd/react-native,CodeLinkIO/react-native,Intellicode/react-native,jasonnoahchoi/react-native,ptomasroos/react-native,philikon/react-native,catalinmiron/react-native,callstack-io/react-native,eduardinni/react-native,Maxwell2022/react-native,jhen0409/react-native,ptmt/react-native-macos,Purii/react-native,yamill/react-native,kesha-antonov/react-native,ankitsinghania94/react-native,gitim/react-native,jadbox/react-native,dubert/react-native,miracle2k/react-native,tsjing/react-native,urvashi01/react-native,callstack-io/react-native,dabit3/react-native,mironiasty/react-native,wesley1001/react-native,cdlewis/react-native,hammerandchisel/react-native,rickbeerendonk/react-native,lloydho/react-native,Guardiannw/react-native,csatf/react-native,exponentjs/react-native,jasonnoahchoi/react-native,yamill/react-native,imjerrybao/react-native,thotegowda/react-native,charlesvinette/react-native,chnfeeeeeef/react-native,imDangerous/react-native,sghiassy/react-native,DannyvanderJagt/react-native,tadeuzagallo/react-native,aaron-goshine/react-native,arbesfeld/react-native,farazs/react-native,bradbumbalough/react-native,zenlambda/react-native,nathanajah/react-native,DerayGa/react-native,mrspeaker/react-native,formatlos/react-native,lprhodes/react-native,lloydho/react-native,javache/react-native,timfpark/react-native,janicduplessis/react-native,iodine/react-native,catalinmiron/react-native,DerayGa/react-native,xiayz/react-native,philonpang/react-native,Andreyco/react-native,clozr/react-native,brentvatne/react-native,tszajna0/react-native,NZAOM/react-native,lloydho/react-native,sospartan/react-native,shrutic/react-native,xiayz/react-native,compulim/react-native,shrutic123/react-native,philikon/react-native,dikaiosune/react-native,pglotov/react-native,Emilios1995/react-native,browniefed/react-native,kesha-antonov/react-native,orenklein/react-native,clozr/react-native,satya164/react-native,CodeLinkIO/react-native,Ehesp/react-native,myntra/react-native,CntChen/react-native,lelandrichardson/react-native,programming086/react-native,shinate/react-native,brentvatne/react-native,PlexChat/react-native,janicduplessis/react-native,Livyli/react-native,timfpark/react-native,forcedotcom/react-native,philonpang/react-native,lprhodes/react-native,farazs/react-native,tsjing/react-native,javache/react-native,facebook/react-native,lelandrichardson/react-native,aaron-goshine/react-native,javache/react-native,imjerrybao/react-native,christopherdro/react-native,dabit3/react-native,cosmith/react-native,MattFoley/react-native,cpunion/react-native,aljs/react-native,alin23/react-native,imjerrybao/react-native,lprhodes/react-native,exponent/react-native,tadeuzagallo/react-native,Purii/react-native,ProjectSeptemberInc/react-native,DannyvanderJagt/react-native,adamjmcgrath/react-native,udnisap/react-native,iodine/react-native,rickbeerendonk/react-native,ptomasroos/react-native,chnfeeeeeef/react-native,wesley1001/react-native,doochik/react-native,cdlewis/react-native,ptomasroos/react-native,salanki/react-native,shrutic/react-native,makadaw/react-native,almost/react-native,tarkus/react-native-appletv,pandiaraj44/react-native,ndejesus1227/react-native,hoastoolshop/react-native,farazs/react-native,catalinmiron/react-native,arthuralee/react-native,negativetwelve/react-native,lelandrichardson/react-native,lelandrichardson/react-native,patoroco/react-native,eduardinni/react-native,esauter5/react-native,almost/react-native,jhen0409/react-native,CodeLinkIO/react-native,Purii/react-native,ProjectSeptemberInc/react-native,hayeah/react-native,programming086/react-native,bradbumbalough/react-native,Guardiannw/react-native,skevy/react-native,sghiassy/react-native,naoufal/react-native,urvashi01/react-native,ndejesus1227/react-native,aljs/react-native,christopherdro/react-native,makadaw/react-native,patoroco/react-native,chirag04/react-native,esauter5/react-native,satya164/react-native,nickhudkins/react-native,Guardiannw/react-native,myntra/react-native,cdlewis/react-native,mironiasty/react-native,martinbigio/react-native,gre/react-native,javache/react-native,nathanajah/react-native,gilesvangruisen/react-native,quyixia/react-native,orenklein/react-native,gre/react-native,apprennet/react-native,tsjing/react-native,ndejesus1227/react-native,luqin/react-native,kesha-antonov/react-native,aljs/react-native,forcedotcom/react-native,alin23/react-native,nathanajah/react-native,thotegowda/react-native,BretJohnson/react-native,nathanajah/react-native,Andreyco/react-native,DerayGa/react-native,apprennet/react-native,negativetwelve/react-native,facebook/react-native,ndejesus1227/react-native,ehd/react-native,sghiassy/react-native,myntra/react-native,salanki/react-native,makadaw/react-native,vjeux/react-native,hoangpham95/react-native,arthuralee/react-native,jhen0409/react-native,exponentjs/react-native,jaggs6/react-native,lloydho/react-native,facebook/react-native,happypancake/react-native,shinate/react-native,jaggs6/react-native,csatf/react-native,nickhudkins/react-native,tarkus/react-native-appletv,bradbumbalough/react-native,jasonnoahchoi/react-native,ndejesus1227/react-native,adamjmcgrath/react-native,jadbox/react-native,machard/react-native,arthuralee/react-native,janicduplessis/react-native,luqin/react-native | json | ## Code Before:
{
"name": "react-native-cli",
"version": "0.1.7",
"description": "The React Native CLI tools",
"main": "index.js",
"engines": {
"node": ">=4"
},
"scripts": {
"test": "mocha"
},
"bin": {
"react-native": "index.js"
},
"dependencies": {
"chalk": "^1.1.1",
"prompt": "^0.2.14",
"semver": "^5.0.3"
}
}
## Instruction:
Add license and source info
Fixes #4101.
## Code After:
{
"name": "react-native-cli",
"version": "0.1.7",
"license" : "BSD-3-Clause",
"description": "The React Native CLI tools",
"main": "index.js",
"engines": {
"node": ">=4"
},
"repository": {
"type": "git",
"url": "https://github.com/facebook/react-native.git"
},
"scripts": {
"test": "mocha"
},
"bin": {
"react-native": "index.js"
},
"dependencies": {
"chalk": "^1.1.1",
"prompt": "^0.2.14",
"semver": "^5.0.3"
}
}
| {
"name": "react-native-cli",
"version": "0.1.7",
+ "license" : "BSD-3-Clause",
"description": "The React Native CLI tools",
"main": "index.js",
"engines": {
"node": ">=4"
+ },
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/facebook/react-native.git"
},
"scripts": {
"test": "mocha"
},
"bin": {
"react-native": "index.js"
},
"dependencies": {
"chalk": "^1.1.1",
"prompt": "^0.2.14",
"semver": "^5.0.3"
}
} | 5 | 0.25 | 5 | 0 |
9d5975acddb3dcf1851ea2c5bb2fc38ce7e42a5b | src/PublicApi.js | src/PublicApi.js | 'use strict';
const Engine = require('./Engine');
const PublicSelect = require('./public/PublicSelect');
const PublicApiOptions = require('./PublicApiOptions');
const Explainer = require('./Explainer');
class PublicApi
{
/**
*
* @param {PublicApiOptions} options
*/
constructor(options = new PublicApiOptions)
{
if (options instanceof PublicApiOptions) {
this.options = options;
} else {
this.options = new PublicApiOptions(options);
}
this.engine = new Engine();
}
/**
*
* @param {string} sql
* @returns {PublicSelect}
*/
query(sql)
{
return new PublicSelect(this.engine.createQuery(sql, this.options), this.options.dataSourceResolvers);
}
explain(select)
{
const e = new Explainer();
return e.createExplain(select);
}
}
PublicApi.DataSourceResolver = require('./DataSourceResolver');
PublicApi.exceptions = {
JlException: require('./error/JlException'),
SqlFunctionArgumentError: require('./error/SqlFunctionArgumentError'),
SqlLogicError: require('./error/SqlLogicError'),
SqlNotSupported: require('./error/SqlNotSupported'),
JsonParsingError: require('./error/JsonParsingError'),
DataSourceNotFound: require('./error/DataSourceNotFound')
};
module.exports = PublicApi;
| 'use strict';
const Engine = require('./Engine');
const PublicSelect = require('./public/PublicSelect');
const PublicApiOptions = require('./PublicApiOptions');
const Explainer = require('./Explainer');
class PublicApi
{
/**
*
* @param {PublicApiOptions} options
*/
constructor(options = new PublicApiOptions)
{
if (options instanceof PublicApiOptions) {
this.options = options;
} else {
this.options = new PublicApiOptions(options);
}
this.engine = new Engine();
}
/**
*
* @param {string} sql
* @returns {PublicSelect}
*/
query(sql)
{
return new PublicSelect(this.engine.createQuery(sql, this.options), this.options.dataSourceResolvers);
}
explain(select)
{
const e = new Explainer();
return e.createExplain(select);
}
}
PublicApi.DataSourceResolver = require('./DataSourceResolver');
PublicApi.exceptions = {
JlException: require('./error/JlException'),
SqlFunctionArgumentError: require('./error/SqlFunctionArgumentError'),
SqlLogicError: require('./error/SqlLogicError'),
SqlNotSupported: require('./error/SqlNotSupported'),
JsonParsingError: require('./error/JsonParsingError'),
DataSourceNotFound: require('./error/DataSourceNotFound')
};
PublicApi.version = require('../package.json').version;
module.exports = PublicApi;
| Add `version` field in exports | Add `version` field in exports | JavaScript | mit | avz/node-jl-sql-api | javascript | ## Code Before:
'use strict';
const Engine = require('./Engine');
const PublicSelect = require('./public/PublicSelect');
const PublicApiOptions = require('./PublicApiOptions');
const Explainer = require('./Explainer');
class PublicApi
{
/**
*
* @param {PublicApiOptions} options
*/
constructor(options = new PublicApiOptions)
{
if (options instanceof PublicApiOptions) {
this.options = options;
} else {
this.options = new PublicApiOptions(options);
}
this.engine = new Engine();
}
/**
*
* @param {string} sql
* @returns {PublicSelect}
*/
query(sql)
{
return new PublicSelect(this.engine.createQuery(sql, this.options), this.options.dataSourceResolvers);
}
explain(select)
{
const e = new Explainer();
return e.createExplain(select);
}
}
PublicApi.DataSourceResolver = require('./DataSourceResolver');
PublicApi.exceptions = {
JlException: require('./error/JlException'),
SqlFunctionArgumentError: require('./error/SqlFunctionArgumentError'),
SqlLogicError: require('./error/SqlLogicError'),
SqlNotSupported: require('./error/SqlNotSupported'),
JsonParsingError: require('./error/JsonParsingError'),
DataSourceNotFound: require('./error/DataSourceNotFound')
};
module.exports = PublicApi;
## Instruction:
Add `version` field in exports
## Code After:
'use strict';
const Engine = require('./Engine');
const PublicSelect = require('./public/PublicSelect');
const PublicApiOptions = require('./PublicApiOptions');
const Explainer = require('./Explainer');
class PublicApi
{
/**
*
* @param {PublicApiOptions} options
*/
constructor(options = new PublicApiOptions)
{
if (options instanceof PublicApiOptions) {
this.options = options;
} else {
this.options = new PublicApiOptions(options);
}
this.engine = new Engine();
}
/**
*
* @param {string} sql
* @returns {PublicSelect}
*/
query(sql)
{
return new PublicSelect(this.engine.createQuery(sql, this.options), this.options.dataSourceResolvers);
}
explain(select)
{
const e = new Explainer();
return e.createExplain(select);
}
}
PublicApi.DataSourceResolver = require('./DataSourceResolver');
PublicApi.exceptions = {
JlException: require('./error/JlException'),
SqlFunctionArgumentError: require('./error/SqlFunctionArgumentError'),
SqlLogicError: require('./error/SqlLogicError'),
SqlNotSupported: require('./error/SqlNotSupported'),
JsonParsingError: require('./error/JsonParsingError'),
DataSourceNotFound: require('./error/DataSourceNotFound')
};
PublicApi.version = require('../package.json').version;
module.exports = PublicApi;
| 'use strict';
const Engine = require('./Engine');
const PublicSelect = require('./public/PublicSelect');
const PublicApiOptions = require('./PublicApiOptions');
const Explainer = require('./Explainer');
class PublicApi
{
/**
*
* @param {PublicApiOptions} options
*/
constructor(options = new PublicApiOptions)
{
if (options instanceof PublicApiOptions) {
this.options = options;
} else {
this.options = new PublicApiOptions(options);
}
this.engine = new Engine();
}
/**
*
* @param {string} sql
* @returns {PublicSelect}
*/
query(sql)
{
return new PublicSelect(this.engine.createQuery(sql, this.options), this.options.dataSourceResolvers);
}
explain(select)
{
const e = new Explainer();
return e.createExplain(select);
}
}
PublicApi.DataSourceResolver = require('./DataSourceResolver');
PublicApi.exceptions = {
JlException: require('./error/JlException'),
SqlFunctionArgumentError: require('./error/SqlFunctionArgumentError'),
SqlLogicError: require('./error/SqlLogicError'),
SqlNotSupported: require('./error/SqlNotSupported'),
JsonParsingError: require('./error/JsonParsingError'),
DataSourceNotFound: require('./error/DataSourceNotFound')
};
+ PublicApi.version = require('../package.json').version;
+
module.exports = PublicApi; | 2 | 0.037037 | 2 | 0 |
335f0f52ab5a28fb8347b0d0f595b1356188daeb | src/formly/types/horizontal-markdown-area.html | src/formly/types/horizontal-markdown-area.html |
<ul class="nav nav-tabs">
<li ng-class="{'active': 'both'}[view]">
<button type="button" ng-click="view='markdown'" ng-init="view='markdown'" class="btn btn-default">Markdown</button>
</li>
<li ng-class="{'active': 'both'}[view]">
<button type="button" ng-click="view='preview'" class="btn btn-default">Vorschau</button>
</li>
</ul>
<textarea ng-if="view === 'markdown'" ng-model="model[options.key]" class="form-control"></textarea>
<div ng-if="view === 'preview'" markdown="model[options.key]" math-jax></div> | <uib-tabset>
<uib-tab active="true" heading="Markdown">
<textarea ng-model="model[options.key]" class="form-control" style="height:100%"></textarea>
</uib-tab>
<uib-tab heading="Vorschau">
<div markdown="model[options.key]" math-jax></div>
</uib-tab>
<uib-tab heading="Nebeneinander">
<textarea ng-model="model[options.key]" class="form-control" style="height:100%;width:50%;display:inline-block"></textarea>
<div markdown="model[options.key]" style="width:50%;display:inline-block" math-jax></div>
</uib-tab>
</uib-tabset> | Rewrite template of markdown input | Rewrite template of markdown input
| HTML | mit | tamaracha/wbt-framework,tamaracha/wbt-framework,tamaracha/wbt-framework | html | ## Code Before:
<ul class="nav nav-tabs">
<li ng-class="{'active': 'both'}[view]">
<button type="button" ng-click="view='markdown'" ng-init="view='markdown'" class="btn btn-default">Markdown</button>
</li>
<li ng-class="{'active': 'both'}[view]">
<button type="button" ng-click="view='preview'" class="btn btn-default">Vorschau</button>
</li>
</ul>
<textarea ng-if="view === 'markdown'" ng-model="model[options.key]" class="form-control"></textarea>
<div ng-if="view === 'preview'" markdown="model[options.key]" math-jax></div>
## Instruction:
Rewrite template of markdown input
## Code After:
<uib-tabset>
<uib-tab active="true" heading="Markdown">
<textarea ng-model="model[options.key]" class="form-control" style="height:100%"></textarea>
</uib-tab>
<uib-tab heading="Vorschau">
<div markdown="model[options.key]" math-jax></div>
</uib-tab>
<uib-tab heading="Nebeneinander">
<textarea ng-model="model[options.key]" class="form-control" style="height:100%;width:50%;display:inline-block"></textarea>
<div markdown="model[options.key]" style="width:50%;display:inline-block" math-jax></div>
</uib-tab>
</uib-tabset> | + <uib-tabset>
+ <uib-tab active="true" heading="Markdown">
-
- <ul class="nav nav-tabs">
- <li ng-class="{'active': 'both'}[view]">
- <button type="button" ng-click="view='markdown'" ng-init="view='markdown'" class="btn btn-default">Markdown</button>
- </li>
- <li ng-class="{'active': 'both'}[view]">
- <button type="button" ng-click="view='preview'" class="btn btn-default">Vorschau</button>
- </li>
- </ul>
- <textarea ng-if="view === 'markdown'" ng-model="model[options.key]" class="form-control"></textarea>
? ----------------------------
+ <textarea ng-model="model[options.key]" class="form-control" style="height:100%"></textarea>
? ++++++++++++++++++++
+ </uib-tab>
+ <uib-tab heading="Vorschau">
- <div ng-if="view === 'preview'" markdown="model[options.key]" math-jax></div>
? ---------------------------
+ <div markdown="model[options.key]" math-jax></div>
+ </uib-tab>
+ <uib-tab heading="Nebeneinander">
+ <textarea ng-model="model[options.key]" class="form-control" style="height:100%;width:50%;display:inline-block"></textarea>
+ <div markdown="model[options.key]" style="width:50%;display:inline-block" math-jax></div>
+ </uib-tab>
+ </uib-tabset> | 23 | 2.090909 | 12 | 11 |
a37f520275ad3b814525f9f71713cd18531e0441 | CONTRIBUTING.md | CONTRIBUTING.md |
1. [Fork the repository](https://help.github.com/articles/fork-a-repo).
2. [Create a topic branch](http://learn.github.com/p/branching.html).
3. Make your changes, including tests for your changes which maintain [coverage](https://coveralls.io/r/jdennes/omniauth-createsend).
4. Ensure that all tests pass, by running `bundle exec rake`. The [Travis CI build](https://travis-ci.org/jdennes/omniauth-createsend) runs on Ruby `2.0.0`, `1.9.3`, `1.9.2`, `1.8.7`, and `ree`.
5. It should go without saying, but do not increment the version number in your commits.
6. [Submit a pull request](https://help.github.com/articles/using-pull-requests).
|
1. [Fork the repository](https://help.github.com/articles/fork-a-repo).
2. Create a topic branch.
3. Make your changes, including tests for your changes which maintain [coverage](https://coveralls.io/r/jdennes/omniauth-createsend).
4. Ensure that all tests pass, by running `bundle exec rake`. The [Travis CI build](https://travis-ci.org/jdennes/omniauth-createsend) runs on Ruby `2.0.0`, `1.9.3`, `1.9.2`, `1.8.7`, and `ree`.
5. It should go without saying, but do not increment the version number in your commits.
6. [Submit a pull request](https://help.github.com/articles/using-pull-requests).
| Remove broken link from contributing guidelines | Remove broken link from contributing guidelines
| Markdown | mit | jdennes/omniauth-createsend | markdown | ## Code Before:
1. [Fork the repository](https://help.github.com/articles/fork-a-repo).
2. [Create a topic branch](http://learn.github.com/p/branching.html).
3. Make your changes, including tests for your changes which maintain [coverage](https://coveralls.io/r/jdennes/omniauth-createsend).
4. Ensure that all tests pass, by running `bundle exec rake`. The [Travis CI build](https://travis-ci.org/jdennes/omniauth-createsend) runs on Ruby `2.0.0`, `1.9.3`, `1.9.2`, `1.8.7`, and `ree`.
5. It should go without saying, but do not increment the version number in your commits.
6. [Submit a pull request](https://help.github.com/articles/using-pull-requests).
## Instruction:
Remove broken link from contributing guidelines
## Code After:
1. [Fork the repository](https://help.github.com/articles/fork-a-repo).
2. Create a topic branch.
3. Make your changes, including tests for your changes which maintain [coverage](https://coveralls.io/r/jdennes/omniauth-createsend).
4. Ensure that all tests pass, by running `bundle exec rake`. The [Travis CI build](https://travis-ci.org/jdennes/omniauth-createsend) runs on Ruby `2.0.0`, `1.9.3`, `1.9.2`, `1.8.7`, and `ree`.
5. It should go without saying, but do not increment the version number in your commits.
6. [Submit a pull request](https://help.github.com/articles/using-pull-requests).
|
1. [Fork the repository](https://help.github.com/articles/fork-a-repo).
- 2. [Create a topic branch](http://learn.github.com/p/branching.html).
+ 2. Create a topic branch.
3. Make your changes, including tests for your changes which maintain [coverage](https://coveralls.io/r/jdennes/omniauth-createsend).
4. Ensure that all tests pass, by running `bundle exec rake`. The [Travis CI build](https://travis-ci.org/jdennes/omniauth-createsend) runs on Ruby `2.0.0`, `1.9.3`, `1.9.2`, `1.8.7`, and `ree`.
5. It should go without saying, but do not increment the version number in your commits.
6. [Submit a pull request](https://help.github.com/articles/using-pull-requests). | 2 | 0.285714 | 1 | 1 |
0e359034e3fd80d26493991f18bacf318f422df3 | index.js | index.js | /*
*/
var hash;
var exec = require('child_process').exec;
exports.version = function(major, minor, cb) {
if (hash) {
cb (null, hash);
} else {
var child = exec('git rev-parse --short HEAD', {cwd: __dirname} ,
function (error, stdout, stderr) {
hash = [major, minor, stdout.replace(/\s/g, '')].join('.');
cb(error, hash);
});
}
}; | /*
*/
var githash;
var exec = require('child_process').exec;
/**
* Generate the formatted key given the major, minor and hash versions.
* @param {number|string} major
* @param {number|string} minor
* @param {string} githash
*
* @param {string} the version key
*/
var _makeKey = function (major, minor, githash) {
return [major, minor, githash.replace(/\s/g, '')].join('.');
};
/**
* Generate a version number that encodes the git hash.
*
* @param {number|string} major
* @param {number|string} minor
* @param {function (error, string)} cb - callback with the result
* @param {boolean=false} force - force the recomputation of the git hash
*/
exports.version = function(major, minor, cb, force) {
if (githash && force !== true) {
cb(null, _makeKey(major, minor, githash));
} else {
var child = exec('git rev-parse --short HEAD', {cwd: __dirname},
function (error, stdout, stderr) {
cb(error, _makeKey(major, minor, stdout));
}
);
}
};
| Allow the caller to force the recomputation of the version | Allow the caller to force the recomputation of the version
The flag is added to permit users to always get the latest version.
This is important in scenarios where a server is monitoring a file
system and automatically reloading when the contents change. With
the force flag, the server can ensure it has the latest version
of the git hash.
| JavaScript | mit | Reregistered/version-git | javascript | ## Code Before:
/*
*/
var hash;
var exec = require('child_process').exec;
exports.version = function(major, minor, cb) {
if (hash) {
cb (null, hash);
} else {
var child = exec('git rev-parse --short HEAD', {cwd: __dirname} ,
function (error, stdout, stderr) {
hash = [major, minor, stdout.replace(/\s/g, '')].join('.');
cb(error, hash);
});
}
};
## Instruction:
Allow the caller to force the recomputation of the version
The flag is added to permit users to always get the latest version.
This is important in scenarios where a server is monitoring a file
system and automatically reloading when the contents change. With
the force flag, the server can ensure it has the latest version
of the git hash.
## Code After:
/*
*/
var githash;
var exec = require('child_process').exec;
/**
* Generate the formatted key given the major, minor and hash versions.
* @param {number|string} major
* @param {number|string} minor
* @param {string} githash
*
* @param {string} the version key
*/
var _makeKey = function (major, minor, githash) {
return [major, minor, githash.replace(/\s/g, '')].join('.');
};
/**
* Generate a version number that encodes the git hash.
*
* @param {number|string} major
* @param {number|string} minor
* @param {function (error, string)} cb - callback with the result
* @param {boolean=false} force - force the recomputation of the git hash
*/
exports.version = function(major, minor, cb, force) {
if (githash && force !== true) {
cb(null, _makeKey(major, minor, githash));
} else {
var child = exec('git rev-parse --short HEAD', {cwd: __dirname},
function (error, stdout, stderr) {
cb(error, _makeKey(major, minor, stdout));
}
);
}
};
| /*
*/
- var hash;
+ var githash;
? +++
var exec = require('child_process').exec;
+
+ /**
+ * Generate the formatted key given the major, minor and hash versions.
+ * @param {number|string} major
+ * @param {number|string} minor
+ * @param {string} githash
+ *
+ * @param {string} the version key
+ */
+ var _makeKey = function (major, minor, githash) {
+ return [major, minor, githash.replace(/\s/g, '')].join('.');
+ };
+
+ /**
+ * Generate a version number that encodes the git hash.
+ *
+ * @param {number|string} major
+ * @param {number|string} minor
+ * @param {function (error, string)} cb - callback with the result
+ * @param {boolean=false} force - force the recomputation of the git hash
+ */
- exports.version = function(major, minor, cb) {
+ exports.version = function(major, minor, cb, force) {
? +++++++
- if (hash) {
- cb (null, hash);
+ if (githash && force !== true) {
+ cb(null, _makeKey(major, minor, githash));
} else {
- var child = exec('git rev-parse --short HEAD', {cwd: __dirname} ,
? -
+ var child = exec('git rev-parse --short HEAD', {cwd: __dirname},
function (error, stdout, stderr) {
+ cb(error, _makeKey(major, minor, stdout));
- hash = [major, minor, stdout.replace(/\s/g, '')].join('.');
- cb(error, hash);
- });
? --
+ }
+ );
}
}; | 37 | 2.3125 | 29 | 8 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.